/* Truco o Mates - the paper-collage Halloween night from the promo video,
   inside the same chrome every other game uses (nav circles, stopwatch
   pill, purple tray, big pink buttons, Ninotet, the claire handwriting).
   Always Halloween: game.js pins :root[data-season="halloween"] all year,
   so the shared chrome around it (pills, flyouts) follows too. */
#game {
  --af-night: #2c2557;
  --af-plum: #4a345f;
  --af-cream: #fff3dd;
  --af-ink: #4b2a55;
  --af-gold: #ffcf86;
  background: var(--af-night);
  color: var(--af-ink);
}
html, body { background: #2c2557; }
#game > .clouds-layer { display: none; }

/* ---- the sky behind every screen ----------------------------------- */
.af-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: var(--af-night) url("assets/sky.webp") center top / cover no-repeat; }
@media (orientation: landscape) { .af-sky { background-image: url("assets/sky-wide.webp"); background-position: center 35%; } }
/* paper grain: two offset dot screens, multiplied, like the video's overlay */
.af-sky::after { content: ""; position: absolute; inset: 0; opacity: .16; mix-blend-mode: multiply;
  background-image: radial-gradient(#3a2550 1px, transparent 1.3px), radial-gradient(#ffffff 1px, transparent 1.3px);
  background-size: 7px 7px, 11px 11px; background-position: 0 0, 3px 5px; }
.af-twinkle { position: absolute; width: 14px; height: 14px; margin: -7px; background: #fff6d8;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: afTwinkle var(--tw, 3s) ease-in-out var(--td, 0s) infinite alternate; opacity: .3; }
@keyframes afTwinkle { to { opacity: .95; transform: scale(1.5) rotate(20deg); } }
/* bats: two cut-out frames swapped at ~9 fps, like the video */
.af-bat { position: absolute; width: clamp(40px, 5.5vw, 66px); aspect-ratio: 1.2; }
.af-bat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 3px #1a103055); }
.af-bat img + img { animation: afFlap .32s steps(1) infinite; }
@keyframes afFlap { 50% { opacity: 0; } }
.af-bat img:first-child { animation: afFlap .32s steps(1) -.16s infinite; }
.af-sky .af-bat { animation: afCruise var(--bd, 40s) linear var(--bdl, 0s) infinite; left: -120px; opacity: .55; }
/* during play the sky stays quiet: only the bats that bring presents fly */
.af-playing .af-sky .af-bat { display: none; }
@keyframes afCruise {
  0% { transform: translate(0, 0) rotate(-5deg); }
  25% { transform: translate(calc(30vw + 30px), -22px) rotate(4deg); }
  50% { transform: translate(calc(60vw + 70px), 14px) rotate(-4deg); }
  75% { transform: translate(calc(90vw + 110px), -16px) rotate(5deg); }
  100% { transform: translate(calc(100vw + 240px), 0) rotate(-3deg); }
}
/* stop-motion "boil": a tiny jitter held for a few frames, never smooth */
.af-boil { animation: afBoil .33s steps(1) infinite; }
@keyframes afBoil { 0% { translate: 0 0; rotate: 0deg; } 33% { translate: .8px -.7px; rotate: .5deg; } 66% { translate: -.7px .6px; rotate: -.4deg; } }

#game .screen { z-index: 1; }

/* ---- start + end screens -------------------------------------------- */
#screen-start, #screen-end { gap: 14px; justify-content: safe center; }
.af-banner { position: relative; width: min(460px, 92vw); aspect-ratio: 1245 / 432; flex: none;
  background: url("assets/banner.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 6px 6px #1a103055); }
.af-banner-title { position: absolute; inset: 0; margin: 0; font-size: 1px; }
.af-banner-title svg { display: block; width: 100%; height: 100%; overflow: visible; }
.af-banner-title text { font-family: claire_handbold, sans-serif; dominant-baseline: central; paint-order: stroke; stroke: #fff; stroke-linejoin: round; }
.af-arc-title { font-size: 98px; fill: #7a4380; stroke-width: 10px; }
.af-arc-sub { font-size: 50px; fill: #98599a; stroke-width: 6px; }
.af-hero { position: relative; width: min(280px, 70vw); height: min(200px, 26vh); flex: none; }
.af-hero img { position: absolute; }
.af-hero .mascot { width: auto; height: 100%; left: 50%; bottom: 0; translate: -38% 0; }
.af-hero-pumpkin { height: 62%; left: 0; bottom: 0; animation: afBoil .33s steps(1) infinite; }
.af-hero-gift { height: 34%; right: 2%; top: 4%; rotate: 12deg; animation: afSway 3s ease-in-out infinite alternate; }
.af-hero-end { height: min(220px, 28vh); }
.af-hero-end .af-hero-burst { height: 100%; left: 50%; translate: -50% 0; top: 0; animation: afSpinSlow 18s linear infinite; }
.af-hero-end .mascot { height: 76%; bottom: 8%; translate: -50% 0; }
.af-hero-candy { height: 30%; }
.af-hero-candy-a { left: 0; bottom: 0; rotate: -18deg; animation: afSway 2.6s ease-in-out infinite alternate; }
.af-hero-candy-b { right: 4%; bottom: 4%; height: 24%; rotate: 14deg; animation: afSway 3.1s ease-in-out -1s infinite alternate; }
@keyframes afSpinSlow { to { rotate: 360deg; } }
@keyframes afSway { from { transform: rotate(-5deg); } to { transform: rotate(5deg) translateY(6px); } }
.af-card { background: #fffaf0; border-radius: 8px 16px 10px 14px; padding: 12px 18px; rotate: -.6deg; box-shadow: 0 4px 0 #1a103044; max-width: 440px; }
.af-start-hint { font-family: var(--am-readable-font); font-size: 16px; line-height: 1.45; margin: 0; color: var(--af-ink); }
.af-start-keys { font-size: 13px; opacity: .75; margin-top: 6px; }
#screen-end h1.title { color: var(--af-gold); text-shadow: 3px 3px 0 #7a4380; }
#screen-end .results p { color: var(--af-ink); margin: 4px 0; }
#game .results #results-time { color: var(--af-ink); }
/* sticker edge on the big buttons: the same buttons, cut out of paper */
#game .big-button { box-shadow: 0 0 0 4px #fff, 0 9px 0 4px #b5323f; rotate: -1.2deg; }
#game .big-button-alt { box-shadow: 0 0 0 4px #fff, 0 9px 0 4px var(--purple-dark); rotate: 1deg; }
#game .big-button-ghost { background: #fffaf0; box-shadow: 0 0 0 4px #fff, 0 9px 0 4px #1a103044; rotate: 0deg; }
#game .big-button:active { box-shadow: 0 0 0 4px #fff, 0 4px 0 4px #b5323f; }

/* ---- game screen grid ------------------------------------------------- */
.af-playing > .home-nav, .af-playing > .lang-switcher, .af-playing > .records-switcher, .af-playing > .identity-login { display: none !important; }
#screen-game { display: grid; grid-template: "hud" auto "stage" minmax(0, 1fr) "answers" auto / 1fr; max-width: none; width: 100%; height: 100%; margin: 0; padding: 0 0 var(--am-consent-h, 0px); gap: 0; overflow: hidden; color: var(--af-ink); }
#screen-game[hidden] { display: none; }

/* HUD: same pieces as the other games, white on the night sky */
.af-hud { grid-area: hud; min-height: 66px; padding: 10px max(14px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; gap: 18px; z-index: 5; font-size: 19px; }
.af-pause-button { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; background: #fff; box-shadow: 0 3px 0 #00000026; display: grid; place-items: center; padding: 0; cursor: pointer; }
.af-pause-button svg { width: 20px; height: 20px; stroke: var(--purple-dark); stroke-width: 3; fill: none; stroke-linecap: round; }
.af-pause-button:active { transform: translateY(3px); box-shadow: 0 1px 0 #00000026; }
.af-hud .score { font-size: 24px; min-width: 64px; color: #fff; text-shadow: 2px 2px 0 var(--purple-dark); font-weight: normal; }
.af-hud .score::before { content: "⭐ "; }
.hud-lives { display: flex; align-items: center; gap: 6px; margin-right: auto; font-size: 20px; color: #fff; text-shadow: 2px 2px 0 var(--purple-dark); }
.hud-lives strong { font-weight: normal; }
.af-heart-main { width: 34px; filter: drop-shadow(0 3px 2px #1a103066); }
.af-heart-main.af-hit { animation: afShake .3s; }
.af-life-track { display: none; gap: 2px; align-items: center; }
.af-life-heart { width: 26px; filter: drop-shadow(0 2px 1px #1a103066); transition: opacity .3s, filter .3s; }
.af-life-heart.lost { opacity: .22; filter: grayscale(1); }
.af-life-heart.af-losing { animation: afHeartLose .9s ease-in forwards; }
@keyframes afHeartLose {
  0%, 15% { transform: translateX(0); }
  5% { transform: translateX(-4px); } 10% { transform: translateX(4px); }
  60% { transform: translate(14px, 30px) rotate(60deg); opacity: .8; }
  100% { transform: translate(22px, 70px) rotate(95deg); opacity: 0; }
}
.af-level { color: #fff; opacity: .8; font-size: 16px; }
#screen-game .hud-time { background: #ffffffd0; }

/* ---- the falling field -------------------------------------------------- */
#screen-game .stage-area { grid-area: stage; display: block; min-height: 0; width: 100%; }
.af-field { position: absolute; inset: 0; overflow: hidden; outline: none; }
.af-field.af-shake { animation: afShakeField .32s; }
@keyframes afShakeField { 20% { translate: -6px 3px; } 40% { translate: 5px -2px; } 60% { translate: -3px 2px; } 80% { translate: 2px -1px; } }
/* a street of paper houses, repeated across wide screens, cut into ten
   pieces - one per life. game.js lines each piece's slice of the street up
   (background-position-x) so the strip reads as one continuous town. */
.af-city { position: absolute; left: 0; right: 0; bottom: 8%; height: min(24%, calc(100vw / 2.32)); z-index: 1; }
.af-house { position: absolute; bottom: 0; height: 100%; width: 10%; left: calc(var(--i) * 10%); }
.af-house-art { position: absolute; left: -1px; right: -1px; bottom: 0; height: calc(100% / 1.4); background: url("assets/city.webp") 0 100% / auto 100% repeat-x; transform-origin: 50% 100%;
  transition: transform .9s cubic-bezier(.55, 0, .8, .4), filter .6s; filter: drop-shadow(0 -2px 6px #1a103055); }
/* a neighbour of a ruin tilts and dims: the warning that the town is going */
.af-cracked .af-house-art { transform: rotate(var(--tilt-s, 2deg)); filter: brightness(.82) saturate(.8); }
/* ruined: the paper house folds down into the street, lights out */
.af-ruined .af-house-art { transform: translateY(46%) rotate(var(--tilt, 6deg)); filter: brightness(.42) saturate(.3); }
.af-house-rubble { position: absolute; left: -6%; right: -6%; bottom: 0; height: 0; background: #7a6888;
  clip-path: polygon(0 100%, 5% 45%, 16% 62%, 26% 18%, 38% 52%, 50% 8%, 62% 46%, 72% 22%, 84% 58%, 94% 30%, 100% 100%); transition: height .5s .5s; }
.af-house-rubble::before { content: ""; position: absolute; inset: 0; background: radial-gradient(#ffffff26 1px, transparent 1.5px) 0 0 / 7px 7px; }
.af-ruined .af-house-rubble { height: 42%; }
.af-house-smoke { position: absolute; left: 50%; bottom: 20%; width: 70%; max-width: 70px; translate: -50% 0; opacity: 0; pointer-events: none; filter: grayscale(1) brightness(1.15); }
.af-ruined .af-house-smoke { animation: afSmoke 3.6s ease-out 1s infinite; }
@keyframes afSmoke { 0% { opacity: 0; transform: translateY(0) scale(.5); } 25% { opacity: .55; } 100% { opacity: 0; transform: translateY(-120%) scale(1.1); } }
/* clips the sinking house at street level, with headroom for tilted roofs */
.af-house-clip { position: absolute; inset: -40% 0 0; overflow: hidden; }
.af-ground { position: absolute; inset: auto 0 0; height: 10%; z-index: 2; background: var(--af-plum);
  clip-path: polygon(0 18%, 6% 8%, 13% 20%, 21% 6%, 30% 16%, 38% 4%, 47% 17%, 55% 7%, 64% 18%, 72% 6%, 81% 16%, 90% 4%, 100% 14%, 100% 100%, 0 100%); }
.af-ground::before { content: ""; position: absolute; inset: 0; background: radial-gradient(#ffffff16 1px, transparent 1.4px) 0 0 / 9px 9px; }
.af-ground::after { content: ""; position: absolute; left: 3%; right: 3%; top: 42%; border-top: 2px dashed #ffffff40; }
.af-pumpkin { position: absolute; bottom: 2.5%; width: clamp(40px, 5.5vw, 76px); z-index: 3; filter: drop-shadow(0 0 10px #ffb95c55); animation: afBoil .33s steps(1) infinite; }
.af-pumpkin-left { left: 5%; }
.af-pumpkin-right { right: 5%; transform: scaleX(-1); }

/* archers: the three costumed kids from the video */
.af-archers { position: absolute; bottom: 3%; left: 50%; transform: translateX(-50%); display: flex; align-items: flex-end; z-index: 3; }
.af-archer { width: clamp(48px, 6vw, 84px); transform-origin: 50% 100%; }
.af-archer img { display: block; width: 100%; filter: drop-shadow(0 4px 2px #0006); animation: afIdle 1.6s ease-in-out infinite alternate; }
.af-archer:nth-child(2) { width: clamp(54px, 6.8vw, 96px); margin: 0 -6px; }
.af-archer:nth-child(2) img { animation-delay: -.5s; }
.af-archer:nth-child(3) img { animation-delay: -1s; }
@keyframes afIdle { to { translate: 0 -3px; } }
.af-archer.af-appear { animation: afPopUp .45s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(var(--i) * .14s); }
@keyframes afPopUp { from { transform: scale(0); } }
.af-archer.af-shoot { animation: afBow .3s ease; }
@keyframes afBow { 50% { transform: scale(1.04, .9); } }
.af-cheer .af-archer { animation: afCheer .5s ease-out; }
.af-cheer .af-archer:nth-child(2) { animation-delay: .06s; }
.af-cheer .af-archer:nth-child(3) { animation-delay: .12s; }
@keyframes afCheer { 40% { transform: translateY(-14px); } }

.af-aim { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; }
.af-aim line { stroke: #ff8b97; stroke-width: 2; stroke-dasharray: 6 8; opacity: .8; }
.af-aim path { fill: none; stroke: #fff0c8; stroke-opacity: .6; stroke-width: 4; stroke-dasharray: 3 9; stroke-linecap: round; }
.af-arrow { position: absolute; left: 0; top: 0; width: clamp(54px, 6vw, 80px); z-index: 6; pointer-events: none; }

/* presents: the gift, a crayon string and the paper tag with the sum */
.af-obj { position: absolute; top: 0; cursor: pointer; border: 0; padding: 4px 0; background: transparent; color: var(--af-ink); font: inherit; touch-action: manipulation; z-index: 4; -webkit-tap-highlight-color: transparent; }
.af-obj-inner { display: flex; flex-direction: column; align-items: center; position: relative; }
.af-obj-sway { display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; animation: afSway var(--sw, 3.2s) ease-in-out var(--swd, 0s) infinite alternate; }
.af-obj-art { width: clamp(52px, 6vw, 76px); filter: drop-shadow(0 6px 4px #1a103066); }
.af-obj-label { position: relative; margin-top: -6px; min-width: clamp(92px, 9.5vw, 124px); padding: 12px 12px 10px 26px; font-weight: normal; font-size: clamp(20px, 2vw, 27px); line-height: 1; white-space: nowrap; color: var(--af-ink);
  background: url("assets/tag.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 3px 2px #1a103055); }
/* sight: a dashed paper-pink ring round the chosen present */
.af-sel .af-obj-inner::before { content: ""; position: absolute; width: clamp(70px, 8vw, 100px); height: clamp(70px, 8vw, 100px); top: -12px; border: 3px dashed #ff6f82; border-radius: 50%;
  background: linear-gradient(#ff6f82, #ff6f82) center / 2px 100% no-repeat, linear-gradient(#ff6f82, #ff6f82) center / 100% 2px no-repeat; pointer-events: none; animation: afRing 4s linear infinite; }
@keyframes afRing { to { rotate: 360deg; } }
.af-sel .af-obj-label { color: #c0392b; }
.af-obj-inner.af-wrong { animation: afShake .3s; }
.af-obj-inner.af-landing { animation: afSquash .2s ease-in forwards; }
@keyframes afSquash { to { transform: translateY(18px) scale(1.35, .25); opacity: 0; } }
@keyframes afShake { 25% { transform: translateX(-6px) rotate(-3deg); } 75% { transform: translateX(6px) rotate(3deg); } }
.af-deliver { position: absolute; z-index: 5; pointer-events: none; width: clamp(34px, 4.4vw, 52px); animation: afDeliver 1.3s ease-in-out forwards; }
@keyframes afDeliver {
  0% { transform: translate(-90px, -90px) rotate(-8deg); opacity: 0; }
  15% { opacity: .85; }
  40% { transform: translate(0, -18px) rotate(4deg); }
  55% { transform: translate(8px, -26px) rotate(-2deg); }
  85% { opacity: .85; }
  100% { transform: translate(140px, -220px) rotate(10deg); opacity: 0; }
}

/* catch + crash effects (moved per frame by game.js) */
.af-fx { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 8; }
.af-fx > * { position: absolute; left: 0; top: 0; }
.af-fx-burst { width: clamp(120px, 15vw, 190px); translate: -50% -50%; animation: afStamp .26s cubic-bezier(.34, 1.56, .64, 1) both, afFade .35s ease-in .9s forwards; }
.af-fx-puff { width: clamp(110px, 13vw, 170px); translate: -50% -70%; animation: afStamp .3s cubic-bezier(.34, 1.56, .64, 1) both, afFade .6s ease-in 1s forwards; }
.af-fx-word { translate: -50% -50%; font-size: clamp(26px, 3.4vw, 40px); color: #7a2a1a; rotate: -6deg; white-space: nowrap; animation: afStamp .26s cubic-bezier(.34, 1.56, .64, 1) both, afFade .35s ease-in .9s forwards; }
.af-fx-wisp { width: clamp(40px, 5vw, 60px); opacity: .85; translate: -50% -50%; }
.af-fx-bit { width: 14px; height: 8px; border-radius: 1px; }
.af-fx-candy { width: clamp(30px, 3.6vw, 46px); translate: -50% -50%; }
@keyframes afStamp { from { transform: scale(0); } }
@keyframes afFade { to { opacity: 0; transform: scale(.6); } }

/* ---- answer bar: the target on tape + four paper cards ------------------ */
.af-answer-bar { grid-area: answers; z-index: 5; position: relative; display: flex; align-items: center; gap: 24px; padding: 12px max(16px, calc((100vw - 1100px) / 2)) 18px; background: var(--af-plum); }
.af-answer-bar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 14px; background: var(--af-plum); clip-path: polygon(0 60%, 8% 20%, 17% 70%, 26% 30%, 35% 80%, 46% 25%, 57% 70%, 66% 20%, 76% 65%, 86% 30%, 94% 70%, 100% 35%, 100% 100%, 0 100%); }
.af-target-readout { min-width: 190px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.af-target-readout > span { font: 700 10px/1 var(--am-readable-font); letter-spacing: .12em; color: #fff; opacity: .8; }
.af-target-readout strong { font-weight: normal; font-size: 26px; white-space: nowrap; color: var(--af-ink); padding: 12px 26px; background: url("assets/tape.webp") center / 100% 100% no-repeat; rotate: -1.5deg; }
.af-target-readout .af-solved { color: #c0392b; display: inline-block; animation: afStamp .32s cubic-bezier(.34, 1.56, .64, 1) both; }
.af-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; flex: 1; padding: 12px; background: #7d4a86 radial-gradient(#ffffff12 1px, transparent 1.4px) 0 0 / 8px 8px; border-radius: 18px 26px 20px 24px; box-shadow: 0 6px 0 #3d2650; }
.choice-btn { position: relative; min-height: 64px; border: 0; border-radius: 0; background: center / 100% 100% no-repeat; color: #3d1650; font: normal clamp(28px, 2.9vw, 38px) claire_handbold, sans-serif; text-shadow: 1px 1px 0 #ffffff90; cursor: pointer; transition: transform .12s; filter: drop-shadow(0 4px 0 #3d265099); }
.choice-btn:nth-child(1) { background-image: url("assets/card-pink.webp"); rotate: -1.5deg; }
.choice-btn:nth-child(2) { background-image: url("assets/card-orange.webp"); rotate: 1deg; }
.choice-btn:nth-child(3) { background-image: url("assets/card-teal.webp"); rotate: -.8deg; }
.choice-btn:nth-child(4) { background-image: url("assets/card-yellow.webp"); rotate: 1.4deg; }
.choice-btn kbd { position: absolute; left: 12px; top: 9px; color: #3d1650a0; font: 11px var(--am-readable-font); text-shadow: none; }
.choice-btn:hover:not(:disabled) { transform: translateY(-3px) rotate(-1deg); }
.choice-btn:active:not(:disabled) { transform: scale(.92); }
.choice-btn:disabled { cursor: default; }
.af-choices.af-empty .choice-btn { opacity: .45; }
.choice-btn.af-rejected { filter: grayscale(.8) brightness(1.05); opacity: .55; text-decoration: line-through; }
.choice-btn.af-right { animation: afRight .5s ease-out; z-index: 1; filter: drop-shadow(0 0 14px #ffe08a) drop-shadow(0 4px 0 #3d265099); }
@keyframes afRight { 0% { transform: scale(.92); } 40% { transform: scale(1.1) rotate(-4deg); } 70% { transform: scale(1.04) rotate(3deg); } }
.choice-btn.af-deal { animation: afDeal .42s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(var(--i) * .06s); }
@keyframes afDeal { from { transform: translateY(70%) rotate(8deg); opacity: 0; } }
#answer-display.af-wrong { animation: afShake .3s; }

/* feedback: a paper strip at the top of the field, never over the cards */
#screen-game .feedback { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 7; pointer-events: none; min-height: 0; height: auto; display: flex; gap: 8px; align-items: center; background: #fffaf0; border-radius: 6px 14px 8px 12px; padding: 6px 18px; box-shadow: 0 4px 0 #1a103044; }
#screen-game .feedback:not(.show) { visibility: hidden; }
#screen-game .feedback img { width: 24px; }
#screen-game .feedback span { font-size: 20px; color: var(--af-ink); }

.af-pause-panel { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; background: #2c2557e6; backdrop-filter: blur(6px); color: var(--af-cream); }
.af-pause-panel h2 { color: var(--af-gold); text-shadow: 3px 3px 0 #7a4380; font-size: 40px; margin: 0; }
.af-pause-panel[hidden] { display: none; }
.af-is-paused *, .af-is-paused { animation-play-state: paused !important; }
button:focus-visible { outline: 3px solid var(--af-gold); outline-offset: 3px; }

/* The feedback shortcut must not cover an answer. It remains available in menus. */
body:has(.af-playing) .am-fb-fab { display: none; }

@media (min-width: 900px) { .af-life-track { display: flex; } .af-heart-main, #lives-count { display: none; } }
@media (max-width: 650px) {
  .af-hud { min-height: 60px; gap: 12px; padding: 8px 12px; }
  .af-hud .score { font-size: 20px; min-width: 44px; }
  .af-level { display: none; }
  .af-answer-bar { padding: 8px 12px 16px; flex-direction: column; gap: 8px; }
  .af-target-readout { flex-direction: row; gap: 12px; }
  .af-target-readout strong { font-size: 23px; padding: 10px 22px; }
  .af-choices { width: 100%; gap: 8px; padding: 10px; }
  .choice-btn { min-height: 58px; font-size: 30px; }
  .choice-btn kbd { display: none; }
}
@media (max-height: 470px) and (orientation: landscape) {
  .af-hud { min-height: 46px; padding-block: 4px; }
  .af-pause-button { width: 38px; height: 38px; }
  .af-answer-bar { padding-block: 6px 10px; }
  .af-target-readout strong { padding: 8px 20px; font-size: 21px; }
  .choice-btn { min-height: 46px; }
  .af-obj-art { width: 40px; }
  .af-obj-label { font-size: 17px; min-width: 80px; padding: 8px 10px 7px 20px; }
  .af-sel .af-obj-inner::before { width: 56px; height: 56px; top: -8px; }
  .af-archer { width: 40px; } .af-archer:nth-child(2) { width: 46px; }
  #screen-start .af-hero { display: none; }
  .af-hero-end { height: 30vh; }
  .af-banner { width: min(260px, 38vw); }
  #screen-start, #screen-end { gap: 8px; padding-top: 62px; }
  .af-card { padding: 8px 14px; }
  .af-start-hint { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .af-twinkle, .af-boil, .af-pumpkin, .af-hero img, .af-archer img, .af-obj-sway, .af-sel .af-obj-inner::before, .af-bat img { animation: none !important; }
  .af-bat img + img { display: none; }
  .af-sky .af-bat { animation: none; left: auto; right: 8%; }
  .af-sky .af-bat + .af-bat { display: none; }
  .af-field.af-shake { animation: none; }
  .af-fx-bit, .af-fx-wisp { display: none; }
}

/* end-screen account widgets (shared/account-ui.js) sit on the dark sky */
#screen-end .account-widget { color: var(--af-cream); }
#screen-end .account-widget a { color: var(--af-gold); }
