/* Pescando regalos - a quiet cardboard winter night.
   The sum and the four answer cards are the only things that should catch
   the eye; everything else is flat, few colours, slow. Motion uses steps():
   things hold for a frame and jump, like a set animated by hand. */
#game.nv {
  --nv-night: #1c2f52;
  --nv-deep: #142443;
  --nv-reveal-size: min(27vh, 210px);
  --nv-cream: #fbf4e4;
  --nv-ink: #24324d;
  --nv-berry: #c33248;
  --nv-pine: #2f6b4f;
  /* paper grain: an image only, so it can stand in background-image lists */
  --nv-dots: radial-gradient(#ffffff0d 1px, transparent 1.4px);
  background: var(--nv-dots) 0 0 / 7px 7px, var(--nv-night);
  color: var(--nv-ink);
}
html, body { background: #1c2f52; }
#game .screen { z-index: 1; }

.nv-fisher, .nv-swatch svg, .nv-team-face svg {
  filter: drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff);
}

/* ---- behind the menus: the plain night and a few slow flakes ----------- */
.nv-world { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: url("assets/sky-calm.webp") center bottom / cover no-repeat; }
@media (orientation: landscape) { .nv-world { background-image: url("assets/sky-calm-wide.webp"); } }
.nv-playing .nv-world { display: none; }
.nv-snow { position: absolute; inset: 0; overflow: hidden; }
.nv-snow img { position: absolute; top: -20px; opacity: .55; }
@keyframes nvFall { to { translate: 0 105vh; rotate: 120deg; } }

