/* ═══════════════════════════════════════════════
   Interview Copilot — Design System v3
   Generated via ui-ux-pro-max skill
   Font: Plus Jakarta Sans | Dark mode | Professional
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design Tokens ── */
:root {
  /* Palette — Developer Tool / IDE (from MASTER.md) */
  --color-primary:    #0F172A;
  --color-secondary:  #1E293B;
  --color-cta:        #22C55E;
  --color-background: #020617;
  --color-text:       #F8FAFC;

  /* Extended palette */
  --bg-deep:       #020617;
  --bg-surface:    rgba(15, 23, 42, .85);
  --bg-elevated:   rgba(30, 41, 59, .7);
  --bg-hover:      rgba(51, 65, 85, .5);
  --border:        rgba(148, 163, 184, .1);
  --border-bright: rgba(148, 163, 184, .2);

  --accent:        #22C55E;
  --accent-dim:    rgba(34, 197, 94, .12);
  --accent-glow:   rgba(34, 197, 94, .25);
  --violet:        #8B5CF6;
  --violet-dim:    rgba(139, 92, 246, .12);
  --cyan:          #06B6D4;
  --cyan-dim:      rgba(6, 182, 212, .12);
  --amber:         #F59E0B;
  --red:           #EF4444;

  --text:          #F8FAFC;
  --text-secondary:#94A3B8;
  --text-muted:    #64748B;

  /* Gradients */
  --grad-accent: linear-gradient(135deg, #22C55E, #06B6D4);
  --grad-hero:   linear-gradient(135deg, #0F172A 0%, #020617 100%);

  /* Shape — 8px base */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 100px;

  /* Shadows (dark theme optimized) */
  --shadow-sm:  0 1px 2px rgba(0,0,0,.3);
  --shadow-md:  0 4px 12px rgba(0,0,0,.4);
  --shadow-lg:  0 10px 25px rgba(0,0,0,.5);
  --shadow-xl:  0 20px 40px rgba(0,0,0,.6);
  --shadow-glow:0 0 30px var(--accent-glow);

  /* Glass */
  --glass-blur: 16px;

  /* Typography — Plus Jakarta Sans */
  --font:      'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing (from MASTER.md) */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;

  /* Layout */
  --header-h: 56px;
  --gap:       12px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Ambient background ── */
.ambient-bg {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.ambient-orb {
  position: absolute; border-radius: 50%;
  filter: blur(120px); opacity: .2;
  animation: float 25s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: var(--accent); top: -15%; left: -10%; }
.orb-2 { width: 400px; height: 400px; background: var(--violet); bottom: -15%; right: -8%; animation-delay: -8s; }
.orb-3 { width: 300px; height: 300px; background: var(--cyan); top: 35%; right: 15%; animation-delay: -15s; opacity: .12; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -25px) scale(1.05); }
  66%      { transform: translate(-25px, 18px) scale(.95); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ambient-orb, .answer-card, .transcript-entry, .toast { animation: none !important; }
  * { transition-duration: 0ms !important; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,.15); border-radius: 10px; }

/* ── Glass ── */
.glass {
  background: var(--bg-surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
}

/* ═══  HEADER  ═══ */
#appHeader {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
  background: rgba(2, 6, 23, .88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-left, .header-center, .header-right {
  display: flex; align-items: center;
}
.header-center { flex-direction: column; gap: 2px; }
.header-right { gap: var(--space-sm); }

/* Mode Toggle */
.mode-toggle {
  display: flex; gap: 2px;
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  padding: 2px;
}
.mode-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 12px;
  border: none; border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: .68rem; font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}
.mode-btn:hover { color: var(--text-secondary); }
.mode-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.mode-btn svg { flex-shrink: 0; }

/* Logo */
.logo { display: flex; align-items: center; gap: var(--space-sm); }
.logo-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--grad-accent);
  display: grid; place-items: center;
  box-shadow: var(--shadow-glow);
}
.logo-icon svg { width: 20px; height: 20px; color: #fff; }
.logo-text h1 {
  font-size: 1.05rem; font-weight: 700;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.logo-tagline {
  font-size: .6rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
}

/* Status pill */
.status-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: .7rem; font-weight: 600;
  color: var(--text-secondary);
  transition: all 200ms ease;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-muted);
  transition: all 200ms ease;
}
.status-pill.listening .status-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent-dim);
  animation: pulse 1.5s ease-in-out infinite;
}
.status-pill.processing .status-dot { background: var(--amber); }

@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.4); }
}

