/* Player rows in combat (2026-10-01): the game piece with its HP, Block and tokens, the incoming-damage marker, and the die by the Draw pile. */
#enemies{position:relative}
.enemy-row>.row-label{width:160px}
.row-piece{position:relative;display:inline-block}
.row-tokens{position:absolute;left:100%;top:0;display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-start;align-items:flex-start;gap:2px;max-height:108px;margin-left:2px}
.row-tokens .token{width:42px;height:42px}.row-tokens .token b{min-width:20px;font-size:13px;line-height:18px;right:-6px;bottom:-4px}
.row-tokens .token-stack img{width:40px;height:40px}.row-tokens .token-stack img+img{margin-left:-16px}
.row-vitals{display:inline-flex;align-items:center;gap:6px;max-width:100%;color:var(--ink);letter-spacing:0;text-transform:none}
/* A health bar with the numbers on it: a dark outline keeps them readable over both the red fill and the empty part. */
.hp-bar{position:relative;display:block;width:110px;height:22px;overflow:hidden;border:2px solid #0b0f0d;border-radius:11px;background:#2a1513;box-shadow:inset 0 2px 4px #000a,0 1px 0 #ffffff22}
.hp-fill{position:absolute;inset:0 auto 0 0;background:linear-gradient(180deg,#f0685d 0%,#cf3a33 55%,#a82620 100%);border-radius:9px 0 0 9px;transition:width .3s}
.hp-bar b{position:relative;display:block;text-align:center;font:800 14px/18px system-ui;color:#fff;text-shadow:0 0 3px #000,0 1px 2px #000,1px 0 2px #000,-1px 0 2px #000;letter-spacing:.02em}
.row-block{display:inline-flex;align-items:center;position:relative;width:48px;height:48px;flex:none}
.row-vitals .row-block .ic{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 1px 3px #000c)}
.row-vitals .row-block b{position:relative;width:100%;text-align:center;font:900 24px/1 system-ui;color:#fff;-webkit-text-stroke:4px #08202f;paint-order:stroke fill;text-shadow:0 2px 3px #000}

/* One big intent marker per player: what this enemy turn would deal with no more Block. */
.row-incoming{flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;width:72px;min-height:84px;margin:0;padding:6px 4px;
  border:2px solid #7d2d2a;border-radius:14px;background:linear-gradient(180deg,#4a1d1b,#2a1211);color:#fff;cursor:help;box-shadow:0 3px 10px #000a}
.row-incoming .ic{width:34px;height:34px}
.row-incoming b{font:800 30px/1 Georgia,serif;text-shadow:0 2px 4px #000}
.row-incoming i{margin-top:2px;padding:0 6px;border-radius:8px;background:#e5ca70;color:#2a1a05;font:800 11px/16px system-ui;font-style:normal;letter-spacing:.05em}
.row-incoming.aoe{border-color:#e5ca70;box-shadow:0 0 0 2px #e5ca7066,0 3px 10px #000a}
.row-incoming:hover,.row-incoming:focus-visible{border-color:#ff8a80;outline:0;box-shadow:0 0 0 3px #ff8a8099,0 3px 10px #000a}
.incoming-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:6}
.incoming-lines path{fill:none;stroke:#ff6f61;stroke-width:3;stroke-dasharray:7 5;stroke-linecap:round;filter:drop-shadow(0 1px 2px #000)}
.incoming-lines circle{fill:#ff6f61;stroke:#fff;stroke-width:1.5}
.incoming-lines text{fill:#fff;font:800 18px Georgia,serif;stroke:#000;stroke-width:3px;paint-order:stroke}
.enemy.hit-source{outline:3px solid #ff6f61;outline-offset:2px;border-radius:10px;box-shadow:0 0 18px #ff6f6188}
#enemies:not(.enemy-rows){align-items:center}

.die-pile{gap:8px}.die-pile .die-face{width:30px;height:30px;padding:4px}.die-pile .die-face i.pip{width:5px;height:5px}
@media(max-width:700px){.enemy-row>.row-label{width:140px}.hp-bar{width:96px}.row-incoming-group{margin-left:12px;min-width:58px}.row-incoming{width:58px;min-height:70px}.row-incoming b{font-size:24px}.row-incoming .ic{width:26px;height:26px}.row-tokens .token{width:32px;height:32px}.row-tokens .token-stack img{width:30px;height:30px}
  /* Phones: no room beside the piece (the enemy card covered the tokens), so they sit in a row under it, with larger counts. */
  .row-tokens{position:static;flex-direction:row;justify-content:center;max-height:none;max-width:124px;margin:6px auto 0;gap:4px 8px}
  .token b{min-width:22px;font-size:14px;line-height:20px}.row-tokens .token b{min-width:22px;font-size:14px;line-height:20px;right:-8px}}
.row-incoming-group{flex:none;display:flex;flex-direction:column;align-items:center;align-self:center;gap:8px;min-width:72px;margin-left:26px}
.row-incoming-group.idle{visibility:hidden}

/* Everything else aimed at the player this turn (Daze, Weak, Vulnerable, ...), under the damage marker. */
.row-effects{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;max-width:132px}
.row-effect{display:inline-flex;flex-direction:column;align-items:center;gap:1px;min-width:48px;margin:0;padding:4px 6px 3px;border:2px solid #5d4a2a;border-radius:10px;background:linear-gradient(180deg,#33291a,#1d1710);color:#fff;cursor:help;box-shadow:0 2px 8px #000a}
.row-effect .ic{width:26px;height:26px}
.row-effect .effect-card{display:block;width:30px;height:auto;border-radius:3px;box-shadow:0 1px 4px #000c}
.row-effect .effect-name{font:800 12px/20px system-ui;letter-spacing:.02em}
.row-effect b{font:800 17px/1 Georgia,serif;text-shadow:0 2px 3px #000}
.row-effect i{margin-top:1px;padding:0 5px;border-radius:7px;background:#e5ca70;color:#2a1a05;font:800 10px/14px system-ui;font-style:normal;letter-spacing:.05em}
.row-effect.aoe{border-color:#e5ca70}
.row-effect-slimed{border-color:#4f8f3e}.row-effect-burn{border-color:#c4672a}
.row-effect:hover,.row-effect:focus-visible{border-color:#ff8a80;outline:0;box-shadow:0 0 0 3px #ff8a8099,0 2px 8px #000a}

/* The floating intent window while the cursor is over an enemy. */
.intent-tip{position:fixed;z-index:95;max-width:340px;padding:10px 14px 8px;pointer-events:none;border:2px solid var(--gold);border-radius:10px;background:#101814f5;box-shadow:0 10px 30px #000d;color:var(--ink)}
.intent-tip h4{margin:0 0 6px;font:700 16px Georgia,serif;color:var(--gold)}
.intent-tip-parts{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;font-size:15px}
.intent-tip .intent-part{display:inline-flex;align-items:center;gap:2px}
.intent-tip .intent-part .ic{width:1.6em;height:1.6em}
.intent-tip .intent-part b{font:800 17px system-ui}
.intent-tip .intent-part small{margin-left:3px;font-size:10px;color:var(--muted);text-transform:uppercase}
.intent-tip .intent-card{padding:1px 7px;border:1px solid #6d6346;border-radius:10px;font-size:12px}
.intent-tip p{margin:6px 0 0;font-size:12px;line-height:1.35;color:var(--muted)}

/* Enemy cards are just the card (and, for elites and bosses, the HP tracker beside it). */
.enemy-body{display:flex;align-items:stretch;gap:6px}
/* The tracker is as tall as the card beside it (portrait cards 372:520, boss cards 1500:1039); --card is the card's width. */
.enemy.has-tracker{--card:180px;--tracker-height:calc(var(--card) * 1.398);width:auto}
.enemy.boss.has-tracker{--card:min(420px,calc(100vw - 150px));--tracker-height:calc(var(--card) * .693)}
@media(min-width:850px){.enemy.has-tracker{--card:165px}.enemy.boss.has-tracker{--card:min(420px,calc(100vw - 150px))}}
.enemy.has-tracker .enemy-face{flex:none;width:var(--card)}
.hp-tracker{position:relative;flex:none;height:var(--tracker-height);aspect-ratio:268/882;overflow:hidden;border-radius:6px;box-shadow:0 2px 8px #000a}
.enemy .hp-tracker>img{position:absolute;inset:0;display:block;width:100%;height:100%;aspect-ratio:auto;object-fit:fill}
.track-cube{position:absolute;width:19%;aspect-ratio:1;transform:translate(-50%,-50%);border:2px solid #fff;border-radius:3px;background:linear-gradient(135deg,#ff7168 0%,#d63335 55%,#8c1220 100%);box-shadow:0 0 0 1px #000,0 2px 4px #000c;pointer-events:none}
/* More than 109 HP: one more tracker per extra 100, stacked behind the front one and shifted down and right so each peeks out. */
.hp-tracker-stack{--shift:calc(min(7px, 28px / max(var(--extra, 1), 1)));position:relative;flex:none;display:block;width:calc(var(--tracker-height) * .3039 + var(--extra, 0) * var(--shift));height:calc(var(--tracker-height) + var(--extra, 0) * var(--shift))}
.hp-tracker-stack>.hp-tracker{position:absolute;left:0;top:0;width:calc(var(--tracker-height) * .3039);height:var(--tracker-height);z-index:20}
.hp-tracker-stack>.hp-tracker-under{left:calc(var(--layer) * var(--shift));top:calc(var(--layer) * var(--shift));z-index:calc(20 - var(--layer));filter:brightness(.78)}
.enemy .health.hp-fallback{display:inline-block;margin-top:4px;font-size:13px}
.intent-tip h4 span{float:right;margin-left:14px;display:inline-flex;align-items:center;gap:3px;font:700 13px system-ui;color:var(--ink)}
.intent-tip h4 span .ic{width:1.2em;height:1.2em}
.intent-tip ul{margin:8px 0 0;padding-left:16px;font-size:12px;line-height:1.35;color:var(--ink)}
.intent-tip ul b{color:var(--gold)}
.intent-tip-chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}

/* Outside combat the party bar shows who is done and who is still deciding; and the upgraded face sits beside a card that would be upgraded. */
.party-member.done{border-color:#4f8f3e;background:linear-gradient(180deg,#1f3320,#172619)}
.party-member.done strong+span{color:#9fd88d;font-weight:700}
.party-member.pending{border-color:#b68a2c;box-shadow:0 0 0 1px #b68a2c55}
.party-member.pending strong+span{color:#e5ca70}
.upgrade-pair{display:inline-flex;align-items:center;gap:10px}
.upgrade-pair .card{width:clamp(110px,16vw,170px)}
.upgrade-arrow{font-size:28px;color:var(--gold)}
.upgrade-pair .upgraded-face{filter:drop-shadow(0 0 10px #8fd28faa)}
.empower-card .upgrade-pair{display:flex}
.no-upgrade{max-width:150px;color:var(--muted);font-size:13px}

/* ---- Everything the character boards showed now sits with the player's piece (2026-10-01) ---- */
.enemy-row>.row-label{width:196px;gap:5px}
.row-hit{display:flex;flex-direction:column;align-items:center;gap:2px;margin:0;padding:3px 8px;background:none;border:1px solid transparent;border-radius:8px;color:var(--muted);font-size:12px;letter-spacing:.06em;text-transform:uppercase;cursor:default}
.row-hit:disabled{opacity:1}
.row-hit.targetable{color:var(--ink);border-color:#e5ca70;box-shadow:0 0 0 2px #e5ca7055;cursor:crosshair}
/* Energy: just the number, in a coloured disc on the portrait's corner. */
.row-energy{position:absolute;left:-12px;top:-8px;z-index:2;display:grid;place-items:center;width:42px;height:42px;border-radius:50%;border:3px solid #17110a;
  box-shadow:0 3px 8px #000b,inset 0 0 0 2px #fff5;background:radial-gradient(circle at 34% 28%,var(--e1,#ffe0a0),var(--e2,#e5a03c) 55%,var(--e3,#6b3a0f))}
.row-energy b{font:900 23px/1 Georgia,serif;color:#fff;text-shadow:0 2px 3px #000,0 0 4px #000}
.energy-base-ironclad{--e1:#ff9d8a;--e2:#d9482f;--e3:#6e170c}.energy-base-silent{--e1:#a6f0b0;--e2:#3fa65a;--e3:#134a22}.energy-base-defect{--e1:#9ccbff;--e2:#3f86e0;--e3:#10305f}
.energy-base-watcher{--e1:#d9b8ff;--e2:#8a55d0;--e3:#2e1560}.energy-downfall-guardian{--e1:#9ff0ea;--e2:#2fb7ae;--e3:#0b4a46}.energy-downfall-hexaghost{--e1:#d4ffd8;--e2:#59d68a;--e3:#0f5a2e}
.energy-downfall-hermit{--e1:#ffe0a0;--e2:#d9a23a;--e3:#6b4a10}.energy-downfall-slime-boss{--e1:#e6ff9a;--e2:#9acd32;--e3:#3f5c0a}
/* Above the portrait: consumables and Orbs. */
.row-above{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;max-width:100%}
.row-item{position:relative;display:inline-flex;align-items:center;margin:0;padding:0;background:none;border:0;color:inherit;cursor:default}
button.row-item{cursor:pointer;transition:transform .12s}button.row-item:hover{transform:translateY(-3px)}
.row-item img{width:32px;height:32px;object-fit:contain}
.row-item .soulburn-flame{width:24px;height:32px;fill:#7fe0a6;filter:drop-shadow(0 0 4px #3fd08088)}
.row-item b{position:absolute;right:-8px;bottom:-5px;min-width:19px;padding:0 4px;border-radius:10px;background:#111e;border:1px solid #fff5;color:#fff;font:800 12px/17px system-ui;text-align:center}
.row-orbs{display:inline-flex;gap:5px}
.orb-cube{display:block;width:24px;height:24px;margin:0;padding:0;border-radius:5px;border:2px solid #0009;box-shadow:inset -3px -3px 0 #0003,inset 2px 2px 0 #fff7,0 2px 4px #000a}
.orb-cube.empty{background:transparent;border:2px dashed #7a7258;box-shadow:none}
.orb-cube.orb-lightning{background:#fffd00}.orb-cube.orb-frost{background:#e8f6ff}.orb-cube.orb-dark{background:#e67eff}
button.orb-cube.choosable{cursor:pointer;outline:2px solid #fff;animation:orb-pulse .8s ease-in-out infinite alternate}
@keyframes orb-pulse{from{transform:scale(1);box-shadow:0 0 0 #fff0}to{transform:scale(1.22);box-shadow:0 0 14px #fff}}
/* Under the HP bar: Stance, Mode, Vigor, Heat and "this turn" effects. */
.row-below{display:flex;flex-direction:column;align-items:center;gap:4px;max-width:100%}
.row-stance,.row-mode,.row-vigor,.row-heat{display:inline-flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:3px}
.stance-seg,.mode-seg{padding:1px 8px;border-radius:999px;background:#2b2a24;color:#9a9a88;font:600 11px/17px system-ui;opacity:.55}
.stance-seg.current,.mode-seg.current{opacity:1;font-weight:800;box-shadow:0 0 0 2px #fff7}
.stance-calm.current{background:#9ed4ff;color:#07304a}.stance-neutral.current{background:#dcdccc;color:#222}.stance-wrath.current{background:#ff8a7a;color:#4a0d05}
.mode-attack.current{background:#ff9d8a;color:#4a0d05}.mode-defense.current{background:#a9d2f5;color:#0d3550}.mode-seg.locked{background:#1b1b1b;color:#e5ca70;opacity:1}
.vigor-chip{display:inline-flex;align-items:center;gap:2px;margin:0;padding:0 7px;border-radius:999px;border:1px solid #e5a03a88;background:#2a1c0e;color:#ffd9a0;font:700 12px/18px system-ui}
button.vigor-chip{cursor:pointer}button.vigor-chip:hover{background:#4a3012}.vigor-chip.spent{border-style:dashed}.row-vigor small{opacity:.7;font-size:11px}
.heat-pip{width:17px;height:19px;border-radius:3px;background:#2b2a24;color:#8a8a7a;font:600 10px/19px system-ui;font-style:normal;text-align:center}
.heat-pip.current{background:#7fe0a6;color:#062b16;font-weight:800;box-shadow:0 0 7px #7fe0a6}
.row-below .effect-chip{font-size:11px}

/* With the boards gone the table is a strip of bigger trays. */
.tableau{display:block}
.tableau-side{flex-direction:row;flex-wrap:wrap;gap:18px 44px}
.relic-thumb{width:100px}.power-thumb{width:118px}.potion-thumb,.potion-slot{width:100px}
.relic-slot{max-width:132px}
.tray-label{font-size:11px}
.row-stance,.row-mode{flex-wrap:nowrap}
.stance-seg,.mode-seg{padding:1px 6px;font-size:10px}

.row-heat small{margin-right:3px;font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}

/* ---- Touch screens (2026-10-01): no hover, so the hand stays fully open (the fan never jumps under a finger), the controls sit above it, and a tapped card is
   raised, enlarged and centred; a second tap plays it. ---- */
@media (hover:none){
  :root{--peek:1}
  #hand .hand-card.card{--y:var(--open)}
  #hand .hand-card[data-unplayable]{opacity:.5;filter:saturate(.6)}
  #hand .hand-card.card.previewed{--x:0;--r:0deg;--s:1.7;--y:calc(var(--open) - 150px);z-index:60;opacity:1;filter:none;outline:2px solid #e5ca70;outline-offset:1px;border-radius:9px}
  #hand .hand-card.card.selected-card{--y:calc(var(--open) - 26px)}
  #hand:has(.previewed){z-index:45}
}
/* ---- Narrow screens: the rows must not make the page wider than the screen (a wide boss card used to, which made phones zoom out and shifted the hand). ---- */
@media (max-width:759px){
  .enemy-row{gap:8px}
  .enemy-row>.row-label{width:124px}
  .enemy-row>.row-enemies{min-width:0;overflow-x:auto;justify-content:flex-start;padding-bottom:6px}
  .enemy.boss.has-tracker{--card:min(300px,calc(100vw - 230px))}
  .enemy.boss{width:auto;max-width:none}
  .row-energy{left:-8px;top:-6px;width:36px;height:36px}.row-energy b{font-size:19px}
  .hp-bar{width:104px}
  .stance-seg,.mode-seg{padding:1px 4px;font-size:9px}
}

/* Cubes on relics and powers: drawn as cubes under the card face (red where one sits, hollow where there is room). */
.thumb-cubes{display:flex;flex-wrap:wrap;justify-content:center;gap:3px;margin-top:5px;max-width:100%;pointer-events:none}
.cube-pip{display:block;width:15px;height:15px;border:1px solid #650e14;border-radius:3px;
  background:linear-gradient(135deg,#f46660 0%,#d63335 28%,#b01c24 100%);box-shadow:inset 1px 1px 0 #ffd0cb99,inset -2px -2px 0 #0004,0 1px 3px #000a}
.cube-pip.empty{background:transparent;border:1px dashed #8a7d52;box-shadow:none}
.cube-count{align-self:center;font:800 12px/1 system-ui;color:#fff}
.relic-thumb>.thumb-cubes,.power-thumb>.thumb-cubes{display:flex;padding:0;border:0;border-radius:0;font-size:inherit}

/* Pending prompts (Mode Shift?, abilities, card choices) float above the whole fan, not just above its resting tops, so a raised hand never covers them;
   the one card the pointer is on is still drawn over them while it is being read. */
#prompts{bottom:calc(var(--ch) + 16px)}
/* On a phone the Draw / Die / End turn bar sits over the fan, taller than 56px: clear it. */
@media (max-width:759px){#prompts{bottom:calc(var(--ch) + 104px)}}
@media (hover:hover){#hand:hover{z-index:45}}

/* Soulburn and Vigor tokens (Hexaghost / Guardian bags in the Downfall playtest): the real token art. */
.row-item .token-art{width:32px;height:32px}
.vigor-chip .token-art{width:22px;height:22px;margin:-2px 0}.vigor-chip .token-art+.token-art{margin-left:-6px}
.vigor-chip.spent{padding:0 8px 0 5px}.vigor-chip.spent .token-art{opacity:.8}.vigor-chip.spent small{margin-left:4px;font-size:10px}
.vigor-none{font:700 12px/18px system-ui;opacity:.55}

/* ---- Map: the characters stand in the printed row circles; rooms already visited are ticked; rooms the party can go to now pulse (2026-10-01) ---- */
.map-row-slot{position:absolute;z-index:2;width:12.6%;aspect-ratio:1;transform:translate(-50%,-50%);pointer-events:none}
.map-row-slot>img.map-row-piece{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover;box-shadow:0 2px 8px #000a;user-select:none}
.map-node-visited{opacity:1}
.map-node-fixed.map-node-visited{background:#e4dfc9b8;border-color:#bfc8a1}
.map-node-pooled.map-node-visited>img{opacity:.5}
.map-node-visited::after{content:"\2713";position:absolute;inset:0;display:grid;place-items:center;font:900 clamp(15px,3.6vw,28px)/1 system-ui;color:#2fbf5b;text-shadow:0 0 2px #fff,0 0 2px #fff,0 1px 3px #000;pointer-events:none}
.map-node-pooled.map-node-visited::after{color:#7bf0a0;text-shadow:0 0 3px #000,0 0 3px #000,0 1px 4px #000}
.map-node-choose{animation:node-pulse 1.1s ease-in-out infinite}
.map-node-choose:hover{animation:none}
.map-node-fixed.map-node-choose{background:#f7e6ad44}
@keyframes node-pulse{
  0%,100%{transform:translate(-50%,-50%) scale(1);box-shadow:0 0 0 3px #f7e6ad99,0 0 10px #f4da72}
  50%{transform:translate(-50%,-50%) scale(1.32);box-shadow:0 0 0 9px #f7e6ad44,0 0 30px #ffe27a}}
@media (prefers-reduced-motion:reduce){.map-node-choose{animation:none}}

/* Events: what was revealed stays in view while the party chooses. */
.chest-relics h3,.stage-reveal h3{margin:0 0 8px;font:700 15px Georgia,serif;color:var(--gold);letter-spacing:.04em}
.relic-faces{display:flex;flex-wrap:wrap;gap:10px}
.relic-faces img{width:clamp(84px,min(13vw,17vh),150px);height:auto;border-radius:8px;box-shadow:0 6px 18px #000c}
.stage-reveal{flex:0 0 auto;text-align:center}
.stage-reveal img{display:block;width:clamp(100px,min(15vw,24vh),190px);height:auto;margin:0 auto 8px;border-radius:9px;box-shadow:0 8px 24px #000c}
.stage-split:has(.stage-reveal)>.reward-panel{width:auto;flex:0 1 640px}
.stage-split:has(.stage-reveal)>.reward-panel.wide{flex-basis:860px}
.reward-panel.wide.relics{width:min(960px,100%)}
.reward-panel.relics .reward-card{width:clamp(110px,min(21vw,31vh),200px)}

/* ---- Party actions under the characters on the map (2026-10-02) ---- */
.row-actions{position:absolute;top:calc(100% + 5px);left:50%;transform:translateX(-50%);display:flex;gap:clamp(3px,.8vw,7px);pointer-events:auto}
.row-action,.row-move{position:relative;display:grid;place-items:center;width:clamp(28px,5.4vw,42px);height:clamp(28px,5.4vw,42px);padding:0;border:2px solid #d9bb77;border-radius:50%;cursor:pointer;
  color:#f1d483;background:radial-gradient(circle at 35% 30%,#3b4d43,#17211c 72%);box-shadow:0 3px 10px #000b,inset 0 1px 0 #ffffff1f;transition:transform .12s,box-shadow .12s,color .12s}
.row-action svg,.row-move svg{width:62%;height:62%;display:block}
.row-action:hover:not(:disabled),.row-action:focus-visible,.row-move:hover,.row-move:focus-visible{transform:translateY(-2px) scale(1.1);color:#fff6d0;box-shadow:0 5px 14px #000c,0 0 14px #f1d483aa;outline:0}
.row-action:disabled{opacity:.38;cursor:default;filter:grayscale(.6)}
.row-action.pending{border-style:dashed;color:#a1aa9d;background:#141d19}
.row-action.attention{border-color:#ff9d6b;color:#fff1d6;background:radial-gradient(circle at 35% 30%,#6b3a1f,#2a150b 72%);animation:row-ask 1.1s ease-in-out infinite}
@keyframes row-ask{0%,100%{box-shadow:0 3px 10px #000b,0 0 0 0 #ff9d6b99}50%{box-shadow:0 3px 10px #000b,0 0 0 8px #ff9d6b00,0 0 16px #ff9d6bcc}}
.map-row-slot.empty{border:2px dashed #d9bb7799;border-radius:50%}
.map-row-slot.empty .row-move{position:absolute;inset:0;width:100%;height:100%;pointer-events:auto;background:#17211c99;animation:node-pulse-soft 1.6s ease-in-out infinite}
@keyframes node-pulse-soft{0%,100%{box-shadow:0 0 0 2px #f7e6ad66}50%{box-shadow:0 0 0 6px #f7e6ad33,0 0 18px #f1d483aa}}
.map-row-slot.mine>img.map-row-piece{box-shadow:0 0 0 3px #7bd88f,0 2px 8px #000a}
@media (prefers-reduced-motion:reduce){.row-action.attention,.map-row-slot.empty .row-move{animation:none}}
.party-pop-backdrop{position:fixed;inset:0;z-index:85;display:flex;align-items:center;justify-content:center;padding:16px;background:#000a;animation:reward-in .18s ease-out}
.party-pop{width:min(560px,100%);max-height:calc(100vh - 32px);overflow-x:hidden;overflow-y:auto;padding:14px 16px 16px;border:2px solid #d9bb77;border-radius:14px;background:linear-gradient(180deg,#26342d,#141d19);box-shadow:0 12px 40px #000d;color:var(--ink)}
.party-pop header{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.party-pop header strong{font:700 18px Georgia,serif;color:var(--gold)}
.party-pop header span{color:var(--muted);font-size:13px}
.party-pop .pop-close{margin-left:auto;width:32px;height:32px;padding:0;border-radius:50%;font-size:15px}

/* ---- Max HP lost: the part of the bar the character can no longer fill is covered, like the black cubes on the old board ---- */
.hp-lost{position:absolute;inset:0 0 0 auto;background:repeating-linear-gradient(135deg,#050505 0 4px,#1e1e1e 4px 8px);box-shadow:inset 2px 0 0 #d9bb7799,inset 0 2px 4px #000a}

/* ---- Waiting for another player (multiplayer combat) ---- */
.wait-banner.wait-floating{position:fixed;top:62px;left:50%;transform:translateX(-50%);z-index:55;max-width:min(92vw,720px);margin:0;padding:9px 18px;text-align:center;font:600 15px/1.35 system-ui;
  color:#f7e6ad;border:2px solid #d9bb77;border-radius:999px;background:linear-gradient(180deg,#26342d,#141d19);box-shadow:0 8px 28px #000c;pointer-events:none}
.wait-banner.wait-floating::before{content:"\23F3";margin-right:8px}
@media(max-width:640px){.wait-banner.wait-floating{top:54px;font-size:13.5px;padding:7px 14px;border-radius:14px}}

/* ---- Hot-seat: "play as" buttons on the full-screen stages (their overlay covers the player strip) ---- */
.seat-switch{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:2;display:flex;flex-wrap:wrap;justify-content:center;gap:6px;max-width:calc(100vw - 440px)}
.seat-switch button{display:flex;align-items:center;gap:6px;padding:4px 12px 4px 6px;border-radius:999px;background:#1b2522e6;font-size:13px;max-width:210px}
.seat-switch button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.seat-switch button.active-seat{border-color:#d9bb77;box-shadow:0 0 0 2px #d9bb7766}
.seat-switch button.pending::after{content:"";width:9px;height:9px;border-radius:50%;background:#ffb347;flex:none}
.seat-switch button.done::after{content:"\2713";color:#7bd88f;font-weight:700;flex:none}
@media(max-width:900px){.seat-switch{left:10px;right:10px;top:52px;transform:none;max-width:none;justify-content:flex-start}}

/* ---- Hand dock: Energy above the Draw pile, Draw and Die side by side ---- */
.dock-energy{display:inline-flex;align-items:center;gap:8px;padding:3px 14px 3px 4px;border-radius:999px;background:#1b2322ee;border:1px solid var(--line)}
.dock-energy[hidden]{display:none}
.dock-energy .row-energy{position:static;width:40px;height:40px;flex:none}
.dock-energy-label{font-size:12px;color:var(--muted);letter-spacing:.04em}
.dock-piles{display:flex;align-items:center;gap:6px}
@media(max-width:759px){.dock-energy{padding:2px}.dock-energy-label{display:none}.dock-energy .row-energy{width:34px;height:34px}}

/* ---- Room code: the host shares it, a friend types it ---- */
.room-code{display:inline-flex;align-items:center;gap:14px;margin:6px 0 14px;padding:8px 8px 8px 16px;border:2px solid #d9bb77;border-radius:14px;background:linear-gradient(180deg,#26342d,#141d19)}
.room-code span{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.room-code strong{font:900 34px/1 Georgia,serif;letter-spacing:.22em;color:#f7e6ad;user-select:all}
.join-room{max-width:460px;margin:12px auto;padding:16px 18px;border:1px solid var(--line);border-radius:12px;background:var(--panel);display:grid;gap:10px}
.join-room label{display:grid;gap:4px;color:var(--muted);font-size:13px}
.join-room input{padding:10px 12px;font:800 26px/1 Georgia,serif;letter-spacing:.3em;text-transform:uppercase;text-align:center;border:1px solid var(--line);border-radius:8px;background:#0b110e;color:var(--ink)}
.join-message{margin:0;min-height:1.3em;color:var(--muted)}.join-message.bad{color:#ff9d8f}
.join-seats{display:grid;gap:6px}
.join-seats button{padding:10px 12px;text-align:left}

/* Touch screens: the 32 px Shiv / Miracle / Soulburn tokens get a 44 px tap area (the count badge stays where it was). */
@media (pointer:coarse){button.row-item::before{content:"";position:absolute;inset:-6px}}
