/* =====================================================================
   BRAND LAYER - maskot dráček (js/mascot.js), stavy jako CSS. Načítá se po
   style.css. Póza = obrázek (data-pose), pohyb = transform na obrázku.
   Hliněný dráček v2 (barvy, stín, velikosti míst) dolaďuje css/sb/90-mascot.css.
   ===================================================================== */
/* Čtvercová krabička, póza dosedá na spodní hranu (stav nemění rozložení) */
.mascot {
  position: relative;
  display: block;
  width: var(--mascot-size, 180px);
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}
.mascot--mini { width: var(--mascot-size, 40px); }
.mascot__pose {
  position: absolute;
  left: 50%; bottom: 0;
  height: calc(var(--pose-k, 1) * 100%);
  aspect-ratio: var(--pose-ar, 1);
  translate: -50% 0;
  transform-origin: 50% 100%;
  pointer-events: none;
}
.mascot__pose > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  max-width: none;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
/* Animované pózy: snímek videa (.mascot__frame) přesahuje krabičku pózy o rozsah
   pohybu; první snímek jako obrázek stojí pod videem, dokud se video nerozběhne */
.mascot__frame { position: absolute; }
.mascot__frame > img,
.mascot__frame > video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  max-width: none;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.mascot__frame > video { opacity: 0; transition: opacity 160ms linear; background: transparent; }
.mascot__pose.is-playing .mascot__frame > video { opacity: 1; }
.mascot__pose.is-playing .mascot__frame > img { opacity: 0; transition: opacity 160ms linear 120ms; }
/* Video už se hýbe samo, CSS pohyb by se k němu přičítal */
.mascot[data-state] .mascot__pose.is-playing { animation: none; }
/* Stín pod sedícím dráčkem */
.mascot__pose.has-shadow::before {
  content: "";
  position: absolute; left: 6%; right: 6%; bottom: -3.5%; height: 8%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(4, 9, 74, 0.15), rgba(4, 9, 74, 0));
}

/* IDLE: dýchá (do rozběhnutí smyčky) */
.mascot[data-state="idle"] .mascot__pose,
.mascot[data-state="muted"] .mascot__pose { animation: m-breathe 3.2s ease-in-out infinite alternate; }
@keyframes m-breathe { from { transform: scale(1, 1); } to { transform: scale(1.012, 0.985); } }

/* TALKING: pokyvuje v rytmu řeči (data-mouth střídá talkWith v js/mascot.js) */
.mascot[data-state="talking"] .mascot__pose { animation: m-nod 0.9s ease-in-out infinite alternate; }
.mascot[data-state="talking"][data-mouth="m2"] .mascot__pose { scale: 1.015 0.985; }
.mascot__pose { transition: scale 120ms ease-out; }
@keyframes m-nod { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }

/* CELEBRATE: radostný výskok se squash-stretch */
.mascot[data-state="celebrate"] .mascot__pose { animation: m-jump 700ms var(--spring-pop, ease-out) 1, m-breathe 3.2s ease-in-out 700ms infinite alternate; }
@keyframes m-jump { 0% { transform: scale(1) translateY(0); } 20% { transform: scale(1.08, .9) translateY(0); }
                    50% { transform: scale(.96, 1.06) translateY(-18%); } 78% { transform: scale(1.05, .94) translateY(0); }
                    100% { transform: scale(1) translateY(0); } }

/* WAITING ukazuje k volbám, THINKING leží u knížky, SEARCHING hledá lupou: hlavou pomalu kývá.
   U animovaných póz (waiting, reading, celebrate, flying) platí CSS pohyb jen do rozběhnutí videa. */
.mascot[data-state="waiting"] .mascot__pose { animation: m-tilt 4s ease-in-out infinite; }
.mascot[data-state="thinking"] .mascot__pose,
.mascot[data-state="searching"] .mascot__pose { animation: m-tilt 2.6s ease-in-out infinite; }
.mascot[data-state="reading"] .mascot__pose,
.mascot[data-state="love"] .mascot__pose { animation: m-breathe 3.2s ease-in-out infinite alternate; }
.mascot[data-state="flying"] .mascot__pose { animation: m-float 2.4s ease-in-out infinite alternate; }
@keyframes m-float { from { transform: translateY(0); } to { transform: translateY(-5%); } }
@keyframes m-tilt { 0%, 40% { transform: rotate(-2deg); } 50%, 90% { transform: rotate(2deg); } 100% { transform: rotate(-2deg); } }

/* SLEEPY: spí, dýchá pomalu */
.mascot[data-state="sleepy"] .mascot__pose { animation: m-breathe 4.5s ease-in-out infinite alternate; }

/* OOPS: zatřese se */
.mascot[data-state="oops"] .mascot__pose { animation: m-shake 420ms ease-in-out 1; }
@keyframes m-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4%); } 75% { transform: translateX(4%); } }

@media (prefers-reduced-motion: reduce) {
  .mascot .mascot__pose, .mascot .mascot__pose > img {
    animation: none !important; transition: none !important; scale: none !important;
  }
}

/* Logo v navigaci: hlava dráčka (Mascot.head() = obyčejný obrázek), výšku drží pilulka; na hover se nakloní */
.mascot-head { display: block; height: 40px; width: auto; }
.nav__logo-mark { transition: rotate var(--dur-fast) var(--spring-pop); transform-origin: 50% 90%; }
@media (hover: hover) { .nav__logo:hover .nav__logo-mark { rotate: -8deg; } }
@media (max-width: 480px) { .mascot-head { height: 34px; } }

/* =====================================================================
   HERO - prales, živé demo a tři kroky (podle návrhu z 1. 10. 2026)
   Mobil: copy -> demo -> CTA a důvěra -> kroky. Od 1200px copy vlevo,
   karta s ukázkou vpravo, kroky jako pruh přes celou šířku dole.
   ===================================================================== */
