/* ═══════════════════════════════════════════════════════════════
   irisvy Design System v1.0
   Basiert auf: UI/UX Market Research 2026 (Linear · Notion · Lovable)
   ═══════════════════════════════════════════════════════════════ */

/* ── FONT FACES ─────────────────────────────────────────── */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../assets/fonts/IBMPlexSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../assets/fonts/IBMPlexSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../assets/fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../assets/fonts/IBMPlexSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/IBMPlexMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── COLOR TOKENS ─────────────────────────────────────────── */
:root {
  /* Backgrounds — tiefes Indigo/Marine, nicht Schwarz */
  --bg-primary:    #0f1117;   /* Haupt-Hintergrund */
  --bg-secondary:  #161b27;   /* Cards, Panels */
  --bg-tertiary:   #1e2535;   /* Hover-States, aktive Items */
  --bg-elevated:   #1e2535;   /* AI Output Cards, Morning Brief */
  --sidebar-bg:    #0b0e18;   /* Sidebar: etwas dunkler als Haupt */

  /* Borders */
  --border-subtle: #1e2a3d;   /* Sehr subtile Borders */
  --border-focus:  #4f8ef7;   /* Input focus rings */

  /* Text */
  --text-primary:  #f8faff;   /* Off-White mit Blauton */
  --text-secondary:#bcc5d6;   /* Gedämpftes Blaugrau */
  --text-muted:    #8694a8;   /* Placeholder, Labels */

  /* Accent Colors */
  --accent-blue:   #4f8ef7;   /* Primary actions, links — heller im Dark */
  --accent-green:  #34d399;   /* Success, Copy confirmation */
  --accent-amber:  #fbbf24;   /* Warning, processing, heartbeat */
  --accent-red:    #f87171;   /* Error, destructive */

  /* Signal Source Badges */
  --signal-github: #6E40C9;
  --signal-arxiv:  #B31B1B;
  --signal-hn:     #FF6600;

  /* Glassmorphism */
  --glass-bg:      rgba(22, 27, 39, 0.8);
  --glass-border:  rgba(79, 142, 247, 0.12);
  --glass-blur:    blur(12px);
  --glass-shadow:  0 8px 32px rgba(0, 0, 0, 0.5);

  /* ── TYPOGRAPHY SCALE ─────────────────────────────────────── */
  --font-sans:     'IBM Plex Sans',  -apple-system, sans-serif;
  --font-mono:     'IBM Plex Mono',  'Courier New', monospace;

  --font-size-display:    24px;  /* Section headers, panel titles */
  --font-size-heading:    18px;  /* Card titles, tab labels */
  --font-size-subheading: 15px;  /* Sub-sections, button labels */
  --font-size-body:       14px;  /* Body text, descriptions */
  --font-size-label:      12px;  /* Metadata, timestamps, badges */
  --font-size-mono:       14px;  /* AI-generated output */

  --font-weight-bold:     700;
  --font-weight-semibold: 600;
  --font-weight-medium:   500;
  --font-weight-regular:  400;

  --line-height-heading:  1.2;   /* Compact authority */
  --line-height-text:     1.6;   /* Breathing room */
  --line-height-mono:     1.7;   /* AI output — extra space */

  /* ── SPACING (8px Grid) ──────────────────────────────────── */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-6:  24px;
  --space-8:  32px;
  --space-12: 48px;

  /* ── BORDER RADIUS ───────────────────────────────────────── */
  --radius-sm:  6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* ── TRANSITIONS ─────────────────────────────────────────── */
  --transition-fast: 150ms ease;
  --transition-med:  250ms ease;
  --transition-slow: 400ms ease;

  /* ── SHADOWS ─────────────────────────────────────────────── */
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 4px 24px rgba(0,0,0,0.6);
  --shadow-card:0 2px 8px rgba(0,0,0,0.4), 0 0 1px rgba(79,142,247,0.08);
}

/* ── THEME TOGGLE ────────────────────────────────────────── */
.theme-toggle-btn {
  padding: var(--space-1) var(--space-3);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.theme-toggle-btn:hover { color: var(--text-primary); }
.theme-toggle-btn.active {
  background: var(--accent-blue);
  color: white;
}

/* ── DARK THEME (explicit, matches :root defaults) ───────── */
[data-theme="dark"] {
  --bg-primary:    #0f1117;
  --bg-secondary:  #161b27;
  --bg-tertiary:   #1e2535;
  --bg-elevated:   #1e2535;
  --sidebar-bg:    #0b0e18;

  --border-subtle: #1e2a3d;
  --border-focus:  #4f8ef7;

  --text-primary:  #f8faff;
  --text-secondary:#bcc5d6;
  --text-muted:    #8694a8;

  --accent-blue:   #4f8ef7;
  --accent-green:  #34d399;
  --accent-amber:  #fbbf24;
  --accent-red:    #f87171;

  --glass-bg:      rgba(22, 27, 39, 0.8);
  --glass-border:  rgba(79, 142, 247, 0.12);
  --glass-shadow:  0 8px 32px rgba(0, 0, 0, 0.5);

  --shadow-sm:  0 1px 4px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 4px 24px rgba(0,0,0,0.6);
  --shadow-card:0 2px 8px rgba(0,0,0,0.4), 0 0 1px rgba(79,142,247,0.08);
}

/* ── LIGHT THEME ─────────────────────────────────────────── */
[data-theme="light"] {
  --bg-primary:    #FAFAFA;
  --bg-secondary:  #FFFFFF;
  --bg-tertiary:   #F0F0F5;
  --bg-elevated:   #FFFFFF;
  --sidebar-bg:    #F5F5FA;

  --border-subtle: #E0E0EA;
  --border-focus:  #4A90E2;

  --text-primary:  #1A1A2E;
  --text-secondary:#6B6B80;
  --text-muted:    #9A9AB0;

  --accent-blue:   #3B7DD8;
  --accent-green:  #16A34A;
  --accent-amber:  #D97706;
  --accent-red:    #DC2626;

  --signal-github: #6E40C9;
  --signal-arxiv:  #B31B1B;
  --signal-hn:     #FF6600;

  --glass-bg:      rgba(255, 255, 255, 0.8);
  --glass-border:  rgba(74, 144, 226, 0.12);
  --glass-blur:    blur(12px);
  --glass-shadow:  0 8px 32px rgba(0, 0, 0, 0.08);

  --shadow-sm:  0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 4px 24px rgba(0,0,0,0.12);
  --shadow-card:0 2px 8px rgba(0,0,0,0.06), 0 0 1px rgba(0,0,0,0.08);
}

/* prefers-color-scheme media query removed — theme is now controlled
   exclusively via [data-theme="dark"|"light"] attribute + JS toggle */

/* ── BASE RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  line-height: var(--line-height-text);
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
}

/* ── AI OUTPUT CARD (Finding 8 + Finding 5) ─────────────── */
/*
 * CALM DESIGN REGEL — 3-Tier Visual Hierarchy (Finding 7):
 * PRIMARY   → Generierter Text (größte Schrift, höchster Kontrast, volle Breite)
 * SECONDARY → Action Buttons: Copy, Generieren, Verfeinern (klar sichtbar)
 * TERTIARY  → Metadata: Quelle, Score, Timestamp (kleiner, --text-muted)
 * REGEL: Nichts darf mit dem Text konkurrieren, den der User gleich kopiert.
 *
 * COPY BUTTON REGEL (Finding 8 — "most visually prominent element"):
 * Der Copy-Button ist das wichtigste Element in der Karte.
 * → NICHT versteckt, NICHT klein, NICHT secondary-styled
 * → Immer: position absolute, top-right ODER volle Breite unten
 * → Niemals als Ghost-Button oder Text-Link in der Output-Karte
 */
.ai-output-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-mono);     /* IBM Plex Mono — "ready to copy" signal */
  font-size: var(--font-size-mono);
  line-height: var(--line-height-mono);
  color: var(--text-primary);
  position: relative;
  transition: box-shadow var(--transition-fast);
}
.ai-output-card:hover {
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-focus);
}
/* Copy Button: immer prominent positioniert, nie versteckt */
.ai-output-card .copy-btn {
  width: 100%;           /* volle Breite — unmissable */
  margin-top: var(--space-4);
  font-size: var(--font-size-subheading);
  padding: var(--space-3) var(--space-6);
  justify-content: center;
}

