/* ==========================================================================
   Hark Daily — v2 design system
   Tactile glass over a calm, deep canvas. Sunrise amber marks the one thing
   to press; a soft sky blue carries audio. Light and dark share every token.
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: light;
  --font-head: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-xs: 6px;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  --gutter: 2rem;
  --sidebar-w: 264px;
  --topbar-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --blur: blur(20px) saturate(150%);

  /* Light — warm paper, white glass */
  --bg: #f3f2ee;
  --bg-2: #ebe9e3;
  --glow-1: rgba(245, 158, 11, .12);
  --glow-2: rgba(99, 102, 241, .08);
  --glow-3: rgba(56, 152, 210, .08);
  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .8);
  --glass-solid: #ffffff;
  --well: rgba(15, 23, 42, .04);
  --well-strong: rgba(15, 23, 42, .07);
  --rim: rgba(255, 255, 255, .85);
  --line: rgba(15, 23, 42, .08);
  --line-2: rgba(15, 23, 42, .14);
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --faint: #98a2b3;
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --accent-ink: #1f1300;
  --accent-text: #b45309;
  --accent-soft: rgba(245, 158, 11, .13);
  --accent-line: rgba(217, 119, 6, .32);
  --info: #2f6f9f;
  --info-soft: rgba(47, 111, 159, .1);
  --wave: #4b8ab8;
  --wave-off: rgba(15, 23, 42, .13);
  --ok: #18794e;
  --ok-soft: rgba(24, 121, 78, .1);
  --err: #c0362c;
  --err-soft: rgba(192, 54, 44, .08);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 12px -6px rgba(16, 24, 40, .1);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 16px 40px -18px rgba(16, 24, 40, .22);
  --shadow-lg: 0 30px 70px -20px rgba(16, 24, 40, .32);
  --accent-glow: 0 8px 22px -8px rgba(217, 119, 6, .55);

  --c-top: #b45309;
  --c-ai: #6355c7;
  --c-tech: #2f6f9f;
  --c-politics: #a8473f;
  --c-entertainment: #9b4688;
  --c-science: #0f766e;
  --c-sports: #3e7b38;
  --c-custom: #5b5fc7;
  --c-neutral: #667085;
}

/* Dark — obsidian night, smoked glass. Repeated for the system preference so
   the page follows the OS without JS, and for an explicit override. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f17;
  --bg-2: #0e131d;
  --glow-1: rgba(245, 158, 11, .07);
  --glow-2: rgba(79, 70, 229, .14);
  --glow-3: rgba(56, 189, 248, .05);
  --glass: rgba(17, 24, 39, .6);
  --glass-strong: rgba(22, 30, 46, .8);
  --glass-solid: #121826;
  --well: rgba(2, 6, 14, .42);
  --well-strong: rgba(2, 6, 14, .6);
  --rim: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --ink: #f1f5f9;
  --ink-2: #cbd5e1;
  --muted: #94a3b8;
  --faint: #64748b;
  --accent: #f59e0b;
  --accent-strong: #fbbf24;
  --accent-ink: #1a1102;
  --accent-text: #f6bd5c;
  --accent-soft: rgba(245, 158, 11, .12);
  --accent-line: rgba(245, 158, 11, .3);
  --info: #8ccbec;
  --info-soft: rgba(125, 200, 240, .11);
  --wave: #8ccbec;
  --wave-off: rgba(148, 163, 184, .2);
  --ok: #6fd39b;
  --ok-soft: rgba(111, 211, 155, .1);
  --err: #f49b8f;
  --err-soft: rgba(244, 155, 143, .1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 16px -8px rgba(0, 0, 0, .5);
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 22px 48px -20px rgba(0, 0, 0, .7);
  --shadow-lg: 0 32px 80px -16px rgba(0, 0, 0, .85);
  --accent-glow: 0 8px 28px -8px rgba(245, 158, 11, .5);

  --c-top: #f6bd5c;
  --c-ai: #b4b0ff;
  --c-tech: #8ccbec;
  --c-politics: #f0a49b;
  --c-entertainment: #e6a7d9;
  --c-science: #7fd6c5;
  --c-sports: #a7d898;
  --c-custom: #aab0ff;
  --c-neutral: #94a3b8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0f17;
    --bg-2: #0e131d;
    --glow-1: rgba(245, 158, 11, .07);
    --glow-2: rgba(79, 70, 229, .14);
    --glow-3: rgba(56, 189, 248, .05);
    --glass: rgba(17, 24, 39, .6);
    --glass-strong: rgba(22, 30, 46, .8);
    --glass-solid: #121826;
    --well: rgba(2, 6, 14, .42);
    --well-strong: rgba(2, 6, 14, .6);
    --rim: rgba(255, 255, 255, .06);
    --line: rgba(255, 255, 255, .07);
    --line-2: rgba(255, 255, 255, .12);
    --ink: #f1f5f9;
    --ink-2: #cbd5e1;
    --muted: #94a3b8;
    --faint: #64748b;
    --accent: #f59e0b;
    --accent-strong: #fbbf24;
    --accent-ink: #1a1102;
    --accent-text: #f6bd5c;
    --accent-soft: rgba(245, 158, 11, .12);
    --accent-line: rgba(245, 158, 11, .3);
    --info: #8ccbec;
    --info-soft: rgba(125, 200, 240, .11);
    --wave: #8ccbec;
    --wave-off: rgba(148, 163, 184, .2);
    --ok: #6fd39b;
    --ok-soft: rgba(111, 211, 155, .1);
    --err: #f49b8f;
    --err-soft: rgba(244, 155, 143, .1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 16px -8px rgba(0, 0, 0, .5);
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 22px 48px -20px rgba(0, 0, 0, .7);
    --shadow-lg: 0 32px 80px -16px rgba(0, 0, 0, .85);
    --accent-glow: 0 8px 28px -8px rgba(245, 158, 11, .5);

    --c-top: #f6bd5c;
    --c-ai: #b4b0ff;
    --c-tech: #8ccbec;
    --c-politics: #f0a49b;
    --c-entertainment: #e6a7d9;
    --c-science: #7fd6c5;
    --c-sports: #a7d898;
    --c-custom: #aab0ff;
    --c-neutral: #94a3b8;
  }
}

/* Large-text accessibility modes scale everything set in rem. */
html { font-size: 100%; }
html[data-text="sm"] { font-size: 93.75%; }
html[data-text="lg"] { font-size: 112.5%; }

/* -------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); font-size: 16px; }
html[data-text-size="sm"] { font-size: 14.5px; }
html[data-text-size="md"] { font-size: 16px; }
html[data-text-size="lg"] { font-size: 18.5px; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* The canvas: a few soft light pools for the glass to refract. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 36rem at 72% -8%, var(--glow-1), transparent 60%),
    radial-gradient(52rem 40rem at 18% 8%, var(--glow-2), transparent 62%),
    radial-gradient(44rem 34rem at 90% 85%, var(--glow-3), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
img { max-width: 100%; display: block; }
svg { width: 1.25rem; height: 1.25rem; flex: none; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .45; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; letter-spacing: -.01em; font-weight: 600; }
p { margin: 0; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--wave); outline-offset: 2px; border-radius: var(--r-sm); }
.hidden { display: none !important; }
.spacer { flex: 1 1 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; border-radius: var(--r-full); background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; transition: top .2s var(--ease); }
.skip-link:focus { top: 1rem; }
html.bw-photos .hero-cover, html.bw-photos .story-thumb, html.bw-photos .mini-cover { filter: grayscale(1) contrast(1.05); }

* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* -------------------------------------------------------------- typography */
.overline {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-head);
  font-size: .6875rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted);
}
.overline svg { width: .95rem; height: .95rem; }
.display { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3rem); line-height: 1.12; font-weight: 700; letter-spacing: -.03em; }
.subtitle { color: var(--muted); font-size: 1rem; margin-top: .35rem; }
.hint { color: var(--muted); font-size: .875rem; line-height: 1.55; }
.meta { color: var(--muted); font-size: .8125rem; }
.tiny { color: var(--muted); font-size: .75rem; }
.footnote { color: var(--faint); font-size: .8125rem; text-align: center; margin: 2rem 0 0; }
.footnote a { color: var(--muted); }

.landing-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
  margin: 2.25rem auto 0;
}
.social-label {
  font-size: .8125rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .02em;
}
.social-links {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.social-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .85rem;
  border-radius: var(--r-full);
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s var(--ease);
  box-shadow: var(--shadow-xs);
}
.social-chip:hover {
  background: var(--glass-solid);
  border-color: var(--line-2);
  transform: translateY(-1px);
  color: var(--accent);
}
.social-chip svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}
kbd { font-family: var(--font-head); font-size: .7rem; padding: .05rem .4rem; border-radius: var(--r-xs); border: 1px solid var(--line-2); color: var(--faint); background: var(--well); }

