* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #1a1a2e;
  --bg-light: #25253d;
  --bg-lighter: #2d2d4a;
  --text: #eaeaea;
  --text-dim: #888;
  --primary: #4a9eff;
  --primary-hover: #3a8eef;
  --danger: #ff6b6b;
  --success: #4ade80;
  --border: #3a3a5a;
  --shadow: rgba(0, 0, 0, 0.3);
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 8px;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -1px;
  white-space: nowrap;
}

header .dim {
  color: var(--text-dim);
}

.tagline {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.btn-text:hover {
  color: var(--text);
  background: var(--bg-light);
}

/* Session Bar */
#session-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-light);
  border-radius: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
  flex-wrap: nowrap;
}

.nav-label {
  color: var(--text-dim);
  font-size: 0.85rem;
  white-space: nowrap;
}

.label {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.session-selector {
  position: relative;
}

.slug-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.slug-btn:hover {
  background: var(--bg-lighter);
}

.slug-btn .chevron {
  color: var(--text-dim);
  transition: transform 0.2s;
}

.slug-btn.open .chevron {
  transform: rotate(180deg);
}

.slug {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 1px;
}

.slug-url {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--primary);
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--bg-light);
  z-index: 1000;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 220px;
  box-shadow: 0 4px 12px var(--shadow);
  z-index: 50;
  overflow: hidden;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: var(--bg-lighter);
}

.dropdown-item.active {
  background: var(--bg-lighter);
  color: var(--primary);
}

.dropdown-item .session-slug {
  font-family: monospace;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
}

