/* ==========================================================================
   SULA VOX — Acoustic Archival Studio Design System
   Tynvik / Sula Minimal High-Craft Aesthetic (Warm-Obsidian & Archival Paper)
   ========================================================================== */

:root,
[data-theme="dark"] {
  --bg-canvas: #0c0b0a;
  --bg-rail: #11100f;
  --bg-surface: #171513;
  --bg-elevated: #1f1c19;
  --bg-hover: #24211d;
  --bg-sunken: #0e0d0c;
  --bg-overlay: rgba(8, 7, 6, 0.76);

  --border-hairline: #27231f;
  --border-subtle: #312c26;
  --border-strong: #433c34;

  --text-primary: #efece6;
  --text-secondary: #c2bcb2;
  --text-muted: #857e74;
  --text-faint: #5e5850;

  --accent-ember: #e06d3b;
  --accent-ember-hover: #ec7b49;
  --accent-ember-soft: rgba(224, 109, 59, 0.13);
  --accent-ember-border: rgba(224, 109, 59, 0.38);

  --accent-brass: #d9a45b;
  --accent-brass-soft: rgba(217, 164, 91, 0.13);
  --accent-brass-border: rgba(217, 164, 91, 0.36);

  --accent-ice: #8db4d9;
  --accent-ice-soft: rgba(141, 180, 217, 0.12);
  --accent-ice-border: rgba(141, 180, 217, 0.34);

  --accent-mineral: #6fa8a1;
  --accent-mineral-soft: rgba(111, 168, 161, 0.13);
  --accent-mineral-border: rgba(111, 168, 161, 0.36);

  --accent-coral: #d9655b;
  --accent-coral-soft: rgba(217, 101, 91, 0.13);
  --accent-coral-border: rgba(217, 101, 91, 0.38);

  --accent-plum: #b38aa8;
  --accent-plum-soft: rgba(179, 138, 168, 0.13);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-float: 0 18px 44px rgba(0, 0, 0, 0.55);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, monospace;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 11px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --topbar-h: 52px;
  --statsbar-h: 58px;
}

[data-theme="light"] {
  --bg-canvas: #f4f1ea;
  --bg-rail: #ebe7de;
  --bg-surface: #fbfaf7;
  --bg-elevated: #f0ece3;
  --bg-hover: #e7e2d7;
  --bg-sunken: #e9e4d9;
  --bg-overlay: rgba(24, 22, 20, 0.45);

  --border-hairline: #dad3c6;
  --border-subtle: #cdc4b5;
  --border-strong: #b3a896;

  --text-primary: #191715;
  --text-secondary: #433e38;
  --text-muted: #70695f;
  --text-faint: #968e82;

  --accent-ember: #c65322;
  --accent-ember-hover: #b04619;
  --accent-ember-soft: rgba(198, 83, 34, 0.1);
  --accent-ember-border: rgba(198, 83, 34, 0.34);

  --accent-brass: #996619;
  --accent-brass-soft: rgba(153, 102, 25, 0.1);
  --accent-brass-border: rgba(153, 102, 25, 0.32);

  --accent-ice: #2b608c;
  --accent-ice-soft: rgba(43, 96, 140, 0.1);
  --accent-ice-border: rgba(43, 96, 140, 0.3);

  --accent-mineral: #266d65;
  --accent-mineral-soft: rgba(38, 109, 101, 0.1);
  --accent-mineral-border: rgba(38, 109, 101, 0.32);

  --accent-coral: #bd3f35;
  --accent-coral-soft: rgba(189, 63, 53, 0.1);
  --accent-coral-border: rgba(189, 63, 53, 0.32);

  --accent-plum: #7a4b6e;
  --accent-plum-soft: rgba(122, 75, 110, 0.1);

  --shadow-card: 0 1px 2px rgba(24, 20, 14, 0.05);
  --shadow-float: 0 16px 38px rgba(24, 20, 14, 0.16);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.mono,
code,
time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
  white-space: nowrap;
}

button:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

