/* ─── Martha Episodes — Mobile Design System ─────────────────────────── */
/* Canonical from Martha Episodes.zip handoff package (May 2026)
   AHome.css + tokens.css, ported to our SPA conventions              */

/* ─── Self-hosted fonts ────────────────────────────────────────────────── */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/BodoniModa-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Bodoni Moda';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/BodoniModa-ItalicRegular.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/EBGaramond-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('/static/fonts/EBGaramond-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('/static/fonts/EBGaramond-Regular.woff2') format('woff2');
}
/* Cormorant SC for eyebrow labels (kept from desktop system) */
@font-face {
  font-family: 'Cormorant SC';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('/static/fonts/CormorantSC-Medium.woff2') format('woff2');
}

/* ─── Design tokens ─────────────────────────────────────────────────────
   Three rules from the spec:
   1. Never pure white — body bg is --page-cream.
   2. Never pure black — body text is --ink.
   3. Never use --ink-whisper for readable text — decorative only.    */
:root {
  /* Page */
  --page-cream:        #F5F0E4;
  --page-warm-white:   #FBF8F0;
  --page-dove:         #EFEAE0;

  /* Ink */
  --ink:               #2E2A24;
  --ink-soft:          #5C544A;
  --ink-whisper:       #8B8275;

  /* Rules */
  --rule:              #C9C1B0;
  --rule-soft:         #E0D9C8;
  --rule-deep:         #A89E89;

  /* Accents */
  --garden-hosta:      #7C8B6F;
  --garden-tomato:     #B84A3E;
  --accent-buttercup:  #EFE0A8;
  --araucana-eggshell: #BFD3CE;
  --skylands-blue:     #6A7E89;
  --bedford-gray:      #9CA39C;

  /* Type — canonical from spec */
  --font-display: 'Bodoni Moda', 'Didot', 'Bauer Bodoni', serif;
  --font-serif:   'EB Garamond', 'Adobe Caslon Pro', Georgia, serif;
  --font-ui:      system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;

  /* Radii — from tokens.css */
  --radius-1:    2px;
  --radius-2:    3px;
  --radius-3:    4px;
  --radius-pill: 999px;

  /* Motion */
  --ease:        cubic-bezier(.22, .61, .36, 1);
  --dur-quick:   120ms;
  --dur-base:    200ms;
  --dur-slow:    340ms;

  /* App chrome */
  --top-bar-h:    44px;
  --bottom-bar-h: 56px;
  --safe-top:    env(safe-area-inset-top,    0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left,   0px);
  --safe-right:  env(safe-area-inset-right,  0px);
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--page-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a, button { touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; padding: 0; }

/* CRITICAL: ≥16px prevents iOS keyboard zoom on focus */
input, select, textarea {
  font: inherit;
  font-size: 16px;
}
img { display: block; max-width: 100%; }

/* Search highlight */
mark {
  background: var(--accent-buttercup);
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

/* Selection */
::selection {
  background: var(--araucana-eggshell);
  color: var(--ink);
}

/* ─── App shell ──────────────────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-height: 100vh;
}

.view {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-top: calc(var(--top-bar-h) + var(--safe-top));
  padding-bottom: calc(var(--bottom-bar-h) + var(--safe-bottom) + 8px);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

/* ─── Top bar — 44px, frosted glass on iOS ────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(var(--top-bar-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: calc(12px + var(--safe-left));
  padding-right: calc(12px + var(--safe-right));
  background: rgba(245, 240, 228, 0.94);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid var(--rule);
}

.top-bar__wordmark {
  flex: 1;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: var(--top-bar-h);
  white-space: nowrap;
}

.top-bar__back {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  color: var(--garden-hosta);
  padding: 8px 0;
  min-width: 44px;
  min-height: 44px;
}

.top-bar__right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-bar__filter-btn {
  width: 36px; height: 36px;
  min-width: 44px; min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  border-radius: var(--radius-3);
  padding: 0;
  margin: 0 -4px;
}
.top-bar__filter-btn:active { background: var(--rule-soft); }

/* ─── Bottom tab bar — frosted glass ────────────────────────────────────── */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px 10px;
  padding-bottom: max(28px, var(--safe-bottom));
  padding-left: calc(10px + var(--safe-left));
  padding-right: calc(10px + var(--safe-right));
  background: rgba(251, 248, 240, 0.96);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-top: 1px solid var(--rule);
}

.tab-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  opacity: 0.55;
  transition: opacity var(--dur-quick) var(--ease);
  min-height: 44px;
  justify-content: center;
  background: transparent;
  border: none;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tab-bar__item.active { color: var(--garden-tomato); opacity: 1; }
.tab-bar__item:active { opacity: 0.75; }
.tab-bar__item svg { width: 22px; height: 22px; }

/* ─── Search block ───────────────────────────────────────────────────────── */
.search-wrap {
  padding: 14px 16px 12px;
  background: var(--page-warm-white);
  border-bottom: 1px solid var(--rule);
}

/* Input wrapper */
.search-input {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input input {
  width: 100%;
  background: var(--page-cream);
  border: 1.5px solid var(--ink-soft);
  border-radius: var(--radius-2);
  padding: 12px 36px 12px 40px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--dur-quick) var(--ease);
}
.search-input input::placeholder {
  color: var(--ink-soft);
  font-style: italic;
}
.search-input input:not(:placeholder-shown) {
  font-style: normal;
}
.search-input input:focus {
  border-color: var(--garden-hosta);
}

.search-input .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink);
  pointer-events: none;
  width: 18px; height: 18px;
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  border-radius: var(--radius-pill);
  background: var(--rule);
  color: var(--page-warm-white);
  font-size: 14px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
}
.search-clear.visible { display: flex; }

