/* Đảo Số: a sunny island world. Single bright theme on purpose (a game world, not a document). */
:root {
  --sky: #c9ecff; --sky2: #8fd0f7; --sea: #58b6e8;
  --grass: #8ad66f; --grass2: #3f9a48; --sand: #ffe7a6;
  --sun: #ffcf33; --coral: #ff6b57; --berry: #8b5cf6;
  --ink: #1f2b4d; --ink2: #51607f; --card: #ffffff; --line: #d6e3f2;
  --ok: #22a45d; --bad: #e5484d; --lock: #b8c4d6;
  --f-display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --f-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--f-body); color: var(--ink); font-size: 17px;
  background: linear-gradient(180deg, var(--sky) 0%, #e9f8ff 55%, var(--sand) 100%) fixed;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 3px; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
.app { max-width: 780px; margin: 0 auto; min-height: 100vh;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: env(safe-area-inset-top, 0px) calc(24px + env(safe-area-inset-bottom, 0px)); }
.screen[hidden] { display: none !important; }

/* bars */
.topbar, .playbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 14px 8px; }
.logo { font-family: var(--f-display); font-weight: 800; font-size: 34px; line-height: .9; letter-spacing: -.01em; }
.logo small { display: block; font-family: var(--f-body); font-size: 12.5px; font-weight: 800; color: var(--ink2); letter-spacing: .06em; text-transform: uppercase; margin-top: 5px; }
.stats { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.playbar .stats { flex-wrap: nowrap; gap: 6px; }
.pill { background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.iconbtn { width: 44px; height: 44px; flex: none; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font-size: 21px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 3px 0 var(--line); }
.iconbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.ptitle { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.ptitle b { font-family: var(--f-display); font-size: 21px; line-height: 1.1; }
.ptitle span { font-size: 13px; font-weight: 800; color: var(--ink2); }
.hello, .buddy { display: flex; gap: 10px; align-items: center; }
.hello p, .buddy p { margin: 0; background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 10px 14px; font-weight: 700; flex: 1; min-width: 0; }
.mascot { font-size: 44px; line-height: 1; display: inline-block; }
.mascot.hop { animation: hop .5s ease; }
.mascot.sad { animation: shake .4s ease; }

/* home: learning timeline */
.timeline { position: relative; margin: 18px 0 8px; padding-left: 26px; display: grid; gap: 18px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 4px; border-radius: 2px; background: repeating-linear-gradient(180deg, var(--grass2) 0 10px, transparent 10px 18px); opacity: .45; }
.grade { position: relative; }
.grade::before { content: ""; position: absolute; left: -24px; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 4px solid var(--lock); }
.grade.open::before { border-color: var(--grass2); background: var(--sun); }
.grade h2 { margin: 0 0 8px; font-family: var(--f-display); font-size: 24px; line-height: 1.1; }
.grade h2 small { font-family: var(--f-body); font-size: 13px; font-weight: 800; color: var(--ink2); margin-left: 6px; }
.terms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.term { text-align: left; border: 3px solid var(--line); border-radius: 22px; background: var(--card); padding: 14px; cursor: pointer; display: grid; gap: 6px; box-shadow: 0 5px 0 var(--line); min-width: 0; }
.term .tt { display: flex; align-items: center; gap: 10px; }
.term .ic { width: 52px; height: 52px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; background: radial-gradient(circle at 50% 40%, var(--grass) 0 56%, var(--grass2) 57% 64%, var(--sand) 65% 100%); }
.term b { font-family: var(--f-display); font-size: 20px; line-height: 1.1; display: block; }
.term small { color: var(--ink2); font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.term .bar { height: 10px; border-radius: 6px; background: #edf3fb; overflow: hidden; }
.term .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), var(--coral)); border-radius: 6px; }
.term .meta { font-size: 13px; font-weight: 800; color: var(--ink2); font-variant-numeric: tabular-nums; }
.term.open { border-color: var(--grass2); box-shadow: 0 5px 0 var(--grass2); }
.term.open:hover { transform: translateY(-2px); }
.term:disabled { cursor: default; background: rgba(255,255,255,.6); box-shadow: none; border-style: dashed; }
.term:disabled .ic { background: #e5ecf5; filter: grayscale(1); opacity: .7; }
.term .soon { justify-self: start; font-size: 12px; font-weight: 800; color: var(--ink2); background: #edf3fb; border-radius: 999px; padding: 2px 10px; }

/* island map */
.map { position: relative; margin-top: 10px; }
.map .path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map .path path { fill: none; stroke: var(--card); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 2 22; }
.map .path path.base { stroke: rgba(63,154,72,.18); stroke-width: 30; stroke-dasharray: none; }
.station { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; width: 138px; background: none; border: 0; cursor: pointer; padding: 0; }
.station .isle { width: 88px; height: 88px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, var(--grass) 0 56%, var(--grass2) 57% 64%, var(--sand) 65% 100%); display: flex; align-items: center; justify-content: center; font-size: 40px; box-shadow: 0 6px 0 rgba(31,43,77,.12); transition: transform .15s; position: relative; }
.station.orig .isle { background: radial-gradient(circle at 50% 38%, #ffd36b 0 56%, #e0a21a 57% 64%, var(--sand) 65% 100%); }
.station:hover .isle { transform: translateY(-3px) rotate(-3deg); }
.station .name { font-family: var(--f-display); font-weight: 800; font-size: 17px; line-height: 1.05; text-align: center; background: var(--card); padding: 3px 10px; border-radius: 10px; border: 2px solid var(--line); }
.station .sub { font-size: 12px; font-weight: 800; color: var(--ink2); text-align: center; line-height: 1.2; }
.station .st { font-size: 15px; letter-spacing: 1px; }
.station .st .off { filter: grayscale(1); opacity: .35; }
.station .badge { position: absolute; top: -4px; right: -10px; background: var(--coral); color: #fff; font: 800 11.5px var(--f-body); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.station.next .isle { animation: pulse 1.6s ease-in-out infinite; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 18px; font-size: 14px; font-weight: 700; color: var(--ink2); }
.foot a { color: var(--berry); }
.err { color: var(--bad); font-weight: 800; }

/* play */
.progress { height: 12px; border-radius: 8px; background: rgba(255,255,255,.7); border: 2px solid var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--grass), var(--grass2)); transition: width .4s ease; }
.scorepill { min-width: 74px; text-align: center; }
/* Previous / next câu, under the progress bar */
.caunav { display: flex; justify-content: space-between; min-height: 40px; margin-top: 12px; }
.navbtn { font: 800 16px var(--f-display); color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 6px 14px; cursor: pointer; box-shadow: 0 3px 0 var(--line); }
.navbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
#cau-next { margin-left: auto; }
/* The question sits on its own card so a child's eye lands on it first */
.prompt { font-family: var(--f-display); font-weight: 800; font-size: 26px; line-height: 1.35; color: #14213d; margin: 18px 0 14px; padding: 14px 18px; background: var(--card); border: 2px solid var(--line); border-left: 8px solid var(--berry); border-radius: 18px; box-shadow: 0 4px 0 var(--line); text-wrap: balance; }
.prompt .cau { display: inline-block; background: var(--berry); color: #fff; border-radius: 10px; padding: 0 10px; margin-right: 8px; font-size: 20px; vertical-align: 2px; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 16px 12px; background: rgba(255,255,255,.6); border: 2px solid rgba(255,255,255,.95); border-radius: 24px; min-height: 160px; }
.row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px 18px; }
.lbl { font-weight: 800; color: var(--ink2); min-width: 22px; }
.eq { font: 800 30px var(--f-display); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; font-variant-numeric: tabular-nums; }
.scroll { max-width: 100%; overflow-x: auto; padding-bottom: 4px; }
svg { max-width: 100%; height: auto; display: block; }

/* blanks + keypad */
.blank { min-width: 64px; height: 56px; padding: 0 8px; border-radius: 14px; border: 3px dashed #9fb3cc; background: #fff; display: inline-flex; align-items: center; justify-content: center; font: 800 28px var(--f-display); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; position: relative; vertical-align: middle; }
.blank.active { border-style: solid; border-color: var(--berry); box-shadow: 0 0 0 4px #e6ddff; }
.blank.active:empty::after { content: ""; width: 3px; height: 30px; background: var(--berry); animation: blink 1s steps(1) infinite; }
.blank.ok { border: 3px solid var(--ok); background: #e2f6ea; color: #157a42; animation: pop .35s ease; cursor: default; }
.blank.rev { border: 3px solid var(--sun); background: #fff6d6; color: #8a6400; cursor: default; }
.blank.bad { animation: shake .4s ease; border-color: var(--bad); }
.blank.wait { opacity: .45; cursor: default; }
.blank.ok.wait, .blank.rev.wait { opacity: 1; }
.keypad { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 14px auto 6px; max-width: 520px; }
.keypad button { height: 58px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); font: 800 28px var(--f-display); cursor: pointer; box-shadow: 0 4px 0 var(--line); }
.keypad button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.keypad .ok { background: var(--ok); border-color: var(--ok); color: #fff; box-shadow: 0 4px 0 #157a42; font-size: 30px; }
.keypad .del { background: #ffeceb; border-color: #ffc9c4; color: var(--bad); }
.choices { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 14px 0 6px; }
.choice { min-width: 84px; height: 66px; padding: 0 18px; font: 800 26px var(--f-display); border-radius: 18px; border: 3px solid var(--line); background: var(--card); cursor: pointer; box-shadow: 0 5px 0 var(--line); font-variant-numeric: tabular-nums; }
.choice:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--line); }
.choice.right { background: var(--ok); color: #fff; border-color: var(--ok); box-shadow: 0 5px 0 #157a42; animation: pop .4s ease; }
.choice.wrong { background: #ffe9e9; border-color: var(--bad); color: var(--bad); animation: shake .4s ease; opacity: .6; }
.choice.reveal { outline: 4px dashed var(--ok); outline-offset: 4px; }
.choice:disabled { cursor: default; }
.btn { font: 800 18px var(--f-display); padding: 12px 22px; border-radius: 16px; border: 0; background: var(--coral); color: #fff; cursor: pointer; box-shadow: 0 5px 0 #c7473a; }
.btn.alt { background: var(--berry); box-shadow: 0 5px 0 #6237c8; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: 0 5px 0 var(--line); border: 2px solid var(--line); }
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn:disabled { opacity: .6; cursor: default; }
/* "Bài tiếp theo" / "Câu tiếp theo" sits on the right with room above and below */
.next { display: flex; justify-content: flex-end; margin: 26px 0 22px; }
.buddy { margin-top: 18px; }

/* who is playing */
.whopill { cursor: pointer; font: inherit; font-weight: 800; color: var(--ink); max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.who { max-width: 460px; margin: 0 auto; padding-top: 24px; text-align: center; }
.who h1 { font-family: var(--f-display); font-size: 36px; margin: 6px 0 18px; }
.who-list { display: grid; gap: 10px; margin-bottom: 18px; }
.who-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; border: 2px solid var(--line); background: var(--card); box-shadow: 0 4px 0 var(--line); cursor: pointer; font: inherit; text-align: left; color: var(--ink); }
.who-card b { flex: 1; font: 800 22px var(--f-display); }
.who-card small { color: var(--berry); font-weight: 800; }
.who-av { width: 44px; height: 44px; border-radius: 50%; background: var(--berry); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 800 22px var(--f-display); flex: none; }
.who-form { background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: 18px; text-align: left; display: grid; gap: 12px; }
.who-form h2 { font-family: var(--f-display); font-size: 22px; margin: 0; }
.who-form label { display: grid; gap: 6px; font-weight: 800; color: var(--ink2); }
.who-form input { font: 800 22px var(--f-display); padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); color: var(--ink); min-width: 0; }
.who-form input:focus { outline: none; border-color: var(--berry); box-shadow: 0 0 0 4px #e6ddff; }
.who-note { margin: 0; font-size: 14px; color: var(--ink2); }
.who-err { margin: 0; min-height: 1em; color: var(--bad); font-weight: 800; }
.who-form .btn { justify-self: end; }
.float { position: fixed; z-index: 60; font: 800 26px var(--f-display); color: var(--ok); pointer-events: none; animation: floatup 1.1s ease forwards; }

/* câu-specific pieces */
.dice svg { animation: roll .6s ease; }
.star-sky .star { cursor: pointer; }
.star-sky .star.mark { fill: #ff9f1c; }
.pond { position: relative; display: flex; gap: 10px; align-items: flex-end; padding-top: 50px; }
.stone { min-width: 62px; height: 50px; border-radius: 50% 50% 46% 46%; background: #9aa7b8; box-shadow: inset 0 -8px 0 #7a8698; display: flex; align-items: center; justify-content: center; font: 800 23px var(--f-display); color: #fff; padding: 0 6px; }
.stone .blank { height: 44px; min-width: 52px; font-size: 22px; }
.frog { position: absolute; top: 0; left: 0; font-size: 38px; transition: transform .45s cubic-bezier(.3,1.6,.6,1); }
.stick { display: grid; grid-template-columns: repeat(10, 1fr); width: min(100%, 640px); border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; }
.stick div { height: 46px; border-left: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font: 800 17px var(--f-display); background: #fff; }
.stick div:first-child { border-left: 0; }
.stick div:nth-child(even) { background: var(--sun); }
.stick div.tg { box-shadow: inset 0 0 0 4px var(--berry); }
.stick div span { animation: pop .3s ease backwards; }
.ballrow { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.ball { width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6 0 18%, transparent 19%), var(--coral); color: #fff; display: flex; align-items: center; justify-content: center; font: 800 30px var(--f-display); }
.ball.now { animation: bounce 1s ease-in-out infinite; box-shadow: 0 0 0 5px #ffd9d3; }
.ball.done { opacity: .25; }
.baskets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 520px; }
.basket { border: 3px solid #c98a4b; border-radius: 14px 14px 36px 36px; background: #f8d7ae; min-height: 116px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-family: inherit; box-shadow: 0 5px 0 #a8692f; }
.basket b { font: 800 22px var(--f-display); }
.basket small { font-weight: 800; color: #8a5a2b; font-size: 13px; }
.basket .in { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.basket .in span { background: var(--coral); color: #fff; border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font: 800 19px var(--f-display); animation: drop .4s ease; }
.basket.bad { animation: shake .4s ease; }
.cross { display: grid; grid-template-columns: repeat(10, 54px); grid-auto-rows: 54px; width: max-content; }
.cross > div { border: 2px solid var(--ink); margin: -1px; display: flex; align-items: center; justify-content: center; font: 800 20px var(--f-display); background: #fff; font-variant-numeric: tabular-nums; }
.cross .blank { width: 100%; height: 100%; min-width: 0; border-radius: 0; border: 0; font-size: 20px; }
.cross .blank.active { box-shadow: inset 0 0 0 4px var(--berry); }
.cross .blank.ok, .cross .blank.rev { border: 0; }
.numbox { display: inline-block; border: 3px solid var(--ink); border-radius: 8px; padding: 2px 18px; font: 800 36px var(--f-display); background: #fff; }
.numbox .t { color: var(--berry); } .numbox .u { color: var(--coral); }
.lines { display: grid; gap: 14px; font-size: 19px; font-weight: 700; }
.lines > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acards { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; font: 800 26px var(--f-display); }
.acard { display: inline-flex; align-items: stretch; }
.acard .d { width: 50px; height: 56px; border: 3px solid var(--ink2); margin-right: -3px; display: flex; align-items: center; justify-content: center; font: 800 26px var(--f-display); background: #fff; }
.acard .d .blank { width: 100%; height: 100%; min-width: 0; border: 0; border-radius: 0; }
.acard .tri { width: 46px; height: 56px; background: #c8cfdc; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.acards.merge .acard { animation: pop .5s ease; }
.train { display: flex; align-items: flex-end; gap: 6px; flex-wrap: wrap; justify-content: center; }
.train.go { animation: choo 1.1s ease-in forwards; }
.loco { font-size: 52px; line-height: 1; }
.slot { width: 70px; height: 56px; border: 3px dashed #9fb3cc; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.car { width: 74px; height: 58px; font: 800 26px var(--f-display); border-radius: 12px; border: 3px solid #2f6db3; background: #5aa0ea; color: #fff; box-shadow: 0 5px 0 #2f6db3; cursor: pointer; position: relative; }
.car::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -12px; height: 10px; background: radial-gradient(circle at 20% 50%, var(--ink) 0 5px, transparent 6px), radial-gradient(circle at 80% 50%, var(--ink) 0 5px, transparent 6px); }
.slot .car { box-shadow: none; cursor: default; }
.car.wrong { animation: shake .4s ease; background: #ff8f84; border-color: var(--bad); }
.car.hint { outline: 4px dashed var(--ok); outline-offset: 3px; }
.cars { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.yard { display: flex; align-items: flex-end; gap: 1px; padding: 4px 0; }
.yard .tree { font-size: clamp(28px, 8vw, 54px); line-height: 1; }
.chick { font-size: clamp(18px, 5.2vw, 40px); line-height: 1; background: none; border: 3px solid transparent; border-radius: 50%; padding: 6px 1px 8px; cursor: pointer; position: relative; }
.chick.circled { border-color: var(--ok); }
.chick.under::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 0; height: 4px; border-radius: 2px; background: var(--ok); }
.chick.wrong { animation: shake .4s ease; }
.chick.hintme { outline: 3px dashed var(--sun); outline-offset: 2px; }
.mode { display: inline-block; font: 800 15px var(--f-body); border-radius: 999px; padding: 4px 12px; background: #e6ddff; color: var(--berry); }
.colop { display: grid; grid-template-columns: 26px 58px 58px; gap: 8px; align-items: center; justify-items: center; }
.colop .sign { font: 800 30px var(--f-display); grid-row: 1 / span 2; }
.colop hr { grid-column: 1 / -1; width: 100%; border: 0; border-top: 3px solid var(--ink); margin: 0; }
.colop .empty { width: 58px; height: 56px; border: 3px dashed #d4dce8; border-radius: 14px; }
.colop .blank { min-width: 58px; width: 58px; }
.mt { display: grid; grid-template-columns: 60px 26px 60px 26px 66px; align-items: center; }
.mt .c { height: 52px; border: 2.5px solid var(--ink); margin-top: -2.5px; display: flex; align-items: center; justify-content: center; font: 800 20px var(--f-display); background: #fff; font-variant-numeric: tabular-nums; }
.mt .c .blank { width: 100%; height: 100%; min-width: 0; border: 0; border-radius: 0; font-size: 21px; }
.mt .s { text-align: center; color: var(--ink2); font-weight: 800; }
.tables { display: flex; gap: 18px 40px; flex-wrap: wrap; justify-content: center; }
.apples { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.apples span { border: 3px solid #c98a4b; background: #f8d7ae; border-radius: 12px 12px 26px 26px; padding: 4px 8px 8px; font-size: 24px; line-height: 1.1; }
.arrow { width: 46px; flex: none; }
.opts { display: grid; gap: 10px; justify-items: center; margin-top: 14px; }
.opts .choice { min-width: 230px; text-align: left; }
.arc { stroke-dasharray: 220; animation: draw .4s ease backwards; }

/* result + stickers */
.result { text-align: center; padding-top: 30px; }
.bigmascot { font-size: 86px; animation: hop 1s ease infinite; }
.result h1 { font-family: var(--f-display); font-size: 40px; margin: 6px 0 0; }
.score { font: 800 56px var(--f-display); color: var(--berry); line-height: 1.1; font-variant-numeric: tabular-nums; }
.score small { display: block; font-size: 20px; color: var(--ink2); }
.stars { font-size: 56px; letter-spacing: 6px; }
.stars span { display: inline-block; animation: starin .5s cubic-bezier(.3,1.6,.6,1) backwards; }
.stars span.off { filter: grayscale(1); opacity: .3; }
.stars span:nth-child(2) { animation-delay: .25s; } .stars span:nth-child(3) { animation-delay: .5s; }
.qchips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 14px 0; }
.qchips span { font: 800 13px var(--f-body); padding: 4px 9px; border-radius: 8px; border: 2px solid var(--line); background: #fff; font-variant-numeric: tabular-nums; }
.qchips .full { border-color: var(--ok); background: #e2f6ea; }
.qchips .part { border-color: var(--sun); background: #fff6d6; }
.qchips .zero { border-color: var(--bad); background: #ffe9e9; }
.newsticker { background: var(--card); border: 3px dashed var(--berry); border-radius: 18px; padding: 10px; display: inline-block; font-weight: 800; }
.rbtns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.stk { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 10px 6px; text-align: center; font-weight: 800; font-size: 13px; color: var(--ink2); }
.stk span { display: block; font-size: 46px; line-height: 1.2; }
.stk.locked span { filter: grayscale(1) brightness(.2); opacity: .25; }

@keyframes hop { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-14px); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
@keyframes pop { 50% { transform: scale(1.12); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes drop { from { transform: translateY(-40px); opacity: 0; } }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes choo { to { transform: translateX(120%); } }
@keyframes starin { from { transform: scale(0) rotate(-90deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes roll { from { transform: rotate(-200deg) scale(.4); opacity: 0; } }
@keyframes draw { from { stroke-dashoffset: 220; } to { stroke-dashoffset: 0; } }
@keyframes floatup { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-60px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 560px) {
  body { font-size: 16px; }
  .logo { font-size: 28px; }
  .prompt { font-size: 21px; padding: 12px 14px; border-left-width: 6px; }
  .terms { grid-template-columns: 1fr; }
  .eq { font-size: 24px; }
  .blank { min-width: 54px; height: 50px; font-size: 24px; }
  .keypad { gap: 6px; } .keypad button { height: 52px; font-size: 24px; }
  .cross { grid-template-columns: repeat(10, min(34px, calc((100vw - 68px) / 10))); grid-auto-rows: 38px; }
  .cross > div, .cross .blank { font-size: 15px; }
  .stone { min-width: 48px; height: 44px; font-size: 18px; } .stone .blank { min-width: 42px; height: 38px; font-size: 18px; }
  .pond { gap: 5px; }
  .stick div { height: 40px; font-size: 13px; }
  .car { width: 58px; height: 50px; font-size: 21px; } .slot { width: 54px; height: 48px; } .loco { font-size: 40px; }
  .acard .d { width: 40px; height: 48px; font-size: 21px; } .acard .tri { width: 34px; height: 48px; } .acards { font-size: 21px; gap: 6px; }
  .mt { grid-template-columns: 48px 18px 48px 18px 54px; } .mt .c { height: 46px; font-size: 17px; }
  .station { width: 118px; } .station .isle { width: 76px; height: 76px; font-size: 34px; }
  .opts .choice { min-width: 200px; font-size: 22px; }
}