/* ------------------------------------------------------------------- glass */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 var(--rim), var(--shadow-sm);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .topbar, .sidebar, .mini-player, .save-bar, .tabbar { background: var(--glass-solid) !important; }
}
.glass-group { padding: .25rem 0; }
.glass-group > .hint { padding: .5rem 1.25rem .75rem; }
.hairline { height: 1px; background: var(--line); margin: 0 1.25rem; }
.card { padding: 1.25rem 1.25rem 1rem; }
.card-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.card-head h2 { font-size: 1.125rem; }
.card-head .meta { margin-top: .1rem; }
.card-head > div { flex: 1; min-width: 0; }
.card .glass-group, .card .list-row { margin-left: -1.25rem; margin-right: -1.25rem; }
.card .glass-group { padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* --------------------------------------------------------------- icon tile */
.cat-tile {
  --cat: var(--c-neutral);
  display: inline-grid; place-items: center; flex: none;
  width: 2.5rem; height: 2.5rem; border-radius: var(--r);
  color: var(--cat);
  background: color-mix(in oklab, var(--cat) 13%, transparent);
  border: 1px solid color-mix(in oklab, var(--cat) 18%, transparent);
}
.cat-tile svg { width: 1.2rem; height: 1.2rem; }
.cat-tile.sm { width: 2rem; height: 2rem; border-radius: var(--r-sm); }
.cat-tile.sm svg { width: 1rem; height: 1rem; }
.cat-top { --cat: var(--c-top); }
.cat-ai { --cat: var(--c-ai); }
.cat-tech { --cat: var(--c-tech); }
.cat-politics { --cat: var(--c-politics); }
.cat-entertainment { --cat: var(--c-entertainment); }
.cat-science { --cat: var(--c-science); }
.cat-sports { --cat: var(--c-sports); }
.cat-custom { --cat: var(--c-custom); }
.cat-neutral { --cat: var(--c-neutral); }

/* ------------------------------------------------------------------ badges */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .55rem; border-radius: var(--r-xs);
  font-family: var(--font-head); font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  line-height: 1.3; white-space: nowrap;
  color: var(--muted); background: var(--well-strong);
}
.badge:empty { display: none; }
.badge-accent { color: var(--accent-text); background: var(--accent-soft); }
.badge-info { color: var(--info); background: var(--info-soft); }
.badge-muted { color: var(--muted); background: var(--well-strong); }
.badge-ok { color: var(--ok); background: var(--ok-soft); }
.badge-dot { width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.badge-cat { color: var(--cat); background: color-mix(in oklab, var(--cat) 12%, transparent); }

.freshness-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .25rem .65rem .25rem .55rem; border-radius: var(--r-full);
  font-family: var(--font-head); font-size: .6875rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); background: var(--well-strong);
}
.freshness-tag:empty { display: none; }
.freshness-tag::before { content: ''; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.freshness-tag.fresh { color: var(--accent-text); background: var(--accent-soft); }

.tag-ink {
  display: inline-flex; align-items: center; padding: .2rem .55rem; border-radius: var(--r-xs);
  font-family: var(--font-head); font-size: .625rem; font-weight: 700; letter-spacing: .08em;
  color: var(--muted); background: var(--well-strong); white-space: nowrap;
}
.tag-tech { color: var(--info); background: var(--info-soft); }
.tag-warn { color: var(--accent-text); background: var(--accent-soft); }
.tag-custom { color: var(--c-ai); background: color-mix(in oklab, var(--c-ai) 12%, transparent); }
.tag-accent { color: var(--ok); background: var(--ok-soft); }

/* ----------------------------------------------------------------- buttons */
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 2.5rem; padding: 0 1.1rem; border-radius: var(--r-full);
  font-family: var(--font-head); font-weight: 600; font-size: .875rem; letter-spacing: .01em;
  color: var(--accent-ink); background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), var(--accent-glow);
  text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease), color .2s;
}
.pill-btn:hover { background: var(--accent-strong); }
:root[data-theme="dark"] .pill-btn:hover { background: #fbb53a; }
.pill-btn:active { transform: scale(.97); }
.pill-btn svg { width: 1.05rem; height: 1.05rem; }
.pill-btn.sm { min-height: 2.125rem; padding: 0 .9rem; font-size: .8125rem; }
.pill-btn.lg { min-height: 3rem; padding: 0 1.6rem; font-size: 1rem; }
.pill-btn.glass-btn {
  color: var(--ink); background: var(--well-strong);
  box-shadow: inset 0 0 0 1px var(--line);
}
.pill-btn.glass-btn:hover { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-line); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.6rem; padding: 0 1.15rem; border-radius: var(--r-full);
  font-family: var(--font-head); font-weight: 600; font-size: .9rem;
  color: var(--ink); background: var(--well-strong); border: 1px solid var(--line);
  text-decoration: none; transition: background-color .2s, border-color .2s, transform .15s var(--ease);
}
.btn:hover { border-color: var(--line-2); }
.btn:active { transform: scale(.98); }
.btn svg { width: 1.05rem; height: 1.05rem; }
.btn-lg { min-height: 3rem; font-size: .95rem; width: 100%; }
.btn-primary { color: var(--accent-ink); background: var(--accent); border-color: transparent; box-shadow: var(--accent-glow); }
.btn-primary:hover { background: var(--accent-strong); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--well); }
.btn-danger { color: #fff; background: #c0362c; border-color: transparent; }
.btn-danger:hover { background: #a62c23; border-color: transparent; }
.btn-danger:disabled { opacity: .4; }
.btn-google { background: var(--glass-solid); border-color: var(--line-2); }

.icon-btn {
  display: inline-grid; place-items: center;
  flex: 0 0 auto !important; aspect-ratio: 1 / 1 !important;
  width: 2.5rem; height: 2.5rem; min-width: 2.5rem; min-height: 2.5rem; max-width: 2.5rem; max-height: 2.5rem;
  border-radius: 50% !important; padding: 0 !important; margin: 0; box-sizing: border-box !important;
  color: var(--ink-2); background: var(--well); border: 1px solid var(--line);
  transition: background-color .2s, color .2s, border-color .2s, transform .15s var(--ease);
}
.icon-btn:hover { color: var(--ink); background: var(--well-strong); border-color: var(--line-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }
.icon-btn.sm {
  width: 2rem !important; height: 2rem !important;
  min-width: 2rem !important; min-height: 2rem !important;
  max-width: 2rem !important; max-height: 2rem !important;
  aspect-ratio: 1 / 1 !important; flex: 0 0 auto !important;
  border-radius: 50% !important; padding: 0 !important;
}
.icon-btn.sm svg { width: 1rem; height: 1rem; }

.link-btn { color: var(--accent-text); font-weight: 600; font-size: .875rem; padding: .25rem; border-radius: var(--r-xs); }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* The one big amber roundel. Strictly circular and immune to flex compression. */
.ink-circle {
  position: relative; display: inline-grid; place-items: center;
  flex: 0 0 auto !important; aspect-ratio: 1 / 1 !important;
  width: 3.75rem; height: 3.75rem; min-width: 3.75rem; min-height: 3.75rem; max-width: 3.75rem; max-height: 3.75rem;
  border-radius: 50% !important; border: 0 !important; padding: 0 !important; margin: 0;
  box-sizing: border-box !important;
  color: var(--accent-ink); background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 6px rgba(120, 60, 0, .25), 0 10px 28px -8px rgba(245, 158, 11, .6);
  transition: transform .15s var(--ease), box-shadow .25s var(--ease), background-color .2s;
}
.ink-circle:hover { background: #f8a922; }
.ink-circle:active { transform: scale(.95); }
.ink-circle svg { width: 1.6rem; height: 1.6rem; }
.ink-circle .i-pause, .playing-now .ink-circle .i-play, body.playing .mini-player .ink-circle .i-play { display: none; }
.playing-now .ink-circle .i-pause, body.playing .mini-player .ink-circle .i-pause { display: block; }
.ink-circle.sm {
  width: 2.75rem !important; height: 2.75rem !important;
  min-width: 2.75rem !important; min-height: 2.75rem !important;
  max-width: 2.75rem !important; max-height: 2.75rem !important;
  aspect-ratio: 1 / 1 !important; border-radius: 50% !important;
  flex: 0 0 auto !important; padding: 0 !important; border: 0 !important;
  box-sizing: border-box !important;
}
.ink-circle.sm svg { width: 1.2rem; height: 1.2rem; }
.ink-circle::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid var(--accent-line); opacity: 0; pointer-events: none;
}
.playing-now .ink-circle::after { animation: ring 2.4s var(--ease) infinite; }
@keyframes ring { 0% { opacity: .9; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.18); } }

.skip-btn {
  position: relative; display: inline-grid; place-items: center;
  flex: 0 0 auto !important; aspect-ratio: 1 / 1 !important;
  width: 2.75rem; height: 2.75rem; min-width: 2.75rem; min-height: 2.75rem; max-width: 2.75rem; max-height: 2.75rem;
  border-radius: 50% !important; border: 1px solid var(--line); padding: 0 !important; margin: 0;
  box-sizing: border-box !important;
  color: var(--ink-2); background: var(--well-strong);
  transition: background-color .2s, color .2s, transform .15s var(--ease);
}
.skip-btn:hover { color: var(--ink); background: var(--accent-soft); border-color: var(--accent-line); }
.skip-btn:active { transform: scale(.92); }
.skip-btn svg { width: 1.2rem; height: 1.2rem; }
.skip-btn.sm {
  width: 2.25rem !important; height: 2.25rem !important;
  min-width: 2.25rem !important; min-height: 2.25rem !important;
  max-width: 2.25rem !important; max-height: 2.25rem !important;
  aspect-ratio: 1 / 1 !important; border-radius: 50% !important;
  flex: 0 0 auto !important; padding: 0 !important;
  box-sizing: border-box !important;
}
.skip-btn.sm svg { width: 1rem; height: 1rem; }

/* ------------------------------------------------------------------- chips */
.chip, .chip-btn, .dchip {
  display: inline-flex; align-items: center; gap: .35rem;
  min-height: 2rem; padding: 0 .85rem; border-radius: var(--r-full);
  font-size: .8125rem; font-weight: 500; white-space: nowrap;
  color: var(--ink-2); background: var(--well); border: 1px solid var(--line);
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover, .chip-btn:hover, .dchip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.on, .chip-btn.active, .dchip.active { color: var(--accent-text); background: var(--accent-soft); border-color: var(--accent-line); }
.chips, .chip-row, .chip-flow { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-row { margin: .75rem 0; }

/* ------------------------------------------------------------------ inputs */
.text-input, .pill-field {
  min-height: 2.75rem; padding: 0 1rem; border-radius: var(--r);
  color: var(--ink); background: var(--well); border: 1px solid var(--line-2);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.text-input.full { width: 100%; margin-top: .75rem; }
.text-input.textarea { min-height: 6rem; padding: .75rem 1rem; resize: vertical; font-family: inherit; }
.text-input::placeholder, .pill-field::placeholder { color: var(--faint); }
.text-input:focus, .pill-field:focus { outline: none; border-color: var(--wave); box-shadow: 0 0 0 3px color-mix(in oklab, var(--wave) 22%, transparent); }
.code-input { font-family: var(--font-head); letter-spacing: .3em; text-align: center; font-size: 1.1rem; }
.pill-field { border-radius: var(--r-full); flex: 1; min-width: 0; }
.add-field, .input-row { display: flex; gap: .5rem; align-items: center; }
.input-row .text-input { flex: 1; min-width: 0; }

.switch { position: relative; display: inline-flex; flex: 0 0 auto !important; width: 2.75rem; height: 1.6rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: var(--r-full); background: var(--wave-off); transition: background-color .25s var(--ease); }
.switch span::after {
  content: ''; position: absolute; top: .2rem; left: .2rem; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease);
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(1.15rem); }
.switch input:focus-visible + span { outline: 2px solid var(--wave); outline-offset: 2px; }

.segmented {
  display: inline-flex; gap: .2rem; padding: .25rem; border-radius: var(--r-full);
  background: var(--well-strong); border: 1px solid var(--line);
}
.seg-opt {
  min-height: 2rem; padding: 0 .9rem; border-radius: var(--r-full);
  font-family: var(--font-head); font-size: .8125rem; font-weight: 600; color: var(--muted);
  transition: background-color .2s, color .2s;
}
.seg-opt:hover { color: var(--ink); }
.seg-opt.on { color: var(--accent-ink); background: var(--accent); box-shadow: 0 2px 8px -2px rgba(245, 158, 11, .5); }

.pill-stepper {
  display: inline-flex; align-items: center; gap: .15rem; padding: .2rem; border-radius: var(--r-full);
  background: var(--well-strong); border: 1px solid var(--line);
}
.step-btn {
  display: grid; place-items: center;
  flex: 0 0 auto !important; aspect-ratio: 1 / 1 !important;
  width: 1.9rem; height: 1.9rem; min-width: 1.9rem; min-height: 1.9rem; max-width: 1.9rem; max-height: 1.9rem;
  border-radius: 50% !important; padding: 0 !important;
  font-size: 1.05rem; font-weight: 600; color: var(--ink-2); transition: background-color .2s, color .2s;
}
.step-btn:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent-text); }
.step-value { min-width: 2.6rem; text-align: center; font-family: var(--font-head); font-weight: 600; font-size: .875rem; }

.check-dot {
  display: inline-grid; place-items: center;
  flex: 0 0 auto !important; aspect-ratio: 1 / 1 !important;
  width: 1.5rem; height: 1.5rem; min-width: 1.5rem; min-height: 1.5rem; max-width: 1.5rem; max-height: 1.5rem;
  border-radius: 50% !important; padding: 0 !important;
  border: 1.5px solid var(--line-2); color: var(--accent-ink); transition: background-color .2s, border-color .2s;
}
.check-dot svg { width: .9rem; height: .9rem; }
.check-dot.on { background: var(--accent); border-color: var(--accent); }

.confirm-check { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; margin: 1rem 0 .5rem; border-radius: var(--r); background: var(--well); border: 1px solid var(--line); cursor: pointer; font-size: .9rem; }
.confirm-check input { width: 1.1rem; height: 1.1rem; margin-top: .15rem; accent-color: #c0362c; flex: none; }

/* --------------------------------------------------------------- list rows */
.list-row {
  display: flex; align-items: center; gap: .9rem;
  min-height: 3.5rem; padding: .7rem 1.25rem; width: 100%; text-align: left;
  border-radius: 0; transition: background-color .2s;
}
.list-row.clickable { cursor: pointer; }
.list-row.clickable:hover { background: var(--well); }
.list-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.list-row-label { font-weight: 600; font-size: .9375rem; }
.list-row-detail { color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.list-row-value { color: var(--muted); font-size: .875rem; text-align: right; flex: none; }
.caret { display: inline-grid; place-items: center; color: var(--faint); flex: none; transition: transform .25s var(--ease); }
.caret svg { width: 1rem; height: 1rem; }
.caret.open { transform: rotate(0deg); }

.section-label { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 2rem .25rem .7rem; }
.section-label-text .meta { margin-top: .2rem; }
.setting-group { margin-top: 1.1rem; display: grid; gap: .55rem; }
.setting-group h3 { font-size: .95rem; }
.setting-row { display: flex; align-items: center; gap: .85rem; font-size: .9375rem; }

/* =============================================================== APP SHELL */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; }
body.signed-out .app-shell, body.signed-out .mini-player, body.signed-out .save-bar { display: none !important; }
body.signed-out #login { display: block; }
body:not(.signed-out) #login { display: none !important; }
body.booting .app-shell { visibility: hidden; }

/* Sidebar */
.sidebar {
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.5rem 1rem 1.25rem;
  background: var(--glass);
  border-right: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  z-index: 30;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; padding: 0 .5rem; }
.brand img { flex: 0 0 auto; aspect-ratio: 1 / 1; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-compact { display: none; padding: 0; }

.live-card {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .8rem .95rem; border-radius: var(--r);
  background: var(--well); border: 1px solid var(--line);
}
.live-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.live-text .overline { font-size: .625rem; }
.live-status { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-head); font-weight: 600; font-size: .875rem; color: var(--info); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--info); flex: none; box-shadow: 0 0 0 3px var(--info-soft); }
body.playing .live-card .live-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1.6s ease-in-out infinite; }
body.playing .live-status { color: var(--accent-text); }
@keyframes pulse { 50% { opacity: .45; } }

.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 1.1rem; color: var(--info); }
.eq i { width: 3px; height: 35%; border-radius: 2px; background: currentColor; }
.eq i:nth-child(2) { height: 75%; } .eq i:nth-child(3) { height: 55%; } .eq i:nth-child(4) { height: 90%; }
body.playing .eq { color: var(--accent); }
body.playing .eq i { animation: eq 1s ease-in-out infinite; }
body.playing .eq i:nth-child(2) { animation-delay: -.3s; } body.playing .eq i:nth-child(3) { animation-delay: -.6s; } body.playing .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

