@font-face {
  font-family: Tskapuna;
  src: url("assets/ka.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0589,U+10A0-10FF,U+1C90-1CBF,U+205A,U+2D00-2D2F,U+2E31;
}
@font-face {
  font-family: Tskapuna;
  src: url("assets/latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF,U+2000-206F;
}
:root {
  font: 100%/1.55 Tskapuna, "Segoe UI", sans-serif;
  color: #252943;
  background: #fffbf2;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #225f9e; outline-offset: 3px; }
.mast, main { width: min(92%, 1024px); margin-inline: auto; }
.mast { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-bottom: 1px solid #e5e0d0; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-size: clamp(1.25rem, 3vw, 1.65rem); font-weight: 900; letter-spacing: -.04em; }
.brand img { border-radius: 14px; }
.leave, .listen, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1.1rem; border: 1px solid #dbd9ce; border-radius: 999px; background: #fffdf9; font-size: .925rem; font-weight: 750; text-align: center; }
.leave:hover, .listen:hover, .secondary:hover { background: #f0f3e8; }
.trail { display: flex; align-items: center; gap: .85rem; margin: clamp(1rem, 3vw, 2.25rem) auto 1rem; font-size: .9rem; font-weight: 750; color: #4c5650; }
.progress { display: flex; gap: 5px; flex: 1; }
.progress i { display: block; height: 8px; border-radius: 999px; flex: 1; background: #e6e2d3; }
.progress .filled { background: #399470; }
.game, .complete { border: 1px solid #e1dccb; border-radius: 30px; background: #fffdf7; box-shadow: 0 6px 0 #eee8d7; overflow: hidden; }
.question-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: clamp(18px, 3.3vw, 36px); }
h1, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 4.7vw, 3.25rem); letter-spacing: -.045em; line-height: 1.35; font-weight: 900; }
h1:focus { outline: none; }
.listen { flex-shrink: 0; color: #205c48; gap: .4rem; }
.listen svg { width: 21px; height: 21px; }
.stage { margin-inline: clamp(8px, 2.2vw, 24px); border-radius: 22px; overflow: hidden; }
.stage.animals { background: #b7e7e1 url("assets/scene-meadow.webp") center / 100% 100% no-repeat; }
.stage.balloons { background: #def2ff url("assets/scene-clouds.webp") center / 100% 100% no-repeat; }
.stage.letters { background: radial-gradient(ellipse at 50% 0%,#fff7cf,#ffe3ad); }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(7px, 2.1vw, 25px); align-items: end; padding: clamp(2rem, 6vw, 4.75rem) clamp(9px, 5vw, 72px) clamp(1.5rem, 4vw, 3.5rem); }
.choice { --tile-color: #fff8e8; position: relative; display: flex; flex-direction: column; justify-content: end; align-items: center; min-width: 0; border: 3px solid transparent; border-radius: 28px; background: transparent; padding: 0; }
.choice:focus-visible { outline-offset: 1px; }
.choice img { display: block; width: 100%; max-width: 205px; height: auto; aspect-ratio: 1; object-fit: contain; transition: transform .2s ease; }
.choice .name { display: grid; place-items: center; min-height: 40px; min-width: min(90%, 100px); padding: .15em .65em; background: #fffdf6; border-radius: 999px; font-size: clamp(.86rem, 2vw, 1.25rem); font-weight: 800; box-shadow: 0 2px 0 #5a664334; }
.choice[aria-disabled="true"] { cursor: default; }
.choice.correct .name, .choice.correct.letter-tile { color: #fff; background: #176449; box-shadow: 0 3px 0 #104632; }
.choice.correct .name::after, .choice.correct.letter-tile::after { content: "✓"; position: absolute; top: 3px; right: 2px; display: grid; place-items: center; min-width: 26px; min-height: 26px; border-radius: 50%; background: #176449; color: white; font: 800 18px/1 sans-serif; border: 2px solid #fffdf4; }
.balloons .choice img { aspect-ratio: 200 / 285; max-height: 220px; }
.balloons .choices { padding-top: clamp(1.5rem, 5vw, 3rem); }
.letters .word { display: flex; justify-content: center; align-items: center; gap: .35em; margin: 0; padding: 1em 8px 0; font-size: clamp(1.8rem, 6vw, 3.2rem); line-height: 1.35; font-weight: 850; }
.word img { width: 1.8em; height: 1.8em; object-fit: contain; }
.missing { color: #a74628; }
.letters .choices { max-width: 600px; margin-inline: auto; padding-top: clamp(1.1rem, 2.7vw, 2.1rem); }
.letter-tile { align-items: center; justify-content: center; height: clamp(68px, 12vw, 106px); border-radius: 24px; background: var(--tile-color); box-shadow: 0 4px 0 #a76f2836; font-weight: 850; font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.letter-tile:nth-child(1) { --tile-color: #ffe9d8; }
.letter-tile:nth-child(2) { --tile-color: #d9edd7; }
.letter-tile:nth-child(3) { --tile-color: #dbe9fc; }
.response { min-height: 83px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .55rem 1rem; padding: 1rem clamp(16px, 3.3vw, 36px); }
#feedback { color: #3e5749; font-size: clamp(.95rem, 2.1vw, 1.12rem); font-weight: 700; }
.button { border-width: 1.5px; }
.primary { color: #fff; border-color: #176449; background: #176449; box-shadow: 0 3px 0 #114b38; }
.primary:hover { background: #104e38; }
.complete { display: flex; align-items: center; justify-content: center; gap: clamp(2rem, 5vw, 5rem); padding: clamp(24px, 5vw, 65px); }
.complete p { margin: .7rem 0 1.4rem; max-width: 28em; color: #43554b; }
.reward { flex: none; text-align: center; }
.reward img { width: clamp(120px, 18vw, 220px); height: auto; }
.stars { color: #ecaa20; font: 900 clamp(21px,4vw,34px)/1.2 system-ui; letter-spacing: .12em; }
.end-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.end-actions .button { text-wrap: balance; }
main { padding-bottom: 2rem; }
@media (hover:hover) { .choice:not([aria-disabled]):hover img { transform: translateY(-5px) rotate(-2deg); } .letter-tile:not([aria-disabled]):hover { border-color: #508863; } }
@media (prefers-reduced-motion: no-preference) {
  .balloons .choice:not([aria-disabled]) img { animation: drift 3.8s ease-in-out infinite alternate; }
  .balloons .choice:nth-child(2) img { animation-delay: -1.9s; }
  .balloons .choice:nth-child(3) img { animation-delay: -1s; }
  .balloons .choice.correct img { animation: pop .34s ease-out forwards; }
  .choice.retry { animation: nudge .25s ease-in-out; }
  @keyframes drift { from { transform: translateY(-3px) rotate(-2deg); } to { transform: translateY(3px) rotate(2deg); } }
  @keyframes pop { 45% { transform: scale(1.1); } to { transform: scale(.65); opacity: .15; } }
  @keyframes nudge { 25% { transform: translateX(-3px); } 65% { transform: translateX(3px); } }
}
@media (max-width: 600px) {
  .mast { min-height: 65px; }
  .brand img { width: 34px; height: 34px; border-radius: 10px; }
  .leave { padding: .4em .85em; font-size: .85rem; }
  .game, .complete { border-radius: 22px; }
  .question-row { align-items: start; }
  .listen { width: 44px; height: 44px; padding: 0; }
  .listen span { display: none; }
  .stage { border-radius: 16px; }
  .choice { border-radius: 12px; }
  .choice .name { min-height: 34px; }
  .complete { flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
  .end-actions { justify-content: center; }
}
@media (max-width: 360px) {
  .choices { padding-inline: 3px; gap: 2px; }
  .response { padding-inline: .7rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
