/* Kahavat.org build v1.1.1 — audio button + karaoke highlight CSS */
/* ============================================================
   Kahavat.org — warm, handcrafted Indian folk design system
   Built on the StartupJS spacing/radius/shadow scale,
   re-skinned with an earthy palette + bilingual type.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Mukta:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  /* ---- Earthy palette ---- */
  --cream:        #FBF3E2;   /* page paper */
  --cream-2:      #F6E9CE;   /* alt section */
  --cream-3:      #F2E0BD;   /* deeper band */
  --paper:        #FFFBF2;   /* card surface */

  --terracotta:   #C0492A;   /* primary */
  --terracotta-7: #A2381E;
  --terracotta-8: #842D18;
  --terracotta-tint: #F6DDCF;

  --marigold:     #E5982A;   /* saffron accent */
  --marigold-7:   #C97E16;
  --marigold-tint:#FBEACB;

  --indigo:       #2C3E6B;   /* deep secondary */
  --indigo-7:     #21305A;
  --indigo-tint:  #DCE2EF;

  --leaf:         #5C7E4B;   /* green accent */
  --leaf-tint:    #E2EAD6;

  --maroon:       #7E2B2B;
  --maroon-tint:  #F0D9D4;

  /* ---- Warm ink neutrals ---- */
  --ink:          #34251A;   /* primary text */
  --ink-2:        #5E4A38;   /* secondary text */
  --ink-3:        #8A7458;   /* muted / helper */
  --line:         #E6D2AC;   /* warm border */
  --line-soft:    #EFE0C2;
  --white:        #FFFFFF;

  /* ---- Type ---- */
  --font-display: 'Baloo 2', 'Nunito', 'Baloo Tamma 2', system-ui, sans-serif;
  --font-body:    'Mukta', 'Nunito', 'Baloo Tamma 2', system-ui, sans-serif;

  --fw-reg: 400; --fw-med: 500; --fw-semi: 600; --fw-bold: 700; --fw-x: 800;

  /* ---- Spacing (4px base, from StartupJS) ---- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-14: 56px;
  --s-16: 64px; --s-20: 80px; --s-24: 96px; --s-32: 128px;

  /* ---- Radius ---- */
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px; --r-2xl: 30px; --r-pill: 9999px;

  /* ---- Shadow (warm-tinted) ---- */
  --sh-xs: 0 1px 2px rgba(74,46,20,.06);
  --sh-sm: 0 1px 2px rgba(74,46,20,.07), 0 1px 3px rgba(74,46,20,.10);
  --sh-md: 0 2px 6px -2px rgba(74,46,20,.10), 0 6px 14px -4px rgba(74,46,20,.12);
  --sh-lg: 0 6px 14px -6px rgba(74,46,20,.10), 0 18px 34px -10px rgba(74,46,20,.16);
  --sh-xl: 0 12px 24px -8px rgba(74,46,20,.14), 0 30px 56px -16px rgba(74,46,20,.22);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 200ms;
}

* { box-sizing: border-box; }

/* ---- Branded loading splash ---- */
.kv-splash { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; background: var(--cream); transition: opacity .45s ease; }
.kv-splash.done { opacity: 0; pointer-events: none; }
.kv-splash__mark { display: block; filter: drop-shadow(0 4px 10px rgba(74,46,20,.18)); animation: kvpulse 1.4s ease-in-out infinite; }
.kv-splash__name { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.01em; color: var(--ink); }
.kv-splash__name span { color: var(--terracotta); }
.kv-splash__bar { width: 220px; max-width: 62vw; height: 6px; border-radius: 999px; background: var(--cream-3); overflow: hidden; }
.kv-splash__fill { height: 100%; width: 8%; border-radius: 999px; background: linear-gradient(90deg, var(--marigold), var(--terracotta)); transition: width .3s ease; animation: kvgrow 1.1s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes kvgrow { from { width: 8%; } to { width: 86%; } }
.kv-splash__note { font-family: var(--font-ui, inherit); font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-soft, #7a6a53); opacity: .8; }
@keyframes kvpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .kv-splash__mark { animation: none; } .kv-splash__fill { animation: none; width: 86%; } }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* hide elements based on the active language */
[data-lang="en"] .only-hi { display: none !important; }
[data-lang="hi"] .only-en { display: none !important; }
/* Hindi mode nudges body line-height a touch for Devanagari */
[data-lang="hi"] body, [data-lang="hi"] { line-height: 1.7; }

/* ============ LAYOUT ============ */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--s-8); }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 var(--s-8); }
section { position: relative; }

/* ============ TYPE HELPERS ============ */
.display {
  font-family: var(--font-display);
  font-weight: var(--fw-x);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}
.h1 { font-size: clamp(40px, 5.4vw, 68px); }
.h2 { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -0.01em; margin: 0; color: var(--ink); text-wrap: balance; }
.h3 { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 24px; line-height: 1.2; margin: 0; color: var(--ink); }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.6; color: var(--ink-2); text-wrap: pretty; margin: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--terracotta);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--marigold); border-radius: 2px; }
.muted { color: var(--ink-3); }

/* devanagari proverb display */
.proverb-deva { font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--ink); }
.translit { font-style: italic; color: var(--ink-2); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: 54px; padding: 0 var(--s-6); border: 0; border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 17px;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 20px; height: 20px; }
.btn--primary { background: var(--terracotta); color: var(--white); box-shadow: 0 6px 16px -6px rgba(192,73,42,.6); }
.btn--primary:hover { background: var(--terracotta-7); box-shadow: 0 10px 22px -8px rgba(192,73,42,.65); }
.btn--marigold { background: var(--marigold); color: var(--ink); box-shadow: 0 6px 16px -6px rgba(229,152,42,.55); }
.btn--marigold:hover { background: var(--marigold-7); color: var(--white); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { background: var(--paper); border-color: var(--ink-3); }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ink:hover { background: #25180f; }
.btn--sm { height: 44px; font-size: 15px; padding: 0 var(--s-5); }
.btn--lg { height: 60px; font-size: 19px; padding: 0 var(--s-8); }

/* ============ CHIPS / TAGS ============ */
.chip {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px 14px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: var(--fw-semi); font-family: var(--font-body);
  background: var(--paper); border: 1.5px solid var(--line); color: var(--ink-2);
}
.value-tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px 5px 11px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: var(--fw-semi);
  background: var(--marigold-tint); color: var(--marigold-7);
}
.value-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--marigold-7); }

/* ============ CARDS ============ */
.card {
  background: var(--paper); border: 1.5px solid var(--line-soft);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

/* ============ FOLK DECOR ============ */
.divider-folk {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--marigold-7); padding: var(--s-2) 0;
}
.divider-folk::before, .divider-folk::after {
  content: ""; height: 2px; width: min(120px, 16vw);
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
}

/* language tabs (segmented) */
.lang-seg { display: inline-flex; padding: 5px; gap: 4px; background: var(--cream-2); border-radius: var(--r-pill); border: 1.5px solid var(--line); }
.lang-seg button {
  border: 0; background: transparent; color: var(--ink-2);
  font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 14px;
  padding: 8px 16px; border-radius: var(--r-pill); transition: all var(--dur) var(--ease);
}
.lang-seg button[aria-selected="true"] { background: var(--paper); color: var(--terracotta); box-shadow: var(--sh-xs); }

/* utility */
.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; }
.fade-up { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.fade-up.in { opacity: 1; transform: none; }

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,243,226,.86); backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--line-soft);
}
.nav__inner { height: 76px; display: flex; align-items: center; gap: var(--s-8); }
.brand { display: flex; align-items: center; gap: var(--s-3); }
.brand__mark { display: flex; filter: drop-shadow(0 2px 4px rgba(74,46,20,.18)); }
.brand__name { font-family: var(--font-display); font-weight: var(--fw-x); font-size: 24px; letter-spacing: -0.01em; color: var(--ink); display: inline-flex; align-items: baseline; }
.brand__dot { color: var(--terracotta); }
.brand--light .brand__name, .brand--light .brand__dot { color: #F5EAD6; }
.brand--light .brand__dot { color: var(--marigold); }
.nav__links { display: flex; gap: var(--s-8); margin-left: var(--s-4); }
.nav__links a { font-family: var(--font-display); font-weight: var(--fw-semi); font-size: 16px; color: var(--ink-2); transition: color var(--dur) var(--ease); }
.nav__links a:hover { color: var(--terracotta); }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-4); }

/* hamburger — hidden on desktop */
.nav__toggle { display: none; width: 46px; height: 46px; flex: none; align-items: center; justify-content: center; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); }
.nav__toggle svg { width: 24px; height: 24px; }
.nav--dark .nav__toggle { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: var(--cream); }

@media (max-width: 940px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0; margin-left: 0;
    flex-direction: column; gap: 0;
    background: var(--cream); border-bottom: 1.5px solid var(--line);
    box-shadow: var(--sh-lg);
    padding: var(--s-2) var(--s-5) var(--s-4);
    max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
    transition: max-height var(--dur) var(--ease), opacity var(--dur) var(--ease);
  }
  .nav.open .nav__links { max-height: 70vh; opacity: 1; pointer-events: auto; overflow: auto; }
  .nav__links a { padding: 15px 6px; font-size: 18px; border-bottom: 1px solid var(--line-soft); }
  .nav__links a:last-child { border-bottom: 0; }
  .nav--dark .nav__links { background: #1c130c; border-color: rgba(255,255,255,.12); }
  .nav--dark .nav__links a { border-bottom-color: rgba(255,255,255,.08); color: #C9B49C !important; }
}
@media (max-width: 560px) {
  .nav .wrap { padding: 0 var(--s-4); }
  .nav__inner { gap: var(--s-3); height: 64px; }
  .brand { min-width: 0; flex: 0 1 auto; overflow: hidden; }
  .brand__name { font-size: 21px; }
  .nav__actions { gap: var(--s-2); flex: none; }
  .nav__actions .btn { display: none; }
  .nav__toggle { width: 42px; height: 42px; }
}

/* very narrow phones (iPhone SE, Galaxy S8+, Z Fold cover): compact the
   nav controls so the wordmark is never clipped or pushed off-screen */
@media (max-width: 420px) {
  .nav__inner { gap: 6px; }
  .brand { flex: 0 0 auto; overflow: visible; }
  .brand__name { font-size: 18px; }
  .nav__actions { gap: 6px; }
  .nav__actions .lang-seg { padding: 3px; gap: 2px; }
  .nav__actions .lang-seg button { padding: 6px 9px; font-size: 13px; }
  .theme-toggle { width: 40px; height: 40px; }
  .nav__toggle { width: 40px; height: 40px; }
}
@media (max-width: 350px) {
  .nav__inner { gap: 4px; }
  .brand__name { font-size: 16px; }
  .nav__actions { gap: 4px; }
  .nav__actions .lang-seg { padding: 2px; }
  .nav__actions .lang-seg button { padding: 5px 6px; font-size: 12px; }
  .theme-toggle { width: 34px; height: 34px; }
  .nav__toggle { width: 34px; height: 34px; }
}

/* ============ HERO ============ */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 104px); overflow: hidden; }
.hero__deco {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    radial-gradient(40% 60% at 88% 0%, rgba(229,152,42,.20), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, rgba(192,73,42,.12), transparent 70%);
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__copy .eyebrow { margin-bottom: var(--s-5); }
.hero__copy .h1 { margin-bottom: var(--s-4); }
.hero__gloss { max-width: 30em; margin: 0 0 var(--s-6); font-size: clamp(15px, 1.2vw, 17px); line-height: 1.55; color: var(--ink-3); text-wrap: pretty; }
.hero__gloss b { font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--terracotta); }
.hero__gloss .hero__gloss-deva { color: var(--marigold-7); font-weight: var(--fw-semi); }
.hero__copy .lead { max-width: 30em; margin-bottom: var(--s-8); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-8); }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); font-size: 15px; font-weight: var(--fw-semi); color: var(--ink-3); }
.hero__meta-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--marigold); }

/* featured proverb card */
.featured { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-2xl); box-shadow: var(--sh-xl); overflow: visible; }
.featured__art { height: 168px; display: grid; place-items: center; border-radius: var(--r-2xl) var(--r-2xl) 0 0; overflow: hidden; }
.featured__art-img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transform: scale(1.04); }
.featured__body { padding: var(--s-6) var(--s-6) var(--s-8); }
.featured__lines { display: flex; flex-direction: column; margin-top: var(--s-3); margin-bottom: var(--s-6); }
.featured__name { font-family: var(--font-display); font-weight: var(--fw-x); font-size: clamp(26px, 3vw, 36px); line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); }
.featured__tabs { margin-bottom: var(--s-4); }
.featured__meaning { font-size: 16.5px; line-height: 1.6; color: var(--ink-2); margin: 0 0 var(--s-5); min-height: 5.2em; }
.featured__link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--terracotta); }
.featured__link svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.featured__link:hover svg { transform: translateX(4px); }
.featured--clickable { cursor: pointer; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.featured--clickable:hover { transform: translateY(-3px); box-shadow: 0 24px 46px -20px rgba(74,46,20,.5); }
.featured--clickable:hover .featured__link svg { transform: translateX(4px); }
.featured--clickable:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; }
.featured__readrow { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1.5px solid var(--line-soft); cursor: default; display: flex; flex-direction: column; gap: var(--s-2); }
.featured__readrow-label { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: var(--fw-semi); font-size: 13px; color: var(--ink-3); }
.featured__readrow-label svg { width: 15px; height: 15px; }

