/* starter.css - The Excellent Reader Sit & Watch Starter Consonant Gallery */
:root {
  color-scheme: light;
  --paper: #fcfaf4;
  --surface: #ffffff;
  --ink: #1e2927;
  --muted: #516560;
  --forest: #1f5c51;
  --forest-hover: #17463d;
  --forest-soft: #e3f1ed;
  --gold: #b88943;
  --gold-soft: #fff6e2;
  --sky: #1d6fd6;
  --sky-soft: #e7f2ff;
  --dino: #237a57;
  --dino-soft: #e7f8ef;
  --fox: #c84b1c;
  --fox-soft: #fff0e8;
  --line: #dbe2d9;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-print: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
  overflow-x: hidden;
}
a { color: var(--forest); }
button { font: inherit; }
[hidden] { display: none !important; }

/* Shared Global Header, First Steps Sub-Bar & Quiet Footer (docs/site-navigation.md) */
.rr-global-header { background: #fffdf8; border-bottom: 1px solid var(--line); color: var(--ink); font-family: var(--font-sans); }
.rr-global-header *, .rr-section-nav *, .rr-global-footer * { box-sizing: border-box; }
.rr-global-inner { max-width: 1240px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.rr-global-brand { font: 700 1.55rem/1.2 var(--font-serif); letter-spacing: -0.03em; color: var(--forest); text-decoration: none; white-space: nowrap; }
.rr-global-menu { display: flex; align-items: center; gap: 20px; flex: 1; flex-wrap: wrap; font-size: 0.96rem; line-height: 1.4; font-weight: 700; }
.rr-global-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }
.rr-global-adults { margin-left: auto; border-left: 1px solid var(--line); padding-left: 18px; gap: 6px 12px; }
.rr-global-menu a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; white-space: nowrap; text-decoration: none; color: #314b45; border-bottom: 2px solid transparent; }
.rr-global-menu a:hover { color: var(--forest); }
.rr-global-menu a[aria-current="page"] { color: var(--forest); border-bottom-color: currentColor; }
.rr-global-menu a.rr-adult-link { font-size: 0.86rem; font-weight: 650; color: var(--muted); padding: 6px 12px; border-radius: 999px; background: #eef3eb; border-bottom: 0; }
.rr-global-menu a.rr-adult-link:hover, .rr-global-menu a.rr-adult-link[aria-current="page"] { color: var(--forest); background: var(--forest-soft); }
.rr-global-menu a.rr-adult-link[aria-current="page"] { box-shadow: inset 0 -2px 0 currentColor; }
.rr-nav-icon { display: block; flex-shrink: 0; }
.rr-global-header a:focus-visible, .rr-section-nav a:focus-visible, .rr-global-footer a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.rr-section-nav { background: #eef3eb; border-bottom: 1px solid var(--line); padding: 10px 24px; display: flex; gap: 10px 22px; justify-content: center; flex-wrap: wrap; font: 600 0.9rem/1.5 var(--font-sans); }
.rr-section-nav a { color: var(--forest); text-decoration: none; }
.rr-section-nav a:hover, .rr-section-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; font-weight: 750; }
.rr-global-footer { margin-top: auto; background: #fffdf8; border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font: 400 0.84rem/1.5 var(--font-sans); }
.rr-footer-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; }
.rr-footer-brand strong { font-family: var(--font-serif); color: var(--ink); }
.rr-footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; }
.rr-footer-label { font-size: 0.74rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.05em; }
.rr-footer-links a { color: var(--muted); text-decoration: none; }
.rr-footer-links a:hover { color: var(--forest); text-decoration: underline; }
@media (max-width: 820px) { .rr-global-inner { gap: 12px; } .rr-global-menu { gap: 12px; } .rr-global-adults { border-left: 0; padding-left: 0; } }
@media (max-width: 560px) { .rr-global-inner { padding: 12px 16px; } .rr-global-menu { flex-basis: 100%; font-size: 0.88rem; justify-content: space-between; } .rr-global-group { gap: 4px 14px; } .rr-section-nav { padding: 10px 16px; gap: 8px 16px; } .rr-footer-inner { padding: 0 16px; } }
@media (forced-colors: active) { .rr-global-menu a[aria-current="page"] { border-bottom-color: LinkText; } .rr-global-menu a.rr-adult-link[aria-current="page"] { outline: 2px solid LinkText; } }

/* Main Gallery Container */
.watch-hub {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px 52px;
}
.hero-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}
@media (min-width: 780px) {
  .hero-top {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}
.hero-copy h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 5vw, 2.35rem);
  margin: 0 0 6px;
  color: var(--forest);
  line-height: 1.15;
}
.hero-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
  font-size: 1rem;
}