button:active:not(:disabled) {
  transform: translateY(0.5px);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.btn-primary {
  background: var(--accent-ember);
  border-color: var(--accent-ember);
  color: #fff;
  font-weight: 600;
}

button.btn-primary:hover:not(:disabled) {
  background: var(--accent-ember-hover);
  border-color: var(--accent-ember-hover);
}

button.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

button.btn-ghost:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: var(--border-hairline);
  color: var(--text-primary);
}

button.btn-brass {
  background: var(--accent-brass-soft);
  border-color: var(--accent-brass-border);
  color: var(--accent-brass);
}

button.btn-brass:hover:not(:disabled) {
  background: rgba(217, 164, 91, 0.22);
  border-color: var(--accent-brass);
}

button.btn-mineral {
  background: var(--accent-mineral-soft);
  border-color: var(--accent-mineral-border);
  color: var(--accent-mineral);
}

button.btn-mineral:hover:not(:disabled) {
  background: rgba(111, 168, 161, 0.22);
  border-color: var(--accent-mineral);
}

input[type="text"],
input[type="search"],
input[type="password"],
select,
textarea {
  background: var(--bg-sunken);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 11px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-ember);
  box-shadow: 0 0 0 2px var(--accent-ember-soft);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

.icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 13px;
  height: 13px;
}

.icon-lg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   1. Top Navigation Chrome
   ========================================================================== */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: var(--bg-rail);
  border-bottom: 1px solid var(--border-hairline);
  position: sticky;
  top: 0;
  z-index: 40;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
}

.brand-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-brass-soft);
  border: 1px solid var(--accent-brass-border);
  color: var(--accent-brass);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: voxPulse 1.6s infinite ease-in-out;
}

@keyframes voxPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-btn {
  height: 34px;
  padding: 0 11px;
  font-size: 12.5px;
}

.topbar-icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
}

/* ==========================================================================
   2. Auth Gate Screen (401 / Token Entry)
   ========================================================================== */
.auth-gate {
  min-height: calc(100vh - var(--topbar-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 410px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-float);
}

.auth-emblem {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-card .auth-lead {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.auth-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-field-wrap input {
  width: 100%;
  height: 44px;
  padding-right: 44px;
  font-family: var(--font-mono);
  font-size: 13.5px;
}

.auth-eye-btn {
  position: absolute;
  right: 4px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
}

.auth-submit {
  width: 100%;
  height: 44px;
  margin-top: 14px;
  font-size: 14px;
}

.auth-hint {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-hairline);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.auth-hint code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-hairline);
  font-size: 11.5px;
}

.auth-error {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-coral-soft);
  border: 1px solid var(--accent-coral-border);
  color: var(--accent-coral);
  font-size: 12.5px;
}

/* ==========================================================================
   3. Compact Stats Strip (GET /api/stats)
   ========================================================================== */
.stats-strip {
  display: flex;
  align-items: stretch;
  background: var(--bg-rail);
  border-bottom: 1px solid var(--border-hairline);
  min-height: var(--statsbar-h);
  overflow-x: auto;
  scrollbar-width: none;
}

.stats-strip::-webkit-scrollbar {
  display: none;
}

.stats-windows {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  flex-shrink: 0;
}

.stat-cell {
  padding: 8px 16px;
  border-right: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.stat-metric {
  display: flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.stat-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-count small {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 1px;
}

.stat-dur {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--text-muted);
}

.stats-facets {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  flex: 1;
  min-width: 0;
}

.facet-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.facet-title {
  font-size: 11px;
  color: var(--text-faint);
  margin-right: 2px;
  letter-spacing: 0.04em;
}

.facet-divider {
  width: 1px;
  height: 22px;
  background: var(--border-hairline);
  flex-shrink: 0;
}

.stat-chip {
  height: 26px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  gap: 5px;
}

.stat-chip .chip-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-muted);
}

.stat-chip.active {
  background: var(--accent-ember-soft);
  border-color: var(--accent-ember-border);
  color: var(--accent-ember);
}

.stat-chip.active .chip-num {
  color: var(--accent-ember);
}

