/* ==========================================================================
   dailyfacts.uk — Warm Editorial Audio Magazine Stylesheet
   Accessible, responsive, ultra-fast, light/dark modes, zero dependencies
   ========================================================================== */

:root {
  --bg: #FAF8F4;
  --bg-elevated: #FFFFFF;
  --bg-muted: #F2EEE6;
  --bg-warm: #F6F0E4;
  --ink: #161513;
  --ink-secondary: #4C4740;
  --ink-muted: #766F66;
  --border: #E6DFD3;
  --border-strong: #D3C9B8;

  --accent: #C84B31;
  --accent-hover: #AD3B23;
  --accent-soft: #FCEEEB;
  --accent-ink: #9A301A;

  --gold: #9A6610;
  --gold-soft: #FBF3DF;
  --gold-border: #EAD196;

  --green: #166534;
  --green-soft: #EAF7EE;

  --lang-c1: #161513;
  --lang-c2: #C84B31;
  --lang-c3: #E6A93B;

  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(22, 21, 19, 0.05);
  --shadow-sm: 0 3px 10px rgba(22, 21, 19, 0.06), 0 1px 2px rgba(22, 21, 19, 0.04);
  --shadow-md: 0 12px 30px rgba(22, 21, 19, 0.08), 0 2px 6px rgba(22, 21, 19, 0.04);
  --shadow-lg: 0 22px 50px rgba(22, 21, 19, 0.14), 0 4px 14px rgba(22, 21, 19, 0.06);

  --container: 1180px;
  --header-h: 68px;
}

[data-theme="dark"] {
  --bg: #11100E;
  --bg-elevated: #1A1916;
  --bg-muted: #24221E;
  --bg-warm: #211D17;
  --ink: #F5F1E8;
  --ink-secondary: #C6BFB2;
  --ink-muted: #938B7E;
  --border: #2D2A24;
  --border-strong: #423D34;

  --accent: #E2684D;
  --accent-hover: #F07B60;
  --accent-soft: #311B16;
  --accent-ink: #F79A85;

  --gold: #E8B955;
  --gold-soft: #2B2313;
  --gold-border: #55421D;

  --green: #6EE7A0;
  --green-soft: #13281C;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.65);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.has-dock-player {
  padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
}

a, button, input, select, summary {
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  z-index: 999;
}
.skip-link:focus {
  top: 12px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 22px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.brand-wordmark {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-tld {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 4px;
}
.main-nav::-webkit-scrollbar { display: none; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-secondary);
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  background: var(--bg-muted);
  color: var(--ink);
}

.nav-link.active {
  background: var(--ink);
  color: var(--bg);
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

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

.btn-header-premium {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--gold-border);
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn-header-premium:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--gold-soft) 80%, var(--gold-border));
}

.btn-theme {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-secondary);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-theme:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun, :root:not([data-theme="dark"]) .icon-sun { display: none; }

/* Language Flag Accent Ribbon */
.lang-ribbon {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--lang-c1) 0%, var(--lang-c1) 33.33%, var(--lang-c2) 33.33%, var(--lang-c2) 66.66%, var(--lang-c3) 66.66%, var(--lang-c3) 100%);
}

/* ==========================================================================
   Buttons & Pills
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  max-width: 100%;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 32%, transparent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 38%, transparent);
}

.btn-dark {
  background: var(--ink);
  color: var(--bg);
}
.btn-dark:hover {
  opacity: 0.9;
}

.btn-podlink {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
}
.btn-podlink:hover {
  opacity: 0.92;
}

.btn-substack {
  background: #FF6719;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(255, 103, 25, 0.28);
}
.btn-substack:hover {
  background: #E85A10;
}

.btn-outline {
  background: var(--bg-elevated);
  color: var(--ink);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--ink);
  background: var(--bg-muted);
}

.btn-ghost {
  background: var(--bg-muted);
  color: var(--ink-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 14px 26px;
  font-size: 0.98rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-muted);
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

.pill-accent {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: transparent;
}

.pill-gold {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: var(--gold-border);
}

.pill-green {
  background: var(--green-soft);
  color: var(--green);
  border-color: transparent;
}

/* ==========================================================================
   Typography & Section Headers
   ========================================================================== */