.dropdown-item .session-time {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.dropdown-item.new-session {
  border-top: 1px solid var(--border);
  color: var(--primary);
}

.dropdown-item.new-session svg {
  stroke: var(--primary);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-item.danger svg {
  stroke: var(--danger);
}

.options-menu {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}

.options-menu .dropdown {
  right: 0;
  left: auto;
  min-width: 180px;
}

.badge {
  background: var(--success);
  color: #000;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: var(--bg-lighter);
}

.btn-small {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-small:hover {
  background: var(--primary);
  color: white;
}

.btn-protect {
  color: #f0ad4e;
  border-color: #f0ad4e;
}

.btn-protect:hover {
  background: #f0ad4e;
  color: #000;
}

.btn-danger {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.btn-danger-solid {
  background: var(--danger);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-danger-solid:hover {
  background: #e55555;
}

.warning-text {
  color: var(--danger);
  margin-bottom: 16px;
}

.warning-text.small {
  font-size: 0.85rem;
  margin-top: 12px;
  margin-bottom: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin: 16px 0;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.remembered-note {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 16px;
  margin-bottom: 8px;
}

#forget-device-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.btn-icon:hover {
  color: var(--text);
}

/* Notices */
.notice {
  background: rgba(255, 200, 100, 0.1);
  border: 1px solid rgba(255, 200, 100, 0.3);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.notice a {
  color: var(--primary);
}

/* Passwordless session notice */
.passwordless-notice {
  background: rgba(255, 200, 100, 0.08);
  border-color: rgba(255, 200, 100, 0.2);
  padding: 8px 14px;
}

.passwordless-notice .session-info-details {
  margin: 0;
}

.passwordless-notice .session-info-details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.passwordless-notice .session-info-details summary::-webkit-details-marker {
  display: none;
}

.passwordless-notice .session-info-details summary::before {
  content: '+';
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: bold;
  width: 14px;
  flex-shrink: 0;
}

.passwordless-notice .session-info-details[open] summary::before {
  content: '-';
}

.passwordless-notice .notice-summary {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.passwordless-notice .expand-hint {
  color: var(--primary);
  opacity: 0.8;
}

.passwordless-notice .session-info-details summary:hover .expand-hint {
  opacity: 1;
  text-decoration: underline;
}

.passwordless-notice .upgrade-prompt {
  color: #f0ad4e;
  font-size: 0.85rem;
  text-decoration: none;
}

.passwordless-notice .upgrade-prompt:hover {
  text-decoration: underline;
}

.passwordless-notice .notice-expanded {
  padding: 10px 0 4px 22px;
}

.passwordless-notice .notice-expanded p {
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.passwordless-notice .notice-expanded p:last-child {
  margin-bottom: 0;
}

.passwordless-notice .security-info {
  opacity: 0.8;
}

/* Hide notice button */
.passwordless-notice {
  display: flex;
  align-items: center;
  gap: 8px;
}

.passwordless-notice .session-info-details {
  flex: 1;
  min-width: 0;
}

.passwordless-notice .session-info-details summary {
  flex-wrap: nowrap;
}

.hide-notice-btn {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
}

.hide-notice-btn:hover {
  opacity: 1;
  color: var(--text);
}

/* Main content */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  z-index: 1;
}

.center-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.hidden {
  display: none !important;
}

/* Welcome Box */
.welcome-box {
  text-align: center;
  padding: 40px;
  background: var(--bg-light);
  border-radius: 12px;
  max-width: 400px;
}

.welcome-box h2 {
  margin-bottom: 12px;
  font-size: 1.4rem;
}

.welcome-box p {
  color: var(--text-dim);
  margin-bottom: 24px;
}

/* Session Not Found Box */
.not-found-box {
  text-align: center;
  padding: 40px;
  background: var(--bg-light);
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
}

.not-found-box h2 {
  margin-bottom: 12px;
  font-size: 1.4rem;
}

.not-found-box p {
  color: var(--text-dim);
  margin-bottom: 24px;
  line-height: 1.6;
}

.not-found-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Info list in modal */
.info-list {
  margin: 16px 0;
  padding-left: 20px;
  text-align: left;
}

.info-list li {
  margin-bottom: 8px;
  color: var(--text-dim);
  line-height: 1.5;
}

.info-list li strong {
  color: var(--text);
}

/* Password Box */
.password-box {
  text-align: center;
  padding: 40px;
  background: var(--bg-light);
  border-radius: 12px;
  max-width: 360px;
  width: 100%;
}

.password-box h2 {
  margin-bottom: 8px;
}

.password-box p {
  color: var(--text-dim);
  margin-bottom: 20px;
}

.password-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
}

.password-box input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-content {
  background: var(--bg-light);
  padding: 28px;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
}

.modal-content h2 {
  margin-bottom: 12px;
}

.modal-content p {
  color: var(--text-dim);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.modal-content input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
}

.modal-content input:focus {
  outline: none;
  border-color: var(--primary);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-actions button {
  flex: 1;
}

/* Modal variations */
.modal-wide {
  max-width: 550px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
}

.modal-close:hover {
  color: var(--text);
  background: var(--bg);
}

.modal-content {
  position: relative;
}

/* How it works explainer */
.explainer {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 8px;
}

.explainer h3 {
  font-size: 1rem;
  margin: 24px 0 12px;
  color: var(--text);
}

.explainer h3:first-of-type {
  margin-top: 16px;
}

.explainer h4 {
  font-size: 0.9rem;
  margin: 12px 0 8px;
  color: var(--text);
}

.explainer p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.5;
}

.explainer ul {
  margin: 0 0 12px 0;
  padding-left: 20px;
}

.explainer li {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 6px;
  line-height: 1.4;
}

.session-type {
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.session-type h4 {
  margin-top: 0;
}

.session-type p {
  margin-bottom: 8px;
}

.session-type ul {
  margin-bottom: 0;
}

/* Technical details expandable */
.technical-details {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.technical-details summary {
  cursor: pointer;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 0;
}

.technical-details summary:hover {
  text-decoration: underline;
}

.technical-content {
  margin-top: 12px;
}

.technical-content h4 {
  font-size: 0.85rem;
  color: var(--text);
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.technical-content h4:first-child {
  margin-top: 0;
}

.technical-content p {
  font-size: 0.85rem;
}

.technical-content ul {
  padding-left: 18px;
}

.technical-content li {
  font-size: 0.8rem;
}

.error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

/* Progress bar */
.progress-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s;
}

.progress-text {
  font-size: 0.85rem;
  text-align: center;
}

/* Chat interface */
#chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  background: var(--bg-lighter);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.message {
  background: var(--bg-light);
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 85%;
  align-self: flex-end;
  word-wrap: break-word;
}

.message.empty-message {
  align-self: center;
  color: var(--text-dim);
  background: transparent;
}

.message img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  display: block;
  cursor: pointer;
  transition: opacity 0.2s;
}

.message img:hover {
  opacity: 0.9;
}

/* Message footer with timestamp and download button */
.message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.download-btn,
.copy-btn {
  color: var(--text-dim);
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  background: transparent;
  border: none;
  cursor: pointer;
}

.download-btn:hover,
.copy-btn:hover {
  color: var(--primary);
}

.copy-btn.copied {
  color: var(--success);
}

.delete-btn {
  color: var(--text-dim);
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  background: transparent;
  border: none;
  cursor: pointer;
}

.delete-btn:hover {
  color: var(--danger);
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* File attachment in message */
.file-attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.2s;
}

.file-attachment:hover {
  background: var(--bg-lighter);
}

.file-icon {
  flex-shrink: 0;
  color: var(--primary);
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Image lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 10px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.message .time {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 6px;
}

#input-area {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  flex-shrink: 0;
  align-items: flex-end;
}

#upload-btn {
  padding: 10px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#upload-btn:hover {
  color: var(--text);
  border-color: var(--primary);
}

#message-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  resize: none;
  max-height: 150px;
}

#message-input:focus {
  outline: none;
  border-color: var(--primary);
}

#send-btn {
  align-self: flex-end;
}

/* Footer */
footer {
  text-align: center;
  padding: 12px 0;
  flex-shrink: 0;
}

.help-text {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.help-text code {
  color: var(--primary);
  font-weight: 600;
}

/* Loading */
.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-status {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* Spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bg-lighter);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast notification */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-lighter);
  color: var(--text);
  padding: 14px 24px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px var(--shadow);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.95rem;
}

.toast:not(.hidden) {
  opacity: 1;
}

/* Sync Status Bar */
.sync-status-bar {
  padding: 6px 16px;
  text-align: center;
  font-size: 0.8rem;
  border-radius: 4px;
  margin-bottom: 8px;
}

.sync-status-bar.offline {
  background: var(--bg-lighter);
  color: var(--text-dim);
}

.sync-status-bar.syncing {
  background: #1a2a3a;
  color: #6ab0f3;
}

.sync-status-bar.retrying {
  background: #2a2a1a;
  color: #f0a040;
}

/* Sync Indicator (per-message) */
.sync-indicator {
  font-size: 0.7rem;
  margin-left: 4px;
  opacity: 0.8;
}

.sync-indicator.synced::after {
  content: '\2713';
  color: var(--success);
}

.sync-indicator.pending::after {
  content: '\21BB';
  color: var(--text-dim);
}

.sync-indicator.failed::after {
  content: '!';
  color: var(--danger);
}

/* Responsive */
@media (max-width: 600px) {
  header {
    gap: 8px;
  }

  .header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  header h1 {
    font-size: 1.4rem;
  }

  .tagline {
    font-size: 0.75rem;
    line-height: 1.3;
  }

  .btn-text {
    flex-shrink: 0;
    font-size: 0.8rem;
    padding: 4px 6px;
  }

  /* Hide nav label on mobile */
  .nav-label {
    display: none;
  }

  /* Session bar - keep on one row */
  #session-bar {
    gap: 6px;
    padding: 8px 10px;
  }

  .slug-url {
    font-size: 0.85rem;
  }

  /* Passwordless notice on mobile */
  .passwordless-notice {
    padding: 6px 10px;
  }

  .passwordless-notice .notice-summary {
    font-size: 0.8rem;
  }

  .passwordless-notice .upgrade-prompt {
    font-size: 0.8rem;
  }

  .message {
    max-width: 95%;
  }

  /* Input area */
  #input-area {
    gap: 6px;
  }

  #message-input {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  #send-btn {
    padding: 8px 14px;
    font-size: 0.9rem;
  }
}