/* Timer */
.audio-timer {
  font-family: var(--font-mono); font-size: .75rem;
  color: var(--text-muted); font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: color 200ms ease;
}
.audio-timer.active { color: var(--accent); }

/* Teleprompter button */
.btn-teleprompter {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--violet);
  border-radius: var(--radius-pill);
  background: var(--violet-dim);
  color: var(--violet);
  font-family: var(--font);
  font-size: .7rem; font-weight: 600;
  cursor: pointer; transition: all 200ms ease;
  letter-spacing: .02em;
}
.btn-teleprompter:hover {
  background: var(--violet); color: #fff;
  box-shadow: 0 0 24px rgba(139, 92, 246, .35);
  transform: translateY(-1px);
}
.btn-teleprompter svg { width: 14px; height: 14px; }

/* ═══  MAIN LAYOUT  ═══ */
#appMain {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  gap: var(--gap);
  padding: var(--gap);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
}

.columns-area {
  display: flex; flex-direction: column;
  gap: var(--gap);
  flex: 1;
  min-height: 0;
}

/* ── Panel ── */
.panel {
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: all 200ms ease;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--space-md);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.panel-title {
  display: flex; align-items: center; gap: var(--space-sm);
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-secondary);
}
.panel-icon { font-size: .95rem; display: flex; }
.panel-icon svg { width: 18px; height: 18px; stroke: var(--text-secondary); }
.panel-body { flex: 1; overflow-y: auto; padding: var(--space-md); }
.scroll-area { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.1) transparent; }

/* ── CV Panel ── */
.cv-panel { min-height: 0; }
.cv-header-actions { display: flex; align-items: center; gap: var(--space-sm); }
.cv-badge {
  font-size: .6rem; font-weight: 700; text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-dim);
  color: var(--accent);
  letter-spacing: .06em;
}

/* Collapse button */
.btn-collapse {
  width: 30px; height: 30px;
  border: none; background: rgba(148,163,184,.08);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer; display: grid; place-items: center;
  transition: all 200ms ease;
}
.btn-collapse:hover { background: rgba(148,163,184,.15); color: var(--text); }
.btn-collapse svg { transition: transform 250ms ease; }
.collapsed .btn-collapse svg { transform: rotate(-90deg); }
.collapsed .panel-body,
.collapsed .cv-body { display: none; }
.transcript-actions { display: flex; align-items: center; gap: var(--space-xs); }

/* Tabs */
.tab-bar {
  display: flex; gap: 2px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 3px; margin-bottom: var(--space-md);
}
.tab {
  flex: 1; padding: 10px 14px;
  border: none; background: transparent;
  color: var(--text-muted);
  font-family: var(--font); font-size: .75rem; font-weight: 600;
  cursor: pointer; border-radius: 6px;
  transition: all 200ms ease; text-align: center;
}
.tab.active {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(34,197,94,.15);
}
.tab:hover:not(.active) { color: var(--text-secondary); background: rgba(148,163,184,.05); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border-bright);
  border-radius: var(--radius);
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  cursor: pointer;
  transition: all 250ms ease;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 30px rgba(34,197,94,.06);
}
.dropzone-graphic { margin-bottom: var(--space-sm); color: var(--text-muted); }
.dropzone-graphic svg { width: 36px; height: 36px; stroke: var(--text-muted); }
.dropzone-title { font-size: .88rem; font-weight: 600; color: var(--text); margin-bottom: var(--space-xs); }
.dropzone-sub { font-size: .72rem; color: var(--text-muted); margin-bottom: var(--space-md); }

/* Textarea */
#cvTextarea {
  width: 100%; min-height: 120px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md); margin-bottom: var(--space-sm);
  color: var(--text); font-family: var(--font-mono); font-size: .78rem;
  resize: vertical; line-height: 1.6;
  transition: border-color 200ms ease;
}
#cvTextarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34,197,94,.08); }

/* CV Preview */
.cv-preview { padding: var(--space-xs) 0; }
.cv-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem; color: var(--text-muted);
  margin-bottom: var(--space-sm);
}
.cv-filename { font-weight: 600; color: var(--accent); }
.cv-content {
  font-size: .75rem; color: var(--text-secondary);
  line-height: 1.6; max-height: 120px;
  overflow-y: auto; padding: var(--space-sm);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  margin-bottom: var(--space-sm);
}

/* ── Controls Bar ── */
.controls-bar {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-sm) 14px;
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}
.source-toggle { display: flex; gap: var(--space-xs); }
.source-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font); font-size: .75rem; font-weight: 500;
  cursor: pointer; transition: all 200ms ease;
}
.source-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(34,197,94,.08);
}
.source-btn:hover:not(.active) { border-color: var(--border-bright); color: var(--text-secondary); }