.tabbar { display: flex; flex-direction: column; gap: .25rem; }
.tab {
  position: relative; display: flex; align-items: center; gap: .85rem;
  min-height: 2.75rem; padding: 0 .85rem; border-radius: var(--r);
  font-family: var(--font-head); font-weight: 500; font-size: .9375rem; color: var(--ink-2);
  text-align: left; transition: background-color .2s, color .2s;
}
.tab svg { width: 1.2rem; height: 1.2rem; color: var(--muted); transition: color .2s; }
.tab:hover { background: var(--well); color: var(--ink); }
.tab.active { color: var(--ink); background: var(--accent-soft); font-weight: 600; }
.tab.active svg { color: var(--accent-text); }
.tab.active::before { content: ''; position: absolute; left: -1rem; top: .55rem; bottom: .55rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }

.sidebar-foot { margin-top: auto; display: grid; gap: .9rem; }
.progress-card { padding: .9rem 1rem; border-radius: var(--r); background: var(--well); border: 1px solid var(--line); }
.progress-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.progress-row .overline { font-size: .625rem; }
.progress-val { font-family: var(--font-head); font-weight: 600; font-size: .75rem; color: var(--accent-text); }
.progress-track { height: .3rem; border-radius: var(--r-full); background: var(--wave-off); overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .4s var(--ease); }
.sync-row { display: flex; justify-content: space-between; align-items: center; padding: 0 .5rem; color: var(--faint); font-family: var(--font-head); font-size: .75rem; }
.sync-row > span { display: inline-flex; align-items: center; gap: .4rem; }
.sync-row svg { width: .85rem; height: .85rem; }

/* Workspace + top bar */
.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; gap: .75rem;
  min-height: var(--topbar-h); padding: .75rem var(--gutter);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
.greeting { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; white-space: nowrap; min-width: 0; }
.greeting svg { color: var(--accent-text); width: 1.3rem; height: 1.3rem; }
.greeting span { overflow: hidden; text-overflow: ellipsis; }
.status-chip {
  display: inline-flex; align-items: center; gap: .45rem; flex: none;
  min-height: 2.25rem; padding: 0 .85rem; border-radius: var(--r-full);
  font-family: var(--font-head); font-size: .75rem; font-weight: 600; letter-spacing: .02em; color: var(--muted);
  background: var(--well); border: 1px solid var(--line); white-space: nowrap;
}
.status-chip svg { width: .95rem; height: .95rem; }
.status-chip:has(#statusText:empty) { display: none; }
.search {
  display: flex; align-items: center; gap: .55rem; flex: 0 1 22rem; min-width: 10rem;
  min-height: 2.5rem; padding: 0 .55rem 0 .9rem; border-radius: var(--r-full);
  background: var(--well); border: 1px solid var(--line-2);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--wave); box-shadow: 0 0 0 3px color-mix(in oklab, var(--wave) 20%, transparent); }
.search svg { width: 1.05rem; height: 1.05rem; color: var(--faint); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: .875rem; }
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); opacity: .5; }
.search:focus-within kbd { display: none; }
body:not([data-tab="today"]) .search, body:not([data-tab="today"]) .status-chip { display: none; }

.narrator-chip {
  display: inline-flex; align-items: center; gap: .6rem; flex: none;
  min-height: 2.5rem; padding: .25rem .9rem .25rem .3rem; border-radius: var(--r-full);
  background: var(--well); border: 1px solid var(--line); text-align: left;
  transition: border-color .2s, background-color .2s;
}
.narrator-chip:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.narrator-glyph { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; color: var(--accent-ink); background: var(--accent); }
.narrator-glyph svg { width: 1rem; height: 1rem; }
.narrator-text { display: flex; flex-direction: column; line-height: 1.15; }
.narrator-text b { font-family: var(--font-head); font-size: .8125rem; font-weight: 600; }
.narrator-text small { font-size: .6875rem; color: var(--muted); max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.text-size { display: inline-flex; gap: .1rem; padding: .2rem; border-radius: var(--r-full); background: var(--well); border: 1px solid var(--line); flex: none; }
.text-size button { min-width: 2rem; height: 2rem; padding: 0 .4rem; border-radius: var(--r-full); font-family: var(--font-head); font-weight: 600; font-size: .8125rem; color: var(--muted); transition: background-color .2s, color .2s; }
.text-size button sup { font-size: .6rem; }
.text-size button:hover { color: var(--ink); }
.text-size button.on { color: var(--accent-text); background: var(--accent-soft); }

.avatar-btn {
  display: grid; place-items: center;
  flex: 0 0 auto !important; aspect-ratio: 1 / 1 !important;
  width: 2.5rem; height: 2.5rem; min-width: 2.5rem; min-height: 2.5rem; max-width: 2.5rem; max-height: 2.5rem;
  border-radius: 50% !important; padding: 0 !important; border: 0 !important;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  color: var(--accent-ink); background: linear-gradient(145deg, #fbbf24, #f59e0b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), var(--shadow-sm);
  transition: transform .15s var(--ease);
}
.avatar-btn:hover { transform: scale(1.05); }
.avatar-btn svg { width: 1.15rem; height: 1.15rem; }

main { flex: 1; }
.screen { max-width: 1280px; margin: 0 auto; padding: 1.75rem var(--gutter) 9rem; }
.page { animation: page-in .35s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Page header used by Sources, Settings and Admin */
.screen-header { margin: .5rem 0 1.5rem; }
.screen-header .overline-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.screen-header .display { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem); }

/* =================================================================== TODAY */
.brief-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin: .25rem 0 1.5rem; }
.brief-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-bottom: .75rem; }
.brief-meta { margin-top: .6rem; font-size: 1.05rem; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; }
.brief-meta b { color: var(--accent-text); font-weight: 600; }
.brief-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.brief-voice { margin-top: .35rem; display: inline-flex; align-items: center; gap: .45rem; color: var(--info); font-weight: 500; font-size: .95rem; }
.brief-voice:empty { display: none; }
.brief-voice svg { width: 1.05rem; height: 1.05rem; }