/* Share page styles */
.share-box {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 28px;
  max-width: 400px;
  width: 100%;
}

.share-box h2 {
  margin-bottom: 16px;
}

.share-preview {
  background: var(--bg);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  max-height: 200px;
  overflow-y: auto;
}

.preview-item {
  margin-bottom: 10px;
}

.preview-item:last-child {
  margin-bottom: 0;
}

.preview-image {
  max-width: 100%;
  max-height: 120px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.preview-file-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-filename {
  font-weight: 500;
  word-break: break-all;
}

.preview-filesize {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.preview-text {
  color: var(--text-dim);
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.share-session {
  margin-bottom: 16px;
}

.share-label {
  display: block;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.session-select-wrapper {
  position: relative;
}

.session-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s;
}

.session-select-btn:hover {
  border-color: var(--primary);
}

.session-select-btn code {
  color: var(--primary);
  font-weight: 500;
}

.session-select-btn .chevron {
  color: var(--text-dim);
}

.session-picker {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow);
  z-index: 50;
  max-height: 200px;
  overflow-y: auto;
}

.session-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.session-option:hover {
  background: var(--bg-lighter);
}

.session-option.selected {
  background: var(--bg-lighter);
}

.session-option.selected code {
  color: var(--primary);
}

.session-option.new-session {
  border-top: 1px solid var(--border);
  color: var(--primary);
}

.session-option.new-session svg {
  stroke: var(--primary);
}

.password-section {
  margin-bottom: 16px;
}

.password-section input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
  margin-top: 8px;
}

.password-section input:focus {
  outline: none;
  border-color: var(--primary);
}

.share-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: 6px;
  margin-bottom: 16px;
}

.share-status .spinner {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.share-actions {
  display: flex;
  gap: 12px;
}

.share-actions button {
  flex: 1;
}

/* iOS Install Modal */
.install-steps {
  margin: 16px 0;
  padding-left: 24px;
  text-align: left;
}

.install-steps li {
  margin-bottom: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

.install-steps li strong {
  color: var(--text);
}

.ios-share-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: var(--primary);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8'/%3E%3Cpolyline points='16 6 12 2 8 6'/%3E%3Cline x1='12' y1='2' x2='12' y2='15'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8'/%3E%3Cpolyline points='16 6 12 2 8 6'/%3E%3Cline x1='12' y1='2' x2='12' y2='15'/%3E%3C/svg%3E") center/contain no-repeat;
  vertical-align: middle;
  margin: 0 4px;
}

.modal-content .subtle {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 16px;
}

/* Standalone mode adjustments */
.standalone-mode .install-app-btn {
  display: none !important;
}

/* Small spinner variant */
.spinner.small {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

/* Progressive loading indicators */
.loading-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.history-marker {
  text-align: center;
  padding: 16px;
  color: var(--text-dim);
  font-size: 0.85rem;
}