/* art panels */
[data-art] { position: relative; }
.folk-emblem { width: 92px; height: 92px; }
[data-art="indigo"] { background: radial-gradient(120% 120% at 50% 0%, #3a5088, var(--indigo)); color: #E9D49B; }
[data-art="sunset"] { background: linear-gradient(160deg, #E5982A, #C0492A 70%, #842D18); color: #FCEBC8; }
[data-art="leaf"] { background: radial-gradient(120% 120% at 50% 0%, #6f9159, var(--leaf)); color: #E7EFD8; }
[data-art="terra"] { background: radial-gradient(120% 120% at 50% 0%, #d0613f, var(--terracotta)); color: #FBE4D5; }
[data-art="indigo2"] { background: linear-gradient(160deg, #3a5088, #21305A); color: #E9D49B; }
[data-art="maroon"] { background: radial-gradient(120% 120% at 50% 0%, #9a4040, var(--maroon)); color: #F2D9D2; }

/* ============ BANDS ============ */
.band { padding: clamp(56px, 8vw, 104px) 0; }
.band--paper { background: var(--paper); border-top: 1.5px solid var(--line-soft); border-bottom: 1.5px solid var(--line-soft); }
.band--cream2 { background: var(--cream-2); }
.band--cream3 { background: var(--cream-3); }
.band--ink { background: var(--ink); color: var(--cream); }
.band--terra { background: linear-gradient(165deg, var(--terracotta), var(--terracotta-8)); color: var(--cream); }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-8); margin-bottom: var(--s-12); flex-wrap: wrap; }
.section-head__lead { max-width: 30em; }
.section-head--center { flex-direction: column; align-items: center; text-align: center; }
.section-head--center .eyebrow { margin-bottom: var(--s-4); }
.eyebrow--light { color: var(--marigold); }
.eyebrow--light::before { background: var(--marigold); }

/* ============ STORY GRID ============ */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: var(--s-6); }
.story { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; border-color: color-mix(in oklab, var(--card-accent, var(--line)) 30%, var(--line-soft)); }
.story:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--card-accent, var(--line)) 68%, var(--line)); box-shadow: 0 16px 34px -16px color-mix(in oklab, var(--card-accent, #000) 52%, transparent); }
.story .value-tag { background: color-mix(in oklab, var(--card-accent, var(--marigold)) 15%, transparent); color: color-mix(in oklab, var(--card-accent, var(--marigold-7)) 78%, #241812); }
.story .value-tag .dot { background: var(--card-accent, var(--marigold-7)); }
.story__art { height: 140px; display: grid; place-items: center; }
.story__art--photo { overflow: hidden; }
.story__art-img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transform: scale(1.06); }
.story__art .folk-emblem { width: 70px; height: 70px; }
.story__body { padding: var(--s-5) var(--s-5) var(--s-6); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.story__name { font-family: var(--font-display); font-weight: var(--fw-x); font-size: 22px; line-height: 1.18; color: var(--ink); letter-spacing: -0.01em; }
.story__origin { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: var(--fw-semi); color: var(--ink-3); }
.story__meta-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-top: auto; padding-top: var(--s-3); }
.story__origin-flag svg { width: 20px; height: 13px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(52,37,26,.14); display: block; }
.featured__origin { display: flex; }
.featured__meta-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.story__deva { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 23px; line-height: 1.25; color: var(--ink); }
.story__tr { font-style: italic; color: var(--ink-3); font-size: 15px; margin-bottom: 2px; }
/* English UI → English story name leads; proverb + translit support, smaller */
[data-lang="en"] .story__deva { font-size: 17px; font-weight: var(--fw-semi); color: var(--ink-2); margin-top: 2px; }
[data-lang="en"] .story__tr { display: none; }
/* Hindi UI → Devanagari proverb leads; hide the English name */
[data-lang="hi"] .story__name { display: none; }
[data-lang="hi"] .story__tr { display: none; }

/* ============ COMING SOON ============ */
.soon-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-pill); font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 12.5px; letter-spacing: .03em; background: var(--marigold-tint); color: var(--marigold-7); }
.soon-badge svg { width: 13px; height: 13px; }
.soon-badge--light { background: rgba(255,251,242,.16); color: #FBEACB; }
.story { position: relative; }
.story__soon-tag { position: absolute; top: 12px; right: 12px; box-shadow: var(--sh-sm); }
.story__soon-note { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 13px; color: var(--ink-3); }
.story--soon { cursor: default; }
.story--soon:hover { transform: none; box-shadow: var(--sh-sm); border-color: var(--line-soft); }
.story--soon .story__art { filter: saturate(.5) opacity(.85); }
.story--soon .story__name, .story--soon .story__deva { color: var(--ink-2); }

/* "See more" tile at the end of the capped landing grid */
.story-more { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--s-3); padding: var(--s-6); min-height: 100%; cursor: pointer; background: color-mix(in oklab, var(--marigold) 9%, var(--paper)); border: 1.5px dashed color-mix(in oklab, var(--marigold) 48%, var(--line)); }
.story-more:hover { transform: translateY(-4px); border-color: var(--marigold); box-shadow: 0 16px 34px -16px color-mix(in oklab, var(--marigold) 45%, transparent); }
.story-more__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: var(--s-1); }
.story-more__grid span { width: 13px; height: 13px; border-radius: 4px; background: color-mix(in oklab, var(--marigold) 42%, var(--paper)); }
.story-more__title { font-family: var(--font-display); font-weight: var(--fw-x); font-size: 20px; line-height: 1.15; color: var(--ink); }
.story-more__count { font-size: 14px; color: var(--ink-3); margin-top: -4px; }
.story-more__go { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--terracotta); }
.story-more__go svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.story-more:hover .story-more__go svg { transform: translateX(4px); }

/* ============ ALL-STORIES PAGE (filters sidebar) ============ */
.stories-layout { display: grid; grid-template-columns: 250px 1fr; gap: clamp(24px, 3vw, 44px); align-items: start; }
/* Sticky sidebar must scroll independently once it is taller than the viewport,
   otherwise the lower filters can never be reached. Mirrors .col-filters. */
.filters { position: sticky; top: 92px; max-height: calc(100vh - 108px); overflow-y: auto;
  overscroll-behavior: contain; padding-right: 6px; scrollbar-width: thin; }
.filters__inner { display: flex; flex-direction: column; gap: var(--s-6); padding-bottom: var(--s-4); }
.filter-block { display: flex; flex-direction: column; gap: var(--s-3); }
.filter-block__title { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.filter-search { position: relative; display: flex; align-items: center; }
.filter-search__ico { position: absolute; left: 13px; width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }
.filter-search__input { width: 100%; font-family: inherit; font-size: 15px; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 10px 14px 10px 38px; transition: border-color var(--dur) var(--ease); }
.filter-search__input::placeholder { color: var(--ink-3); }
.filter-search__input:focus { outline: none; border-color: var(--terracotta); }
.filter-sort { display: flex; width: 100%; padding: 4px; }
.filter-sort button { flex: 1; padding: 7px 6px; font-size: 13px; }
.filter-list { display: flex; flex-direction: column; gap: 3px; }
.filter-opt { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 8px 11px; border-radius: var(--r); border: 1.5px solid transparent; background: transparent; cursor: pointer; font-family: var(--font-display); font-weight: var(--fw-semi); font-size: 14.5px; color: var(--ink-2); transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.filter-opt:hover { background: var(--paper); }
.filter-opt.is-active { background: color-mix(in oklab, var(--card-accent, var(--marigold)) 14%, var(--paper)); border-color: color-mix(in oklab, var(--card-accent, var(--marigold)) 55%, var(--line)); color: var(--ink); }
.filter-opt__dot { width: 11px; height: 11px; border-radius: 50%; flex: none; background: var(--card-accent, var(--marigold)); }
.filter-opt__flag { width: 20px; height: 13px; border-radius: 2px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px rgba(52,37,26,.14); }
.filter-opt__flag svg { width: 100%; height: 100%; display: block; }
.filter-opt__label { flex: 1; }
.filter-opt__count { font-size: 12.5px; font-weight: var(--fw-bold); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.filter-more { align-self: flex-start; margin-top: 2px; padding: 6px 11px; border: 0; background: none; cursor: pointer; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 13px; color: var(--terracotta); border-radius: var(--r); }
.filter-more:hover { background: var(--paper); }
.filters__reset { align-self: flex-start; border: 0; background: none; cursor: pointer; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 13.5px; color: var(--terracotta); padding: 2px 0; }
.filter-opt--soon { cursor: default; opacity: .55; }
.filter-opt--soon:hover { background: transparent; }
.filter-opt--soon .filter-opt__count { color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.filters__reset:hover { text-decoration: underline; }
.stories-main { min-width: 0; }
.stories-resultbar { display: flex; align-items: center; margin-bottom: var(--s-5); min-height: 22px; }
.stories-count { font-family: var(--font-display); font-size: 15px; color: var(--ink-2); }
.stories-count strong { color: var(--ink); }
.stories-empty { display: flex; flex-direction: column; align-items: center; gap: var(--s-4); text-align: center; padding: clamp(40px, 8vw, 90px) var(--s-6); color: var(--ink-3); }
.stories-empty[hidden] { display: none; }
.stories-empty svg { width: 40px; height: 40px; opacity: .55; }
.stories-empty p { font-family: var(--font-display); font-size: 18px; color: var(--ink-2); margin: 0; }
@media (max-width: 780px) {
  .stories-layout { grid-template-columns: 1fr; gap: var(--s-6); }
  .filters { position: static; max-height: none; overflow: visible; padding-right: 0; }
  .filter-list { flex-flow: row wrap; }
  .filter-opt { width: auto; }
  .filter-opt__count { margin-left: 2px; }
}

/* overlay for video screens that aren't ready */
.soon-overlay { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: var(--s-5); background: rgba(28,19,12,.6); backdrop-filter: blur(3px); }
.soon-overlay__ico { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,251,242,.18); color: var(--cream); }
.soon-overlay__ico svg { width: 25px; height: 25px; }
.soon-overlay__txt { font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--cream); font-size: 16px; }
.player--soon { cursor: default; }
.player--soon:hover { transform: none; }
.player--soon .player__play { display: none; }
.sp-player.is-soon { cursor: default; }
.sp-player.is-soon:hover { transform: none; }
.sp-player.is-soon .sp-player__play { display: none; }

/* listen bar — not ready */
.listen.is-soon { opacity: .9; }
.listen.is-soon .listen__btn { background: var(--ink-3); }
.listen.is-soon .listen__wave { display: none; }

/* story page coming-soon panel (non-ready stories) */
.story-page.is-soon .sp-readysec { display: none; }
.soon-panel { text-align: center; padding: clamp(32px, 5vw, 64px) var(--s-6); background: var(--paper); border: 1.5px dashed var(--line); border-radius: var(--r-xl); display: flex; flex-direction: column; align-items: center; gap: var(--s-3); }
.soon-panel__ico { width: 62px; height: 62px; border-radius: 50%; background: var(--marigold-tint); color: var(--marigold-7); display: grid; place-items: center; }
.soon-panel__ico svg { width: 30px; height: 30px; }
.soon-panel__title { font-family: var(--font-display); font-weight: var(--fw-x); font-size: clamp(24px, 3vw, 34px); color: var(--ink); margin: 0; }
.soon-panel__txt { color: var(--ink-2); max-width: 34em; margin: 0 0 var(--s-3); text-wrap: pretty; }

/* more-rail mini — not ready */
.mini { position: relative; }
.mini--soon { cursor: default; }
.mini--soon:hover { transform: none; box-shadow: var(--sh-sm); border-color: var(--line-soft); }
.mini--soon .mini__art { filter: saturate(.5) opacity(.85); }
.mini__soon { margin-left: auto; flex: none; padding: 4px 8px; }
.mini__soon svg { width: 13px; height: 13px; }
.tcard__soon { position: absolute; top: 8px; left: 8px; padding: 4px 9px; box-shadow: var(--sh-sm); }
.tcard__soon svg { width: 13px; height: 13px; }
.story__mean { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.55em * 3); }
.story__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-top: var(--s-3); flex-wrap: wrap; }
.story__langs { display: flex; gap: 5px; flex-wrap: wrap; }
.story__langnote { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: var(--fw-semi); font-size: 13px; color: var(--ink-3); }
.story__langnote svg { width: 15px; height: 15px; }
.story__lang { font-size: 11.5px; font-weight: var(--fw-bold); font-family: var(--font-display); color: var(--ink-3); border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 2px 9px; }

/* ============ WAYS ============ */
.ways-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.way { padding: var(--s-8) var(--s-6); text-align: center; }
.way__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: var(--r-lg); margin-bottom: var(--s-4); }
.way__icon svg { width: 30px; height: 30px; }
.way__icon[data-tint="terracotta"] { background: var(--terracotta-tint); color: var(--terracotta-7); }
.way__icon[data-tint="marigold"] { background: var(--marigold-tint); color: var(--marigold-7); }
.way__icon[data-tint="leaf"] { background: var(--leaf-tint); color: var(--leaf); }
.way h3 { margin-bottom: var(--s-2); }
.way p { color: var(--ink-2); font-size: 16px; margin: 0; }
@media (max-width: 820px) { .ways-grid { grid-template-columns: 1fr; } }

.lang-strip { display: flex; align-items: center; justify-content: center; gap: var(--s-3); margin-top: var(--s-10); padding: var(--s-4) var(--s-6); background: var(--paper); border: 1.5px dashed var(--line); border-radius: var(--r-pill); width: fit-content; margin-left: auto; margin-right: auto; font-weight: var(--fw-semi); color: var(--ink-2); }
.lang-strip__ico { width: 22px; height: 22px; color: var(--terracotta); flex: none; }

/* ============ WATCH ============ */
.watch__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.watch__title { color: var(--cream); }
.watch__lead { color: #E7D6BC; margin-bottom: var(--s-8); max-width: 26em; }
.player { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-xl); border: 1.5px solid rgba(255,255,255,.1); text-decoration: none; display: block; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.player:hover { transform: translateY(-3px); box-shadow: var(--sh-xl); }
.player:hover .player__play { transform: scale(1.08); }
.player__screen { position: relative; aspect-ratio: 16/9; display: grid; place-items: center; }
.player__screen .folk-emblem { width: 120px; height: 120px; opacity: .9; }
.player__play { position: absolute; width: 72px; height: 72px; border-radius: 50%; border: 0; background: rgba(255,251,242,.92); color: var(--terracotta); display: grid; place-items: center; box-shadow: var(--sh-lg); transition: transform var(--dur) var(--ease); }
.player__play svg { width: 28px; height: 28px; margin-left: 3px; }
.player__play:hover { transform: scale(1.08); }
.player__time { position: absolute; bottom: 12px; right: 14px; font-size: 13px; font-weight: var(--fw-bold); color: #fff; background: rgba(52,37,26,.6); padding: 3px 9px; border-radius: var(--r-pill); }
.player__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) var(--s-5); background: #2a1d13; }
.player__caption { display: flex; flex-direction: column; }
.player__caption strong { font-size: 19px; color: var(--cream); }
.player__caption span { font-size: 14px; color: #B89E82; }
@media (max-width: 820px) { .watch__grid { grid-template-columns: 1fr; } }

/* ============ VALUE GRID ============ */
.value-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: var(--s-4); }
.vcard { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); background: var(--paper); border: 1.5px solid var(--line-soft); border-radius: var(--r-lg); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.vcard:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--line); }
.vcard__ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.vcard__ico svg { width: 26px; height: 26px; }
.vcard__txt { display: flex; flex-direction: column; line-height: 1.2; }
.vcard__name { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 16.5px; color: var(--ink); }
.vcard__count { font-size: 13px; color: var(--ink-3); }
.vcard--soon { cursor: default; opacity: .58; }
.vcard--soon:hover { transform: none; box-shadow: none; border-color: var(--line-soft); }
.vcard--soon .vcard__count { font-style: italic; }
.vcard.is-active { border-color: var(--terracotta); box-shadow: var(--sh-md); background: var(--terracotta-tint); }
.vcard.is-active .vcard__count { color: var(--terracotta-7); font-weight: var(--fw-semi); }

/* ---- story filter bar ---- */
.story-filter { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-5); }
.story-filter__label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 15.5px; color: var(--ink); background: var(--terracotta-tint); border: 1.5px solid var(--terracotta); border-radius: 999px; padding: 7px 8px 7px 16px; }
.story-filter__label .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--terracotta); }
.story-filter__count { font-family: var(--font-body); font-weight: var(--fw-reg); font-size: 13.5px; color: var(--ink-3); }
.story-filter__clear { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: none; background: var(--terracotta); color: #fff; cursor: pointer; touch-action: manipulation; line-height: 0; transition: transform .15s ease, background .15s ease; }
.story-filter__clear:hover { transform: scale(1.08); background: var(--maroon); }
.story-filter__clear svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.story-filter__all { font-family: var(--font-body); font-weight: var(--fw-semi); font-size: 14px; color: var(--terracotta-7); text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 1px; touch-action: manipulation; }
@media (pointer: coarse) {
  .story-filter__clear { width: 44px; height: 44px; }
  .story-filter__clear svg { width: 16px; height: 16px; }
  .story-filter__label { padding: 5px 5px 5px 16px; }
  .story-filter__all { padding: 8px 4px; }
}
.story-filter__all:hover { color: var(--maroon); }
.story-grid.is-empty::after { content: ""; }

/* ============ CULTURE GRID ============ */
.culture-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-4); }
.culture-card { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); background: var(--paper); border: 1.5px solid var(--line-soft); border-radius: var(--r-lg); text-decoration: none; touch-action: manipulation; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); border-left: 4px solid var(--culture-accent, var(--terracotta)); }
.culture-card:not(.culture-card--soon):hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--line); border-left-color: var(--culture-accent); }
.culture-card--soon { opacity: 0.6; cursor: default; }
.culture__flag { font-size: 30px; line-height: 1; flex: none; }
.culture__flag svg { width: 40px; height: 27px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(52,37,26,.12); display: block; }
.culture__txt { display: flex; flex-direction: column; line-height: 1.25; gap: 2px; }
.culture__name { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 17px; color: var(--ink); }
.culture__count { font-size: 13px; color: var(--ink-3); }
.culture__soon { display: inline-flex; align-items: center; gap: 5px; font-weight: var(--fw-semi); color: var(--culture-accent, var(--ink-3)); }
.vcard__ico[data-tint="terracotta"] { background: var(--terracotta-tint); color: var(--terracotta-7); }
.vcard__ico[data-tint="marigold"]   { background: var(--marigold-tint);   color: var(--marigold-7); }
.vcard__ico[data-tint="leaf"]        { background: var(--leaf-tint);       color: var(--leaf); }
.vcard__ico[data-tint="indigo"]      { background: var(--indigo-tint);     color: var(--indigo); }
.vcard__ico[data-tint="maroon"]      { background: var(--maroon-tint);     color: var(--maroon); }