/* Notices */
.notice-card { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.notice-card h3 { font-size: 1rem; }
.notice-card p { color: var(--muted); font-size: .875rem; margin-top: .2rem; }
.notice-card > .cat-tile { flex: none; }

/* Compact Notice Bar — slim and non-intrusive */
.notice-compact {
  display: flex; align-items: center; gap: .75rem;
  padding: .48rem .95rem; margin-bottom: 1rem; border-radius: var(--r-full);
  background: color-mix(in oklab, var(--well-strong) 80%, transparent);
  border: 1px solid var(--line);
  color: var(--ink-2); font-size: .8125rem;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: fadeIn .2s var(--ease);
}
.notice-compact .notice-badge {
  font-family: var(--font-head); font-size: .65rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .2rem .55rem; border-radius: var(--r-full);
  background: color-mix(in oklab, var(--accent) 18%, var(--well-strong));
  color: var(--accent); border: 1px solid var(--accent-line);
  flex: none;
}
.notice-compact .notice-text {
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: .8125rem;
}
.notice-compact .spinner {
  width: .9rem; height: .9rem; border-width: 1.5px; flex: none;
}

/* Hero player */
.hero {
  padding: 1.5rem; margin-bottom: 1.5rem; border-radius: var(--r-xl);
  background:
    radial-gradient(90% 70% at 100% 0%, var(--accent-soft), transparent 55%),
    var(--glass-strong);
  box-shadow: inset 0 1px 0 var(--rim), var(--shadow);
}
.hero.playing-now { border-color: var(--accent-line); }
.hero-top { display: flex; align-items: center; gap: 1.1rem; }
.hero-art {
  position: relative; flex: none; display: grid; place-items: center;
  width: 4.5rem; height: 4.5rem; border-radius: var(--r-lg); overflow: hidden;
  color: var(--accent-text); background: var(--well-strong); border: 1px solid var(--line);
}
.hero-art-icon { width: 1.9rem; height: 1.9rem; }
.hero-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-heading { flex: 1; min-width: 0; }
.hero-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: .45rem; }
.hero-title { font-size: clamp(1.2rem, 1rem + .9vw, 1.75rem); line-height: 1.22; letter-spacing: -.02em; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-top-actions { flex: none; align-self: flex-start; display: flex; align-items: center; gap: .5rem; }
.hero-article { flex: none; }

.narrator-pill-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .38rem .8rem; border-radius: var(--r-full);
  background: var(--well); border: 1px solid var(--line);
  color: var(--ink-2); font-family: var(--font-head); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .2s var(--ease);
}
.narrator-pill-btn svg { width: .9rem; height: .9rem; color: var(--accent-text); }
.narrator-pill-btn:hover { background: var(--well-strong); border-color: var(--accent-line); color: var(--ink); transform: translateY(-1px); }

.wave-panel {
  margin-top: 1.25rem; padding: 1.1rem 1.25rem 1.15rem; border-radius: var(--r-lg);
  background: var(--well); border: 1px solid var(--line);
}
.wave-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.times { display: inline-flex; align-items: baseline; gap: .45rem; font-family: var(--font-head); font-size: .875rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.times .t-cur { color: var(--info); }
.times .t-sep { color: var(--faint); }

.wave {
  position: relative; display: flex; align-items: center; gap: 2px;
  height: 2rem; padding: 0 .15rem;
  cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
  border-radius: var(--r-full);
}
.seg {
  position: relative; height: 5px; border-radius: var(--r-full);
  background: color-mix(in oklab, var(--line) 75%, transparent);
  border: none !important;
  overflow: hidden; transition: height .15s ease, background-color .15s;
}
.wave:hover .seg, .wave.dragging .seg { height: 8px; }
.seg > i {
  position: absolute; top: 0; bottom: 0; left: 0; width: 0%;
  background: linear-gradient(90deg, var(--c-ai) 0%, var(--accent) 100%);
  border-radius: inherit; box-shadow: 0 0 8px rgba(245, 158, 11, .4);
}
.seg-thumb {
  position: absolute; top: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: var(--accent); transform: translateY(-50%);
  box-shadow: 0 0 0 3px var(--bg), 0 0 12px rgba(245, 158, 11, .7);
  pointer-events: none; transition: left .1s linear; z-index: 2;
}
.wave.dragging .seg-thumb { transition: none; }
.wave-bars { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; pointer-events: none; }
.wave-bars i {
  flex: 1 1 0; min-width: 1px; height: calc(var(--h, .5) * 100%); border-radius: 2px;
  background: var(--wave-off); transition: background-color .25s var(--ease);
}
.wave-bars i.on { background: var(--wave); }
.wave-bars i.mark { background: transparent !important; }
.wave:hover .wave-bars i:not(.on) { background: color-mix(in oklab, var(--wave-off) 70%, var(--wave)); }

.hero-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.transport { display: flex; align-items: center; gap: .6rem; }
.speed-pills .seg-opt { min-height: 1.85rem; padding: 0 .75rem; font-size: .75rem; }

/* Integrated Read along in Hero */
.hero-transcript {
  margin-top: 1.15rem; padding: 1rem 1.25rem; border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--well) 75%, transparent);
  border: 1px solid var(--line);
  transition: border-color .2s, background-color .2s;
}
.hero-transcript:hover { border-color: var(--line-2); background: var(--well); }
.transcript-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .65rem; }
.transcript-live { display: inline-flex; align-items: center; gap: .55rem; }
.transcript-live .overline { color: var(--accent-text); font-size: .72rem; letter-spacing: .08em; }
.transcript-live .tiny { color: var(--muted); font-size: .75rem; }
.transcript-expand-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; padding: .25rem .6rem; min-height: 1.6rem;
  color: var(--muted); border-radius: var(--r-full);
}
.transcript-expand-btn:hover { color: var(--ink); }
.transcript-expand-btn svg { width: .75rem; height: .75rem; transition: transform .2s ease; }
.hero-transcript.expanded .transcript-expand-btn svg { transform: rotate(180deg); }
.transcript-body {
  max-height: 11.5rem; overflow-y: auto; scroll-behavior: smooth;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
  padding-right: .25rem;
}
.transcript-body::-webkit-scrollbar { width: 5px; }
.transcript-body::-webkit-scrollbar-track { background: transparent; }
.transcript-body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 9999px; }
.transcript-body::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.hero-transcript.expanded .transcript-body { max-height: none; overflow-y: visible; padding-right: 0; }
.transcript-text { font-size: 1.0625rem; line-height: 1.7; color: var(--faint); font-weight: 450; }
.transcript-text .w {
  transition: color .2s var(--ease), background-color .2s var(--ease);
  cursor: pointer; border-radius: 4px; padding: 1px 2px;
}
.transcript-text .w:hover { color: var(--ink); background: var(--well-strong); }
.transcript-text .w.done { color: var(--ink); }
.transcript-text .w.now {
  color: var(--accent-text); font-weight: 600;
  text-shadow: 0 0 16px var(--accent-soft); background: var(--accent-soft);
}

