/* Zvídálek – web. Barvy podle aplikace (src/ui/theme.ts). Bez externích písem a knihoven. */
:root {
  --bg1: #bfe4ff;
  --bg2: #e6ddff;
  --bg3: #ffe8d4;
  --ink: #2d2a4a;
  --soft: #5f5c84;
  --card: rgba(255, 255, 255, 0.78);
  --card-solid: #ffffff;
  --card-border: rgba(255, 255, 255, 0.95);
  --hair: rgba(45, 42, 74, 0.1);
  --primary: #5b6cff;
  --primary-d: #3f4fd9;
  --on-primary: #ffffff;
  --link: #3f4fd9;
  --green: #22b866;
  --green-soft: #dff7e9;
  --gold: #ffb800;
  --gold-soft: #fff3c4;
  --pink: #ff6fb5;
  --purple: #9b5de5;
  --teal: #00bbd4;
  --orange: #ff9f1c;
  --shadow: 0 10px 30px rgba(58, 47, 122, 0.12);
  --radius: 28px;
  --radius-s: 16px;
  --header: rgba(255, 255, 255, 0.72);
  --sea1: #8fd3ff;
  --sea2: #4fc1d9;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg1: #1b2140;
    --bg2: #241d3f;
    --bg3: #2c2030;
    --ink: #eeecff;
    --soft: #b3aed6;
    --card: rgba(40, 36, 66, 0.82);
    --card-solid: #28243f;
    --card-border: rgba(255, 255, 255, 0.08);
    --hair: rgba(255, 255, 255, 0.12);
    --primary: #7684ff;
    --primary-d: #5b6cff;
    --link: #a9b2ff;
    --green-soft: #1d3a2c;
    --gold-soft: #3b3220;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --header: rgba(28, 26, 46, 0.78);
    --sea1: #1d4a6b;
    --sea2: #17606f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg2) linear-gradient(170deg, var(--bg1) 0%, var(--bg2) 45%, var(--bg3) 100%) fixed;
  min-height: 100vh;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 900; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 7vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4.6vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin: 0.25em 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card-solid); padding: 8px 14px; border-radius: 12px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- hlavička ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--hair);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.25rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 2px 8px rgba(58, 47, 122, 0.2); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 800; font-size: 0.95rem; padding: 8px 10px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--card); }
.nav .lang { border: 1.5px solid var(--hair); }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 14px; border: 1.5px solid var(--hair);
    background: var(--card); color: var(--ink); font-size: 1.3rem; cursor: pointer;
  }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; padding: 8px 16px 16px; background: var(--card-solid); border-bottom: 1px solid var(--hair); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
  .no-js .nav { display: flex; position: static; flex-direction: row; flex-wrap: wrap; box-shadow: none; background: none; border: 0; padding: 0; }
  .no-js .nav-toggle { display: none; }
  .no-js .site-header .wrap { flex-wrap: wrap; }
}

/* ---------- tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  min-height: 52px; padding: 12px 22px; border-radius: 999px;
  font-weight: 900; font-size: 1.05rem; text-decoration: none; line-height: 1.2;
  background: var(--primary); color: var(--on-primary); border: 0;
  box-shadow: 0 6px 0 var(--primary-d), 0 10px 22px rgba(63, 79, 217, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--primary-d); }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: 0 4px 0 var(--hair); border: 1.5px solid var(--card-border); }

/* Tlačítko Google Play (vlastní, ve stylu odznaku obchodu) */
.play {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 22px 10px 16px; border-radius: 16px;
  background: #1f1d2e; color: #fff; text-decoration: none; border: 1.5px solid #4a4766;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.play svg { width: 30px; height: 32px; flex: none; }
.play small { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; }
.play strong { display: block; font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.play:hover { background: #2b2840; }
.play.is-soon { cursor: default; opacity: 0.92; }
/* Přepínač: <body class="play-soon"> = „Brzy na Google Play“, bez třídy = odkaz do obchodu. */
.play-soon .play-live { display: none !important; }
body:not(.play-soon) .play-soon-only { display: none !important; }
.soon-note { font-size: 0.95rem; color: var(--soft); font-weight: 700; margin: 10px 0 0; }

/* ---------- hero ---------- */
.hero { padding: 40px 0 24px; overflow: hidden; }
.hero .wrap { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.1fr 0.9fr; } .hero { padding: 64px 0 40px; } }
.hero .kicker { display: inline-block; font-weight: 900; font-size: 0.9rem; color: var(--primary-d); background: var(--card); border: 1.5px solid var(--card-border); padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; }
@media (prefers-color-scheme: dark) { .hero .kicker { color: var(--link); } }
.hero .tagline { font-size: clamp(1.25rem, 3.6vw, 1.6rem); font-weight: 800; color: var(--soft); margin-bottom: 0.6em; }
.hero .lead { font-size: 1.12rem; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 22px; }
.hero-art { position: relative; justify-self: center; width: min(420px, 88vw); aspect-ratio: 1; }
@media (max-width: 859px) { .hero { padding-top: 16px; } .hero-art { order: -1; width: min(240px, 66vw); margin-bottom: -12px; } }
.hero-art::before { content: ""; position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.5) 65%, transparent); }
@media (prefers-color-scheme: dark) { .hero-art::before { background: radial-gradient(closest-side, rgba(150, 140, 255, 0.35), rgba(150, 140, 255, 0.12) 65%, transparent); } }
.hero-art .mascot { position: absolute; inset: 4%; width: 92%; animation: bob 3.2s ease-in-out infinite; }
.hero-art .sym { position: absolute; font-weight: 900; font-size: clamp(2rem, 7vw, 3rem); line-height: 1; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.15); animation: float 5s ease-in-out infinite; }
.sym.s1 { left: 2%; top: 8%; color: var(--pink); }
.sym.s2 { right: 4%; top: 4%; color: var(--orange); animation-delay: -1.5s; }
.sym.s3 { left: 0; bottom: 14%; color: var(--purple); animation-delay: -3s; }
.sym.s4 { right: 2%; bottom: 18%; color: var(--teal); animation-delay: -2s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-8px) rotate(6deg); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 0; }
.chips li { margin: 0; background: var(--card); border: 1.5px solid var(--card-border); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 0.92rem; }

