:root {
  /* Sticker-book world: cream paper, navy ink outlines, crayon accents taken from the book covers.
     Layout: chunky outlined shapes with hard offset shadows; top nav on laptops, thumb bar on phones and tablets. */
  --paper: #FFF8EA;
  --paper-2: #FFEFD0;
  --ink: #27214D;
  --ink-soft: #5A547E;
  --sun: #FFC83D;
  --coral: #FF6B5E;
  --mint: #7EDCC0;
  --sky: #8FD3FF;
  --white: #FFFFFF;
  --display: "Fredoka", "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Nunito", "Segoe UI", Arial, sans-serif;
  --line: 3px solid var(--ink);
  --pop: 5px 5px 0 var(--ink);
  --r: 22px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); font: 600 17px/1.5 var(--body);
  background-image: radial-gradient(var(--paper-2) 2px, transparent 2.500px); background-size: 26px 26px; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.200rem); } h2 { font-size: clamp(1.500rem, 3.200vw, 2rem); } h3 { font-size: 1.250rem; }
p { margin: 0; } a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 4px solid var(--coral); outline-offset: 3px; border-radius: 8px; }

/* ----- header and navigation ----- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px clamp(16px, 4vw, 40px); background: var(--sun); border-bottom: var(--line); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.350rem; line-height: 1; }
.logo small { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin-top: 3px; }
.logo-spark, .star-ico { width: 34px; height: 34px; background: var(--coral); display: inline-block; flex: none;
  clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
.star-ico { width: 22px; height: 22px; background: var(--sun); }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 99px; text-decoration: none; font-family: var(--display); font-weight: 600; border: 3px solid transparent; }
.nav svg { width: 20px; height: 20px; fill: var(--ink); }
.nav a:hover { background: rgba(255,255,255,.55); }
.nav a.on { background: var(--white); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.stars-pill { display: flex; align-items: center; gap: 6px; padding: 6px 14px 6px 10px; background: var(--ink); color: var(--white); border-radius: 99px; text-decoration: none; font-family: var(--display); font-size: 1.100rem; }
.lang-btn { min-width: 44px; height: 44px; flex: none; padding: 0 8px; background: var(--white); border: var(--line); border-radius: 99px; box-shadow: 3px 3px 0 var(--ink); font-family: var(--display); font-weight: 700; font-size: .95rem; }
.sound-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; background: var(--white); border: var(--line); border-radius: 50%; box-shadow: 3px 3px 0 var(--ink); }
.sound-btn svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 2.200; stroke-linecap: round; stroke-linejoin: round; } .sound-btn circle { fill: var(--ink); }
.sound-btn .slash { display: none; stroke: var(--coral); stroke-width: 3; } .sound-btn.off { background: var(--paper-2); box-shadow: none; } .sound-btn.off .slash { display: block; }
.quote { position: fixed; left: 16px; bottom: 16px; z-index: 25; display: flex; align-items: center; gap: 12px; max-width: min(340px, calc(100vw - 32px)); padding: 10px 18px 10px 10px; text-align: left; background: var(--c, var(--white)); border: var(--line); border-radius: 99px 99px 99px 22px; box-shadow: var(--pop); animation: quote-in .4s cubic-bezier(.3, 1.5, .5, 1); }
.quote[hidden] { display: none; } .quote img { width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover; border: var(--line); background: var(--white); }
.quote p { font-family: var(--display); font-weight: 500; font-size: 1rem; line-height: 1.25; } .quote b { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
body.playing .quote { bottom: auto; left: auto; top: 76px; right: 16px; border-radius: 99px 22px 99px 99px; }
@keyframes quote-in { from { transform: translateY(20px) scale(.8); opacity: 0; } }
main { max-width: 1160px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 60px; display: flex; flex-direction: column; gap: 44px; outline: none; }
.foot { text-align: center; padding: 26px 16px 34px; font-size: .9rem; color: var(--ink-soft); border-top: 3px dashed var(--ink); display: grid; gap: 6px; background: var(--paper-2); }

/* ----- shared bits ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; min-height: 48px; background: var(--coral); color: var(--white); border: var(--line); border-radius: 99px;
  box-shadow: 4px 4px 0 var(--ink); font-family: var(--display); font-weight: 600; font-size: 1.050rem; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); } .btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.alt { background: var(--white); color: var(--ink); } .btn.big { font-size: 1.250rem; padding: 15px 30px; } .btn.small { padding: 8px 16px; min-height: 42px; font-size: .95rem; box-shadow: 3px 3px 0 var(--ink); }
.btn:disabled { opacity: .55; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; } .row.center { justify-content: center; }
.kicker { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; color: var(--coral); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.more, .back { font-family: var(--display); font-weight: 600; text-underline-offset: 4px; }
.back { align-self: flex-start; margin-bottom: -24px; } .back::before { content: "← "; }
.page-head { display: grid; gap: 8px; } .page-head p { max-width: 60ch; color: var(--ink-soft); font-size: 1.100rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 16px; min-height: 42px; background: var(--white); border: var(--line); border-radius: 99px; font-family: var(--display); font-weight: 600; }
.chip.on { background: var(--ink); color: var(--white); }
.age { display: inline-block; padding: 3px 12px; background: var(--ink); color: var(--white); border-radius: 99px; font-family: var(--display); font-size: .82rem; font-weight: 600; }
.note { color: var(--ink-soft); font-size: .95rem; max-width: 65ch; }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.facts li { padding-left: 30px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; background: var(--sun); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }

/* ----- home ----- */
.hero { display: grid; grid-template-columns: 1.050fr 1fr; gap: 28px; align-items: center; }
.hero-text { display: grid; gap: 18px; } .lead { font-size: 1.200rem; max-width: 46ch; color: var(--ink-soft); }
.squiggle { background: linear-gradient(transparent 62%, var(--sun) 62% 92%, transparent 92%); padding: 0 4px; }
.hero-friends { position: relative; aspect-ratio: 1.150; }
.bob { position: absolute; width: 30%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: var(--line); box-shadow: var(--pop); background: var(--c); animation: bob 4s ease-in-out infinite; }
.bob img { width: 100%; height: 100%; object-fit: cover; }
.b0 { left: 34%; top: 28%; width: 36%; z-index: 2; } .b1 { left: 2%; top: 6%; animation-delay: -.6s; } .b2 { left: 68%; top: 2%; animation-delay: -1.200s; width: 28%; }
.b3 { left: 72%; top: 44%; animation-delay: -1.800s; } .b4 { left: 0; top: 50%; animation-delay: -2.400s; width: 29%; } .b5 { left: 26%; top: 72%; animation-delay: -3s; width: 26%; } .b6 { left: 54%; top: 70%; animation-delay: -3.400s; width: 24%; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.tock-says { display: flex; align-items: center; gap: 16px; padding: 14px 22px 14px 14px; background: var(--c); border: var(--line); border-radius: 99px; box-shadow: var(--pop); }
.tock-says img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: var(--line); flex: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.tile { position: relative; display: grid; gap: 6px; align-content: end; min-height: 230px; padding: 20px; padding-top: 96px; background: var(--c); border: var(--line); border-radius: var(--r); box-shadow: var(--pop); text-decoration: none; overflow: hidden; transition: transform .15s; }
.tile:hover { transform: translateY(-4px) rotate(-.6deg); }
.tile-pic { position: absolute; right: -14px; top: -14px; width: 120px; height: 120px; object-fit: cover; border-radius: 50%; border: var(--line); background: var(--white); }
.tile-learn { justify-self: start; padding: 2px 11px; background: var(--white); border: 2px solid var(--ink); border-radius: 99px; font-size: .78rem; font-family: var(--display); }
.tile p { font-size: .98rem; } .tile-go { font-family: var(--display); font-weight: 700; margin-top: 4px; } .tile-go::after { content: " →"; }
.split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; } .split.two { grid-template-columns: repeat(2, 1fr); }
.panel { display: grid; grid-template-columns: 1fr 96px; grid-template-rows: auto 1fr; column-gap: 12px; row-gap: 4px; padding: 20px; background: var(--c); border: var(--line); border-radius: var(--r); box-shadow: var(--pop); text-decoration: none; }
.panel img { grid-column: 2; grid-row: 1 / 3; width: 96px; height: 96px; object-fit: cover; border-radius: 18px; border: var(--line); background: var(--white); transform: rotate(4deg); }
.panel p { font-size: .98rem; } .panel.tall { grid-template-columns: 1fr 150px; padding: 26px; } .panel.tall img { width: 150px; height: 150px; }
.badges { display: flex; flex-wrap: wrap; gap: 20px 18px; justify-content: center; }
.badge { display: grid; justify-items: center; gap: 8px; width: 108px; text-decoration: none; text-align: center; font-family: var(--display); font-weight: 600; line-height: 1.15; }
.badge-pic { width: 100px; height: 100px; border-radius: 50%; overflow: hidden; border: var(--line); box-shadow: 4px 4px 0 var(--ink); background: var(--c); transition: transform .15s; }
.badge-pic img { width: 100%; height: 100%; object-fit: cover; } .badge.wide .badge-pic img { object-position: 30% 50%; }
.badge:hover .badge-pic { transform: scale(1.080) rotate(-5deg); }
.badge.lg { width: 168px; font-size: 1.150rem; } .badge.lg .badge-pic { width: 156px; height: 156px; }
.feature { display: grid; grid-template-columns: 240px 1fr; gap: 34px; align-items: center; padding: 30px 34px; background: var(--c); border: var(--line); border-radius: 30px; box-shadow: var(--pop); }
.feature > div { display: grid; gap: 12px; } .feature p { max-width: 55ch; }
.strip { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 18px 22px; background: var(--white); border: var(--line); border-radius: var(--r); }
.strip > div:first-child { flex: 1 1 220px; } .strip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.mini { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 2.500px solid var(--ink); background: var(--c); filter: grayscale(1); opacity: .3; }
.mini.got { filter: none; opacity: 1; } .mini img { width: 100%; height: 100%; object-fit: cover; }