/* ── GLASSMORPHISM PANELS (Trend 7 — UI/UX Research) ─────── */
/*
 * GLASSMORPHISM REGEL (Report: "responsible glassmorphism"):
 * ✅ Anwenden auf: AI output panels, Signal Feed cards, Morning Brief overlay
 * ❌ NIEMALS auf: buttons, input fields, text content — diese brauchen FULL CONTRAST
 * Faustregel: Dekorative Container = glass OK. Interaktive Elemente = solid.
 */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

/* Morning Brief Banner — frosted glass */
.morning-brief-banner {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-4) var(--space-6);
}

/* ── COPY BUTTON — 6 STATES (UI/UX Research Finding 8) ───── */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--font-size-subheading);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  user-select: none;
}
.copy-btn:hover {
  background: #5a9ff2;          /* slightly lighter */
  transform: translateY(-1px);   /* subtle lift */
  box-shadow: var(--shadow-sm);
}
.copy-btn:active {
  background: #3a80d2;          /* slightly darker */
  transform: translateY(1px);    /* press down */
  box-shadow: none;
}
.copy-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
/* State: Loading */
.copy-btn.loading {
  background: var(--accent-amber);
  cursor: wait;
}
/* State: Success */
.copy-btn.success {
  background: var(--accent-green);
  transform: none;
}
/* State: Error */
.copy-btn.error {
  background: var(--accent-red);
  animation: shake 0.4s ease;
}

/* ── MICRO-INTERACTIONS ──────────────────────────────────── */

/* Error shake (Finding 4 — Micro-interactions) */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-4px); }
  40%       { transform: translateX(4px); }
  60%       { transform: translateX(-3px); }
  80%       { transform: translateX(3px); }
}

/* Card lift on hover (Finding 4) */
.signal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  transition:
    background var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  cursor: pointer;
}
.signal-card:hover {
  background: var(--bg-tertiary);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);   /* Subtle lift */
}

/* Post Variant Card lift */
.variant-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
}
.variant-card:hover {
  box-shadow: 0 4px 12px rgba(74,144,226,0.15);
  border-color: var(--border-focus);
}
.variant-card.selected {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
}

/* Tab switch fade (Finding 4) */
.panel {
  animation: fadeIn var(--transition-med) ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Success checkmark animation */
@keyframes checkIn {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1);   opacity: 1; }
}
.success-check {
  animation: checkIn 0.3s ease;
}

/* ── SKELETON SHIMMER (Finding 3 — AI Loading States) ────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.skeleton {
  background: linear-gradient(
    90deg,
    #2a2a3a 25%,
    #3a3a4a 50%,
    #2a2a3a 75%
  );
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  height: 16px;
  margin: var(--space-2) 0;
}
.skeleton.short  { width: 45%; }
.skeleton.medium { width: 72%; }
.skeleton.full   { width: 100%; }
.skeleton.tall   { height: 24px; }
/* Streaming text cursor */
.streaming-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--accent-blue);
  margin-left: 1px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── SIDEBAR NAVIGATION (Finding 7 — Calm Design) ───────── */
.sidebar {
  width: 60px;
  background: var(--sidebar-bg, var(--bg-secondary));
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4) 0;
  transition: width var(--transition-med);
  overflow: hidden;
  flex-shrink: 0;
  /* Linear-Prinzip: Sidebar recedes, content leads */
  opacity: 0.85;
}
.sidebar:hover {
  width: 200px;
  opacity: 1;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 0;
  white-space: nowrap;
  transition: color var(--transition-fast), background var(--transition-fast);
  font-size: var(--font-size-body);
}
.nav-item:hover  { background: var(--bg-tertiary); color: var(--text-primary); }
.nav-item.active { color: var(--accent-blue); background: rgba(74,144,226,0.08); }
.nav-label {
  opacity: 0;
  transition: opacity var(--transition-med);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
}
.sidebar:hover .nav-label { opacity: 1; }