/* ---------- sekce a karty ---------- */
section { padding: 40px 0; scroll-margin-top: 64px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 28px; }
.section-head p { color: var(--soft); font-size: 1.1rem; font-weight: 600; }
.card {
  background: var(--card); border: 1.5px solid var(--card-border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.grid { display: grid; gap: 16px; }
@media (min-width: 600px) { .grid.two, .grid.three, .grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(4, 1fr); } }
.feature { display: flex; flex-direction: column; gap: 6px; }
.feature .ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 1.8rem; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--soft); font-weight: 600; }
.ico.c1 { background: #e3e7ff; } .ico.c2 { background: #dff7e9; } .ico.c3 { background: #fff0d6; }
.ico.c4 { background: #ffe1f0; } .ico.c5 { background: #efe3ff; } .ico.c6 { background: #d9f6fb; }
@media (prefers-color-scheme: dark) { .feature .ico { background: rgba(255, 255, 255, 0.08); } }

/* Zvídálek roste */
.grow { display: grid; gap: 22px; align-items: center; }
@media (min-width: 860px) { .grow { grid-template-columns: 1fr 1fr; } }
.stages { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; list-style: none; padding: 0; margin: 0; }
.stages li { flex: 1; text-align: center; margin: 0; font-size: 0.8rem; font-weight: 800; color: var(--soft); }
.stages img { margin: 0 auto 4px; }
.stages li:nth-child(1) img { width: 70%; } .stages li:nth-child(2) img { width: 80%; } .stages li:nth-child(3) img { width: 90%; }
.stages li:nth-child(4) img { width: 100%; } .stages li:nth-child(5) img { width: 110%; max-width: 110%; margin-left: -5%; }

/* Mapa ostrovů */
.islands {
  position: relative; border-radius: var(--radius); overflow: hidden; padding: 22px;
  background: linear-gradient(180deg, var(--sea1), var(--sea2)); color: #fff; box-shadow: var(--shadow);
}
.islands h2, .islands h3 { color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15); }
.islands p { color: rgba(255, 255, 255, 0.95); font-weight: 700; }
.isle-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
@media (min-width: 700px) { .isle-row { grid-template-columns: repeat(6, 1fr); } }
.isle { background: rgba(255, 255, 255, 0.22); border-radius: 22px; padding: 8px; text-align: center; font-size: 0.82rem; font-weight: 800; }
.isle img { width: 100%; aspect-ratio: 1; }

/* Video */
.video-box { position: relative; border-radius: var(--radius); overflow: hidden; background: #1f1d2e; box-shadow: var(--shadow); max-width: 900px; margin: 0 auto; aspect-ratio: 16 / 9; }
.video-box video { width: 100%; height: 100%; object-fit: contain; background: #1f1d2e; }
.video-box.portrait { max-width: 380px; aspect-ratio: 9 / 16; }
.video-fallback { display: none; position: absolute; inset: 0; place-items: center; text-align: center; padding: 24px; color: var(--ink); background: linear-gradient(160deg, var(--bg1), var(--bg2), var(--bg3)); }
.video-fallback img { width: 120px; margin: 0 auto 10px; }
.video-box.missing { aspect-ratio: auto; max-width: 640px; }
.video-box.missing video { display: none; }
.video-box.missing .video-fallback { display: grid; position: static; min-height: 240px; }
.video-fallback p { margin: 0; }

/* Galerie snímků */
.shots { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px; margin: 0 -4px; list-style: none; -webkit-overflow-scrolling: touch; }
.shots li { flex: 0 0 auto; width: min(62vw, 240px); scroll-snap-align: center; margin: 0; }
.shots picture { display: block; }
.shots img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 22px; border: 4px solid var(--card-solid); box-shadow: var(--shadow); background: var(--card); }
.shots li.missing { display: none; }
.shots-empty { display: none; text-align: center; }
.shots-empty.show { display: block; }
.shots-empty img { width: 110px; margin: 0 auto 6px; }

/* Třídy a témata */
.grades { display: grid; gap: 14px; }
@media (min-width: 700px) { .grades { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grades { grid-template-columns: repeat(5, 1fr); } }
.grade { padding: 18px; border-top: 6px solid var(--gc, var(--primary)); }
.grade h3 { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.grade .tag { font-size: 0.75rem; font-weight: 900; padding: 3px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green); white-space: nowrap; }
.grade ul { margin: 0; padding-left: 1.1em; font-size: 0.95rem; font-weight: 600; }
.grade .isle-name { font-size: 0.85rem; color: var(--soft); font-weight: 800; margin: -4px 0 8px; }

/* Ceník */
.prices { display: grid; gap: 16px; }
@media (min-width: 760px) { .prices { grid-template-columns: repeat(3, 1fr); } }
.price { text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.price .amount { font-size: 2.4rem; font-weight: 900; line-height: 1.1; }
.price .was { color: var(--soft); font-weight: 700; }
.price .was s { opacity: 0.8; }
.price.best { border: 3px solid var(--gold); background: linear-gradient(180deg, var(--gold-soft), var(--card)); }
.price .badge { font-size: 0.8rem; font-weight: 900; background: var(--gold); color: #2d2a4a; padding: 4px 10px; border-radius: 999px; }
.note { color: var(--soft); font-weight: 600; font-size: 0.98rem; }

/* Pro školy */
.school { display: grid; gap: 18px; align-items: center; }
@media (min-width: 760px) { .school { grid-template-columns: 160px 1fr; } }
.school img { width: 140px; margin: 0 auto; }

/* FAQ */
.faq details { background: var(--card); border: 1.5px solid var(--card-border); border-radius: var(--radius-s); margin-bottom: 10px; box-shadow: 0 4px 14px rgba(58, 47, 122, 0.06); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 900; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--primary); transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 18px 14px; color: var(--soft); font-weight: 600; }

/* Kontakt */
.contact { text-align: center; }
.contact .mail { font-size: clamp(1.3rem, 5vw, 1.8rem); font-weight: 900; word-break: break-word; }

/* Textové stránky (zásady, podpora) */
.doc { padding: 32px 0 48px; }
.doc .card { padding: clamp(20px, 4vw, 40px); }
.doc h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); }
.doc h2 { font-size: 1.4rem; margin-top: 1.6em; }
.doc h3 { margin-top: 1.2em; }
.doc .meta { color: var(--soft); font-weight: 700; }
.doc table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 0 0 1em; }
.doc th, .doc td { border: 1px solid var(--hair); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: rgba(91, 108, 255, 0.08); }
.table-scroll { overflow-x: auto; }
.todo { background: #fff3c4; color: #5a4300; border: 2px dashed #e0a100; border-radius: 8px; padding: 1px 6px; font-weight: 800; }
.toc { background: rgba(91, 108, 255, 0.07); border-radius: var(--radius-s); padding: 14px 18px; margin: 0 0 1.4em; }
.toc ol { margin: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 44px; margin: 0 0 12px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 900; display: grid; place-items: center; font-size: 0.9rem; }
.path { font-weight: 800; background: rgba(91, 108, 255, 0.1); border-radius: 8px; padding: 1px 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.help-nav { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 1.4em; }
.help-nav li { margin: 0; }
.help-nav a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(91, 108, 255, 0.1); font-weight: 800; text-decoration: none; }

/* 404 */
.lost { text-align: center; padding: 60px 0; }
.lost img { width: 180px; margin: 0 auto 10px; }

/* ---------- patička ---------- */
.site-footer { padding: 32px 0 40px; border-top: 1px solid var(--hair); margin-top: 24px; background: var(--header); }
.site-footer .wrap { display: grid; gap: 18px; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer h2 { font-size: 1rem; margin-bottom: 6px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 4px 0; }
.site-footer p, .site-footer small { color: var(--soft); font-weight: 600; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.15rem; margin-bottom: 6px; }
.foot-brand img { width: 34px; height: 34px; border-radius: 10px; }