/* ----- books ----- */
.cover { border: var(--line); border-radius: 8px 14px 14px 8px; box-shadow: var(--pop); background: var(--white); width: 100%; }
.cover.tilt { transform: rotate(-3deg); }
.cover.drawn { aspect-ratio: .78; display: grid; align-content: center; gap: 10px; padding: 12%; text-align: center; background: var(--c);
  background-image: radial-gradient(rgba(255,255,255,.7) 3px, transparent 3.500px); background-size: 22px 22px; font-family: var(--display); container-type: inline-size; }
.drawn-t { font-weight: 700; font-size: 15cqw; line-height: 1; color: var(--coral); -webkit-text-stroke: 1px var(--ink); } .drawn-s { font-size: 6cqw; line-height: 1.2; } .drawn-a { font-size: 5cqw; letter-spacing: .14em; text-transform: uppercase; margin-top: 8cqw; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 34px 24px; align-items: stretch; }
.bookcard { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bookcard-cover { position: relative; display: block; aspect-ratio: .86; border-bottom: 10px solid var(--ink); border-radius: 0 0 6px 6px; background: linear-gradient(transparent 45%, var(--c) 45%); transition: transform .15s; text-decoration: none; }
.bookcard-cover:hover { transform: translateY(-5px); }
.bookcard-cover .cover { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: auto; height: auto; max-width: calc(100% - 36px); max-height: calc(100% - 14px); border-radius: 6px 10px 0 0; box-shadow: none; border-bottom: 0; }
.bookcard-cover .cover.drawn { height: calc(100% - 14px); }
.bookcard-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; } .bookcard-body h3 a { text-decoration: none; } .bookcard-body p { font-size: .92rem; color: var(--ink-soft); }
.bookcard-body .row { margin-top: auto; padding-top: 8px; flex-wrap: nowrap; gap: 8px; }
.wish { width: 44px; height: 44px; border-radius: 50%; border: var(--line); background: var(--white); display: grid; place-items: center; padding: 0; }
.wish svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.500; } .wish.on { background: var(--coral); } .wish.on svg { fill: var(--white); stroke: var(--white); }
.soon { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border: 3px dashed var(--ink); border-radius: 99px; font-family: var(--display); font-weight: 600; background: var(--white); }
.wishbtn.on { background: var(--mint); }
.bookpage { display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: 44px; align-items: start; padding: 34px; background: var(--c); border: var(--line); border-radius: 30px; box-shadow: var(--pop); }
.bookpage-text { display: grid; gap: 14px; justify-items: start; } .bookpage-text p { max-width: 60ch; } .sub { font-family: var(--display); font-size: 1.200rem; } .specs { font-size: .92rem; color: var(--ink-soft); }
.hosted { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 6px 16px 6px 6px; background: var(--white); border: var(--line); border-radius: 99px; }
.hosted img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.inside { display: flex; gap: 20px; overflow-x: auto; padding: 6px 6px 16px; }
.inside img { height: min(60vw, 430px); width: auto; max-width: none; border: var(--line); border-radius: 10px; box-shadow: 4px 4px 0 var(--ink); background: var(--white); }
.wishlist { display: grid; gap: 18px; } .wishrow { display: grid; grid-template-columns: 110px 1fr; gap: 20px; align-items: center; padding: 16px; background: var(--c); border: var(--line); border-radius: var(--r); }
.wishrow > div { display: grid; gap: 6px; } .wishrow .cover { box-shadow: 3px 3px 0 var(--ink); }
.empty { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 30px; } .empty img { width: 150px; height: 150px; object-fit: cover; border-radius: 50%; border: var(--line); }