/* ── TOPIC BADGES (Signal Feed) ─────────────────────────── */
.topic-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px var(--space-2);
  border-radius: 99px;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.topic-badge--research   { background: #b31b1b; }
.topic-badge--ai         { background: #7c3aed; }
.topic-badge--tech       { background: #f97316; }
.topic-badge--news       { background: #3b82f6; }
.topic-badge--opensource  { background: #24292e; }
.topic-badge--blog       { background: #0ea5e9; }
.topic-badge--community  { background: #ef4444; }
.topic-badge--finance    { background: #059669; }
.topic-badge--media      { background: #d946ef; }
.topic-badge--products   { background: #f59e0b; }
.topic-badge--devtools   { background: #6366f1; }
.topic-badge--default    { background: var(--bg-tertiary); color: var(--text-secondary); }

/* Score bar */
.score-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-tertiary);
  overflow: hidden;
  margin: var(--space-2) 0;
}
.score-fill {
  height: 100%;
  border-radius: 2px;
  transition: width var(--transition-slow);
}
.score-fill.high   { background: var(--accent-green); }
.score-fill.medium { background: var(--accent-amber); }
.score-fill.low    { background: var(--text-muted); }

/* ── TOKEN BUDGET WIDGET ─────────────────────────────────── */
.token-widget {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}
.token-plan-name {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
}
.token-bar {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  margin: var(--space-2) 0;
  overflow: hidden;
}
.token-fill {
  height: 100%;
  border-radius: 2px;
  transition: width var(--transition-slow), background var(--transition-slow);
}
.token-fill.healthy  { background: var(--accent-green); }
.token-fill.warning  { background: var(--accent-amber); }
.token-fill.critical {
  background: var(--accent-red);
  animation: pulse-red 2s ease infinite;
}
@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}
.upgrade-btn {
  display: none; /* shown by JS when sidebar expanded */
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: rgba(74,144,226,0.1);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-sm);
  color: var(--accent-blue);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  text-align: center;
  transition: background var(--transition-fast);
}
.upgrade-btn:hover { background: rgba(74,144,226,0.2); }
.sidebar:hover .upgrade-btn { display: block; }

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
h1 { font-size: var(--font-size-display);    font-weight: var(--font-weight-bold);    line-height: var(--line-height-heading); }
h2 { font-size: var(--font-size-heading);    font-weight: var(--font-weight-semibold); line-height: var(--line-height-heading); }
h3 { font-size: var(--font-size-subheading); font-weight: var(--font-weight-medium);  line-height: var(--line-height-heading); }
p  { font-size: var(--font-size-body);       line-height: var(--line-height-text);    color: var(--text-primary); }
.label     { font-size: var(--font-size-label); color: var(--text-secondary); font-weight: var(--font-weight-medium); }
.meta      { font-size: var(--font-size-label); color: var(--text-muted); }
.mono-text { font-family: var(--font-mono); font-size: var(--font-size-mono); line-height: var(--line-height-mono); }

/* ── SPLIT-SCREEN RESPONSIVE ─────────────────────────────── */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.main-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}
/* ── PANE LAYOUT 38/62 ──────────────────────────────────────── */
.signal-pane {
  flex: 0 0 38%;
  max-width: 38%;
  min-width: 280px;
  overflow-y: auto;
  border-right: 1px solid var(--border-subtle);
  padding: var(--space-4);
}
.generate-pane {
  flex: 0 0 62%;
  max-width: 62%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pane-divider {
  width: 1px;
  background: var(--border-subtle);
  cursor: col-resize;
  position: relative;
  flex-shrink: 0;
}
.pane-divider .collapse-btn {
  position: absolute;
  top: 50%;
  left: -12px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  z-index: 10;
}
.signal-pane.collapsed { flex: 0 0 0; max-width: 0; overflow: hidden; transition: flex 200ms ease, max-width 200ms ease; }
.signal-pane.collapsed + .pane-divider { width: 0; }
.signal-pane.collapsed ~ .generate-pane { flex: 1; max-width: 100%; }

@media (max-width: 900px) {
  .sidebar { opacity: 1; }
  .sidebar:hover { width: 60px; }  /* no expand on mobile */
  .sidebar .nav-label { display: none; }
  .signal-pane, .generate-pane { flex: unset; max-width: unset; width: 100%; }
  .signal-pane { border-right: none; }
  .pane-divider { display: none; }
  .main-content   { flex-direction: column; }
  .signal-pane, .generate-pane { min-height: 0; }
  .tab-switcher { display: flex; }
}

@media (max-width: 600px) {
  .sidebar { display: none; }
  .mobile-nav-bar { display: flex; }
  .copy-btn { width: 100%; justify-content: center; }
  .panel { padding: var(--space-3); }
  .ai-output-card { padding: var(--space-4); }
  .empty-state { padding: var(--space-8) var(--space-4); }
  .main-content { flex-direction: column; }
  .signal-pane { width: 100%; min-height: auto; max-height: 50vh; overflow-y: auto; border-right: none; }
  .generate-pane { width: 100%; min-height: 50vh; }
  .chat-input-area { padding: var(--space-2); }
  .chat-input-wrapper textarea { font-size: 16px; /* prevents iOS zoom */ }
  /* Optimizer 1-column on mobile */
  #optimizer-panel > div { grid-template-columns: 1fr !important; }
  body { padding-bottom: 60px; }
}

/* ── MOBILE NAV BAR ──────────────────────────────────────── */
.mobile-nav-bar {
  display: none; /* shown via @media */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-1) 0;
  z-index: 100;
  justify-content: space-around;
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-2) var(--space-1);
  background: none;
  border: none;
}
.mobile-nav-item.active { color: var(--accent-blue); }
.mobile-nav-item span:first-child { font-size: 20px; }

/* ── EMPTY STATES (Finding 2) ────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-12) var(--space-6);
  text-align: center;
  color: var(--text-secondary);
}
.empty-state-icon { font-size: 48px; opacity: 0.5; }
.empty-state-title {
  font-size: var(--font-size-heading);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}
.empty-state-body { font-size: var(--font-size-body); max-width: 280px; line-height: 1.5; }
.empty-state-cta {
  padding: var(--space-3) var(--space-6);
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.empty-state-cta:hover { background: #5a9ff2; transform: translateY(-1px); }

/* ── SIGNAL PHASE BADGE ──────────────────────────────────── */
.phase-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ── CONFLUENCE BADGE ──────────────────────────────────── */
.confluence-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 99px;
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.confluence-badge--early      { color: var(--text-muted); background: var(--bg-tertiary); }
.confluence-badge--emerging   { color: #2dd4bf; border-color: rgba(45,212,191,0.3); }
.confluence-badge--confirmed  { color: #2dd4bf; background: rgba(45,212,191,0.15); border-color: rgba(45,212,191,0.3); }

/* ── TOGGLE SWITCH ──────────────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: background 200ms;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  left: 2px; bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 200ms, background 200ms;
}
.toggle-switch input:checked + .toggle-slider { background: rgba(59,130,246,0.2); border-color: var(--accent-blue); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); background: var(--accent-blue); }

.card-angle {
  font-style: italic;
  opacity: 0.85;
}

/* ── INPUT FIELDS ────────────────────────────────────────── */
input, textarea, select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  padding: var(--space-2) var(--space-3);
  transition: border-color var(--transition-fast);
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(74,144,226,0.15);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
.input-error {
  border-color: var(--accent-red) !important;
  animation: shake 0.4s ease;
}

/* ── CHIP / TAG ──────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 99px;
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  user-select: none;
}
.chip:hover  { background: var(--bg-elevated); color: var(--text-primary); }
.chip.active { background: rgba(74,144,226,0.15); border-color: var(--accent-blue); color: var(--accent-blue); }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── COMMAND PALETTE (Cmd+K) ─────────────────────────────── */
.command-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
}
.command-palette-modal {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 480px;
  z-index: 1000;
  padding: var(--space-3);
  animation: fadeIn var(--transition-fast) ease;
}
.command-palette-modal input {
  margin-bottom: var(--space-2);
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.cmd-item:hover {
  background: var(--bg-tertiary);
}
.cmd-icon { font-size: 16px; }
.cmd-label { font-size: var(--font-size-body); color: var(--text-primary); }
.cmd-empty {
  padding: var(--space-4);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-body);
}

/* ── CHAT INTERFACE (Sprint 2 — Claude.ai-style) ────────── */

/* Chat Header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.chat-header-title {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
}
.chat-new-btn {
  font-size: var(--font-size-label);
  padding: 4px 10px;
}

/* Chat Container */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Chat Bubbles */
.chat-bubble {
  max-width: 85%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-body);
  line-height: var(--line-height-text);
  animation: fadeIn var(--transition-fast) ease;
}

.user-bubble {
  align-self: flex-end;
  background: var(--accent-blue);
  color: white;
  border-bottom-right-radius: var(--radius-sm);
}

.assistant-bubble {
  align-self: flex-start;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: var(--radius-sm);
  max-width: 95%;
}

.post-bubble {
  width: 95%;
}

.post-bubble .post-text {
  font-family: var(--font-mono);
  font-size: var(--font-size-mono);
  line-height: var(--line-height-mono);
  padding: var(--space-4);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  margin: var(--space-2) 0;
  cursor: text;
  min-height: 80px;
  white-space: pre-wrap;
}

.post-bubble .post-text:focus {
  outline: 1px solid var(--border-focus);
  outline-offset: -1px;
}

.bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-1);
}

.bubble-label {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
}

.char-count {
  font-size: var(--font-size-label);
  color: var(--text-muted);
}

.bubble-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
  flex-wrap: wrap;
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: var(--font-size-label);
  font-family: var(--font-sans);
  cursor: pointer;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-tertiary); }

/* Chat Input Area */
.chat-input-area {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-primary);
  flex-shrink: 0;
}

/* Voice Dropdown */
.voice-selector {
  position: relative;
  margin-bottom: var(--space-2);
}