:root {
  /* Hlavní výzva v hero a navigaci: sytá malinová s bílým písmem
     (bílá na #C42C6D má 5,3:1, na světlejším horním okraji 4,4:1 - text je velký a tučný) */
  --cta-bg: linear-gradient(180deg, #DB4086 0%, #C42C6D 100%);
  --cta-bg-hover: linear-gradient(180deg, #E24C8F 0%, #CC3274 100%);
  --cta-ink: #FFFFFF;
  --cta-glow: 0 10px 22px -10px rgba(196, 44, 109, 0.7), 0 2px 0 rgba(140, 22, 74, 0.35);
  /* Levandulová vrstva kroků a štítků - stejná rodina jako dráček */
  --lav-1: #F4F1FF;
  --lav-2: #E6DEFF;
  --lav-ink: #6D45D9;
  /* Jiskřičky (tři čárky) u štítku a u dráčka */
  --sparkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 34'%3E%3Cg fill='none' stroke='%23FCC847' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M5 21 14 25'/%3E%3Cpath d='M12 6l6 9'/%3E%3Cpath d='M28 3l-1 10'/%3E%3C/g%3E%3C/svg%3E");
}

/* ── Navigace: bílá pilulka s jemným obrysem, výzva vpravo ────────── */
.nav__inner {
  border: 1.5px solid color-mix(in oklab, var(--ink) 45%, transparent);
  box-shadow: 0 10px 28px -16px rgba(22, 33, 71, 0.35);
  padding: 0.5rem 0.55rem 0.5rem 1.1rem;
}
.nav--solid .nav__inner { box-shadow: 0 14px 32px -14px rgba(22, 33, 71, 0.4); }
.nav__link { color: var(--ink-2); font-size: 0.95rem; }
.nav__link:hover { color: var(--ink); background: var(--lav-1); }
.nav__divider { width: 1.5px; height: 24px; background: var(--line); margin: 0 0.55rem; border-radius: 2px; }
button.nav__login {
  font-family: var(--font); font-weight: var(--w-title); border: 0; background: none; cursor: pointer;
  min-height: var(--tap-min); margin-left: 0;
}
.nav__links .nav__cta.btn--primary,
.nav:not(.nav--solid) .nav__links .nav__cta.btn--primary {
  margin-left: 0.6rem;
  background: var(--cta-bg);
  color: var(--cta-ink);
  border: 0;
  box-shadow: var(--cta-glow);
  padding: 0.55rem 1.35rem;
  font-size: 0.95rem;
}
.nav__links .nav__cta.btn--primary:hover,
.nav:not(.nav--solid) .nav__links .nav__cta.btn--primary:hover {
  background: var(--cta-bg-hover); color: var(--cta-ink); transform: translateY(-1px); box-shadow: var(--cta-glow);
}
.nav__links .nav__cta.btn--primary:active { transform: translateY(1px); box-shadow: none; }
@media (max-width: 980px) {
  .nav__divider { display: none; }
  .nav__links .nav__cta.btn--primary { margin: 0.5rem 0 0.25rem; }
  button.nav__login { text-align: left; }
}

/* ── Rám hero ─────────────────────────────────────────────────────── */
.hero {
  isolation: isolate;
  flex-direction: column;
  align-items: stretch;
  padding: clamp(1.75rem, 3.4vw, 3rem) var(--gutter) clamp(1.25rem, 2.2vw, 2rem);
  min-height: calc(100svh - 5.5rem);
  gap: clamp(1.75rem, 3vw, 2.5rem);
}
.hero::before { display: none; }
/* Vlastní papír: hrací pozadí stránky (hvězdičky, kroužky) do malovaného pralesa nepatří.
   Teplý opar za textem jako na návrhu. */
.hero {
  background:
    radial-gradient(ellipse 46% 42% at 24% 58%, rgba(252, 200, 71, 0.13), transparent 72%),
    radial-gradient(ellipse 40% 36% at 70% 18%, rgba(255, 236, 214, 0.55), transparent 70%),
    var(--paper);
}
:root[data-theme="night"] .hero { background: var(--paper); }
.hero .hero__inner--demo {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "copy" "demo" "after";
  gap: clamp(1.5rem, 4vw, 2.25rem);
  align-items: start;
  align-content: center;
  max-width: 40rem;
}
.hero__copy { grid-area: copy; }
.hero-demo { grid-area: demo; }
.hero__after { grid-area: after; }
@media (min-width: 1000px) {
  .hero .hero__inner--demo {
    max-width: var(--max-wide);
    grid-template-columns: minmax(0, 10fr) minmax(0, 14fr);
    grid-template-areas: "copy demo" "after demo";
    grid-template-rows: 1fr 1fr;
    column-gap: clamp(2.5rem, 4vw, 4rem);
    row-gap: 0;
    align-items: center;
  }
  /* Levý sloupec opticky na střed karty: text nad její polovinu, výzva pod ni */
  .hero__copy { align-self: end; }
  .hero__after { align-self: start; margin-top: clamp(1.75rem, 2.4vw, 2.25rem); }
}

/* ── Malovaný prales za obsahem ───────────────────────────────────── */

/* ── Text vlevo ───────────────────────────────────────────────────── */
.hero__badge {
  position: relative;
  rotate: 0deg;
  margin: 0 0 1.5rem 1.2rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  background: var(--highlight);
  color: var(--on-candy);
  border: 0;
  box-shadow: none;
  font-weight: var(--w-display);
  letter-spacing: 0.09em;
}
.hero__badge::before {
  content: "";
  position: absolute;
  left: -1.55rem; top: -1.05rem;
  width: 30px; height: 26px;
  border: 0; border-radius: 0;
  background: var(--sparkle) center / contain no-repeat;
}
.hero__title {
  font-size: clamp(2.5rem, -0.2rem + 5.9vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: none;
  margin-bottom: 1.25rem;
  text-wrap: wrap;
}
.hero__title-line { display: block; white-space: nowrap; }
@media (min-width: 1024px) { .hero__title { margin-bottom: 1.4rem; } }
/* Užší notebook: dva sloupce už tu jsou, nadpis se musí vejít do levého */
@media (min-width: 1000px) and (max-width: 1199px) { .hero__title { font-size: 5.05vw; } }
.hero__subtitle {
  font-size: clamp(1.0625rem, 0.9rem + 0.45vw, 1.3rem);
  font-weight: var(--w-copy);
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 30rem;
  margin-bottom: 0;
}

/* Dvě tlačítka hero (vzhled v storybook.css) */
.hero__actions { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
.hero__cta.btn {
  background: var(--cta-bg);
  color: var(--cta-ink);
  border: 0;
  box-shadow: var(--cta-glow);
  min-height: 62px;
  padding: 0.9rem 2.2rem;
  font-size: clamp(1.1rem, 0.95rem + 0.4vw, 1.3rem);
  gap: 0.7rem;
}
@media (max-width: 379px) { .hero__cta.btn { max-width: 100%; padding-inline: 1.3rem; white-space: normal; text-align: center; } }
.hero__cta.btn:hover { background: var(--cta-bg-hover); transform: translateY(-2px); box-shadow: var(--cta-glow), 0 16px 28px -14px rgba(196, 44, 109, 0.6); }
.hero__cta.btn:active { transform: translateY(1px); box-shadow: 0 4px 10px -6px rgba(196, 44, 109, 0.7); }
/* ── Karta s ukázkou ──────────────────────────────────────────────── */
.hero-demo {
  position: relative;
  isolation: isolate;
  background: var(--card);
  border: var(--outline);
  border-radius: var(--radius-lg);
  box-shadow: var(--hard-lg);
  padding: clamp(0.9rem, 1.6vw, 1.35rem);
  width: 100%;
  margin: 0;
}
.hero-demo__head {
  display: flex; align-items: center; gap: 0.75rem;
  min-height: 52px; margin-bottom: 0.75rem; padding-right: 76px;
  position: relative;
}
.hero-demo__title {
  font: var(--w-display) clamp(1.3rem, 1rem + 0.8vw, 1.75rem)/1.1 var(--font-display);
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
}
.hero-demo__tag {
  font: var(--w-display) 0.7rem/1 var(--font);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--lav-ink);
  background: var(--lav-1);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.8rem;
  white-space: nowrap;
}
/* Dráček sedí v pravém horním rohu karty, vedle něj tři jiskřičky */
.hero-demo__mascot {
  position: absolute; right: -6px; bottom: 2px;
  --mascot-size: clamp(58px, 5vw, 72px);
  pointer-events: none;
}
.hero-demo__mascot::before {
  content: "";
  position: absolute; left: -24px; top: 6px;
  width: 22px; height: 19px;
  background: var(--sparkle) center / contain no-repeat;
  scale: -1 1;
}
/* Telefon: štítek pod název, ať se „Výprava do pralesa" neláme po slovech */
@media (max-width: 519px) {
  .hero-demo__head { flex-wrap: wrap; row-gap: 0.4rem; align-items: flex-start; }
  .hero-demo__title { flex: 1 1 100%; }
  .hero-demo__sticker { top: auto; bottom: calc(100% - 0.5rem); right: auto; left: 1rem; }
}
.hero-demo__body { display: grid; gap: 0.85rem; }
.hero-demo__art {
  aspect-ratio: 1024 / 465;
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper-2);
}
.hero-demo__art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 250ms var(--ease-out-quint), translate 250ms var(--ease-out-quint); }
.hero-demo__text { display: flex; flex-direction: column; }
.hero-demo__p {
  font: var(--w-copy) clamp(1.0625rem, 0.95rem + 0.35vw, 1.22rem)/1.45 var(--font);
  color: var(--ink);
  margin: 0;
  text-wrap: pretty;
  transition: opacity 250ms var(--ease-out-quint), translate 250ms var(--ease-out-quint);
}
.hero-demo__hint { font: var(--w-title) 0.9rem/1.4 var(--font); color: var(--ink-soft); margin: 0.3rem 0 0; }
.hero-demo__choices { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 0.95rem; }

/* Volby v ukázce: světlá plocha v barvě volby, tvar v kolečku, šipka vpravo.
   Barvy a pořadí zůstávají zamčené (zelená, modrá - viz style.css). */
.hero-demo .btn--choice { --choice-soft: color-mix(in oklab, var(--choice-color) 15%, var(--card)); }
.hero-demo .btn--choice {
  min-height: 62px;
  padding: 0.55rem 1rem 0.55rem 0.7rem;
  background: var(--choice-soft, var(--card));
  border: 1.75px solid color-mix(in oklab, var(--ink) 82%, var(--choice-color));
  border-radius: 16px;
  box-shadow: 0 3px 0 color-mix(in oklab, var(--ink) 82%, var(--choice-color));
  font: var(--w-display) clamp(1.0625rem, 0.97rem + 0.3vw, 1.2rem)/1.25 var(--font);
  gap: 1rem;
}
.hero-demo .btn--choice__shape { width: 42px; height: 42px; }
.hero-demo .btn--choice__shape svg { width: 22px; height: 22px; }
.hero-demo .btn--choice__chev { width: 22px; height: 22px; margin-left: auto; flex-shrink: 0; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: translate var(--dur-fast) var(--ease-out-quint); }
@media (hover: hover) and (pointer: fine) {
  .hero-demo .btn--choice:hover { transform: translateY(-2px); box-shadow: 0 5px 0 color-mix(in oklab, var(--ink) 82%, var(--choice-color)); }
  .hero-demo .btn--choice:hover .btn--choice__chev { translate: 3px 0; }
}
.hero-demo .btn--choice:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in oklab, var(--ink) 82%, var(--choice-color)); }
.hero-demo .choices--decided .btn--choice--picked { background: var(--choice-color); box-shadow: 0 3px 0 var(--ink); }

/* výměna scény: nikdy od opacity 0 (LCP), jen lehký posun */
.hero-demo.is-swapping .hero-demo__p, .hero-demo.is-swapping .hero-demo__art img { opacity: 0.1; translate: -8px 0; }
.hero-demo.is-swapped .hero-demo__p, .hero-demo.is-swapped .hero-demo__art img { opacity: 1; translate: 0 0; }

.hero-demo__sticker {
  position: absolute; top: -16px; right: 90px;
  font-family: var(--font-display);
  background: var(--highlight); color: var(--on-candy);
  border: var(--outline); border-radius: var(--radius-pill);
  padding: 0.35rem 0.8rem; rotate: 2deg;
  box-shadow: var(--hard-sm);
  opacity: 0; scale: 0.6;
  z-index: 2;
}
.hero-demo__sticker.is-in { animation: stickerIn 500ms var(--spring-pop) forwards; }
@keyframes stickerIn { to { opacity: 1; scale: 1; } }

.hero-demo__end {
  position: absolute; inset: 0; border-radius: inherit;
  background: color-mix(in oklab, var(--card) 94%, var(--paper));
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 0.6rem; padding: 1.5rem;
}
.hero-demo__end-title { font: 800 var(--fs-2, 1.66rem) var(--font-display); color: var(--ink); line-height: 1.15; margin: 0; }
.hero-demo__end p { font: 700 var(--fs-0, 1.0625rem) var(--font); color: var(--ink-soft); max-width: 30ch; }
.hero-demo__end-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 0.6rem; }
.hero-demo.is-finished .hero-demo__body { visibility: hidden; }
/* Konec ukázky: hlavička s dráčkem (slaví) zůstává nad závěrem, výzva v barvě hero */
.hero-demo.is-finished .hero-demo__head { z-index: 2; }
.hero-demo__end .btn--primary { background: var(--cta-bg); color: var(--cta-ink); border: 0; box-shadow: var(--cta-glow); }
.hero-demo__end .btn--primary:hover { background: var(--cta-bg-hover); transform: translateY(-2px); box-shadow: var(--cta-glow); }

