:root {
  color-scheme: dark;
  font: 16px/1.55 system-ui, sans-serif;
  --ink: #15172c;
  --panel: #25243e;
  --cream: #fff4e3;
  --muted: #d7cde3;
  --gold: #f7d493;
  --edge: clamp(20px, 6vw, 86px);
  --line: #f9e2be39;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: var(--cream);
  background: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 280px; background: radial-gradient(ellipse at 12% 46%, #24233d, var(--ink) 55%); }
img { display: block; width: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .42; cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #fbe6ba; outline-offset: 4px; }
.shell { width: min(100% - var(--edge) * 2, 1200px); margin-inline: auto; }
.skip { position: fixed; top: 10px; left: 10px; padding: 10px 16px; background: #302848; translate: 0 -140%; z-index: 12; }
.skip:focus { translate: 0; }

.top { position: absolute; top: 0; inset-inline: 0; z-index: 4; }
.masthead { display: flex; min-height: 77px; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid #ffffff27; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff2d8; font: 600 clamp(1.02rem, 1.66vw, 1.3rem)/1.1 var(--serif); white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; flex: none; color: var(--gold); border: 1px solid #f7d49377; border-radius: 34%; background: #1e203bc2; font: 16px/1 Georgia, serif; }
nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 40px); color: #fff1df; font-size: .89rem; font-weight: 600; }
nav a:hover, .footer a:hover { color: var(--gold); }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(610px, 88svh, 775px);
  background: var(--ink);
}
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.hero::before { background: url('/art/world/storybook.webp') center 53% / cover no-repeat, url('/art/world/winter.webp') center 53% / cover no-repeat; }
.hero::after { background: linear-gradient(90deg, #101425ed 0%, #15182ac9 26%, #16192e38 58%, #19213c00 82%), linear-gradient(0deg, #16172b 1%, #17172acc 8%, #1a1d3200 32%, #16192900 78%, #13152654); }
.hero-inner { padding-block: 137px 112px; }
.eyebrow { color: var(--gold); margin: 0 0 16px; font-size: .74rem; line-height: 1.3; letter-spacing: .19em; font-weight: 720; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: var(--serif); line-height: 1.07; font-weight: 500; letter-spacing: -.038em; text-wrap: balance; }
.hero h1 { font-size: clamp(4rem, 8.8vw, 8.1rem); line-height: .92; text-shadow: 0 5px 32px #11132585; }
.hero h1 em { font-weight: inherit; color: #ffdda6; }
.hero-description { max-width: 415px; margin: 28px 0 26px; color: #f5e9e8; font-size: clamp(1rem, 1.58vw, 1.16rem); text-wrap: pretty; }
.links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 19px; border-radius: 100px; border: 1px solid transparent; font: 700 .88rem/1.3 system-ui, sans-serif; text-align: center; transition: background .18s, border-color .18s, translate .18s; }
.button:hover:not(:disabled) { translate: 0 -2px; }
.primary { color: #2d2136; border-color: #ffebb2; background: linear-gradient(145deg, #fff0cc, #eab778); box-shadow: 0 5px 21px #14102155; }
.primary:hover:not(:disabled) { background: #ffebbd; }
.secondary { color: #fff0d9; border-color: #f9dcc86b; background: #1c1d34ae; }
.secondary:hover:not(:disabled) { background: #413957; border-color: #f9dcc8ac; }

.section { padding-block: 35px 56px; scroll-margin-top: 20px; }
.section-heading { margin-bottom: 26px; }
.section h2 { font-size: clamp(2.45rem, 4.7vw, 4.15rem); }
.section-heading p { margin: 10px 0 0; color: var(--muted); }
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(17px, 3vw, 30px); }
.story-card { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); background: linear-gradient(135deg, #302744, #22243b 80%); border-radius: 19px; overflow: hidden; box-shadow: 0 14px 36px #100e2455; }
.story-card img { aspect-ratio: 1.92; height: auto; display: block; object-position: 50% 44%; }
.unicorn-card img { object-position: 50% 47%; }
.story-card img { transition: filter .22s ease; }
.story-card:hover img { filter: brightness(1.12); }
.story-card:hover { border-color: #f7d493a0; }
.card-content { display: flex; flex-direction: column; align-items: flex-start; padding: 21px clamp(17px, 3vw, 29px) 24px; }
.card-content h3 { font-size: clamp(1.62rem, 3.15vw, 2.6rem); }
.card-content p { margin: 8px 0 14px; color: var(--muted); text-wrap: pretty; }
.text-link { color: var(--gold); font-size: .88rem; font-weight: 720; margin-top: auto; padding-bottom: 2px; border-bottom: 1px solid #f7d49370; }

.word-feature { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); overflow: hidden; border-radius: 24px; border: 1px solid var(--line); background: radial-gradient(ellipse at 26% 45%, #5b3c65, transparent 55%), linear-gradient(130deg, #302644, #24263d 70%); }
.word-feature-copy { padding: clamp(26px, 6vw, 65px) clamp(23px, 6vw, 72px) clamp(30px, 6vw, 63px) 0; }
.word-feature-copy p:not(.eyebrow) { max-width: 390px; color: var(--muted); margin: 14px 0 21px; text-wrap: pretty; }
.word-art { min-height: 265px; position: relative; container-type: inline-size; display: grid; place-items: center; perspective: 500px; }
.tile { position: absolute; display: grid; place-items: center; width: clamp(58px, 21cqw, 105px); aspect-ratio: 1; background: linear-gradient(145deg, #f9e8c3, #bb8a9a); border: 1px solid #ffedd2; border-radius: 17%; color: #42284d; font: 530 clamp(2.2rem, 11cqw, 4.1rem)/1 var(--serif); box-shadow: 0 12px 23px #190f2896, inset 0 -4px 0 #6a395a45; }
.tile-a { transform: translate(-78%, -1%) rotate(-13deg); }
.tile-b { z-index: 1; transform: translate(1%, -38%) rotate(9deg); color: #55416c; background: linear-gradient(140deg, #fff0d4, #c8b3eb); }
.tile-c { transform: translate(83%, 32%) rotate(-9deg); background: linear-gradient(145deg, #fff0c9, #ddb07f); }
.tile-star { position: absolute; font-size: clamp(1.4rem, 6cqw, 2.8rem); color: #ffe49d; text-shadow: 0 0 24px #f2b65a; transform: translate(238%, -125%); }
.footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 21px; padding-block: 24px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .87rem; align-items: center; }

.inner-page { min-height: 100svh; background: linear-gradient(#17172bbd, var(--ink) 460px), url('/art/world/winter.webp') center top / auto 560px no-repeat, var(--ink); }
.inner-top { position: relative; }
.interior { padding-block: clamp(29px, 6vw, 66px) 29px; }
.interior > h1 { font-size: clamp(2.8rem, 6.8vw, 5.25rem); margin-bottom: clamp(20px, 4vw, 33px); }
.interior > .eyebrow a:hover { text-decoration: underline; }
.reader { display: grid; grid-template-columns: minmax(0, 1.17fr) minmax(0, .83fr); gap: 0; overflow: hidden; border-radius: 23px; border: 1px solid var(--line); background: #25243ede; box-shadow: 0 18px 60px #14102588; max-width: 1080px; }
.reader-picture { display: grid; place-items: center; width: 100%; aspect-ratio: 1.15; overflow: hidden; background: #171a2d; }
.reader-picture img { width: 100%; height: 100%; object-fit: contain; }
.scene-transition { font: 500 clamp(4rem, 14vw, 10rem)/1 var(--serif); color: var(--gold); text-shadow: 0 0 70px #ffcc8199; }
.reader-picture:has(.scene-transition:not([hidden])) { background: radial-gradient(ellipse, #6a4269, #24243d 75%); }
.reader-copy { padding: clamp(22px, 4.4vw, 48px); display: flex; flex-direction: column; justify-content: center; align-items: start; }
.counter { color: var(--gold); font-size: .82rem; font-weight: 730; font-variant-numeric: tabular-nums; }
.scene-copy { margin: 12px 0 25px; }
.scene-copy h2 { font-size: clamp(2rem, 4vw, 3.45rem); margin: 5px 0 11px; }
.scene-copy p { font-size: clamp(1.15rem, 2.45vw, 1.63rem); color: #fff1e5; margin: 0; text-wrap: pretty; }
.reader-controls, .round-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.page-buttons { display: inline-flex; gap: 8px; flex-wrap: wrap; }

.quiz, .star-game { max-width: 740px; border-radius: 23px; border: 1px solid var(--line); overflow: hidden; background: radial-gradient(ellipse at 50% 2%, #3e3053, #23223a 78%); padding: clamp(20px, 5vw, 44px); box-shadow: 0 17px 59px #15112970; }
.quiz-settings h2, .quiz-complete h2 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
.quiz-settings p, .quiz-complete p { color: var(--muted); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0 20px; }
.field-grid label { display: grid; gap: 6px; color: #fae7cf; font-size: .86rem; font-weight: 650; }
select { width: 100%; min-height: 45px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: #282740; color: var(--cream); }
.quiz-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.score-words { color: #ffe09c; font-weight: 730; font-size: .86rem; }
progress { width: 100%; height: 10px; margin-top: 11px; appearance: none; accent-color: #f7d493; border: none; border-radius: 100px; overflow: hidden; background: #1a1c31; }
progress::-webkit-progress-bar { background: #1a1c31; border-radius: 100px; }
progress::-webkit-progress-value { background: linear-gradient(90deg,#b38fde,#f7d493); border-radius: 100px; }
progress::-moz-progress-bar { background: #f7d493; border-radius: 100px; }
.word-prompt { display: grid; justify-items: center; padding-block: 17px; text-align: center; }
.word-symbol { display: grid; place-items: center; width: 92px; height: 92px; font-size: 3.05rem; text-shadow: 0 3px 15px #1d123e; background: radial-gradient(circle at 50% 40%, #6d4e7c, #362b51); border: 1px solid #fbdcab65; border-radius: 24px; margin-bottom: 12px; }
.word-prompt h2 { font-size: clamp(2rem, 7vw, 3.4rem); }
.word-prompt p { color: var(--muted); margin: 8px 0 2px; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.choice { min-height: 55px; padding: 7px; border: 1px solid #ffedcf57; border-radius: 12px; color: #fff1e5; background: #3d3554; font-weight: 680; overflow-wrap: anywhere; }
.choice:hover:not([aria-disabled='true']) { background: #5a466a; border-color: #ffedcfa0; }
.choice.incorrect { border-color: #f7bac1bb; color: #f4c7d2; background: #432f48; }
.choice.correct { border-color: #ffe7ab; background: #eacc90; color: #302642; }
.feedback { min-height: 1.7em; color: #fff0d2; margin: 14px 0 12px; }
.round-actions { justify-content: space-between; min-height: 46px; }
.quiz-complete { text-align: center; padding: clamp(9px, 3vw, 30px) 0; }
.quiz-complete .links { justify-content: center; }
.constellation { color: #ffda84; font-size: 2.8rem; text-shadow: 0 0 25px #fdbe66; margin-bottom: 5px; }
.star-field { position: relative; min-height: clamp(245px, 47vh, 430px); margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: linear-gradient(#15182c35,#18182cb5),url('/art/world/winter.webp') center / cover; }
#catch-star { position: absolute; width: 55px; height: 55px; border: 1px solid #f9d990; border-radius: 50%; background: #3b2b5baa; color: #ffe197; font: 33px/1 Georgia, serif; text-shadow: 0 0 13px #ffd284; box-shadow: 0 0 16px #ffcf6780; transform: translate(-50%,-50%); }

@media (max-width: 650px) {
  .masthead { min-height: 0; align-items: flex-start; flex-direction: column; gap: 8px; padding-block: 11px 10px; }
  .brand-mark { width: 26px; height: 26px; }
  nav { gap: 18px; font-size: .84rem; }
  .hero { min-height: 0; }
  .hero-inner { padding-block: 291px 40px; }
  .hero::before { background-position: 70% 0; background-size: auto 450px; }
  .hero::after { background: linear-gradient(0deg, var(--ink) 8%, #17192bef 25%, #17192bc7 43%, #17192b00 62%, #17192b29 79%, #17192bab 100%); }
  .hero h1 { font-size: clamp(3.08rem, 11vw, 4.95rem); }
  .hero-description { margin: 18px 0 20px; }
  .story-grid, .word-feature, .reader { grid-template-columns: minmax(0, 1fr); }
  .story-card img { aspect-ratio: 1.69; }
  .section { padding-block: 22px 39px; }
  .word-art { min-height: 187px; }
  .word-feature-copy { padding: 0 22px 25px; }
  .reader-picture { aspect-ratio: 1.11; }
  .footer { padding-block: 18px 25px; }
}
@media (max-width: 373px) {
  .links { align-items: stretch; }
  .field-grid, .choices { grid-template-columns: 1fr; }
  .choice { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
.color-swatch::before { content: ""; width: 46px; height: 46px; border-radius: 50%; background: var(--word-color); box-shadow: 0 0 0 1px #fff4e5b3, 0 4px 15px #1b142a7c; }
.feedback.success { color: #ffe09c; }

.site-language { flex: none; }
.site-language-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-language select {
  width: auto;
  min-height: 38px;
  padding: 5px 31px 5px 12px;
  appearance: none;
  border-radius: 100px;
  font-size: .875rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23f7d493' stroke-width='1.5'/%3E%3C/svg%3E") right 9px center no-repeat #282740;
}
@media (max-width: 750px) {
  .masthead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; align-items: center; padding-block: 9px; }
  .masthead > nav { grid-column: 1 / -1; grid-row: 2; gap: clamp(10px, 4vw, 22px); flex-wrap: wrap; }
  .masthead .brand { white-space: normal; }
  .site-language { grid-column: 2; grid-row: 1; }
}