/* ----- friends ----- */
.profile { display: grid; grid-template-columns: minmax(200px, 360px) 1fr; gap: 40px; align-items: center; padding: 34px; background: var(--c); border: var(--line); border-radius: 30px; box-shadow: var(--pop); }
.profile-pic { border-radius: 50%; overflow: hidden; border: var(--line); box-shadow: var(--pop); aspect-ratio: 1; background: var(--white); } .profile-pic img { width: 100%; height: 100%; object-fit: cover; }
.profile-pic.wide { border-radius: 26px; aspect-ratio: auto; } .profile-pic.wide img { height: auto; }
.profile-text { display: grid; gap: 14px; justify-items: start; }
.speech { position: relative; padding: 14px 20px; background: var(--white); border: var(--line); border-radius: 22px; font-family: var(--display); font-size: 1.250rem; max-width: 34ch; }
.speech::after { content: ""; position: absolute; left: -15px; top: 24px; border: 9px solid transparent; border-right-color: var(--ink); }
.h-small { font-size: 1.100rem; }

/* ----- stickers, parents ----- */
.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; }
.sticker { display: grid; justify-items: center; gap: 6px; padding: 18px 10px; background: var(--white); border: 3px dashed var(--ink); border-radius: var(--r); text-align: center; font-family: var(--display); }
.sticker-pic { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; border: var(--line); background: var(--c); filter: grayscale(1) brightness(1.6); opacity: .35; } .sticker-pic img { width: 100%; height: 100%; object-fit: cover; }
.sticker.got { border-style: solid; background: var(--c); box-shadow: 4px 4px 0 var(--ink); transform: rotate(-2deg); } .sticker.got:nth-child(even) { transform: rotate(2deg); } .sticker.got .sticker-pic { filter: none; opacity: 1; }
.sticker small { color: var(--ink-soft); }
.prose { display: grid; gap: 16px; max-width: 800px; } .prose h2 { margin-top: 14px; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.learn-grid div { display: grid; padding: 12px 16px; background: var(--white); border: var(--line); border-radius: 16px; } .learn-grid span { font-size: .9rem; color: var(--ink-soft); }
.agetable { overflow-x: auto; border: var(--line); border-radius: 16px; background: var(--white); } table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 9px 14px; border-bottom: 2px solid var(--paper-2); white-space: nowrap; } th { font-family: var(--display); background: var(--paper-2); }