.visualizer {
  flex: 1; min-width: 80px; height: 36px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* Listen Button — Green CTA per MASTER.md */
.btn-listen {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 11px 24px;
  border: none; border-radius: var(--radius-pill);
  background: var(--grad-accent);
  color: #fff;
  font-family: var(--font); font-size: .8rem; font-weight: 700;
  cursor: pointer; transition: all 200ms ease;
  box-shadow: 0 4px 16px var(--accent-dim);
  white-space: nowrap;
}
.btn-listen:hover:not(:disabled) {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}
.btn-listen:disabled { opacity: .35; cursor: not-allowed; }
.btn-listen.active {
  background: linear-gradient(135deg, var(--red), #DC2626);
  box-shadow: 0 4px 16px rgba(239, 68, 68, .25);
}

/* Source tip */
.source-tip {
  padding: var(--space-sm) 14px;
  border-radius: var(--radius);
  font-size: .72rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all 200ms ease;
}
.btn:hover { background: var(--bg-hover); border-color: var(--border-bright); transform: translateY(-1px); }
.btn-primary {
  background: var(--grad-accent); color: #fff;
  border: none; box-shadow: 0 4px 12px var(--accent-dim);
}
.btn-primary:hover { box-shadow: var(--shadow-glow); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--red); transform: none; }
.btn-sm { padding: 7px 14px; font-size: .72rem; }
.btn-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: none; background: rgba(148,163,184,.06);
  color: var(--text-muted); cursor: pointer;
  border-radius: var(--radius-sm); transition: all 200ms ease;
}
.btn-icon:hover { background: rgba(148,163,184,.12); color: var(--text); }

/* ── Transcript ── */
.transcript-entries { display: flex; flex-direction: column; gap: 6px; }
.transcript-entry {
  display: flex; gap: var(--space-sm);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  animation: slideUp .3s ease-out;
}
.transcript-time {
  font-family: var(--font-mono);
  font-size: .65rem; font-weight: 500;
  color: var(--text-muted); flex-shrink: 0;
  padding-top: 2px;
}
.transcript-text { font-size: .8rem; color: var(--text); line-height: 1.5; }

/* ── Answer Cards — Hero element ── */
.answer-entries { display: flex; flex-direction: column; gap: 14px; }
.answer-counter {
  font-size: .65rem; font-weight: 600;
  color: var(--text-muted); font-family: var(--font-mono);
}
.answer-card {
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: slideUp .35s ease-out;
  transition: all 200ms ease;
  cursor: default;
}
.answer-card:first-child {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(34,197,94,.1), 0 4px 20px rgba(0,0,0,.2);
}
.answer-card:hover {
  border-color: var(--border-bright);
  box-shadow: var(--shadow-md);
}
.answer-card:first-child:hover {
  border-color: var(--accent);
  box-shadow: 0 0 35px rgba(34,197,94,.15), 0 8px 30px rgba(0,0,0,.3);
}
.answer-card-header {
  padding: 12px 16px;
  background: rgba(34, 197, 94, .05);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-sm);
}
.answer-question {
  font-size: .82rem; font-weight: 600;
  color: var(--accent); line-height: 1.4;
  flex: 1;
}
.answer-confidence {
  font-size: .6rem; font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-dim);
  color: var(--accent);
  white-space: nowrap;
}
.answer-body { padding: 16px; }
.answer-text {
  font-size: .9rem; line-height: 1.75;
  color: var(--text);
}
.answer-key-points {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.answer-kp {
  font-size: .68rem; font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--violet-dim);
  color: #C4B5FD;
  transition: all 200ms ease;
}
.answer-actions {
  display: flex; gap: 6px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border);
}
.answer-copy-btn {
  display: flex; align-items: center; gap: var(--space-xs);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font); font-size: .68rem; font-weight: 500;
  cursor: pointer; transition: all 200ms ease;
}
.answer-copy-btn:hover { background: var(--bg-hover); color: var(--text); }
.answer-follow-up {
  font-size: .6rem; font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--cyan-dim);
  color: var(--cyan);
}

