/* ==========================================================================
   BARYON — Minimalist Monochrome (Black & White) Architectural Theme
   Ultra-Clean, High-Contrast Dieter Rams / Apple SF Aesthetic
   All Rectangles Generously Rounded, Sleek Vector Iconography
   ========================================================================== */

:root {
  --bg-primary: #000000;
  --bg-secondary: #09090b;
  --bg-elevated: #141417;
  --bg-card: #0d0d0f;
  --bg-card-subtle: #121215;
  --border-color: rgba(255, 255, 255, 0.11);
  --border-focus: rgba(255, 255, 255, 0.42);
  --border-subtle: rgba(255, 255, 255, 0.07);

  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #636369;

  --accent-white: #ffffff;
  --accent-black: #000000;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --app-height: 100%;
  --app-offset-top: 0px;
  --composer-bottom-pad: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000000;
  -webkit-text-size-adjust: 100%;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: var(--app-height, 100%);
  margin: 0;
  padding: 0;
  background: #000000;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Inter', system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 350;
  line-height: 1.55;
  letter-spacing: -0.012em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.app-shell {
  position: fixed;
  top: var(--app-offset-top, 0px);
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: var(--app-height, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

/* ==========================================================================
   Vector Icon System
   ========================================================================== */
.svg-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.svg-icon-sm {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.svg-icon-xs {
  width: 12px;
  height: 12px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.svg-giant-mic {
  width: 64px;
  height: 64px;
  display: inline-block;
  vertical-align: middle;
}

.modal-icon {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Side Drawers (Generously Rounded Corners)
   ========================================================================== */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 310px;
  max-width: 86vw;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  z-index: 60;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-left {
  left: 0;
  border-right: 1px solid var(--border-color);
  border-radius: 0 28px 28px 0;
  transform: translateX(-105%);
  box-shadow: 16px 0 48px rgba(0, 0, 0, 0.85);
}

.sidebar-left.open {
  transform: translateX(0);
}

.sidebar-right {
  right: 0;
  width: 340px;
  border-left: 1px solid var(--border-color);
  border-radius: 28px 0 0 28px;
  transform: translateX(105%);
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.85);
}

.sidebar-right.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.brand-title {
  font-weight: 550;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.sidebar-actions {
  padding: 14px 16px;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 8px 18px;
}

.session-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 16px;
  cursor: pointer;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.session-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.session-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.session-item-title {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 195px;
}

.session-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
}

.net-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 12px 14px;
  font-size: 12px;
}

.net-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  margin-bottom: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.online {
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.85);
}

.status-dot.offline {
  background: #555555;
}

.net-urls {
  color: var(--text-secondary);
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.45;
  word-break: break-all;
}

/* ==========================================================================
   Main Center Area
   ========================================================================== */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
  background: var(--bg-primary);
  overflow: hidden;
  position: relative;
}

/* Compact Sleek Top Bar (Flushes with physical top edge behind Dynamic Island) */
.top-bar {
  box-sizing: border-box;
  padding-top: var(--safe-top);
  height: calc(52px + var(--safe-top));
  min-height: calc(52px + var(--safe-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: max(16px, var(--safe-left));
  padding-right: max(16px, var(--safe-right));
  padding-bottom: 0;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 20;
  flex-shrink: 0;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.title-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.session-heading {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  color: var(--text-primary);
}

.status-Subtext {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.badge-btn {
  position: relative;
}

.mini-pill {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ffffff;
  color: #000000;
  font-size: 10px;
  font-weight: 600;
  padding: 0 5px;
  border-radius: 9999px;
}

/* Reconnect Strip */
.reconnect-banner {
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  padding: 7px 16px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ==========================================================================
   Conversation Stream & Messages
   ========================================================================== */
.stream-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 14px 28px;
  -webkit-overflow-scrolling: touch;
}

.empty-state {
  max-width: 440px;
  margin: 50px auto;
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 28px;
}

.empty-logo {
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
}

.empty-state h2 {
  font-size: 18px;
  font-weight: 550;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 13.5px;
  margin-bottom: 20px;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jobs-feed {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ==========================================================================
   Job Cards (Architectural Rounded Rectangles)
   ========================================================================== */
.job-card {
  background: linear-gradient(180deg, #121215 0%, #0a0a0c 100%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.job-card.running {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.75), 0 0 24px rgba(255, 255, 255, 0.06);
}

.job-prompt-bar {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 26px 26px 0 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.job-live-progress {
  padding: 8px 16px 10px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.job-live-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-family: 'SF Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.job-live-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 9999px;
  overflow: hidden;
}

.job-live-progress-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 9999px;
  transition: width 0.25s ease-out;
}

.job-collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  padding-top: 2px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.job-collapse-icon {
  width: 14px;
  height: 14px;
}

.job-card.collapsed .job-collapse-toggle {
  transform: rotate(-90deg);
}

.job-card.collapsed .job-prompt-bar {
  border-radius: 24px;
  border-bottom: none;
}

.job-card.collapsed .job-output-body,
.job-card.collapsed .thought-details,
.job-card.collapsed .stepwise-tracker,
.job-card.collapsed .job-footer-bar {
  display: none !important;
}

.btn-star-job {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  transition: transform 0.15s, color 0.15s;
}

.btn-star-job .star-svg {
  width: 16px;
  height: 16px;
}

.btn-star-job.starred {
  color: #ffffff;
}

.btn-star-job:active {
  transform: scale(1.25);
}

.job-prompt-text {
  font-weight: 380;
  font-size: 13px;
  line-height: 1.38;
  color: #d4d4d8;
  word-break: break-word;
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.8em;
  cursor: pointer;
  padding-top: 1px;
  transition: max-height 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
}

.job-prompt-text:hover {
  color: #ffffff;
}

.job-prompt-text.expanded {
  display: block;
  -webkit-line-clamp: unset;
  max-height: none;
  white-space: pre-wrap;
  color: #ffffff;
}

.badge {
  font-size: 10px;
  font-weight: 450;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  white-space: nowrap;
  margin-top: 1px;
}

.badge-running {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
}

.stepwise-tracker {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.step-pill {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.step-pill.in_progress {
  color: #ffffff;
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.35);
}

.step-pill.completed {
  color: #ffffff;
}

.thought-details {
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

.thought-summary-bar {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 450;
  color: var(--text-secondary);
  cursor: pointer;
}

.thought-body {
  padding: 8px 16px 14px;
  font-size: 12.5px;
  font-weight: 350;
  color: var(--text-secondary);
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.job-output-body {
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 350;
  line-height: 1.62;
  color: #f4f4f5;
  overflow-wrap: break-word;
  user-select: text;
  -webkit-user-select: text;
}

.job-output-body p {
  font-weight: 350;
  margin-bottom: 12px;
}

.job-output-body strong, .job-output-body b {
  font-weight: 550;
  color: #ffffff;
}

.job-output-body h1, .job-output-body h2, .job-output-body h3, .job-output-body h4 {
  margin: 18px 0 10px;
  color: #ffffff;
  font-weight: 550;
  letter-spacing: -0.015em;
}

.job-output-body h1 { font-size: 1.35em; }
.job-output-body h2 { font-size: 1.2em; }
.job-output-body h3 { font-size: 1.1em; }
.job-output-body h4 { font-size: 1.0em; }

/* Collapsible Section Headings */
.collapsible-heading {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  margin: 16px -6px 8px !important;
  border-radius: 8px;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.collapsible-heading:hover {
  background: rgba(255, 255, 255, 0.05);
}

.collapsible-heading .heading-title {
  flex: 1;
}

.heading-chevron {
  width: 14px;
  height: 14px;
  opacity: 0.5;
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.collapsible-heading:hover .heading-chevron {
  opacity: 1;
}

.collapsible-heading.heading-collapsed .heading-chevron {
  transform: rotate(-90deg);
}

.section-hidden {
  display: none !important;
}

/* Collapsible Paragraph Blocks */
.para-block {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  border-radius: 12px;
  padding: 2px 4px 2px 2px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.para-block:hover {
  background: rgba(255, 255, 255, 0.02);
}

.para-gutter {
  flex-shrink: 0;
  width: 20px;
  padding-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-fold-para {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
  padding: 0;
}

.para-block:hover .btn-fold-para,
.para-block.collapsed .btn-fold-para {
  opacity: 0.95;
}

.btn-fold-para:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.fold-chevron {
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.para-block.collapsed .fold-chevron {
  transform: rotate(-90deg);
}

.para-body {
  flex: 1;
  min-width: 0;
}

.para-full {
  margin-bottom: 0 !important;
}

.para-preview {
  display: none;
  cursor: pointer;
  padding: 2px 8px 4px 0;
  border-radius: 8px;
  line-height: 1.5;
  user-select: none;
  -webkit-user-select: none;
}

.para-preview:hover {
  background: rgba(255, 255, 255, 0.035);
}

.para-block.collapsed .para-full {
  display: none !important;
}

.para-block.collapsed .para-preview {
  display: inline-block;
}

.para-preview-text {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 350;
}

.para-expand-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 450;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.12s ease;
}

.para-expand-pill:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Audio Narration Active Paragraph Highlight */
.para-block.audio-active {
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid #ffffff;
  padding-left: 8px;
}

/* Outline Mode Button Active State */
.btn-toggle-outline.active {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.job-output-body p { margin-bottom: 12px; }
.job-output-body ul, .job-output-body ol { margin: 8px 0 14px 22px; }

.job-output-body pre {
  background: #000000;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 12px 0;
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 13px;
}

.job-output-body code {
  font-family: 'SF Mono', ui-monospace, monospace;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

.job-output-body pre code {
  background: none;
  padding: 0;
}

.job-footer-bar {
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 26px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.job-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
}

.job-usage-info {
  font-size: 11px;
  font-family: 'SF Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================================================
   Clickable Sentences & Selection Toolbar
   ========================================================================== */
.job-sentence {
  border-radius: 4px;
  padding: 1px 2px;
  cursor: pointer;
  transition: background 0.12s;
}

.job-sentence:hover {
  background: rgba(255, 255, 255, 0.12);
  outline: 1px dashed rgba(255, 255, 255, 0.35);
}

.job-sentence.active-sentence {
  background: rgba(255, 255, 255, 0.22) !important;
  outline: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: 5px;
}

.selection-toolbar {
  position: fixed;
  bottom: calc(var(--composer-bottom-pad, 14px) + 68px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 23, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85), 0 0 16px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 7px 10px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 60;
  max-width: 92vw;
  overflow-x: auto;
  white-space: nowrap;
  touch-action: manipulation;
  transition: bottom 0.12s ease-out;
}

.sel-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 450;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s, transform 0.1s;
}

.sel-btn:active {
  transform: scale(0.96);
}

.sel-btn-primary {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

/* ==========================================================================
   Floating Jump Navigation Dock (Ultra-Compact Non-Intrusive Glass Capsule)
   ========================================================================== */
.scroll-nav-dock {
  position: fixed;
  right: max(12px, var(--safe-right));
  bottom: calc(var(--composer-bottom-pad, 14px) + 66px);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(16, 16, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  z-index: 45;
  opacity: 0.88;
  transition: opacity 0.2s, bottom 0.12s ease-out;
}

.scroll-nav-dock:hover {
  opacity: 1;
}

.nav-dock-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: 9999px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s, color 0.15s;
}

.nav-dock-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.nav-dock-btn:active {
  transform: scale(0.92);
}

.nav-dock-bottom {
  width: auto;
  height: 30px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 500;
  gap: 4px;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Load Older Wrap */
.load-older-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 16px;
}

.btn-sm {
  padding: 7px 16px;
  font-size: 12.5px;
  border-radius: 9999px;
}

/* ==========================================================================
   Bottom Composer Bar (Floating Glassmorphic Pill Capsule)
   ========================================================================== */
.composer-section {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.9) 30%, #000000 100%);
  border-top: none;
  padding-top: 6px;
  padding-left: max(12px, var(--safe-left));
  padding-right: max(12px, var(--safe-right));
  padding-bottom: var(--composer-bottom-pad, 14px);
  z-index: 20;
  flex-shrink: 0;
}

.prompt-slots-container {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prompt-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(20, 20, 23, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  padding: 4px 6px 4px 8px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.prompt-slot:focus-within {
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.prompt-textarea {
  flex: 1;
  background: transparent;
  color: var(--text-primary);
  border: none;
  border-radius: 0;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 350;
  line-height: 1.35;
  height: 32px;
  max-height: 52px;
  resize: none;
  outline: none;
  overflow-y: auto;
}

.composer-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.composer-icon-btn:active {
  transform: scale(0.94);
}

.composer-icon-btn.recording {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.7);
}

.composer-send-btn {
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 9999px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.composer-send-btn:active {
  transform: scale(0.92);
}

/* ==========================================================================
   Seekable Audio Player Bar (Large Touch Scrubber + Paragraph & 1-Min Snap)
   ========================================================================== */
.audio-player-bar {
  background: rgba(14, 14, 17, 0.96);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 10px 14px 8px;
  z-index: 30;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8);
}

.audio-player-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audio-scrubber-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.scrubber-track-container {
  position: relative;
  flex: 1;
  height: 34px;
  display: flex;
  align-items: center;
}

.scrubber-ticks-layer {
  position: absolute;
  left: 13px;
  right: 13px;
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 2;
}

.scrubber-tick {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 9999px;
}

.scrubber-tick-para {
  width: 3px;
  height: 14px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
}

.scrubber-tick-min {
  width: 2px;
  height: 20px;
  background: rgba(255, 255, 255, 0.42);
}

.scrubber-tick-min-label {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8.5px;
  font-family: 'SF Mono', ui-monospace, monospace;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.audio-scrubber {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  outline: none;
  margin: 0;
  position: relative;
  z-index: 3;
  cursor: pointer;
  touch-action: none;
}

.audio-scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #000000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 0 0 2px #ffffff;
  cursor: pointer;
  transition: transform 0.1s;
}

.audio-scrubber:active::-webkit-slider-thumb {
  transform: scale(1.18);
}

.audio-scrubber-xl {
  height: 16px;
  background: rgba(255, 255, 255, 0.18);
}

.audio-scrubber-xl::-webkit-slider-thumb {
  width: 32px;
  height: 32px;
  border: 4px solid #000000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.9), 0 0 0 2.5px #ffffff;
}

.audio-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.audio-transport-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.audio-right-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.audio-para-pill {
  font-size: 11px;
  font-weight: 500;
  font-family: 'SF Mono', ui-monospace, monospace;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 10px;
  border-radius: 9999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.audio-skip-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.audio-skip-btn:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.18);
}

.audio-play-btn {
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 9999px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.time-label {
  font-size: 12px;
  font-weight: 500;
  font-family: 'SF Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  min-width: 38px;
  text-align: center;
}

/* ==========================================================================
   Full-Screen Hands-Free Car / Driving Mode Overlay
   ========================================================================== */
.drive-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: var(--app-height, 100%);
  background: #000000;
  z-index: 150;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 8px) 16px calc(var(--composer-bottom-pad, 8px) + 4px);
  overflow: hidden;
}

.drive-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.drive-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drive-title-icon {
  width: 20px;
  height: 20px;
}

.drive-title {
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.drive-center {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 6px 0;
}

.drive-status-large {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.35;
  flex-shrink: 0;
}

/* Car Mode Live Progress & ETA Telemetry Card */
.drive-progress-panel {
  width: 100%;
  max-width: 390px;
  background: linear-gradient(180deg, rgba(24, 24, 28, 0.96) 0%, rgba(14, 14, 17, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.drive-timer-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
}

.drive-timer-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.drive-timer-label {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.drive-timer-digits {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 550;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.drive-timer-eta-val {
  color: #e4e4e7;
}

.drive-timer-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.14);
}

.drive-progress-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}

.drive-progress-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.85);
  transition: width 0.2s ease-out;
}

.drive-stage-pills {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.drive-stage-pill {
  flex: 1;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.2s;
}

.drive-stage-pill.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.drive-stage-pill.done {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}

.drive-giant-btn {
  width: 100%;
  max-width: 380px;
  height: clamp(130px, 21dvh, 175px);
  border-radius: 9999px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  background: #0d0d0d;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 1;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85);
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
}

.drive-giant-btn:active {
  transform: scale(0.97);
}

.drive-giant-btn.recording {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.85);
}

.drive-giant-btn.recording .drive-mic-vector-wrap svg {
  stroke: #000000;
}

.drive-mic-text {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.drive-audio-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  flex-shrink: 0;
}

.drive-scrubber-panel {
  background: rgba(20, 20, 24, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  padding: 10px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drive-scrubber-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drive-time-label {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 550;
  color: #ffffff;
}

.drive-para-badge {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px 9px;
  border-radius: 9999px;
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drive-scrubber-container {
  height: 36px;
}

.drive-transport-row {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.35fr 1fr 0.8fr;
  gap: 8px;
  width: 100%;
}

.drive-transport-btn {
  padding: 13px 8px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: #141414;
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform 0.1s, background 0.15s;
}

.drive-transport-compact {
  font-size: 13px;
  padding: 13px 6px;
}

.drive-transport-btn:active {
  transform: scale(0.95);
}

.drive-transport-primary {
  background: #ffffff;
  color: #000000;
  border: none;
}

/* ==========================================================================
   Right Drawer: Clips & Memory
   ========================================================================== */
.clip-Input-box {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clip-textarea {
  width: 100%;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.clip-textarea:focus {
  border-color: var(--border-focus);
}

.clip-input-actions {
  display: flex;
  gap: 6px;
}

.clip-note-input {
  flex: 1;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.clip-note-input:focus {
  border-color: var(--border-focus);
}

.clip-export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 4px;
}

.export-btns { display: flex; gap: 6px; }

.clips-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.clip-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  padding: 10px 4px 10px 6px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  transition: background 0.15s ease;
}

.clip-card:last-child {
  border-bottom: none;
}

.clip-card.pinned {
  border-left: 2px solid #ffffff;
  padding-left: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.clip-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.clip-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.clip-type-pill {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.clip-type-pill.global {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

.clip-note-tag {
  font-size: 11px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.clip-quote {
  font-size: 13px;
  font-weight: 350;
  line-height: 1.42;
  color: var(--text-primary);
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: text;
  word-break: break-word;
  transition: max-height 0.2s ease;
}

.clip-quote.expanded {
  display: block;
  -webkit-line-clamp: unset;
  max-height: none;
  white-space: pre-wrap;
}

.clip-side-actions {
  display: grid;
  grid-template-columns: repeat(2, 24px);
  gap: 4px;
  flex-shrink: 0;
  align-items: center;
  padding-top: 2px;
}

.clip-micro-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.clip-micro-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.clip-micro-btn.active {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.clip-micro-btn.btn-del-clip:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.clip-micro-btn svg {
  width: 12px;
  height: 12px;
}

/* ==========================================================================
   Modals & Settings (Rounded Card Windows)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.45;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.setting-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.setting-row label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.modal-select, .modal-input, .modal-textarea {
  width: 100%;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 11px 14px;
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
}

.modal-select:focus, .modal-input:focus, .modal-textarea:focus {
  border-color: var(--border-focus);
}

.setting-row-checkbox {
  padding: 6px 0;
}

.auto-send-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-primary);
  cursor: pointer;
}

/* ==========================================================================
   Buttons (High-Contrast Monochrome & Complete Pill Shapes)
   ========================================================================== */
.primary-btn {
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 9999px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform 0.1s, opacity 0.15s;
}

.primary-btn:active {
  transform: scale(0.97);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 450;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.15s, transform 0.1s;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.secondary-btn:active {
  transform: scale(0.97);
}

.tiny-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 450;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s, transform 0.1s;
}

.tiny-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.tiny-btn:active {
  transform: scale(0.95);
}

.icon-btn, .icon-btn-sm {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.icon-btn:hover, .icon-btn-sm:hover {
  background: rgba(255, 255, 255, 0.16);
}

.icon-btn:active, .icon-btn-sm:active {
  transform: scale(0.94);
}

.icon-btn-sm {
  width: 28px;
  height: 28px;
}

.full-width { width: 100%; }
.mt-8 { margin-top: 8px; }
.hidden { display: none !important; }

/* Spinner */
.spinner-sm {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

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

/* Flash Executive Prelude Banner & Recitation Fallback Notice */
.job-prelude-banner {
  margin: 0 14px 10px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.job-prelude-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  opacity: 0.9;
}

.job-prelude-text {
  font-size: 13.5px;
  line-height: 1.48;
  color: #e4e4e7;
}

.job-recitation-notice {
  margin: 12px 0;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.055);
  border-left: 3px solid #ffffff;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #e4e4e7;
}

/* Archiving Transition */
.job-card.archiving {
  opacity: 0;
  transform: scale(0.96) translateY(-8px);
  max-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-width: 0 !important;
  overflow: hidden !important;
  transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* Send Button Dictation Loading State */
#btn-send-prompts.loading {
  opacity: 0.85;
  cursor: wait;
}

#btn-send-prompts.loading svg {
  animation: spin 0.8s linear infinite;
}

/* Archive Modal & Items */
.archive-scope-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
  margin: 14px 0 16px;
  border: 1px solid var(--border-color);
}

.archive-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 9999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.archive-tab.active {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.archive-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 4px;
}

.archive-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.15s, border-color 0.15s;
}

.archive-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
}

.archive-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.archive-item-session {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.07);
  padding: 3px 8px;
  border-radius: 9999px;
}

.archive-item-time {
  font-size: 11.5px;
  color: var(--text-muted);
}

.archive-item-prompt {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
}

.archive-item-output {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  max-height: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.archive-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.archive-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.archive-empty-icon {
  width: 44px;
  height: 44px;
  opacity: 0.45;
}

/* Mobile optimizations for collapsible paragraphs */
@media (max-width: 600px) {
  .para-gutter {
    width: 24px;
  }
  .btn-fold-para {
    width: 22px;
    height: 22px;
    opacity: 0.55;
  }
  .collapsible-heading {
    padding: 6px 4px;
  }
}

/* ==========================================================================
   Thread & Workspace Search + Topic Synthesis Compiler
   ========================================================================== */
.search-compiler-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.search-topic-field {
  width: 100%;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.search-topic-field:focus {
  outline: none;
  border-color: var(--border-focus);
}

.search-compiler-actions {
  display: flex;
  gap: 8px;
}

.search-compiler-actions .primary-btn {
  flex: 1;
}

.search-synthesis-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.synthesis-result-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.synthesis-doc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.synthesis-doc-title {
  font-size: 15.5px;
  font-weight: 550;
  color: #ffffff;
  margin: 0 0 3px 0;
}

.synthesis-doc-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

.synthesis-doc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.synthesis-doc-body {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
  font-size: 13.5px;
  line-height: 1.55;
}

.synthesis-followups-wrap {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}

.synthesis-followups-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.followup-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.followup-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.followup-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.followup-card-title {
  font-size: 13px;
  font-weight: 550;
  color: #ffffff;
}

.followup-card-rationale {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.38;
}

.followup-card-prompt {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.followup-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
}

.search-matches-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-matches-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 260px;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.search-match-row {
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.search-match-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.search-match-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.search-match-prompt {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-match-snippet {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