.voice-dropdown-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 99px;
  color: var(--text-secondary);
  font-size: var(--font-size-label);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.voice-dropdown-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.voice-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
}

.voice-option {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--font-size-body);
  transition: background var(--transition-fast);
}

.voice-option:hover { background: var(--bg-tertiary); }
.voice-option.active { background: rgba(74,144,226,0.1); color: var(--accent-blue); }

.voice-meta {
  font-size: var(--font-size-label);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Varianten-Selector */
.variant-selector {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.variant-label {
  font-size: var(--font-size-label);
  color: var(--text-muted);
}

.variant-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: var(--font-size-label);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.variant-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

/* ── Variant Toggle (Two-variant A/B switch) ─────────────── */
.variant-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.variant-tab {
  padding: var(--space-1) var(--space-3);
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.variant-tab.active {
  background: var(--accent-blue);
  color: white;
}
.variant-tab:hover:not(.active) {
  background: rgba(79, 142, 247, 0.12);
}

/* Angle Chips row */
.angle-chips {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}

/* Chat Input (Claude.ai style) */
.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  transition: border-color var(--transition-fast);
}

.chat-input-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(74,144,226,0.1);
}

#chat-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  line-height: var(--line-height-text);
  resize: none;
  max-height: 200px;
  padding: 0;
  box-shadow: none;
  width: auto;
}

#chat-input:focus { outline: none; box-shadow: none; }

.send-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-btn:hover { background: #5a9ff2; transform: translateY(-1px); }
.send-btn:disabled { background: var(--bg-tertiary); color: var(--text-muted); cursor: not-allowed; transform: none; }

/* Copy + LinkedIn variant button */
.copy-linkedin {
  background: var(--bg-elevated);
  border: 1px solid var(--border-focus);
  color: var(--accent-blue);
}
.copy-linkedin:hover { background: rgba(74,144,226,0.15); }

/* ── SIGNAL FEED (Sprint 3) ──────────────────────────────── */

.signal-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.signal-feed-header h2 { margin: 0; }

.refresh-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--font-size-label);
  padding: var(--space-1) var(--space-2);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}
.refresh-btn:hover { border-color: var(--accent-blue); color: var(--text-primary); }

.cache-info {
  font-size: var(--font-size-label);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.filter-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 99px;
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}
.filter-chip:hover { background: var(--bg-elevated); color: var(--text-primary); }
.filter-chip.active { background: rgba(74,144,226,0.15); border-color: var(--accent-blue); color: var(--accent-blue); }

/* Signal Card details */
.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.card-title {
  font-size: var(--font-size-heading);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-summary {
  font-size: var(--font-size-body);
  color: var(--text-secondary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin-bottom: var(--space-3);
}

/* Citation Badge (arXiv + Semantic Scholar) */
.citation-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px var(--space-2);
  background: rgba(179, 27, 27, 0.15);
  border: 1px solid rgba(179, 27, 27, 0.3);
  border-radius: 99px;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: var(--signal-arxiv);
}

/* ── SIGNAL CARD v6 ─────────────────────────────────────────── */
.signal-card .card-title {
  display: block;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-body);
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: var(--space-1);
}
.signal-card .card-title:hover { text-decoration: underline; }
.signal-card .insight {
  font-weight: 600;
  font-size: var(--font-size-body);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  line-height: 1.4;
}
.signal-card .context {
  font-style: italic;
  font-size: var(--font-size-label);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.signal-card .card-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  /* ALWAYS VISIBLE — not hover-only */
}
.action-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  font-size: var(--font-size-label);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.action-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.action-btn.save-active { color: var(--accent-amber); border-color: var(--accent-amber); }
.action-btn.draft-btn {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
  font-weight: var(--font-weight-medium);
  padding: var(--space-1) var(--space-3);
}
.action-btn.draft-btn:hover { background: #5a9ff2; }
.action-btn.dismiss-btn:hover { color: var(--accent-red); border-color: var(--accent-red); }

.advanced-toggle { margin-left: auto; }
.advanced-toggle summary { cursor: pointer; user-select: none; }
.advanced-json { background: var(--bg-tertiary); border-radius: var(--radius-sm); padding: var(--space-2); }

.empty-hint {
  padding: var(--space-8);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-body);
}

.skeleton-card { pointer-events: none; }
.feed-status { text-align: center; padding: var(--space-3); color: var(--text-muted); font-size: var(--font-size-label); }

