/* THE 404 PAGE (pages/404.astro): one battle mat filling the screen under the header, 404 in the battle cry and a line over
   it, two miniatures fighting on its clear stretch (--nf-l .. --nf-r of its width), their hit points over them. Tokens only. */
.nf { position: relative; box-sizing: border-box; min-height: calc(var(--g-screen-h) - var(--g-head-h)); display: flex; flex-direction: column; align-items: center; overflow: hidden;
  padding: var(--g-4) var(--g-5) 0; background: var(--g-black); }
.nf::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(var(--g-on-picture-fill), transparent 45%); pointer-events: none; }
/* at the start, small and high (Maayan, 2026-11-21: "404 aligned to start smaller and the text below it aligned to left ... moving up so the arena wont override it") */
/* in the middle, the fighters' small cards in the two top corners (Maayan, 2026-11-21: "left top corner and right top corners
   are mini cards. text in middle + sound button"), the volume under it */
.nf__words { pointer-events: none; z-index: 2; align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: var(--g-1); text-align: center; padding-inline: calc(var(--nf-mini) + var(--g-2)); }
.nf { --nf-mini: calc(297px * .56 + var(--g-8)); }
.nf .nf__cry .g-battlecry, .nf .nf__cry.g-battlecry, .nf .nf__cry :is(h1, .g-tb__t) { font-size: clamp(3rem, 11vw, 6.5rem); line-height: 1; text-align: center; }
.nf__words :is(a, button) { pointer-events: auto; }   /* the words over the scene: a swipe through them moves the scene */
.nf__line { margin: 0; max-width: 30ch; font: var(--g-t-title2) / 1.3 var(--g-font-display); color: var(--g-text); text-shadow: 0 2px 10px rgb(0 0 0 / .8); }
/* the volume, under the words in the middle */
/* THE VOLUME LOWER RIGHT, PAUSE LOWER LEFT (Maayan, 2026-11-24), over the scene's corners (a phone: above its tab bar) */
.nf__sound, .nf__pause { position: absolute; z-index: 3; bottom: var(--g-4); display: inline-flex; }
.nf__sound { right: var(--g-4); } .nf__pause { left: var(--g-4); }
@media (max-width: 899px) { .nf__sound, .nf__pause { bottom: calc(var(--g-tabbar) + var(--g-3)); } }
.nf.is-paused *, .nf.is-paused *::before, .nf.is-paused *::after { animation-play-state: paused !important; }   /* paused: everything still */
/* THE SCENE (Maayan, 2026-11-20: "can scroll left right to move in scene, also in phone"): wider than a phone's screen,
   scrolled sideways (a swipe; a drag or the wheel with a mouse: nf-battle.js), following the fight. On it the engine's grid
   drawn (Maayan, 2026-11-21: "an actual grid and not the bg right now"): 8 by 4 squares on a table seen at a slant, each
   fighter standing on its square (nf-battle.js places it by the square's place on the screen), as tall as it truly is */