.nv-notice { position: absolute; z-index: 30; top: 64px; left: 50%; translate: -50% 0; margin: 0; max-width: 90vw; text-align: center;
  font: 700 15px var(--am-readable-font); color: #fff; }

/* ---- shared pieces ------------------------------------------------------- */
.nv-card { background: var(--nv-cream); border-radius: 10px 16px 12px 14px; padding: 14px 18px; box-shadow: 0 5px 0 #0b142a40; }
.nv-title { margin: 0; font-size: clamp(30px, 6vw, 46px); font-weight: normal; color: var(--nv-cream); }
#game .big-button { min-width: 220px; }
.nv-chip { font: 19px claire_handbold, sans-serif; color: var(--nv-ink); background: #efe4c8; border: 0; border-radius: 999px; padding: 9px 20px; cursor: pointer; box-shadow: 0 3px 0 #0b142a2e; }
.nv-chip:active { translate: 0 2px; box-shadow: 0 1px 0 #0b142a2e; }
.nv-chip-small { font-size: 16px; padding: 6px 14px; background: var(--nv-cream); }
.nv-link { background: none; border: 0; padding: 4px; font: 600 15px var(--am-readable-font); color: #dfe7f2; text-decoration: underline; text-underline-offset: 4px; cursor: pointer;; text-shadow: 0 0 4px #1c2f52, 0 1px 2px #1c2f52; }
#game.nv button:focus-visible, #game.nv input:focus-visible, #game.nv summary:focus-visible { outline: 3px solid #ffd77a; outline-offset: 3px; }

/* ---- start and entry ---------------------------------- */
.nv-start, .nv-setup, .nv-lobby, .nv-results { gap: 16px; justify-content: safe center; padding-top: 70px; }
.nv-step { width: min(440px, 92vw); display: grid; gap: 10px; }
.nv-step-title { font-size: 21px; color: var(--nv-ink); }
#nickname, #code { min-height: 46px; border: 2px solid #d8caa9; border-radius: 10px; padding: 6px 12px; font: 600 19px var(--am-readable-font); color: var(--nv-ink); background: #fff; user-select: text; -webkit-user-select: text; }
.nv-me { display: flex; align-items: center; justify-content: center; gap: 16px; }
.nv-preview { position: relative; width: 70px; flex: none; aspect-ratio: 50 / 72; margin: 0 40px 0 6px; }
.nv-preview .nv-fisher { position: absolute; inset: 0; width: 100%; }
.nv-picker { display: grid; gap: 6px; }
.nv-pick-row { display: flex; gap: 6px; }
.nv-swatch { width: 48px; height: 48px; padding: 5px; border: 0; border-radius: 12px; background: #efe4c8; cursor: pointer; }
.nv-swatch svg, .nv-swatch img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nv-swatch[aria-checked="true"] { background: #fff; box-shadow: 0 0 0 3px var(--nv-berry); }
/* The level picker: Truco o Mates' cardboard cards, in the river's colours
   (the same cards as the answers), straight on the sky. */
.nv-start .nv-level-step { width: min(700px, 94vw); }
.nv-level-step .nv-step-title { text-align: center; color: var(--nv-cream); text-shadow: 0 1px 3px #1c2f52; }
.nv-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.nv-level { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 92px; padding: 12px 14px; border: 0; cursor: pointer; color: #fff; text-shadow: 1px 1px 0 #00000030;
  background: center / 100% 100% no-repeat; filter: drop-shadow(0 5px 0 #0b142a66); transition: transform .12s, filter .12s; }
.nv-level[data-operation="suma"] { background-image: url("assets/card-red.webp"); rotate: -1.5deg; }
.nv-level[data-operation="resta"] { background-image: url("assets/card-green.webp"); rotate: 1deg; }
.nv-level[data-operation="multiplicacion"] { background-image: url("assets/card-gold.webp"); rotate: -.8deg; color: var(--nv-ink); text-shadow: 1px 1px 0 #ffffff90; }
.nv-level[data-operation="division"] { background-image: url("assets/card-blue.webp"); rotate: 1.4deg; color: var(--nv-ink); text-shadow: 1px 1px 0 #ffffff90; }
.nv-level:hover { transform: translateY(-2px); }
.nv-level:active { transform: translateY(2px); }
.nv-level[aria-checked="true"] { transform: scale(1.07); filter: drop-shadow(0 0 0 #ffd77a) drop-shadow(0 0 3px #ffd77a) drop-shadow(0 0 3px #ffd77a) drop-shadow(0 5px 0 #0b142a66); }
.nv-levels:has([aria-checked="true"]) .nv-level:not([aria-checked="true"]) { opacity: .72; }
.nv-level-example { font: 23px/1.1 claire_handbold, sans-serif; white-space: nowrap; }
.nv-level-name { font: 700 13px/1.2 var(--am-readable-font); overflow-wrap: anywhere; }
@media (max-width: 620px) and (orientation: portrait), (max-width: 480px) {
  .nv-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .nv-level { min-height: 76px; }
}
@media (prefers-reduced-motion: reduce) { .nv-level { transition: none; } }
.nv-solo-avatar { text-align: center; color: var(--nv-cream); cursor: pointer; }
.nv-solo-avatar .nv-card { margin-top: 8px; }
.nv-modes button:disabled { cursor: default; opacity: .6; }
.nv-modes, .nv-copy-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
#multiplayer #join-fields { width: 100%; }
#multiplayer .big-button { justify-self: center; margin: 0; }
#code { text-transform: uppercase; letter-spacing: .2em; }

/* ---- lobby -------------------------------------------------------------- */
.nv-lobby-grid { width: min(760px, 92vw); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.nv-lobby-grid:has(#room-invite[hidden]) { grid-template-columns: min(440px, 100%); justify-content: center; }
.nv-lobby-card { display: grid; justify-items: center; gap: 12px; min-width: 0; }
#room-qr { width: 144px; height: 144px; image-rendering: pixelated; }
#copy-status:empty { display: none; }
@media (max-width: 650px) {
  .nv-lobby-grid { grid-template-columns: min(440px, 100%); justify-content: center; }
  #room-invite { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  #room-invite .nv-copy-actions, #copy-status { grid-column: 1 / -1; }
  #room-qr { width: 104px; height: 104px; }
  .nv-copy-actions .nv-chip { font-size: 16px; padding: 7px 12px; }
}
.nv-room-code { font-size: clamp(40px, 10vw, 58px); letter-spacing: .18em; color: var(--nv-berry); user-select: all; -webkit-user-select: all; }
.nv-roster { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.nv-roster li, .nv-team li { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; background: #efe4c8; font: 600 15px var(--am-readable-font); }
.nv-team-face { display: inline-block; width: 28px; height: 34px; }
.nv-team-face svg { width: 100%; height: 100%; }
.nv-waiting { margin: 0; font: 15px var(--am-readable-font); color: var(--nv-pine); }
.nv-coop { margin: 0; max-width: 340px; text-align: center; font: 700 15px/1.35 var(--am-readable-font); color: var(--nv-berry); }

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

#screen-game .nv-hud { grid-area: hud; position: relative; z-index: 5; margin: 0; min-height: 58px; display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 16px;
  padding: 8px max(14px, calc((100vw - 1180px) / 2)); color: #fff; }
.nv-round-btn { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--nv-cream); display: grid; place-items: center; padding: 0; cursor: pointer; }
.nv-round-btn svg { width: 20px; height: 20px; stroke: var(--nv-ink); stroke-width: 3; fill: none; stroke-linecap: round; }
.nv-progress { display: flex; align-items: center; gap: 6px; margin-right: auto; font-size: 21px; }
.nv-progress img { width: 26px; }
.nv-score { font-size: 21px; }
.nv-score::before { content: "⭐ "; }
#screen-game .hud-time { background: var(--nv-cream); border: 0; color: var(--nv-ink); }

#screen-game .stage-area { grid-area: stage; position: relative; display: block; min-height: 0; width: 100%; }
.nv-field { position: absolute; inset: 0; overflow: hidden; }
/* the sky, behind the HUD down to the river's far bank (height from
   game.js): plain torn papers and exactly three things - a cloud, a star
   and the moon, each nodding on twelves. It drifts slower than the river
   during the opening pan. */
.nv-sky { position: absolute; left: -16%; right: -16%; top: 0; height: var(--sky-h, 40%); z-index: 0; pointer-events: none;
  background: url("assets/sky-bands.webp") center bottom / cover no-repeat; }
.nv-sky img { position: absolute; filter: drop-shadow(0 4px 3px #0b142a55); animation: nvNod 3s steps(1) infinite; }
.nv-cloud { left: 20%; top: 32%; width: clamp(100px, 13vw, 210px); }
.nv-star { left: 49%; top: 26%; width: clamp(20px, 2.2vw, 34px); animation-delay: -1s !important; }
.nv-moon { right: 21%; top: 22%; width: clamp(64px, 8vw, 128px); animation-delay: -2s !important; }
@keyframes nvNod { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -3px; rotate: 2deg; } }
.nv-field { --river-top: 30%; --wave-gap: 12%; --wh: clamp(40px, 6vh, 60px); }
.nv-cam { position: absolute; inset: 0; z-index: 1; }

/* The river: five plain torn-paper strips with a soft undulating top, back
   to front (Gemini; made seamless by Assets/.../scripts/soft-tile.py), each
   filled below with its own paper colour, each sliding slowly left to right
   while it bobs, on twelves. Plain on purpose: the presents stand out. */
.nv-wave { position: absolute; left: calc(-1 * var(--fw, 100vw) - var(--tw) - 20px); right: -20px; top: calc(var(--river-top) + var(--w) * var(--wave-gap)); bottom: 0;
  z-index: calc(10 + 2 * var(--w)); pointer-events: none; filter: drop-shadow(0 -2px 3px #0b142a40);
  background: var(--img) 0 0 / auto var(--wh) repeat-x, linear-gradient(var(--c), var(--c)) 0 calc(var(--wh) - 2px) / 100% 100% no-repeat;
  animation: nvWaveMove 8s steps(96) infinite; }
.nv-wave[style*="--w:0"] { --img: url("assets/wave-0.webp"); --c: #a2c9c1; --tw: calc(var(--wh) * 1508 / 160); animation-duration: 24s; animation-timing-function: steps(288); animation-delay: -3s; }
.nv-wave[style*="--w:1"] { --img: url("assets/wave-1.webp"); --c: #72adac; --tw: calc(var(--wh) * 1293 / 160); animation-duration: 21s; animation-timing-function: steps(252); animation-delay: -9s; }
.nv-wave[style*="--w:2"] { --img: url("assets/wave-2.webp"); --c: #42818d; --tw: calc(var(--wh) * 1505 / 160); animation-duration: 25s; animation-timing-function: steps(300); animation-delay: -2s; }
.nv-wave[style*="--w:3"] { --img: url("assets/wave-3.webp"); --c: #316171; --tw: calc(var(--wh) * 1614 / 160); animation-duration: 27s; animation-timing-function: steps(324); animation-delay: -14s; }
.nv-wave[style*="--w:4"] { --img: url("assets/wave-4.webp"); --c: #2d3d60; --tw: calc(var(--wh) * 1714 / 160); animation-duration: 29s; animation-timing-function: steps(348); animation-delay: -6s; }
@keyframes nvWaveMove {
  0% { transform: translate(0, 0); }
  25% { transform: translate(calc(var(--tw) * .25), -5px); }
  50% { transform: translate(calc(var(--tw) * .5), 0); }
  75% { transform: translate(calc(var(--tw) * .75), -5px); }
  100% { transform: translate(var(--tw), 0); }
}

/* upstream, one screen to the left: the elves' camp on the near bank - a
   snow ledge, their mountain of presents and the two elves standing on it,
   all one group so they stay on the snow, in front of the river. */
.nv-upstream { position: absolute; top: 0; bottom: 0; left: -100%; width: 100%; pointer-events: none; } /* no z-index: its pieces layer with the waves */
.nv-camp { position: absolute; left: 1%; bottom: -3%; width: clamp(340px, 66%, 760px); aspect-ratio: 640 / 189; z-index: 21; }
.nv-ledge { position: absolute; inset: 0; width: 100%; height: 100%; }
.nv-pile { position: absolute; left: 3%; bottom: 46%; width: 30%; }
.nv-elf { position: absolute; bottom: 48%; width: 22%; aspect-ratio: 325 / 440; }
.nv-elf img { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
#elf-a { left: 33%; }
#elf-b { left: 57%; }
.nv-thrown { position: absolute; left: 0; top: 0; }
.nv-thrown img { display: block; width: clamp(62px, 7vw, 100px); filter: drop-shadow(0 4px 3px #0b142a66); }
.nv-thrown.nv-landed > * { animation: nvDrift 4s steps(48) forwards; }
@keyframes nvDrift { 0% { translate: 0 0; } 25% { translate: 40px -3px; } 50% { translate: 80px 0; } 75% { translate: 120px -3px; } 100% { translate: 160px 0; } }
.nv-upstream .nv-splash { z-index: 22; }

/* jetty, fisher, sack: plain, in front of everything but the line */
.nv-dock { position: absolute; aspect-ratio: 420 / 245; }
.nv-dock-play { left: 1%; bottom: 0; width: clamp(140px, 20vw, 250px); z-index: 30; pointer-events: none; }
.nv-jetty { position: absolute; left: 0; bottom: 0; width: 100%; }
.nv-fisher { position: absolute; left: 22%; bottom: 74%; width: 30%; aspect-ratio: 50 / 72; transform-origin: 50% 100%; }
.nv-fisher-body { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.nv-rod { position: absolute; z-index: 2; width: 115%; pointer-events: none; }
.nv-fisher.stressed .nv-fisher-body { rotate: -6deg; }
.nv-sack { position: absolute; left: 60%; bottom: 74%; width: 24%; transform-origin: 50% 100%; scale: var(--fill, 1); }
.nv-sack img { display: block; width: 100%; }
.nv-sack.nv-plop img { animation: nvPlop .4s steps(4); }
@keyframes nvPlop { 33% { scale: 1.15 .85; } 66% { scale: .95 1.06; } }

.nv-crew { position: absolute; left: 3%; bottom: calc(100% - var(--river-top) - 5px); z-index: 10;
  display: flex; align-items: flex-end; gap: clamp(3px, 1vw, 12px); pointer-events: none; }
.nv-crew[data-more]:not([data-more=""])::after { content: attr(data-more); align-self: center; font: 700 11px var(--am-readable-font);
  color: var(--nv-ink); background: var(--nv-cream); border-radius: 999px; padding: 2px 6px; }
.nv-mate { position: relative; width: clamp(58px, 6.6vw, 86px); aspect-ratio: 1.35; }
.nv-mate .nv-jetty { bottom: 6%; }
.nv-mate .nv-fisher { left: 13%; bottom: 28%; width: 40%; }
.nv-mate .nv-sack { left: 56%; bottom: 24%; width: 27%; }
.nv-mate-name { position: absolute; inset: auto 0 -1px; display: flex; gap: 3px; justify-content: center; align-items: baseline;
  white-space: nowrap; font: 700 clamp(9px, 1vw, 11px) var(--am-readable-font); color: var(--nv-ink);
  background: var(--nv-cream); border-radius: 999px; padding: 1px 4px; }
.nv-mate-name b { overflow: hidden; text-overflow: ellipsis; }
.nv-mate-parcel { position: absolute; left: 49%; bottom: 13%; width: 26%; opacity: 0; }
.nv-mate-catch .nv-mate-parcel { animation: nvMateCatch .75s steps(9) both; }
.nv-mate-catch .nv-fisher { animation: nvMateReel .55s steps(5); }
.nv-mate-catch .nv-sack img { animation: nvPlop .4s steps(4) .58s; }
@keyframes nvMateCatch {
  0% { opacity: 1; transform: translate(65%, 30%) scale(.7); }
  50% { opacity: 1; transform: translate(-65%, -155%) rotate(-15deg); }
  88% { opacity: 1; transform: translate(30%, -50%) scale(.65); }
  100% { opacity: 0; transform: translate(30%, 0) scale(.35); }
}
@keyframes nvMateReel { 45% { rotate: -14deg; } }
.nv-class-view .nv-crew { left: 2%; justify-content: center; flex-wrap: wrap; }
.nv-class-view .nv-mate { width: clamp(80px, 10vw, 120px); }

/* presents: a big tag with the sum over a parcel cut to the toy's shape */
.gifts { position: absolute; inset: 0; } /* no z-index: tiles interleave with the waves */
.gift { position: absolute; left: 0; top: 0; display: block; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; font: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; will-change: transform; }
.nv-gift-float { position: relative; display: flex; flex-direction: column; align-items: center; animation: nvGiftBob 1.6s steps(1) infinite; }
@keyframes nvGiftBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
/* The tag image is cut in three (border-image): the string + pointed end
   (the first 222 of its 640px) and the torn right edge (the last 50) keep their size,
   only the plain paper between them stretches. Stretching the whole image
   widened the string with a long sum until the digits sat on it. Every
   size is in em, so the tag scales with its font. */
.nv-tag { position: relative; z-index: 1; display: block; margin-bottom: -8px; min-width: clamp(150px, 17vw, 230px); white-space: nowrap; line-height: 1; text-align: center;
  padding: .5em .65em .42em 1.5em; font-size: clamp(36px, 4.2vw, 56px); color: var(--nv-ink);
  border: 0 solid transparent; border-image: url("assets/tag.webp") 0 50 0 222 fill / 0 .3em 0 1.32em stretch; }
.wrapped-silhouette { position: relative; display: grid; place-items: center; width: clamp(84px, 10vw, 140px); height: clamp(76px, 12vh, 128px); }
.wrapped-silhouette .nv-wrap { width: 100%; height: 100%; object-fit: fill; mask-size: contain; mask-repeat: no-repeat; mask-position: center; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; }
.wrapped-silhouette .gift-bow { position: absolute; left: 25%; top: 8%; width: 50%; }
.gift:not(.nv-sel) .nv-tag { opacity: .8; }
.gift.nv-sel .nv-tag { color: var(--nv-berry); scale: 1.08; }
.nv-wobble { animation: nvShake .4s steps(4) !important; }
@keyframes nvShake { 25% { rotate: -6deg; } 50% { rotate: 6deg; } 75% { rotate: -3deg; } }

.fishing-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; overflow: visible; fill: none; stroke: #f4ead2; stroke-width: 2; stroke-linecap: round; }
.fishing-line circle { fill: #f4ead2; stroke: var(--nv-ink); stroke-width: 1.5; }
.nv-fx { position: absolute; inset: 0; z-index: 41; pointer-events: none; }
.nv-flight { position: absolute; left: 0; top: 0; }
.nv-caught-toy { width: var(--nv-reveal-size); aspect-ratio: 1; object-fit: contain; }
.nv-splash { position: absolute; width: clamp(70px, 8vw, 110px); translate: -50% -70%; animation: nvSplash .7s steps(5) forwards; }
@keyframes nvSplash { 0% { scale: .3; } 60% { scale: 1; opacity: 1; } 100% { scale: 1; opacity: 0; } }
.nv-starpop { position: absolute; translate: -50% -50%; font-size: 24px; color: #fff; white-space: nowrap; animation: nvStar 1s steps(8) forwards; }
@keyframes nvStar { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-50px); } }

/* feedback: a small note at the top of the field, over the plain sky */
#screen-game .nv-feedback { position: absolute; z-index: 50; left: 50%; top: 8px; translate: -50% 0; min-height: 0; height: auto; display: flex; align-items: center; gap: 8px;
  padding: 5px 16px 5px 10px; background: var(--nv-cream); border-radius: 10px; pointer-events: none; white-space: nowrap; opacity: 1; transform: none; }
#screen-game .nv-feedback:not(.show) { visibility: hidden; }
#screen-game .nv-feedback.show { animation: nvToast 1.7s steps(1) both; }
@keyframes nvToast { 0%, 90% { opacity: 1; } 100% { opacity: 0; } }
#screen-game .nv-feedback img { width: 22px; }
#screen-game .nv-feedback span { font-size: 19px; color: var(--nv-ink); }

/* ---- answers: torn paper tray, the sum on tape, four paper cards ------- */
.nv-answers { grid-area: answers; position: relative; z-index: 6; display: flex; align-items: center; gap: 22px; padding: 16px max(16px, calc((100vw - 1100px) / 2)) 16px;
  background: var(--nv-dots) 0 0 / 7px 7px, var(--nv-deep); }
.nv-answers::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 14px; background: var(--nv-deep);
  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%); }
.nv-target { min-width: 260px; text-align: center; font-weight: normal; font-size: clamp(42px, 5vw, 68px); white-space: nowrap; color: var(--nv-ink);
  padding: 14px 30px; background: url("assets/tape.webp") center / 100% 100% no-repeat; rotate: -1.5deg; }
.nv-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; flex: 1; padding: 12px; border-radius: 18px 26px 20px 24px;
  background: var(--nv-dots) 0 0 / 8px 8px, #24395f; box-shadow: 0 6px 0 #0b142a; }
#game .choice-btn { position: relative; min-height: 88px; border: 0; padding: 0; background: center / 100% 100% no-repeat; color: #fff; cursor: pointer;
  font: clamp(44px, 4.6vw, 62px) claire_handbold, sans-serif; text-shadow: 2px 2px 0 #0b142a40; filter: drop-shadow(0 4px 0 #0b142a99); transition: transform .12s; }
#game .choice-btn:nth-child(1) { background-image: url("assets/card-red.webp"); rotate: -1.5deg; }
#game .choice-btn:nth-child(2) { background-image: url("assets/card-green.webp"); rotate: 1deg; }
#game .choice-btn:nth-child(3) { background-image: url("assets/card-gold.webp"); rotate: -.8deg; color: var(--nv-ink); text-shadow: 1px 1px 0 #ffffff90; }
#game .choice-btn:nth-child(4) { background-image: url("assets/card-blue.webp"); rotate: 1.4deg; color: var(--nv-ink); text-shadow: 1px 1px 0 #ffffff90; }
.choice-btn kbd { position: absolute; left: 14px; top: 9px; font: 11px var(--am-readable-font); opacity: .6; text-shadow: none; }
.choice-btn:hover:not(:disabled) { transform: translateY(-3px); }
.choice-btn:active:not(:disabled) { transform: scale(.94); }
.choice-btn:disabled { cursor: default; }
.nv-choices.nv-empty .choice-btn { opacity: .45; }
.choice-btn.nv-rejected { opacity: .35; filter: grayscale(.9); }

.nv-pause { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; background: #142443e8; }
.nv-pause[hidden] { display: none; }
.nv-pause h2 { margin: 0; font-size: 40px; font-weight: normal; color: var(--nv-cream); }
.nv-is-paused, .nv-is-paused * { animation-play-state: paused !important; }

/* ---- what we caught: a show reel, then the shelf -------------------------- */
.nv-reel { position: relative; width: min(560px, 92vw); height: min(46vh, 380px); display: grid; place-items: center; }
.nv-reel[hidden] { display: none; }
.nv-reel-item { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: nvReelIn .4s steps(4) both; }
@keyframes nvReelIn { from { scale: .3; opacity: 0; } 70% { scale: 1.05; opacity: 1; } }
.nv-reel-art { position: relative; width: var(--nv-reveal-size); aspect-ratio: 1; display: grid; place-items: center; }
.nv-reel-art > * { grid-area: 1 / 1; }
.nv-reel-art .wrapped-silhouette { width: 78%; height: 78%; }
.nv-reel-art .nv-toy { width: 100%; height: 100%; object-fit: contain; opacity: 0; filter: drop-shadow(0 8px 6px #0b142a66); }
:is(.nv-reel-item, .nv-catch-dialog).is-open .wrapped-silhouette { animation: nvTear .35s steps(3) forwards; }
:is(.nv-reel-item, .nv-catch-dialog).is-open .nv-toy { animation: nvPop .45s steps(4) .15s forwards; }
@keyframes nvTear { to { scale: 1.3; rotate: 12deg; opacity: 0; } }
@keyframes nvPop { 0% { opacity: 1; scale: .3; } 70% { opacity: 1; scale: 1.08; } 100% { opacity: 1; scale: 1; } }
.nv-reel-caption { margin: 0; display: flex; align-items: center; gap: 14px; opacity: 0; color: var(--nv-cream); font-size: clamp(28px, 4.5vw, 44px); }
.nv-reel-caption strong { font-weight: normal; color: #fff; background: var(--nv-berry); border-radius: 999px; padding: 2px 18px; }
.nv-reel-item.is-open .nv-reel-caption { opacity: 1; transition: opacity .2s steps(2) .4s; }
.nv-reel-caption.is-leaving { opacity: 0 !important; transition: none !important; }

.nv-catch-dialog {
  border: 2px solid #e0bd89; border-radius: 20px; background: #253653; color: var(--nv-cream);
  width: min(92vw, 380px); max-height: 94dvh; padding: clamp(8px, 3vh, 24px);
  box-shadow: 0 12px 40px #101a2e80; text-align: center;
}
.nv-catch-dialog[open] { display: grid; justify-items: center; gap: clamp(5px, 2vh, 18px); animation: nvReelIn .3s steps(4) both; }
.nv-catch-dialog::backdrop { background: #14213a88; }
.nv-catch-dialog .nv-tag { margin: 0; min-width: 0; max-width: 100%; font-size: clamp(24px, 7vw, 45px); } /* game.js fitTag() shrinks a long one */
.nv-catch-dialog .big-button { margin: 0; font-size: clamp(21px, 5vw, 32px); }

/* the shelf: rows of cardboard planks the toys land on, small */
.nv-shelf { --row: 100px; list-style: none; margin: 0; padding: 0 10px; width: min(660px, 94vw); display: flex; flex-wrap: wrap; justify-content: center;
  background: url("assets/shelf-row.webp") 0 0 / 100% var(--row) repeat-y; }
.nv-shelf-item { position: relative; width: 80px; height: var(--row); display: flex; align-items: flex-end; justify-content: center; padding-bottom: calc(var(--row) * 40 / 260); opacity: 0; }
.nv-shelf-item img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 3px #0b142a55); }
.nv-shelf-item.is-in { opacity: 1; animation: nvShelf .3s steps(3); }
@keyframes nvShelf { 50% { translate: 0 -6px; } }
.nv-shelf-count { position: absolute; right: 0; top: 10px; min-width: 28px; padding: 0 6px; border-radius: 999px; background: var(--nv-berry); color: #fff; font-size: 16px; text-align: center; }
.nv-shelf.nv-many { --row: 82px; }
.nv-shelf.nv-many .nv-shelf-item { width: 62px; }
.nv-shelf.nv-many .nv-shelf-item img { width: 50px; height: 50px; }
.nv-results .results { width: min(440px, 92vw); text-align: center; }
.nv-results .results p { margin: 4px 0; font-size: 21px; max-width: none; color: var(--nv-ink); }
.nv-results .results strong { background: var(--nv-berry); box-shadow: none; }
#game .nv-results #results-time { font: 15px var(--am-readable-font); color: var(--nv-pine); }
#personal { font: 600 16px var(--am-readable-font) !important; }
.nv-team { list-style: none; margin: 8px 0 4px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.nv-team li span:last-child { opacity: .75; }

/* ---- smaller screens ------------------------------------------------------ */
@media (max-width: 650px) {
  #screen-game .nv-hud { min-height: 54px; gap: 12px; padding: 7px 10px; }
  .nv-answers { flex-direction: column; gap: 10px; padding: 12px 10px; }
  .nv-target { padding: 10px 26px; }
  .nv-choices { width: 100%; gap: 8px; padding: 9px; }
  #game .choice-btn { min-height: 74px; font-size: 44px; }
  .nv-target { font-size: 44px; }
  .choice-btn kbd { display: none; }
  .nv-tag { font-size: 34px; min-width: 132px; }
  .wrapped-silhouette { width: 80px; height: 72px; }
  .nv-camp { width: 96%; }
  .nv-field { --river-top: 26%; --wave-gap: 12.5%; --wh: clamp(34px, 5vh, 46px); }
  .nv-mate-name span { display: none; }
  .nv-results { padding-bottom: calc(76px + var(--am-consent-h, 0px)); } /* clear of the site's feedback bubble */
}
@media (max-height: 520px) and (orientation: landscape) {
  .nv-start, .nv-setup, .nv-lobby, .nv-results { padding-top: 58px; gap: 10px; }
  .nv-start { padding-top: 12px; gap: 8px; }
  .nv-start .nv-card { padding-block: 8px; }
  .nv-level { min-height: 70px; padding-block: 8px; }
  #game .nv-modes .big-button { margin: 0; padding-block: 6px; }
  #screen-game .nv-hud { min-height: 44px; padding-block: 3px; }
  .nv-answers { padding-block: 8px; }
  .nv-target { font-size: 28px; padding: 4px 16px; }
  #game .choice-btn { min-height: 48px; }
  .nv-reel { height: 52vh; }
}
@media (prefers-reduced-motion: reduce) {
  .nv-catch-dialog[open], .nv-catch-dialog.is-open .nv-reel-art > *,
  .nv-mate-catch .nv-fisher, .nv-mate-catch .nv-sack img,
  .nv-wave, .nv-gift-float, .nv-thrown, .nv-sky img, .nv-shelf-item { animation: none !important; }
  .nv-mate-catch .nv-mate-parcel { animation: none; }
  .nv-catch-dialog.is-open .wrapped-silhouette { opacity: 0; }
  .nv-catch-dialog.is-open .nv-toy { opacity: 1; }
}