/* ── TAB SWITCHER (mobile < 900px) ─────────────────────────── */
.tab-switcher {
  display: none; /* shown at < 900px */
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.tab-switcher button {
  flex: 1;
  padding: var(--space-3);
  background: none;
  border: none;
  font-size: var(--font-size-body);
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab-switcher button.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

/* ── SIGNAL CARD v2 (Prompt 3.1) ────────────────────────────── */
.signal-card__header { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.signal-card__title { margin: 0 0 var(--space-2); font-size: var(--font-size-body); }
.signal-card__title a { color: var(--text-primary); text-decoration: none; font-weight: var(--font-weight-semibold); }
.signal-card__title a:hover { text-decoration: underline; }
.signal-card__insight { font-weight: 600; margin: 0 0 var(--space-1); line-height: 1.4; font-size: var(--font-size-body); }
.signal-card__context { font-style: italic; color: var(--text-secondary); font-size: 0.9rem; margin: 0 0 var(--space-2); }
.signal-card__postability { margin-bottom: var(--space-2); }
.postability-label { font-size: 0.75rem; color: var(--text-muted); }
.postability-bar { height: 4px; background: var(--border-subtle); border-radius: 2px; margin-top: 4px; }
.postability-fill { height: 100%; background: var(--accent-blue); border-radius: 2px; transition: width 300ms ease; }
.signal-card__actions { display: flex; align-items: center; gap: var(--space-2); }
.slot-tag { font-size: 0.7rem; padding: 1px 6px; border-radius: 99px; background: var(--bg-tertiary); color: var(--accent-amber); }

/* (source-badge styles removed — replaced by topic-badge above) */

/* Action Buttons v2 */
.action-btn--save.is-saved { background: var(--bg-tertiary); color: var(--accent-amber); border-color: var(--accent-amber); }
.action-btn--draft { font-weight: 600; }
.action-btn.is-active { background: var(--bg-tertiary); color: var(--accent-blue); }

/* Draft Overlay */
.draft-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; }
.draft-modal { background: var(--bg-secondary); border-radius: var(--radius-md); padding: var(--space-6); max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; }
.draft-modal textarea { width: 100%; font-family: var(--font-sans); font-size: var(--font-size-body); background: var(--bg-primary); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: var(--space-3); color: var(--text-primary); resize: vertical; }

/* Empty Hint */
.empty-hint { padding: var(--space-8); text-align: center; color: var(--text-muted); font-size: var(--font-size-body); }

/* ── INBOX ─────────────────────────────────────────── */
.inbox-filter-chip {
  background: var(--bg-tertiary); border: 1px solid var(--border-subtle);
  color: var(--text-muted); border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-3); font-size: 11px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all var(--transition-fast);
}
.inbox-filter-chip.active {
  background: var(--bg-elevated); border-color: var(--accent-blue); color: var(--accent-blue);
}
.thread-card {
  background: var(--bg-secondary); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: var(--space-4); margin-bottom: var(--space-3);
  transition: border-color var(--transition-fast);
}
.thread-card:hover { border-color: var(--accent-blue); }
.thread-header { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-2); }
.thread-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; color: var(--text-secondary); flex-shrink: 0;
}
.thread-meta { flex: 1; min-width: 0; }
.thread-name-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.thread-name { font-weight: var(--font-weight-semibold); font-size: var(--font-size-body); color: var(--text-primary); }
.thread-cat-badge { font-size: 10px; font-weight: 700; }
.thread-date { font-size: 10px; color: var(--text-muted); margin-left: auto; }
.thread-role { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.thread-preview { margin-bottom: var(--space-3); }
.thread-preview-text { font-size: var(--font-size-label); color: var(--text-secondary); line-height: 1.5; margin-bottom: var(--space-1); }
.thread-expand-btn {
  background: none; border: none; color: var(--text-muted); font-size: 10px;
  cursor: pointer; padding: 0;
}
.thread-expand-btn:hover { color: var(--text-secondary); }
.thread-last3 {
  background: var(--bg-tertiary); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: var(--space-3); margin-bottom: var(--space-3);
}
.thread-msg { margin-bottom: var(--space-2); padding: var(--space-2); border-radius: var(--radius-sm); font-size: 11px; line-height: 1.5; }
.thread-msg--them { background: var(--bg-secondary); }
.thread-msg--me { background: rgba(79,142,247,0.08); }
.thread-msg-from { font-weight: 600; font-size: 10px; color: var(--text-muted); }
.thread-msg-date { font-size: 9px; color: var(--text-muted); margin-left: var(--space-2); }
.thread-msg-text { margin-top: 3px; color: var(--text-primary); }
.thread-actions-row1 { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-2); }
.thread-actions-row2 { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.thread-route-label { font-size: 10px; color: var(--text-muted); }
.btn-draft-reply {
  background: var(--accent-blue); color: white; border: none; border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-3); font-size: 11px; font-weight: 700; cursor: pointer;
}
.btn-mark-replied, .btn-decline {
  background: var(--bg-tertiary); border: 1px solid var(--border-subtle); color: var(--text-secondary);
  border-radius: var(--radius-sm); padding: var(--space-1) var(--space-3); font-size: 11px;
  font-weight: 600; cursor: pointer;
}
.btn-mark-replied:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
.btn-decline:hover { border-color: var(--accent-red); color: var(--accent-red); }
.btn--done { opacity: 0.5; cursor: default; }
.route-chip {
  background: transparent; border: 1px solid var(--border-subtle); color: var(--text-muted);
  border-radius: 100px; padding: 3px var(--space-3); font-size: 10px;
  cursor: pointer; transition: all var(--transition-fast);
}
.route-chip:hover:not(:disabled) { border-color: var(--accent-blue); color: var(--accent-blue); background: rgba(79,142,247,0.06); }
.route-chip--done { border-color: var(--accent-green); color: var(--accent-green); background: rgba(52,211,153,0.06); opacity: 0.7; }
.draft-panel {
  margin-top: var(--space-3); background: var(--bg-tertiary); border: 1px solid var(--accent-blue);
  border-radius: var(--radius-sm); padding: var(--space-3);
}
.draft-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-2); }
.draft-label { font-size: 9px; letter-spacing: 1.5px; color: var(--accent-blue); text-transform: uppercase; }
.draft-charcount { font-size: 10px; color: var(--text-muted); }
.draft-textarea {
  width: 100%; min-height: 80px; background: var(--bg-secondary); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: var(--space-3); color: var(--text-primary);
  font-size: var(--font-size-label); line-height: 1.6; resize: vertical; font-family: var(--font-sans);
}
.draft-textarea:focus { border-color: var(--accent-blue); outline: none; }
.draft-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.btn-copy {
  background: var(--accent-blue); color: white; border: none; border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-4); font-size: 11px; font-weight: 700; cursor: pointer;
}
.btn-regen, .btn-learn {
  background: var(--bg-secondary); border: 1px solid var(--border-subtle); color: var(--text-secondary);
  border-radius: var(--radius-sm); padding: var(--space-1) var(--space-3); font-size: 11px; cursor: pointer;
}
.btn-regen:hover, .btn-learn:hover { border-color: var(--accent-blue); color: var(--text-primary); }

/* ── POST GENERATOR: Plus Menu + Visual Bar ────────────── */
.plus-btn-container { position: relative; }
.plus-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-tertiary); border: 1px solid var(--border-subtle);
  color: var(--text-secondary); font-size: 18px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast); flex-shrink: 0;
}
.plus-btn:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--accent-blue); }
.plus-menu {
  position: absolute; bottom: 40px; left: 0;
  background: var(--bg-secondary); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: var(--space-1);
  display: flex; flex-direction: column; gap: 2px;
  min-width: 160px; z-index: 100;
  box-shadow: var(--shadow-md);
}
.plus-menu-item {
  background: none; border: none; color: var(--text-secondary);
  font-size: var(--font-size-label); padding: var(--space-2) var(--space-3);
  text-align: left; cursor: pointer; border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.plus-menu-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }

/* Visual action bar */
.chat-visual-bar {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) 0; margin-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
}
.visual-bar-label { font-size: 11px; color: var(--text-muted); }
.visual-bar-btn {
  background: none; border: 1px solid transparent; color: var(--text-muted);
  font-size: 11px; padding: 2px var(--space-2); border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition-fast);
}
.visual-bar-btn:hover { border-color: var(--border-subtle); color: var(--text-secondary); }
.visual-bar-btn.highlighted {
  border-color: var(--accent-blue); color: var(--accent-blue);
  background: rgba(79,142,247,0.06);
}

/* Chart + Carousel + Image artifacts */
.chart-artifact { padding: var(--space-3); background: var(--bg-secondary); border-radius: var(--radius-sm); overflow: hidden; }
.chart-artifact svg { max-width: 100%; height: auto; }
.image-artifact { border-radius: var(--radius-sm); overflow: hidden; }
.image-artifact img { display: block; }
.carousel-preview {
  display: flex; gap: var(--space-2); overflow-x: auto;
  padding: var(--space-2) 0; scroll-snap-type: x mandatory;
}
.carousel-slide {
  min-width: 200px; max-width: 200px; scroll-snap-align: start;
  background: var(--bg-tertiary); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: var(--space-3);
  flex-shrink: 0;
}
.carousel-slide-num { font-size: 10px; color: var(--text-muted); margin-bottom: var(--space-1); }
.carousel-slide-emoji { font-size: 24px; margin-bottom: var(--space-2); }
.carousel-slide-title { font-weight: var(--font-weight-semibold); font-size: var(--font-size-body); margin-bottom: var(--space-1); }
.carousel-slide-body { font-size: var(--font-size-label); color: var(--text-secondary); line-height: 1.4; }

/* Chat welcome state */
.chat-welcome {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 120px; max-height: 200px; text-align: center; color: var(--text-muted); padding: var(--space-4);
}

/* ── VISUAL GENERATION ─────────────────────────────────────── */

.visual-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 12px 0;
}

.visual-thumbnail {
  cursor: pointer;
  border: 2px solid var(--border-subtle, rgba(255,255,255,0.1));
  border-radius: 8px;
  padding: 8px;
  transition: border-color 0.2s;
}