h1, h2, h3 {
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

.section {
  padding-block: 68px;
}

.section-tight {
  padding-block: 44px;
}

.section-alt {
  background: var(--bg-warm);
  border-block: 1px solid var(--border);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.section-head-center {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 40px;
}

.section-head h2, .section-head-center h2 {
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  font-weight: 600;
}

.section-lead {
  color: var(--ink-secondary);
  font-size: 1.04rem;
  margin-top: 10px;
  max-width: 64ch;
}

/* ==========================================================================
   Homepage Hero
   ========================================================================== */
.home-hero {
  padding-block: 64px 56px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 60% at 80% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%),
    radial-gradient(ellipse 60% 50% at 10% 100%, color-mix(in srgb, var(--gold) 7%, transparent), transparent 70%),
    var(--bg);
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}

.home-hero-grid > *,
.lang-hero-grid > *,
.episode-detail-grid > *,
.premium-grid > *,
.inline-player-card > *,
.benefit-item > div,
.spotlight-meta,
.lang-card-title {
  min-width: 0;
  overflow-wrap: break-word;
}

.home-hero h1 {
  font-size: clamp(2.4rem, 4.8vw, 3.85rem);
  font-weight: 600;
  line-height: 1.07;
  margin-bottom: 20px;
}

.home-hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-summary {
  font-size: 1.12rem;
  color: var(--ink-secondary);
  max-width: 56ch;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.stat-item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}
.stat-item span {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 500;
}

/* Hero Featured Audio Spotlight Card */
.hero-spotlight {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.spotlight-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.spotlight-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
}
.spotlight-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.spotlight-cover-row {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.spotlight-cover {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.spotlight-meta h2 {
  font-size: 1.32rem;
  margin-bottom: 6px;
}

.spotlight-meta p {
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.spotlight-quick-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
}

.quick-play-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.quick-play-row:hover {
  background: var(--bg-muted);
  border-color: var(--border);
}
.quick-play-row.is-playing {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.quick-play-info {
  min-width: 0;
  flex: 1;
}
.quick-play-title {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick-play-sub {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Play Button Micro-Component
   ========================================================================== */
.play-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.play-circle:hover {
  background: var(--accent);
  color: #FFFFFF;
  transform: scale(1.06);
}
.play-circle.is-playing {
  background: var(--accent);
  color: #FFFFFF;
}
.play-circle-sm {
  width: 34px;
  height: 34px;
}
.play-circle-lg {
  width: 52px;
  height: 52px;
}

/* ==========================================================================
   Language Directory Cards (Homepage)
   ========================================================================== */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.lang-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lang-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.lang-card-stripe {
  height: 5px;
  width: 100%;
}

.lang-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.lang-card-top {
  display: flex;
  gap: 14px;
  align-items: center;
}

.lang-card-art {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.lang-card-title h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.lang-card-title h3 a:hover {
  color: var(--accent);
}

.lang-native-sub {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.lang-card-desc {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.lang-card-latest {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.lang-card-latest-meta {
  min-width: 0;
  flex: 1;
}
.lang-card-latest-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.lang-card-latest-title {
  display: block;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-card-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.lang-card-links .btn-open {
  grid-column: 1 / -1;
}

/* ==========================================================================
   Method / How It Works Grid
   ========================================================================== */
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.method-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}

.method-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.method-card h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.method-card p {
  font-size: 0.93rem;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Language Subpage Hero (/german/, /spanish/, etc.)
   ========================================================================== */
.lang-hero {
  padding-block: 44px 52px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 70% 60% at 90% 10%, color-mix(in srgb, var(--lang-c2) 10%, transparent), transparent 70%),
    var(--bg);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-bottom: 24px;
}
.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.lang-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 44px;
  align-items: center;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.lang-hero h1 {
  font-size: clamp(2.15rem, 4.2vw, 3.35rem);
  font-weight: 600;
  margin-bottom: 16px;
}

.lang-hero-desc {
  font-size: 1.06rem;
  color: var(--ink-secondary);
  max-width: 60ch;
  margin-bottom: 24px;
}

.listen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.secondary-platform-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.platform-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.lang-hero-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.show-artwork-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
}

.show-artwork-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

/* AI-friendly Facts At A Glance Table */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fact-cell {
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
}
.fact-cell dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  font-weight: 700;
}
.fact-cell dd {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

/* ==========================================================================
   Inline Featured Episode Player Card
   ========================================================================== */
.inline-player-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}

.inline-player-cover {
  width: 150px;
  height: 150px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.inline-player-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.inline-player-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.inline-player-meta h2, .inline-player-meta h3 {
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
}

.inline-player-summary {
  font-size: 0.94rem;
  color: var(--ink-secondary);
}

.inline-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.inline-scrubber {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

input[type="range"].audio-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--border-strong);
  cursor: pointer;
}
input[type="range"].audio-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #FFFFFF;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
input[type="range"].audio-range::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #FFFFFF;
}

.chapter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chapter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--ink-secondary);
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.chapter-pill:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent-soft);
}
.chapter-pill strong {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--accent-ink);
}

/* ==========================================================================
   Episode Catalog Controls & Grid
   ========================================================================== */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 480px;
}

.search-box svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 11px 16px 11px 44px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.catalog-right-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-select {
  padding: 9px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  font-size: 0.85rem;
  font-weight: 600;
}

.count-label {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.topic-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.filter-pill {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  transition: all 0.15s ease;
}
.filter-pill:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.filter-pill.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.episode-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.episode-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.episode-card.is-playing {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-md);
}

.ep-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-muted);
}