/* ============ APPS ============ */
.apps__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.apps__copy .lead { max-width: 30em; margin-bottom: var(--s-8); }
.apps__badges { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.store-badge { display: inline-flex; align-items: center; gap: var(--s-3); padding: 10px 20px 10px 16px; background: var(--ink); color: var(--cream); border-radius: var(--r); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }
.store-badge:hover { transform: translateY(-2px); background: #25180f; }
.store-badge__ico { width: 26px; height: 26px; flex: none; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.15; }
.store-badge small { font-size: 11px; opacity: .8; }
.store-badge strong { font-family: var(--font-display); font-size: 18px; }
.store-badge--sm { padding: 8px 16px 8px 12px; background: rgba(255,255,255,.08); }
.store-badge--sm:hover { background: rgba(255,255,255,.16); }
/* not-yet-shipped store badges: shown but inert */
.apps__badges--soon { margin-top: var(--s-4); }
.soon-badge { white-space: nowrap; }
.store-badge--soon { opacity: .55; cursor: default; pointer-events: none; }
.store-badge--soon:hover { transform: none; }

/* phone mock */
.apps__phone { display: grid; place-items: center; }
.phone { width: 270px; background: var(--ink); border-radius: 40px; padding: 12px; box-shadow: var(--sh-xl); position: relative; }
.phone__notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 86px; height: 22px; background: var(--ink); border-radius: var(--r-pill); z-index: 2; }
.phone__screen { background: var(--cream); border-radius: 30px; padding: 24px 13px 14px; display: flex; flex-direction: column; gap: 11px; min-height: 500px; overflow: hidden; }
.phone__status { display: flex; align-items: center; justify-content: space-between; padding: 0 5px; }
.phone__time { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 13px; color: var(--ink-2); }
.phone__status-ics { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.phone__status-ics svg { height: 11px; width: auto; fill: currentColor; }
.phone__appbar { display: flex; align-items: center; justify-content: space-between; padding: 0 3px; }
.phone__wordmark { font-family: var(--font-display); font-weight: var(--fw-x); font-size: 20px; color: var(--ink); }
.phone__wordmark b { color: var(--terracotta); font-weight: var(--fw-x); }
.phone__langchip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: var(--fw-bold); color: var(--terracotta); background: var(--marigold-tint); border-radius: var(--r-pill); padding: 3px 9px 3px 7px; }
.phone__langchip svg { width: 12px; height: 12px; }
.phone__feature { border-radius: 18px; overflow: hidden; background: var(--paper); border: 1.5px solid var(--line-soft); box-shadow: var(--sh-sm); }
.phone__feature-art { position: relative; height: 116px; display: grid; place-items: center; }
.phone__feature-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.phone__feature-art .folk-emblem { width: 58px; height: 58px; }
.phone__flag { position: absolute; top: 10px; left: 10px; width: 22px; height: 15px; border-radius: 3px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.phone__flag svg { display: block; width: 100%; height: 100%; }
.phone__play { position: absolute; bottom: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 11px; color: #fff; background: rgba(20,10,4,.5); border-radius: var(--r-pill); padding: 3px 9px 3px 7px; }
.phone__play svg { width: 10px; height: 10px; }
.phone__feature-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.phone__tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: var(--fw-semi); color: var(--marigold-7); }
.phone__tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--marigold-7); }
.phone__title { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 17px; line-height: 1.2; color: var(--ink); }
.phone__sub { font-size: 13px; color: var(--ink-3); }
.phone__ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.phone__way { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 4px; border-radius: 12px; background: var(--cream-2); font-family: var(--font-display); font-weight: var(--fw-semi); font-size: 11px; color: var(--ink-2); }
.phone__way svg { width: 18px; height: 18px; color: var(--terracotta); }
.phone__list { display: flex; flex-direction: column; gap: 9px; margin-top: 2px; }
.phone__item { display: flex; align-items: center; gap: 10px; }
.phone__thumb { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.phone__thumb .folk-emblem { width: 23px; height: 23px; }
.phone__item-txt { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.phone__item-txt b { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone__item-txt small { font-size: 11px; color: var(--ink-3); }
.phone__item-go { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
@media (max-width: 820px) { .apps__grid { grid-template-columns: 1fr; } .apps__phone { order: -1; } }

/* ============ MISSION ============ */
.mission { text-align: center; }
.mission__spark { width: 40px; height: 40px; color: var(--marigold); margin-bottom: var(--s-4); }
.mission__title { color: var(--cream); margin-bottom: var(--s-5); }
.mission__text { font-size: clamp(18px, 2vw, 22px); line-height: 1.65; color: #FBE4D5; text-wrap: pretty; margin: 0 auto var(--s-10); max-width: 36em; }
.mission__facts { display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(24px, 5vw, 72px); }
.fact { display: flex; flex-direction: column; gap: 2px; }
.fact strong { font-family: var(--font-display); font-weight: var(--fw-x); font-size: clamp(34px, 4vw, 48px); color: var(--marigold); line-height: 1; }
.fact span { font-size: 15px; color: #FBE4D5; }

/* ============ FOOTER ============ */
.footer { background: var(--ink); color: #C9B49C; padding: clamp(48px, 6vw, 72px) 0 var(--s-8); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: var(--s-12); }
.footer__tag { margin: var(--s-4) 0 var(--s-6); max-width: 26em; font-size: 16px; }
.footer__badges { gap: var(--s-3); }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-8); }
.footer__h { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--cream); margin-bottom: var(--s-4); }
.footer__col a { display: block; padding: 6px 0; font-size: 15.5px; color: #C9B49C; transition: color var(--dur) var(--ease); }
.footer__col a:hover { color: var(--marigold); }
.footer__base { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s-12); padding-top: var(--s-6); border-top: 1.5px solid rgba(255,255,255,.1); font-size: 14px; color: #9A8369; flex-wrap: wrap; gap: var(--s-3); }
.footer__made { display: inline-flex; align-items: center; gap: 7px; }
.footer__made svg { width: 16px; height: 16px; color: var(--terracotta); }
@media (max-width: 820px) { .footer__inner { grid-template-columns: 1fr; gap: var(--s-8); } }
@media (max-width: 560px) { .footer__cols { grid-template-columns: 1fr 1fr; gap: var(--s-6); } }

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .featured { max-width: 460px; }
}
@media (max-width: 860px) {
  .wrap, .wrap-narrow { padding: 0 var(--s-5); }
}

/* ============================================================
   STORY READING PAGE
   ============================================================ */
.story-page { padding: clamp(28px, 4vw, 48px) 0 0; }
.crumb { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-6); flex-wrap: wrap; }
.crumb a { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 15px; color: var(--ink-2); }
.crumb a:hover { color: var(--terracotta); }
.crumb a svg { width: 18px; height: 18px; }
.sp-share-wrap { position: relative; }
.crumb__actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.flip-btn { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 14px; color: var(--terracotta); background: var(--marigold-tint); border: 1.5px solid color-mix(in oklab, var(--marigold) 60%, var(--line)); border-radius: var(--r-pill); padding: 6px 15px 6px 12px; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease, background .15s ease; }
.flip-btn:hover { background: var(--marigold); color: var(--ink); border-color: var(--marigold); box-shadow: var(--sh-sm); }
.flip-btn:active { transform: scale(.96); }
.flip-btn svg { width: 17px; height: 17px; }
.sp-share { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 14px; color: var(--ink-2); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 6px 15px 6px 12px; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease; }
.sp-share:hover { color: var(--terracotta); border-color: var(--terracotta); box-shadow: var(--sh-sm); }
.sp-share:active { transform: scale(.96); }
.sp-share svg { width: 17px; height: 17px; }
.sp-share[aria-expanded="true"] { color: var(--terracotta); border-color: var(--terracotta); box-shadow: var(--sh-sm); }

/* share popover */
.share-pop { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: 288px; background: var(--paper); border: 1.5px solid var(--line-soft); border-radius: var(--r-lg); box-shadow: var(--sh-xl); padding: var(--s-4); transform-origin: top right; animation: sharePop .16s var(--ease); }
.share-pop::before { content: ""; position: absolute; top: -7px; right: 22px; width: 12px; height: 12px; background: var(--paper); border-left: 1.5px solid var(--line-soft); border-top: 1.5px solid var(--line-soft); transform: rotate(45deg); }
@keyframes sharePop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.share-pop__head { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 14.5px; color: var(--ink); margin: 2px 2px var(--s-3); }
.share-pop__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.share-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 4px; border-radius: var(--r-md); border: none; background: transparent; cursor: pointer; text-decoration: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background .14s ease; }
.share-opt:hover { background: var(--cream2, #f4ece0); }
.share-opt__ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.share-opt__ic svg { width: 21px; height: 21px; }
.share-opt__lbl { font-family: var(--font-body); font-weight: var(--fw-semi); font-size: 11.5px; color: var(--ink-2); }
.share-opt[data-net="whatsapp"] .share-opt__ic { background: #25D366; }
.share-opt[data-net="facebook"] .share-opt__ic { background: #1877F2; }
.share-opt[data-net="x"] .share-opt__ic { background: #000; }
.share-opt[data-net="telegram"] .share-opt__ic { background: #29A9EB; }
.share-opt[data-net="email"] .share-opt__ic { background: var(--ink-2); }
.share-opt[data-net="more"] .share-opt__ic { background: var(--terracotta); }
.share-copy { display: flex; align-items: center; gap: 8px; margin-top: var(--s-3); padding: 6px 6px 6px 12px; background: var(--cream2, #f4ece0); border: 1.5px solid var(--line-soft); border-radius: var(--r-pill); }
.share-copy__url { flex: 1; min-width: 0; font-family: var(--font-body); font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-copy__btn { flex: none; display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 12.5px; color: #fff; background: var(--terracotta); border: none; border-radius: var(--r-pill); padding: 6px 13px; cursor: pointer; touch-action: manipulation; transition: background .14s ease; }
.share-copy__btn svg { width: 14px; height: 14px; }
.share-copy__btn .ic-done { display: none; }
.share-copy__btn:hover { background: var(--maroon); }
.share-copy.is-copied .share-copy__btn { background: var(--leaf); }
.share-copy.is-copied .share-copy__btn .ic-link { display: none; }
.share-copy.is-copied .share-copy__btn .ic-done { display: inline-block; }

/* video-first hero player */
.sp-player { position: relative; display: block; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-xl); text-decoration: none; transition: transform var(--dur) var(--ease); }
.sp-player[hidden] { display: none; }
.sp-player:hover { transform: translateY(-3px); }
.sp-player__screen { position: relative; aspect-ratio: 16/9; display: grid; place-items: center; }
.sp-player__screen .folk-emblem { width: 132px; height: 132px; opacity: .92; }
.sp-player__play { position: absolute; width: 84px; height: 84px; border-radius: 50%; background: rgba(255,251,242,.94); color: var(--terracotta); display: grid; place-items: center; box-shadow: var(--sh-lg); transition: transform var(--dur) var(--ease); }
.sp-player:hover .sp-player__play { transform: scale(1.08); }
.sp-player__play svg { width: 34px; height: 34px; margin-left: 4px; }
.sp-player__meta { position: absolute; left: 18px; bottom: 16px; display: flex; align-items: center; gap: var(--s-3); }
.sp-player__chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: var(--fw-bold); color: #fff; background: rgba(52,37,26,.55); backdrop-filter: blur(4px); padding: 6px 12px; border-radius: var(--r-pill); }
.sp-player__chip svg { width: 15px; height: 15px; }

/* reading-language selector */
.read-bar { display: flex; align-items: center; gap: var(--s-4); margin: var(--s-8) 0 var(--s-6); flex-wrap: wrap; }
.read-bar__label { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 15px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 8px; }
.read-bar__label svg { width: 18px; height: 18px; color: var(--terracotta); }

/* text-size stepper (story read-bar + flipbook bar) */
.textsize { display: inline-flex; align-items: center; gap: 2px; border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 3px; background: var(--paper); }
.textsize__btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--ink-2);
  line-height: 1; border-radius: calc(var(--r-pill) - 3px); padding: 6px 10px;
  min-width: 38px; min-height: 34px; display: inline-grid; place-items: center;
  transition: background var(--dur, .15s), color var(--dur, .15s);
}
.textsize__btn[data-textsize="dec"] { font-size: 13px; }
.textsize__btn[data-textsize="inc"] { font-size: 19px; }
.textsize__btn:hover { background: var(--marigold-tint); color: var(--terracotta); }
.textsize__btn:disabled { opacity: .35; cursor: default; background: transparent; color: var(--ink-2); }
.textsize__val { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 40px; text-align: center; }

/* dark flipbook bar variant */
.flipbook__bar .textsize { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.06); }
.flipbook__bar .textsize__btn { color: var(--cream); }
.flipbook__bar .textsize__btn:hover { background: rgba(255,255,255,.16); color: var(--marigold); }
.flipbook__bar .textsize__btn:disabled { color: var(--cream); }
.flipbook__bar .textsize__val { color: rgba(255,255,255,.7); }

/* proverb block */
.sp-proverb { margin: var(--s-6) 0 var(--s-4); display: flex; flex-direction: column; }
.sp-logline { font-family: var(--font-display); font-weight: var(--fw-semi); font-size: clamp(19px, 2.1vw, 25px); line-height: 1.45; color: var(--ink-2); max-width: 28em; margin: 0 0 var(--s-12); text-wrap: pretty; }
.sp-deva { font-family: var(--font-display); font-weight: var(--fw-x); line-height: 1.2; color: var(--ink); }
.sp-tr { color: var(--ink-2); }
.sp-name { display: none; font-family: var(--font-display); font-weight: var(--fw-x); line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); }
/* Hindi → Devanagari proverb leads */
[data-read="hi"] .sp-deva { font-size: clamp(34px, 5.2vw, 60px); order: 1; }
[data-read="hi"] .sp-tr { order: 2; margin-top: 8px; font-size: clamp(18px, 2vw, 22px); font-style: italic; }
/* English → English story name leads, proverb + transliteration support */
[data-read="en"] .sp-name { display: block; order: 0; font-size: clamp(30px, 4.4vw, 52px); }
[data-read="en"] .sp-deva { order: 1; margin-top: 12px; font-size: clamp(22px, 2.6vw, 30px); font-weight: var(--fw-bold); color: var(--ink-2); }
[data-read="en"] .sp-tr { order: 2; margin-top: 4px; font-size: clamp(16px, 1.8vw, 19px); font-style: italic; color: var(--ink-3); }
/* Ukrainian → Ukrainian story name leads, proverb + transliteration support */
[data-read="uk"] .sp-name { display: block; order: 0; font-size: clamp(30px, 4.4vw, 52px); }
[data-read="uk"] .sp-deva { order: 1; margin-top: 12px; font-size: clamp(22px, 2.6vw, 30px); font-weight: var(--fw-bold); color: var(--ink-2); }
[data-read="uk"] .sp-tr { order: 2; margin-top: 4px; font-size: clamp(16px, 1.8vw, 19px); font-style: italic; color: var(--ink-3); }
/* Spanish → Spanish story name leads, proverb + transliteration support */
[data-read="es"] .sp-name { display: block; order: 0; font-size: clamp(30px, 4.4vw, 52px); }
[data-read="es"] .sp-deva { order: 1; margin-top: 12px; font-size: clamp(22px, 2.6vw, 30px); font-weight: var(--fw-bold); color: var(--ink-2); }
[data-read="es"] .sp-tr { order: 2; margin-top: 4px; font-size: clamp(16px, 1.8vw, 19px); font-style: italic; color: var(--ink-3); }
/* German → German story name leads */
[data-read="de"] .sp-name { display: block; order: 0; font-size: clamp(30px, 4.4vw, 52px); }
[data-read="de"] .sp-deva { order: 1; margin-top: 12px; font-size: clamp(22px, 2.6vw, 30px); font-weight: var(--fw-bold); color: var(--ink-2); }
[data-read="de"] .sp-tr { order: 2; margin-top: 4px; font-size: clamp(16px, 1.8vw, 19px); font-style: italic; color: var(--ink-3); }
/* Kannada → Kannada story name leads */
[data-read="kn"] .sp-name { display: block; order: 0; font-size: clamp(30px, 4.4vw, 52px); }
[data-read="kn"] .sp-deva { order: 1; margin-top: 12px; font-size: clamp(22px, 2.6vw, 30px); font-weight: var(--fw-bold); color: var(--ink-2); }
[data-read="kn"] .sp-tr { order: 2; margin-top: 4px; font-size: clamp(16px, 1.8vw, 19px); font-style: italic; color: var(--ink-3); }
/* Transliteration → romanized proverb leads */
[data-read="tr"] .sp-tr { order: 1; font-family: var(--font-display); font-weight: var(--fw-x); font-style: normal; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.14; letter-spacing: -0.01em; color: var(--ink); }
[data-read="tr"] .sp-deva { order: 2; margin-top: 10px; font-size: clamp(22px, 2.6vw, 30px); font-weight: var(--fw-bold); color: var(--ink-2); }
/* in English the hero already shows the name → don't repeat it as the story heading */
[data-read="en"] .sp-title { display: none; }
[data-read="uk"] .sp-title { display: none; }
[data-read="es"] .sp-title { display: none; }
[data-read="de"] .sp-title { display: none; }
[data-read="kn"] .sp-title { display: none; }

/* Story header shows ONLY the localized title (no giveaway proverb line) */
.sp-proverb .sp-deva, .sp-proverb .sp-tr { display: none !important; }
.sp-name { display: block !important; order: 0 !important; font-size: clamp(30px, 4.6vw, 54px) !important; }
.sp-title { display: none !important; }

/* reading-language picker (primary pills + More dropdown) */
.read-picker { display: inline-flex; align-items: center; gap: var(--s-2); }
/* compact "all languages" variant — every language as a small short-code chip */
.read-picker--all { display: block; }
.read-picker--all .lang-seg { display: flex; flex-wrap: wrap; gap: 5px; width: 100%; border-radius: var(--r-lg); }
.read-picker--all .lang-seg button { padding: 6px 11px; font-size: 12.5px; }
.read-more { position: relative; }
.rp-more-btn { display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--cream-2); color: var(--ink-2); font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 14px; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.rp-more-btn:hover { border-color: var(--ink-3); color: var(--ink); }
.rp-more-btn.is-active { background: var(--paper); color: var(--terracotta); border-color: var(--terracotta); box-shadow: var(--sh-xs); }
.rp-more-caret { width: 15px; height: 15px; transition: transform var(--dur) var(--ease); }
.rp-more-btn[aria-expanded="true"] .rp-more-caret { transform: rotate(180deg); }
.read-more__menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; min-width: 168px; padding: 6px; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-lg); display: flex; flex-direction: column; gap: 2px; }
.read-more__menu[hidden] { display: none; }
.read-more__menu button { text-align: left; border: 0; background: transparent; color: var(--ink); font-family: var(--font-display); font-weight: var(--fw-semi); font-size: 15px; padding: 9px 12px; border-radius: var(--r-sm); transition: background var(--dur) var(--ease); }
.read-more__menu button:hover { background: var(--cream-2); }
.read-more__menu button.active { background: var(--marigold-tint); color: var(--marigold-7); }

.sp-section { margin: 0 0 var(--s-12); }
.sp-kicker { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--terracotta); margin: 0 0 var(--s-3); display: flex; align-items: center; gap: var(--s-2); }
.sp-kicker::before { content: ""; width: 22px; height: 2px; background: var(--marigold); border-radius: 2px; }
.sp-meaning { font-size: calc(clamp(19px, 2vw, 24px) * var(--read-scale, 1)); line-height: 1.55; color: var(--ink); text-wrap: pretty; margin: 0; max-width: 30em; }
.sp-title { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: clamp(26px, 3vw, 38px); color: var(--ink); margin: 0 0 var(--s-5); }
.sp-body { font-size: calc(clamp(17px, 1.7vw, 20px) * var(--read-scale, 1)); line-height: 1.75; color: var(--ink); max-width: 34em; }
.sp-body p { margin: 0 0 var(--s-5); text-wrap: pretty; }
.sp-illus { float: right; width: clamp(150px, 22vw, 230px); aspect-ratio: 1; border-radius: var(--r-xl); display: grid; place-items: center; margin: 0 0 var(--s-5) var(--s-8); box-shadow: var(--sh-md); }
.sp-illus .folk-emblem { width: 46%; height: 46%; }
@media (max-width: 640px) { .sp-illus { float: none; width: 100%; margin: 0 0 var(--s-6); aspect-ratio: 16/10; } }

/* illustrated story scenes (image + paragraph per scene) */
.scene-block { background: var(--paper); border: 1.5px solid var(--line-soft); border-radius: var(--r-2xl); padding: var(--s-5); margin: 0 0 var(--s-10); box-shadow: var(--sh-sm); }
.scene-block:last-child { margin-bottom: 0; }
.scene-fig { margin: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.scene-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--sh-md); background: var(--cream-2); display: block; }
.scene-text { font-size: calc(clamp(17px, 1.7vw, 20px) * var(--read-scale, 1)); line-height: 1.75; color: var(--ink); margin: var(--s-5) 0 0; text-wrap: pretty; white-space: pre-line; }
.scene-block:has(.scene-fig--reminder) { background: var(--cream-2); border-style: dashed; }
.scene-fig--reminder .scene-img { aspect-ratio: 16/10; }
/* Placeholder shown when a scene's artwork has not been drawn yet, so a
   text-first story reads as intentional rather than broken. */
.scene-ph { width: 100%; aspect-ratio: 16/9; border-radius: var(--r-lg); background: var(--cream-2);
  border: 1px dashed var(--line); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: var(--s-2); color: var(--ink-3); }
.scene-ph__ico { width: 34px; height: 34px; opacity: .55; }
.scene-ph__txt { font-size: var(--fs-sm); letter-spacing: .02em; opacity: .8; }
.sp-body:has(.scene-block) { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ============================================================
   FLIPBOOK reader
   ============================================================ */
html.flip-lock, html.flip-lock body { overflow: hidden; }
.flip-open { margin-left: auto; }
.crumb__actions .flip-open { margin-left: 0; }
.read-bar .textsize { margin-left: auto; }
.flipbook {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(120,82,34,.45), transparent 70%),
    linear-gradient(170deg, #2c2013, #1c130c 70%);
  background-color: #1c130c;
}
.flipbook[hidden] { display: none; }
.flipbook__bar { display: flex; align-items: center; justify-content: space-between; padding: var(--s-4) var(--s-6); color: var(--cream); }
.flipbook__brand { display: inline-flex; align-items: center; gap: var(--s-2); font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 16px; color: var(--marigold); }
.flipbook__brand svg { width: 20px; height: 20px; }
.flipbook__title { color: var(--cream); }
.flipbook__bar-right { display: flex; align-items: center; gap: var(--s-3); }
.flipbook__seclang { display: inline-flex; align-items: center; gap: var(--s-2); }
.flipbook__seclang-lbl { font-size: 13px; color: rgba(255,255,255,.6); white-space: nowrap; }
.flipbook__seclang select {
  font: inherit; font-size: 14px; color: var(--cream);
  background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.2);
  border-radius: var(--r-pill); padding: 8px 30px 8px 14px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23F7ECD9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.flipbook__seclang select:hover { background-color: rgba(255,255,255,.16); }
.flipbook__seclang select option { color: #1c130c; }
@media (max-width: 620px) { .flipbook__seclang-lbl { display: none; } }
/* stacked bilingual text in the flipbook */
.fpage__texts { flex: 1; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; }
.fpage__texts .fpage__text { flex: none; }
.fpage__text--sec { color: var(--ink-3); border-top: 1.5px dashed var(--line); padding-top: var(--s-5); }
/* bilingual mode: shrink the art so both languages fit without scrolling */
.fpage--bi .fpage__art { aspect-ratio: auto; height: 40%; max-height: 42vh; flex: none; }
.fpage--bi .fpage__texts { padding-bottom: var(--s-4); }
.fpage--bi .fpage__text { padding-top: var(--s-4); padding-bottom: 0; font-size: calc(clamp(15px, 1.3vw, 18px) * var(--read-scale, 1)); line-height: 1.55; }
.fpage--bi .fpage__text--sec { padding-top: var(--s-4); margin-top: var(--s-4); }
.fpage__cover-name--sec { color: var(--terracotta); font-size: clamp(22px, 3.6vw, 34px); opacity: .85; }
.fpage__moral--sec { color: var(--ink-3); font-size: calc(clamp(18px, 2.6vw, 26px) * var(--read-scale, 1)); opacity: .9; }
.flipbook__audio { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: var(--cream); display: grid; place-items: center; cursor: pointer; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.flipbook__audio:hover { background: rgba(255,255,255,.14); }
.flipbook__audio svg { width: 20px; height: 20px; }
.flipbook__audio.is-on { background: var(--marigold); border-color: var(--marigold); color: var(--ink); }
.flipbook__audio .ka-ic-pause, .flipbook__audio .ka-ic-play { display: none; }
.flipbook__audio.is-on .ka-ic-idle { display: none; }
.flipbook__audio.is-on .ka-ic-pause { display: block; }
.flipbook__audio.is-on.is-paused .ka-ic-pause { display: none; }
.flipbook__audio.is-on.is-paused .ka-ic-play { display: block; }
/* karaoke read-along highlight */
.ka-w { border-radius: 5px; transition: background-color .14s ease, color .14s ease, box-shadow .14s ease; }
.ka-w.ka-on { background: var(--marigold); color: var(--ink); box-shadow: 0 0 0 3px var(--marigold); }
/* transient status toast + no-voice help panel */
.flip-note { position: absolute; left: 50%; bottom: 22px; transform: translate(-50%, 12px); max-width: min(90%, 460px); background: var(--ink); color: var(--cream); font-size: 14px; line-height: 1.45; padding: 12px 16px; border-radius: var(--r-sm); box-shadow: 0 12px 34px -10px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 30; }
.flip-note.show { opacity: 1; transform: translate(-50%, 0); }
.flip-help { position: absolute; right: 20px; top: 76px; width: min(92vw, 380px); background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 20px 50px -14px rgba(52,37,26,.5); padding: 20px 22px; z-index: 40; }
.flip-help__x { position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--ink-3); font-size: 22px; line-height: 1; cursor: pointer; border-radius: 50%; }
.flip-help__x:hover { background: var(--cream-2); color: var(--ink); }
.flip-help__title { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 18px; color: var(--ink); margin: 0 26px 6px 0; }
.flip-help__lead { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: 0 0 12px; }
.flip-help__steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--ink); }
.flip-help__steps b { font-weight: var(--fw-semi); }
.flipbook__close { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.45); background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
.flipbook__close:hover { background: rgba(255,255,255,.14); }
.flipbook__close svg { width: 20px; height: 20px; }

.flipbook__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: var(--s-5); padding: 0 var(--s-5) var(--s-3); perspective: 2200px; }
.flipbook__nav { flex: none; width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: var(--cream); display: grid; place-items: center; transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.flipbook__nav:hover:not(:disabled) { background: rgba(255,255,255,.18); transform: translateY(-2px); }
.flipbook__nav:disabled { opacity: .3; cursor: default; }
.flipbook__nav svg { width: 26px; height: 26px; }
.flipbook__nav--m { display: none; }

.flipbook__book { position: relative; width: min(860px, 92vw); height: min(82vh, 860px); transform-style: preserve-3d; }
.flip-leaf {
  position: absolute; inset: 0; overflow: auto;
  background: var(--paper); border-radius: var(--r-lg);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.6);
  transform-origin: left center; backface-visibility: hidden;
  transition: transform .64s cubic-bezier(.46,.03,.28,1), box-shadow .64s;
  border: 1px solid rgba(0,0,0,.08);
}
.flip-leaf.turn-out { transform: rotateY(-122deg); box-shadow: 40px 0 80px rgba(0,0,0,.4); }
.flip-leaf.pre-in { transform: rotateY(-122deg); }

/* page contents */
.fpage { min-height: 100%; display: flex; flex-direction: column; }
.fpage__art { width: 100%; aspect-ratio: 16/9; flex: none; overflow: hidden; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--cream-2); }
.fpage__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fpage__text { padding: var(--s-6) clamp(20px, 4vw, 40px) var(--s-8); font-size: calc(clamp(17px, 1.5vw, 21px) * var(--read-scale, 1)); line-height: 1.7; color: var(--ink); text-wrap: pretty; flex: 1; white-space: pre-line; }
.fpage--rem .fpage__art { aspect-ratio: auto; flex: 1; border-radius: var(--r-lg); }

/* cover + end pages */
.fpage--cover, .fpage--end { align-items: center; justify-content: center; text-align: center; gap: var(--s-3); padding: clamp(32px, 6vw, 64px); background: radial-gradient(120% 80% at 50% 0%, var(--marigold-tint), var(--paper) 70%); overflow-y: auto; }
.fpage__eyebrow { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--terracotta); }
.fpage__cover-name { font-family: var(--font-display); font-weight: var(--fw-x); font-size: clamp(30px, 5vw, 46px); line-height: 1.1; color: var(--ink); margin-top: var(--s-2); }
.fpage__cover-deva { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: clamp(22px, 3vw, 30px); color: var(--terracotta); margin-top: var(--s-2); }
.fpage__cover-tr { font-style: italic; color: var(--ink-3); font-size: 16px; }
.fpage__hint { margin-top: var(--s-8); font-size: 14px; color: var(--ink-3); }
.fpage__moral { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: calc(clamp(22px, 3.2vw, 32px) * var(--read-scale, 1)); line-height: 1.4; color: var(--ink); max-width: 18em; margin: var(--s-3) 0; text-wrap: pretty; }
.fpage__theend { font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--marigold-7); letter-spacing: .1em; margin-top: var(--s-4); }
.fpage__next { display: inline-flex; align-items: center; gap: 12px; margin-top: var(--s-7); padding: 12px 20px; border-radius: 999px; background: var(--maroon); color: #fff; text-decoration: none; box-shadow: var(--sh-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.fpage__next:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.fpage__next-k { font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; opacity: .8; }
.fpage__next-t { font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.fpage__next-arrow { font-size: 20px; line-height: 1; transition: transform var(--dur) var(--ease); }
.fpage__next:hover .fpage__next-arrow { transform: translateX(3px); }

.flipbook__foot { display: flex; align-items: center; justify-content: center; gap: var(--s-5); padding: var(--s-3) var(--s-5) var(--s-5); color: #C9B49C; }
.flipbook__counter { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 14px; font-variant-numeric: tabular-nums; min-width: 64px; text-align: center; }

/* ============================================================
   FLASHCARDS
   ============================================================ */
.cards {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(120,82,34,.45), transparent 70%),
    linear-gradient(170deg, #2c2013, #1c130c 70%);
  background-color: #1c130c;
}
.cards[hidden] { display: none; }
.cards__lbl { font-family: var(--font-display); font-weight: var(--fw-semi); font-size: 13px; color: #C9B49C; margin-right: 2px; }
.cards__langs { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); flex-wrap: wrap; }
.cards__langs button { color: var(--cream); font-size: 13px; padding: 6px 11px; }
.cards__langs button[aria-selected="true"] { background: var(--marigold); color: var(--ink); box-shadow: none; }
.cards__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: var(--s-5); padding: 0 var(--s-5); perspective: 1600px; }
.cards__scene { display: flex; flex-direction: column; align-items: center; gap: var(--s-5); }
.cards__card { width: min(440px, 82vw); height: min(300px, 52vh); position: relative; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.4,.2,.2,1); cursor: pointer; border: 0; background: none; padding: 0; font: inherit; color: inherit; }
.cards__card.is-flipped { transform: rotateY(180deg); }
.cards__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-3); border-radius: var(--r-2xl); padding: var(--s-8); text-align: center; box-shadow: var(--sh-xl); }
.cards__face--front { background: linear-gradient(160deg, #FFFBF2, #F6E9CE); color: var(--ink); }
.cards__face--back { background: linear-gradient(160deg, #E5982A, #C0492A 78%); color: #fff; transform: rotateY(180deg); }
.cards__lang-name { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .68; }
.cards__word { font-family: var(--font-display); font-weight: var(--fw-x); font-size: clamp(30px, 6vw, 50px); line-height: 1.1; }
.cards__face--front .cards__word { color: var(--terracotta); }
.cards__sep { width: 44px; height: 1.5px; background: currentColor; opacity: .2; border-radius: 2px; margin: 3px 0; }
.cards__lang-name--sec { opacity: .5; }
.cards__word--sec { font-size: clamp(20px, 3.6vw, 32px); opacity: .95; }
.cards__face--front .cards__word--sec { color: #8a5228; }
.cards__card--bi .cards__face { gap: 7px; }
.cards__card--bi .cards__face--front .cards__word { font-size: clamp(23px, 4.4vw, 38px); }
.cards__tr-line { font-size: 16px; line-height: 1.3; opacity: .95; }
.cards__tr-rom { font-style: italic; opacity: .8; }
.cards__speak { margin-top: var(--s-2); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; border: 1.6px solid currentColor; background: transparent; color: inherit; opacity: .82; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.cards__speak:hover { opacity: 1; transform: scale(1.06); }
.cards__speak:active { transform: scale(.94); }
.cards__speak svg { width: 22px; height: 22px; }
.cards__hint { font-family: var(--font-display); font-weight: var(--fw-semi); font-size: 13px; color: #C9B49C; }
.cards__actions { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); margin-top: var(--s-4); }
.cards__play { display: inline-flex; align-items: center; gap: var(--s-2); padding: 10px 20px; border-radius: 999px; cursor: pointer;
  border: 1.6px solid var(--saffron, #E08A2B); background: transparent; color: var(--saffron, #E08A2B);
  font-family: var(--font-display); font-weight: var(--fw-semi); font-size: 15px; transition: transform .12s ease, background .15s ease, color .15s ease; }
.cards__play:hover { background: var(--saffron, #E08A2B); color: #fff; transform: translateY(-1px); }
.cards__play:active { transform: translateY(0) scale(.97); }
.cards__play svg { width: 20px; height: 20px; }
.cards__voicenote { display: none; }
.cards__voicenote.is-shown, .cards__voicenote:not([hidden]) { display: block; }
.cards__voicenote { max-width: 340px; margin: var(--s-3) auto 0; padding: 10px 14px; border-radius: 12px;
  background: rgba(224,138,43,.12); border: 1px solid rgba(224,138,43,.4); color: #E9D6BE;
  font-family: var(--font-body); font-size: 13px; line-height: 1.45; text-align: center;
  opacity: 0; transform: translateY(4px); transition: opacity .3s ease, transform .3s ease; }
.cards__voicenote.is-shown { opacity: 1; transform: none; }
.cards__voicenote strong { color: var(--saffron, #E08A2B); font-weight: var(--fw-semi); }
.cards__foot { display: flex; align-items: center; justify-content: center; gap: var(--s-5); padding: var(--s-3) var(--s-5) var(--s-6); color: #C9B49C; }
.cards-kn { font-family: "Baloo Tamma 2", var(--font-display); }
@media (max-width: 720px) {
  .cards__stage > .flipbook__nav { display: none; }
  .cards__card { width: 88vw; height: 58vh; max-height: 360px; }
  /* Restructure the top bar: brand + close on the first line,
     language chips + secondary select wrap onto their own line. */
  .cards__bar { flex-wrap: wrap; row-gap: var(--s-2); padding: calc(var(--s-3) + env(safe-area-inset-top, 0px)) var(--s-4) var(--s-3); position: relative; }
  .cards__bar .flipbook__close { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; }
  .cards__bar .flipbook__brand { padding-right: 48px; }
  .cards__bar .flipbook__bar-right { flex-basis: 100%; flex-wrap: wrap; gap: var(--s-2); justify-content: flex-start; }
  .cards__bar .cards__lbl { display: none; }
  .cards__langs { flex: 1 1 0; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cards__langs::-webkit-scrollbar { display: none; }
  .cards__langs button { padding: 6px 9px; font-size: 12.5px; flex: none; }
  .cards__seclang { flex: 0 1 auto; }
  .cards__seclang select { font-size: 13px; padding: 6px 26px 6px 10px; max-width: 46vw; }
  .cards__lbl { display: none; }
}

@media (max-width: 720px) {
  .flipbook__stage > .flipbook__nav { display: none; }
  .flipbook__nav--m { display: grid; width: 48px; height: 48px; }
  .flipbook__nav--m svg { width: 22px; height: 22px; }
  .flipbook__book { width: 94vw; height: auto; min-height: 0; max-height: calc(100dvh - 150px); }
  .flip-leaf { position: relative; }
  .flipbook__stage { padding: 0 var(--s-3) var(--s-2); align-items: stretch; }
  /* keep the top bar from crowding: let the title shrink, compact the stepper */
  .flipbook__title { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .flipbook__bar .textsize__btn { min-width: 32px; padding: 5px 7px; }
  /* two-row bar: brand + close pinned on line one, controls wrap below */
  .flipbook__bar:not(.cards__bar) { flex-wrap: wrap; row-gap: var(--s-2); padding: calc(var(--s-3) + env(safe-area-inset-top, 0px)) var(--s-4) var(--s-3); position: relative; }
  .flipbook__bar:not(.cards__bar) .flipbook__brand { padding-right: 48px; }
  .flipbook__bar:not(.cards__bar) .flipbook__close { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; }
  .flipbook__bar:not(.cards__bar) .flipbook__bar-right { flex-basis: 100%; flex-wrap: wrap; gap: var(--s-2); justify-content: flex-start; }
  .flipbook__seclang select { font-size: 13px; padding: 6px 26px 6px 10px; max-width: 44vw; }
}
@media (prefers-reduced-motion: reduce) {
  .flip-leaf { transition: opacity .2s linear; }
  .flip-leaf.turn-out, .flip-leaf.pre-in { transform: none; opacity: 0; }
}

/* moral callout */
.sp-moral { background: linear-gradient(160deg, var(--marigold-tint), #FBF3E2); border: 1.5px solid var(--marigold); border-radius: var(--r-xl); padding: clamp(24px, 3vw, 40px); display: flex; gap: var(--s-5); align-items: flex-start; box-shadow: var(--sh-sm); }
.sp-moral__ico { flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--marigold); color: var(--white); display: grid; place-items: center; }
.sp-moral__ico svg { width: 28px; height: 28px; }
.sp-moral__txt .sp-kicker { color: var(--marigold-7); }
.sp-moral__txt .sp-kicker::before { background: var(--marigold-7); }
.sp-moral__line { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: calc(clamp(20px, 2.3vw, 28px) * var(--read-scale, 1)); line-height: 1.35; color: var(--ink); margin: 0; text-wrap: pretty; }

/* listen bar */
.listen { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-8); padding: var(--s-4) var(--s-5); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-pill); }
.listen__btn { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; }
.listen__btn svg { width: 22px; height: 22px; }
.listen__txt { font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--ink); }
.listen__sub { font-size: 14px; color: var(--ink-3); font-family: var(--font-body); font-weight: var(--fw-reg); }
.listen__wave { margin-left: auto; display: flex; align-items: center; gap: 3px; height: 28px; }
.listen__wave span { width: 3px; background: var(--line); border-radius: 2px; }

/* more kahavats rail */
.more-rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s-5); }
.mini { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3); background: var(--paper); border: 1.5px solid var(--line-soft); border-radius: var(--r-lg); text-decoration: none; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.mini:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--line); }
.mini__art { flex: none; width: 60px; height: 60px; border-radius: 12px; display: grid; place-items: center; }
.mini__art .folk-emblem { width: 32px; height: 32px; }
.mini__deva { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 16px; color: var(--ink); line-height: 1.25; }
.mini__tr { font-size: 12.5px; color: var(--ink-3); font-style: italic; }
.mini--all { justify-content: flex-start; }
.mini--all .mini__art { background: var(--marigold-tint, #f6e6c4); color: var(--terracotta); }
.mini--all .mini__art svg { width: 24px; height: 24px; }
.mini--all .mini__deva { color: var(--terracotta); }

/* ============================================================
   FILM THEATER PAGE
   ============================================================ */
.theater { background: #1c130c; min-height: 100vh; }
.theater__inner { max-width: 1120px; margin: 0 auto; padding: clamp(20px, 3vw, 36px) var(--s-8) var(--s-16); }
.theater .crumb a { color: #C9B49C; }
.theater .crumb a:hover { color: var(--marigold); }
.tscreen { position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 16/9; display: grid; place-items: center; box-shadow: var(--sh-xl); }
.tscreen .folk-emblem { width: clamp(140px, 20vw, 220px); height: clamp(140px, 20vw, 220px); opacity: .9; }
.tscreen__play { position: absolute; width: 96px; height: 96px; border-radius: 50%; background: rgba(255,251,242,.95); color: var(--terracotta); display: grid; place-items: center; box-shadow: var(--sh-lg); border: 0; transition: transform var(--dur) var(--ease); cursor: pointer; }
.tscreen__play:hover { transform: scale(1.08); }
.tscreen__play svg { width: 40px; height: 40px; margin-left: 5px; }
/* scrubber */
.tbar { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-4); color: #C9B49C; }
.tbar__time { font-size: 14px; font-weight: var(--fw-semi); font-variant-numeric: tabular-nums; }
.tbar__track { flex: 1; height: 6px; border-radius: var(--r-pill); background: rgba(255,255,255,.14); overflow: hidden; }
.tbar__fill { height: 100%; width: 8%; background: var(--marigold); border-radius: var(--r-pill); }
.tbar__ico { width: 20px; height: 20px; }

.tmeta { display: grid; grid-template-columns: 1fr auto; gap: var(--s-6); align-items: start; margin-top: var(--s-8); padding-bottom: var(--s-8); border-bottom: 1.5px solid rgba(255,255,255,.1); }
.tmeta__deva { font-family: var(--font-display); font-weight: var(--fw-x); font-size: clamp(28px, 3.4vw, 44px); color: var(--cream); line-height: 1.15; }
.tmeta__tr { font-style: italic; color: #B89E82; font-size: clamp(16px, 1.6vw, 19px); margin-top: 6px; }
.tmeta__logline { color: #D8C6AE; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; margin: var(--s-4) 0 0; max-width: 40em; }
.tmeta__side { display: flex; flex-direction: column; gap: var(--s-3); align-items: flex-start; }
@media (max-width: 720px) { .tmeta { grid-template-columns: 1fr; } }

.tnext { margin-top: var(--s-10); }
.tnext__h { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: #B89E82; margin: 0 0 var(--s-5); }
.tnext__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-5); }
.tcard { text-decoration: none; transition: transform var(--dur) var(--ease); }
.tcard:hover { transform: translateY(-4px); }
.tcard__thumb { position: relative; aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; display: grid; place-items: center; box-shadow: var(--sh-md); }
.tcard__thumb .folk-emblem { width: 56px; height: 56px; opacity: .92; }
.tcard__thumb .player__time { position: absolute; bottom: 8px; right: 8px; }
.tcard__play { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,251,242,.92); color: var(--terracotta); display: grid; place-items: center; opacity: 0; transition: opacity var(--dur) var(--ease); }
.tcard__play svg { width: 20px; height: 20px; margin-left: 2px; }
.tcard:hover .tcard__play { opacity: 1; }
.tcard__deva { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 16px; color: var(--cream); margin-top: var(--s-3); line-height: 1.25; }
.tcard__tr { font-size: 12.5px; color: #B89E82; font-style: italic; }
.theater .btn--ghost { color: var(--cream); border-color: rgba(255,255,255,.25); }
.theater .btn--ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }

/* ============================================================
   RESPONSIVE — phones & small tablets
   ============================================================ */
@media (max-width: 880px) {
  .featured { max-width: 520px; width: 100%; margin: 0 auto; }
}
@media (max-width: 720px) {
  .theater__inner { padding-left: var(--s-5); padding-right: var(--s-5); }
  .tmeta__side { width: 100%; }
  .tmeta__side .btn { width: 100%; }
}
@media (max-width: 600px) {
  .story-grid { grid-template-columns: 1fr; }
  .more-rail { grid-template-columns: 1fr; }
  .tnext__grid { grid-template-columns: 1fr 1fr; }
  .hero__cta .btn { width: 100%; }
  .hero__meta { font-size: 14px; }
  .sp-illus { float: none; width: 100%; margin: 0 0 var(--s-6); aspect-ratio: 16/10; }
  .read-bar { gap: var(--s-3); }
  .listen__sub { font-size: 13px; }
  /* Compact story action bar: keep All-stories + value tag on the top line,
     collapse Flipbook/Flashcards/Share to icon-only chips on one tidy row. */
  .crumb { gap: var(--s-2) var(--s-3); margin-bottom: var(--s-5); }
  .crumb > a { order: 1; }
  .crumb .value-tag { order: 2; }
  .crumb__actions { order: 3; flex-basis: 100%; margin-left: 0; gap: var(--s-2); }
  .crumb__actions .flip-btn .t,
  .crumb__actions .sp-share__lbl { display: none; }
  .crumb__actions .flip-btn,
  .crumb__actions .sp-share { padding: 9px 12px; gap: 0; }
  .crumb__actions .flip-btn svg,
  .crumb__actions .sp-share svg { width: 19px; height: 19px; }
  /* Reading settings condensed to a single row: hide the "Read in" label,
     short-code language pills + More, text-size stepper (no % readout). */
  .read-bar { flex-wrap: nowrap; gap: var(--s-2); margin: var(--s-5) 0 var(--s-5); }
  .read-bar__label { display: none; }
  .read-picker { flex: 0 1 auto; min-width: 0; gap: 6px; }
  .read-picker .lang-seg { flex: 0 1 auto; }
  .read-bar .textsize { margin-left: auto; flex: none; }
  .read-bar .textsize__val { display: none; }
  .rp-more-btn { padding: 8px 11px; }
}
@media (max-width: 420px) {
  body { font-size: 16px; }
  .h1 { font-size: 36px; }
  .tnext__grid { grid-template-columns: 1fr; }
  .lang-seg button { padding: 8px 13px; }
  .sp-moral { flex-direction: column; gap: var(--s-3); padding: var(--s-5); }
  .listen { flex-wrap: wrap; }
  .listen__wave { display: none; }
}

/* ---- transport controls ---- */
.tscreen__play { transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.tscreen.playing .tscreen__play { opacity: 0; pointer-events: none; }
.tcontrols { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-5); }
.tctrl { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: var(--cream); display: grid; place-items: center; transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.tctrl:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.tctrl svg { width: 22px; height: 22px; }
.tctrl--lg { width: 60px; height: 60px; background: var(--marigold); border-color: var(--marigold); color: var(--ink); }
.tctrl--lg:hover { background: var(--marigold-7); color: #fff; }
.tctrl--lg svg { width: 28px; height: 28px; }
.autoplay { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); color: #C9B49C; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 14px; }
.switch { width: 48px; height: 27px; border-radius: var(--r-pill); background: rgba(255,255,255,.18); border: 0; position: relative; transition: background var(--dur) var(--ease); flex: none; cursor: pointer; }
.switch__dot { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform var(--dur) var(--ease); box-shadow: var(--sh-sm); }
.switch[aria-checked="true"] { background: var(--marigold); }
.switch[aria-checked="true"] .switch__dot { transform: translateX(21px); }

/* ---- end-card (autoplay next) ---- */
.tend { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-3); padding: var(--s-6); background: rgba(20,13,8,.84); backdrop-filter: blur(8px); text-align: center; }
.tend__label { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--marigold); }
.tend__ring { position: relative; width: 84px; height: 84px; margin: var(--s-1) 0; }
.tend__ring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.tend__ring circle { fill: none; stroke-width: 5; }
.tend__ring .bg { stroke: rgba(255,255,255,.16); }
.tend__ring .fg { stroke: var(--marigold); stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.tend__num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: var(--fw-x); font-size: 30px; color: var(--cream); }
.tend__thumb { width: 116px; aspect-ratio: 16/9; border-radius: var(--r); display: grid; place-items: center; margin: var(--s-1) 0; box-shadow: var(--sh-md); }
.tend__thumb .folk-emblem { width: 44px; height: 44px; }
.tend__deva { font-family: var(--font-display); font-weight: var(--fw-x); font-size: clamp(20px, 2.6vw, 30px); color: var(--cream); line-height: 1.2; }
.tend__tr { font-style: italic; color: #B89E82; font-size: 15px; }
.tend__btns { display: flex; gap: var(--s-3); flex-wrap: wrap; justify-content: center; margin-top: var(--s-2); }
.tend .btn--ghost { color: var(--cream); border-color: rgba(255,255,255,.3); }
.tend .btn--ghost:hover { background: rgba(255,255,255,.1); }
@media (max-width: 480px) {
  .tend__ring, .tend__ring svg { width: 66px; height: 66px; }
  .tend__num { font-size: 24px; }
  .tcontrols { flex-wrap: wrap; }
  .autoplay { margin-left: 0; width: 100%; justify-content: center; order: -1; margin-bottom: var(--s-2); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .fade-up { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}

/* ============================================================
   NIGHT / DARK MODE
   ------------------------------------------------------------
   Warm night theme for reading after dark. The whole system is
   token-driven, so remapping the neutral scale re-skins every
   surface. Brand accents (terracotta, marigold, indigo, leaf)
   stay — they read well on the dark ground. A short list of
   "always-dark" components (footer, ink bands, phone, ink
   buttons) used --ink AS a background; those are pinned to an
   explicit dark surface so they don't invert.
   ============================================================ */
html[data-theme="dark"] {
  --cream:        #14100B;   /* page */
  --cream-2:      #1C1610;   /* alt section / band */
  --cream-3:      #241C14;   /* deeper band */
  --paper:        #201812;   /* card surface */

  --terracotta-tint: rgba(192,73,42,.24);
  --marigold-tint:   rgba(229,152,42,.18);
  --indigo-tint:     rgba(120,140,205,.20);
  --leaf-tint:       rgba(120,160,90,.20);
  --maroon-tint:     rgba(158,64,64,.26);

  --ink:          #F1E7D6;   /* primary text */
  --ink-2:        #CBB9A0;   /* secondary text */
  --ink-3:        #9B8570;   /* muted / helper */
  --line:         #3A2E22;   /* warm dark border */
  --line-soft:    #2C2218;

  --sh-xs: 0 1px 2px rgba(0,0,0,.45);
  --sh-sm: 0 1px 2px rgba(0,0,0,.45), 0 1px 3px rgba(0,0,0,.5);
  --sh-md: 0 2px 6px -2px rgba(0,0,0,.5), 0 6px 14px -4px rgba(0,0,0,.55);
  --sh-lg: 0 6px 14px -6px rgba(0,0,0,.5), 0 18px 34px -10px rgba(0,0,0,.6);
  --sh-xl: 0 12px 24px -8px rgba(0,0,0,.55), 0 30px 56px -16px rgba(0,0,0,.7);

  color-scheme: dark;
}

/* Tinted value/way chips: light-mode foregrounds (dark shades) are
   near-black on the translucent dark chips — lift them to bright accents. */
html[data-theme="dark"] .vcard__ico[data-tint="terracotta"],
html[data-theme="dark"] .way__icon[data-tint="terracotta"] { color: #E8896B; }
html[data-theme="dark"] .vcard__ico[data-tint="marigold"],
html[data-theme="dark"] .way__icon[data-tint="marigold"] { color: #F0B45A; }
html[data-theme="dark"] .vcard__ico[data-tint="leaf"],
html[data-theme="dark"] .way__icon[data-tint="leaf"] { color: #A6C983; }
html[data-theme="dark"] .vcard__ico[data-tint="indigo"] { color: #9EB0E6; }
html[data-theme="dark"] .vcard__ico[data-tint="maroon"] { color: #E29393; }
html[data-theme="dark"] .value-tag { color: #F0B45A; }
html[data-theme="dark"] .value-tag .dot { background: #F0B45A; }
html[data-theme="dark"] .story .value-tag { background: color-mix(in oklab, var(--card-accent, var(--marigold)) 26%, transparent); color: color-mix(in oklab, var(--card-accent, var(--marigold)) 52%, #FBE9CF); }
html[data-theme="dark"] .story .value-tag .dot { background: color-mix(in oklab, var(--card-accent, var(--marigold)) 58%, #FBE9CF); }
html[data-theme="dark"] .vcard.is-active { border-color: #E8896B; }
html[data-theme="dark"] .vcard.is-active .vcard__count { color: #E8896B; }

/* translucent, blurred nav over the dark page */
html[data-theme="dark"] .nav { background: rgba(20,16,11,.86); border-bottom-color: var(--line-soft); }

/* "always-dark" surfaces that used var(--ink) as their background —
   pin them to an explicit deep surface so the flipped --ink can't
   turn them light. */
html[data-theme="dark"] .footer,
html[data-theme="dark"] .band--ink,
html[data-theme="dark"] .phone,
html[data-theme="dark"] .phone__notch { background: #0E0A06; }
html[data-theme="dark"] .band--ink { color: #F1E7D6; }
html[data-theme="dark"] .mission__title { color: #F1E7D6; }
html[data-theme="dark"] .btn--ink { background: #2C2015; color: #F1E7D6; }
html[data-theme="dark"] .btn--ink:hover { background: #392A1B; }
html[data-theme="dark"] .store-badge { background: #2C2015; color: #F1E7D6; }
html[data-theme="dark"] .store-badge--sm { background: rgba(255,255,255,.08); }
html[data-theme="dark"] .listen__btn { background: #2C2015; color: #F1E7D6; }

/* moral callout: its gradient ended on a hard-coded cream — warm it down */
html[data-theme="dark"] .sp-moral { background: linear-gradient(160deg, rgba(229,152,42,.16), var(--paper)); }

/* ghost buttons read better with a lighter hover fill on dark */
html[data-theme="dark"] .btn--ghost:hover { background: rgba(255,255,255,.05); }

/* ---- Night-mode toggle button (in the nav) ---- */
.theme-toggle {
  width: 44px; height: 44px; flex: none;
  display: inline-grid; place-items: center;
  border: 1.5px solid var(--line); border-radius: 50%;
  background: var(--paper); color: var(--ink-2);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.theme-toggle:hover { color: var(--terracotta); border-color: var(--terracotta); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle__sun { display: none; }
html[data-theme="dark"] .theme-toggle__moon { display: none; }
html[data-theme="dark"] .theme-toggle__sun { display: block; }

/* ============ STUDY LOOKUP (select-to-translate) ============ */
/* Discoverability hint, shown once above the story body. */
.study-hint {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 22px; padding: 13px 15px;
  background: linear-gradient(150deg, rgba(229,152,42,.14), var(--paper));
  border: 1px solid var(--line); border-radius: 14px;
  font-size: 14.5px; line-height: 1.45; color: var(--ink-2);
}
.study-hint b { color: var(--ink); font-weight: var(--fw-bold); }
.study-hint__spark { color: var(--marigold); font-size: 16px; line-height: 1.4; flex: none; }
.study-hint__x {
  margin-left: auto; flex: none; width: 26px; height: 26px;
  display: inline-grid; place-items: center; color: var(--ink-3);
  border-radius: 50%; transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.study-hint__x:hover { color: var(--ink); background: rgba(0,0,0,.05); }
.study-hint__x svg { width: 15px; height: 15px; }
html[data-theme="dark"] .study-hint__x:hover { background: rgba(255,255,255,.06); }

/* The floating study popover. */
.study-pop {
  position: fixed; z-index: 200; width: min(340px, calc(100vw - 24px));
  max-height: min(78vh, 560px); overflow-y: auto;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(40,24,10,.24), 0 3px 10px rgba(40,24,10,.12);
  padding: 15px 16px 12px; font-size: 14.5px; line-height: 1.5;
  animation: study-pop-in .16s var(--ease) both;
}
html[data-theme="dark"] .study-pop {
  box-shadow: 0 18px 55px rgba(0,0,0,.6), 0 3px 12px rgba(0,0,0,.5);
}
@keyframes study-pop-in {
  from { opacity: 0; transform: translateY(4px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.study-pop__x {
  position: absolute; top: 9px; right: 9px; width: 28px; height: 28px;
  display: inline-grid; place-items: center; color: var(--ink-3);
  border-radius: 50%; transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.study-pop__x:hover { color: var(--ink); background: rgba(0,0,0,.05); }
html[data-theme="dark"] .study-pop__x:hover { background: rgba(255,255,255,.07); }
.study-pop__x svg { width: 16px; height: 16px; }
.study-pop__term {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: 19px; line-height: 1.25; color: var(--ink);
  padding-right: 30px; margin-bottom: 8px;
  overflow-wrap: anywhere;
}
/* "Explain in" target-language picker */
.study-pop__lang {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-3); margin-bottom: 12px;
}
.study-pop__lang select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-weight: var(--fw-bold); color: var(--terracotta);
  background: var(--marigold-tint); border: 1.5px solid var(--marigold);
  border-radius: var(--r-pill); padding: 3px 26px 3px 11px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C0492A' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
html[data-theme="dark"] .study-pop__lang select {
  background-color: rgba(224,122,63,.14); border-color: rgba(224,122,63,.5);
}
.study-pop__body { display: flex; flex-direction: column; gap: 12px; }

/* "grammar help is off" upsell (shown when only translation is available) */
.study-upsell {
  display: flex; gap: 7px; align-items: flex-start;
  margin-top: 2px; padding: 10px 11px;
  background: var(--cream-2); border: 1px dashed var(--line); border-radius: 12px;
  font-size: 12.5px; line-height: 1.5; color: var(--ink-2);
}
.study-upsell__spark { color: var(--marigold-7); flex: none; }
.study-upsell__btn {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--terracotta); font: inherit; font-weight: var(--fw-bold);
  text-decoration: underline; text-underline-offset: 2px;
}

/* translation block */
.study-trans__lbl, .study-gram__lbl {
  font-size: 11px; font-weight: var(--fw-bold); letter-spacing: .09em;
  text-transform: uppercase; color: var(--terracotta); margin-bottom: 3px;
}
.study-trans__txt { font-size: 16px; color: var(--ink); }

/* grammar block */
.study-gram { border-top: 1px solid var(--line); padding-top: 11px; }
.study-sum { margin: 0 0 8px; color: var(--ink); }
.study-rows { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; }
.study-rows dt {
  font-size: 12.5px; font-weight: var(--fw-bold); color: var(--ink-3);
  white-space: nowrap;
}
.study-rows dd { margin: 0; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }

.study-empty { margin: 0; color: var(--ink-3); font-size: 14px; }

/* footer attribution */
.study-pop__foot {
  margin-top: 13px; padding-top: 9px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px;
}
.study-pop__spark { color: var(--marigold); }

/* loading state */
.study-load { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13.5px; padding: 4px 0; }
.study-dots { display: inline-flex; gap: 4px; }
.study-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta);
  animation: study-bounce 1s var(--ease) infinite;
}
.study-dots i:nth-child(2) { animation-delay: .15s; }
.study-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes study-bounce { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
  .study-pop { animation: none; }
  .study-dots i { animation: none; opacity: .6; }
}

/* "turn it on" guide */
.study-guide__lede { margin: 0 0 10px; color: var(--ink-2); }
.study-guide__lede b, .study-guide__note b { color: var(--ink); font-weight: var(--fw-bold); }
.study-guide__steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 9px; color: var(--ink-2); font-size: 14px; }
.study-guide__steps > li { padding-left: 2px; }
.study-guide__steps b { color: var(--ink); font-weight: var(--fw-bold); }
.study-guide__flags { list-style: none; margin: 9px 0 2px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.study-guide__flag {
  background: rgba(0,0,0,.035); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 9px;
}
html[data-theme="dark"] .study-guide__flag { background: rgba(255,255,255,.04); }
.study-guide__flag-main { display: flex; align-items: center; gap: 8px; }
.study-guide__flag code {
  font-size: 12px; color: var(--terracotta); word-break: break-all; flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.study-guide__copy {
  flex: none; font-size: 12px; font-weight: var(--fw-bold); color: var(--ink);
  border: 1px solid var(--line); border-radius: 7px; padding: 3px 10px;
  background: var(--paper); transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.study-guide__copy:hover { color: var(--terracotta); border-color: var(--terracotta); }
.study-guide__copy.is-done { color: var(--marigold); border-color: var(--marigold); }
.study-guide__set { display: block; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.study-guide__set b { color: var(--ink-2); }
.study-guide__note { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-3); }

/* ============ COLLECTIONS ============ */
/* Landing — big collection cards */
.collection-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); }
.collection-note { margin-top: var(--s-6); font-size: 14px; color: var(--ink-3); }
.bcard {
  display: grid; grid-template-columns: 210px 1fr; overflow: hidden;
  background: var(--paper); border: 1.5px solid color-mix(in oklab, var(--kc) 26%, var(--line-soft));
  border-radius: var(--r-lg); box-shadow: var(--sh-md); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.bcard:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--kc) 60%, var(--line)); box-shadow: 0 20px 40px -18px color-mix(in oklab, var(--kc) 55%, transparent); }
.bcard--soon { opacity: .72; }
.bcard__cover {
  position: relative; display: flex; align-items: center; justify-content: center;
  background: color-mix(in oklab, var(--kc) 22%, var(--cream)); border-right: 1.5px solid color-mix(in oklab, var(--kc) 24%, var(--line-soft));
}
.bcard__motif { width: 96px; height: 96px; color: var(--kc); opacity: .8; }
.bcard__motif .folk-emblem { width: 100%; height: 100%; }
.bcard__cover--img { padding: 0; background: var(--ink); }
.bcard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.bcard__cover--img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, color-mix(in oklab, var(--kc) 55%, transparent)); pointer-events: none; }
.bcard__flag { position: absolute; top: 14px; left: 14px; font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.bcard__flag--new { background: var(--leaf); color: #fff; }
.bcard__flag--soon { background: var(--ink); color: var(--cream); }
.bcard__body { padding: var(--s-5) var(--s-5) var(--s-4); display: flex; flex-direction: column; }
.bcard__type { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: color-mix(in oklab, var(--kc) 78%, var(--ink)); margin-bottom: 6px; }
.bcard__type-flag svg { width: 18px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(52,37,26,.14); display: block; }
.bcard__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.4vw, 27px); color: var(--ink); line-height: 1.1; }
.bcard__deva { font-size: .74em; color: var(--ink-3); font-weight: 700; }
.bcard__desc { font-size: 14.5px; color: var(--ink-2); margin: 10px 0 auto; line-height: 1.5; text-wrap: pretty; }
.bcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line-soft); }
.bcard__meta { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.bcard__cta { font-size: 14px; font-weight: 700; color: var(--terracotta); white-space: nowrap; }

/* Detail — header + progress */
.chead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; }
.chead__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4vw, 42px); color: var(--ink); margin: 0; letter-spacing: -.02em; }
.chead__deva { font-size: .58em; color: var(--ink-3); font-weight: 700; }
.chead__sub { font-size: 17px; color: var(--ink-2); margin: 8px 0 0; max-width: 620px; text-wrap: pretty; }
.chead__stat { text-align: right; font-size: 13.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; }
.chead__stat-line { white-space: nowrap; }
.chead__stat-line--sub { color: var(--ink-3); }
.chead__stat b { color: var(--terracotta); }
.cbar { height: 9px; border-radius: 999px; background: var(--cream-3); border: 1px solid var(--line); overflow: hidden; margin: var(--s-4) 0 0; }
.cbar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--marigold), var(--terracotta)); transition: width var(--dur) var(--ease); }

/* Detail — layout + filters */
.collection-layout { display: grid; grid-template-columns: 230px 1fr; gap: var(--s-6); align-items: start; }
.col-filters { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; scrollbar-width: thin; }
.rfrow { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.rfrow span { white-space: nowrap; }
.rfrow input { accent-color: var(--terracotta); width: 16px; height: 16px; flex: none; }

/* Detail — kāṇḍa sections + story cards */
.kand { margin-bottom: var(--s-8); }
.kand__head {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px; margin-bottom: var(--s-5);
  background: color-mix(in oklab, var(--kc) 14%, var(--cream)); border: 1.5px solid color-mix(in oklab, var(--kc) 26%, var(--line-soft)); border-radius: var(--r);
}
.kand__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--kc); flex: none; }
.kand__name { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--ink); }
.kand__hi { font-size: 13px; color: var(--ink-3); }
.kand__empty { color: var(--ink-3); font-size: 14px; font-style: italic; margin: 0 0 var(--s-4); padding-left: 4px; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--s-5); }
.rc {
  display: block; overflow: hidden; background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-xs); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.rc:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: color-mix(in oklab, var(--kc) 55%, var(--line)); }
.rc.is-read { border-color: color-mix(in oklab, var(--leaf) 55%, var(--line)); }
.rc--soon { opacity: .68; }
.rc__cover {
  position: relative; height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: color-mix(in oklab, var(--kc) 18%, var(--cream)); border-bottom: 1.5px solid color-mix(in oklab, var(--kc) 22%, var(--line-soft));
}
.rc__cover--art { background: color-mix(in oklab, var(--kc) 34%, var(--cream)); }
.rc__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.rc__cover--art::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, color-mix(in oklab, var(--ink) 70%, transparent) 0%, transparent 46%); }
.rc__cover--art .rc__no { position: absolute; left: 9px; bottom: 6px; z-index: 2; font-size: 17px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.rc__cover .rc__badge, .rc__next-ribbon, .rc__lock { z-index: 3; }
.rc__no { font-family: var(--font-display); font-weight: 800; font-size: 30px; color: color-mix(in oklab, var(--kc) 82%, var(--ink)); }
.rc__ph { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.rc__badge { position: absolute; top: 8px; right: 8px; background: color-mix(in oklab, var(--kc) 88%, var(--ink)); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.rc__body { padding: 11px 13px 13px; }
.rc__t { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.22; color: var(--ink); }
.rc__ht { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.rc__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; }
.rc__lang { font-weight: 700; color: var(--indigo); }
.rc__check { font-weight: 700; color: var(--leaf); }
.rc__pages { color: var(--ink-3); }

/* --- sequential gate: next-up + locked read-ahead --- */
.chead__go { margin-top: var(--s-4); }
.chead__go-btn { text-decoration: none; }
.chead__go-done { font-weight: 700; color: var(--leaf); font-size: 14px; }

.rc--next { border-color: color-mix(in oklab, var(--marigold) 70%, var(--line)); box-shadow: 0 0 0 2px color-mix(in oklab, var(--marigold) 30%, transparent); }
.rc__next-ribbon { position: absolute; top: 8px; left: 8px; background: var(--marigold); color: #3a2a06; font-size: 10px; font-weight: 800; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }
.rc__pages--next { font-weight: 800; color: color-mix(in oklab, var(--marigold) 60%, var(--ink)); }

.rc--locked { opacity: .62; }
.rc--locked .rc__cover--art { filter: grayscale(.55); }
.rc--locked:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.rc__lock { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: color-mix(in oklab, var(--ink) 55%, transparent); color: #fff; }
.rc__lock svg { width: 13px; height: 13px; }
.rc__pages--locked { font-weight: 700; color: var(--ink-3); }

/* "up next" chapter CTA at end of a collection story */
.sp-next { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-5) var(--s-6); background: var(--paper); border: 1.5px solid var(--line); border-left: 5px solid var(--maroon); border-radius: var(--r-lg); box-shadow: var(--sh-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.sp-next:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: color-mix(in oklab, var(--maroon) 45%, var(--line)); border-left-color: var(--maroon); }
.sp-next__meta { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.sp-next__kicker { font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--maroon); }
.sp-next__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(18px, 2vw, 22px); line-height: 1.2; color: var(--ink); }
.sp-next__hi { font-size: 15px; color: var(--ink-3); }
.sp-next__hi:empty { display: none; }
.sp-next__arrow { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--maroon); color: #fff; }
.sp-next__arrow svg { width: 20px; height: 20px; transition: transform var(--dur) var(--ease); }
.sp-next:hover .sp-next__arrow svg { transform: translateX(3px); }

/* "jump ahead?" in-page dialog (replaces native confirm) */
.ahead-ov { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px; background: color-mix(in oklab, var(--ink) 46%, transparent); backdrop-filter: blur(3px); animation: aheadFade .16s ease; }
.ahead-box { width: min(400px, 100%); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-xl); padding: 26px 24px 20px; text-align: center; animation: aheadPop .18s cubic-bezier(.2,.9,.3,1.1); }
.ahead-title { font-family: var(--font-display); font-weight: 800; font-size: 21px; color: var(--ink); }
.ahead-body { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin: 8px 0 20px; text-wrap: pretty; }
.ahead-actions { display: flex; gap: 10px; }
.ahead-btn { flex: 1; height: 46px; border-radius: var(--r-pill); font-family: var(--font-display); font-weight: 700; font-size: 15px; cursor: pointer; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.ahead-btn--ghost { background: transparent; color: var(--ink-2); border: 1.5px solid var(--line); }
.ahead-btn--ghost:hover { background: var(--cream-2); border-color: var(--ink-3); }
.ahead-btn--go { background: var(--maroon); color: #fff; border: 1.5px solid var(--maroon); }
.ahead-btn--go:hover { background: color-mix(in oklab, var(--maroon) 86%, #000); }
@keyframes aheadFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes aheadPop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ahead-ov, .ahead-box { animation: none; } }

@media (max-width: 860px) {
  .collection-layout { grid-template-columns: 1fr; }
  .col-filters { position: static; max-height: none; overflow: visible; padding-right: 0; }
}
@media (max-width: 600px) {
  .collection-cards { grid-template-columns: 1fr; }
  .bcard { grid-template-columns: 92px 1fr; }
  .bcard__motif { width: 54px; height: 54px; }
  .rgrid { grid-template-columns: 1fr 1fr; }
}