/* ----- create ----- */
.machines { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; }
.machine { display: grid; gap: 12px; align-content: start; padding: 22px; background: var(--c); border: var(--line); border-radius: var(--r); box-shadow: var(--pop); }
.machine img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: var(--line); }
.out { min-height: 84px; padding: 12px 16px; background: var(--white); border: var(--line); border-radius: 16px; font-family: var(--display); font-weight: 500; }
.fields { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: center; font-size: .95rem; }
input, select { font: inherit; color: var(--ink); padding: 8px 12px; border: var(--line); border-radius: 12px; background: var(--white); min-height: 44px; } #elfName { width: 64px; text-align: center; text-transform: uppercase; }
.tools { display: grid; gap: 12px; } .sws { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 44px; height: 44px; border-radius: 50%; border: var(--line); padding: 0; } .sw.on { box-shadow: 0 0 0 4px var(--white), 0 0 0 7px var(--ink); transform: scale(.9); }
.print-msg { font-family: var(--display); min-height: 1.4em; }
#printSheet { display: none; }
@media print { body > *:not(#printSheet) { display: none !important; } body { background: #fff !important; padding: 0 !important; } #printSheet { display: block; } #printSheet img { width: 100%; max-height: 96vh; object-fit: contain; } }
.pad { width: 100%; max-width: 900px; height: auto; background: var(--white); border: var(--line); border-radius: 18px; touch-action: none; cursor: crosshair; display: block; margin: 0 auto; }
.pad.colour { max-width: 620px; cursor: pointer; }
.thumb { display: grid; justify-items: center; gap: 4px; padding: 6px; width: 96px; background: var(--white); border: var(--line); border-radius: 14px; font-size: .78rem; font-family: var(--display); line-height: 1.1; }
.thumb img { height: 60px; width: auto; } .thumb.on { background: var(--sun); box-shadow: 3px 3px 0 var(--ink); }

/* ----- games ----- */
.game { display: grid; gap: 16px; padding: clamp(14px, 3vw, 28px); background: var(--c); border: var(--line); border-radius: 30px; box-shadow: var(--pop); }
.game-head { display: flex; gap: 16px; align-items: center; } .game-head img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: var(--line); flex: none; background: var(--white); }
.game { min-width: 0; } .game-head > div { min-width: 0; } .game-head h1 { font-size: clamp(1.500rem, 4vw, 2.200rem); overflow-wrap: anywhere; hyphens: auto; } .game-bar > * { min-width: 0; } .game-head p { font-size: .98rem; max-width: 62ch; }
.game-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.game-status { font-family: var(--display); flex: 1 1 160px; text-align: center; min-height: 1.500em; }
.stage { position: relative; display: grid; justify-items: center; padding: clamp(10px, 2.500vw, 22px); background: var(--white); border: var(--line); border-radius: 22px; min-height: 300px; }
.maze { touch-action: none; border-radius: 6px; cursor: grab; max-width: 100%; }
.win { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 248, 234, .88); border-radius: 19px; z-index: 5; padding: 12px; }
.win-card { position: relative; display: grid; justify-items: center; gap: 8px; padding: 24px 28px; background: var(--white); border: var(--line); border-radius: 26px; box-shadow: var(--pop); text-align: center; animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); max-width: 100%; }
.win-card > img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: var(--line); } .win-stars { display: flex; gap: 6px; } .win-stars .star-ico { width: 34px; height: 34px; }
.newsticker { padding: 4px 14px; background: var(--sun); border-radius: 99px; border: 2px solid var(--ink); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.confetti i { position: absolute; left: 50%; top: 30%; width: 12px; height: 12px; border-radius: 3px; background: hsl(calc(var(--i) * 47), 90%, 62%); animation: fly 1.300s ease-out both; --a: calc(var(--i) * 20deg); }
@keyframes fly { to { transform: rotate(var(--a)) translateY(-210px) rotate(300deg); opacity: 0; } }
/* word hunt */
.ws { display: grid; grid-template-columns: minmax(0, 560px) minmax(130px, 200px); gap: 22px; width: 100%; justify-content: center; align-items: start; }
.ws-wrap, .toy-wrap { position: relative; }
.ws-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); touch-action: none; user-select: none; -webkit-user-select: none; border: var(--line); border-radius: 14px; overflow: hidden; background: #FFFDF6; cursor: pointer; }
.ws-grid span { aspect-ratio: 1; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: clamp(.9rem, calc(42vw / var(--n)), 1.700rem); pointer-events: none; }
.ws-svg { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); pointer-events: none; mix-blend-mode: multiply; }
.ws-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ws-list li { padding: 4px 12px; background: var(--paper); border: 2.500px solid var(--ink); border-radius: 99px; font-family: var(--display); letter-spacing: .06em; }
.ws-list li.done { text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: var(--coral); background: var(--mint); }
/* toy orders */
.toys { display: grid; gap: 14px; width: min(100%, 470px); }
.order { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 14px; background: var(--paper); border: var(--line); border-radius: 16px; font-family: var(--display); }
.order-t { font-weight: 700; } .order-i { display: flex; align-items: center; gap: 4px; padding: 2px 10px 2px 4px; background: var(--white); border: 2.500px solid var(--ink); border-radius: 99px; } .order-i svg { width: 30px; height: 30px; } .order-i.ok { background: var(--mint); }
.order-m { margin-left: auto; }
.toy-grid { display: grid; grid-template-columns: repeat(var(--c), 1fr); touch-action: none; user-select: none; -webkit-user-select: none; background: #F3F0FF; border: var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; }
.toy-cell { aspect-ratio: 1; display: grid; place-items: center; pointer-events: none; } .toy-cell svg { width: 78%; height: 78%; transition: transform .1s; }
.toy-cell.sel svg { transform: scale(1.220); filter: drop-shadow(0 0 0 var(--ink)) drop-shadow(2px 3px 0 rgba(39, 33, 77, .35)); }
.toy-cell.drop svg { animation: drop .35s cubic-bezier(.3, 1.4, .6, 1); } @keyframes drop { from { transform: translateY(-120%); opacity: 0; } }
/* quiz games */
.quiz { display: grid; justify-items: center; gap: 16px; width: 100%; text-align: center; } .clock { width: min(60vw, 250px); }
.answers { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; } .answer { min-width: 96px; font-size: 1.350rem; background: var(--white); color: var(--ink); }
.answer.right { background: var(--mint); } .answer.wrong { background: var(--coral); color: var(--white); } .answer:disabled { opacity: 1; }
.quiz-msg { font-family: var(--display); min-height: 1.500em; }
.lagoon { position: relative; width: min(100%, 560px); aspect-ratio: 1.550; background: linear-gradient(#BDEFF5, #8FD8E8); border: var(--line); border-radius: 18px; overflow: hidden; }
.lagoon span { position: absolute; width: 12.500%; transform: rotate(var(--r)); } .lagoon svg { width: 100%; display: block; }
/* pairs */
.pairs { display: grid; grid-template-columns: repeat(4, minmax(0, 120px)); gap: 12px; justify-content: center; width: 100%; }
.card { aspect-ratio: 1; padding: 0; border: 0; background: none; perspective: 600px; }
.card-in { position: relative; display: block; width: 100%; height: 100%; transition: transform .4s; transform-style: preserve-3d; } .card.up .card-in { transform: rotateY(180deg); }
.card-back, .card-front { position: absolute; inset: 0; border: var(--line); border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.card-back { background: var(--sun); background-image: radial-gradient(var(--coral) 5px, transparent 5.500px); background-size: 24px 24px; box-shadow: 3px 3px 0 var(--ink); }
.card-front { transform: rotateY(180deg); background: var(--c); } .card-front img { width: 100%; height: 100%; object-fit: cover; } .card.done .card-front { box-shadow: 0 0 0 4px var(--mint); }
/* scramble */
.scr { display: grid; justify-items: center; gap: 18px; text-align: center; } .scr-clue { font-family: var(--display); font-size: 1.250rem; }
.scr-ans, .scr-pool { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.slot, .letter { width: 52px; height: 58px; border: var(--line); border-radius: 12px; font-family: var(--display); font-weight: 700; font-size: 1.600rem; background: var(--white); padding: 0; }
.slot { background: var(--paper); border-style: dashed; } .slot.full { border-style: solid; background: var(--sun); } .slot:disabled { opacity: 1; }
.letter { background: var(--sky); box-shadow: 3px 3px 0 var(--ink); } .letter:disabled { opacity: .25; box-shadow: none; } .scr-ans.ok .slot { background: var(--mint); }
/* hop */
.hop { display: grid; justify-items: center; gap: 14px; width: 100%; } .hop-msg { font-family: var(--display); font-size: 1.250rem; }
.hop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 170px)); gap: 16px; }
.stone { aspect-ratio: 1.250; border: var(--line); border-radius: 50% 46% 52% 44%; background: var(--c); font-family: var(--display); font-weight: 600; font-size: 1.100rem; box-shadow: 4px 5px 0 var(--ink); opacity: .6; transition: transform .1s; }
.stone:disabled { opacity: .6; } .stone:not(:disabled) { opacity: .85; } .stone.lit { opacity: 1; transform: scale(1.100); filter: brightness(1.180) saturate(1.3); box-shadow: 0 0 0 6px var(--white), 0 0 0 9px var(--ink); }
.hop-pip { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: var(--line); }

/* ----- grown-up gate ----- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(39, 33, 77, .6); } .modal[hidden] { display: none; }
.modal-card { display: grid; gap: 14px; width: min(100%, 440px); padding: 26px; background: var(--white); border: var(--line); border-radius: 26px; box-shadow: var(--pop); }
.modal-card form { display: grid; gap: 10px; } .gate-msg { color: var(--coral); min-height: 1.4em; }

/* ----- tablets and phones: app-style thumb bar ----- */
@media (max-width: 900px) {
  body { padding-bottom: 78px; }
  .top { gap: 10px; } .logo { margin-right: auto; } .quote { bottom: 92px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; gap: 0; background: var(--white); border-top: var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .nav a { flex-direction: column; gap: 2px; padding: 6px 10px; font-size: .8rem; min-width: 60px; border-radius: 16px; }
  .nav svg { width: 26px; height: 26px; } .nav a.on { background: var(--sun); box-shadow: none; }
  .hero, .feature, .bookpage, .profile { grid-template-columns: 1fr; }
  .hero-friends { max-width: 420px; width: 100%; justify-self: center; }
  .feature { justify-items: center; text-align: center; } .feature .cover { max-width: 220px; } .feature .row { justify-content: center; }
  .bookpage-cover { max-width: 300px; justify-self: center; } .profile-pic { max-width: 280px; justify-self: center; }
  .split { grid-template-columns: 1fr; } .split.two { grid-template-columns: 1fr; } .tiles.three { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; } main { gap: 34px; padding-top: 20px; }
  .tock-says { border-radius: 24px; } .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; } .bookcard-cover .cover { max-width: calc(100% - 20px); } .bookcard-body .btn.small { padding: 8px 12px; font-size: .88rem; }
  .ws { grid-template-columns: 1fr; } .bookpage, .profile, .feature { padding: 22px 18px; }
  .panel.tall { grid-template-columns: 1fr 96px; padding: 20px; } .panel.tall img { width: 96px; height: 96px; }
  .badge.lg { width: 132px; } .badge.lg .badge-pic { width: 120px; height: 120px; }
  .game-head h1 { font-size: 1.350rem; } .game-status { flex-basis: 100%; order: 3; } .pairs { gap: 8px; } .slot, .letter { width: 42px; height: 50px; font-size: 1.350rem; } .game-head img { width: 56px; height: 56px; }
  .logo-text small { display: none; } .logo { font-size: 1.050rem; gap: 6px; } .logo-spark { width: 28px; height: 28px; } .top { gap: 8px; padding: 8px 12px; } .stars-pill { padding: 6px 10px 6px 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