/* ── Tři kroky (Jak to funguje) ───────────────────────────────────── */
:root[data-theme="night"] { --lav-1: #2E2944; --lav-2: #3C3560; --lav-ink: var(--grape-2); }

@media (prefers-reduced-motion: reduce) {
  .hero-demo__p, .hero-demo__art img { transition: none; }
  .hero-demo__sticker.is-in { animation: none; opacity: 1; scale: 1; }
}

/* =====================================================================
   NOČNÍ ČTENÍ - teplá tmavá paleta (odstín inkoustu ~293, papíru ~77)
   Nemění se: odstín, pořadí a jména barev voleb, tvarové značky, layout.
   ===================================================================== */
:root { --bg-shape-alpha: 0.14; }   /* hrací tvary v pozadí jen jemně - obsah má vlastní ilustrace a dráčka */
:root[data-theme="night"] {
  color-scheme: dark;
  --paper: #1A1626;  --paper-2: #231F30;  --card: #2D283C;  --bg-elevated: #3A354A;
  --ink: #E7DED1;    --ink-2: #DAD2C5;    --ink-soft: #B8B1A5;   --ink-faded: #999185;
  --ink-ghost: #5D5770;
  --w-display: 700;   /* 800 krémová na tmavé halatuje */
  --line: #433F54;   --line-soft: #312D3E;
  /* volby: stejný odstín, L +0.06, chroma x0.9 */
  --grass: #79E08B;  --sky: #79BBFF;  --tang: #FFB174;  --cherry: #FC6563;
  --bubble: #FF7FBC; --sunny: #FFD984; --grape: #A68CFF;
  /* -2 tóny slouží jako text: na tmavém papíru zesvětlit, aby držely AA */
  --bubble-2: #FF98C7; --sunny-2: #FFE1A0; --grass-2: #8BEC9B; --sky-2: #93C8FF;
  --grape-2: #B19DFF; --tang-2: #FFC397; --cherry-2: #FF7D78;
  --bubble-soft: color-mix(in oklab, var(--bubble) 22%, var(--paper));
  --sunny-soft:  color-mix(in oklab, var(--sunny) 22%, var(--paper));
  --grass-soft:  color-mix(in oklab, var(--grass) 22%, var(--paper));
  --sky-soft:    color-mix(in oklab, var(--sky) 22%, var(--paper));
  --grape-soft:  color-mix(in oklab, var(--grape) 22%, var(--paper));
  --cherry-soft: color-mix(in oklab, var(--cherry) 22%, var(--paper));
  --tang-soft:   color-mix(in oklab, var(--tang) 22%, var(--paper));
  --hard-color: #76708C;   /* teplá švestka: 3.1:1 vůči kartě #2A243D, 3.7:1 vůči papíru - čte se jako stín tužkou, ne záře */
  --action-text: var(--bubble-2); --status-ok: var(--grass-2);
  --focus-ring: var(--highlight);
  --bg-shape-alpha: 0.12;
  --glass: rgba(45, 40, 60, 0.94);
}
/* Plochy, které ve dne přepínají prstenec na papírový, mají v noci tmavé pozadí - zpět na žlutou */
:root[data-theme="night"] .cta-section,
:root[data-theme="night"] .site-footer,
:root[data-theme="night"] .pricing__card--featured { --focus-ring: var(--highlight); }
/* Barevné stíny v noci ztlumit: pořád odsazení, už ne nejjasnější věc před spaním */
:root[data-theme="night"] .reader__body { --hard-color: color-mix(in oklab, var(--sunny) 45%, var(--paper)); }
:root[data-theme="night"] .modal,
:root[data-theme="night"] .cta-section,
:root[data-theme="night"] .pricing__card--featured { --hard-color: color-mix(in oklab, var(--action) 40%, var(--paper)); }
/* Tvarová značka volby: barva --on-candy (style.css) platí ve dne i v noci */
/* Text čtečky v noci: širší prostrkání kvůli halaci (váha řeší --w-display: 700 výš) */
:root[data-theme="night"] .reader__text { letter-spacing: 0.01em; }
/* Ilustrace nešedit, ztlumit a rámovat; tap = plný jas */
/* Rám ilustrace musí mít v noci hranu (--line měla 1,47:1 vůči papíru) */
:root[data-theme="night"] .reader__image { border-color: color-mix(in oklab, var(--ink) 55%, var(--paper)); background: var(--paper-2); box-shadow: var(--hard); }
/* Karaoke v noci: slabší plocha + sluníčkové podtržení jako pohyblivá značka (7,07:1 místo olivové plochy 4,32:1) */
:root[data-theme="night"] .sentence--active {
  background: color-mix(in oklab, var(--sunny) 20%, transparent);
  text-decoration: underline;
  text-decoration-color: var(--sunny);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.18em;
}
:root[data-theme="night"] .reader__image-img,
:root[data-theme="night"] .book-card__image,
:root[data-theme="night"] .book-detail__cover img { filter: brightness(.85) saturate(.9) sepia(.12); }
:root[data-theme="night"] .book-card__image,
:root[data-theme="night"] .book-detail__cover img { transition: filter 200ms, opacity var(--dur-normal) var(--ease-out-quint); }   /* opacity: prolnutí obálky přes fallback nesmí noc přepsat */
/* Ilustrace scény si nechá prolnutí (opacity/scale) ze style.css, filtr navíc */
:root[data-theme="night"] .reader__image-img { transition: opacity var(--dur-normal) var(--ease-out-quint), scale var(--dur-slow) var(--ease-out-quint), filter 200ms; }
:root[data-theme="night"] .reader__image:hover .reader__image-img,
:root[data-theme="night"] .reader__image:active .reader__image-img,
:root[data-theme="night"] .reader__image:focus-within .reader__image-img { filter: none; }
/* Teplý nádech řeší sepia() ve filtru výš - pseudo-element by se na mobilu
   (obrázek position: static) přichytil k celému .reader__body */
/* Velké syté plochy → tmavá plocha s barevným okrajem */
:root[data-theme="night"] .pricing__card--featured { background: var(--bubble-soft); }
:root[data-theme="night"] .cta-section { background: var(--paper-2); color: var(--ink); border: var(--outline); }
:root[data-theme="night"] .site-footer { background: #120F1C; color: var(--ink); }
:root[data-theme="night"] .marquee { background: var(--paper-2); }
/* Nav: sklo řeší token --glass na .nav__inner (pilulka), ne obal .nav */
/* Prvky, které ve dne stojí na inkoustové ploše (text v barvě papíru),
   sedí v noci na tmavé ploše - text musí zpět do inkoustu (v noci krémový) */
:root[data-theme="night"] .pricing__card--featured,
:root[data-theme="night"] .pricing__card--featured .pricing__card-title,
:root[data-theme="night"] .pricing__card--featured .btn--ghost,
:root[data-theme="night"] .pricing__card--featured .btn--ghost:hover,
:root[data-theme="night"] .site-footer__mark,
:root[data-theme="night"] .site-footer__logo-text { color: var(--ink); }
/* Dráček v noci: dýchá pomaleji */
:root[data-theme="night"] .mascot[data-state="idle"] .mascot__pose { animation-duration: 4.5s; }
/* Přechody až po prvním paintu */
html.theme-ready body,
html.theme-ready .reader__body { transition: background-color .5s, color .5s, border-color .5s; }
/* Karta si musí nechat pružný zdvih při hoveru (transform) - jinak by ho přebila přechodem barev */
html.theme-ready .book-card { transition: transform var(--duration-normal) var(--ease-spring), background-color .5s, color .5s, border-color .5s; }
/* Sklo navigace je na .nav__inner (obal .nav pozadí nemá); stín si nechá svůj přechod */
html.theme-ready .nav__inner { transition: box-shadow var(--duration-normal) var(--ease-out), background-color .5s, border-color .5s, color .5s; }

/* Povrchy, které v noci ztmavnou pod inkoustovým textem: --on-candy je vždy
   denní inkoust, takže tam, kde pozadím není bonbon, musí text zpět na --ink */
:root[data-theme="night"] .book-card__badge--locked { color: var(--ink); }
:root[data-theme="night"] .choices--decided .btn--choice--picked .btn--choice__shape { background: var(--ink); }
/* Toast je inkoustový v obou režimech, tečka stavu proto drží denní odstíny */
:root[data-theme="night"] .toast { --status-ok: #1B7D3A; --status-error: #D82E38; }

/* Přepínač den/noc (lišta čtečky) */
.btn--theme { gap: 0; padding-inline: 0.65rem; }
.btn--theme .theme-icon--sun { display: none; }
:root[data-theme="night"] .btn--theme .theme-icon--moon { display: none; }
:root[data-theme="night"] .btn--theme .theme-icon--sun { display: block; }

/* Dráček ve čtečce: vypravěč sedí u textu */
.reader__body { position: relative; }
.reader__mascot { position: absolute; top: -34px; right: 18px; --mascot-size: 64px; pointer-events: none; }
/* Pod 700px (sloupcové rozložení s mezerou 2,4rem) sedí dráček mezi oběma nálepkami, ne na stínu obrázku */
@media (max-width: 699px) { .reader__mascot { --mascot-size: 52px; top: -28px; right: 14px; } }

/* Prázdné/chybové stavy s dráčkem */
.library-empty { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.library-empty__mascot { --mascot-size: 110px; }

/* Dráček mini v rohu fallback obálky - maskot „podepisuje" nehotové obálky.
   Šířku drží obal (30 % obálky); --mascot-size: 100 % ji jen předá krabičce. */
.cover-fallback { position: absolute; }
.cover-fallback__mascot { position: absolute; right: 7%; bottom: 7%; width: 30%; --mascot-size: 100%; opacity: .95; pointer-events: none; }
.cover-fallback__mascot .mascot { width: 100%; height: auto; display: block; }

/* =====================================================================
   NABÍDKA REŽIMU ČTENÍ - nad lištou čtečky (den / noc / automaticky + hodina)
   ===================================================================== */
.theme-menu { position: fixed; left: 50%; translate: -50% 0; bottom: calc(4.9rem + env(safe-area-inset-bottom, 0px)); z-index: 51; width: min(22rem, calc(100vw - 2rem)); background: var(--card); color: var(--ink); border: var(--outline); border-radius: var(--radius-lg); box-shadow: var(--hard); padding: 0.85rem; display: grid; gap: 0.65rem; }
.theme-menu[hidden] { display: none; }
.theme-menu__opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
.theme-menu__opt { font: var(--w-display) var(--fs--1) var(--font); color: var(--ink); background: var(--paper-2); border: 2px solid var(--line); border-radius: var(--radius-md); padding: 0.55rem 0.3rem; display: grid; justify-items: center; gap: 0.25rem; cursor: pointer; min-height: 44px; transition: transform var(--dur-instant) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.theme-menu__opt .ico { width: 22px; height: 22px; }
.theme-menu__opt:active { transform: translateY(1px); }
.theme-menu__opt[aria-pressed="true"] { background: var(--highlight); color: var(--on-candy); border-color: var(--ink); box-shadow: var(--hard-sm); }
.theme-menu__bed { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font: var(--w-strong) var(--fs--1) var(--font); color: var(--ink-2); }
.theme-menu__select { font: var(--w-display) var(--fs--1) var(--font); color: var(--ink); background: var(--card); border: var(--outline); border-radius: var(--radius-sm); padding: 0.35rem 0.5rem; min-height: 40px; }
.theme-menu__hint { font: 600 0.78rem/1.35 var(--font); color: var(--ink-soft); margin: 0; }
:root[data-theme="night"] .theme-menu__opt[aria-pressed="false"] { background: var(--bg-elevated); border-color: var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .theme-menu { animation: theme-menu-in 220ms var(--ease-out-quint); }
  @keyframes theme-menu-in { from { opacity: 0; translate: -50% 8px; } }
}

/* =====================================================================
   ČTEČKA - lišta nahoře, obrázek vlevo, text a volby v kartě vpravo,
   lišta dole. Konec příběhu má vlastní kartu (js/ui.js showEnd).
   ===================================================================== */
#view-reader {
  /* Velikost čteného textu; tlačítko „Aa" přepíná tři stupně (data-text-size) */
  --reader-fs: clamp(1.25rem, 0.92rem + 1.02vw, 1.78rem);
}
#view-reader[data-text-size="l"] { --reader-fs: clamp(1.42rem, 1.05rem + 1.18vw, 2.05rem); }
#view-reader[data-text-size="xl"] { --reader-fs: clamp(1.62rem, 1.2rem + 1.35vw, 2.35rem); }

.reader-shell {
  max-width: 82rem;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.reader-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ── Horní lišta ── */
.reader-top {
  display: grid;
  grid-template-columns: 1fr minmax(0, auto) 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0 0.35rem;
  position: relative;
  z-index: 20;
}
.reader-top__back,
.reader-tool,
.reader-bottom__back,
.reader-bottom__night,
.reader-bottom__sound,
.reader-more__item,
.reader-end__replay {
  font: var(--w-title) 0.95rem/1.2 var(--font);
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--tap-min);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out-quint), color var(--dur-fast) var(--ease-out-quint);
}
.reader-top__back:hover, .reader-tool:hover, .reader-bottom__back:hover:not(:disabled),
.reader-bottom__night:hover, .reader-bottom__sound:hover, .reader-more__item:hover, .reader-end__replay:hover { background: var(--lav-1); }
.reader-top__back { justify-self: start; margin-left: -0.75rem; }
.reader-top__center { min-width: 0; text-align: center; display: grid; justify-items: center; gap: 0.3rem; }
.reader-top__title {
  font: var(--w-title) 1rem/1.3 var(--font);
  color: var(--ink-2);
  margin: 0;
  max-width: 34ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Cestička postupu pod názvem - malá, jen orientace */
.reader-top .progress.path { min-height: 12px; gap: 0.3rem; }
.reader-top .path__dot { width: 9px; height: 9px; border-width: 2px; }
.reader-top__tools { justify-self: end; display: flex; align-items: center; gap: 0.15rem; margin-right: -0.5rem; }
.reader-tool__aa { font: var(--w-display) 1.1rem/1 var(--font-display); letter-spacing: -0.02em; }
.reader-tool--icon { width: var(--tap-min); justify-content: center; padding: 0; }
.reader-tool.btn--theme { gap: 0; }
/* Zvuk ve čtečce: reproduktor s vlnami, vypnutý = přeškrtnutý (data-muted, popisek říká, co klik udělá) */
.btn--sound .sound-icon--off,
.btn--sound .sound-label--off { display: none; }
.btn--sound[data-muted="true"] .sound-icon--on,
.btn--sound[data-muted="true"] .sound-label--on { display: none; }
.btn--sound[data-muted="true"] .sound-icon--off { display: block; }
.btn--sound[data-muted="true"] .sound-label--off { display: inline; }
/* Úzký telefon: na kartě konce se vedle Zpět a Nočního režimu vejde zvuk jen jako ikona (popisek má v aria-label).
   Do 429 px: na 412 px (běžný Android) se popisky zalomily, lišta byla vyšší a zakryla „Poslat příběh“ */
@media (max-width: 429px) {
  .reader-bottom .reader-bottom__sound[data-muted] .sound-label--on,
  .reader-bottom .reader-bottom__sound[data-muted] .sound-label--off { display: none; }
  .reader-bottom .reader-bottom__sound { width: var(--tap-min); padding: 0; justify-content: center; flex: none; }
}
.reader-tool .theme-icon--sun { display: none; }
:root[data-theme="night"] .reader-tool .theme-icon--moon { display: none; }
:root[data-theme="night"] .reader-tool .theme-icon--sun { display: block; }
.reader-more { position: relative; }
.reader-more__menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 15rem;
  display: grid; gap: 0.1rem;
  padding: 0.4rem;
  background: var(--card);
  border: var(--outline);
  border-radius: var(--radius-md);
  box-shadow: var(--hard-sm);
}
.reader-more__menu[hidden] { display: none; }
.reader-more__item { width: 100%; border-radius: 10px; justify-content: flex-start; text-align: left; }
.reader-more__item[hidden] { display: none; }
.reader-more__item .tts-icon { width: 20px; height: 20px; }
/* Nabídka režimu čtení se otevírá pod tlačítkem s měsícem, ne nad dolní lištou */
#view-reader .theme-menu { top: 4.4rem; bottom: auto; left: auto; right: max(var(--gutter), calc((100vw - 82rem) / 2 + var(--gutter))); translate: none; }
@media (prefers-reduced-motion: no-preference) {
  #view-reader .theme-menu { animation: theme-menu-drop 220ms var(--ease-out-quint); }
  @keyframes theme-menu-drop { from { opacity: 0; translate: 0 -8px; } }
}

/* ── Obrázek a karta ── */
.reader {
  max-width: none;
  flex: 1 0 auto;
  padding: 0.85rem 0 1rem;
  gap: clamp(1.25rem, 2.6vw, 2.25rem);
  align-items: flex-start;
}
.reader__image {
  flex: 0 0 min(46%, 40rem);
  rotate: 0deg;
  border: var(--outline);
  border-radius: 22px;
  box-shadow: var(--hard);
  top: 1rem;
}
.reader__body {
  flex: 1 1 0;
  padding: clamp(1.4rem, 2.8vw, 2.4rem);
  border-radius: var(--radius-lg);
  --hard-color: var(--ink);
  box-shadow: var(--hard);
}
.reader__text {
  font-size: var(--reader-fs);
  font-weight: var(--w-copy);
  line-height: 1.5;
  letter-spacing: 0.005em;
  max-width: none;
  color: var(--ink);
}
.reader__p { margin: 0 0 0.75em; }
.reader__p:last-child { margin-bottom: 0; }
.reader__question {
  margin: 1em 0 0;
  font-weight: var(--w-display);
  font-size: 1.1em;
  line-height: 1.3;
  color: var(--ink);
}
/* Volby: bez čárkované linky a nálepky „Vyber si" - otázka nad nimi stačí */
.reader__choices { font-size: var(--reader-fs); margin-top: 1.3rem; padding-top: 0; border-top: 0; gap: 0.85rem; }
.reader__choices:not(:empty)::before, .reader--end .reader__choices::before { content: none; }
.reader--end .reader__choices { border-top: 0; }

/* Volby (čtečka i ukázka v hero): světlá plocha v barvě volby, tvar v kolečku, šipka.
   Barvy a pořadí zamčené (style.css --choice-color). */
.btn--choice {
  --choice-soft: color-mix(in oklab, var(--choice-color) 15%, var(--card));
  --choice-edge: color-mix(in oklab, var(--ink) 82%, var(--choice-color));
  background: var(--choice-soft);
  border: 1.75px solid var(--choice-edge);
  border-radius: 18px;
  box-shadow: 0 3px 0 var(--choice-edge);
  gap: 1rem;
}
.reader .btn--choice { min-height: 80px; padding: 0.7rem 1.1rem 0.7rem 0.85rem; font: var(--w-display) 0.8em/1.25 var(--font); }
.reader .btn--choice__shape { width: 52px; height: 52px; }
.reader .btn--choice__shape svg { width: 26px; height: 26px; }
.btn--choice__chev { width: 24px; height: 24px; margin-left: auto; flex-shrink: 0; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: translate var(--dur-fast) var(--ease-out-quint); }
@media (hover: hover) and (pointer: fine) {
  .btn--choice:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--choice-edge); }
  .btn--choice:hover .btn--choice__chev { translate: 3px 0; }
}
.btn--choice:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--choice-edge); }
.choices--decided .btn--choice--picked { background: var(--choice-color); box-shadow: 0 3px 0 var(--ink); }
@keyframes choicePulse {
  from { box-shadow: 0 3px 0 var(--choice-edge); }
  to   { box-shadow: 0 3px 0 var(--choice-edge), 0 0 0 5px color-mix(in oklab, var(--choice-color) 35%, transparent); }
}