/* Narrator persona modal sheet & cards */
.persona-sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.persona {
  position: relative; display: flex; align-items: center; gap: .75rem; min-width: 0; width: 100%;
  padding: .85rem .95rem; border-radius: var(--r-lg); text-align: left;
  background: var(--well); border: 1px solid var(--line);
  transition: border-color .2s, background-color .2s, transform .15s var(--ease);
}
.persona:hover { border-color: var(--line-2); background: var(--well-strong); transform: translateY(-1px); }
.persona:active { transform: scale(.98); }
.persona.on {
  border-color: transparent;
  background:
    linear-gradient(var(--glass-strong), var(--glass-strong)) padding-box,
    linear-gradient(120deg, var(--accent), color-mix(in oklab, var(--c-ai) 80%, transparent)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 8px 24px -14px rgba(245, 158, 11, .6);
}
.persona.busy { opacity: .7; pointer-events: none; }
.persona-avatar { display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: var(--r); color: var(--ink-2); background: var(--well-strong); }
.persona-avatar svg { width: 1.25rem; height: 1.25rem; }
.persona.on .persona-avatar { color: var(--accent-ink); background: var(--accent); }
.persona-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.persona-name { font-family: var(--font-head); font-weight: 600; font-size: .95rem; }
.persona-desc { font-size: .75rem; color: var(--muted); }
.persona-status { font-family: var(--font-head); font-size: .72rem; font-weight: 600; color: var(--muted); padding: .2rem .55rem; border-radius: var(--r-full); background: var(--well-strong); }
.persona.on .persona-status { color: var(--accent-text); background: var(--accent-soft); }

/* Two-column body */
.today-cols { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.75rem; align-items: start; }
.col-side { display: grid; gap: 1.1rem; position: sticky; top: calc(var(--topbar-h) + 1.25rem); }

.list-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.list-head h2 { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.35rem; }
.list-head h2 svg { color: var(--accent-text); width: 1.35rem; height: 1.35rem; }
.list-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.section-block + .section-block { margin-top: 1.5rem; }
.section-head {
  display: flex; align-items: center; gap: .65rem; width: 100%; margin: 0 0 .65rem; padding: .25rem .25rem;
  text-align: left; border-radius: var(--r-sm);
}
.section-head .num { font-family: var(--font-head); font-size: .75rem; font-weight: 700; color: var(--faint); letter-spacing: .04em; }
.section-head .overline { color: var(--ink); font-size: .75rem; }
.section-head .count { color: var(--faint); font-size: .75rem; }
.section-head .play-section { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; font-family: var(--font-head); font-weight: 600; font-size: .75rem; color: var(--muted); padding: .3rem .6rem; border-radius: var(--r-full); transition: color .2s, background-color .2s; }
.section-head .play-section svg { width: .85rem; height: .85rem; }
.section-head:hover .play-section { color: var(--accent-text); background: var(--accent-soft); }
.section-head .here { display: inline-flex; align-items: center; gap: .35rem; color: var(--accent-text); }
.section-list { display: grid; gap: .65rem; }

/* Story card */
.story-row {
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--rim);
  transition: border-color .25s var(--ease), background-color .25s, box-shadow .25s var(--ease), transform .2s var(--ease);
  content-visibility: auto; contain-intrinsic-size: auto 6.5rem;
}
.story-row:hover { border-color: var(--line-2); box-shadow: inset 0 1px 0 var(--rim), var(--shadow-sm); }
.story-row.current { border-color: var(--accent-line); background: linear-gradient(90deg, var(--accent-soft), transparent 55%), var(--glass); }
.story-main { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; cursor: pointer; }
.story-tile { position: relative; }
.story-tile .eq { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; height: auto; color: var(--accent-text); }
.story-tile .eq i { height: 40%; }
.story-row.current .story-tile svg { opacity: 0; }
.story-row.current .story-tile .eq { display: inline-flex; }
.story-row.current .story-tile { --cat: var(--accent); }
.story-text { flex: 1; min-width: 0; }
.story-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-bottom: .35rem; color: var(--muted); font-size: .75rem; }
.story-meta .dur { display: inline-flex; align-items: center; gap: .25rem; font-family: var(--font-head); font-weight: 600; }
.story-meta .dur svg { width: .85rem; height: .85rem; }
.story-text h3 { font-size: 1.05rem; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; }
.story-snippet { margin-top: .3rem; color: var(--muted); font-size: .875rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.story-thumb { width: 4.25rem; height: 4.25rem; border-radius: var(--r); object-fit: cover; flex: none; border: 1px solid var(--line); }
.play-dot {
  display: inline-flex; align-items: center; gap: .4rem; flex: none;
  min-height: 2.15rem; padding: 0 .85rem 0 .7rem; border-radius: var(--r-full);
  font-family: var(--font-head); font-weight: 600; font-size: .75rem; color: var(--info);
  background: var(--info-soft); border: 1px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
}
.play-dot svg { width: .95rem; height: .95rem; }
.play-dot .i-pause { display: none; }
.play-dot:hover { border-color: color-mix(in oklab, var(--info) 35%, transparent); }
.story-row.playing-now .play-dot { color: var(--accent-ink); background: var(--accent); }
.story-row.playing-now .play-dot .i-play { display: none; }
.story-row.playing-now .play-dot .i-pause { display: block; }

.story-detail { padding: 0 1.1rem 1.1rem calc(1.1rem + 2.5rem + 1rem); }
.story-detail .summary { color: var(--ink-2); font-size: .9375rem; line-height: 1.65; }
.story-detail .also { color: var(--muted); font-size: .8125rem; margin-top: .5rem; }
.story-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.report-row { display: inline-flex; align-items: center; gap: .4rem; margin-top: .75rem; color: var(--faint); font-size: .8125rem; padding: .2rem; border-radius: var(--r-xs); transition: color .2s; }
.report-row svg { width: .9rem; height: .9rem; }
.report-row:hover { color: var(--err); }

.search-empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.search-empty h3 { color: var(--ink); font-size: 1.05rem; margin-bottom: .3rem; }
mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 .1em; }

.empty { padding: 2.5rem 1.5rem; text-align: center; border-radius: var(--r-lg); border: 1px dashed var(--line-2); color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 1.1rem; margin-bottom: .35rem; }

.skeleton { height: 6rem; border-radius: var(--r-lg); margin-bottom: .65rem; background: linear-gradient(90deg, var(--well) 0%, var(--well-strong) 50%, var(--well) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.spinner { width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Side cards */
.side-card { padding: 1.2rem 1.25rem; }
.side-card-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.side-card-head h3 { font-size: 1rem; flex: 1; }
.side-card-head .live-dot { box-shadow: 0 0 0 3px var(--info-soft); }
.next-time { font-family: var(--font-head); font-weight: 700; font-size: 1.85rem; letter-spacing: -.02em; color: var(--accent-text); line-height: 1.1; }
.next-time small { font-size: .9rem; font-weight: 600; color: var(--muted); margin-left: .35rem; letter-spacing: 0; }
.side-card p.hint { margin-top: .45rem; }
.side-toggle { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; padding: .75rem .85rem; border-radius: var(--r); background: var(--well); border: 1px solid var(--line); cursor: pointer; }
.side-toggle svg { color: var(--accent-text); width: 1.15rem; height: 1.15rem; }
.side-toggle span { flex: 1; font-family: var(--font-head); font-weight: 600; font-size: .8125rem; }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .85rem; font-size: .75rem; color: var(--muted); font-family: var(--font-head); }
.side-foot > span { display: inline-flex; align-items: center; gap: .35rem; }
.side-foot svg { width: .85rem; height: .85rem; }

.archive-list { display: grid; gap: .3rem; }
.archive-list .dchip { justify-content: space-between; width: 100%; min-height: 2.4rem; border-radius: var(--r); padding: 0 .85rem; background: transparent; border-color: transparent; font-size: .875rem; }
.archive-list .dchip:hover { background: var(--well); }
.archive-list .dchip.active { background: var(--accent-soft); border-color: var(--accent-line); }
.archive-list .dchip small { color: var(--faint); font-size: .72rem; font-family: var(--font-head); }
.archive-list .dchip.active small { color: var(--accent-text); }

.lineup-list { display: grid; gap: .6rem; }
.lineup-item { display: grid; grid-template-columns: 1fr auto; gap: .3rem .75rem; align-items: center; font-size: .8125rem; }
.lineup-item b { font-weight: 600; }
.lineup-item span { font-family: var(--font-head); font-weight: 600; color: var(--muted); font-size: .75rem; }
.lineup-item .bar { grid-column: 1 / -1; height: .25rem; border-radius: var(--r-full); background: var(--wave-off); overflow: hidden; }
.lineup-item .bar i { display: block; height: 100%; border-radius: inherit; background: var(--cat, var(--accent)); opacity: .85; }
.lineup-item.off b, .lineup-item.off span { color: var(--faint); }

/* ============================================================= MINI PLAYER */
.mini-player {
  position: fixed; z-index: 40;
  left: calc(var(--sidebar-w) + (100vw - var(--sidebar-w)) / 2); bottom: 1.25rem;
  width: min(44rem, calc(100vw - var(--sidebar-w) - 2 * var(--gutter)));
  display: flex; align-items: center; gap: .9rem; padding: .6rem .7rem .6rem .6rem;
  border-radius: var(--r-xl);
  background: var(--glass-strong); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 var(--rim), var(--shadow-lg);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  transform: translate(-50%, calc(100% + 2rem)); opacity: 0; pointer-events: none;
  transition: transform .35s var(--ease), opacity .3s var(--ease);
  cursor: pointer;
}
.mini-player.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
body.playing .mini-player { border-color: var(--accent-line); }
.mini-art {
  position: relative; display: grid; place-items: center;
  flex: 0 0 auto !important; aspect-ratio: 1 / 1 !important;
  width: 2.75rem; height: 2.75rem; min-width: 2.75rem; min-height: 2.75rem;
  border-radius: var(--r); overflow: hidden; background: var(--well-strong);
}
.mini-cover { width: 100%; height: 100%; object-fit: cover; }
.mini-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 1.1rem; color: var(--info); }
.mini-eq i { width: 3px; height: 50%; border-radius: 2px; background: currentColor; }
.mini-eq i:nth-child(2) { height: 90%; }
body.playing .mini-eq { color: var(--accent); }
body.playing .mini-eq i { animation: eq 1s ease-in-out infinite; }
body.playing .mini-eq i:nth-child(2) { animation-delay: -.4s; } body.playing .mini-eq i:nth-child(3) { animation-delay: -.7s; }
.mini-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.mini-title { font-family: var(--font-head); font-weight: 600; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.mini-bar {
  position: relative; height: 4px; margin-top: .35rem; border-radius: var(--r-full);
  background: color-mix(in oklab, var(--line) 75%, transparent); overflow: hidden;
}
.mini-bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--c-ai) 0%, var(--accent) 100%);
  border-radius: inherit; box-shadow: 0 0 8px rgba(245, 158, 11, .4);
  transition: width .1s linear;
}
.mini-controls { display: flex; align-items: center; gap: .45rem; flex: 0 0 auto !important; }

/* ================================================================ SAVE BAR */
.save-bar {
  position: fixed; z-index: 45;
  left: calc(var(--sidebar-w) + (100vw - var(--sidebar-w)) / 2); bottom: 1.25rem; transform: translateX(-50%);
  display: flex; align-items: center; gap: .9rem; padding: .5rem .55rem .5rem 1.1rem;
  border-radius: var(--r-full); background: var(--glass-strong); border: 1px solid var(--accent-line);
  box-shadow: inset 0 1px 0 var(--rim), var(--shadow-lg);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  animation: rise .3s var(--ease);
}
.save-label { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-head); font-weight: 600; font-size: .875rem; white-space: nowrap; }
.save-label .live-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 1rem); } to { opacity: 1; transform: translate(-50%, 0); } }
body:has(.save-bar:not(.hidden)) .mini-player { bottom: 5.25rem; }

/* =================================================================== TOAST */
.toast {
  position: fixed; z-index: 120; left: 50%; top: 1.25rem; transform: translate(-50%, -150%);
  display: flex; align-items: center; gap: .65rem; max-width: min(32rem, calc(100vw - 2rem));
  padding: .75rem 1.1rem; border-radius: var(--r-full);
  background: var(--glass-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
  font-size: .875rem; font-weight: 500; opacity: 0; pointer-events: none;
  transition: transform .35s var(--ease), opacity .3s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--info); flex: none; }