.stat-chip.st-ready .status-dot { background: var(--accent-mineral); }
.stat-chip.st-processing .status-dot { background: var(--accent-brass); }
.stat-chip.st-queued .status-dot { background: var(--accent-ice); }
.stat-chip.st-failed .status-dot { background: var(--accent-coral); }

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ==========================================================================
   4. Main Dual-Pane Workspace (Desktop >= 960px, Mobile < 960px)
   ========================================================================== */
.workspace {
  display: grid;
  grid-template-columns: 344px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: calc(100vh - var(--topbar-h) - var(--statsbar-h));
  min-height: 540px;
  overflow: hidden;
}

/* Left Inbox Rail */
.inbox-rail {
  background: var(--bg-rail);
  border-right: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.inbox-controls {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex-shrink: 0;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box .search-icon {
  position: absolute;
  left: 11px;
  color: var(--text-faint);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 36px;
  padding-left: 33px;
  padding-right: 32px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.search-clear {
  position: absolute;
  right: 4px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-xs);
}

/* Category Segmented Filter Tabs */
.cat-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 1px;
}

.cat-tabs::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  height: 29px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cat-tab:hover {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-color: var(--border-hairline);
}

.cat-tab.active {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
  font-weight: 600;
}

/* Secondary Filter Row (Project Tag + Status + Count) */
.subfilter-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.subfilter-select {
  height: 30px;
  padding: 0 24px 0 9px;
  font-size: 12px;
  border-radius: var(--radius-xs);
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 13px) 12px, calc(100% - 8px) 12px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.inbox-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 0 2px;
}

.reset-filters-btn {
  height: 22px;
  padding: 0 7px;
  font-size: 11px;
  border-radius: var(--radius-xs);
  color: var(--accent-ember);
  border-color: var(--accent-ember-border);
  background: var(--accent-ember-soft);
}

/* Recording List */
.inbox-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.rec-card {
  position: relative;
  padding: 13px 14px 13px 16px;
  border-bottom: 1px solid var(--border-hairline);
  cursor: pointer;
  transition: background 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.rec-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.15s ease;
}

.rec-card:hover {
  background: var(--bg-surface);
}

.rec-card.active {
  background: var(--bg-elevated);
}

.rec-card.active::before {
  background: var(--accent-ember);
}

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

.rec-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.42;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.rec-dur {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--text-muted);
  flex-shrink: 0;
  padding-top: 1px;
}

.rec-snippet {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.48;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.rec-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 1px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--border-hairline);
  background: var(--bg-sunken);
  color: var(--text-secondary);
  white-space: nowrap;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-status-ready {
  color: var(--accent-mineral);
  border-color: var(--accent-mineral-border);
  background: var(--accent-mineral-soft);
}

.badge-status-processing {
  color: var(--accent-brass);
  border-color: var(--accent-brass-border);
  background: var(--accent-brass-soft);
}

.badge-status-queued {
  color: var(--accent-ice);
  border-color: var(--accent-ice-border);
  background: var(--accent-ice-soft);
}

.badge-status-failed {
  color: var(--accent-coral);
  border-color: var(--accent-coral-border);
  background: var(--accent-coral-soft);
}

.badge-cat-call { color: var(--accent-ice); }
.badge-cat-wechat { color: var(--accent-mineral); }
.badge-cat-meeting { color: var(--accent-brass); }
.badge-cat-interview { color: var(--accent-plum); }

.badge-project {
  color: var(--accent-brass);
  border-color: var(--accent-brass-border);
  background: var(--accent-brass-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.rec-time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-faint);
}

.inbox-empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.inbox-empty p {
  margin: 8px 0 0;
}

/* ==========================================================================
   5. Right Detail & Dispatch Studio
   ========================================================================== */
.detail-workspace {
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  background: var(--bg-canvas);
}

.mobile-back-bar {
  display: none;
}

.detail-empty-state {
  height: 100%;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
}