.visual-thumbnail:hover {
  border-color: var(--accent-primary, #7060d8);
}

.visual-thumbnail.selected {
  border-color: var(--accent-primary, #7060d8);
  box-shadow: 0 0 0 1px var(--accent-primary, #7060d8);
}

.visual-thumbnail svg {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.visual-thumbnail-label {
  font-size: 11px;
  color: var(--text-secondary, #a8a6a0);
  margin-top: 6px;
  text-align: center;
}

.visual-render {
  max-width: 600px;
  margin: 12px 0;
}

.visual-render img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
}

.visual-warning {
  font-size: 11px;
  color: var(--warning, #e8b060);
  margin-top: 6px;
}

.visual-patch-note {
  font-size: 11px;
  color: var(--text-secondary, #a8a6a0);
  margin-top: 4px;
  font-style: italic;
}

.btn-generate-visual {
  background: var(--accent-primary, #7060d8);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-generate-visual:hover { opacity: 0.85; }
.btn-generate-visual:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-skip-visual {
  background: transparent;
  color: var(--text-secondary, #a8a6a0);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 11px;
  cursor: pointer;
  margin-top: 8px;
}

/* Briefing card */
.briefing-card {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent-blue, #3b82f6);
  border-radius: var(--radius-md, 8px);
  padding: 12px 16px;
  margin-bottom: 12px;
}
.signal-highlight {
  box-shadow: 0 0 0 2px var(--accent-blue, #3b82f6);
  border-radius: var(--radius-md, 8px);
}

/* Coach drag & drop */
.coach-drop-active {
  outline: 2px dashed var(--accent-blue, #3b82f6);
  outline-offset: -4px;
  background: var(--bg-tertiary);
}

/* ══════════════════════════════════════════════════════════════
   PEOPLE TAB — 3-panel layout (Prompt 16.3)
   ════════════════════════════════════════════════════════════ */

/* Full-width pane — shown/hidden by switchPanel() via inline style */
#people-pane {
  height: 100%;
  overflow: hidden;
  /* flex + flex-direction:row set via inline style when shown */
}

/* ── Left panel: sidebar (220px fixed) ──────────────────────── */
.people-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-subtle);
}

.people-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* ── Center panel: contact cards (flex-grow) ────────────────── */
.people-cards-panel {
  flex: 1;
  min-width: 0; /* prevent flex blowout */
  overflow-y: auto;
  background: var(--bg-primary);
  padding: var(--space-3) var(--space-4);
}

/* ── Right panel: chat (320px fixed) ───────────────────────── */
.people-chat-panel {
  width: 320px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--border-subtle);
}

.people-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  min-height: 44px;
}

.people-chat-header-label {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* FAB only visible on mobile */
.people-chat-fab {
  display: none;
}

/* ── Mobile breakpoint (<768px) — stacked layout ─────────────
   Sidebar → horizontal filter bar at top
   Chat panel → hidden; replaced by FAB + bottom drawer        */
@media (max-width: 768px) {
  #people-pane {
    flex-direction: column !important;
  }

  /* Sidebar becomes a compact horizontal scrollable filter bar */
  .people-sidebar {
    width: 100%;
    height: auto;
    max-height: 180px;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .people-sidebar-header {
    border-bottom: none;
    border-right: 1px solid var(--border-subtle);
    flex-shrink: 0;
    min-width: 80px;
    justify-content: center;
  }

  .people-sidebar > div {
    border-bottom: none;
    border-right: 1px solid var(--border-subtle);
    flex-shrink: 0;
    min-width: 160px;
  }

  /* Hide the 1px dividers between sidebar/cards and cards/chat */
  #people-pane > div[style*="width:1px"] {
    display: none;
  }

  /* Chat panel hidden on mobile — use drawer instead */
  #people-chat-panel-desktop {
    display: none;
  }

  /* Floating chat button: fixed bottom-right, above mobile nav bar */
  .people-chat-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 72px; /* above .mobile-nav-bar (60px) + gap */
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 4px 16px rgba(79, 142, 247, 0.4);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  }

  .people-chat-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(79, 142, 247, 0.5);
  }
}

/* ── Mobile chat bottom drawer ───────────────────────────────
   position:fixed so it overlays regardless of DOM position   */
.people-chat-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* display toggled via JS (display:none / display:flex) */
}

.people-chat-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.people-chat-drawer__panel {
  position: relative;
  z-index: 1;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  height: 60vh;
  max-height: 600px;
  box-shadow: var(--glass-shadow);
  /* slide up animation */
  animation: drawerSlideUp var(--transition-med) ease;
}

@keyframes drawerSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* Drag handle — visual affordance for swipe-to-close */
.people-chat-drawer__handle {
  width: 36px;
  height: 4px;
  background: var(--border-subtle);
  border-radius: 2px;
  margin: var(--space-2) auto var(--space-1);
  flex-shrink: 0;
}

/* ── Contact Cards ──────────────────────────────────────── */
.people-contact-card {
  position: relative;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.people-contact-card:hover {
  background: var(--bg-secondary);
}

.people-contact-card.active {
  background: rgba(59, 130, 246, 0.08);
  border-left: 2px solid var(--accent-blue);
  padding-left: calc(var(--space-4) - 2px);
}

.people-contact-card__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.people-contact-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-semibold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.people-contact-card__name {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.people-contact-card__headline {
  font-size: var(--font-size-label);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.people-contact-card__cat {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  text-transform: capitalize;
  white-space: nowrap;
}

.people-contact-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-2);
  padding-left: calc(36px + var(--space-3)); /* indent past avatar */
}

.people-milestone-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent-green);
  white-space: nowrap;
}

.people-contact-card__expand-btn {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.people-contact-card__expand-btn:hover {
  color: var(--text-primary);
}

.people-contact-card__details {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
  padding-left: calc(36px + var(--space-3));
}

/* ── Skeleton loading ───────────────────────────────────── */
.people-skeleton {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.people-skeleton__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  flex-shrink: 0;
  animation: peopleSkeleton 1.4s ease infinite;
}

.people-skeleton__line {
  height: 12px;
  border-radius: 6px;
  background: var(--bg-tertiary);
  animation: peopleSkeleton 1.4s ease infinite;
}

@keyframes peopleSkeleton {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1;   }
}

/* ── Empty state ────────────────────────────────────────── */
.people-empty-state {
  padding: var(--space-8) var(--space-4);
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--font-size-label);
}

/* ── Confirmation card (post-extraction) ────────────────── */
.people-confirm-card {
  margin: var(--space-3) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  overflow: hidden;
}

.people-confirm-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  gap: var(--space-2);
}

.people-confirm-card__contacts {
  display: flex;
  flex-direction: column;
  max-height: 240px;
  overflow-y: auto;
}

.people-confirm-card__contact {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.people-confirm-card__contact:last-child {
  border-bottom: none;
}

.people-confirm-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

/* ── Draft block ────────────────────────────────────────── */
.people-draft-block {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 0 var(--space-1);
  max-width: 95%;
  align-self: flex-start;
}

.people-draft-text {
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  line-height: var(--line-height-text);
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  white-space: pre-wrap;
}

.people-draft-actions {
  display: flex;
  justify-content: flex-end;
  padding: var(--space-1) var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

/* ── Contact result list (in chat) ──────────────────────── */
.people-result-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 95%;
  align-self: flex-start;
}

.people-result-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background var(--transition-fast);
}

.people-result-item:hover {
  background: var(--bg-secondary);
}

.people-result-item__name {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.people-result-item__headline {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* ── Typing indicator ───────────────────────────────────── */
.people-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-2) var(--space-3);
  align-self: flex-start;
}