.ep-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.episode-card:hover .ep-card-media img {
  transform: scale(1.03);
}

.ep-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(22, 21, 19, 0.78) 0%, rgba(22, 21, 19, 0.12) 55%, transparent 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 12px;
}

.ep-media-overlay .play-circle {
  background: #FFFFFF;
  color: #161513;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.ep-media-overlay .play-circle:hover,
.ep-media-overlay .play-circle.is-playing {
  background: var(--accent);
  color: #FFFFFF;
}

.ep-duration-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(22, 21, 19, 0.84);
  color: #FAF8F4;
  padding: 4px 9px;
  border-radius: var(--radius-full);
}

.ep-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.ep-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.ep-card-title {
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.25;
}
.ep-card-title a:hover {
  color: var(--accent);
}

.ep-card-summary {
  font-size: 0.87rem;
  color: var(--ink-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vocab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vocab-chip {
  font-size: 0.73rem;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background: var(--bg-muted);
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

.ep-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ep-text-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ep-text-link:hover {
  text-decoration: underline;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  background: var(--bg-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--ink-muted);
}

/* ==========================================================================
   Substack Premium Membership Section
   ========================================================================== */
.premium-box {
  background: var(--bg-elevated);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.premium-banner {
  background: linear-gradient(120deg, #161513 0%, #2C221A 55%, #3B2216 100%);
  color: #FAF8F4;
  padding: 34px 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.premium-banner h2 {
  color: #FAF8F4;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-top: 10px;
}

.premium-banner p {
  color: #D7CEC2;
  max-width: 58ch;
  margin-top: 8px;
}

.price-badge-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  text-align: left;
  min-width: 240px;
}

.price-main {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.1;
}
.price-sub {
  font-size: 0.84rem;
  color: #E8D5B5;
  margin-top: 4px;
}

.premium-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 0;
}

.premium-home-body {
  padding: 32px 36px;
}

.premium-features {
  padding: 32px 36px;
  border-right: 1px solid var(--border);
}

.premium-features h3 {
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.benefit-list {
  list-style: none;
  display: grid;
  gap: 16px;
}

.benefit-list-2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
}

.benefit-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.benefit-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--gold-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.86rem;
}

.benefit-item strong {
  display: block;
  font-size: 0.96rem;
  color: var(--ink);
  margin-bottom: 2px;
}

.benefit-item p {
  font-size: 0.87rem;
  color: var(--ink-secondary);
}

.premium-compare {
  padding: 32px 30px;
  background: var(--bg-warm);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tier-mini-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.tier-mini-card.tier-paid {
  border-color: var(--gold-border);
}

.tier-mini-card h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tier-mini-card ul {
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--ink-secondary);
}
.tier-mini-card li::before {
  content: "✓ ";
  color: var(--green);
  font-weight: 800;
}

.premium-cta-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.premium-lang-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.premium-lang-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.premium-lang-link:hover {
  border-color: #FF6719;
  transform: translateY(-1px);
}
.premium-lang-link span.sub-arrow {
  color: #FF6719;
  font-size: 0.82rem;
}

/* ==========================================================================
   pod.link / Podcast Apps Banner
   ========================================================================== */
.podlink-strip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  box-shadow: var(--shadow-xs);
}

.podlink-strip h3 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}
.podlink-strip p {
  color: var(--ink-secondary);
  font-size: 0.94rem;
  max-width: 56ch;
}

.podlink-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   Individual Episode Page Layout
   ========================================================================== */
.episode-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.75fr);
  gap: 32px;
  align-items: start;
}

.detail-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  margin-bottom: 24px;
}

.detail-card h2 {
  font-size: 1.45rem;
  margin-bottom: 14px;
}