.toast-success .toast-dot { background: var(--ok); }
.toast-error { border-color: color-mix(in oklab, var(--err) 40%, transparent); }
.toast-error .toast-dot { background: var(--err); }

/* ================================================================== SHEETS */
dialog.sheet {
  width: min(32rem, calc(100vw - 2rem)); max-height: min(90dvh, 46rem); padding: 0;
  border-radius: var(--r-xl); color: var(--ink);
  background: var(--glass-solid); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in oklab, var(--wave) 14%, transparent);
  overflow: hidden;
}
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-in .3s var(--ease); }
dialog.sheet > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
dialog.sheet::backdrop { background: rgba(5, 8, 14, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.35rem 1.5rem .5rem; }
.sheet-head h2 { font-size: 1.3rem; }
.sheet-body { padding: .5rem 1.5rem 1rem; overflow-y: auto; flex: 1; }
.sheet-foot { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.5rem 1.35rem; border-top: 1px solid var(--line); }
.step-dots { display: flex; gap: .35rem; }
.step-dots span { width: .5rem; height: .5rem; border-radius: var(--r-full); background: var(--line-2); transition: width .25s var(--ease), background-color .25s; }
.step-dots span.on { width: 1.4rem; background: var(--accent); }
.form-error { color: var(--err); font-size: .875rem; margin-top: .6rem; }
.form-error:empty { display: none; }
.first-brief { display: flex; gap: 1rem; align-items: center; padding: 1.1rem; border-radius: var(--r-lg); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.first-brief > div { display: flex; flex-direction: column; gap: .15rem; }
.first-brief-label { font-family: var(--font-head); font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.first-brief-when { font-family: var(--font-head); font-size: 1.25rem; }
.first-brief-what { color: var(--muted); font-size: .875rem; }
.install-list { margin: 0; padding-left: 1.25rem; display: grid; gap: .75rem; color: var(--ink-2); }
.inline-icon { width: 1rem; height: 1rem; vertical-align: -.15em; }
.danger-box { padding: 1rem 1.1rem; border-radius: var(--r); background: var(--err-soft); border: 1px solid color-mix(in oklab, var(--err) 30%, transparent); font-size: .9rem; color: var(--ink-2); margin-bottom: .9rem; }
.danger-box strong { color: var(--err); }
.danger-box ul { margin: .5rem 0 0; padding-left: 1.2rem; display: grid; gap: .25rem; }

/* ================================================================= SOURCES */
.summary-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.25rem; }
.stat { padding: 1rem 1.15rem; }
.stat .overline { font-size: .625rem; }
.stat b { display: block; margin-top: .3rem; font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.stat b small { font-size: .85rem; color: var(--muted); font-weight: 600; margin-left: .2rem; letter-spacing: 0; }
.sources-layout { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.5rem; align-items: start; }
.sources-layout > aside { position: sticky; top: calc(var(--topbar-h) + 1.25rem); display: grid; gap: 1rem; }
.topics { padding: .35rem; display: grid; gap: .1rem; }
.topic-card { border-radius: var(--r); transition: background-color .2s, box-shadow .2s, opacity .2s; }
.topic-card:hover { background: var(--well); }
.topic-card.dragging { opacity: .5; }
.topic-card.drag-over-top { box-shadow: inset 0 2px 0 var(--accent); }
.topic-card.drag-over-bottom { box-shadow: inset 0 -2px 0 var(--accent); }
.topic-head { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem .7rem .4rem; }
.drag-handle {
  display: grid; place-items: center; width: 1.6rem; height: 2.25rem;
  color: var(--faint); cursor: grab; border-radius: var(--r-xs); flex: 0 0 auto !important;
}
.drag-handle:hover { color: var(--ink-2); background: var(--well-strong); }
.drag-handle:active { cursor: grabbing; }
.drag-handle svg { width: 1.05rem; height: 1.05rem; }
.topic-toggle { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; text-align: left; padding: .15rem 0; }
.topic-toggle:disabled { cursor: default; opacity: 1; }
.topic-title { font-family: var(--font-head); font-weight: 600; font-size: 1rem; }
.topic-summary { color: var(--muted); font-size: .8125rem; }
.topic-card.off .topic-title { color: var(--muted); }
.topic-card.off .cat-tile { filter: grayscale(1); opacity: .6; }
.topic-expand {
  display: grid; place-items: center;
  flex: 0 0 auto !important; aspect-ratio: 1 / 1 !important;
  width: 2rem; height: 2rem; min-width: 2rem; min-height: 2rem;
  border-radius: 50% !important; padding: 0 !important;
  color: var(--muted);
}
.topic-expand:hover { background: var(--well-strong); color: var(--ink); }
.topic-expand .caret.open { transform: rotate(0); }
.topic-body { padding: 0 .5rem .6rem 3.4rem; }
.topic-body .hairline { margin: 0 0 .25rem; }
.topic-body .list-row { padding-left: .6rem; padding-right: .6rem; border-radius: var(--r-sm); }
.source-row { display: flex; align-items: center; gap: .85rem; padding: .65rem .6rem; border-radius: var(--r-sm); cursor: pointer; transition: background-color .2s; }
.source-row:hover { background: var(--well-strong); }
.source-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.source-name { font-weight: 600; font-size: .9rem; }
.picks-section { margin-bottom: 1.5rem; }
.picks-section .add-field { margin: .5rem 0 .75rem; }

/* ================================================================ SETTINGS */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.settings-grid .span-2 { grid-column: 1 / -1; }
.settings-col { display: grid; gap: 1.25rem; align-content: start; }
.voice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; padding: .25rem 0 .75rem; }
.voice-list .persona { padding: .7rem; }
.appearance-rows { display: grid; gap: 1rem; padding: .25rem 0 .5rem; }
.appearance-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.appearance-row > div { display: flex; flex-direction: column; gap: .1rem; }
.appearance-row b { font-weight: 600; font-size: .9375rem; }
.push-test-row { padding: 0 1.25rem .75rem; }
#pushHint:empty { display: none; }
#pushHint { padding: 0 1.25rem .75rem; }
.suggest-callout-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: .5rem 0 .25rem; padding: 1rem 1.1rem; border-radius: var(--r); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.suggest-callout-text { display: flex; flex-direction: column; gap: .15rem; }
.suggest-title { font-family: var(--font-head); font-weight: 600; font-size: .9375rem; }
.suggest-sub { color: var(--muted); font-size: .8125rem; }
.account-row { display: flex; align-items: center; gap: .9rem; padding: .25rem 0 1rem; }
.account-avatar { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--accent-ink); background: linear-gradient(145deg, #fbbf24, #f59e0b); flex: none; }
.account-row b { display: block; font-weight: 600; word-break: break-all; }
.account-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.btn-danger-ghost { color: var(--err); border-color: color-mix(in oklab, var(--err) 30%, transparent); background: transparent; }
.btn-danger-ghost:hover { background: var(--err-soft); border-color: color-mix(in oklab, var(--err) 45%, transparent); }
.legal-row { display: flex; justify-content: center; gap: 1.25rem; margin-top: 2rem; font-size: .8125rem; }
.legal-row a { color: var(--muted); }

/* =================================================================== ADMIN */
.progress-bar { width: 8rem; height: .35rem; border-radius: var(--r-full); background: var(--wave-off); overflow: hidden; flex: none; }
.progress-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .4s var(--ease); }
.admin-actions { padding: .9rem 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.glass-group > .chips { padding: .9rem 1.25rem; }
.run-log { padding: .5rem 1.25rem 1rem; display: grid; gap: .6rem; max-height: 28rem; overflow-y: auto; }
.run-log-day { font-family: var(--font-head); font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-top: .5rem; }
.run-log-entry { padding: .75rem .9rem; border-radius: var(--r); background: var(--well); border: 1px solid var(--line); }
.run-log-head { display: flex; align-items: center; gap: .55rem; }
.run-log-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--faint); flex: none; }
.run-log-dot.ok, .run-log-dot.done, .run-log-dot.success { background: var(--ok); }
.run-log-dot.error, .run-log-dot.failed { background: var(--err); }
.run-log-dot.warn, .run-log-dot.partial { background: var(--accent); }
.run-log-title { flex: 1; font-weight: 600; font-size: .875rem; }
.run-log-time { color: var(--faint); font-size: .75rem; white-space: nowrap; }
.run-log-body { color: var(--muted); font-size: .8125rem; margin-top: .3rem; }
.run-log-meta { margin-top: .4rem; }
.run-log-badge { display: inline-block; font-size: .72rem; padding: .15rem .5rem; border-radius: var(--r-xs); background: var(--well-strong); color: var(--muted); }
.run-log-voices { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.run-log-voices span { font-size: .72rem; padding: .15rem .5rem; border-radius: var(--r-full); background: var(--ok-soft); color: var(--ok); }
.run-log-voices span.bad { background: var(--err-soft); color: var(--err); }
.diag-entry { padding: .85rem 1.25rem; }
.diag-head { display: flex; align-items: center; gap: .55rem; }
.diag-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--err); flex: none; }
.diag-ctx { flex: 1; font-weight: 600; font-size: .85rem; }
.diag-time { color: var(--faint); font-size: .75rem; }
.diag-msg { color: var(--ink-2); font-size: .8125rem; margin-top: .3rem; word-break: break-word; }
.diag-stack-wrap summary { cursor: pointer; color: var(--muted); font-size: .75rem; margin-top: .4rem; }
.diag-stack { font-size: .7rem; color: var(--muted); white-space: pre-wrap; word-break: break-all; padding: .6rem; border-radius: var(--r-sm); background: var(--well-strong); max-height: 12rem; overflow: auto; }