.detail-empty-state .empty-wave {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--text-faint);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 1280px) {
  .detail-workspace {
    overflow: hidden;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 346px;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    height: 100%;
  }
  .detail-main-col {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .detail-side-col {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-left: 1px solid var(--border-hairline);
    background: var(--bg-rail);
  }
}

.detail-main-col {
  padding: 20px 22px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.detail-side-col {
  padding: 18px 18px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.detail-main-col > *,
.detail-side-col > * {
  flex-shrink: 0;
}
.detail-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-kicker-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.detail-title {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  word-break: break-word;
}

.provenance-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.prov-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.model-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--accent-ice-border);
  background: var(--accent-ice-soft);
  color: var(--accent-ice);
}

.model-badge.is-carbon {
  border-color: var(--accent-brass-border);
  background: var(--accent-brass-soft);
  color: var(--accent-brass);
}

/* Status Banner for Queued / Processing / Failed */
.pipeline-banner {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.pipeline-banner.is-pending {
  background: var(--accent-brass-soft);
  border: 1px solid var(--accent-brass-border);
  color: var(--accent-brass);
}

.pipeline-banner.is-failed {
  background: var(--accent-coral-soft);
  border: 1px solid var(--accent-coral-border);
  color: var(--accent-coral);
}

/* ==========================================================================
   6. Acoustic Audio Studio Deck + Manual Enhancement Controls
   ========================================================================== */
.studio-deck {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: var(--shadow-card);
}

.player-main-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  background: var(--accent-ember);
  border-color: var(--accent-ember);
  color: #fff;
  flex-shrink: 0;
}

.play-toggle-btn:hover:not(:disabled) {
  background: var(--accent-ember-hover);
  border-color: var(--accent-ember-hover);
}

.skip-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.timeline-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scrub-track {
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.scrub-rail {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  border: 1px solid var(--border-hairline);
  overflow: hidden;
}

.scrub-buffered {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--border-subtle);
}

.scrub-played {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent-ember);
}

.scrub-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 2px solid var(--accent-ember);
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.time-readout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.player-tools-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-hairline);
}

.speed-pills,
.stream-pills {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-sunken);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
}

.speed-pill,
.stream-pill {
  height: 26px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
}

.speed-pill.active,
.stream-pill.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.jump-form {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.jump-form input {
  width: 76px;
  height: 28px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
}

.jump-form button {
  height: 28px;
  padding: 0 9px;
  font-size: 11.5px;
}

/* Manual Re-Analysis & Doubao Bar */
.enhance-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-hairline);
}

.enhance-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-right: 2px;
}

.enhance-btn {
  height: 32px;
  padding: 0 11px;
  font-size: 12px;
}

.carbon-confirm-box {
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--accent-brass-soft);
  border: 1px solid var(--accent-brass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-primary);
}

.enhance-feedback {
  font-size: 12px;
  color: var(--accent-brass);
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ==========================================================================
   7. Structured Intelligence (Summary, Key Points, Action Items, Speakers)
   ========================================================================== */
.section-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-card);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

.speakers-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.speaker-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.speaker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.summary-prose {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.74;
  color: var(--text-primary);
  white-space: pre-line;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
}

.insight-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.insight-subhead {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kp-list,
.action-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.kp-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.kp-index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-ice);
  background: var(--accent-ice-soft);
  border: 1px solid var(--accent-ice-border);
  border-radius: 4px;
  padding: 0 5px;
  margin-top: 2px;
  flex-shrink: 0;
}

.action-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.58;
  color: var(--text-secondary);
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--border-hairline);
  cursor: pointer;
  transition: border-color 0.12s ease, opacity 0.15s ease;
}

.action-item:hover {
  border-color: var(--border-subtle);
}

.action-item.checked {
  opacity: 0.58;
  text-decoration: line-through;
}

.action-check {
  margin-top: 3px;
  accent-color: var(--accent-ember);
  flex-shrink: 0;
}

/* ==========================================================================
   8. Tabbed Transcript & Doubao Utterance Studio
   ========================================================================== */
.transcript-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.transcript-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-rail);
  border-bottom: 1px solid var(--border-hairline);
}

.tab-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-sunken);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
}

.tab-btn {
  height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
}

.tab-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tab-count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  color: var(--text-muted);
}