/* Count + clear row */
.count-row {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.count-line {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}
.count-line-standalone {
  padding: 6px 16px 0;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ─── Filter selects — 3-column ─────────────────────────────────────────── */
.filter-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 6px;
  padding: 10px 16px 0;
  background: var(--page-warm-white);
}

.filter-select-wrap {
  position: relative;
  background: var(--page-warm-white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-2);
  color: var(--ink);
  transition: background var(--dur-quick) var(--ease), border-color var(--dur-quick) var(--ease);
}
.filter-select-wrap.active {
  background: var(--garden-hosta);
  border-color: var(--garden-hosta);
  color: var(--page-warm-white);
}
.filter-select-wrap.disabled { opacity: 0.55; }

.filter-select {
  width: 100%;
  background: transparent;
  color: inherit;
  border: 0;
  padding: 8px 22px 8px 9px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
}
.filter-select:disabled { cursor: not-allowed; }

.filter-chevron {
  position: absolute;
  right: 7px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 10px;
  color: inherit;
  opacity: 0.7;
}

/* Clear filters link */
.clear-filters {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 16px 0;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--garden-tomato);
  background: var(--page-warm-white);
  border: none;
  cursor: pointer;
}
.clear-filters.visible { display: flex; }

/* ─── Popular chips ──────────────────────────────────────────────────────── */
.chips-section {
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--page-warm-white);
}
.chips-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.chips-expand {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  color: var(--garden-hosta);
  text-transform: none;
  letter-spacing: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}
/* 4-column grid, 2 rows default, expands to 6 */
.chips-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

/* "Show more popular topics" — small caps link below the grid */
.chips-show-more {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: none;
  border: none;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--garden-hosta);
  text-align: center;
  cursor: pointer;
  padding: 6px 0 2px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Chip: refined, editorial — EB Garamond italic, almost-square corners.
   Feels like a magazine caption card, not a generic pill.               */
.chip {
  background: var(--page-warm-white);
  border: 1px solid var(--rule-soft);
  border-bottom: 1.5px solid var(--rule);
  color: var(--ink-soft);
  border-radius: var(--radius-2);
  padding: 8px 4px 7px;
  font-family: var(--font-serif);
  font-size: 13px;
  font-style: italic;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background var(--dur-quick) var(--ease),
              border-color var(--dur-quick) var(--ease),
              color var(--dur-quick) var(--ease);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chip:active, .chip.active {
  background: var(--araucana-eggshell);
  border-color: var(--garden-hosta);
  border-bottom-color: var(--garden-hosta);
  color: var(--ink);
  font-style: normal;
}

/* ─── Section header ────────────────────────────────────────────────────── */
.section-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 16px 6px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.section-hd__count {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink-whisper);
  text-transform: none;
  letter-spacing: 0;
}