/* Voice Studio in Admin Page */
.narrators-admin-list { display: grid; gap: .6rem; padding: 1rem 1.25rem; }
.narrator-item {
  display: flex; align-items: center; gap: .85rem; padding: .75rem .95rem;
  border-radius: var(--r); background: var(--well); border: 1px solid var(--line);
  transition: border-color .2s, background-color .2s;
}
.narrator-item:hover { border-color: var(--line-2); background: var(--well-strong); }
.narrator-avatar {
  display: grid; place-items: center; width: 2.3rem; height: 2.3rem;
  border-radius: var(--r); background: var(--well-strong); color: var(--accent-text);
  flex: none;
}
.narrator-avatar svg { width: 1.15rem; height: 1.15rem; }
.narrator-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.narrator-title-row { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.narrator-name { font-weight: 600; font-size: .95rem; font-family: var(--font-head); }
.narrator-meta { font-size: .75rem; color: var(--muted); }
.narrator-actions { display: flex; align-items: center; gap: .45rem; flex: none; }
.add-voice-form { padding: 1.15rem 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.form-title { font-size: 1.05rem; font-family: var(--font-head); font-weight: 600; margin-bottom: .25rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .85rem; }
.form-grid label { display: flex; flex-direction: column; gap: .3rem; font-size: .75rem; color: var(--muted); font-weight: 500; }
.audio-dropzone {
  display: flex; align-items: center; gap: .85rem; padding: 1rem 1.15rem;
  border-radius: var(--r); border: 2px dashed var(--line-2); background: var(--well);
  cursor: pointer; transition: border-color .2s, background-color .2s;
}
.audio-dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.audio-dropzone svg { width: 1.6rem; height: 1.6rem; color: var(--accent-text); flex: none; }
.dropzone-text b { display: block; font-size: .875rem; font-weight: 600; }
.dropzone-text small { display: block; font-size: .75rem; color: var(--muted); }
.file-input-hidden { display: none; }
.audio-status-badge {
  font-size: .75rem; padding: .45rem .85rem; border-radius: var(--r-sm);
  background: var(--well-strong); color: var(--ink-2);
}
.audio-status-badge.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok); }
.audio-status-badge.warn { background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent); }
.audio-status-badge.err { background: var(--err-soft); color: var(--err); border: 1px solid var(--err); }
.audio-status-badge.busy { background: var(--well-strong); color: var(--muted); }
.audio-preview-player { width: 100%; height: 2.2rem; border-radius: var(--r-sm); margin-top: .25rem; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; margin-top: .5rem; }

/* ================================================================= LANDING */
.landing { min-height: 100dvh; }
.landing-shell { max-width: 1200px; margin: 0 auto; padding: 1.25rem var(--gutter) 3rem; }
.landing-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0 1rem; }
.landing-bar .brand { padding: 0; }
.landing-main { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; padding: 3rem 0 2.5rem; }
.landing-welcome .badge { margin-bottom: 1.25rem; padding: .35rem .7rem; border-radius: var(--r-full); }
.landing-title { font-size: clamp(2.3rem, 1.5rem + 3vw, 3.75rem); line-height: 1.04; font-weight: 700; letter-spacing: -.035em; }
.landing-lead { margin-top: 1.25rem; font-size: 1.15rem; line-height: 1.6; color: var(--ink-2); max-width: 34rem; }
.landing-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .7rem; }
.landing-points li { display: flex; align-items: center; gap: .7rem; color: var(--ink-2); }
.landing-points svg { width: 1.35rem; height: 1.35rem; padding: .2rem; border-radius: 50%; color: var(--accent-text); background: var(--accent-soft); }
.landing-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.25rem; margin-top: 2rem; }
.preview-heading { margin-bottom: 1rem; }
.preview-heading h2 { font-size: 1.4rem; margin-top: .3rem; }
.hero-sample { margin-bottom: 0; }

/* Voice chips: try a narrator before signing in */
.voice-picker { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 .25rem; transition: opacity .2s; }
.voice-picker.busy { opacity: .55; pointer-events: none; }
.voice-chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem;
  border-radius: var(--r-full); border: 1px solid var(--line-2); background: var(--well);
  color: var(--ink-2); font: inherit; font-size: .8125rem; font-weight: 500; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease);
}
.voice-chip svg { width: .95rem; height: .95rem; color: var(--accent-text); }
.voice-chip:hover { background: var(--well-strong); border-color: var(--accent-line); transform: translateY(-1px); }
.voice-chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.voice-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Past the free preview: visible, but dimmed */
.seg.locked { opacity: .4; }
.story-row.locked .story-text h3,
.story-row.locked .story-thumb { opacity: .6; }
.story-row.locked .story-meta::after { content: ' \00b7  Sign in to listen'; color: var(--accent-text); font-weight: 600; }

.sample-gate {
  display: grid; justify-items: start; gap: .5rem; margin-top: 1rem; padding: 1.1rem 1.2rem;
  border-radius: var(--r-lg); background: var(--accent-soft); border: 1px solid var(--accent-line);
  animation: sheet-in .3s var(--ease);
}
.sample-gate b { font-family: var(--font-head); font-size: 1.05rem; }
.sample-gate p { margin: 0; color: var(--ink-2); font-size: .9rem; }
.sample-gate .pill-btn { margin-top: .35rem; }
.sample-gate .link-btn { font-size: .8125rem; }
@media (prefers-reduced-motion: reduce) { .sample-gate { animation: none; } .voice-chip { transition: none; } }
.landing-next { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.landing-steps { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.landing-steps li { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); }
.landing-steps li > span { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--accent-text); }
.landing-steps b { display: block; font-family: var(--font-head); font-weight: 600; }
.landing-steps small { color: var(--muted); font-size: .8125rem; }
.sample-stories { margin-top: 1.5rem; padding: 0; overflow: hidden; }
.sample-stories summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; cursor: pointer; list-style: none; font-family: var(--font-head); font-weight: 600; }
.sample-stories summary::-webkit-details-marker { display: none; }
.sample-stories summary svg { transition: transform .25s var(--ease); color: var(--muted); }
.sample-stories[open] summary svg { transform: rotate(180deg); }
#sampleStories { padding: 0 1.1rem 1.1rem; display: grid; gap: 1.25rem; }

