:root {
  --ink: #35234f;
  --muted: #6f6381;
  --purple: #7950b5;
  --purple-dark: #5c368f;
  --cream: #fffaf5;
  --pink: #f6a7c9;
  --yellow: #ffd671;
  --shadow: 0 20px 50px rgba(69, 40, 96, .14);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: "Nunito", system-ui, sans-serif; overflow-x: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 4px solid #ffcb45; outline-offset: 4px; }
.skip-link { position: fixed; z-index: 100; left: 1rem; top: -5rem; padding: .8rem 1rem; border-radius: 0 0 12px 12px; background: #fff; }
.skip-link:focus { top: 0; }

.topbar { height: 76px; padding: 0 clamp(20px, 5vw, 80px); position: fixed; z-index: 20; inset: 0 0 auto; display: flex; align-items: center; gap: 28px; color: white; transition: background .3s, box-shadow .3s, color .3s; }
.topbar.scrolled { background: rgba(255, 250, 245, .93); color: var(--ink); box-shadow: 0 6px 25px rgba(65, 39, 87, .09); backdrop-filter: blur(15px); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 800 1.35rem "Baloo 2", sans-serif; letter-spacing: .01em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #ff9dc7, #8a5ac7); box-shadow: inset 0 0 0 3px rgba(255,255,255,.4); }
.nav-links { display: flex; gap: 30px; margin: auto; }
.nav-links a { position: relative; text-decoration: none; font-size: .9rem; font-weight: 800; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: currentColor; transition: right .25s; }
.nav-links a:hover::after { right: 0; }
.sound-toggle { border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.15); color: inherit; padding: 8px 13px; border-radius: 99px; cursor: pointer; display: flex; align-items: center; gap: 7px; font-weight: 800; }
.topbar.scrolled .sound-toggle { border-color: #ddd0e7; background: white; }
.sound-toggle[aria-pressed="true"] { background: #fff; color: var(--purple-dark); }

.hero { min-height: 720px; height: min(92vh, 900px); position: relative; isolation: isolate; display: grid; align-items: center; overflow: hidden; color: white; }
.hero-art { position: absolute; z-index: -3; inset: 0; background: url("assets/unicorn-meadow.webp") center center / cover no-repeat; transform: scale(1.03); animation: heroIn 1.8s ease-out both; }
.hero-wash { position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, rgba(76, 39, 104, .6) 0%, rgba(112, 62, 142, .33) 36%, rgba(56, 32, 80, .03) 68%), linear-gradient(0deg, rgba(47, 22, 66, .3), transparent 35%); }
.hero-content { width: min(1200px, calc(100% - 40px)); margin: 42px auto 0; }
.hero-content > * { max-width: 610px; }
.eyebrow, .kicker { text-transform: uppercase; font-size: .72rem; font-weight: 800; letter-spacing: .18em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 20px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(8px); }
h1, h2, h3 { font-family: "Baloo 2", sans-serif; margin: 0; line-height: 1.02; }
h1 { margin-top: 22px; font-size: clamp(3.5rem, 7vw, 6.7rem); letter-spacing: -.045em; text-shadow: 0 5px 30px rgba(46, 22, 58, .25); }
h1 span { color: #ffe2a2; }
.hero-content > p { font-size: clamp(1rem, 1.5vw, 1.22rem); line-height: 1.65; font-weight: 700; text-shadow: 0 2px 10px rgba(41, 15, 53, .45); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { min-height: 52px; border: 0; border-radius: 99px; padding: 0 23px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; font-weight: 800; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-3px); }
.button-primary { color: white; background: linear-gradient(135deg, #9a69d2, #7042a7); box-shadow: 0 10px 25px rgba(90, 48, 133, .3); }
.button-glass { color: white; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.55); backdrop-filter: blur(8px); }
.scroll-hint { position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; font-size: .7rem; text-transform: uppercase; font-weight: 800; letter-spacing: .12em; }
.scroll-hint span { width: 23px; height: 36px; border: 2px solid rgba(255,255,255,.75); border-radius: 20px; }
.scroll-hint span::before { content: ""; display: block; margin: 6px auto; width: 4px; height: 7px; border-radius: 5px; background: white; animation: scroll 1.6s infinite; }
.floating-sparkles i { position: absolute; left: var(--x); top: var(--y); font-style: normal; color: #fff5ba; animation: twinkle 2.4s var(--d) infinite ease-in-out; }

.section { padding: 100px max(24px, calc((100vw - 1180px) / 2)); }
.section-heading { text-align: center; max-width: 860px; margin: 0 auto 52px; }
.section-heading.compact { margin-bottom: 42px; }
.kicker { color: #9a69bd; }
.section-heading h2, .grownups h2 { margin-top: 12px; font-size: clamp(2.25rem, 4vw, 4rem); }
.section-heading h2 em { color: #a666b6; font-style: normal; }
.section-heading p { max-width: 700px; margin: 20px auto 0; line-height: 1.75; color: var(--muted); font-size: 1.03rem; }

.promise { position: relative; background: radial-gradient(circle at 12% 15%, rgba(244, 190, 215, .28), transparent 25%), #fffaf5; }
.virtue-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; align-items: stretch; }
.virtue { min-width: 0; min-height: 210px; border-radius: 80px 80px 24px 24px; padding: 27px 13px 22px; text-align: center; background: white; box-shadow: 0 10px 25px rgba(79, 48, 96, .08); transition: transform .25s; }
.virtue:hover { transform: translateY(-8px) rotate(-1deg); }
.virtue > span { width: 60px; height: 60px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; font-size: 1.7rem; background: color-mix(in srgb, var(--c), white 75%); }
.virtue h3 { font-size: 1.1rem; }
.virtue p { color: var(--muted); font-size: .78rem; line-height: 1.45; }
.virtue.pink { --c: #ef72aa; }.virtue.purple { --c: #8c66c6; }.virtue.blue { --c: #67aee4; }.virtue.green { --c: #6ab88a; }.virtue.yellow { --c: #eeba49; }.virtue.coral { --c: #ec7d78; }.virtue.indigo { --c: #6577c8; }

.friends { background: #f4effa; }
.friend-scroller { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.friend-card { min-width: 0; border: 0; border-radius: 25px; padding: 22px 17px; min-height: 290px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; cursor: pointer; color: var(--ink); background: var(--card); overflow: hidden; box-shadow: 0 12px 30px rgba(72, 43, 99, .08); transition: transform .25s, box-shadow .25s; }
.friend-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 25%, rgba(255,255,255,.8), transparent 40%); }
.friend-card:hover, .friend-card[aria-expanded="true"] { transform: translateY(-7px); box-shadow: var(--shadow); }
.friend-card > * { position: relative; }
.friend-card.aurora { --card: #f8dce9; }.friend-card.solenne { --card: #fff0c6; }.friend-card.brannoc { --card: #dcefdc; }.friend-card.nymbria { --card: #dcd9ef; }.friend-card.veyra { --card: #f8ded2; }
.friend-orb { height: 155px; display: grid; place-items: center; font-size: 5rem; filter: drop-shadow(0 10px 7px rgba(72,45,87,.14)); transition: transform .3s; }
.friend-card:hover .friend-orb { transform: scale(1.08) rotate(3deg); }
.friend-copy { display: flex; flex-direction: column; gap: 8px; }
.friend-copy strong { font: 800 1.05rem/1.2 "Baloo 2", sans-serif; }
.friend-copy small { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.card-plus { position: absolute; right: 13px; top: 13px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.65); font-size: 1.2rem; transition: transform .25s; }
.friend-card[aria-expanded="true"] .card-plus { transform: rotate(45deg); }
.friend-detail { max-width: 850px; margin: 20px auto 0; padding: 24px 30px; background: white; border-radius: 22px; text-align: center; line-height: 1.6; box-shadow: var(--shadow); animation: reveal .3s both; }
.friend-detail strong { color: var(--purple); }

.magic { color: white; background: radial-gradient(circle at 15% 20%, rgba(255,255,255,.08), transparent 17%), radial-gradient(circle at 88% 60%, rgba(255,191,224,.13), transparent 24%), #593b7b; position: relative; overflow: hidden; }
.magic::before, .magic::after { content: "✦"; position: absolute; color: rgba(255,255,255,.12); font-size: 16rem; }
.magic::before { left: -30px; top: 20px; }.magic::after { right: -15px; bottom: 5px; }
.section-heading.light { position: relative; z-index: 1; }.section-heading.light .kicker { color: #e3b7ff; }.section-heading.light p { color: #e4d9eb; }
.quest-wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 25px; max-width: 950px; margin: auto; }
.quest-card, .gleam-meter { min-height: 330px; padding: 37px; border-radius: var(--radius); }
.quest-card { color: var(--ink); background: linear-gradient(145deg, #fff, #fff5e8); text-align: center; box-shadow: var(--shadow); }
.quest-icon { display: block; font-size: 3.4rem; animation: bob 2.5s infinite ease-in-out; }
.quest-label { margin: 7px 0; color: #a278ad; text-transform: uppercase; font-size: .7rem; font-weight: 800; letter-spacing: .15em; }
.quest-card h3 { min-height: 85px; display: grid; place-items: center; font-size: 1.6rem; }
.quest-actions { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 13px; }
.shuffle, .text-button { border: 0; background: none; color: #765885; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.gleam-meter { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.1); backdrop-filter: blur(8px); display: flex; flex-direction: column; justify-content: center; }
.meter-title { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 24px; font-weight: 800; }
.meter-title strong { color: #ffe5a7; }
.rainbow-track { height: 25px; position: relative; border-radius: 20px; background: rgba(27,14,39,.35); box-shadow: inset 0 2px 5px rgba(0,0,0,.25); }
.rainbow-track > div { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ef75a2, #f3aa66, #ffe176, #79d18f, #6dbbe5, #aa78d0); transition: width .7s cubic-bezier(.2,.9,.2,1); }
.track-unicorn { position: absolute; top: 50%; left: 0; transform: translate(-35%, -55%); font-size: 2.2rem; filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); transition: left .7s cubic-bezier(.2,.9,.2,1); }
.sparkle-row { display: flex; justify-content: space-between; margin: 28px 5px 18px; }
.sparkle-row span { width: 30px; height: 30px; display: grid; place-items: center; color: rgba(255,255,255,.2); font-size: 1.4rem; transition: color .3s, transform .3s; }
.sparkle-row span.on { color: #ffe28a; transform: scale(1.25) rotate(12deg); text-shadow: 0 0 14px #ffd26a; }
.gleam-meter > p { text-align: center; color: #ded2e7; }
.breath-card { position: relative; z-index: 1; width: min(950px, 100%); margin: 25px auto 0; padding: 20px 27px; border: 1px solid rgba(255,255,255,.25); color: white; border-radius: 22px; background: rgba(255,255,255,.08); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; text-align: left; cursor: pointer; transition: background .2s, transform .2s; }
.breath-card:hover { background: rgba(255,255,255,.14); transform: translateY(-3px); }
.breath-card span:nth-child(2) { display: flex; flex-direction: column; gap: 4px; }.breath-card small { color: #dacde3; }
.breath-symbol { width: 52px; height: 52px; position: relative; display: grid; place-items: center; color: #ffe49b; }
.breath-symbol i { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; animation: breathe 3s infinite; }

.grownups { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; background: #fffaf5; }
.grownups > div:first-child > p { color: var(--muted); line-height: 1.75; }
.safety-note { padding: 30px; border-radius: 26px; background: #efe8f7; display: flex; gap: 20px; align-items: flex-start; }
.safety-note > span { font-size: 2rem; }.safety-note p { margin: 0; line-height: 1.6; }

footer { padding: 38px max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #756780; background: #eee5f2; font-size: .77rem; }
footer .brand { color: var(--ink); } footer p { text-align: center; }

dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(45, 22, 61, .65); backdrop-filter: blur(6px); }
.magic-dialog, .breath-dialog { width: min(620px, calc(100% - 30px)); border-radius: 30px; padding: 42px; text-align: center; background: #fffaf5; box-shadow: 0 30px 80px rgba(20,5,29,.35); animation: dialogIn .35s both; }
.dialog-close { position: absolute; right: 17px; top: 15px; border: 0; background: #eee5f2; color: var(--ink); width: 36px; height: 36px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }
.dialog-moon { display: block; font-size: 3rem; margin-bottom: 10px; }
.magic-dialog h2, .breath-dialog h2 { font-size: 2.4rem; margin: 8px 0 20px; }
.story-text { text-align: left; color: var(--muted); line-height: 1.65; }.story-text blockquote { margin: 22px 0; padding: 15px 20px; border-left: 4px solid #ba83cc; color: var(--ink); background: #f2eafa; border-radius: 0 13px 13px 0; }
.breath-dialog { background: linear-gradient(160deg, #fffaf5, #f0e5fa); }
.breath-orb { width: 150px; height: 150px; margin: 15px auto; border: 0; border-radius: 50%; color: white; background: radial-gradient(circle at 35% 30%, #ffc9df, #9465c4 55%, #62418c); box-shadow: 0 0 0 12px rgba(153,100,199,.1), 0 15px 40px rgba(87,48,122,.25); cursor: pointer; font-size: 3rem; }
.breath-orb.running { animation: guidedBreath 8s ease-in-out 3; }
.breath-count { min-height: 24px; font-weight: 800; color: #77568d; }
.text-button { display: block; margin: 18px auto 0; }

.toast { position: fixed; z-index: 90; left: 50%; bottom: 25px; transform: translate(-50%, 150%); padding: 13px 20px; border-radius: 99px; display: flex; gap: 9px; align-items: center; color: var(--ink); background: white; box-shadow: var(--shadow); transition: transform .4s cubic-bezier(.2,1,.3,1); }
.toast.show { transform: translate(-50%, 0); }.toast span { color: #eab64e; }
#confetti { position: fixed; z-index: 80; inset: 0; pointer-events: none; overflow: hidden; }
.confetti-piece { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall var(--time) linear forwards; }

@keyframes heroIn { from { opacity: 0; transform: scale(1.1); } to { opacity: 1; transform: scale(1.03); } }
@keyframes twinkle { 0%,100% { opacity: .25; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1.4) rotate(30deg); } }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 45% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes breathe { 0%,100% { transform: scale(.75); opacity: .3; } 50% { transform: scale(1); opacity: 1; } }
@keyframes reveal { from { opacity: 0; transform: translateY(-8px); } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(20px) scale(.96); } }
@keyframes guidedBreath { 0%,100% { transform: scale(.72); } 47%,58% { transform: scale(1.12); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (max-width: 1000px) {
  .virtue-grid { grid-template-columns: repeat(4, 1fr); }.virtue { border-radius: 50px 50px 22px 22px; }
  .friend-scroller { grid-template-columns: repeat(5, 210px); overflow-x: auto; padding: 10px 5px 25px; scroll-snap-type: x mandatory; }.friend-card { scroll-snap-align: center; }
}
@media (max-width: 720px) {
  .topbar { height: 66px; padding: 0 18px; }.nav-links { display: none; }.sound-toggle { margin-left: auto; }.sound-label { display: none; }
  .hero { height: 820px; min-height: 92vh; align-items: end; padding-bottom: 115px; }.hero-art { background-position: 61% center; }.hero-wash { background: linear-gradient(0deg, rgba(60,28,78,.8) 0%, rgba(72,36,91,.25) 68%, rgba(39,19,53,.1)); }
  .hero-content { margin-top: 0; }.hero-content > p { font-size: .96rem; }.hero-actions { align-items: stretch; }.button { min-height: 50px; }
  h1 { font-size: clamp(3.1rem, 15vw, 5rem); }.section { padding: 75px 20px; }
  .virtue-grid { grid-template-columns: repeat(2, 1fr); }.virtue { min-height: 210px; }.virtue:last-child { grid-column: 1 / -1; width: 50%; justify-self: center; }
  .quest-wrap { grid-template-columns: 1fr; }.quest-card, .gleam-meter { padding: 30px 22px; }.meter-title { font-size: .86rem; }
  .grownups { grid-template-columns: 1fr; }.breath-card { padding: 16px; gap: 12px; }
  footer { flex-direction: column; text-align: center; }.magic-dialog, .breath-dialog { padding: 38px 24px 30px; }
}
@media (max-width: 420px) {
  .hero-actions { flex-direction: column; }.hero-actions .button { width: 100%; }.virtue-grid { gap: 9px; }.virtue { padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Extra unicorn sparkle layer */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .95; background: radial-gradient(circle, #fff 0 2px, transparent 3px) 8% 18% / 150px 150px, radial-gradient(circle, #fff7b6 0 3px, transparent 4px) 21% 45% / 220px 185px, radial-gradient(circle, #fff 0 1.5px, transparent 3px) 52% 11% / 105px 115px, radial-gradient(circle, #fff3a8 0 2.5px, transparent 4px) 74% 34% / 190px 170px, radial-gradient(circle, #fff 0 2px, transparent 3px) 95% 70% / 135px 140px; animation: starDrift 12s linear infinite; }
.hero::after { content: ""; position: absolute; z-index: -1; pointer-events: none; width: 330px; height: 330px; top: 18%; left: 28%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 241, 169, .32), rgba(255, 230, 215, .1) 35%, transparent 70%); filter: blur(5px); animation: auraPulse 4s ease-in-out infinite; }
.hero-art { filter: saturate(1.12) brightness(1.03); }
.floating-sparkles i { z-index: 1; font-size: clamp(1.1rem, 2vw, 1.8rem); text-shadow: 0 0 9px #fff, 0 0 22px #ffdb73; }
.button-primary { box-shadow: 0 10px 25px rgba(90, 48, 133, .3), 0 0 0 2px rgba(255, 239, 176, .45), 0 0 25px rgba(255, 215, 113, .32); }
.button-primary:hover { box-shadow: 0 14px 30px rgba(90, 48, 133, .35), 0 0 0 2px rgba(255, 246, 197, .7), 0 0 36px rgba(255, 215, 113, .55); }
.virtue > span { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c), transparent 84%), 0 5px 14px color-mix(in srgb, var(--c), transparent 63%); }
.friend-card::after { content: "✦  ·  ✧  ·  ✦"; position: absolute; inset: auto 0 11px; color: rgba(101, 61, 130, .36); letter-spacing: .4em; font-size: .72rem; }
.magic::before, .magic::after { text-shadow: 0 0 40px rgba(255, 215, 113, .38); animation: twinkle 4s infinite ease-in-out; }
.rainbow-track > div { box-shadow: 0 0 16px rgba(255, 229, 133, .75); }
.breath-orb { background: radial-gradient(circle at 35% 30%, #fff5b5 0 5%, #ffc9df 28%, #9465c4 55%, #62418c); box-shadow: 0 0 0 12px rgba(153,100,199,.1), 0 0 38px rgba(255, 217, 117, .55), 0 15px 40px rgba(87,48,122,.25); }
.click-spark { position: fixed; z-index: 95; pointer-events: none; color: #fff5a9; font-size: 1.2rem; text-shadow: 0 0 7px white, 0 0 15px #ffc84d; animation: clickSpark .75s ease-out forwards; }
@keyframes starDrift { from { transform: translateY(0); } 50% { transform: translateY(-14px); } to { transform: translateY(0); } }
@keyframes auraPulse { 0%,100% { transform: scale(.88); opacity: .5; } 50% { transform: scale(1.13); opacity: 1; } }
@keyframes clickSpark { from { opacity: 1; transform: translate(-50%, -50%) scale(.6) rotate(0); } to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.6) rotate(80deg); } }


/* Seven-sparkle victory finale */
.finale-dialog { width: min(760px, calc(100% - 24px)); max-height: min(850px, calc(100dvh - 24px)); overflow: auto; border: 0; border-radius: 38px; padding: 0; color: var(--ink); background: linear-gradient(165deg, #fffdf3 0%, #f4e7ff 60%, #dfcdf9 100%); box-shadow: 0 35px 100px rgba(38, 14, 62, .5); text-align: center; }
.finale-dialog::backdrop { background: rgba(35, 9, 57, .76); backdrop-filter: blur(10px); }
.finale-inner { position: relative; padding: 42px 34px 34px; overflow: hidden; isolation: isolate; }
.finale-inner::before, .finale-inner::after { content: "✦  ✧  ✦  ✧  ✦"; position: absolute; z-index: -1; left: -15%; right: -15%; color: rgba(255, 194, 81, .55); font-size: clamp(2rem, 7vw, 4rem); letter-spacing: .55em; white-space: nowrap; animation: finaleStars 4.5s linear infinite; }
.finale-inner::before { top: 24px; }.finale-inner::after { bottom: 35px; animation-direction: reverse; }
.finale-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 13px; border-radius: 999px; color: #76509a; background: rgba(255,255,255,.6); font-size: .75rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.finale-dialog h2 { margin: 13px 0 6px; font-size: clamp(2.65rem, 7vw, 4.7rem); line-height: .94; color: #63378d; text-shadow: 0 3px 0 #fff, 0 7px 24px rgba(125, 73, 172, .18); }
.finale-dialog h2 span { color: #e792b9; }
.finale-dialog p { max-width: 470px; margin: 12px auto; color: #635174; font-weight: 700; line-height: 1.55; }
.victory-stage { width: min(320px, 78vw); aspect-ratio: 495 / 792; margin: -5px auto -36px; position: relative; filter: drop-shadow(0 19px 15px rgba(82, 36, 118, .19)); }
.victory-stage::before { content: ""; position: absolute; z-index: -1; width: 88%; aspect-ratio: 1; bottom: 9%; left: 6%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 224, 103, .75), rgba(238, 166, 235, .15) 58%, transparent 70%); animation: finaleGlow 1.5s ease-in-out infinite alternate; }
.victory-sprite { width: 100%; height: 100%; background: url("assets/unicorn-victory-spritesheet.webp") left top / 400% 100% no-repeat; animation: unicornDance 1.2s steps(4) infinite; }
.finale-reward { margin: -3px auto 20px; padding: 11px 16px; max-width: 465px; border: 1px solid rgba(203, 152, 226, .58); border-radius: 18px; background: rgba(255,255,255,.55); color: #6d4987; font-weight: 800; }
.finale-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.finale-actions .button { min-height: 48px; }
.finale-reset { border: 0; background: none; color: #79598d; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
@keyframes unicornDance { to { background-position: 100% 0; } }
@keyframes finaleGlow { to { transform: scale(1.2); opacity: .7; } }
@keyframes finaleStars { to { transform: translateX(-14%); } }
@media (max-width: 480px) { .finale-inner { padding: 34px 18px 26px; }.victory-stage { margin-bottom: -28px; }.finale-dialog h2 { font-size: 2.8rem; } }


/* Four seconds at four frame beats per second: 16 timed dance frames. */
.victory-sprite { animation: unicornDance16 4s linear infinite; }
@keyframes unicornDance16 {
  0%, 6.24% { background-position: 0% 0; }
  6.25%, 12.49% { background-position: 33.3333% 0; }
  12.5%, 18.74% { background-position: 66.6667% 0; }
  18.75%, 24.99% { background-position: 100% 0; }
  25%, 31.24% { background-position: 0% 0; }
  31.25%, 37.49% { background-position: 33.3333% 0; }
  37.5%, 43.74% { background-position: 66.6667% 0; }
  43.75%, 49.99% { background-position: 100% 0; }
  50%, 56.24% { background-position: 0% 0; }
  56.25%, 62.49% { background-position: 33.3333% 0; }
  62.5%, 68.74% { background-position: 66.6667% 0; }
  68.75%, 74.99% { background-position: 100% 0; }
  75%, 81.24% { background-position: 0% 0; }
  81.25%, 87.49% { background-position: 33.3333% 0; }
  87.5%, 93.74% { background-position: 66.6667% 0; }
  93.75%, 100% { background-position: 100% 0; }
}


/* Smooth 4x4 victory sprite: 16 distinct poses, four frames each second. */
.victory-stage { aspect-ratio: 1 / 1; margin: 2px auto -20px; }
.victory-sprite { background-image: url("assets/unicorn-victory-16-spritesheet.webp"); background-size: 400% 400%; animation: unicornDance16Grid 4s linear infinite; }
@keyframes unicornDance16Grid {
  0%, 6.24% { background-position: 0% 0%; }
  6.25%, 12.49% { background-position: 33.3333% 0%; }
  12.5%, 18.74% { background-position: 66.6667% 0%; }
  18.75%, 24.99% { background-position: 100% 0%; }
  25%, 31.24% { background-position: 0% 33.3333%; }
  31.25%, 37.49% { background-position: 33.3333% 33.3333%; }
  37.5%, 43.74% { background-position: 66.6667% 33.3333%; }
  43.75%, 49.99% { background-position: 100% 33.3333%; }
  50%, 56.24% { background-position: 0% 66.6667%; }
  56.25%, 62.49% { background-position: 33.3333% 66.6667%; }
  62.5%, 68.74% { background-position: 66.6667% 66.6667%; }
  68.75%, 74.99% { background-position: 100% 66.6667%; }
  75%, 81.24% { background-position: 0% 100%; }
  81.25%, 87.49% { background-position: 33.3333% 100%; }
  87.5%, 93.74% { background-position: 66.6667% 100%; }
  93.75%, 100% { background-position: 100% 100%; }
}


/* Illustrated storybook shelf */
.storybook { background: linear-gradient(180deg, #fffaf5, #f6effb); }
.storybook-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1180px; margin: 0 auto; }
.story-card { padding: 0; overflow: hidden; border: 1px solid rgba(127, 82, 172, .13); border-radius: 25px; color: var(--ink); background: #fffdfa; box-shadow: 0 14px 31px rgba(75, 45, 96, .1); text-align: left; cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; }
.story-card:hover { transform: translateY(-8px) rotate(-.45deg); box-shadow: 0 21px 42px rgba(75, 45, 96, .17); }
.story-card figure { position: relative; margin: 0; overflow: hidden; background: #f3e6f8; }
.story-card figure::after { content: "Klepni a čti obrázky"; position: absolute; right: 10px; bottom: 9px; padding: 5px 9px; border-radius: 99px; color: #61417d; background: rgba(255,255,255,.86); font-size: .65rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; opacity: 0; transform: translateY(6px); transition: .25s; }
.story-card:hover figure::after, .story-card:focus-visible figure::after { opacity: 1; transform: translateY(0); }
.story-card img { width: 100%; aspect-ratio: 3 / 1; display: block; object-fit: cover; transition: transform .5s ease; }
.story-card:hover img { transform: scale(1.035); }
.story-card-copy { display: block; padding: 17px 19px 19px; }
.story-card-copy .story-number { display: block; margin-bottom: 4px; color: #a66ebc; font-size: .67rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.story-card-copy strong { display: block; font: 800 1.3rem/1.1 "Baloo 2", sans-serif; }
.story-card-copy small { display: block; margin-top: 7px; color: var(--muted); font-size: .83rem; font-weight: 700; line-height: 1.4; }
.story-dialog { width: min(1160px, calc(100% - 28px)); max-height: calc(100dvh - 28px); overflow: auto; border: 0; border-radius: 28px; padding: 26px; color: var(--ink); background: #fffaf5; box-shadow: 0 30px 90px rgba(35, 10, 53, .46); }
.story-dialog::backdrop { background: rgba(45, 22, 61, .7); backdrop-filter: blur(6px); }
.story-dialog h2 { margin: 8px 46px 8px 0; font-size: clamp(2rem, 4vw, 3.1rem); }
.story-dialog p { margin: 0 0 17px; color: var(--muted); font-weight: 700; }
.story-dialog img { width: 100%; display: block; border-radius: 17px; box-shadow: 0 12px 30px rgba(66, 39, 89, .14); }
@media (max-width: 800px) { .storybook-grid { grid-template-columns: 1fr; max-width: 560px; }.story-card figure::after { opacity: 1; transform: none; }.story-dialog { padding: 18px; } }


/* Five-book comic library */
.comic-library { background: radial-gradient(circle at 12% 16%, rgba(255, 215, 112, .22), transparent 19%), radial-gradient(circle at 88% 77%, rgba(180, 130, 222, .16), transparent 20%), #fffaf5; }
.book-shelf { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px; }
.book-card { min-width: 0; overflow: hidden; border: 0; border-radius: 20px; padding: 0 0 16px; color: var(--ink); background: #fff; box-shadow: 0 11px 25px rgba(73, 41, 95, .13); text-align: left; cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; }
.book-card:nth-child(2n) { transform: translateY(14px); }
.book-card:hover, .book-card:focus-visible { transform: translateY(-5px) rotate(-1.5deg); box-shadow: 0 19px 38px rgba(73, 41, 95, .2); }
.book-card:nth-child(2n):hover, .book-card:nth-child(2n):focus-visible { transform: translateY(6px) rotate(1.5deg); }
.book-cover { width: 100%; aspect-ratio: 13 / 16; display: block; position: relative; background: #e9d8f0 left top / 400% 100% no-repeat; box-shadow: inset 0 -10px 20px rgba(36, 11, 53, .1); }
.book-cover::after { content: "Kniha " attr(data-book); position: absolute; top: 9px; left: 9px; padding: 4px 8px; border-radius: 99px; color: #67417f; background: rgba(255,255,255,.85); font-size: .62rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.book-card-copy { display: block; padding: 14px 13px 0; }
.book-card-copy strong { display: block; font: 800 1.12rem/1.08 "Baloo 2", sans-serif; }
.book-card-copy small { display: block; margin-top: 6px; color: #886f96; font-size: .72rem; font-weight: 800; line-height: 1.35; }
.comic-reader { width: min(900px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; border: 0; border-radius: 29px; padding: 0; color: var(--ink); background: #fffaf5; box-shadow: 0 30px 90px rgba(30, 9, 48, .48); }
.comic-reader::backdrop { background: rgba(41, 17, 57, .75); backdrop-filter: blur(7px); }
.comic-reader-inner { padding: 30px; }
.comic-reader h2 { margin: 7px 48px 0 0; font-size: clamp(2rem, 5vw, 3.25rem); }
.comic-reader-grid { display: grid; grid-template-columns: minmax(220px, 330px) 1fr; gap: 30px; align-items: center; margin-top: 19px; }
.comic-page-art { width: min(100%, 330px); aspect-ratio: 16 / 25; justify-self: center; border-radius: 18px; background: #ece0ee left top / 400% 100% no-repeat; box-shadow: 0 14px 30px rgba(67, 35, 90, .18); transition: background-position .16s ease-out, transform .2s; }
.comic-page-art.turn { animation: pageTurn .25s ease-out; }
.comic-page-copy { min-width: 0; text-align: left; }
.comic-page-number { color: #a069bd; font-size: .74rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.comic-page-copy p { margin: 13px 0 19px; font: 700 clamp(1.1rem, 2.3vw, 1.43rem)/1.55 "Baloo 2", sans-serif; }
.comic-dots { display: flex; gap: 8px; margin: 16px 0 23px; }
.comic-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ded1e5; transition: .2s; }
.comic-dots i.on { width: 25px; border-radius: 9px; background: linear-gradient(90deg, #ef9cc2, #8c60bd); box-shadow: 0 2px 7px rgba(123, 75, 168, .3); }
.comic-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.comic-controls button { min-height: 45px; }
.comic-prev { border: 1px solid #ddcde7; color: #714b8d; background: #fff; }
.comic-prev:disabled { opacity: .4; cursor: not-allowed; }
@keyframes pageTurn { from { opacity: .4; transform: translateX(9px) scale(.98); } }
@media (max-width: 1080px) { .book-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }.book-card:nth-child(2n) { transform: none; } }
@media (max-width: 650px) { .book-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }.book-card:nth-child(5) { grid-column: 1 / -1; width: calc(50% - 6px); justify-self: center; }.comic-reader-inner { padding: 24px 19px 20px; }.comic-reader-grid { grid-template-columns: 1fr; gap: 15px; }.comic-page-art { width: min(75vw, 280px); }.comic-page-copy { text-align: center; }.comic-dots, .comic-controls { justify-content: center; } }


.comic-page-art { aspect-ratio: 3 / 4; background-size: contain; background-position: center; background-repeat: no-repeat; }

/* Generated unicorn icon system */
.unicorn-ui-icon { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 7px rgba(88, 50, 115, .16)); }
.virtue > span { padding: 3px; overflow: hidden; }
.friend-orb > span { width: 142px; height: 142px; display: block; font-size: 0; }
.quest-icon { min-height: 76px; display: grid; place-items: center; font-size: 0; }
.quest-icon .unicorn-ui-icon { width: 76px; height: 76px; }
.breath-symbol img { position: relative; z-index: 1; width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(255, 225, 124, .42)); }
.brand-mark { overflow: hidden; }
.brand-mark .unicorn-ui-icon { padding: 3px; filter: none; }
.eyebrow .unicorn-ui-icon { width: 19px; height: 19px; display: inline-block; vertical-align: middle; filter: none; }
.safety-note > span { width: 40px; height: 40px; display: block; flex: 0 0 40px; font-size: 0; }
.toast > span { width: 22px; height: 22px; display: block; font-size: 0; }


@media (min-width: 1000px) { .storybook-grid { grid-template-columns: repeat(4, 1fr); } }

/* Mobile-first large-image readers */
.storybook-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.story-card figure { aspect-ratio: 3 / 4; }
.story-card img { height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center; }
.story-reader { width: min(860px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; border: 0; border-radius: 28px; padding: 0; color: var(--ink); background: #fffaf5; box-shadow: 0 30px 90px rgba(35, 10, 53, .46); }
.story-reader::backdrop { background: rgba(45, 22, 61, .7); backdrop-filter: blur(6px); }
.story-reader-inner { padding: 28px; }
.story-reader h2 { margin: 6px 46px 8px 0; font-size: clamp(2rem, 5vw, 3.2rem); }
.story-reader-grid { display: grid; grid-template-columns: minmax(230px, 335px) 1fr; gap: 30px; align-items: center; }
.story-reader-art { width: min(100%, 335px); aspect-ratio: 3 / 4; justify-self: center; overflow: hidden; border-radius: 18px; background: #eee3f2; box-shadow: 0 14px 30px rgba(67, 35, 90, .18); }
.story-reader-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.story-reader-copy { text-align: left; }
.story-reader-copy p { margin: 13px 0 19px; font: 700 clamp(1.08rem, 2.3vw, 1.43rem)/1.55 "Baloo 2", sans-serif; }
.story-reader-dots { display: flex; gap: 8px; margin: 16px 0 23px; }
.story-reader-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ded1e5; }
.story-reader-dots i.on { width: 25px; border-radius: 9px; background: linear-gradient(90deg, #ef9cc2, #8c60bd); box-shadow: 0 2px 7px rgba(123, 75, 168, .3); }
.story-reader-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.story-reader-controls button { min-height: 45px; }
.story-reader-prev { border: 1px solid #ddcde7; color: #714b8d; background: #fff; }
.story-reader-prev:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 800px) {
  .storybook-grid, .book-shelf { display: flex; grid-template-columns: none; overflow-x: auto; max-width: none; padding: 7px 7vw 22px; margin: 0 -20px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .storybook-grid::-webkit-scrollbar, .book-shelf::-webkit-scrollbar { display: none; }
  .story-card, .book-card, .book-card:nth-child(2n), .book-card:nth-child(2n):hover, .book-card:nth-child(2n):focus-visible { flex: 0 0 78vw; width: auto; max-width: 340px; transform: none; scroll-snap-align: center; }
  .book-card:nth-child(5) { grid-column: auto; width: auto; justify-self: auto; }
  .story-card figure { aspect-ratio: 3 / 4; }
  .story-card figure::after { opacity: 1; transform: none; }
  .story-reader-inner { padding: 24px 19px 20px; }
  .story-reader-grid { grid-template-columns: 1fr; gap: 15px; }
  .story-reader-art { width: min(84vw, 330px); }
  .story-reader-copy { text-align: center; }
  .story-reader-dots, .story-reader-controls { justify-content: center; }
  .comic-page-art { width: min(84vw, 330px); }
}


/* Unicorn paint: extra-soft, child-first finishing layer */
:root { --bubble-pink: #ffd5e7; --bubble-lilac: #e7d6ff; --bubble-blue: #d9f2ff; --bubble-gold: #ffe59b; }
body { background: radial-gradient(circle at 8% 10%, rgba(255, 219, 237, .84) 0 5%, transparent 16%), radial-gradient(circle at 91% 28%, rgba(207, 234, 255, .75) 0 5%, transparent 18%), radial-gradient(circle at 50% 80%, rgba(255, 229, 155, .35) 0 5%, transparent 20%), #fffaf8; }
.section-heading .kicker, .grownups .kicker { display: inline-block; padding: 6px 12px; border-radius: 99px; color: #8050a1; background: linear-gradient(90deg, #ffe3ef, #eee1ff, #dff4ff); letter-spacing: .12em; }
.section-heading h2, .grownups h2 { text-wrap: balance; }
.section-heading h2 em { background: linear-gradient(90deg, #e982b3, #9973cf, #5daee0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.button { min-height: 55px; border: 2px solid rgba(255,255,255,.5); font-size: 1rem; }
.button-primary { background: linear-gradient(135deg, #f49ac3 0%, #b777dc 52%, #7aabe3 100%); }
.button-primary::before { content: "✦"; font-size: .8em; color: #fff6b0; }
.virtue, .friend-card, .story-card, .book-card, .quest-card { border: 2px solid rgba(255,255,255,.9); }
.virtue { background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--c), white 88%)); }
.virtue::after { content: "✦"; display: block; margin-top: 5px; color: color-mix(in srgb, var(--c), white 18%); font-size: .8rem; }
.friends { background: radial-gradient(circle at 5% 10%, rgba(255,255,255,.75) 0 3%, transparent 13%), linear-gradient(160deg, #f4edff, #ecf8ff 65%, #fff3f8); }
.friend-card { border-radius: 33px; }
.friend-card:hover { transform: translateY(-8px) rotate(-1.5deg) scale(1.02); }
.magic { background: radial-gradient(circle at 8% 15%, rgba(255, 223, 133, .28) 0 2%, transparent 16%), radial-gradient(circle at 92% 80%, rgba(255, 169, 211, .22) 0 2%, transparent 20%), linear-gradient(145deg, #63417e, #7a4d98 50%, #4f5d95); }
.quest-card { position: relative; overflow: hidden; }
.quest-card::before { content: "✦  ✧  ✦"; position: absolute; top: 11px; right: 13px; color: #f2c363; letter-spacing: .22em; font-size: .8rem; }
.gleam-meter { border-radius: 34px; }
.breath-card { border-radius: 28px; }
.storybook, .comic-library { position: relative; overflow: hidden; }
.storybook::before, .comic-library::before { content: ""; position: absolute; width: 330px; height: 330px; top: -160px; right: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 211, 236, .62), transparent 66%); pointer-events: none; }
.story-card, .book-card { border-radius: 26px; }
.story-card-copy strong, .book-card-copy strong { color: #633f81; }
.story-card-copy small, .book-card-copy small { color: #866493; }
.book-card { background: linear-gradient(170deg, #fff, #fff0f7); }
.book-cover { border-bottom: 5px solid #f2d2e9; }
.story-reader, .comic-reader, .finale-dialog { border: 3px solid rgba(255,255,255,.94); }
.grownups { border-top: 2px dashed #e7b9da; background: linear-gradient(135deg, #fffaf5, #f9efff); }
footer { background: linear-gradient(90deg, #eee1f8, #f8e3ee, #dff1fb); }
@media (max-width: 650px) {
  .hero { min-height: 760px; }
  .hero-content > p { max-width: 31rem; }
  .section { padding-top: 66px; padding-bottom: 66px; }
  .section-heading { margin-bottom: 33px; }
  .virtue { min-height: 190px; border-radius: 43px 43px 22px 22px; }
  .virtue > span { width: 68px; height: 68px; }
  .friend-card, .story-card, .book-card { box-shadow: 0 12px 28px rgba(79, 43, 103, .14); }
  .story-card-copy, .book-card-copy { padding: 17px; }
  .comic-reader h2, .story-reader h2 { font-size: 2.3rem; }
}

.breath-orb .unicorn-ui-icon { width: 92px; height: 92px; margin: auto; filter: drop-shadow(0 4px 9px rgba(255, 233, 138, .52)); }


/* 120-quest Unicorn Adventure */
.quest-game-dashboard { position: relative; z-index: 1; width: min(950px, 100%); margin: 26px auto 0; padding: 24px; border: 1px solid rgba(255,255,255,.25); border-radius: 27px; background: rgba(255,255,255,.1); color: white; }
.quest-game-dashboard h3 { font-size: 1.45rem; }
.quest-game-dashboard > p { margin: 4px 0 17px; color: #efe4f4; font-size: .9rem; }
.quest-mode-row { display: flex; flex-wrap: wrap; gap: 9px; }
.quest-mode { min-height: 45px; border: 2px solid rgba(255,255,255,.3); border-radius: 99px; padding: 0 15px; color: white; background: rgba(34,15,53,.18); font-weight: 800; cursor: pointer; }
.quest-mode.active { color: #553577; background: linear-gradient(135deg, #fff5c7, #ffcce5); border-color: #fff6d1; box-shadow: 0 0 18px rgba(255,229,143,.32); }
.quest-summary { display: grid; grid-template-columns: 1fr auto; gap: 17px; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px dashed rgba(255,255,255,.28); }
.quest-summary strong { display: block; font: 800 1.6rem/1 "Baloo 2", sans-serif; color: #ffe7a5; }
.quest-summary small { color: #eaddea; font-weight: 700; }
.quest-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.quest-badge { padding: 6px 9px; border-radius: 12px; color: #f2e8f5; background: rgba(22,10,35,.27); font-size: .69rem; font-weight: 900; }
.quest-badge.unlocked { color: #6d4285; background: linear-gradient(135deg, #ffe7a3, #ffc3df); }
.quest-card .unicorn-ui-icon { width: 88px; height: 88px; margin: auto; }
.quest-card h3 { min-height: 92px; }
@media (max-width: 650px) {
  .quest-game-dashboard { padding: 20px 16px; border-radius: 23px; }
  .quest-game-dashboard h3 { font-size: 1.3rem; }
  .quest-mode { min-height: 48px; padding: 0 13px; font-size: .88rem; }
  .quest-summary { grid-template-columns: 1fr; }
  .quest-badges { justify-content: flex-start; }
  .quest-card .unicorn-ui-icon { width: 96px; height: 96px; }
}


/* Opaque pastel quest cards — no chroma key is used. */
.quest-card .unicorn-ui-icon {
  border: 2px solid rgba(255,255,255,.76);
  border-radius: 19px;
  background: #fff9f3;
  box-shadow: 0 7px 16px rgba(87, 41, 108, .18);
}
/* Full-page preview art: individual generated images are no longer sprite strips. */
.book-cover { background-position: center; background-size: contain; background-repeat: no-repeat; }
.story-card figure { aspect-ratio: 1 / 1; }
.story-card img { height: 100%; object-fit: contain; background: #f7edf9; }

/* Quest hero: the illustrated mission is the main comic panel, not an icon. */
.magic .quest-wrap { max-width: 1080px; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); align-items: stretch; }
.magic .quest-card { min-height: 440px; padding: 18px; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(210px, .82fr); grid-template-rows: auto 1fr auto; grid-template-areas: "art label" "art mission" "art actions"; gap: 12px 22px; text-align: left; }
.magic .quest-icon { grid-area: art; min-height: 0; aspect-ratio: 5 / 4; position: relative; display: block; overflow: hidden; border: 4px solid #fff; border-radius: 27px; background: linear-gradient(135deg, #ffeefa, #e6f5ff); box-shadow: 0 13px 28px rgba(72, 38, 95, .2); animation: none; }
.magic .quest-icon::after { content: "Jednorožčí komiks • koukej, co zkusit!"; position: absolute; right: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 7px 10px; border: 2px solid rgba(255,255,255,.9); border-radius: 999px; color: #6a467c; background: rgba(255,255,255,.9); box-shadow: 0 3px 10px rgba(72, 38, 95, .12); font-size: .68rem; font-weight: 900; letter-spacing: .025em; }
.magic .quest-card .unicorn-ui-icon { width: 100%; height: 100%; margin: 0; border: 0; border-radius: 22px; background: transparent; object-fit: contain; box-shadow: none; filter: none; }
.magic .quest-label { grid-area: label; align-self: end; margin: 0; }
.magic .quest-card h3 { grid-area: mission; min-height: 0; margin: 0; display: block; align-self: center; font-size: clamp(1.45rem, 2.6vw, 2.05rem); line-height: 1.14; }
.magic .quest-actions { grid-area: actions; align-items: flex-start; margin: 0; }
@media (max-width: 760px) { .magic .quest-wrap { grid-template-columns: 1fr; } .magic .quest-card { min-height: 0; grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; grid-template-areas: "art" "label" "mission" "actions"; padding: 16px; gap: 12px; text-align: center; } .magic .quest-icon { width: 100%; max-width: 430px; margin: 0 auto; border-radius: 25px; } .magic .quest-label { align-self: auto; } .magic .quest-actions { align-items: center; } }

/* Short, spoken-style guidance makes each mission clear for early readers. */
.quest-help { grid-area: mission; align-self: end; margin: 8px 0 0; padding: 10px 12px; border-radius: 15px; color: #704d81; background: #fff4fb; font-size: .9rem; font-weight: 800; line-height: 1.35; }
.magic .quest-card h3 { align-self: start; }
@media (max-width: 760px) { .magic .quest-card { grid-template-rows: auto auto auto auto auto; grid-template-areas: "art" "label" "mission" "help" "actions"; } .quest-help { grid-area: help; text-align: left; } }
/* Unicorn nursery progression */
.unicorn-ranch { position: relative; z-index: 1; width: min(1080px, 100%); margin: 28px auto 0; padding: 28px; border: 2px solid rgba(255,255,255,.34); border-radius: 34px; color: #fff; background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(89,47,122,.25)); box-shadow: 0 20px 45px rgba(33,13,53,.22); }
.nursery-heading { max-width: 690px; margin-bottom: 20px; }.nursery-heading .kicker { color: #ffe19d; }.nursery-heading h2 { margin: 5px 0; font-size: clamp(2rem, 4vw, 3.2rem); }.nursery-heading p { margin: 0; color: #eee1f4; font-weight: 700; }
.nursery-hero { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(0, 1.2fr); gap: 28px; align-items: center; padding: 19px; border-radius: 27px; background: rgba(255,255,255,.1); }
.nursery-stage { position: relative; margin: 0; overflow: hidden; border: 4px solid rgba(255,255,255,.94); border-radius: 25px; background: #fff5fb; box-shadow: 0 13px 25px rgba(38,11,58,.25); }.nursery-stage img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: filter .5s, transform .5s; }.nursery-stage figcaption { position: absolute; right: 10px; bottom: 10px; padding: 6px 10px; border-radius: 99px; color: #6a467c; background: rgba(255,255,255,.9); font-size: .72rem; font-weight: 900; }
.nursery-kicker { margin: 0; color: #ffe19d; font: 900 1rem/1.1 "Baloo 2",sans-serif; }.nursery-copy h3 { margin: 5px 0 8px; font-size: clamp(1.75rem,3vw,2.5rem); }.nursery-copy > p:not(.nursery-kicker):not(.nursery-count):not(.nursery-daily) { margin: 0; color: #f1e6f6; font-weight: 700; }
.nursery-progress { height: 19px; margin: 18px 0 7px; overflow: hidden; border-radius: 99px; background: rgba(35,15,54,.42); box-shadow: inset 0 2px 4px rgba(0,0,0,.2); }.nursery-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#ff9cc9,#ffd875,#8fd7e9,#c491e8); transition: width .5s ease; }
.nursery-count { margin: 0; color: #ffe7a9; font-weight: 900; }.nursery-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 17px; }.nursery-actions .text-button, .nursery-meta .text-button { color: #fff1c9; }.nursery-daily { margin: 13px 0 0; color: #eee1f4; font-size: .86rem; font-weight: 700; }
.nursery-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 14px 2px 0; border-top: 1px dashed rgba(255,255,255,.32); }.nursery-meta strong { color: #ffe19d; font: 900 1.15rem "Baloo 2",sans-serif; }.nursery-meta span { color: #eee1f4; font-weight: 700; }.nursery-meta div { display: flex; gap: 12px; }
.nursery-collection { margin-top: 18px; padding: 14px 16px; border-radius: 19px; color: #fff; background: rgba(30,12,47,.21); }.nursery-collection summary { cursor: pointer; color: #ffe7a9; font-weight: 900; }.nursery-grid { display: grid; grid-template-columns: repeat(10, minmax(0,1fr)); gap: 7px; margin-top: 14px; }
.nursery-variant { min-width: 0; aspect-ratio: .8; overflow: hidden; border: 2px solid rgba(255,255,255,.18); border-radius: 11px; padding: 0; color: #fff; background: rgba(19,7,33,.25); cursor: pointer; }.nursery-variant img { display: block; width: 100%; height: calc(100% - 19px); object-fit: cover; filter: grayscale(1) brightness(.6); }.nursery-variant span { display: none; }.nursery-variant small { display: block; height: 19px; font-size: .55rem; font-weight: 900; }.nursery-variant.known img { filter: hue-rotate(var(--variant-hue)) saturate(1.1); }.nursery-variant.collected { border-color: #ffe49e; box-shadow: 0 0 10px rgba(255,219,125,.6); }.nursery-variant.active { outline: 3px solid #ffb5dd; outline-offset: 1px; }
@media (max-width: 720px) { .unicorn-ranch { padding: 20px 16px; border-radius: 27px; }.nursery-hero { grid-template-columns: 1fr; padding: 13px; gap: 16px; }.nursery-stage { width: min(82vw,310px); margin: auto; }.nursery-copy { text-align: center; }.nursery-actions { justify-content: center; }.nursery-meta { justify-content: center; text-align: center; }.nursery-grid { grid-template-columns: repeat(8, minmax(0,1fr)); gap: 6px; } }

/* Keep the spoken mission help as its own row beside the comic scene on larger screens. */
@media (min-width: 761px) { .magic .quest-card { grid-template-rows: auto 1fr auto auto; grid-template-areas: "art label" "art mission" "art help" "art actions"; } .quest-help { grid-area: help; } }

/* Adult participation, local recovery, and privacy controls. */
.participation-settings { display: grid; gap: 9px; }
.participation-control { display: grid !important; gap: 7px; width: min(100%, 620px); }
.participation-control span { color: #603b75; font-weight: 900; }
.participation-control input[type="range"] { width: 100%; accent-color: #9457b5; cursor: pointer; }
.participation-scale { display: flex; justify-content: space-between; gap: 12px; color: #765786; font-size: .72rem; font-weight: 800; }
.progress-transfer-actions, .local-data-tools > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.local-data-tools { margin-top: 15px; }
.local-data-tools small { display: block; max-width: 760px; line-height: 1.45; }
.local-data-tools .game-button { min-height: 42px; font-size: .8rem; }