/* ─── Episode CARD — full-width with hero image ──────────────────────────── */
/* Used when the episode has a real photograph. Apple TV+ style.              */
.ep-card {
  display: block;
  cursor: pointer;
  background: var(--page-cream);
  border-bottom: 1px solid var(--rule-soft);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: opacity var(--dur-quick) var(--ease);
}
.ep-card:active { opacity: 0.88; }
.ep-card:focus { outline: none; }
.ep-card:focus-visible { box-shadow: inset 0 0 0 2px var(--garden-hosta); }

/* The image container — locks aspect ratio so nothing shifts while loading */
.ep-card__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--page-dove);    /* placeholder color while img loads */
}
.ep-card__img-wrap.has-color {
  /* Show-specific tonal placeholder when no photo */
}

.ep-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;           /* favor faces/subjects over lower-thirds */
  display: block;
  -webkit-backface-visibility: hidden;   /* eliminate WebKit composite flicker */
  backface-visibility: hidden;
  /* Smooth 220ms fade-in — matches iOS UIKit default curve */
  opacity: 0;
  transition: opacity 220ms cubic-bezier(.22, .61, .36, 1);
}
.ep-card__img.loaded { opacity: 1; }

/* Subtle gradient at bottom: blends image into card background */
.ep-card__img-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 48%;
  background: linear-gradient(
    to bottom,
    rgba(245, 240, 228, 0) 0%,
    rgba(245, 240, 228, 0.6) 100%
  );
  pointer-events: none;
}

/* Season/episode numeral — bottom-left corner of the image */
.ep-card__numeral {
  position: absolute;
  bottom: 10px;
  left: 12px;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.ep-card__s {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1;
}
.ep-card__e {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}

/* Card body — below the image */
.ep-card__body {
  padding: 10px 14px 14px;
}
.ep-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.ep-card__title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 5px;
  line-height: 1.3;
  text-wrap: pretty;
}
.ep-card__desc {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ─── Episode row — exact spec from AHome.css ────────────────────────────── */
/* Used for photo-less episodes and compact search results                     */
.ep-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-soft);
  cursor: pointer;
  background: var(--page-cream);
  transition: background var(--dur-quick) var(--ease);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ep-row:focus { outline: none; }
.ep-row:focus-visible { box-shadow: inset 0 0 0 2px var(--garden-hosta); }
.ep-row:active { background: var(--page-warm-white); }

/* Numeral column */
.ep-num { text-align: right; padding-top: 1px; }
.ep-num__season {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1;
}
.ep-num__episode {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
  margin-top: 2px;
}
.ep-num--year .ep-num__season { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.ep-num--year .ep-num__episode { display: none; }

/* Row body */
.ep-body { min-width: 0; }
.ep-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

/* Show badge — per-show colors set inline, radius-1 = 2px */
.ep-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--radius-1);
  white-space: nowrap;
}

.ep-date {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
}
.ep-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.3;
  text-wrap: pretty;
}
.ep-desc {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.pill-guest {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  background: var(--araucana-eggshell);
  color: var(--ink);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}
.pill-tag {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

/* ─── Thumbnail (right-side) ────────────────────────────────────────────── */
.ep-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 54px;
  border-radius: var(--radius-3);
  object-fit: cover;
  margin-left: 12px;
  background: var(--bedford-gray);
  align-self: flex-start;
}

/* ─── Episode detail ────────────────────────────────────────────────────── */
.detail-hero {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--page-dove);
  display: block;
}
.detail-hero-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--page-dove);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-whisper);
}
.detail-body { padding: 16px; }
.detail-eyebrow {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.detail-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 8px;
  text-wrap: pretty;
}
.detail-airdate {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.detail-desc {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink);
  line-height: 1.65;
  margin-bottom: 20px;
}
.detail-section {
  margin-bottom: 20px;
  border-top: 1px solid var(--rule-soft);
  padding-top: 14px;
}
.detail-section-hd {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.detail-list { list-style: none; padding: 0; margin: 0; }
.detail-list li {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink);
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
  display: flex; align-items: baseline; gap: 8px;
}
.detail-list li:last-child { border-bottom: none; }
.detail-watch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--garden-hosta);
  color: white;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  padding: 13px 24px;
  border-radius: var(--radius-3);
  margin-bottom: 20px;
  width: 100%;
  min-height: 48px;
}
.detail-streaming-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.detail-streaming-pill {
  background: var(--page-warm-white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-3);
  padding: 6px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-soft);
}
.detail-confidence {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink-whisper);
  display: flex; align-items: center; gap: 6px;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
}
.confidence-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.conf-confirmed { background: var(--garden-hosta); }
.conf-partial   { background: var(--garden-tomato); }
.conf-inferred  { background: var(--bedford-gray); }

.prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule-soft);
  margin: 0 -16px;
  padding: 0 16px;
}
.prevnext__item {
  background: var(--page-cream);
  padding: 14px 0;
  display: flex; flex-direction: column; gap: 4px;
}
.prevnext__item--next { text-align: right; }
.prevnext__dir {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-whisper);
}
.prevnext__title {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--garden-hosta);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Show overview ─────────────────────────────────────────────────────── */
.show-hero { padding: 20px 16px 16px; border-bottom: 1px solid var(--rule-soft); }
.show-hero__title {
  font-family: var(--font-serif);
  font-size: 24px; font-weight: 600;
  color: var(--ink); margin-bottom: 4px;
}
.show-hero__meta { font-family: var(--font-ui); font-size: 13px; color: var(--ink-soft); }
.season-row {
  display: flex; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule-soft);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-quick) var(--ease);
}
.season-row:active { background: var(--page-warm-white); }
.season-num {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 400;
  color: var(--ink-soft);
  width: 42px; flex-shrink: 0;
}
.season-info { flex: 1; }
.season-title { font-family: var(--font-serif); font-size: 15px; color: var(--ink); margin-bottom: 2px; }
.season-count { font-family: var(--font-ui); font-size: 12px; color: var(--ink-whisper); }
.season-chevron { color: var(--ink-whisper); font-size: 18px; }

/* ─── About / colophon ──────────────────────────────────────────────────── */
.about-body { padding: 20px 16px; font-family: var(--font-serif); font-size: 16px; color: var(--ink); line-height: 1.65; }
.about-body h2 {
  font-family: var(--font-ui);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft);
  margin: 24px 0 10px;
}
.about-body p { margin-bottom: 14px; }
.about-body a { color: var(--garden-hosta); text-decoration: underline; text-underline-offset: 2px; }

/* ─── Empty / loading ────────────────────────────────────────────────────── */
.state-empty { padding: 48px 16px; text-align: center; }
.state-empty p { font-family: var(--font-serif); font-size: 15px; color: var(--ink-soft); margin: 0 0 8px; }
.state-empty p strong { color: var(--ink); }
.state-empty p:last-child { font-style: italic; font-size: 13px; }
.state-loading { padding: 60px 24px; text-align: center; font-family: var(--font-ui); font-size: 12px; color: var(--ink-whisper); letter-spacing: 0.08em; text-transform: uppercase; }

/* ─── Guests ─────────────────────────────────────────────────────────────── */
.guest-section-head {
  padding: 14px 16px 4px;
  font-family: var(--font-ui);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft);
}
.guest-letter {
  font-family: var(--font-display);
  font-size: 2rem; line-height: 1;
  color: var(--ink-whisper);
  padding: var(--space-2, 8px) 16px 0;
}

/* ─── Utilities ──────────────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.hairline { border: 0; border-top: 1px solid var(--rule-soft); margin: 0; }

/* ─── Desktop wrapper ────────────────────────────────────────────────────── */
@media (min-width: 600px) {
  #app {
    max-width: 430px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px var(--rule-soft), 0 8px 40px rgba(0,0,0,0.08);
    min-height: 100dvh;
    min-height: 100vh;
    position: relative;
  }
}

/* ─── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ─── Featured "On this day" tile (slot one of the mobile feed) ───────────── */
.ep--featured {
  position: relative;
  margin-top: 4px;
}
.ep--featured::before {
  /* outer ring to set the featured card apart from the rest */
  content: '';
  position: absolute;
  inset: -6px -4px;
  border: 1px solid rgba(60, 50, 30, 0.35);
  pointer-events: none;
  border-radius: 2px;
}
.featured-badge {
  position: absolute;
  top: 4px;
  left: 12px;
  z-index: 2;
  background: #2a2018;
  color: #f5f0e4;
  font-family: var(--font-display, "Cormorant Garamond"), serif;
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  box-shadow: 0 2px 6px rgba(60, 50, 30, 0.4);
  pointer-events: none;
}