/* Dráček: na stránce příběhu nepřekáží (text a volby mají prostor), ukáže se,
   když přemýšlí nad načítáním, a na konci sedí na horní hraně karty a slaví */
.reader__mascot { display: none; top: 18px; right: 20px; --mascot-size: 64px; z-index: 2; }
.reader--loading .reader__mascot, .reader--end .reader__mascot { display: block; }
.reader--loading .reader__text::before { margin-right: 86px; }

/* ── Konec příběhu ── */
.reader-end__kicker {
  font: var(--w-display) 0.78rem/1 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0.2rem 0 0.75rem;
}
.reader-end__title {
  font: var(--w-display) clamp(1.75rem, 1.05rem + 1.9vw, 2.75rem)/1.06 var(--font-display);
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 0.85rem;
  text-wrap: balance;
}
.reader-end__title .sentence { display: inline; }
.reader-end__text {
  font: var(--w-copy) calc(var(--reader-fs) * 0.74)/1.55 var(--font);
  color: var(--ink-2);
  margin: 0 0 1.25rem;
}
.reader-end__talk {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--lav-1);
  border-radius: 18px;
  padding: 1rem 1.15rem;
}
.reader-end__talk-ico { width: 34px; height: 34px; fill: none; stroke: var(--lav-ink); stroke-width: 2; stroke-linejoin: round; flex-shrink: 0; }
.reader-end__talk-kicker { font: var(--w-display) 0.72rem/1 var(--font); letter-spacing: 0.13em; text-transform: uppercase; color: var(--lav-ink); margin: 0 0 0.35rem; }
.reader-end__talk-q { font: var(--w-display) clamp(1.05rem, 0.9rem + 0.45vw, 1.3rem)/1.3 var(--font); color: var(--ink); margin: 0; }
.reader--end .reader__choices { margin-top: 1.35rem; gap: 0.35rem; font-size: inherit; }
.btn.reader-end__close {
  width: 100%;
  min-height: 66px;
  background: var(--highlight);
  color: var(--on-candy);
  font-size: clamp(1.1rem, 0.95rem + 0.4vw, 1.3rem);
  border-radius: 18px;
  box-shadow: var(--hard);
  gap: 0.65rem;
}
.btn.reader-end__close .reader-ico { width: 24px; height: 24px; }
.btn.reader-end__close:hover { background: color-mix(in oklab, var(--highlight) 85%, white); }
.reader-end__replay { align-self: center; font-weight: var(--w-display); }
.reader--end .reader__mascot { --mascot-size: 88px; top: -62px; right: 18px; }
/* Konec je klidná stránka: nahoře jen název, nástroje čtení a krok do knihovny nahradí karta */
.reader--end .reader-top__back,
.reader--end .reader-top__tools { visibility: hidden; }
.reader--end .reader-top__title { font: var(--w-display) clamp(1.05rem, 0.9rem + 0.4vw, 1.3rem)/1.2 var(--font-display); color: var(--ink); }