.tab-btn.active .tab-count {
  background: var(--accent-mineral-soft);
  color: var(--accent-mineral);
}

.transcript-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.transcript-filter-input {
  width: 150px;
  height: 29px;
  padding: 0 9px;
  font-size: 12px;
}

.transcript-body {
  padding: 14px 16px;
}

/* Gemini Structured Transcript Turns */
.turn-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chunk-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  background: var(--bg-sunken);
  border: 1px solid var(--border-hairline);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.dialogue-turn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--border-hairline);
}

.turn-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.turn-speaker {
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--accent-ice);
}

.turn-speaker.spk-1 { color: var(--accent-brass); }
.turn-speaker.spk-2 { color: var(--accent-mineral); }
.turn-speaker.spk-3 { color: var(--accent-plum); }

.ts-seek-chip {
  height: 21px;
  padding: 0 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  border-radius: 4px;
  background: var(--accent-ember-soft);
  border: 1px solid var(--accent-ember-border);
  color: var(--accent-ember);
}

.turn-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.raw-transcript-pre {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Doubao Interactive Utterance Timeline */
.utterance-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.utterance-row {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--border-hairline);
  border-left: 3px solid transparent;
  white-space: normal;
  min-height: 44px;
  height: auto;
  flex-shrink: 0;
}

.utterance-row:hover {
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
  border-left-color: var(--accent-mineral);
}

.utterance-row.is-playing {
  background: var(--accent-ember-soft);
  border-color: var(--accent-ember-border);
  border-left-color: var(--accent-ember);
}

.utt-time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--accent-mineral);
  background: var(--accent-mineral-soft);
  border: 1px solid var(--accent-mineral-border);
  padding: 2px 7px;
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 1px;
}

.utterance-row.is-playing .utt-time {
  color: var(--accent-ember);
  background: rgba(224, 109, 59, 0.16);
  border-color: var(--accent-ember-border);
}

.utt-content {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--text-primary);
  word-break: break-word;
}

.utt-speaker {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-brass);
  margin-right: 6px;
}

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

/* ==========================================================================
   9. Right Side Inspector: Orca Bot Dispatch & Editable Metadata
   ========================================================================== */
.side-panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-card);
}

/* Bot Selector Cards */
.bot-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 336px;
  overflow-y: auto;
}

.bot-option {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--border-hairline);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  white-space: normal;
  min-height: 46px;
  height: auto;
  flex-shrink: 0;
}

.bot-option:hover {
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
}

.bot-option.selected {
  background: var(--accent-ember-soft);
  border-color: var(--accent-ember);
}

.bot-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bot-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.bot-specialty {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.bot-agent-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-hairline);
  flex-shrink: 0;
}

.dispatch-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seg-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--border-hairline);
}

.seg-btn {
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
}

.seg-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--border-hairline);
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-ember);
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.prompt-chip {
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  border-color: var(--border-hairline);
  color: var(--text-muted);
}

.dispatch-textarea,
.meta-notes-input {
  width: 100%;
  resize: vertical;
  min-height: 68px;
  font-size: 13px;
  line-height: 1.55;
}

.dispatch-submit-btn {
  width: 100%;
  height: 40px;
  font-size: 13.5px;
}

/* Dispatch History Timeline */
.dispatch-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-hairline);
}

.history-item {
  position: relative;
  padding: 8px 10px 8px 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--border-hairline);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.history-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent-mineral);
}

.history-item.is-failed::before {
  background: var(--accent-coral);
}

.history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.history-bot {
  font-weight: 600;
  color: var(--text-primary);
}

.history-time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
}

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

.history-instr {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 2px;
  word-break: break-word;
}

/* Editable Metadata Form */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.save-status {
  font-size: 12px;
  color: var(--accent-mineral);
}