.people-typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: peopleTypingDot 1.2s ease infinite;
}

.people-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.people-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes peopleTypingDot {
  0%, 60%, 100% { transform: translateY(0);    opacity: 0.4; }
  30%            { transform: translateY(-4px); opacity: 1;   }
}


/* ============================================================
   === MOBILE ===
   Canonical mobile breakpoint: 768px.
   Rules migrated from legacy @media(max-width:900px),
   @media(max-width:600px), and @media(max-width:768px) blocks
   above. Those legacy blocks remain for reference; these
   declarations take precedence via cascade order.
   ============================================================ */

/* ── Mobile Bottom Nav (hidden by default) ───────────────── */
.mobile-bottom-nav {
  display: none; /* shown via @media below */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(11, 14, 24, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  align-items: center;
  z-index: 100;
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  cursor: pointer;
  background: none;
  border: none;
  transition: color var(--transition-fast);
  color: var(--text-muted);
}
.mobile-nav-item.active { color: var(--accent-blue); }
.mobile-nav-item__icon  { font-size: 20px; line-height: 1; }
.mobile-nav-item__label { font-size: 10px; font-family: var(--font-sans); font-weight: 500; }

.mobile-nav-indicator {
  position: absolute;
  top: 0;
  height: 2px;
  background: var(--accent-blue);
  border-radius: 0 0 2px 2px;
  width: 32px;
  transition: left var(--transition-med);
}

/* ── More Sheet ──────────────────────────────────────────── */
.mobile-more-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-4);
  padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
  z-index: 200;
  transform: translateY(100%);
  transition: transform var(--transition-med);
  display: none;
}
.mobile-more-sheet.open { transform: translateY(0); }

.mobile-more-sheet--backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-med);
  display: none;
}
.mobile-more-sheet--backdrop.open { opacity: 1; pointer-events: auto; }

.mobile-more-sheet__handle {
  width: 32px;
  height: 4px;
  background: var(--border-subtle);
  border-radius: 2px;
  margin: 0 auto var(--space-4);
}
.mobile-more-sheet__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}
.mobile-more-sheet__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: none;
  border: none;
}
.mobile-more-sheet__item:active { background: var(--bg-tertiary); }
.mobile-more-sheet__item-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.mobile-more-sheet__item-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

/* ── Canonical mobile breakpoint ────────────────────────── */
@media (max-width: 768px) {
  html, body { height: 100dvh; }

  .app-layout {
    height: 100dvh;
    overflow: hidden;
  }

  body { padding-bottom: env(safe-area-inset-bottom); }

  /* Hide sidebar, show bottom nav */
  .sidebar { display: none; }
  .mobile-bottom-nav { display: flex; }

  /* Main content fills full width with space for bottom nav */
  .main-content {
    margin-left: 0;
    width: 100%;
    padding-bottom: 64px;
    flex-direction: column;
  }

  /* Migrated from legacy @media(max-width:900px) */
  .sidebar .nav-label { display: none; }
  .signal-pane, .generate-pane { flex: unset; max-width: unset; width: 100%; }
  .signal-pane { border-right: none; }
  .pane-divider { display: none; }
  .signal-pane, .generate-pane { min-height: 0; }
  .tab-switcher { display: flex; }

  /* Migrated from legacy @media(max-width:600px) */
  .copy-btn { width: 100%; justify-content: center; }
  .panel { padding: var(--space-3); }
  .ai-output-card { padding: var(--space-4); }
  .empty-state { padding: var(--space-8) var(--space-4); }
  .signal-pane { min-height: auto; max-height: 50vh; overflow-y: auto; }
  .generate-pane { min-height: 50vh; }
  .chat-input-area { padding: var(--space-2); }
  .chat-input-wrapper textarea { font-size: 16px; /* prevents iOS zoom */ }
  #optimizer-panel > div { grid-template-columns: 1fr !important; }
  .pg-stats-row { grid-template-columns: 1fr !important; }
  .pg-cal-row { gap: var(--space-2); }
  .pg-quick-chips { flex-wrap: wrap; }
}

/* ════════════════════════════════════════════════════════════
   Queue Tab — Left Panel Feed Tabs
   ════════════════════════════════════════════════════════════ */

.feed-tab-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: var(--space-2) var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.feed-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}
.feed-tab:hover { color: var(--text-secondary); }
.feed-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-blue);
}
.feed-tab-badge {
  background: var(--accent-blue);
  color: #fff;
  font-size: 10px;
  font-family: var(--font-mono);
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

/* ── Queue idea cards ── */
.q-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  margin-bottom: var(--space-2);
}
.q-card:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-blue);
}
.q-card:hover .q-card-actions { opacity: 1; }