/* ── Spodní lišta ── */
.reader-bottom {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0 calc(0.7rem + env(safe-area-inset-bottom, 0px));
  margin-inline: -0.75rem;
  background: linear-gradient(to top, var(--paper) 72%, color-mix(in oklab, var(--paper) 0%, transparent));
}
.reader-bottom__back:disabled { opacity: 0.35; cursor: default; }
.reader-bottom__saved { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; font: var(--w-title) 0.9rem/1.2 var(--font); color: var(--ink-soft); }
.reader-bottom__night,
.reader-bottom__sound { display: none; }
.reader--end .reader-bottom__saved { display: none; }
.reader--end .reader-bottom__night,
.reader--end .reader-bottom__sound { display: inline-flex; }
.reader-bottom__night[hidden] { display: none !important; }

/* ── Telefon a úzký tablet: obrázek nad kartou ── */
@media (max-width: 899px) {
  .reader { flex-direction: column; gap: 1.6rem; padding-top: 0.6rem; }
  .reader__image { flex: none; position: static; width: 100%; max-width: 32rem; margin-inline: auto; align-self: center; }
  .reader__body { width: 100%; }
}
@media (max-width: 639px) {
  .reader-top { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.25rem; }
  /* Cestička zůstane ve svém sloupci (4 nástroje jí ubraly místo): nejnovější tečky vpravo, starší se schovají */
  .reader-top .progress.path { max-width: 100%; overflow: hidden; justify-content: flex-end; padding: 2px 3px; }
  .reader-top .path__dot { flex-shrink: 0; }
  .reader-top__back-label, .reader-tool__label { display: none; }
  .reader-top__back { padding: 0; width: var(--tap-min); justify-content: center; margin-left: -0.4rem; }
  .reader-top__title { max-width: 100%; font-size: 0.95rem; }
  .reader-tool:not(.reader-tool--icon) { padding: 0 0.6rem; }
  .reader .btn--choice { min-height: 72px; }
  .reader__mascot { --mascot-size: 54px; right: 14px; }
  .reader--end .reader__mascot { --mascot-size: 70px; top: -50px; }
}

/* =====================================================================
   PŘÍBĚHY - „Které dobrodružství zkusíte?" (dráček, otázka, tři karty)
   ===================================================================== */
.stories__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}
.stories__mascot { position: relative; --mascot-size: clamp(120px, 14vw, 190px); flex-shrink: 0; }
.stories__mascot::after {
  content: "";
  position: absolute; right: -8%; top: 30%;
  width: 30px; height: 26px;
  background: var(--sparkle) center / contain no-repeat;
  scale: -1 1;
}
.stories__intro { text-align: center; display: grid; justify-items: center; gap: 0.6rem; }
.stories__title {
  font: var(--w-display) clamp(2rem, 1.2rem + 2.6vw, 3.4rem)/1.05 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.stories__sub { font: var(--w-copy) clamp(1.1rem, 0.95rem + 0.5vw, 1.45rem)/1.4 var(--font); color: var(--ink-2); margin: 0; }
.stories__pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin: 0.6rem 0 0;
  padding: 0.6rem 1.2rem;
  background: var(--lav-1);
  border-radius: 14px;
  font: var(--w-display) 1rem/1.2 var(--font);
  color: var(--ink);
}
.stories__pill-ico { width: 22px; height: 22px; fill: none; stroke: var(--lav-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 719px) {
  .stories__head { flex-direction: column; gap: 0.5rem; }
  .stories__mascot { --mascot-size: 128px; }
}

/* Karty dobrodružství */
.story-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.75rem);
}
@media (max-width: 899px) { .story-cards { grid-template-columns: minmax(0, 1fr); max-width: 32rem; margin-inline: auto; } }
.story-card {
  --tag-bg: var(--grass-soft); --tag-ink: color-mix(in oklab, var(--grass-2) 72%, var(--ink));
  --cta-soft: color-mix(in oklab, var(--grass) 18%, var(--card));
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  background: var(--card);
  border: var(--outline);
  border-radius: var(--radius-lg);
  box-shadow: var(--hard);
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: transform var(--dur-fast) var(--ease-out-quint), box-shadow var(--dur-fast) var(--ease-out-quint);
}
.story-card--1 { --tag-bg: var(--sky-soft); --tag-ink: color-mix(in oklab, var(--sky-2) 72%, var(--ink)); --cta-soft: color-mix(in oklab, var(--sky) 18%, var(--card)); }
.story-card--2 { --tag-bg: var(--lav-1); --tag-ink: var(--lav-ink); --cta-soft: var(--lav-1); }
:root[data-theme="night"] .story-card--2 { --cta-soft: color-mix(in oklab, var(--grape) 24%, var(--card)); --tag-bg: color-mix(in oklab, var(--grape) 24%, var(--card)); }
@media (hover: hover) and (pointer: fine) {
  .story-card:hover { transform: translate(-2px, -3px); box-shadow: var(--hard-lg); }
  .story-card:hover .story-card__img { scale: 1.04; }
  .story-card:hover .story-card__cta svg { translate: 4px 0; }
}
.story-card:active { transform: translate(2px, 2px); box-shadow: var(--hard-xs); }
.story-card__art {
  position: relative;
  display: block;
  aspect-ratio: 1024 / 692;
  overflow: hidden;
  border-bottom: var(--outline);
  background: var(--paper-2);
}
.story-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: scale var(--dur-slow) var(--ease-out-quint); }
.story-card__img--cover { object-position: 50% 30%; }
.story-card__tag {
  position: absolute; left: 0.9rem; top: 0.9rem;
  font: var(--w-display) 0.72rem/1 var(--font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tag-ink);
  background: var(--tag-bg);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.8rem;
  box-shadow: 0 2px 8px -2px rgba(22, 33, 71, 0.25);
}
.story-card__body { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.1rem 1.2rem 1.25rem; flex: 1; }
.story-card__title { font: var(--w-display) clamp(1.3rem, 1rem + 0.8vw, 1.7rem)/1.12 var(--font-display); letter-spacing: -0.01em; color: var(--ink); }
.story-card__line { font: var(--w-copy) 1rem/1.4 var(--font); color: var(--ink-2); margin-bottom: 0.9rem; }
.story-card__cta {
  margin-top: auto;   /* lišta vždy u spodku karty, i když se jiný název zalomí */
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 52px;
  padding: 0.6rem 2.6rem;
  background: var(--cta-soft);
  border-radius: 14px;
  font: var(--w-display) 1.05rem/1.2 var(--font);
  color: var(--ink);
}
.story-card__cta svg { position: absolute; right: 1rem; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: translate var(--dur-fast) var(--ease-out-quint); }
/* Naskočení karet postupně */
.story-cards.animate-on-scroll { opacity: 1; transform: none; }
.story-cards .story-card { opacity: 0; translate: 0 18px; transition: opacity 500ms var(--ease-out-quint), translate 600ms var(--spring-pop), transform var(--dur-fast) var(--ease-out-quint), box-shadow var(--dur-fast) var(--ease-out-quint); transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0ms, 0ms; }
.story-cards.is-visible .story-card { opacity: 1; translate: 0 0; }
.story-cards.is-settled .story-card { transition-delay: 0ms; }
@media (prefers-reduced-motion: reduce) { .story-cards .story-card { opacity: 1; translate: none; transition: none; } }