.highlights-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.highlights-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-secondary);
  font-size: 0.95rem;
}
.highlights-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.chapters-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.chapter-row-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  border: 1px solid transparent;
  text-align: left;
  transition: all 0.15s ease;
}
.chapter-row-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.chapter-row-btn .ch-ts {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-ink);
  min-width: 48px;
}
.chapter-row-btn .ch-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.vocab-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vocab-preview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.vocab-preview-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.vocab-word {
  display: block;
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--ink);
}
.vocab-trans {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.sidebar-premium-card {
  background: var(--bg-elevated);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.sidebar-premium-card h3 {
  font-size: 1.35rem;
  margin-top: 10px;
  margin-bottom: 10px;
}

.sidebar-premium-card p {
  font-size: 0.89rem;
  color: var(--ink-secondary);
  margin-bottom: 16px;
}

.sidebar-checklist {
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--ink-secondary);
  margin-bottom: 20px;
}
.sidebar-checklist li::before {
  content: "✓ ";
  color: var(--gold);
  font-weight: 800;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-list {
  display: grid;
  gap: 12px;
  max-width: 860px;
  margin-inline: auto;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
}

.faq-item summary {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink-muted);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  content: "−";
  color: var(--accent);
}

.faq-item p {
  margin-top: 12px;
  color: var(--ink-secondary);
  font-size: 0.94rem;
  line-height: 1.65;
}

/* ==========================================================================
   Cross-Language Internal Linking Bar
   ========================================================================== */
.other-langs-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.other-lang-pill {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.other-lang-pill:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.other-lang-pill strong {
  font-family: var(--font-serif);
  font-size: 1.1rem;
}
.other-lang-pill span {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Persistent Docked Bottom Audio Player
   ========================================================================== */
.dock-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--bg-elevated) 96%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-strong);
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.12);
  transform: translateY(115%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, visibility 0.2s ease;
}

.dock-player.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dock-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 12px 22px;
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(240px, 1.6fr) auto;
  gap: 18px;
  align-items: center;
}

.dock-track {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dock-cover {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-muted);
}

.dock-info {
  min-width: 0;
}

.dock-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dock-title:hover {
  color: var(--accent);
}

.dock-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-center {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dock-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.dock-skip-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: var(--radius-full);
  color: var(--ink-secondary);
  background: var(--bg-muted);
}
.dock-skip-btn:hover {
  color: var(--ink);
  background: var(--border);
}