/* ── Empty states ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: var(--space-sm);
  padding: var(--space-2xl) var(--space-lg);
  color: var(--text-muted); text-align: center;
  min-height: 140px;
}
.empty-icon { font-size: 2.2rem; opacity: .3; }
.empty-icon svg { width: 40px; height: 40px; stroke: var(--text-muted); opacity: .3; }
.empty-state p { font-size: .78rem; max-width: 260px; line-height: 1.6; }

/* ── Toast ── */
.toast-container {
  position: fixed; bottom: 20px; right: 20px;
  display: flex; flex-direction: column; gap: var(--space-sm);
  z-index: 9999;
}
.toast {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 13px 18px;
  border-radius: var(--radius);
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  color: var(--text); font-size: .78rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease-out;
  min-width: 240px; max-width: 380px;
}
.toast.success { border-color: var(--accent); }
.toast.error   { border-color: var(--red); }
.toast.info    { border-color: var(--cyan); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast.removing { animation: toastOut .25s ease forwards; }

@keyframes toastIn  { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to   { opacity: 0; transform: translateX(30px); } }

/* ── Spinner ── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Animations ── */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ── Utilities ── */
.hidden { display: none !important; }

/* Processing indicator */
.answer-processing {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: var(--space-sm);
  animation: slideUp .3s ease-out;
  color: var(--accent); font-size: .78rem;
  box-shadow: 0 0 20px var(--accent-dim);
}

/* ═══  RESPONSIVE — Desktop  ═══ */
@media (min-width: 769px) {
  :root { --header-h: 60px; --gap: 16px; }

  #appMain { height: calc(100vh - var(--header-h)); overflow: hidden; }

  .columns-area { flex-direction: row; flex: 1; }

  .cv-panel { width: 330px; flex-shrink: 0; }

  .right-col {
    flex: 1;
    display: flex; flex-direction: column;
    gap: var(--gap); min-height: 0;
  }

  .answers-panel { flex: 1; min-height: 0; }
  .transcript-panel { flex: 0 0 220px; }
  .source-tip { display: block; }
}

/* ═══  RESPONSIVE — Large Desktop  ═══ */
@media (min-width: 1200px) {
  :root { --gap: 20px; }
  .cv-panel { width: 360px; }
  .transcript-panel { flex: 0 0 260px; }
  .answer-text { font-size: .95rem; }
}

/* ═══  RESPONSIVE — Mobile  ═══ */
@media (max-width: 768px) {
  :root { --header-h: 50px; }

  .desktop-only { display: none !important; }

  #appHeader { padding: 0 12px; }
  .logo-tagline { display: none; }
  .logo-text h1 { font-size: .9rem; }
  .logo-icon { width: 30px; height: 30px; }
  .status-pill { padding: 3px 10px; font-size: .62rem; }
  .audio-timer { font-size: .65rem; padding: 3px 7px; }

  #appMain { padding: var(--space-sm); gap: var(--space-sm); }

  .controls-bar { padding: var(--space-sm); gap: var(--space-sm); border-radius: var(--radius); }
  .source-btn { padding: 10px 14px; font-size: .72rem; min-height: 44px; }
  .source-btn span { display: none; }
  .source-btn svg { width: 20px; height: 20px; }
  .btn-listen { padding: 12px 20px; font-size: .78rem; flex: 1; justify-content: center; min-height: 44px; }
  .visualizer { min-width: 60px; height: 30px; }

  .cv-panel.collapsed .cv-body { display: none; }
  .cv-panel .panel-header { cursor: pointer; }

  .panel-header { padding: 12px 14px; }
  .panel-body { padding: var(--space-sm); }

  .answers-panel { min-height: 50vh; }
  .answer-text { font-size: .92rem; line-height: 1.75; }
  .answer-card-header { padding: 12px 14px; }
  .answer-body { padding: 14px; }

  .transcript-panel { max-height: 200px; }
  .transcript-panel.collapsed .panel-body { display: none; }
  .transcript-panel.collapsed { max-height: none; }

  .source-tip { font-size: .65rem; padding: var(--space-sm); }

  .toast-container { left: var(--space-sm); right: var(--space-sm); bottom: var(--space-sm); }
  .toast { min-width: auto; font-size: .72rem; }

  .answer-copy-btn { padding: 10px 16px; font-size: .72rem; min-height: 44px; }
  .btn-icon { width: 40px; height: 40px; min-height: 44px; }
  .btn-collapse { width: 36px; height: 36px; min-height: 44px; }
}

/* ═══  RESPONSIVE — Small Phone  ═══ */
@media (max-width: 400px) {
  .logo-text h1 { font-size: .82rem; }
  .logo-icon { width: 28px; height: 28px; }
  .btn-listen { padding: 12px 16px; font-size: .72rem; }
  .answer-text { font-size: .88rem; }
}