.stories .bookshelf__more { flex-direction: column; align-items: center; gap: 0.7rem; margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.stories__note { font: var(--w-title) 0.95rem/1.4 var(--font); color: var(--ink-soft); margin: 0.3rem 0 0; text-align: center; }
.stories__trust { display: inline-flex; align-items: center; gap: 0.45rem; font: var(--w-title) 0.85rem/1.4 var(--font); color: var(--ink-soft); margin: 0; text-align: center; padding-top: 0.7rem; border-top: 1.5px solid var(--line); }
.stories__trust-ico { width: 18px; height: 18px; fill: none; stroke: var(--lav-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* =====================================================================
   DOLADĚNÍ PO KONTROLE (1. 10. 2026)
   ===================================================================== */
/* Skok na kotvu (Příběhy, Ceník, Jak to funguje) nekončí pod přilepenou navigací */
html { scroll-padding-top: 6.25rem; }

/* Hlavní výzvy všude stejně: plovoucí výzva na mobilu a „Číst příběh" v detailu knihy */
.sticky-cta__btn.btn,
.book-detail__cta.btn {
  background: var(--cta-bg);
  color: var(--cta-ink);
  border: 0;
  box-shadow: var(--cta-glow);
}
.sticky-cta__btn.btn:hover,
.book-detail__cta.btn:hover { background: var(--cta-bg-hover); color: var(--cta-ink); }
.sticky-cta__btn.btn { box-shadow: var(--cta-glow), 0 12px 32px -8px rgba(22, 33, 71, 0.35); }

/* Patička: značka = hlava dráčka jako v navigaci */
.site-footer .mascot-head.site-footer__mark { width: auto; height: 38px; }

/* ── Čtečka ── */
.reader { width: 100%; }
.progress:empty { display: none; }
/* Obrázek se při konci jen jemně pohoupe, náklon už čtečka nemá */
@keyframes stickerDrop { 0% { scale: 1; rotate: 0deg; } 45% { scale: 1.05; rotate: 1.4deg; } 100% { scale: 1; rotate: 0deg; } }
/* Konec: lišta nahoře jen s názvem přes celou šířku (na telefonu se nezkracuje zbytečně) */
.reader--end .reader-top { grid-template-columns: minmax(0, 1fr); }
.reader--end .reader-top__back,
.reader--end .reader-top__tools { display: none; }
/* Přepínač na konci: v noci nabízí den */
.reader-bottom__night .night-label--day,
.reader-bottom__night .theme-icon--sun { display: none; }
:root[data-theme="night"] .reader-bottom__night .night-label--night,
:root[data-theme="night"] .reader-bottom__night .theme-icon--moon { display: none; }
:root[data-theme="night"] .reader-bottom__night .night-label--day,
:root[data-theme="night"] .reader-bottom__night .theme-icon--sun { display: inline; }
/* Telefon: obrázek nesmí zabrat celou výšku, volby mají být blízko */
@media (max-width: 899px) {
  .reader__image { width: min(100%, 36vh); }
}
/* Telefon na šířku: obrázek vedle textu */
@media (max-width: 899px) and (orientation: landscape) {
  .reader { flex-direction: row; align-items: flex-start; }
  .reader__image { flex: 0 0 38%; width: auto; max-width: none; position: sticky; top: 0.75rem; }
}
/* Úzký telefon a největší písmo: menší kolečko u volby, ať text nemá pět řádků */
@media (max-width: 419px) {
  .reader .btn--choice { gap: 0.7rem; padding-left: 0.65rem; }
  .reader .btn--choice__shape { width: 42px; height: 42px; }
  .reader .btn--choice__shape svg { width: 22px; height: 22px; }
}
/* Na telefonu zůstane u záložky krátký popisek */
.reader-bottom__saved .saved-short { display: none; }
@media (max-width: 639px) {
  .reader-bottom__saved span.saved-long { display: none; }
  .reader-bottom__saved span.saved-short { display: inline; }
}

/* =====================================================================
   ZBYTEK WEBU V NOVÉM STYLU (1. 10. 2026) - krémový papír, bílé karty
   s obrysem, levandulové plochy, sytě malinová výzva a dráček v pózách.
   ===================================================================== */
/* ── Navigace a patička: celý dráček ── */
.nav__logo .mascot.nav__logo-mark { --mascot-size: 46px; width: 46px; height: auto; margin-block: -6px; }
@media (max-width: 480px) { .nav__logo .mascot.nav__logo-mark { --mascot-size: 40px; width: 40px; } }

/* ── Štítek nad nadpisem sekce: žlutá pilulka jako v hero, s jiskřičkami ── */
.section-kicker {
  position: relative;
  rotate: 0deg;
  border: 0;
  box-shadow: none;
  background: var(--highlight);
  color: var(--on-candy);
  font-weight: var(--w-display);
  letter-spacing: 0.09em;
  padding: 0.5rem 1.15rem;
  margin: 0 auto 1.1rem;
}
.section-kicker::before {
  content: "";
  position: absolute;
  left: -1.45rem; top: -0.95rem;
  width: 26px; height: 22px;
  background: var(--sparkle) center / contain no-repeat;
}
.section-title { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.25rem); }
.section-subtitle { font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.3rem); color: var(--ink-2); }

/* Hlavička sekce s dráčkem vedle textu (FAQ) */
.sec-head { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 3vw, 2.25rem); margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.sec-head__mascot { --mascot-size: clamp(110px, 12vw, 160px); flex-shrink: 0; }
.sec-head__text { text-align: center; min-width: 0; }
.sec-head .section-subtitle { margin-bottom: 0; }
@media (max-width: 719px) {
  .sec-head { flex-direction: column; gap: 0.25rem; }
  .sec-head__mascot { --mascot-size: 112px; }
}

/* ── Pruh s hesly: světlý papír místo tmavého pásu ── */
.marquee {
  background: var(--card);
  border-top: 1.5px solid var(--line);
  border-bottom: 1.5px solid var(--line);
  padding: 0.75rem 0;
}
:root[data-theme="night"] .marquee { background: var(--paper-2); }

/* ── Proč Hravý příběh: karty jako karty příběhů, ikony v barevném kolečku ── */

/* ── Ceník ── */
.pricing__toggle {
  background: var(--lav-1);
  border: 0;
  box-shadow: none;
  padding: 0.35rem;
  border-radius: 16px;
  gap: 0.25rem;
}
.pricing__toggle .age-tab {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 12px;
  color: var(--ink-2);
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
}
.pricing__toggle .age-tab:hover { transform: none; box-shadow: none; background: color-mix(in oklab, var(--card) 60%, transparent); }
.pricing__toggle .age-tab--active,
.pricing__toggle .age-tab--active:hover {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 2px 0 color-mix(in oklab, var(--ink) 80%, transparent), 0 0 0 1.5px var(--ink);
}
.pricing__save-badge { background: var(--highlight); border: 0; color: var(--on-candy); padding: 0.18rem 0.5rem; }

.pricing__cards { gap: clamp(1.25rem, 3vw, 2rem); max-width: 56rem; }
.pricing__card { border-radius: var(--radius-lg); padding: 2rem 1.75rem 1.75rem; }
.pricing__card:hover { transform: translate(-2px, -3px); }
/* Doporučený tarif: světlý jako ostatní karty, levandulové záhlaví, malinový stín */
.pricing__card--featured {
  background:
    linear-gradient(180deg, var(--lav-1) 0, var(--lav-1) var(--featured-head, 10.5rem), var(--card) var(--featured-head, 10.5rem));
  color: var(--ink);
  border-width: 3px;
  --hard-color: #C42C6D;
  /* Stín skládáme tady, ne přes var(--hard): ten se vyhodnotí už v :root s inkoustem
     a barvu karty by nepřevzal (živě byl tarif proto tmavomodrý místo malinového) */
  box-shadow: 5px 5px 0 var(--hard-color);
}
.pricing__card--featured:hover { box-shadow: 8px 8px 0 var(--hard-color); }
.pricing__card--featured::before { display: none; }
.pricing__card-title { font-weight: var(--w-display); font-size: clamp(1.25rem, 1.05rem + 0.5vw, 1.5rem); }
.pricing__card--featured .pricing__card-title,
.pricing__card--featured .pricing__amount { color: var(--ink); }
.pricing__card:not(.pricing__card--featured) .pricing__amount { color: var(--ink); }
.pricing__card--featured .pricing__period,
.pricing__per-day { color: var(--ink-soft); }
.pricing__card--featured .pricing__original-price { color: var(--ink-faded); }
.pricing__features { border-top: 0; padding-top: 0.25rem; gap: 0.7rem; }
.pricing__card--featured .pricing__features { border-color: transparent; }
.pricing__features li,
.pricing__card--featured .pricing__features li { color: var(--ink-2); align-items: center; }
.pricing__features .ico,
.pricing__card--featured .pricing__features .ico {
  width: 24px; height: 24px; padding: 4px;
  border-radius: 999px;
  background: var(--grass-soft);
  color: color-mix(in oklab, var(--grass-2) 80%, var(--ink));
  stroke-width: 3;
  margin-top: 0;
}
.pricing__card--featured .btn--primary {
  background: var(--cta-bg);
  color: var(--cta-ink);
  border: 0;
  box-shadow: var(--cta-glow);
}
.pricing__card--featured .btn--primary:hover { background: var(--cta-bg-hover); box-shadow: var(--cta-glow); }
.pricing__cancel-note { color: var(--ink-soft); }
/* Dráček s knížkou leží na horní hraně doporučeného tarifu */
.pricing__mascot { position: absolute; right: 14px; top: -54px; --mascot-size: 92px; pointer-events: none; z-index: 1; }
@media (max-width: 480px) { .pricing__mascot { --mascot-size: 74px; top: -44px; right: 8px; } }

/* ── Otázky rodičů ── */
.faq__list { gap: 0.8rem; }
.faq__item {
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 3px 0 var(--ink);
  transition: box-shadow var(--dur-fast) var(--ease-out-quint), background var(--dur-fast) var(--ease-out-quint), translate var(--dur-fast) var(--ease-out-quint);
}
.faq__item:hover { translate: 0 -1px; box-shadow: 0 4px 0 var(--ink); }
.faq__item[open] { background: var(--lav-1); box-shadow: 0 3px 0 var(--ink); }
.faq__q { font-family: var(--font); font-weight: var(--w-display); font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.15rem); padding: 1.05rem 1.25rem; }
.faq__chevron {
  width: 34px; height: 34px;
  border: 0;
  box-shadow: none;
  background: var(--lav-1);
  color: var(--lav-ink);
}
.faq__item[open] .faq__chevron { background: var(--card); color: var(--lav-ink); }
.faq__q:hover .faq__chevron { transform: none; }
.faq__a { color: var(--ink-2); padding: 0 1.25rem 1.2rem; }