/* ==========================================================================
   10. Upload Modal & Toast Notifications
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 90;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.upload-dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 26px 16px;
  text-align: center;
  background: var(--bg-sunken);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--accent-ember);
  background: var(--accent-ember-soft);
}

.upload-progress-bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-ember);
  transition: width 0.15s ease;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 120;
  max-width: calc(100vw - 36px);
}

.toast {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 13px;
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.is-ok { border-left: 3px solid var(--accent-mineral); }
.toast.is-err { border-left: 3px solid var(--accent-coral); }

/* ==========================================================================
   11. Responsive Mobile-First & Tablet Breakpoints (< 960px, 390px 15T)
   ========================================================================== */
@media (max-width: 959px) {
  .brand-subtitle {
    display: none;
  }

  .topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 25px;
    height: 25px;
  }

  .brand-title {
    font-size: 13px;
    letter-spacing: 0.07em;
  }

  .live-sync-pill {
    font-size: 10.5px;
    padding: 2px 6px;
    gap: 4px;
  }

  .live-sync-pill .sync-verbose {
    display: none;
  }

  .topbar-actions {
    gap: 4px;
  }

  .topbar-btn .btn-label-desktop {
    display: none;
  }

  .topbar-btn,
  .topbar-icon-btn {
    min-width: 34px;
    min-height: 34px;
    width: 34px;
    height: 34px;
    padding: 0;
  }

  /* Stats strip becomes clean 2x2 grid + scrollable pills on mobile inbox */
  .stats-strip {
    flex-direction: column;
    overflow-x: visible;
  }

  .stats-windows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid var(--border-hairline);
  }

  .stat-cell {
    padding: 10px 14px;
  }

  .stat-cell:nth-child(2n) {
    border-right: none;
  }

  .stat-cell:nth-child(-n+2) {
    border-bottom: 1px solid var(--border-hairline);
  }

  .stats-facets {
    overflow-x: auto;
    padding: 8px 12px;
    gap: 8px;
    scrollbar-width: none;
  }

  .stats-facets::-webkit-scrollbar {
    display: none;
  }

  .workspace {
    display: block;
    height: auto;
    min-height: calc(100vh - var(--topbar-h));
    overflow: visible;
  }

  .inbox-rail {
    border-right: none;
    height: auto;
  }

  .inbox-list {
    overflow-y: visible;
  }

  /* Clean Mobile List -> Detail Navigation */
  .detail-workspace {
    display: none;
    height: auto;
    overflow: visible;
  }

  body.mobile-detail-open .stats-strip,
  body.mobile-detail-open .inbox-rail {
    display: none !important;
  }

  body.mobile-detail-open .detail-workspace {
    display: block;
  }

  .mobile-back-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    min-height: 52px;
    background: var(--bg-rail);
    border-bottom: 1px solid var(--border-hairline);
    position: sticky;
    top: var(--topbar-h);
    z-index: 35;
  }

  .mobile-back-btn {
    min-height: 40px;
    padding: 0 12px;
    font-weight: 600;
  }

  .detail-main-col {
    padding: 16px 14px 12px;
    gap: 14px;
  }

  .detail-side-col {
    padding: 6px 14px 36px;
    gap: 14px;
  }

  .detail-title {
    font-size: 18px;
  }

  /* Comfortable 44px+ touch targets on mobile */
  .cat-tab {
    min-height: 38px;
    padding: 0 13px;
    font-size: 13px;
  }

  .subfilter-select,
  .search-box input {
    min-height: 42px;
    font-size: 14px;
  }

  .rec-card {
    padding: 14px 14px 14px 16px;
  }

  .insights-grid {
    grid-template-columns: 1fr;
  }

  .player-tools-row {
    gap: 10px;
  }

  .speed-pill,
  .stream-pill {
    min-height: 36px;
    padding: 0 10px;
  }

  .enhance-label {
    width: 100%;
    margin-bottom: -2px;
  }

  .enhance-btn {
    min-height: 42px;
    flex: 1 1 100%;
  }

  .tab-switcher {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tab-btn {
    min-height: 38px;
    padding: 0 8px;
    font-size: 12.5px;
  }

  .transcript-tools {
    width: 100%;
    justify-content: space-between;
  }

  .transcript-filter-input {
    flex: 1;
    min-height: 38px;
  }

  .dispatch-submit-btn,
  .seg-btn {
    min-height: 44px;
  }
}