.q-card-left { flex-shrink: 0; }
.q-status-icon {
  font-size: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.q-status-ready     { background: rgba(52,211,153,0.12); }
.q-status-scheduled { background: rgba(79,142,247,0.12); }
.q-status-idea      { background: rgba(251,191,36,0.12); }

.q-card-body    { flex: 1; overflow: hidden; }
.q-card-title {
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.q-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.q-card-actions {
  display: flex;
  gap: var(--space-1);
  opacity: 0;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}
.q-action-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 12px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  padding: 0;
}
.q-action-btn:hover { color: var(--text-primary); border-color: var(--accent-blue); }
.q-archive-btn:hover { color: var(--accent-red); border-color: var(--accent-red); }

/* ── Inline schedule confirm ── */
.q-schedule-confirm {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: rgba(79,142,247,0.08);
  border-top: 1px solid rgba(79,142,247,0.2);
  font-size: 12px;
}
.q-sched-label { flex: 1; color: var(--text-secondary); }
.q-sched-ok {
  background: var(--accent-green);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  padding: 2px 8px;
  cursor: pointer;
}
.q-sched-cancel {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
}

/* ── Empty state ── */
.q-empty {
  text-align: center;
  padding: var(--space-12) var(--space-4);
}
.q-empty-icon { font-size: 32px; margin-bottom: var(--space-3); }
.q-empty-title {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.q-empty-body {
  font-size: var(--font-size-label);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Skeleton card ── */
.q-skeleton {
  cursor: default;
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════
   Post Generator v2 — Dashboard Home Screen
   ════════════════════════════════════════════════════════════ */

/* ── Wrapper states ── */
#pg-dashboard {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  gap: var(--space-4);
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}
#pg-chat-wrap {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* ── Greeting ── */
.pg-greeting {
  padding: var(--space-2) 0 var(--space-1);
}
.pg-greeting-name {
  font-size: 22px;
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  line-height: var(--line-height-heading);
}
.pg-greeting-date {
  font-size: var(--font-size-label);
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── Stats row ── */
.pg-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.pg-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pg-stat-label {
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.pg-stat-value {
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  line-height: 1.2;
}
.pg-stat-value.pg-stat-success { color: var(--accent-green); }
.pg-stat-sub {
  font-size: var(--font-size-label);
  color: var(--text-secondary);
}
.pg-stat-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-progress-bar {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  margin-top: var(--space-1);
  overflow: hidden;
}
.pg-progress-fill {
  height: 100%;
  background: var(--accent-green);
  border-radius: 2px;
  transition: width var(--transition-med);
}

/* ── Section titles ── */
.pg-section { display: flex; flex-direction: column; gap: var(--space-2); }
.pg-section-title {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.pg-count-badge {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  font-family: var(--font-mono);
  border-radius: 10px;
  padding: 1px 7px;
}

/* ── Calendar ── */
.pg-calendar { display: flex; flex-direction: column; gap: var(--space-2); }
.pg-cal-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.pg-cal-row.pg-cal-today {
  border-left: 2px solid var(--accent-blue);
  padding-left: var(--space-2);
  margin-left: -var(--space-2);
}
.pg-cal-day {
  width: 28px;
  font-size: var(--font-size-label);
  color: var(--text-muted);
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.pg-cal-day.pg-cal-day-today {
  color: var(--accent-blue);
  font-weight: var(--font-weight-semibold);
}
.pg-cal-slot {
  flex: 1;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-label);
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 34px;
}
.pg-cal-empty {
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
}
.pg-cal-empty:hover { background: var(--bg-secondary); }
.pg-cal-empty-label { font-size: var(--font-size-label); }
.pg-cal-filled {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}
.pg-cal-filled:hover { background: var(--bg-tertiary); border-color: var(--accent-blue); }
.pg-cal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pg-cal-slot-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 13px;
}

/* ── Status badges ── */
.pg-status-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: var(--font-weight-medium);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
}
.pg-badge-posted       { background: rgba(52,211,153,0.12); color: var(--accent-green); }
.pg-badge-draft_ready  { background: rgba(79,142,247,0.12); color: var(--accent-blue); }
.pg-badge-idea         { background: rgba(251,191,36,0.12); color: var(--accent-amber); }
.pg-badge-scheduled    { background: rgba(251,191,36,0.12); color: var(--accent-amber); }
.pg-badge-drafting     { background: rgba(79,142,247,0.08); color: var(--text-secondary); }
.pg-badge-archived     { background: var(--bg-tertiary); color: var(--text-muted); }

/* ── Queue ── */
.pg-queue { display: flex; flex-direction: column; gap: var(--space-2); }
.pg-queue-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.pg-queue-card:hover { background: var(--bg-tertiary); border-color: var(--accent-blue); }
.pg-queue-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pg-queue-body { flex: 1; overflow: hidden; }
.pg-queue-title {
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-queue-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.pg-queue-empty {
  font-size: var(--font-size-label);
  color: var(--text-muted);
  padding: var(--space-3) 0;
  text-align: center;
}

/* ── Nudge card ── */
.pg-nudge {
  display: none;
  align-items: center;
  gap: var(--space-3);
  background: rgba(79,142,247,0.08);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
}
.pg-nudge-message {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
}
.pg-nudge-action {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}
.pg-nudge-action:hover { text-decoration: underline; }

/* ── Quick-action chips ── */
#pg-quick-chips {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) 0 0;
}
.pg-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 5px var(--space-3);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}
.pg-chip:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--accent-blue);
}

/* ════════════════════════════════════════════════════════════
   Post Generator v2 — Chat Interface Components
   ════════════════════════════════════════════════════════════ */

/* ── Chat bubbles ── */
.pg-bubble {
  max-width: 88%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-body);
  line-height: var(--line-height-text);
  word-break: break-word;
}
.pg-bubble-user {
  align-self: flex-end;
  background: var(--accent-blue);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  margin-left: auto;
}
.pg-bubble-assistant {
  align-self: flex-start;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: 16px 16px 16px 4px;
}

/* ── Loading dots ── */
.pg-loading-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px 16px 16px 4px;
}
.pg-loading-dots span {
  width: 7px;
  height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: pg-bounce 1.4s infinite ease-in-out both;
}
.pg-loading-dots span:nth-child(1) { animation-delay: 0s; }
.pg-loading-dots span:nth-child(2) { animation-delay: 0.16s; }
.pg-loading-dots span:nth-child(3) { animation-delay: 0.32s; }
@keyframes pg-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%           { transform: translateY(-6px); opacity: 1; }
}

/* ── Context card (signal) ── */
.pg-context-card {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-2);
  font-size: 13px;
}
.pg-ctx-badges { display: flex; gap: var(--space-2); margin-bottom: var(--space-2); }
.pg-ctx-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.05em;
  border-radius: 4px;
  padding: 2px 6px;
}
.pg-ctx-signal  { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.pg-ctx-hot     { background: rgba(239,68,68,0.15);  color: var(--accent-red); }
.pg-ctx-trending{ background: rgba(251,191,36,0.15); color: var(--accent-amber); }
.pg-ctx-title {
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: 4px;
}
.pg-ctx-summary {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 4px;
}
.pg-ctx-source {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Draft card ── */
.pg-draft-card {
  background: rgba(52, 211, 153, 0.05);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-2) 0;
}
.pg-draft-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.pg-draft-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  background: rgba(52,211,153,0.15);
  color: var(--accent-green);
  border-radius: 4px;
  padding: 2px 7px;
}
.pg-draft-version {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.pg-draft-chars {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-left: auto;
}
.pg-draft-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.pg-draft-actions {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.pg-draft-save-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.pg-save-btn, .pg-schedule-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.pg-save-btn:hover     { background: var(--bg-tertiary); border-color: var(--accent-blue); }
.pg-schedule-btn:hover { background: var(--bg-tertiary); border-color: var(--accent-amber); }
.pg-save-btn:disabled, .pg-schedule-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.pg-draft-feedback {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: var(--space-2);
  min-height: 16px;
}

/* ── Idea save buttons (inline) ── */
.pg-idea-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 2px 0;
}
.pg-idea-save-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.pg-idea-save-btn:hover { color: var(--text-primary); border-color: var(--accent-blue); }
.pg-idea-save-btn:disabled { opacity: 0.7; cursor: default; }

/* ── Angle chips row ── */
.pg-angle-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0 var(--space-1);
}
.pg-angle-chips-label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}
.pg-angle-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.pg-angle-chip:hover {
  background: rgba(99,102,241,0.12);
  color: #a5b4fc;
  border-color: rgba(99,102,241,0.4);
}

/* ── Scheduling card ── */
.pg-schedule-card {
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-2) 0;
}
.pg-sched-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.pg-sched-icon  { font-size: 16px; }
.pg-sched-title {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-amber);
  font-family: var(--font-mono);
}
.pg-sched-date {
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.pg-sched-reasoning {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-3);
  border-left: 2px solid rgba(251,191,36,0.3);
  padding-left: var(--space-3);
}
.pg-sched-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.pg-sched-confirm {
  background: var(--accent-green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}
.pg-sched-confirm:hover    { opacity: 0.85; }
.pg-sched-confirm:disabled { opacity: 0.5; cursor: not-allowed; }
.pg-sched-other, .pg-sched-now {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.pg-sched-other:hover, .pg-sched-now:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.pg-sched-alts-label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: var(--space-2);
}
.pg-sched-alts { display: flex; flex-direction: column; gap: var(--space-1); }
.pg-sched-alt {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.pg-sched-alt:hover { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--accent-amber); }
.pg-sched-alt-note {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.pg-sched-feedback { font-size: 12px; color: var(--text-secondary); margin-top: var(--space-2); min-height: 16px; }
.pg-sched-confirmed {
  font-size: 14px;
  color: var(--accent-green);
  padding: var(--space-2) 0;
}

/* ── Skeleton row ── */
.skeleton-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}
.skeleton.full   { width: 100%; height: 14px; }
.skeleton.medium { width: 60%;  height: 14px; }
.skeleton.short  { width: 35%;  height: 14px; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