/* Giant Hands-Free Controls */
.play-all-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.btn-play-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 62px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 3px solid var(--forest);
  background: var(--forest);
  color: #fff;
  font-size: 1.22rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(31, 92, 81, 0.22);
  touch-action: manipulation;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn-play-all:hover {
  background: var(--forest-hover);
  border-color: var(--forest-hover);
  transform: translateY(-1px);
}
.btn-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  touch-action: manipulation;
}
.btn-toggle[aria-pressed="true"] {
  border-color: var(--forest);
  background: var(--forest-soft);
  color: var(--forest);
}
button:focus-visible,
a:focus-visible,
video:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Theater Card */
.theater {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(24, 36, 33, 0.09);
  margin-bottom: 24px;
}
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #17211f;
}
.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #17211f;
}
.playlist-done {
  position: absolute;
  inset: 0;
  background: rgba(252, 250, 244, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  gap: 12px;
}
.playlist-done h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 4.5vw, 2.1rem);
  color: var(--forest);
  margin: 0;
}
.playlist-done p {
  margin: 0;
  color: var(--muted);
  max-width: 44ch;
}
.done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}

.theater-bar {
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fffdf8;
  border-top: 1px solid var(--line);
}
.now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.now-letter {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--sky);
  color: #fff;
  font-family: var(--font-print);
  font-size: 1.55rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.now-meta {
  min-width: 0;
}
.now-meta strong {
  display: block;
  font-size: 1.1rem;
}
.now-meta span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}
.transport {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.btn-step {
  min-height: 46px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.btn-step:hover {
  border-color: var(--forest);
  background: var(--forest-soft);
}

/* Set Filter Row + Big Colorful Letter Cards */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}
.cards-heading {
  font-size: 1.2rem;
  margin: 0;
  color: var(--ink);
}
.set-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.set-chip {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.set-chip[aria-pressed="true"] {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}
.letter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media (min-width: 760px) {
  .letter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.letter-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border-radius: 20px;
  border: 3px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(24, 36, 33, 0.07);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
  touch-action: manipulation;
}
.letter-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(24, 36, 33, 0.13);
}
.letter-card.is-active {
  border-color: var(--card-accent, var(--forest));
  box-shadow: 0 0 0 3px rgba(31, 92, 81, 0.16);
}

.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f5efe2;
  overflow: hidden;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--font-print);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  background: var(--card-accent, var(--forest));
}

.watched-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.94);
  color: var(--forest);
  font-size: 0.82rem;
  font-weight: 800;
}

.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
}
.card-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.card-title {
  font-size: 1.18rem;
  font-weight: 800;
}
.card-phoneme {
  font-family: var(--font-print);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--forest);
}
.card-mnemonic {
  font-size: 0.92rem;
  color: var(--muted);
}
.card-words {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-print);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
}
.card-words b {
  color: var(--forest);
}

/* Cross-link CTA to Alpine Word & Sound Slalom */
.slalom-cta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #e8f3fe 0%, #eaf6f1 100%);
  border: 2px solid #c6dfd7;
}
@media (min-width: 720px) {
  .slalom-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.slalom-cta h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  color: var(--forest);
}
.slalom-cta p {
  margin: 0;
  color: var(--muted);
  max-width: 56ch;
}
.btn-slalom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.btn-slalom:hover {
  background: var(--forest-hover);
}

@media (prefers-reduced-motion: reduce) {
  .btn-play-all,
  .letter-card {
    transition: none;
  }
  .btn-play-all:hover,
  .letter-card:hover {
    transform: none;
  }
}
