/* THE BOARD IN PIECES (src/lib/growlmaster-v2/gridPieces.js): each piece a box stretched onto its seen corners
   (matrix3d, from its top left), its face the floor's one picture (its part: background-position; --tw, --th its whole
   size), its light by its slope (filter). Placeholder floor until his pictures: the terrain's two tiles, a soft light. */
.gpx { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.gpx__t { display: block; width: 100%; height: 100%;
  background: radial-gradient(120% 90% at 30% 20%, rgb(255 255 255 / .07), transparent 60%) 0 0 / var(--tw) var(--th),
    repeating-conic-gradient(var(--tb) 0 25%, var(--ta) 0 50%) 0 0 / 128px 128px; }
.gpx.is-over { filter: brightness(1.45) sepia(.45); }
/* A GROWL DRAGGED OVER A SQUARE (nf-choose.js): gold where it can stand, red where it can't (Maayan, 2026-11-28: "mark this cell in yellow. if the cell is 'taken' and cant drop there, mark it with red") */
.gpx.is-drop > .gpx__t { box-shadow: inset 0 0 0 100vmax color-mix(in srgb, var(--g-btn-gold) 55%, transparent); } .gpx.is-nodrop > .gpx__t { box-shadow: inset 0 0 0 100vmax color-mix(in srgb, var(--g-danger) 55%, transparent); }
@media (prefers-reduced-motion: reduce) { .gpx__t { animation: none !important; } }
/* A WALL'S BRICKS (src/lib/growlmaster-v2/gridBricks.js): each face a box stretched onto its seen corners, its colour, a
   mortar line; the ghost (hovering, before drawing) see-through */
.gbk { position: absolute; left: 0; top: 0; display: block; transform-origin: 0 0; pointer-events: none;
  background-image: linear-gradient(rgb(0 0 0 / .28) 0 1px, transparent 1px), linear-gradient(90deg, rgb(0 0 0 / .22) 0 1px, transparent 1px); background-size: 100% 50%, 100% 100%; }
.gbk.is-ghost { opacity: .5; }
/* the walls' shadow: one layer over the ground, under the walls and things; each quad solid, the layer soft and see-through
   (two shadows meeting never darker) */
.gbk-shade { position: absolute; inset: 0; z-index: 60; pointer-events: none; opacity: .45; filter: blur(2px); }
.gbk-s { position: absolute; inset: 0; display: block; background: #000; }
.gbk.is-sel { box-shadow: inset 0 0 0 1.5px #f0c24b; }   /* the door chosen: gold */
/* TORCHES (gridTorches.js): the torch's picture, its flame his 8 frames over and over, its light a soft round of its colour
   on the ground and its wall, flickering by the kit's light (GM2Light.wobble) */
.gtc { position: absolute; display: block; pointer-events: none; background: center / 100% 100% no-repeat; }
.gtc.is-sel { outline: 1.5px solid #f0c24b; outline-offset: 2px; border-radius: 4px; }
.gtc-flame { position: absolute; display: block; pointer-events: none; background-repeat: no-repeat; background-size: 800% 100%; transform-origin: 50% 100%; animation: gtc-flame .8s steps(8) infinite; }
@keyframes gtc-flame { from { background-position-x: 0%; } to { background-position-x: 114.2857%; } }
.gtc-light { position: absolute; left: 0; top: 0; width: 64px; height: 64px; display: block; transform-origin: 0 0; pointer-events: none; mix-blend-mode: screen; opacity: .8;
  background: radial-gradient(ellipse var(--rx, 70%) var(--ry, 70%) at calc(var(--px, 50%) + var(--mx, 0%)) calc(var(--py, 50%) + var(--my, 0%)), var(--lit, var(--glow)) 0, color-mix(in srgb, var(--lit, var(--glow)) 35%, transparent) 30%, transparent 70%); }
.gtc-light--wall { background: radial-gradient(ellipse var(--wx, 45%) 45% at calc(var(--cx, 50%) + var(--mx, 0%)) calc(var(--cy) + var(--my, 0%)), var(--lit, var(--glow)) 0, color-mix(in srgb, var(--lit, var(--glow)) 30%, transparent) 40%, transparent 100%); }
.gtc-shadow { filter: brightness(0) blur(1.5px); opacity: .45; }   /* its shadow on its wall, from the sun */
.gtc-light { mask-size: 100% 100%; mask-repeat: no-repeat; }   /* the walls in its way: their shadows from its flame */
/* NIGHT: THE TORCHES THE ONLY LIGHT (Maayan, 2026-11-24: "leave only torches sources of lights and see the result"): no sun,
   so the ground, the walls, their doors and rubble dark and even, and no sun's shadows; where a torch's light falls it
   brings back their own colours, brighter nearer its flame (color-dodge), stopped by what is in its way as by day */
.is-night .gpx__t, .is-night .gbk { filter: brightness(.45) saturate(.7) !important; }   /* dim, never black (Maayan, 2026-11-27: "too dark ... we don't want things to be so dark") */
.is-night .gbk-shade, .is-night .gtc-shadow { display: none; }
.is-night .gtc { filter: brightness(.5) !important; }   /* the torch itself: only its own flame on it */
.is-night .gtc-light { mix-blend-mode: color-dodge; --lit: color-mix(in srgb, color-mix(in srgb, var(--glow) 55%, white) 80%, black); }   /* its colour, softened toward white: the true colours under it, warm */
.is-night .gtc-light--wall { --lit: color-mix(in srgb, color-mix(in srgb, var(--glow) 55%, white) 94%, black); }   /* its own wall, near: brighter */
/* the arena at night: each fighter and thing lit by the torches themselves (nf-ground.js lightUp, the kit's light) */
/* a torch lit for the first time: in with a quick fade (gridTorches.js; its light grows with it) */
.gtc.is-new, .gtc-flame.is-new { animation: gtc-in .35s var(--g-ease, ease) both; }
.gtc-flame.is-new { animation: gtc-in .35s var(--g-ease, ease) both, gtc-flame .8s steps(8) infinite; }
@keyframes gtc-in { from { opacity: 0; } }
.is-building .gbk-shade { opacity: 0; }   /* the arena building its place: shadows wait for the walls (nf-ground.js) */
.nf__walls { position: absolute; pointer-events: none; }   /* the arena's walls and torches, over the board exactly, beside its fighters (nf-ground.js) */