/* ── Závěrečná výzva: světlý levandulový panel s dráčkem, který se raduje ── */
.cta-section {
  background: var(--lav-1);
  color: var(--ink);
  border: 0;
  box-shadow: none;
  border-radius: var(--radius-2xl);
  padding: clamp(2.25rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 4rem);
  max-width: min(64rem, calc(100% - 2 * var(--gutter)));
}
.cta-section::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 34'%3E%3Cg fill='none' stroke='%23FCC847' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M5 21 14 25'/%3E%3Cpath d='M12 6l6 9'/%3E%3Cpath d='M28 3l-1 10'/%3E%3C/g%3E%3C/svg%3E") 92% 18% / 44px no-repeat,
              url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.6 5.9 6.4.6-4.8 4.3 1.4 6.2L12 16.2l-5.6 3.3 1.4-6.2L3 9l6.4-.6z' fill='%23FCC847'/%3E%3C/svg%3E") 6% 86% / 26px no-repeat;
}
.cta-section__inner {
  max-width: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3rem);
  text-align: left;
}
.cta-section__mascot { --mascot-size: clamp(140px, 16vw, 210px); }
.cta-section .btn--primary,
.cta-section .btn--primary:hover {
  background: var(--cta-bg);
  color: var(--cta-ink);
  border: 0;
  box-shadow: var(--cta-glow);
  gap: 0.7rem;
}
.cta-section .btn--primary:hover { background: var(--cta-bg-hover); transform: translateY(-2px); }
.cta-section__trust { display: flex; align-items: center; gap: 0.5rem; margin: 1.1rem 0 0; font: var(--w-title) 0.9rem/1.4 var(--font); color: var(--ink-2); }
@media (max-width: 719px) {
  .cta-section__inner { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 0.5rem; }
  .cta-section__trust { justify-content: center; }
  .cta-section__mascot { --mascot-size: 130px; }
}
.cta-section + .sticky-cta + .site-footer,
.cta-section + .site-footer { margin-top: clamp(3.5rem, 7vw, 5.5rem); }

/* ── Patička: světlá, s celým dráčkem ── */
.site-footer {
  background: var(--card);
  color: var(--ink);
  border-top: 1.5px solid var(--line);
  --focus-ring: var(--ink);
}
.site-footer .mascot.site-footer__mark { --mascot-size: 58px; width: 58px; height: auto; color: inherit; }
.site-footer__logo-text { color: var(--ink); }
.site-footer__heading { color: var(--lav-ink); font-weight: var(--w-display); }
.site-footer__text { color: var(--ink-2); }
.site-footer__link { color: var(--ink-2); }
.site-footer__link:hover { color: var(--action-text); }
.site-footer__social-link { background: var(--lav-1); border: 0; color: var(--lav-ink); }
.site-footer__social-link:hover { background: var(--highlight) !important; color: var(--on-candy); }
.site-footer__bottom { border-top: 1.5px solid var(--line); }
.site-footer__bottom p { color: var(--ink-soft); }
:root[data-theme="night"] .site-footer { background: var(--paper-2); color: var(--ink); }

/* ── Tlačítka v celém webu: hlavní = sytě malinová s bílým písmem,
      vedlejší = bílá s obrysem a stínem dole (jako volby a karty) ── */
.btn--primary {
  background: var(--cta-bg);
  color: var(--cta-ink);
  border: 0;
  box-shadow: var(--cta-glow);
}
.btn--primary:hover { background: var(--cta-bg-hover); color: var(--cta-ink); transform: translateY(-2px); box-shadow: var(--cta-glow), 0 14px 26px -14px rgba(196, 44, 109, 0.55); }
.btn--primary:active { transform: translateY(1px); box-shadow: 0 4px 10px -6px rgba(196, 44, 109, 0.7); }
.btn--ghost,
.btn--google {
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}
.btn--ghost:hover,
.btn--google:hover { background: var(--lav-1); transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.btn--ghost:active,
.btn--google:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

/* ── Dialogy ── */
.modal {
  border-radius: 28px;
  --hard-color: var(--ink);
  box-shadow: var(--hard-lg);
}
.modal__close {
  width: 40px; height: 40px;
  border: 0;
  box-shadow: none;
  background: var(--lav-1);
  color: var(--lav-ink);
}
.modal__close:hover { background: var(--lav-2); color: var(--ink); }
.modal__title { font-weight: var(--w-display); }
.field__label { font-family: var(--font); color: var(--lav-ink); letter-spacing: 0.1em; font-size: 0.75rem; }
.auth-form__input,
.favorites-search__input {
  border: 2px solid color-mix(in oklab, var(--ink) 28%, transparent);
  background: var(--card);
  box-shadow: none;
}
.auth-form__input:hover,
.favorites-search__input:hover { border-color: color-mix(in oklab, var(--ink) 45%, transparent); }
.auth-form__input:focus-visible,
.favorites-search__input:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px var(--lav-2);
}
.field__eye:hover, .field__eye[aria-pressed="true"] { background: var(--lav-1); }
.auth-form__toggle a { text-decoration-color: var(--action-text); color: var(--ink); }
.auth-form__consent input:checked { background: var(--lav-ink); }
.onboarding__feature-icon { border: 0; background: var(--lav-1); color: var(--lav-ink); border-radius: 999px; }

/* ── Detail knihy ── */
.book-detail { border-radius: 28px; }
.book-detail__title { font-weight: var(--w-display); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); }
.book-detail__pill {
  border: 0;
  box-shadow: none;
  background: var(--lav-1);
  color: var(--lav-ink);
  padding: 0.45rem 0.85rem;
}
.book-detail__pill--free { background: var(--grass-soft); color: color-mix(in oklab, var(--grass-2) 72%, var(--ink)); }
.book-detail__desc { color: var(--ink-2); }