.dock-scrubber {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dock-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-substack-link {
  display: none;
}
.dock-substack-link.has-link {
  display: inline-flex;
}

.speed-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-muted);
  min-width: 54px;
}
.speed-btn:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.dock-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
}
.dock-close:hover {
  background: var(--bg-muted);
  color: var(--ink);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding-block: 56px 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.footer-col p {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin-top: 12px;
  max-width: 36ch;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 9px;
  font-size: 0.89rem;
}

.footer-col a {
  color: var(--ink-secondary);
}
.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom-links a:hover {
  color: var(--accent);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 96px;
  right: 22px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 300;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Touch Optimization
   ========================================================================== */
@media (max-width: 1024px) {
  .home-hero-grid,
  .lang-hero-grid,
  .episode-detail-grid,
  .premium-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .premium-features {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-premium-card {
    position: static;
  }

  .lang-grid,
  .episodes-grid,
  .method-grid,
  .premium-lang-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .other-langs-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 98px;
  }

  .container {
    padding-inline: 16px;
  }

  .section {
    padding-block: 44px;
  }

  .section-tight {
    padding-block: 28px;
  }

  .section-head {
    margin-bottom: 22px;
  }

  .home-hero {
    padding-block: 32px 36px;
  }

  .home-hero-grid {
    gap: 28px;
  }

  .home-hero h1 {
    font-size: clamp(2rem, 8.2vw, 2.65rem);
  }

  .hero-summary,
  .lang-hero-desc {
    font-size: 1rem;
    margin-bottom: 22px;
  }

  .eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    padding: 5px 12px;
  }

  .lang-hero {
    padding-block: 24px 32px;
  }

  .lang-hero-grid {
    gap: 24px;
  }

  .breadcrumbs {
    margin-bottom: 16px;
    font-size: 0.8rem;
  }

  /* Compact sticky mobile header with horizontal swipeable language pills */
  .header-inner {
    min-height: 0;
    flex-wrap: wrap;
    padding-block: 8px 6px;
    gap: 8px;
  }

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

  .brand-wordmark {
    font-size: 1.18rem;
  }

  .btn-theme {
    width: 40px;
    height: 40px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    border-top: 1px solid var(--border);
    padding: 6px 28px 2px 0;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 93%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 93%, transparent 100%);
  }

  .nav-link {
    min-height: 38px;
    padding: 7px 13px;
    font-size: 0.85rem;
    scroll-snap-align: start;
  }

  .btn-header-premium {
    display: none;
  }

  /* Touch-friendly buttons & stacked primary CTAs */
  .btn {
    min-height: 44px;
    padding: 11px 18px;
  }

  .btn-sm {
    min-height: 40px;
    padding: 8px 14px;
  }

  .btn-lg {
    min-height: 48px;
    padding: 13px 20px;
  }

  .hero-actions,
  .listen-actions,
  .podlink-btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .listen-actions .btn,
  .podlink-btn-group .btn {
    width: 100%;
  }

  .secondary-platform-row {
    gap: 8px;
  }

  .platform-chip {
    min-height: 40px;
    padding: 8px 13px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding-top: 20px;
  }

  .hero-spotlight {
    padding: 18px 16px;
  }

  .spotlight-cover {
    width: 76px;
    height: 76px;
  }

  .quick-play-row {
    padding: 8px 6px;
    gap: 10px;
  }

  .play-circle-sm {
    width: 40px;
    height: 40px;
  }

  .ep-text-link {
    min-height: 38px;
    padding-block: 6px;
  }

  /* Single-column responsive grids */
  .lang-grid,
  .episodes-grid,
  .method-grid,
  .benefit-list-2col,
  .premium-lang-pills,
  .vocab-preview-grid,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .other-langs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* Prevent iOS Safari auto-zoom on inputs/selects (requires >= 16px) */
  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search-box {
    min-width: 0;
    max-width: none;
  }

  .search-box input {
    font-size: 16px;
    min-height: 46px;
    padding: 11px 16px 11px 44px;
  }

  .catalog-right-controls {
    justify-content: space-between;
  }

  .sort-select {
    font-size: 16px;
    min-height: 44px;
    padding: 9px 14px;
  }

  /* Horizontal single-row swipeable topic filter strip on mobile */
  .topic-filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-bottom: 20px;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 90%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 90%, transparent 100%);
    padding-right: 24px;
  }
  .topic-filter-row::-webkit-scrollbar {
    display: none;
  }

  .filter-pill {
    flex-shrink: 0;
    min-height: 40px;
    padding: 8px 15px;
    white-space: nowrap;
  }

  /* Inline episode player card on mobile */
  .inline-player-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px 16px;
    gap: 16px;
  }

  .inline-player-cover {
    width: 96px;
    height: 96px;
  }

  .inline-controls-bar {
    padding: 12px;
    gap: 10px;
  }

  .inline-scrubber {
    min-width: 0;
    flex-basis: 100%;
    order: 4;
  }

  .dock-skip-btn {
    min-height: 40px;
    min-width: 48px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .speed-btn {
    min-height: 40px;
    min-width: 56px;
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .chapter-pill {
    min-height: 40px;
    padding: 8px 12px;
    text-align: left;
    border-radius: var(--radius-sm);
    width: 100%;
    justify-content: flex-start;
  }

  /* Premium & detail cards padding on mobile */
  .premium-banner,
  .premium-features,
  .premium-compare,
  .premium-home-body {
    padding: 22px 18px;
  }

  .price-badge-box {
    min-width: 0;
    width: 100%;
  }

  .podlink-strip,
  .detail-card,
  .sidebar-premium-card {
    padding: 20px 16px;
  }

  .faq-item {
    padding: 16px;
  }

  .faq-item summary {
    font-size: 1.05rem;
    min-height: 36px;
  }

  .chapter-row-btn {
    min-height: 46px;
    padding: 11px 12px;
  }

  .vocab-preview-card {
    min-height: 54px;
  }

  /* Docked mobile bottom player with iPhone safe-area support */
  .dock-player {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .dock-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 10px 14px 12px;
  }

  .dock-cover {
    width: 42px;
    height: 42px;
  }

  .dock-center {
    grid-column: 1 / -1;
    order: 3;
    gap: 8px;
  }

  .dock-controls {
    gap: 16px;
  }

  .dock-right .dock-substack-link,
  .dock-right .dock-substack-link.has-link {
    display: none;
  }

  .dock-close {
    width: 40px;
    height: 40px;
  }

  body.has-dock-player {
    padding-bottom: calc(168px + env(safe-area-inset-bottom, 0px));
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: calc(162px + env(safe-area-inset-bottom, 0px));
    text-align: center;
  }
}

/* Larger thumb-friendly audio scrubber on touch screens */
@media (pointer: coarse), (max-width: 720px) {
  input[type="range"].audio-range {
    height: 6px;
    margin-block: 8px;
  }
  input[type="range"].audio-range::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
  }
  input[type="range"].audio-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
  }
}

/* Extra narrow phones (320px–380px, e.g. iPhone SE) */
@media (max-width: 380px) {
  .spotlight-cover-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .lang-card-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .other-langs-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ep-card-footer {
    flex-wrap: wrap;
  }
}