.nf__scene { position: absolute; z-index: 0; inset: 0; direction: ltr; overflow-x: auto; overflow-y: hidden; touch-action: none; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; }
.nf__scene::-webkit-scrollbar { display: none; }
.nf__scene.is-dragging { cursor: grabbing; }
.nf__scene.is-zoomed { overflow-y: auto; }   /* pinched in: up and down too (nf-battle.js zoom) */
.nf__scene.is-pinching .nf__fighter { transition: opacity var(--g-slow) var(--g-ease); }   /* while pinching: the fighters keep to their squares at once */
.nf__world { position: relative; height: 100%; width: 100%; background: radial-gradient(120% 70% at 50% 100%, #2c2418, #120f0b 70%); }
/* 8 by 8, a chessboard's tiles (Maayan, 2026-11-21: "make it look more like chess with tiles and not rows (same colors) also
   8x8"): the light ones and the dark ones of its own greens, by turns, no lines between them */
.nf__board { position: absolute; left: 6%; right: 6%; bottom: 5%; height: 74%; perspective: 1100px; perspective-origin: 50% 0; }
.nf__plane { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(var(--nf-n, 8), 1fr); grid-template-rows: repeat(var(--nf-n, 8), 1fr); transform: rotateX(48deg); transform-origin: 50% 100%;
  background: #3d5a3a; border: 3px solid #6b4e2e; box-shadow: 0 30px 60px rgb(0 0 0 / .6); }
.nf__plane > i.is-dark { background: #2f4a2d; }
/* a fighter: its base at its square's middle (left, bottom, width: nf-battle.js), the front row over the back ones */
.nf__fighter { position: absolute; left: 0; bottom: 0; width: 160px; display: flex; flex-direction: column; align-items: center; transition: left 600ms var(--g-ease), bottom 600ms var(--g-ease), width 600ms var(--g-ease), opacity var(--g-slow) var(--g-ease), translate var(--g-slow) var(--g-ease), filter var(--g-mid) var(--g-ease); }
/* under a condition: hidden faded, held grey */
.nf__fighter.is-hidden .nf__fig > :not(.gm2-mini-halo) { filter: opacity(.4); }   /* hidden: the miniature alone faded, never its ring, name or bar (Maayan, 2026-11-27) */ .nf__fighter.is-held .nf__fig { filter: grayscale(1) brightness(.8); }
.nf__fighter.is-gone { opacity: 0; }
.nf__fighter.is-placing { transition: none; }   /* put on its square at once, before it fades in (nf-battle.js arrive) */
/* leaving or coming in: it only fades (Maayan, 2026-11-21: "should only fade out") */
.nf__fig { position: relative; width: calc(100% * var(--nf-k, 1)); aspect-ratio: 1; margin-inline: auto; margin-bottom: calc(-12% * var(--nf-k, 1)); }   /* its true height (nf-battle.js --nf-k); its base down on the square */   /* its true height (nf-battle.js --nf-k) */
/* its hit points over it: its name, a bar that runs down as it is hit */
.nf__hp { display: flex; flex-direction: column; align-items: center; gap: var(--g-1); width: 56%; }   /* its square's width (a fighter 1.6 squares wide, nf-battle.js put), its bar never past it (Maayan, 2026-11-23) */
.nf__life { display: flex; align-items: center; gap: var(--g-2); width: 100%; }   /* its bar, its number at the bar's end */
.nf__hpn { flex: none; min-width: 2ch; font: var(--g-w-bold) var(--g-t-sub) var(--g-font-display); color: var(--g-text); text-shadow: 0 1px 6px rgb(0 0 0 / .9); }
.nf__name { max-width: 300%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--g-w-bold) var(--g-t-sub) var(--g-font-display); color: var(--g-text); text-shadow: 0 1px 6px rgb(0 0 0 / .9); }
.nf__bar { --nf-good: #3fa047; --nf-mid: #e08a1e; --nf-low: #c8281b; position: relative; flex: 1; width: 100%; height: var(--g-sheet-bar); border: var(--g-hair) solid rgb(0 0 0 / .6); border-radius: var(--g-sheet-bar); background: rgb(0 0 0 / .55); overflow: hidden; }
.nf__bar > i { position: absolute; inset: 0 auto 0 0; width: var(--nf-hp, 100%); background: var(--nf-good); transition: width var(--g-mid) var(--g-ease), background var(--g-mid) var(--g-ease); }
/* green, orange, red (Maayan, 2026-11-20) */
.nf__bar[data-hp="mid"] > i { background: var(--nf-mid); } .nf__bar[data-hp="low"] > i { background: var(--nf-low); }
/* a blow's number over it, rising: -N red, a potion's +N green, a miss pale */
/* every one the same (Maayan, 2026-11-21: "some texts appear behind miniature and smaller font - make all things same way
   above like when getting exp"): one size, one place: over its name, in front of everything; one shown while another still is:
   a line higher (nf-battle.js --nf-row) */
.nf__hit { position: absolute; z-index: 5; bottom: calc(100% + 4px + var(--nf-row, 0) * 1.2em); left: 50%; translate: -50% 0; font: var(--g-w-bold) var(--g-t-title) var(--g-font-display); color: var(--g-text); text-shadow: 0 2px 8px rgb(0 0 0 / .9); opacity: 0; pointer-events: none; }
/* it shows up, stays a little while drifting up very little, then goes (Maayan, 2026-11-21) */
.nf__hit.is-on { animation: nf-hit 2000ms linear forwards; }

.nf__hit { white-space: nowrap; } .nf__hit[data-kind="hurt"] { color: #ff3b2f; } .nf__hit[data-kind="heal"] { color: #4fd35c; }
/* a move's name, a condition, gold, EXP: their colours only; EXP golden, shining (its figure's golden sparkle: nf-battle.js) */
.nf__hit[data-kind="cond"] { color: #b9a7ff; }
.nf__hit[data-kind="gold"] { color: #f0c24b; }
/* A COUNTER STEP'S LABEL (Maayan, 2026-11-24: "counter turn needs a label above the growl that does it - so we notice it") */
.nf__ctr { position: absolute; z-index: 6; bottom: calc(100% + 6px); left: 50%; translate: -50% 0; padding: 1px 5px; border-radius: 4px; background: #f0c24b; color: #2a1a05; white-space: nowrap; pointer-events: none;
  font: 700 10px/1.4 system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; animation: nf-ctr 250ms var(--g-ease) both; }
@keyframes nf-ctr { from { opacity: 0; scale: .6; } }
.nf__fighter.is-counter .nf__hit { margin-bottom: 20px; }   /* its words over the label */
.nf__hit[data-kind="exp"] { color: #ffd76a; text-shadow: 0 0 10px rgb(255 196 60 / .9), 0 0 22px rgb(255 170 30 / .6), 0 2px 8px rgb(0 0 0 / .9); }
@keyframes nf-hit { 0% { opacity: 0; transform: translateY(6px) scale(.85); } 8% { opacity: 1; transform: translateY(0) scale(1.1); } 14% { transform: translateY(0) scale(1); } 82% { opacity: 1; transform: translateY(-6px) scale(1); } 100% { opacity: 0; transform: translateY(-9px) scale(1); } }
@media (max-width: 899px) { .nf__world { width: 230%; } .nf--small .nf__world { width: 100%; } .nf__board { bottom: calc(var(--g-tabbar) + var(--g-touch) + 2 * var(--g-3)); height: 58%; } }   /* wider than a phone: swiped; its foot above pause and sound (Maayan, 2026-11-27: "everything can be a bit more up") */
/* THE FIGHTERS' CARDS, SMALL, IN THE TOP CORNERS (Maayan, 2026-11-21: "left top corner and right top corners are mini cards
   ... tap on card show it full size with social buttons to collect"), on a phone and a wide screen alike: only the ones
   fighting now (nf-battle.js is-on), the first top left, the other top right; the card alone while small (its maker and
   its Collect row kept in their places, unseen); a tapped one its full size from its corner over the other, with them */
.nf__cards { --nf-s: .56; --nf-w: var(--g-gcard-w, 297px); position: absolute; z-index: 4; top: calc(var(--g-head-h) + var(--g-3)); left: var(--g-4); right: var(--g-4); padding: 0; background: none; pointer-events: none; }
.nf__cards .g-thinglist[data-layout] { display: block; position: relative; max-width: none; }
.nf__cards .g-thingpost:not(.is-on) { display: none; }
/* A DECK (Maayan, 2026-11-24: "we show a small deck each side"): its party's cards on one another in its corner, small, each
   a little lower and inward than the one over it (--nf-d: its place, 0 on top: nf-deck.js), the ones under it darker */
.nf__cards .g-thingpost { --nf-c: var(--nf-s); --nf-d: 0; position: absolute; top: 0; right: 0; z-index: calc(20 - var(--nf-d)); pointer-events: auto; transform: scale(var(--nf-c)); transform-origin: 100% 0;
  translate: calc(var(--nf-d) * var(--nf-dx) * -1) calc(var(--nf-d) * var(--nf-dy)); cursor: zoom-in; transition: transform 350ms var(--g-ease), translate 350ms var(--g-ease), opacity 350ms var(--g-ease), filter 350ms var(--g-ease); }
.nf__cards .g-thingpost.is-first { right: auto; left: 0; transform-origin: 0 0; translate: calc(var(--nf-d) * var(--nf-dx)) calc(var(--nf-d) * var(--nf-dy)); }
.nf__cards .g-thingpost.is-on { filter: brightness(calc(1 - var(--nf-d) * .15)); }
/* THE PACK TURNING (nf-deck.js): every card at its full look while it turns, only moving (Maayan, 2026-11-25) */
.nf__cards.is-turning .g-thingpost.is-on:not(.is-down) { opacity: 1; transition: transform 250ms var(--g-ease), translate 250ms var(--g-ease), filter 250ms var(--g-ease), opacity 250ms var(--g-ease); }   /* its look changes eased, never at once (Maayan, 2026-11-25) */   /* a growl behind it (nf-deck.js) */
.nf__cards .g-thingpost.is-on.is-down { filter: grayscale(1) brightness(.45); }   /* its growl down: at the back of the pack for good (nf-deck.js fallen) */
.nf__cards .g-thingpost :is(.g-gcard__top, .g-gcard__row, .g-gcard__by) { visibility: hidden; }
/* THE DECK OPEN (Maayan: "tap on the deck ... itll open all the deck"): its cards full size side by side from its corner, its
   top one first (a phone: swiped sideways), their own buttons theirs; the other deck faint under them */
.nf__cards[data-open="2"] .g-thinglist[data-layout] { justify-content: safe flex-end; }
@keyframes nf-deal { from { scale: .92; } }
/* THE PACKS BY THE PAGE'S WIDTH (Maayan, 2026-11-25: "make sure cards size is changing in relation to the width of the page, we
   don't want them to go over important things"): smaller as the page narrows, never over the mat's middle */
body { --nf-pack-s: .56; }
@media (max-width: 1599px) { .nf__cards { --nf-s: .48; } body { --nf-pack-s: .48; } }
@media (max-width: 1299px) { .nf__cards { --nf-s: .4; } body { --nf-pack-s: .4; } }
@media (max-width: 1099px) { .nf__cards { --nf-s: .34; } body { --nf-pack-s: .34; } }
/* THE BOARD BESIDE THE PACKS, NEVER UNDER THEM (Maayan, 2026-11-25: "still cards are on top of grid and players. we can't have
   that"): the board starts where a pack ends (its card's width at its scale, three cards under it showing, its margin, a gap),
   on both sides; a wide page keeps its own margin. A phone's mat is wider than the screen and swiped (below): its own */
/* NEVER SQUISHED (Maayan, 2026-11-27: "arena never 'squishes' - never ever. only with/without horizontal"): its board a square of one size, from the screen's height (a phone's: its width at most), never from the room beside it; less room, the arena slides sideways (its world wider than the scene) */
@media (min-width: 900px) { .nf:not(.nf--embed) { --nf-size: 1.31; --nf-tilt: 85deg; --nf-turn: 0deg; --nf-pivot: .5; --nf-persp: 1760px; --nf-y: 9%; --nf-x: 11px; --nf-dy: 203px; --nf-side: calc((var(--g-screen-h) - var(--g-head-h)) * var(--nf-size)); } .nf:not(.nf--embed) .nf__board { left: 0; right: 0; bottom: var(--nf-y); margin-inline: auto; width: var(--nf-side); height: var(--nf-side); perspective: var(--nf-persp); } .nf:not(.nf--embed) .nf__plane { transform: rotateX(var(--nf-tilt)); } .nf:not(.nf--embed) .nf__world { width: calc(var(--nf-side) + 2 * var(--g-4)); margin-inline: auto; background: none; translate: var(--nf-x) var(--nf-dy); }   /* the arena moved whole, everything on it (nf-tune.js drag) */ .nf:not(.nf--embed) .nf__scene { background: radial-gradient(120% 70% at 50% 100%, #2c2418, #120f0b 70%); } }   /* its world one width: nothing on it ever moves when a panel opens (Maayan, 2026-11-27) */   /* its size, slant, eye and place: one setting each (gridPieces.js reads --nf-tilt and --nf-persp; the tuner, nf-tune.js, on localhost) */
@media (max-width: 899px) { .nf__cards { --nf-s: .3; top: calc(var(--g-head-h) + var(--g-3)); left: var(--g-2); right: var(--g-2); } .nf { --nf-mini: calc(297px * .3); } .nf .nf__line { font-size: var(--g-t-sub); } }
@media (prefers-reduced-motion: reduce) { .nf__hit.is-on { animation-duration: 1ms; } .nf__fighter { transition: none; } }
/* THE SHOTS (nf-shot.js; Maayan, 2026-11-21: "range attack: show the thing being shot from source to destination"): the thing
   flying along its path, its swoosh a fading streak behind it, its glow, its spin; a miss lying where it fell, then fading;
   its strike where it got (fire, light, acid, rock), its bits thrown out; lightning a flickering line, at once */
.nf-shot { position: absolute; left: 0; top: 0; z-index: 900; pointer-events: none; will-change: transform; }
.nf-shot__it { position: absolute; inset: 0; display: block; }
.nf-shot__it svg { display: block; width: 100%; height: 100%; }
.nf-shot.is-glow .nf-shot__it { filter: drop-shadow(0 0 5px var(--nf-glow)) drop-shadow(0 0 12px var(--nf-glow)); }
.nf-shot.is-spin .nf-shot__it { animation: nf-spin 300ms linear infinite; }
.nf-shot.is-swoosh::before { content: ""; position: absolute; right: 55%; top: 38%; width: 190%; height: 24%; border-radius: 99px;
  background: linear-gradient(to right, transparent, rgb(255 244 220 / .55)); filter: blur(2px); }
.nf-shot.is-glow.is-swoosh::before { background: linear-gradient(to right, transparent, var(--nf-glow)); opacity: .7; }
.nf-shot.is-landed .nf-shot__it { animation: nf-landed 900ms ease-out forwards; }
.nf-shot.is-landed::before { display: none; }
@keyframes nf-spin { to { transform: rotate(360deg); } }
@keyframes nf-landed { 0%, 35% { opacity: 1; } 100% { opacity: 0; } }
.nf-boom { position: absolute; z-index: 901; pointer-events: none; border-radius: 50%; }
.nf-boom::before { content: ""; position: absolute; inset: 0; border-radius: 50%; animation: nf-boom 650ms ease-out forwards; }
.nf-boom__bit { position: absolute; left: 50%; top: 50%; width: 9%; height: 9%; margin: -4.5% 0 0 -4.5%; border-radius: 50%; animation: nf-bit 800ms cubic-bezier(.2,.7,.4,1) forwards; }
.nf-boom--fire::before { background: radial-gradient(circle, #fff3b0 0 18%, #ffb238 38%, #ff5a1a 60%, transparent 72%); }
.nf-boom--fire .nf-boom__bit { background: #ffb238; box-shadow: 0 0 6px #ff7a1a; }
.nf-boom--light::before { background: radial-gradient(circle, #fff 0 14%, rgb(255 250 220 / .85) 30%, transparent 62%); }
.nf-boom--light .nf-boom__bit { background: #fffbe6; width: 4%; height: 22%; border-radius: 2px; }
.nf-boom--acid::before { background: radial-gradient(circle, #d8ff9e 0 15%, #8ad94f 40%, rgb(80 160 40 / .6) 58%, transparent 70%); }
.nf-boom--acid .nf-boom__bit { background: #8ad94f; }
.nf-boom--rock::before { background: radial-gradient(circle, rgb(190 180 165 / .8) 0 25%, rgb(140 130 118 / .5) 50%, transparent 68%); }
.nf-boom--rock .nf-boom__bit { background: #7d756b; border-radius: 2px; width: 11%; height: 9%; }
@keyframes nf-boom { 0% { transform: scale(.15); opacity: 1; } 60% { opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes nf-bit { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(200deg); opacity: 0; } }
.nf-bolt { position: absolute; left: 0; top: 0; z-index: 901; pointer-events: none; overflow: visible; animation: nf-flicker 420ms steps(1) forwards; }
.nf-bolt polyline { fill: none; stroke: var(--nf-glow); stroke-width: 7; stroke-linejoin: round; stroke-linecap: round; opacity: .55; filter: blur(3px); }
.nf-bolt .nf-bolt__core { stroke: #fff; stroke-width: 2.5; opacity: 1; filter: none; }
@keyframes nf-flicker { 0% { opacity: 1; } 25% { opacity: .2; } 40% { opacity: 1; } 70% { opacity: .5; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .nf-shot.is-spin .nf-shot__it, .nf-boom__bit { animation: none; } }
/* what a fighter holds, small by its name; an item on the board where its holder fell, then flying to the one who takes it */
.nf__gear { display: inline-flex; gap: 2px; vertical-align: middle; }
.nf__gear img { width: 1.4em; height: 1.4em; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.nf__gear img.is-off { opacity: .45; }   /* held, not put on */
/* what it is under, over its head: a green skull (poison), a crossed eye (blind), a flame (burning) */
.nf__status { display: inline-flex; gap: 3px; vertical-align: middle; margin-inline-start: 4px; }
.nf__st { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); box-shadow: 0 1px 3px rgba(0,0,0,.6); animation: nf-st-in 300ms ease-out; }
.nf__st svg { width: 15px; height: 15px; }
.nf__st--poisoned { color: #7be36b; } .nf__st--blinded { color: #e9e4d6; } .nf__st--burning { color: #ff9a3c; }
@keyframes nf-st-in { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.nf-item { position: absolute; z-index: 101; height: auto; transform: translate(-50%, -50%) rotateX(30deg); filter: drop-shadow(0 3px 3px rgba(0,0,0,.55)); pointer-events: none; animation: nf-item-fall 450ms var(--g-ease) both; transition: left 600ms var(--g-ease), top 600ms var(--g-ease), opacity 600ms var(--g-ease), transform 600ms var(--g-ease); }
.nf-item.is-taken { opacity: 0; transform: translate(-50%, -50%) scale(.4); z-index: 900; }
@keyframes nf-item-fall { from { opacity: 0; transform: translate(-50%, -140%) rotateX(30deg); } to { opacity: 1; transform: translate(-50%, -50%) rotateX(30deg); } }
@media (prefers-reduced-motion: reduce) { .nf-item { animation: none; transition: none; } }
/* THE FLOATING SHEET (nf-sheet.js): in the big card's place on its side, its Close where its More was (the card's top row,
   the same height), the sheet under it read only and scrolled, the battle going on behind */

/* THE BATTLE LOG (ArenaFight.astro, nf-battle.js): a panel at the left, its box scrolling inside; closed, only its handle shows */
/* it pushes the arena and the cards aside, never over them (Maayan, 2026-11-23: "left panel should push not on top") */
body { --nf-log-w: min(340px, 86vw); }
.nf, .nf__cards { transition: margin var(--g-mid) var(--g-ease); }
.nf__log.is-open ~ .nf, .nf__log.is-open ~ .nf__cards { margin-inline-start: var(--nf-log-w); }
.nf__log:not(.is-open) ~ .nf { margin-inline-start: 0px; }
.nf__log:not(.is-open) ~ .nf__cards { margin-inline-start: 0px; }   /* its button at the arena's foot (nf-view.css) */
.nf__log { position: fixed; z-index: 30; left: 0; top: calc(var(--g-head-h, 64px) + var(--g-3)); bottom: var(--g-3); width: var(--nf-log-w); display: flex; flex-direction: column;
  background: var(--g-surface); box-shadow: var(--g-shadow); transform: translateX(calc(-100% + var(--g-touch, 44px))); transition: transform var(--g-mid) var(--g-ease); }
.nf__log.is-open { transform: none; }
.nf__loghead { display: flex; align-items: center; justify-content: space-between; gap: var(--g-2); padding: var(--g-2) 0 var(--g-2) var(--g-3); border-bottom: var(--g-hair) solid var(--g-border-faint); }
.nf__logtitle { font-weight: 700; color: var(--g-text); }
.nf__log:not(.is-open) .nf__logtitle { visibility: hidden; }
/* closed: no strip, only its button over the arena's corner (Maayan, 2026-11-24: "when the logs panel is closed we dont have that strip on the left. just the button to open it again") */
.nf__log:not(.is-open) { transform: translateX(-100%); background: none; box-shadow: none; }
.nf__log:not(.is-open) .nf__loglist { visibility: hidden; }
.nf__log:not(.is-open) .nf__loghead { border-color: transparent; }
.nf__loglist { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: var(--g-2) var(--g-3) var(--g-3) var(--g-6); color: var(--g-text-2); font-size: .9rem; line-height: 1.45; }
.nf__loglist li.is-skill, .nf__loglist li.is-down, .nf__loglist li.is-end { color: var(--g-text); font-weight: 600; }
.nf__loglist li.is-start { margin-top: var(--g-3); color: var(--g-text); }
/* a gmBrick at work (engine: brick true): green, the same in every log line (Maayan, 2026-11-23: "any gmbrick in use - mark it in green in the log") */
.nf__loglist li.is-brick { color: #5fd068; }
.nf__bricks { margin: var(--g-4) auto var(--g-6); max-width: 760px; padding: var(--g-4) var(--g-5); background: #fbf6ea; color: #2b2116; box-shadow: 0 0 0 1px rgba(43, 33, 22, .2); }
.nf__bricks h3 { margin: 0 0 var(--g-3); font: var(--g-w-bold) 1.3rem var(--g-font-display); }
.nf__bricks h4 { margin: var(--g-3) 0 var(--g-1); font-weight: 700; }
.nf__bricks p { margin: 0; line-height: 1.45; }
.nf__brickmove { padding: var(--g-2) 0; border-bottom: 1px solid rgba(0,0,0,.12); }
.nf__brickmove b { display: block; }
.nf__loglist li.is-brick[role="button"] { cursor: pointer; }
.nf__why { white-space: pre-line; display: block; margin: var(--g-1) 0 var(--g-2); padding: var(--g-2) var(--g-3); background: rgb(95 208 104 / .1); border-inline-start: 2px solid #5fd068; color: var(--g-text); font-weight: 400; }
/* A GAME, NOT A PAGE (Maayan, 2026-11-24): its words never chosen by a tap, its pictures never dragged; a fighter tapped opens its card */
.nf__scene, .nf__scene *, .nf__cards .g-thingpost * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.nf img { -webkit-user-drag: none; user-drag: none; }
.nf__fig { pointer-events: auto; cursor: pointer; }
/* WINNER over the winner's head, the camera in on it (nf-crown.js): the battle cry, grown in, faded out */
.nf__win { position: fixed; z-index: 6; translate: -50% -100%; pointer-events: none; opacity: 0; scale: .6; transition: opacity 300ms var(--g-ease), scale 450ms var(--g-ease); }
.nf__win.is-on { opacity: 1; scale: 1; }
.nf__win[hidden] { display: none; }
.nf__win .g-battlecry, .nf__win :is(h2, .g-tb__t) { margin: 0; font-size: clamp(2.4rem, 7vw, 4.5rem); line-height: 1; white-space: nowrap; }
/* THE ARENA ON A PHONE (Maayan, 2026-11-24: "arena on mobile - no bottom tabs, no left panel, add a close button on top of
   sheet"): the whole screen the arena's, its sheet's Close on top */
@media (max-width: 899px) {
  body:has(.nf:not(.nf--hero)) gm-tabbar, .nf__log { display: none; }   /* the home's fold keeps its tab bar (Home) */
  body:has(.nf:not(.nf--hero)) { --g-tabbar: 0px; }
  body:has(.nf:not(.nf--hero)) .gm2-main { padding-bottom: 0; }
  .nf__log[class] ~ :is(.nf, .nf__cards) { margin-inline-start: 0; }
}
/* TWO PARTIES (Maayan, 2026-11-24: "each group has a different color party1 and party2"): its fighters' names, their squares
   and its card's edge in its colour; WINNER with its party's name under it */
.nf, .nf__cards { --nf-p1: #f0c24b; --nf-p2: #e8574a; }   /* the party gold, never blue beside gold (Maayan, 2026-11-27) */
.nf__cards { --nf-dx: 16px; --nf-dy: 14px; }   /* each card under the top one: this much lower and inward, so the deck shows (Maayan, 2026-11-24: "a bit more spacy") */
.nf__fighter[data-party="1"] .nf__name { color: var(--nf-p1); } .nf__fighter[data-party="2"] .nf__name { color: var(--nf-p2); }
/* no coloured squares: a fighter's side is its ring's colour (sprite.js halo) */
.nf__plane > i[data-party] { transition: background var(--g-mid) var(--g-ease); }
.nf__cards .g-thingpost[data-party="1"] { --nf-pc: var(--nf-p1); } .nf__cards .g-thingpost[data-party="2"] { --nf-pc: #e8574a; }
.nf__cards .g-thingpost[data-party].is-on .g-gcard__card { outline: 7px solid var(--nf-pc); outline-offset: 2px; }
.nf__win { display: flex; flex-direction: column; align-items: center; }
.nf__winparty { margin: var(--g-1) 0 0; font: var(--g-w-bold) clamp(1.3rem, 3.5vw, 2rem) / 1.1 var(--g-font-display); color: var(--g-text); text-shadow: 0 2px 10px rgb(0 0 0 / .9); white-space: nowrap; }
.nf__winparty:empty { display: none; }
/* EACH DECK'S HEAD (Maayan, 2026-11-24): the card's circle with its party's power, its name, its hit points' bar under it; the deck under them */
.nf__cards { --nf-row: 60px; } .nf__cards .g-thinglist[data-layout] { margin-top: var(--nf-row); }   /* the heads' row over the decks, the empty cards and Start level with them */
.nf__party { position: absolute; top: 0; left: 0; display: flex; align-items: center; gap: var(--g-2); pointer-events: none; }
.nf__party[data-party="2"] { left: auto; right: 0; flex-direction: row-reverse; text-align: right; }   /* the right party mirrored, as in a fighting game: its circle on the right, its bar drains toward the right */
.nf__party[data-party="2"] .nf__bar > i { inset: 0 0 0 auto; }
.nf__party[hidden] { display: none; }
.nf__party .nf__power { --kind-tone: var(--nf-p1); } .nf__party[data-party="2"] .nf__power { --kind-tone: var(--nf-p2); }
.nf__pwords { display: flex; flex-direction: column; gap: 4px; min-width: 150px; max-width: 32vw; }   /* as wide as its name, a cut only when it truly has no room */
.nf__pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--g-w-bold) var(--g-t-sub) var(--g-font-display); color: var(--nf-p1); text-shadow: 0 1px 6px rgb(0 0 0 / .9); }
.nf__party[data-party="2"] .nf__pname { color: var(--nf-p2); }
.nf__party .nf__bar { flex: none; height: 8px; }
@media (max-width: 899px) { .nf__cards { --nf-dx: 7px; --nf-dy: 7px; } .nf__pwords { min-width: 128px; max-width: calc(50vw - 72px); } .nf__cards { --nf-row: 48px; } .nf__cards:not(:has(.nf__party:not([hidden]))) { --nf-row: 0px; } .nf .nf__words { margin-top: 54px; }
  :is(html, body):has(.nf:not(.nf--hero):not(.nf--embed)) { overflow: hidden; overscroll-behavior: none; height: 100%; } .nf__cards { top: calc(var(--g-head-h) + var(--g-2)); } }   /* a phone: the heads over the words too; all a bit higher, the page never scrolled nor bounced (Maayan, 2026-11-27: "no scroll", "I scroll and we don't want that"); no heads yet: no room kept for them ("so much space above the two placeholders") */
/* READABLE ON ANY GROUND (Maayan, 2026-11-24: "make sure things are visible on any background"): names, numbers and the words
   over heads with a dark outline under their letters (as games do), the bars on a dark rim */
.nf__name, .nf__hpn, .nf__hit, .nf__pname { -webkit-text-stroke: 4px rgb(10 8 6 / .92); paint-order: stroke fill; text-shadow: 0 0 6px rgb(0 0 0 / .9), 0 2px 10px rgb(0 0 0 / .8); }
.nf__hit[data-kind="exp"] { text-shadow: 0 0 10px rgb(255 196 60 / .9), 0 0 22px rgb(255 170 30 / .6), 0 2px 8px rgb(0 0 0 / .9); }
.nf__bar { box-shadow: 0 0 0 2px rgb(10 8 6 / .85), 0 1px 6px rgb(0 0 0 / .7); }
.nf__world .g-cloud { z-index: 900; }   /* a cloud over everything standing on the mat (the arena's one scale: nf-battle.js, nf-stuff.js, nf-ground.js) */
/* OVER EVERYTHING (Maayan, 2026-11-25: "open card, open sheet: both are above everything else including headers, with a light
   darkened bg below them"); a phone: the sheet the whole height, down to the screen's very bottom, its last page whole */
/* A GROWL OPENED (nf-sheet.js; Maayan, 2026-11-25: "card is open in the middle of the screen large ... "X" button circle on its
 * top right corner outside of the card. when card is open we can't scroll down the page. a sticky footer"): over everything,
 * dark under it; its card alone in the middle (its pack and the rest unseen), or its sheet instead; its three buttons at its foot */
.nf { isolation: isolate; }   /* the fight's own layers (its names, its things) all under what opens over it */
/* THE ARENA SHOWN WHOLE (nf-battle.js veil; Maayan, 2026-11-27): hidden while a battle is set, then faded in at once */
.nf__scene, .nf__cards { transition: opacity 1.4s var(--g-ease-in-out); }   /* a little slower (Maayan, 2026-11-27) */
.nf.nf-figs-later .nf__fighter { opacity: 0; }   /* the characters after the arena, faded in once it is in (nf-battle.js) */
.nf.nf-loading .nf__scene, .nf__cards.nf-loading { opacity: 0; pointer-events: none; }
/* WHOSE TURN (Maayan, 2026-11-27: "a yellow triangle above him, pointing at him for a quick moment, maybe blinking or breathing"):
   over its name, pointing down at it, as its turn starts, breathing all its turn, out as it ends (nf-battle.js showCard); its ring glows too */
.nf__turn { position: absolute; z-index: 8; left: 50%; bottom: calc(100% + 4px); width: 34px; height: 24px; margin-left: -17px; pointer-events: none; opacity: 0;
  background: linear-gradient(#ffe48a, #f0b53a); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 0 4px rgb(255 190 60 / .9)) drop-shadow(0 2px 2px rgb(0 0 0 / .5)); }
.nf__turn { transition: opacity .45s ease; }
.nf__fighter.is-turn .nf__turn { opacity: 1; animation: nf-turn-in .45s ease-out, nf-turn 1.6s ease-in-out .45s infinite alternate; }   /* its whole turn (Maayan, 2026-11-27: "leave the triangle there for the rest of the turn"); out with a fade */
@keyframes nf-turn-in { from { opacity: 0; translate: 0 -10px; } to { opacity: 1; translate: 0 0; } }
@keyframes nf-turn { from { opacity: 1; translate: 0 0; } to { opacity: .6; translate: 0 4px; } }
@media (prefers-reduced-motion: reduce) { .nf__fighter.is-turn .nf__turn { animation: none; } }
/* INSIDE A PAGE (ArenaFight embed: the home's story): no background of its own (Maayan, 2026-11-27: "It doesn't need to have a background") */
.nf.nf--embed, .nf.nf--embed::before { background: none; }
.nf.nf--embed .nf__world { background: none; }
.nf--embed .nf__cards { top: var(--g-3); }   /* its decks in its own top corners (ArenaFight: moved into it) */
.nf--embed .nf__scene { overflow-x: hidden; touch-action: pan-y; cursor: default; }   /* the home's: never moved by a hand sideways (the page scrolls on), moved by the fight alone (nf-battle.js follow) */
/* THE HOME'S ARENA ON A PHONE (Maayan, 2026-11-27: "remove the decks and the information above them and remove the gap between
   the arena and the text above it"): no decks, no party heads; the board, its own size, right under the words (room for the
   names over its back row) */
@media (max-width: 899px) { .nf--embed .nf__cards { display: none; } }   /* the rest of a phone's: the one block at the end */
/* ...AND ON A WIDE SCREEN (Maayan, 2026-11-27: "remove in the homepage arena the card decks from desktop as well, and reduce the
   gap"): no decks; the board, its own size, up under the words (the empty top of its tilt taken up) */
@media (min-width: 900px) { .nf--embed .nf__cards { display: none; }
  .nf.nf--embed { min-height: 0; height: calc((var(--g-screen-h) - var(--g-head-h)) * .79 - var(--g-7)); }
  .nf--embed .nf__board { top: calc(-1 * var(--g-7)); bottom: auto; height: calc((var(--g-screen-h) - var(--g-head-h)) * .74); } }
/* NEVER STRETCHED (Maayan, 2026-11-27: "The arena appears stretched"): its board as wide as its own shape on any wide screen (as a
   1440 wide one lays it: 1.63 its height), in the middle; never wider */
@media (min-width: 900px) { .nf--embed .nf__board { left: 0; right: 0; margin-inline: auto; width: min(88%, calc((var(--g-screen-h) - var(--g-head-h)) * .74 * 1.63)); } }
/* NOTHING CUT (Maayan, 2026-11-27: "We can't have anything cropped"): a wide screen's never cut at its edges (its world never
   slid there); its board from its top, the names and walls over its back row in the room above. A phone's slides, so cut at its
   edges: its board lower, room for them inside */
@media (min-width: 900px) { .nf.nf--embed, .nf--embed .nf__scene { overflow: visible; }
  .nf.nf--embed { height: calc((var(--g-screen-h) - var(--g-head-h)) * .74); } .nf--embed .nf__board { top: 0; } }
/* SQUARE SQUARES, AS MADE (Maayan, 2026-11-27: "the terrain itself is stretched, not like I created it"): the board's box square, so
   each of its squares is square on the table, as in the grid builder; its picture whole, not cut to fit a stretched table */
@media (min-width: 900px) { .nf--embed .nf__board { width: calc((var(--g-screen-h) - var(--g-head-h)) * .74); } }
/* A PHONE'S (Maayan, 2026-11-27: "make sure responsive mobile looks good"): its world the screen's width (never the arena's swiped 230%), so never
   slid and never wider than the screen; its board square, the screen's width inside the gutter, from its top (the empty top of its tilt holds the back row's names); no decks (above) */
@media (max-width: 899px) { .nf.nf--embed .nf__world { width: 100%; } .nf.nf--embed { overflow: clip visible; } .nf--embed .nf__scene { overflow: visible; }
  .nf.nf--embed { min-height: 0; height: calc(100vw - 2 * var(--g-4)); } .nf--embed .nf__board { left: var(--g-4); right: var(--g-4); width: auto; top: 0; bottom: auto; height: calc(100vw - 2 * var(--g-4)); } }
/* ARENA MODE (Maayan, 2026-11-27: "a left and right placeholder for cards"; "button start is between the two packs"; nf-choose.js) */
.nf__cards .nf__start { position: absolute; top: var(--nf-row); left: 50%; translate: -50% 0; pointer-events: auto; }   /* between the two packs (Maayan, 2026-11-27) */ .nf__start[hidden] { display: none; } @media (max-width: 899px) { .nf__cards .nf__start { top: calc(var(--nf-row) + var(--nf-w) * 1.51 * var(--nf-s) / 2); translate: -50% -50%; } }   /* a phone: between them at their middle (Maayan, 2026-11-27: "start button between the two placeholders not below them - centered height") */
[data-nf-side] [data-nf-pick] { cursor: grab; touch-action: pan-y; } [data-nf-side] [data-nf-pick].is-out { display: none; } [data-nf-side] [data-nf-pick][hidden] { display: none; } [data-nf-side] [data-nf-pick].is-lifting { opacity: .45; }   /* its miniature being dragged (nf-choose.js) */   /* a growl on the arena: out of the grid; another tab's: hidden */
.nf-lift { position: fixed; inset: 0; z-index: var(--g-z-toast); pointer-events: none; } .nf-lift > .nf__fighter { position: fixed; cursor: grabbing; }   /* a figure dragged, over everything (nf-choose.js lift) */   /* a panel open: over the arena, never pushing it (Maayan, 2026-11-28: "I want the panel to stop pushing the arena. Cancel that experience entirely. Panels open above the arena") */
.nf-ghost { position: fixed; z-index: var(--g-z-toast); pointer-events: none; margin: 0; opacity: .9; } [data-nf-side] .g-seg { margin-bottom: var(--g-3); }   /* a growl dragged (nf-choose.js) */
.nf__cards .nf__add { --nf-n: 0; position: absolute; top: var(--nf-row); left: 0; width: var(--nf-w); pointer-events: auto; transform: scale(var(--nf-s)); transform-origin: 0 0;
  translate: calc(min(var(--nf-n), 1) * (var(--nf-w) * var(--nf-s) + var(--g-3)) + max(var(--nf-n) - 1, 0) * var(--nf-dx)) 0; transition: translate var(--g-mid) var(--g-ease); }
.nf__cards .nf__add[data-nf-add="b"] { left: auto; right: 0; transform-origin: 100% 0; translate: calc(-1 * (min(var(--nf-n), 1) * (var(--nf-w) * var(--nf-s) + var(--g-3)) + max(var(--nf-n) - 1, 0) * var(--nf-dx))) 0; }
.nf__cards [data-nf-more] { --nf-n: 1; position: absolute; left: 0; top: calc(var(--nf-row) + (40px + var(--nf-w) * 1.51) * var(--nf-s) + (var(--nf-n) - 1) * var(--nf-dy) + 9px + var(--g-2)); width: calc(var(--nf-w) * var(--nf-s) + (var(--nf-n) - 1) * var(--nf-dx)); pointer-events: auto; }   /* one more: under its deck (its card 40px down its post, its outline 9px round it), its width (nf-choose.js) */
.nf__cards [data-nf-more][data-nf-add="b"] { left: auto; right: 0; } .nf__cards [data-nf-more][hidden] { display: none; }
.nf__cards .nf__add .g-gcard__add { font-size: calc(var(--g-t-sub) / var(--nf-s)); }   /* its words a line's size once the card is scaled down (Maayan, 2026-11-27: "I don't allow you to write fonts that are so small") */
.nf__cards .nf__add[hidden] { display: none; } .nf__cards .nf__add:disabled { opacity: .4; cursor: default; }
.nf__cards .nf__add .g-gcard__card { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }   /* the arena a little blurred behind it (Maayan, 2026-11-28: "add growl placeholder button - give it background blur a bit") */
.nf__cards .nf__add:not(:hover, :focus-visible) .g-gcard__card { box-shadow: inset 0 0 0 calc(1px / var(--nf-s)) rgb(255 255 255 / .2); }   /* a whole pixel once the card is scaled down (Maayan, 2026-11-28: "why cant i see the border"); its border 20% white (Maayan, 2026-11-28: "border should be 20% white") */