/* ── Všechny příběhy a Oblíbené ── */
.allbooks-header,
.favorites-header { align-items: center; }
.allbooks-header__title,
.favorites-header__title { font-size: clamp(2rem, 1.3rem + 2.2vw, 3rem); }
.allbooks-header__title svg { color: var(--lav-ink); }
.allbooks-header__count,
.favorites-header__count { background: var(--lav-1); color: var(--lav-ink); border: 0; padding: 0.35rem 0.85rem; }
.favorites-header__back {
  border: 2px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  font-size: 0.95rem;
  padding: 0.55rem 1.05rem;
}
.favorites-header__back:hover { background: var(--lav-1); transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.favorites-header__back:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.allbooks-filters__label { font-family: var(--font); color: var(--lav-ink); font-weight: var(--w-display); letter-spacing: 0.12em; }
.allbooks-pill {
  background: var(--card);
  border: 1.5px solid var(--line);
  box-shadow: none;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
}
.allbooks-pill:hover { transform: none; box-shadow: none; border-color: color-mix(in oklab, var(--ink) 40%, transparent); background: var(--card); }
.allbooks-pill:active { transform: translateY(1px); }
.allbooks-pill--active,
.allbooks-pill--active:hover {
  background: var(--lav-1);
  color: var(--ink);
  border: 2px solid var(--lav-ink);
}
.allbooks-pill--active .filter-icon,
.allbooks-pill--active .allbooks-pill__n { color: var(--lav-ink); }
.favorites-search__input { border-radius: var(--radius-pill); }
.book-card__title { font-weight: var(--w-display); }
.allbooks-header__mascot { --mascot-size: 64px; display: inline-block; margin: -10px 0 -6px; }

/* ── Hlavička s dráčkem: text vždy přesně na středu stránky, dráček vedle něj.
      Tři sloupce, krajní stejně široké (aspoň na dráčka) - prostřední text se
      tak nikdy neposune ze středu, i když dráček stojí jen vlevo. ── */
.stories__head,
.sec-head {
  --head-mascot: clamp(110px, 12vw, 160px);
  display: grid;
  grid-template-columns: minmax(var(--head-mascot), 1fr) minmax(0, max-content) minmax(var(--head-mascot), 1fr);
  align-items: center;
  column-gap: clamp(1rem, 2.5vw, 2rem);
}
.stories__head { --head-mascot: clamp(120px, 14vw, 190px); }
.stories__mascot, .sec-head__mascot { grid-column: 1; justify-self: end; --mascot-size: var(--head-mascot); }
.stories__intro, .sec-head__text { grid-column: 2; text-align: center; }
@media (max-width: 719px) {
  .stories__head, .sec-head { display: flex; flex-direction: column; align-items: center; }
  .stories__head { --head-mascot: 128px; }
  .sec-head { --head-mascot: 112px; }
}

/* Závěrečná výzva: stejné pravidlo uvnitř panelu - text na středu, dráček vlevo vedle */
.cta-section__inner {
  --head-mascot: clamp(140px, 16vw, 210px);
  grid-template-columns: minmax(var(--head-mascot), 1fr) minmax(0, max-content) minmax(var(--head-mascot), 1fr);
  justify-items: stretch;
  text-align: center;
}
.cta-section__mascot { grid-column: 1; justify-self: end; --mascot-size: var(--head-mascot); }
.cta-section__trust { justify-content: center; }
@media (max-width: 719px) {
  .cta-section__inner { display: flex; flex-direction: column; align-items: center; }
  .cta-section__mascot { --head-mascot: 130px; }
}
/* Panel výzvy a hlavička otázek dost široké, aby prostřední text měl místo vedle dráčka */
.cta-section { max-width: min(76rem, calc(100% - 2 * var(--gutter))); padding-inline: clamp(1.25rem, 3vw, 3rem); }
.cta-section__inner { --head-mascot: clamp(130px, 13vw, 190px); }
.faq__inner { max-width: 72rem; }
.faq__list { max-width: 46rem; margin-inline: auto; }

/* ── Doladění po kontrole zbytku webu ── */
/* Ceník: levandulové je samo záhlaví doporučeného tarifu (roste s obsahem, i se slevou za rok) */
.pricing__card--featured { background: var(--card); }
@media (max-width: 980px) { .pricing__cards { row-gap: 3.5rem; } }
@media (max-width: 380px) {
  .pricing__mascot { --mascot-size: 62px; top: -38px; right: 2px; }
  .pricing__card { padding-inline: 1.25rem; }
  .pricing__card .btn--large { padding-inline: 1rem; font-size: 1.05rem; }
}
/* Závěrečná výzva na úzkém telefonu: tlačítko se zalomí uvnitř panelu, hvězdička mimo tlačítko */
@media (max-width: 480px) {
  .cta-section__btn.btn { max-width: 100%; white-space: normal; padding-inline: 1.25rem; text-align: center; }
}
@media (max-width: 719px) {
  .cta-section::before { background-position: 92% 8%, 6% 4%; }
}
/* Patička: všechny odkazy stejně tučné (tlačítka i odkazy) */
.site-footer__link,
button.site-footer__link { font-weight: var(--w-title); font-size: var(--fs-0); }
/* Katalog: rámeček titulku přesně na dva řádky (bez kousku třetího) */
.book-card__title { line-height: 1.25; min-height: calc(2 * 1.25em); max-height: calc(2 * 1.25em); }
/* Dialogy pro přihlášené: ikony jako u karet Proč Hravý příběh */
.consent-dialog__icon .icon-bubble {
  width: 60px; height: 60px;
  border: 0; box-shadow: none;
  border-radius: 999px;
  background: var(--lav-1);
  color: var(--lav-ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.consent-dialog__icon .icon-bubble--amber { background: var(--sunny-soft); color: var(--sunny-2); }
.consent-dialog__icon .icon-bubble--green { background: var(--grass-soft); color: color-mix(in oklab, var(--grass-2) 80%, var(--ink)); }

/* =====================================================================
   ROZVRŽENÍ SEKCÍ (10/2026): obsah sekcí stejně široký jako navigace
   a úvod (okraje stránky lícují), větší karty a písmo, menší svislé mezery.
   Úzké části uvnitř (ceník, text výzvy) si drží strop kvůli čitelnosti.
   ===================================================================== */
:root { --section-padding-y: clamp(2.75rem, 5vw, 4rem); }
.bookshelf__inner,
.pricing__inner,
.faq__inner,
.site-footer__inner { max-width: var(--max-wide); }

/* Hlavičky sekcí: podtitulek na jeden až dva dlouhé řádky, kratší skok k obsahu */
.section-subtitle { max-width: 62ch; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }

/* Příběhy: karty roztažené na celou šířku, čitelnější podtitulek karty */
.story-cards { gap: clamp(1rem, 2vw, 2rem); }
.story-card__line { font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem); }

/* Ceník: širší a větší karty, ceny a výhody čitelné z dálky */
.pricing__cards { max-width: 68rem; gap: clamp(1.25rem, 3vw, 2.5rem); }
.pricing__card { padding: clamp(2rem, 3vw, 2.5rem) clamp(1.5rem, 2.6vw, 2.25rem) clamp(1.75rem, 2.6vw, 2.25rem); }
.pricing__card-title { font-size: clamp(1.4rem, 1.1rem + 0.7vw, 1.85rem); }
.pricing__amount { font-size: clamp(2.4rem, 1.8rem + 1.6vw, 3.4rem); }
.pricing__features { gap: 0.95rem; font-size: clamp(1.0625rem, 0.98rem + 0.25vw, 1.1875rem); margin-bottom: 1.75rem; }
.pricing__features .ico,
.pricing__card--featured .pricing__features .ico { width: 28px; height: 28px; padding: 5px; }
.pricing__cancel-note { text-align: center; margin: 0.85rem 0 0; font-size: 0.95rem; }

/* Otázky rodičů: dva sloupce přes celou šířku místo jednoho úzkého pruhu */
.faq__list {
  max-width: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem clamp(1rem, 2vw, 1.5rem);
  align-items: start;
}
.faq__q { font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.25rem); padding: 1.2rem 1.4rem; }
.faq__a { font-size: clamp(1.0625rem, 0.98rem + 0.2vw, 1.15rem); padding: 0 1.4rem 1.3rem; }
@media (max-width: 959px) { .faq__list { grid-template-columns: minmax(0, 1fr); max-width: 46rem; margin-inline: auto; } }

/* Závěrečná výzva: panel přes celou šířku obsahu, větší text a dráček,
   vpravo vějíř obálek, aby text zůstal opticky uprostřed */
.cta-section { max-width: min(var(--max-wide), calc(100% - 2 * var(--gutter))); padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 4rem); }
.cta-section__inner { --head-mascot: clamp(150px, 17vw, 250px); }
.cta-section__trust { font-size: 1rem; }
.section-subtitle, .stories__sub { text-wrap: balance; }
/* Tarif zdarma má méně řádků: místo díry nad tlačítkem stojí svisle uprostřed vedle doporučeného */
@media (min-width: 981px) { .pricing__cards { align-items: center; } }
/* Tablet: karty příběhů pod sebou přes celou šířku obsahu, ne úzký sloupec uprostřed */
@media (max-width: 899px) { .story-cards { max-width: 44rem; } }

/* =====================================================================
   ČTEČKA PŘES CELOU ŠÍŘKU (10/2026, podle návrhu z Figmy): obrázek a karta
   vedle sebe ve stejné výšce, obrázek tak velký, jak dovolí šířka i výška
   okna (celá stránka se vejde bez posouvání), volby dole v kartě.
   ===================================================================== */
#view-reader {
  --reader-w: min(108rem, 100vw - 2 * var(--gutter));
  /* Výška lišt nahoře a dole + odsazení: obrázek nesmí vytlačit volby pod okraj okna */
  --reader-img: min(calc(var(--reader-w) * 0.47), calc(100svh - 10.5rem));
}
.reader-shell { max-width: calc(108rem + 2 * var(--gutter)); }
#view-reader .theme-menu { right: max(var(--gutter), calc((100vw - 108rem) / 2 + var(--gutter))); }
@media (min-width: 900px) {
  .reader { gap: clamp(1.25rem, 2vw, 2rem); }
  .reader__image { flex: 0 0 var(--reader-img); width: var(--reader-img); max-width: none; }
  .reader__body { min-height: var(--reader-img); display: flex; flex-direction: column; }
  .reader__choices { margin-top: auto; padding-top: 1.3rem; }
}
/* Velikost čteného textu podle šířky i výšky okna: na velkém monitoru větší,
   na nízkém notebooku se stránka vejde bez posouvání (stupně „Aa" zůstávají) */
#view-reader { --reader-fs: clamp(1.25rem, min(0.92rem + 1.02vw, 3.3svh), 2.1rem); }
#view-reader[data-text-size="l"] { --reader-fs: clamp(1.42rem, min(1.05rem + 1.18vw, 3.8svh), 2.4rem); }
#view-reader[data-text-size="xl"] { --reader-fs: clamp(1.62rem, min(1.2rem + 1.35vw, 4.3svh), 2.7rem); }
/* Užší okno: o kus menší obrázek, ať má karta s textem dost šířky */
@media (min-width: 900px) and (max-width: 1199px) {
  #view-reader { --reader-img: min(calc(var(--reader-w) * 0.42), calc(100svh - 10.5rem)); }
}

/* ── Doladění rozvržení po vizuální kontrole ── */
.faq__list { row-gap: 1rem; }
.faq__q { text-wrap: balance; }
/* Patička: spodní čára lícuje s obsahem nad ní */
.site-footer__bottom { max-width: var(--max-wide); }
/* Ceník: tlačítka obou tarifů na jedné lince; na tabletu tarify vedle sebe */
@media (min-width: 981px) { .pricing__cards { align-items: end; } }
@media (min-width: 768px) and (max-width: 980px) {
  .pricing__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 1.25rem; row-gap: 1.25rem; }
  .pricing__card { padding-inline: 1.25rem; }
}
/* Příběhy na tabletu: karty naležato (obrázek vlevo, text vpravo) místo tří obřích ilustrací */
@media (min-width: 600px) and (max-width: 899px) {
  .story-card { flex-direction: row; }
  .story-card__art { flex: 0 0 50%; aspect-ratio: auto; min-height: 230px; border-bottom: 0; border-right: var(--outline); }
  .story-card__body { justify-content: center; padding: 1.25rem 1.4rem 1.35rem; }
  .story-card__title { font-size: 1.5rem; }
}
/* Výzva na tabletu: užší krajní sloupce, ať se nadpis vejde na jeden řádek */
@media (min-width: 720px) and (max-width: 1023px) {
  .cta-section { padding-inline: clamp(1rem, 2.5vw, 1.5rem); }
  .cta-section__inner { --head-mascot: 130px; column-gap: 1rem; }
}
@media (min-width: 1024px) { .cta-section::before { background-position: 97% 8%, 6% 86%; } }

/* ── Stránka příběhu bez JavaScriptu ──
   Na /pribeh/<id> dá middleware.js nad úvod název, popis a odkazy na další příběhy
   (pro vyhledávače). S JavaScriptem ho hned skryje (hidden) a příběh ukáže detail knihy;
   tyhle styly vidí jen prohlížeč bez JavaScriptu. Nad ilustrací hero, která leze pod lištu. */
.story-seo {
  position: relative; z-index: 1;
  max-width: var(--max-wide); margin: 1.25rem auto 0; padding: 1.25rem var(--gutter) 2rem;
  background: var(--paper); color: var(--ink);
}
.story-seo__title { font: var(--w-display) clamp(1.75rem, 1.2rem + 1.6vw, 2.6rem)/1.1 var(--font-display); margin: 0 0 0.4rem; }
.story-seo__meta { color: var(--ink-soft); font-weight: 700; margin: 0 0 1rem; }
.story-seo__cover { display: block; width: min(240px, 60vw); height: auto; border-radius: var(--radius-md); margin: 0 0 1rem; }
.story-seo__desc { max-width: 40rem; margin: 0 0 1.5rem; }
.story-seo__more { font: var(--w-display) 1.3rem/1.2 var(--font-display); margin: 0 0 0.5rem; }
.story-seo__list { margin: 0; padding-left: 1.25rem; line-height: 1.8; }
/* Pojistka, kdyby vložený skript neproběhl (např. přísnější CSP): s JavaScriptem blok nikdy nebliká */
@media (scripting: enabled) { .story-seo { display: none; } }