.signin { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1rem; background: rgba(5, 8, 14, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.login-card { position: relative; width: min(26rem, 100%); padding: 2rem 1.75rem 1.75rem; border-radius: var(--r-xl); background: var(--glass-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); text-align: center; animation: sheet-in .3s var(--ease); }
.login-mark { margin: 0 auto 1rem; }
.login-card h1 { font-size: 1.5rem; letter-spacing: -.02em; }
.login-intro { margin-top: .5rem; color: var(--muted); font-size: .9rem; }
.signin-close { position: absolute; top: .9rem; right: .9rem; }
.login-form { display: grid; gap: .65rem; margin-top: 1.5rem; }
.login-form .login-form { margin-top: .25rem; }
.sent-waiting { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; padding: .85rem; border-radius: var(--r); background: var(--well); color: var(--muted); font-size: .875rem; }
.sent-actions { display: flex; justify-content: center; align-items: center; gap: .4rem; color: var(--faint); }
.error { margin-top: 1rem; color: var(--err); font-size: .875rem; }

/* ============================================================== RESPONSIVE */
@media (max-width: 1280px) {
  .persona-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .narrator-text small { display: none; }
}

@media (max-width: 1180px) {
  .today-cols { grid-template-columns: 1fr; }
  .col-side { position: static; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
  .sources-layout { grid-template-columns: 1fr; }
  .sources-layout > aside { position: static; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
  .text-size { display: none; }
}

/* Tablet: the sidebar folds to an icon rail. */
@media (max-width: 1024px) {
  :root { --sidebar-w: 84px; --gutter: 1.5rem; }
  .sidebar { padding: 1.25rem .75rem; align-items: center; }
  .sidebar .brand-name, .live-card, .sidebar-foot, .tab > span { display: none; }
  .tab { justify-content: center; width: 3rem; height: 3rem; padding: 0; }
  .tab.active::before { left: -.75rem; }
  .tab svg { width: 1.3rem; height: 1.3rem; }
  .tabbar { align-items: center; }
  .status-chip { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .landing-main { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 1.5rem; }
}

/* Phone: a single column with a bottom tab bar. */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; --gutter: 1rem; --topbar-h: 56px; }
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; padding: 0; border: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .sidebar > :not(.tabbar) { display: none; }
  .tabbar {
    position: fixed; z-index: 35; left: 0; right: 0; bottom: 0;
    flex-direction: row; justify-content: space-around; gap: 0;
    padding: .4rem .5rem calc(.4rem + env(safe-area-inset-bottom));
    background: color-mix(in oklab, var(--bg) 82%, transparent); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  }
  .tab { flex-direction: column; gap: .2rem; width: auto; flex: 1; height: auto; min-height: 3.1rem; padding: .3rem 0; font-size: .6875rem; border-radius: var(--r); }
  .tab > span { display: block; }
  .tab .tab-long { display: none; }
  .tab.active { background: transparent; }
  .tab.active::before { left: 30%; right: 30%; top: 0; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  
  .topbar { gap: .4rem; padding: .45rem var(--gutter); }
  .topbar .spacer { display: none; }
  .brand-compact { display: inline-flex; }
  .brand-compact img { flex: 0 0 auto !important; aspect-ratio: 1 / 1 !important; }
  .greeting { font-size: .88rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .greeting svg { display: none; }
  .search { display: none !important; }
  .narrator-chip {
    width: 2.15rem !important; height: 2.15rem !important;
    min-width: 2.15rem !important; min-height: 2.15rem !important;
    max-width: 2.15rem !important; max-height: 2.15rem !important;
    aspect-ratio: 1 / 1 !important; flex: 0 0 auto !important;
    border-radius: 50% !important; padding: 0 !important;
    display: inline-flex; justify-content: center; align-items: center;
  }
  .narrator-text { display: none; }
  .icon-btn, .avatar-btn {
    width: 2.15rem !important; height: 2.15rem !important;
    min-width: 2.15rem !important; min-height: 2.15rem !important;
    max-width: 2.15rem !important; max-height: 2.15rem !important;
    aspect-ratio: 1 / 1 !important; flex: 0 0 auto !important;
    border-radius: 50% !important; padding: 0 !important;
  }
  
  .screen { padding: .85rem var(--gutter) 8.5rem; }
  
  /* Brief header on phone — compact, eliminate dead wasted space */
  .brief-head { margin: 0 0 .5rem; padding: 0; }
  .brief-badges { margin-bottom: .2rem; gap: .4rem; }
  .brief-head-text h1.display { display: none; }
  .brief-meta { font-size: .8125rem; margin-top: .15rem; color: var(--muted); gap: .25rem .5rem; }
  .freshness-tag { font-size: .72rem; padding: .2rem .65rem; }
  
  /* Screen headers on phone (Sources, Settings, Admin) — compact, zero dead space */
  .screen-header { margin: 0 0 .75rem; }
  .screen-header .overline-row { margin-bottom: .2rem; gap: .4rem; }
  .screen-header .display { font-size: 1.35rem; font-weight: 700; line-height: 1.2; margin: 0 0 .2rem; }
  .screen-header .subtitle { font-size: .8125rem; margin-top: .15rem; color: var(--muted); }
  .screen-header + .section-label { margin-top: .75rem; }
  .section-label { margin: 1.15rem .25rem .45rem; }
  .section-label-text .overline { font-size: .72rem; }
  .section-label-text .meta { font-size: .75rem; margin-top: .15rem; }
  
  .list-row { padding: .65rem .85rem; min-height: 3.1rem; gap: .75rem; }
  .hairline { margin: 0 .85rem; }
  .glass-group > .hint { padding: .4rem .85rem .6rem; }
  
  .notice-compact { margin-bottom: .65rem; padding: .4rem .75rem; font-size: .78rem; }
  
  /* Hero player card on phone — sleek, clean, modern */
  .hero { padding: .95rem .95rem 1.05rem; border-radius: var(--r-xl); margin-bottom: 1rem; }
  .hero-top { align-items: center; gap: .75rem; }
  .hero-art { width: 3.1rem; height: 3.1rem; min-width: 3.1rem; min-height: 3.1rem; border-radius: var(--r); }
  .hero-art-icon { width: 1.4rem; height: 1.4rem; }
  .hero-title { font-size: 1.0625rem; line-height: 1.25; font-weight: 600; }
  .hero-article { display: none; }
  .hero-top-actions { margin-left: auto; }
  .narrator-pill-btn { padding: .28rem .65rem; font-size: .75rem; }
  
  .wave-panel { padding: .75rem .85rem; margin-top: .75rem; border-radius: var(--r); }
  .wave-head { margin-bottom: .45rem; }
  .wave { height: 1.75rem; gap: 2px; }
  .seg { height: 5px; }
  
  /* Modern centered uncompressed controls on phone */
  .hero-controls {
    display: flex; flex-direction: column; align-items: center;
    gap: .75rem; margin-top: .85rem; width: 100%;
  }
  .transport {
    display: flex; align-items: center; justify-content: center;
    gap: .75rem; width: 100%;
  }
  /* Rock-solid circular geometry on phone — NEVER compressed into an oval */
  .ink-circle:not(.sm) {
    width: 3.6rem !important; height: 3.6rem !important;
    min-width: 3.6rem !important; min-height: 3.6rem !important;
    max-width: 3.6rem !important; max-height: 3.6rem !important;
    aspect-ratio: 1 / 1 !important; border-radius: 50% !important;
    border: none !important; padding: 0 !important; flex: 0 0 auto !important;
  }
  .ink-circle:not(.sm) svg { width: 1.5rem; height: 1.5rem; }
  .skip-btn:not(.sm) {
    width: 2.5rem !important; height: 2.5rem !important;
    min-width: 2.5rem !important; min-height: 2.5rem !important;
    max-width: 2.5rem !important; max-height: 2.5rem !important;
    aspect-ratio: 1 / 1 !important; border-radius: 50% !important;
    padding: 0 !important; flex: 0 0 auto !important;
  }
  .skip-btn:not(.sm) svg { width: 1.15rem; height: 1.15rem; }
  .speed-pills { display: inline-flex; align-items: center; justify-content: center; }
  .speed-pills .seg-opt { min-height: 1.65rem; padding: 0 .65rem; font-size: .72rem; }
  
  /* Integrated live Read Along */
  .hero-transcript { margin-top: .75rem; padding: .75rem .85rem; border-radius: var(--r); }
  .transcript-head { margin-bottom: .45rem; }
  .transcript-body { max-height: 9rem; }
  .hero-transcript.expanded .transcript-body { max-height: none; }
  .transcript-text { font-size: .95rem; line-height: 1.55; }
  
  /* Today's story list on phone */
  .today-cols { margin-top: .25rem; }
  .list-head { margin-bottom: .65rem; }
  .list-head h2 { font-size: 1.15rem; }
  .list-actions .pill-btn span { display: none; }
  .story-main { padding: .75rem .85rem; gap: .65rem; align-items: flex-start; }
  .story-main .cat-tile { width: 2.1rem; height: 2.1rem; }
  .story-thumb { display: none; }
  .play-dot span { display: none; }
  .play-dot {
    padding: 0 !important;
    width: 2.15rem !important; height: 2.15rem !important;
    min-width: 2.15rem !important; min-height: 2.15rem !important;
    max-width: 2.15rem !important; max-height: 2.15rem !important;
    aspect-ratio: 1 / 1 !important; flex: 0 0 auto !important;
    border-radius: 50% !important; justify-content: center;
  }
  .story-detail { padding: 0 .85rem .85rem; }
  
  /* Floating Mini-Player on phone */
  .mini-player {
    left: 50%; bottom: calc(4.3rem + env(safe-area-inset-bottom));
    width: calc(100vw - 1.25rem); max-width: calc(100vw - 1.25rem);
    padding: .5rem .65rem; border-radius: var(--r-lg);
  }
  .save-bar { left: 50%; bottom: calc(4.8rem + env(safe-area-inset-bottom)); }
  body:has(.save-bar:not(.hidden)) .mini-player { bottom: calc(8.6rem + env(safe-area-inset-bottom)); }
  .mini-art { width: 2.5rem; height: 2.5rem; min-width: 2.5rem; min-height: 2.5rem; }
  .mini-controls #miniBack { display: none; }
  
  /* Sources on phone */
  .summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin-bottom: .85rem; }
  .stat { padding: .6rem .65rem; }
  .stat .overline { font-size: .58rem; letter-spacing: .06em; }
  .stat b { font-size: 1.15rem; }
  .stat b small { font-size: .72rem; }
  .topics { padding: .25rem; }
  .topic-head { padding: .55rem .65rem .55rem .35rem; gap: .55rem; }
  .drag-handle { width: 1.4rem; height: 2rem; flex: 0 0 auto !important; }
  .cat-tile { width: 2.2rem; height: 2.2rem; min-width: 2.2rem; min-height: 2.2rem; flex: 0 0 auto !important; aspect-ratio: 1 / 1 !important; }
  .topic-title { font-size: .9375rem; }
  .topic-summary { font-size: .75rem; }
  .topic-body { padding-left: .5rem; }
  .step-value { min-width: 2.2rem; font-size: .8125rem; }
  
  /* Settings on phone */
  .voice-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    padding: .2rem 0 .5rem;
  }
  .voice-list .persona {
    padding: .65rem .7rem;
    gap: .55rem;
  }
  .voice-list .persona-avatar {
    width: 2.2rem; height: 2.2rem; min-width: 2.2rem; min-height: 2.2rem;
  }
  .voice-list .persona-name { font-size: .875rem; }
  .voice-list .persona-desc { font-size: .7rem; }
  .voice-list .persona-status { font-size: .65rem; padding: .15rem .45rem; }
  
  /* Admin on phone */
  .admin-actions { padding: .75rem .95rem; }
  .run-log { padding: .4rem .85rem .85rem; max-height: 22rem; }
  .run-log-entry { padding: .65rem .75rem; }
  .diag-entry { padding: .65rem .85rem; }
  .add-voice-form { padding: .85rem; gap: .75rem; }
  .form-grid { grid-template-columns: 1fr; gap: .65rem; }
  .audio-dropzone { padding: .75rem .85rem; gap: .65rem; }
  
  /* Landing on phone */
  .landing-shell { padding: 1rem var(--gutter) 2.5rem; }
  .landing-main { grid-template-columns: 1fr; gap: 1.75rem; padding: 1.25rem 0 1.5rem; }
  .landing-welcome .badge { margin-bottom: .85rem; }
  .landing-title { font-size: clamp(1.85rem, 1.3rem + 2.5vw, 2.5rem); line-height: 1.12; }
  .landing-lead { font-size: 1rem; margin-top: .85rem; line-height: 1.5; }
  .landing-points { margin-top: 1rem; gap: .55rem; }
  .landing-points li { font-size: .9rem; gap: .55rem; }
  .landing-cta { margin-top: 1.25rem; gap: .75rem; }
  .preview-heading { margin-bottom: .65rem; }
  .preview-heading h2 { font-size: 1.2rem; margin-top: .2rem; }
  .landing-steps { grid-template-columns: 1fr; gap: .6rem; margin-top: .75rem; }
  .landing-steps li { padding: .85rem .95rem; gap: .75rem; }
  .landing-bar .landing-date { display: none; }
  
  /* Sheets and modals on phone */
  dialog.sheet {
    width: 100vw; max-width: 100vw; max-height: 90dvh;
    margin: auto 0 0;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
  .sheet-head { padding: 1.15rem 1.25rem .45rem; }
  .sheet-head h2 { font-size: 1.15rem; }
  .sheet-body { padding: .5rem 1.25rem .75rem; }
  .sheet-foot { padding: .75rem 1.25rem calc(.75rem + env(safe-area-inset-bottom)); }
  .login-card { padding: 1.5rem 1.25rem 1.25rem; }
  .login-card h1 { font-size: 1.35rem; }
  .login-intro { font-size: .8125rem; margin-top: .35rem; }
}

@media (max-width: 420px) {
  .transport { gap: .5rem; }
  .ink-circle:not(.sm) {
    width: 3.4rem !important; height: 3.4rem !important;
    min-width: 3.4rem !important; min-height: 3.4rem !important;
    max-width: 3.4rem !important; max-height: 3.4rem !important;
  }
  .skip-btn:not(.sm) {
    width: 2.3rem !important; height: 2.3rem !important;
    min-width: 2.3rem !important; min-height: 2.3rem !important;
    max-width: 2.3rem !important; max-height: 2.3rem !important;
  }
  .speed-pills .seg-opt { padding: 0 .45rem; font-size: .6875rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
