/* Desktop battle HUD — 「符文祭坛」. Every selector starts at .pg-battle (optionally after body.desktop-game / element / id).
   Geometry variables (--pgb-*) are written by page-battle.mjs on section.game-layout.pg-battle; blocks never share a band. */

/* Added layers are desktop-battle only. */
.pg-battle .pg-battle-altar,.pg-battle .pg-battle-lethal,.pg-battle .pg-battle-plaque,.pg-battle .pg-battle-pause,.pg-battle .pg-battle-combo,.pg-battle .pg-battle-reveal,.pg-battle .pg-battle-layerbanner,.pg-battle .pg-battle-effects,.pg-battle .pg-battle-heart,.pg-battle .pg-battle-ghost,.pg-battle .pg-battle-phase,.pg-battle .pg-battle-seal,.pg-battle .pg-battle-btn-label{display:none}

@media (min-width:1000px){
  body.desktop-game.desktop-battle .pg-battle{--pgb-gold:#f1d896;--pgb-ivory:#efe6d2;--pgb-serif:var(--uk-serif,"RuneSerif","Noto Serif SC",serif);--pgb-t:clamp(12px,calc(var(--pgb-c,90px)*.17),19px)}

  /* ---------- retired legacy bits (kept in the DOM for scripts and screen readers) */
  body.desktop-game.desktop-battle .pg-battle .battle-topline,body.desktop-game.desktop-battle .pg-battle .squad-section .section-heading,body.desktop-game.desktop-battle .pg-battle .board-heading .eyebrow,
  body.desktop-game.desktop-battle .pg-battle #active-effects,body.desktop-game.desktop-battle .pg-battle .combo-overlay,body.desktop-game.desktop-battle .pg-battle .hero-portrait,body.desktop-game.desktop-battle .pg-battle .hero-element,
  body.desktop-game.desktop-battle .pg-battle .hero-card:after,body.desktop-game.desktop-battle .pg-battle .hero-card:before,body.desktop-game.desktop-battle .pg-battle .sword-icon,body.desktop-game.desktop-battle .pg-battle .board-hint svg,
  body.desktop-game.desktop-battle .pg-battle .skill-cutin-copy span,body.desktop-game.desktop-battle .pg-battle .pg-battle-btn>svg,body.desktop-game.desktop-battle .pg-battle .pg-battle-btn>span:not(.uk-btn-label){display:none!important}
  body.desktop-game.desktop-battle .pg-battle .hero-ready,body.desktop-game.desktop-battle .pg-battle .health-label>span:first-child{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

  /* ---------- altar backdrop (decoration only) */
  body.desktop-game.desktop-battle .pg-battle .pg-battle-altar{display:block;position:fixed;left:calc(var(--pgb-x) - var(--pgb-padx));right:0;top:var(--pgb-head);bottom:0;z-index:11;pointer-events:none;background:#06090d}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-altar-art{position:absolute;left:0;top:0;width:100%;height:100%;background:url("./assets/pages/battle/altar.webp") center top/cover no-repeat;-webkit-mask-image:linear-gradient(90deg,transparent,#000 22px);mask-image:linear-gradient(90deg,transparent,#000 22px);filter:brightness(.9)}
  /* never draw the 1696×2528 backdrop above its own pixels on very dense screens (the column's dark base fills the rest) */
  body.desktop-game.desktop-battle .pg-battle .pg-battle-altar-art{max-width:calc(1696px/var(--pgb-dpr,1));max-height:calc(2528px/var(--pgb-dpr,1))}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-altar:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#05090ec0,transparent 14%,transparent 82%,#05090ed0)}

  /* ---------- hero row: kit cards inside the real roster buttons */
  body.desktop-game.desktop-battle .pg-battle .squad-section{position:fixed;left:calc(var(--pgb-x) + var(--pgb-padx));top:var(--pgb-roster-top);width:calc(var(--pgb-a) - 2*var(--pgb-padx));z-index:12;margin:0;padding:0}
  body.desktop-game.desktop-battle .pg-battle #hero-roster{display:grid;grid-template-columns:repeat(6,var(--pgb-cw));column-gap:var(--pgb-cg);gap:0 var(--pgb-cg);height:var(--pgb-roster-h);align-items:start;margin:0}
  body.desktop-game.desktop-battle .pg-battle .hero-card{position:relative;display:block;width:var(--pgb-cw);height:var(--pgb-ch);min-height:0;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible;color:inherit;opacity:1;transition:transform .18s ease,filter .18s ease}
  body.desktop-game.desktop-battle .pg-battle .hero-card:hover{transform:translateY(-3px);filter:brightness(1.1)}
  body.desktop-game.desktop-battle .pg-battle .hero-card:focus-visible{outline:2px solid var(--pgb-gold);outline-offset:3px}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-card{position:absolute;inset:0;display:block;pointer-events:none}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-card .uk-card{--uk-cw:var(--pgb-cw);cursor:inherit}
  body.desktop-game.desktop-battle .pg-battle .hero-card.pgb-cooling .uk-card-art,body.desktop-game.desktop-battle .pg-battle .hero-card.pgb-sealed .uk-card-art{filter:brightness(.6) saturate(.55)}
  body.desktop-game.desktop-battle .pg-battle .hero-card.pgb-ready .pg-battle-card:after{content:"";position:absolute;inset:-3% -4%;border-radius:7px;z-index:7;pointer-events:none;box-shadow:0 0 0 2px #f6dc93,0 0 calc(var(--pgb-cw)*.18) calc(var(--pgb-cw)*.05) #ffcf6e99;animation:pg-battle-breathe 2.2s ease-in-out infinite}
  body.desktop-game.desktop-battle .pg-battle .hero-name{position:absolute;left:0;right:0;top:calc(100% + 4px);bottom:auto;margin:0;display:block;text-align:center;font:700 clamp(12px,calc(var(--pgb-cw)*.15),17px)/1.1 var(--pgb-serif);letter-spacing:.06em;color:#eadcb9;text-shadow:0 1px 2px #000,0 0 6px #000;white-space:nowrap;overflow:hidden;text-overflow:clip;z-index:1}
  body.desktop-game.desktop-battle .pg-battle.pgb-compact .hero-name{display:none}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-dial{position:absolute;right:-7%;bottom:-6%;z-index:8;width:calc(var(--pgb-cw)*.44);aspect-ratio:1;display:grid;place-items:center;background:url("./assets/pages/battle/dial.webp") center/contain no-repeat;filter:drop-shadow(0 2px 3px #000c);pointer-events:none}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-dial b{font:700 calc(var(--pgb-cw)*.2)/1 var(--pgb-serif);color:#f3e7c8;text-shadow:0 1px 2px #000;font-variant-numeric:tabular-nums}
  body.desktop-game.desktop-battle .pg-battle .hero-card.pgb-ready .pg-battle-dial{right:50%;transform:translateX(50%);bottom:3%;width:auto;aspect-ratio:auto;white-space:nowrap;padding:2px calc(var(--pgb-cw)*.1);background:linear-gradient(180deg,#f6e2a8,#c9a25a);border-radius:3px;box-shadow:0 0 0 1px #6b4a17,0 0 10px #ffd27a99}
  body.desktop-game.desktop-battle .pg-battle .hero-card.pgb-ready .pg-battle-dial b{font-size:max(12px,calc(var(--pgb-cw)*.15));color:#3a2410;text-shadow:none;letter-spacing:.1em}
  body.desktop-game.desktop-battle .pg-battle .hero-card.pgb-sealed .pg-battle-dial b{color:#ffb9a8}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-chain{position:absolute;left:-10%;right:-10%;top:24%;height:52%;z-index:7;background:url("./assets/pages/battle/chain.webp") center/contain no-repeat;transform:rotate(-12deg);filter:drop-shadow(0 3px 3px #000);pointer-events:none}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-motes{position:absolute;inset:0;z-index:7;pointer-events:none;overflow:visible}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-motes i{position:absolute;bottom:12%;width:4px;height:4px;border-radius:50%;background:#ffe9a8;box-shadow:0 0 6px #ffd27a;opacity:0;animation:pg-battle-mote 2.6s ease-out infinite}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-motes i:nth-child(1){left:18%;animation-delay:0s}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-motes i:nth-child(2){left:44%;animation-delay:.7s}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-motes i:nth-child(3){left:68%;animation-delay:1.3s}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-motes i:nth-child(4){left:84%;animation-delay:1.9s}
  body.desktop-game.desktop-battle .pg-battle .hero-damage-value,body.desktop-game.desktop-battle .pg-battle .hero-charge{position:absolute;left:50%;right:auto;top:auto;bottom:calc(100% - var(--pgb-ch)*.12);transform:translateX(-50%);z-index:9;font:700 clamp(13px,calc(var(--pgb-cw)*.19),22px)/1 var(--pgb-serif);color:#ffe7a6;text-shadow:0 0 3px #000,0 1px 2px #000,0 0 10px #000;white-space:nowrap;pointer-events:none}
  body.desktop-game.desktop-battle .pg-battle .hero-damage-value.zero{color:#9aa3a8}

  /* ---------- the stone altar column: life gauge, status line, board frame, hint, buttons */
  body.desktop-game.desktop-battle .pg-battle .board-panel{position:fixed;left:calc(var(--pgb-x) + var(--pgb-padx));top:var(--pgb-panel-top);width:calc(var(--pgb-a) - 2*var(--pgb-padx));height:var(--pgb-panel-h);box-sizing:border-box;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;z-index:12}
  body.desktop-game.desktop-battle .pg-battle .board-heading,body.desktop-game.desktop-battle .pg-battle .move-status{display:contents}

  body.desktop-game.desktop-battle .pg-battle .player-health{position:absolute;left:0;right:0;top:0;height:var(--pgb-hp);margin:0;display:flex;align-items:center;gap:calc(var(--pgb-hp)*.12)}
  body.desktop-game.desktop-battle .pg-battle .player-health-track{position:relative;flex:1;min-width:0;height:var(--pgb-hp);box-sizing:border-box;border-radius:0;overflow:hidden;border-style:solid;border-color:transparent;border-width:calc(var(--pgb-hp)*130/386) calc(var(--pgb-hp)*83/386) calc(var(--pgb-hp)*121/386) calc(var(--pgb-hp)*390/386);border-image:url("./assets/pages/battle/gauge.webp") 130 83 121 390 fill/calc(var(--pgb-hp)*130/386) calc(var(--pgb-hp)*83/386) calc(var(--pgb-hp)*121/386) calc(var(--pgb-hp)*390/386) stretch;background:#0b0f10;background-clip:padding-box;filter:drop-shadow(0 3px 5px #000a)}
  body.desktop-game.desktop-battle .pg-battle #player-health-fill{background:linear-gradient(180deg,#9df0a0 0%,#44c46b 38%,#1f8a49 72%,#145c33 100%)!important;box-shadow:inset 0 2px 2px #ffffff40,inset 0 -2px 3px #00000060;overflow:hidden}
  body.desktop-game.desktop-battle .pg-battle #player-health-fill:after{content:"";position:absolute;inset:0 -40% 0 -40%;background:repeating-linear-gradient(100deg,transparent 0 22px,#ffffff1f 22px 30px,transparent 30px 52px);animation:pg-battle-liquid 3.2s linear infinite}
  body.desktop-game.desktop-battle .pg-battle .pgb-low #player-health-fill{background:linear-gradient(180deg,#ffb0a0 0%,#e0503e 40%,#a3221a 75%,#5e0d09 100%)!important}
  body.desktop-game.desktop-battle .pg-battle #player-health-ghost{background:linear-gradient(180deg,#8c2a22,#561410)}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-heart{display:block;position:absolute;left:calc(var(--pgb-hp)*.12);top:50%;width:calc(var(--pgb-hp)*.7);height:calc(var(--pgb-hp)*.7);transform:translateY(-50%);background:url("./assets/pages/_kit/icon-heart.webp") center/contain no-repeat;filter:drop-shadow(0 0 4px #ff6b6b88);pointer-events:none;z-index:2}
  body.desktop-game.desktop-battle .pg-battle .pgb-low .pg-battle-heart{animation:pg-battle-heartbeat .9s ease-in-out infinite;filter:drop-shadow(0 0 8px #ff3b2b) saturate(1.4)}
  body.desktop-game.desktop-battle .pg-battle .health-label{position:absolute;left:calc(var(--pgb-hp)*1.05);right:calc(var(--pgb-hp)*.25 + var(--pgb-fx-w,0px));top:0;bottom:0;margin:0;display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:3}
  body.desktop-game.desktop-battle .pg-battle #player-health-text{font:700 clamp(12px,calc(var(--pgb-hp)*.36),20px)/1 var(--pgb-serif);color:#fff6e0;text-shadow:0 0 3px #000,0 1px 2px #000,0 0 8px #000;font-variant-numeric:tabular-nums;letter-spacing:.04em}
  body.desktop-game.desktop-battle .pg-battle #player-health-text span{font-size:max(12px,.86em);color:#e3ddcc}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-effects{display:flex;flex:none;align-items:center;gap:4px;height:100%}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-effects:empty{display:none}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-crystal{position:relative;display:inline-flex;align-items:center;gap:4px;height:calc(var(--pgb-hp)*.72);padding:0 8px 0 calc(var(--pgb-hp)*.5);border-radius:calc(var(--pgb-hp)*.36);background:radial-gradient(circle at calc(var(--pgb-hp)*.28) 50%,#bfe9ff 0 calc(var(--pgb-hp)*.12),#3d8fe0 calc(var(--pgb-hp)*.2),transparent calc(var(--pgb-hp)*.24)),linear-gradient(180deg,#25364a,#121c28);box-shadow:inset 0 0 0 1px #9fb8d688,0 2px 4px #000a;color:#e7f1ff;white-space:nowrap}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-crystal em{font:700 max(12px,calc(var(--pgb-hp)*.3))/1 var(--pgb-serif);font-style:normal}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-crystal b{font:700 max(12px,calc(var(--pgb-hp)*.3))/1 var(--pgb-serif);color:var(--pgb-gold)}

  body.desktop-game.desktop-battle .pg-battle .player-health-track:before{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;opacity:0;background:linear-gradient(90deg,transparent 0%,#d9ffd0cc 45%,transparent 60%) -120% 0/60% 100% no-repeat}
  body.desktop-game.desktop-battle .pg-battle .player-health-track.pgb-heal:before{animation:pg-battle-heal .8s ease-out both}
  body.desktop-game.desktop-battle .pg-battle .player-health-track.pgb-hurt{animation:pg-battle-wobble .42s ease-in-out}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-dial.is-tick{animation:pg-battle-tick .45s cubic-bezier(.3,1.6,.5,1)}
  body.desktop-game.desktop-battle .pg-battle #enemy-conditions .condition-chip.is-lit b{animation:pg-battle-lit .9s ease-out}
  body.desktop-game.desktop-battle .pg-battle .board-wrap:after{content:"";position:absolute;inset:calc(-180px*var(--pgb-fs));pointer-events:none;opacity:0;border-radius:8px;box-shadow:0 0 calc(var(--pgb-c)*.5) calc(var(--pgb-c)*.14) var(--pgb-burst,#f1d896),inset 0 0 calc(var(--pgb-c)*.45) calc(var(--pgb-c)*.06) var(--pgb-burst,#f1d896)}
  body.desktop-game.desktop-battle .pg-battle .board-wrap.pgb-burst:after{animation:pg-battle-burst .95s ease-out}
  body.desktop-game.desktop-battle .pg-battle .board-wrap[data-burst="fire"]{--pgb-burst:#ff6938aa}
  body.desktop-game.desktop-battle .pg-battle .board-wrap[data-burst="water"]{--pgb-burst:#44ceffaa}
  body.desktop-game.desktop-battle .pg-battle .board-wrap[data-burst="wood"]{--pgb-burst:#7cf177aa}
  body.desktop-game.desktop-battle .pg-battle .board-wrap[data-burst="light"]{--pgb-burst:#ffe883aa}
  body.desktop-game.desktop-battle .pg-battle .board-wrap[data-burst="dark"]{--pgb-burst:#c483ffaa}

  /* status line between the medallions: 命运棋盘 · 准备就绪 */
  body.desktop-game.desktop-battle .pg-battle .board-heading h2{position:absolute;top:var(--pgb-zone-top);height:var(--pgb-zone);right:50%;left:auto;margin:0;padding-right:calc(var(--pgb-c)*.12);display:flex;align-items:center;font:700 var(--pgb-t)/1 var(--pgb-serif);letter-spacing:.2em;white-space:nowrap;background:linear-gradient(180deg,#f6e2a8,#c9a25a);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 1px 1px #000)}
  body.desktop-game.desktop-battle .pg-battle #move-label{position:absolute;top:var(--pgb-zone-top);height:var(--pgb-zone);left:50%;max-width:calc(50% - var(--pgb-c)*.8);display:flex;align-items:center;gap:6px;font:600 max(12px,calc(var(--pgb-t)*.92))/1 var(--pgb-serif);letter-spacing:.1em;color:#d9e6dc;white-space:nowrap;overflow:hidden;text-shadow:0 1px 2px #000}
  body.desktop-game.desktop-battle .pg-battle #move-label .live-dot{width:7px;height:7px;margin:0 2px 0 0;background:radial-gradient(circle at 35% 35%,#e9ffe9,#6fd36f 60%,#2b6b2b);box-shadow:0 0 8px #6fd36f}
  body.desktop-game.desktop-battle .pg-battle .turn-badge,body.desktop-game.desktop-battle .pg-battle #move-seconds{position:absolute;top:var(--pgb-zone-top);width:calc(var(--pgb-c)*.84);height:calc(var(--pgb-c)*.84);z-index:4;margin:0;padding:0;border:0;display:grid;gap:0;place-items:center;align-content:center;font-size:0!important;line-height:0;letter-spacing:0;background:url("./assets/pages/_kit/icon-medal.webp") center/contain no-repeat;filter:drop-shadow(0 3px 5px #000c);color:var(--pgb-gold)}
  body.desktop-game.desktop-battle .pg-battle .turn-badge{left:calc(var(--pgb-c)*-.12)}
  body.desktop-game.desktop-battle .pg-battle #move-seconds{right:calc(var(--pgb-c)*-.12);left:auto}
  body.desktop-game.desktop-battle .pg-battle .turn-badge b{font:700 calc(var(--pgb-c)*.26)/1 var(--pgb-serif);color:#f6e2a8;letter-spacing:0;text-shadow:0 1px 2px #000;font-variant-numeric:tabular-nums}
  body.desktop-game.desktop-battle .pg-battle .turn-badge:before{content:"回合";display:block;font:700 max(11px,calc(var(--pgb-c)*.105))/1 var(--pgb-serif);color:#cdb98a;margin-bottom:1px;letter-spacing:.06em;text-indent:.06em}
  body.desktop-game.desktop-battle .pg-battle #move-seconds:before{content:"";display:block;width:calc(var(--pgb-c)*.17);height:calc(var(--pgb-c)*.2);margin:0 auto 1px;background:url("./assets/pages/_kit/icon-hourglass.webp") center/contain no-repeat}
  body.desktop-game.desktop-battle .pg-battle #move-seconds b{margin:0;font:700 max(12px,calc(var(--pgb-c)*.19))/1 var(--pgb-serif);color:#f6e2a8;text-shadow:0 1px 2px #000;font-variant-numeric:tabular-nums}

  /* board frame: black stone + gold, 9-slice; the timer glows inside the top channel */
  body.desktop-game.desktop-battle .pg-battle .board-wrap{position:absolute;left:0;right:0;top:var(--pgb-frame-top);height:var(--pgb-frame-h);box-sizing:border-box;margin:0;padding:calc(var(--pgb-c)*.04);border-radius:0;border-style:solid;border-color:transparent;border-width:calc(396px*var(--pgb-fs)) calc(345px*var(--pgb-fs)) calc(341px*var(--pgb-fs)) calc(346px*var(--pgb-fs));border-image:url("./assets/pages/battle/frame.webp") 396 345 341 346/calc(396px*var(--pgb-fs)) calc(345px*var(--pgb-fs)) calc(341px*var(--pgb-fs)) calc(346px*var(--pgb-fs)) stretch;background:#05090c url("./assets/orbs/board-stone.webp") center/var(--board-stone-tile,512px) repeat;background-clip:padding-box;box-shadow:none;overflow:visible;filter:drop-shadow(0 8px 16px #000b)}
  body.desktop-game.desktop-battle .pg-battle #board{width:100%;box-sizing:border-box;gap:calc(var(--pgb-c)*.025);padding:calc(var(--pgb-c)*.03);border:0;border-radius:0;background:#020507a8;box-shadow:inset 0 3px 18px #000d}
  body.desktop-game.desktop-battle .pg-battle .timer-track{position:absolute;left:calc(520px*var(--pgb-fs));right:calc(485px*var(--pgb-fs));top:calc(var(--pgb-frame-top) + 96px*var(--pgb-fs) + 2px);height:calc(112px*var(--pgb-fs) - 4px);margin:0;z-index:3;border-radius:99px;background:#0a0603;box-shadow:inset 0 1px 3px #000;overflow:hidden}
  body.desktop-game.desktop-battle .pg-battle #timer-fill{transform-origin:center;border-radius:99px;background:linear-gradient(180deg,#fff2c4,#f0c35a 45%,#a8701e)!important;box-shadow:0 0 10px #ffcf6e,inset 0 1px 1px #fffbe6}
  body.desktop-game.desktop-battle .pg-battle #timer-fill[style*="rgb(209"],body.desktop-game.desktop-battle .pg-battle #timer-fill[style*="d17a65"]{background:linear-gradient(180deg,#ffd0c4,#e0503e 45%,#8d1d14)!important;box-shadow:0 0 12px #ff6b55}
  body.desktop-game.desktop-battle .pg-battle .board-hint{position:absolute;top:var(--pgb-hint-top);left:10%;right:10%;height:var(--pgb-hint);min-height:0;box-sizing:border-box;margin:0;padding:0 calc(var(--pgb-hint)*.9);display:flex;align-items:center;justify-content:center;border-style:solid;border-color:transparent;border-width:calc(var(--pgb-hint)*120/635) calc(var(--pgb-hint)*620/635);border-image:url("./assets/desktop/nav/plaque.webp") 120 620 fill/calc(var(--pgb-hint)*120/635) calc(var(--pgb-hint)*620/635) stretch;font:600 clamp(var(--uk-min,12px),calc(var(--pgb-hint)*.4),17px)/1.2 var(--uk-sans,sans-serif);color:#eadfc4;text-shadow:0 1px 2px #000;white-space:nowrap;overflow:hidden}
  body.desktop-game.desktop-battle .pg-battle .board-hint span{overflow:hidden;text-overflow:ellipsis}
  body.desktop-game.desktop-battle .pg-battle.pgb-compact .board-hint{display:none}
  body.desktop-game.desktop-battle .pg-battle .board-actions{position:absolute;left:0;right:0;top:calc(var(--pgb-panel-h) + var(--pgb-g));height:var(--pgb-row);margin:0;padding:0;border:0;display:flex;align-items:flex-start;justify-content:space-between;gap:0}
  body.desktop-game.desktop-battle .pg-battle .board-actions .pg-battle-btn{--uk-bh:var(--pgb-btn);width:var(--pgb-btn-w);min-width:0;margin:0;font-size:0!important;opacity:1}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-btn .uk-btn-label{display:inline;font:700 clamp(14px,calc(var(--pgb-btn)*.36),24px)/1 var(--pgb-serif)!important;letter-spacing:.12em}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-btn:disabled{opacity:1}

  /* this turn: damage / combo / best combo on three medals between the buttons */
  body.desktop-game.desktop-battle .pg-battle .turn-result{position:fixed;top:var(--pgb-actions-top);height:var(--pgb-row);left:calc(var(--pgb-x) + var(--pgb-padx) + var(--pgb-btn-w) + var(--pgb-g));width:calc(var(--pgb-a) - 2*var(--pgb-padx) - 2*var(--pgb-btn-w) - 2*var(--pgb-g));box-sizing:border-box;margin:0;padding:0;border:0;background:none;z-index:12;display:grid;grid-template-columns:repeat(3,1fr);align-items:start}
  body.desktop-game.desktop-battle .pg-battle .turn-result>div{display:flex;flex-direction:column;align-items:center;gap:2px;padding:0;border:0;min-width:0}
  body.desktop-game.desktop-battle .pg-battle .turn-result strong{order:0;display:grid;place-items:center;width:var(--pgb-medal);height:var(--pgb-medal);margin:0;background:url("./assets/pages/_kit/icon-medal.webp") center/contain no-repeat;font:700 max(12px,calc(var(--pgb-medal)*.3))/1 var(--pgb-serif);color:#f6e2a8;text-shadow:0 1px 2px #000;font-variant-numeric:tabular-nums;filter:sepia(.35) saturate(.85) drop-shadow(0 3px 4px #000b)}
  body.desktop-game.desktop-battle .pg-battle .turn-result small{display:none}
  body.desktop-game.desktop-battle .pg-battle #damage-total{position:relative;font-size:0}
  body.desktop-game.desktop-battle .pg-battle #damage-total:after{content:attr(data-short);position:absolute;inset:0;display:grid;place-items:center;font:700 max(12px,calc(var(--pgb-medal)*.24))/1 var(--pgb-serif);letter-spacing:-.04em;white-space:nowrap}
  body.desktop-game.desktop-battle .pg-battle .turn-result span{order:1;display:block;font:600 var(--pgb-label)/1.1 var(--pgb-serif);color:#cdbf9c;letter-spacing:0;white-space:nowrap;text-shadow:0 1px 2px #000}

  /* ---------- battlefield: boss banner (Elden-Ring-like: big name, long thin bar, trailing gold chunk) */
  body.desktop-game.desktop-battle .pg-battle .enemy-info{position:absolute;left:calc(var(--pgb-bf-left) + 14px);right:auto;top:var(--pgb-band-top);width:calc(var(--pgb-info-right) - var(--pgb-bf-left) - 14px);height:calc(var(--pgb-band-h) - 8px);max-width:none;transform:none;bottom:auto;margin:0;padding:0;border:0;background:none;z-index:5;pointer-events:none;display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:auto auto auto;column-gap:10px;row-gap:2px;align-content:center;text-shadow:none}
  body.desktop-game.desktop-battle .pg-battle .enemy-info:before{content:"";position:absolute;inset:-10px -30px -12px -40px;z-index:-1;background:radial-gradient(ellipse at 40% 55%,#020407c0,transparent 72%);pointer-events:none}
  body.desktop-game.desktop-battle .pg-battle .enemy-health-row{display:contents}
  body.desktop-game.desktop-battle .pg-battle .enemy-kicker{grid-row:1;grid-column:2;margin:0;font:600 clamp(12px,.75vw,15px)/1.2 var(--pgb-serif);letter-spacing:.14em;color:#c9b98f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 2px #000,0 0 6px #000}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-phase{grid-row:1;grid-column:3;display:flex;gap:5px;justify-self:end;align-self:center}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-phase i{width:11px;height:11px;transform:rotate(45deg);background:#2a2420;box-shadow:0 0 0 1px #8a6a32}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-phase i.is-on{background:linear-gradient(135deg,#ffe9a8,#e0a73a);box-shadow:0 0 0 1px #6b4a17,0 0 8px #ffcf6e}
  body.desktop-game.desktop-battle .pg-battle .enemy-info h2{grid-row:2;grid-column:2;margin:0;max-width:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:700 clamp(24px,calc(var(--pgb-bf-w)*.03),40px)/1.15 var(--pgb-serif);letter-spacing:.14em;color:var(--pgb-ivory);text-shadow:0 2px 3px #000,0 0 16px #000,0 0 30px #00000099}
  body.desktop-game.desktop-battle .pg-battle #enemy-health-text{grid-row:2;grid-column:3;align-self:end;justify-self:end;margin:0 0 3px;font:700 clamp(12px,.8vw,15px)/1 var(--pgb-serif);letter-spacing:.04em;color:#eadfc8;font-variant-numeric:tabular-nums;white-space:nowrap;text-shadow:0 1px 2px #000,0 0 6px #000}
  body.desktop-game.desktop-battle .pg-battle #enemy-element{grid-row:3;grid-column:1;align-self:center;width:34px;height:34px;margin:0;border:0;border-radius:50%;font-size:0;color:transparent;background:radial-gradient(circle,#0b1622 54%,transparent 56%),conic-gradient(from 210deg,#8a6a32,#f1d896,#b48a43,#f6e2a8,#8a6a32);box-shadow:0 2px 5px #000b;position:relative}
  body.desktop-game.desktop-battle .pg-battle #enemy-element:after{content:"";position:absolute;inset:9%;border-radius:50%;background:center/contain no-repeat}
  body.desktop-game.desktop-battle .pg-battle #enemy-element.fire:after{background-image:url("./assets/orbs/fire-128.webp")}
  body.desktop-game.desktop-battle .pg-battle #enemy-element.water:after{background-image:url("./assets/orbs/water-128.webp")}
  body.desktop-game.desktop-battle .pg-battle #enemy-element.wood:after{background-image:url("./assets/orbs/wood-128.webp")}
  body.desktop-game.desktop-battle .pg-battle #enemy-element.light:after{background-image:url("./assets/orbs/light-128.webp")}
  body.desktop-game.desktop-battle .pg-battle #enemy-element.dark:after{background-image:url("./assets/orbs/dark-128.webp")}
  body.desktop-game.desktop-battle .pg-battle .enemy-health-track{grid-row:3;grid-column:2/4;position:relative;flex:none;min-width:0;max-width:none;height:38px;box-sizing:border-box;border-radius:0;overflow:hidden;border-style:solid;border-color:transparent;border-width:16px 29px 10px 29px;border-image:url("./assets/pages/battle/bossbar.webp") 165 295 100 290/16px 29px 10px 29px stretch;background:#120706;background-clip:padding-box;box-shadow:none;filter:drop-shadow(0 3px 6px #000c)}
  body.desktop-game.desktop-battle .pg-battle #enemy-health-fill{position:relative;z-index:1;height:100%;background:linear-gradient(180deg,#e0634a 0%,#b3261a 40%,#7d140d 80%,#5a0d08 100%);box-shadow:inset 0 1px 1px #ffb19f88;transition:width .35s ease-out}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-ghost{display:block;position:absolute;inset:0;z-index:0;transform-origin:left center;background:linear-gradient(180deg,#fff0b0,#e8b84a 50%,#a36d18)}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-ghost.is-falling{transition:transform .9s cubic-bezier(.5,0,.6,1)}

  /* attack countdown seal at the right end of the banner */
  body.desktop-game.desktop-battle .pg-battle .battle-bottom{position:absolute;left:calc(var(--pgb-info-right) + 18px);right:auto;top:var(--pgb-band-top);bottom:auto;width:calc(var(--pgb-intent-w) + 14px + var(--pgb-seal));height:calc(var(--pgb-band-h) - 8px);transform:none;margin:0;padding:0 calc(var(--pgb-seal) + 14px) 0 0;box-sizing:border-box;border:0;background:none;z-index:5;pointer-events:none;display:flex;align-items:center;justify-content:flex-end}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-seal{display:block;position:absolute;right:0;top:50%;width:var(--pgb-seal);height:var(--pgb-seal);transform:translateY(-50%);background:url("./assets/pages/battle/seal.webp") center/contain no-repeat;filter:drop-shadow(0 4px 8px #000d)}
  body.desktop-game.desktop-battle .pg-battle .battle-bottom.pgb-urgent .pg-battle-seal{filter:sepia(1) saturate(4) hue-rotate(-28deg) brightness(.95) drop-shadow(0 0 12px #ff4a2acc);animation:pg-battle-pulse 1s ease-in-out infinite}
  body.desktop-game.desktop-battle .pg-battle .battle-bottom.pgb-lethal .pg-battle-seal:after{content:"☠";position:absolute;right:-4%;top:-8%;font:700 calc(var(--pgb-seal)*.3)/1 serif;color:#fff1ec;text-shadow:0 0 6px #ff2a12,0 1px 2px #000}
  body.desktop-game.desktop-battle .pg-battle .enemy-intent{display:block;text-align:right;margin:0;color:#eadfc8;font:600 clamp(13px,.78vw,15px)/1.35 var(--pgb-serif);letter-spacing:.06em;text-shadow:0 1px 2px #000,0 0 8px #000}
  body.desktop-game.desktop-battle .pg-battle .enemy-intent>div{font:inherit;color:inherit;letter-spacing:inherit}
  body.desktop-game.desktop-battle .pg-battle #enemy-intent-title{display:block;font-size:1.08em;color:#f3d79a}
  body.desktop-game.desktop-battle .pg-battle .enemy-intent small{display:block;margin-top:3px;font:600 clamp(12px,.72vw,14px)/1.35 var(--pgb-serif);color:#d8ccb2}
  body.desktop-game.desktop-battle .pg-battle .enemy-intent small>span:first-of-type{display:none}
  body.desktop-game.desktop-battle .pg-battle #enemy-attack{display:block;margin-top:2px;white-space:nowrap}
  body.desktop-game.desktop-battle .pg-battle #enemy-countdown{position:absolute;right:0;top:50%;width:var(--pgb-seal);transform:translateY(-50%);text-align:center;font:700 calc(var(--pgb-seal)*.42)/1 var(--pgb-serif);color:#ffe7b0;text-shadow:0 2px 3px #000,0 0 12px #000}
  body.desktop-game.desktop-battle .pg-battle .battle-bottom.pgb-urgent #enemy-countdown{color:#fff}
  body.desktop-game.desktop-battle .pg-battle #enemy-intent-detail:before{content:attr(data-cd)}
  body.desktop-game.desktop-battle .pg-battle .boss-with-guards .enemy-info,body.desktop-game.desktop-battle .pg-battle .boss-with-guards .battle-bottom{display:grid}
  body.desktop-game.desktop-battle .pg-battle .boss-with-guards .battle-bottom{display:flex}
  body.desktop-game.desktop-battle .pg-battle .minion-battle .enemy-info,body.desktop-game.desktop-battle .pg-battle .minion-battle .battle-bottom,body.desktop-game.desktop-battle .pg-battle .stage-boss-defeated .battle-bottom{display:none}

  /* shield / mechanic seals under the banner: one carved character + a short phrase, dark → lit when met */
  body.desktop-game.desktop-battle .pg-battle #enemy-conditions{position:fixed;left:calc(var(--pgb-bf-left) + 14px);top:var(--pgb-cond-top);transform:none;width:auto;max-width:calc(var(--pgb-bf-w) - 28px);display:flex;flex-wrap:wrap;justify-content:flex-start;gap:8px 10px;z-index:6;pointer-events:none}
  body.desktop-game.desktop-battle .pg-battle #enemy-conditions .condition-chip{display:inline-flex;align-items:center;gap:7px;width:auto;height:auto;padding:0 12px 0 0;margin:0;border:0;border-radius:24px;overflow:visible;background:linear-gradient(90deg,#060a0ee0 40%,#060a0e70);box-shadow:none;color:#e9dcc0;font:600 13px/1 var(--pgb-serif);white-space:nowrap;pointer-events:auto;cursor:help}
  body.desktop-game.desktop-battle .pg-battle #enemy-conditions .condition-chip b{display:grid;place-items:center;width:clamp(34px,2.2vw,44px);aspect-ratio:1;background:url("./assets/pages/battle/rune-neutral.webp") center/contain no-repeat;font:700 clamp(16px,1.05vw,21px)/1 var(--pgb-serif);color:#2b2620;text-shadow:0 1px 0 #ffffff55;filter:drop-shadow(0 2px 3px #000c)}
  body.desktop-game.desktop-battle .pg-battle #enemy-conditions .condition-chip.unmet b{background-image:url("./assets/pages/battle/rune-unmet.webp");color:#ffb08f;text-shadow:0 0 6px #ff4a2a}
  body.desktop-game.desktop-battle .pg-battle #enemy-conditions .condition-chip.met b{background-image:url("./assets/pages/battle/rune-met.webp");color:#1e4a3a;text-shadow:0 0 6px #ffffffaa}
  body.desktop-game.desktop-battle .pg-battle #enemy-conditions .condition-chip.met{color:#c9f2dc}
  body.desktop-game.desktop-battle .pg-battle #enemy-conditions .condition-chip em{font-style:normal;font-size:clamp(13px,.78vw,15px);letter-spacing:.06em;text-shadow:0 1px 2px #000}
  body.desktop-game.desktop-battle .pg-battle #enemy-conditions .condition-chip:not(:has(em)){padding:0;background:none}
  body.desktop-game.desktop-battle .pg-battle #boss-target{position:absolute;left:calc(var(--pgb-bf-left) + var(--pgb-bf-w)*.08);top:calc(var(--pgb-cond-top) + 52px);width:calc(var(--pgb-bf-w)*.84);height:auto;bottom:6%;border:0;padding:0;background:transparent;z-index:4;cursor:help;color:transparent}
  body.desktop-game.desktop-battle .pg-battle #boss-target:focus-visible{outline:1px solid #d4bd8077;outline-offset:-10px;border-radius:40%}
  body.desktop-game.desktop-battle .pg-battle #boss-target[hidden]{display:none}

  /* ---------- minions: copper-gold nameplate, carved bar, countdown seal, priority pennant, big mechanic seals */
  body.desktop-game.desktop-battle .pg-battle .enemy-sprites{position:absolute;left:calc(var(--pgb-bf-left) + var(--pgb-bf-w)*.03);right:auto;width:calc(var(--pgb-bf-w)*.94);bottom:6%;top:auto;height:46%;display:flex;align-items:flex-end;justify-content:space-evenly;gap:0;z-index:5;pointer-events:auto}
  body.desktop-game.desktop-battle .pg-battle .enemy-sprites[hidden]{display:none}
  body.desktop-game.desktop-battle .pg-battle .boss-with-guards .enemy-sprites{left:calc(var(--pgb-bf-left) + var(--pgb-bf-w)*.1);width:calc(var(--pgb-bf-w)*.8);height:24%;bottom:4%}
  body.desktop-game.desktop-battle .pg-battle .enemy-figure{position:relative;display:flex;align-items:center;justify-content:flex-end;flex-direction:column;width:32%;height:100%;border:0;border-radius:0;padding:0;background:none;box-shadow:none;overflow:visible;transform-origin:50% 95%;animation:stage-breathe 3.9s ease-in-out infinite}
  body.desktop-game.desktop-battle .pg-battle .enemy-figure:nth-child(2){animation-delay:-1.3s}
  body.desktop-game.desktop-battle .pg-battle .enemy-figure:nth-child(3){animation-delay:-2.5s}
  body.desktop-game.desktop-battle .pg-battle .enemy-figure:before{content:"";position:absolute;left:10%;right:10%;bottom:0;height:12%;background:radial-gradient(ellipse,#000a,transparent 70%);transform:scaleX(1.3);z-index:-1}
  body.desktop-game.desktop-battle .pg-battle .enemy-figure img{position:relative;width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 0 14px #76a69b28);border-radius:0;opacity:1}
  body.desktop-game.desktop-battle .pg-battle .enemy-figure.selected{outline:0;filter:drop-shadow(0 0 8px #efc87788)}
  body.desktop-game.desktop-battle .pg-battle .enemy-figure.defeated{opacity:.15;transform:translateY(30px);animation:none;pointer-events:none;filter:grayscale(1)}
  body.desktop-game.desktop-battle .pg-battle .enemy-figure.pgb-lethal img{filter:drop-shadow(0 0 16px #ff3b2b99)}
  body.desktop-game.desktop-battle .pg-battle .enemy-figure small{position:absolute;left:50%;right:auto;bottom:calc(100% + 10px);transform:translateX(-50%);width:min(100%,clamp(180px,15vw,260px));box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name cd" "hp cd" "mech mech";column-gap:6px;row-gap:5px;align-items:center;margin:0;padding:0;border:0;background:none;font-size:0;color:#f0ddb9;text-shadow:none;white-space:nowrap;pointer-events:none}
  body.desktop-game.desktop-battle .pg-battle .figure-name{grid-area:name;min-width:0;display:flex;align-items:center;justify-content:center;gap:4px;height:30px;box-sizing:border-box;margin:0;padding:0 12px;border-style:solid;border-color:transparent;border-width:calc(30px*120/635) calc(30px*620/635);border-image:url("./assets/desktop/nav/plaque.webp") 120 620 fill/calc(30px*120/635) calc(30px*620/635) stretch;font:700 clamp(12px,.8vw,15px)/1 var(--pgb-serif);letter-spacing:.06em;color:#f3dfae;text-shadow:0 1px 2px #000;overflow:hidden}
  body.desktop-game.desktop-battle .pg-battle .figure-name .pg-battle-plate-gem{--uk-gs:20px;flex:none;margin-left:-6px}
  body.desktop-game.desktop-battle .pg-battle .figure-health{grid-area:hp;display:block;position:relative;width:auto;height:9px;margin:0 4px;box-sizing:border-box;background:#120706;border:1px solid #8a6a32;border-radius:2px;box-shadow:0 0 0 1px #000a,inset 0 1px 2px #000;overflow:hidden}
  body.desktop-game.desktop-battle .pg-battle .figure-health i{display:block;height:100%;background:linear-gradient(180deg,#e0634a,#a3221a 60%,#6a110b)}
  body.desktop-game.desktop-battle .pg-battle .figure-mechanics{grid-area:mech;display:flex;flex-wrap:wrap;justify-content:center;gap:4px;margin:0}
  body.desktop-game.desktop-battle .pg-battle .figure-mechanics i{display:grid;place-items:center;width:28px;height:28px;border:0;border-radius:0;background:url("./assets/pages/battle/rune-neutral.webp") center/contain no-repeat;font:700 14px/1 var(--pgb-serif);font-style:normal;color:#2b2620;filter:drop-shadow(0 2px 2px #000c)}
  body.desktop-game.desktop-battle .pg-battle .figure-mechanics i.is-unmet{background-image:url("./assets/pages/battle/rune-unmet.webp");color:#ffb08f}
  body.desktop-game.desktop-battle .pg-battle .figure-mechanics i.is-met{background-image:url("./assets/pages/battle/rune-met.webp");color:#1e4a3a}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-cd{grid-area:cd;position:relative;display:grid;place-items:center;width:46px;height:46px;background:url("./assets/pages/battle/seal.webp") center/contain no-repeat;filter:drop-shadow(0 2px 4px #000c)}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-cd b{font:700 21px/1 var(--pgb-serif);color:#ffe7b0;text-shadow:0 1px 2px #000}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-cd i{position:absolute;right:-6px;top:-8px;font:700 15px/1 serif;font-style:normal;color:#fff1ec;text-shadow:0 0 5px #ff2a12,0 1px 2px #000}
  body.desktop-game.desktop-battle .pg-battle .pgb-urgent .pg-battle-cd{filter:sepia(1) saturate(4) hue-rotate(-28deg) drop-shadow(0 0 8px #ff4a2acc);animation:pg-battle-pulse 1s ease-in-out infinite}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-flag{position:absolute;left:2px;bottom:calc(100% - 6px);width:52px;height:47px;display:grid;place-items:center;padding-top:9px;box-sizing:border-box;background:url("./assets/pages/battle/flag.webp") center/contain no-repeat;filter:drop-shadow(0 2px 3px #000c) drop-shadow(0 0 6px #ffd27a88)}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-flag b{font:700 21px/1 var(--pgb-serif);color:#2a1606;text-shadow:0 1px 0 #fff0c0}
  body.desktop-game.desktop-battle .pg-battle .enemy-figure.defeated small{font:600 max(var(--uk-min,12px),13px)/1 var(--pgb-serif);color:#bfb7a6}

  /* ---------- big moments: combo flourish, boss name reveal, layer banner, lethal edge glow */
  body.desktop-game.desktop-battle .pg-battle .pg-battle-combo{display:flex;align-items:baseline;gap:.15em;position:fixed;right:calc(100vw - var(--pgb-bf-right) + 2vw);top:20vh;bottom:auto;z-index:14;pointer-events:none;opacity:0;font-size:clamp(52px,7vh,104px);transform-origin:70% 60%}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-combo.is-on{animation:pg-battle-combo .5s cubic-bezier(.2,1.4,.4,1) both}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-combo b{font:700 calc(1em*var(--pgb-combo-scale,1))/1 var(--pgb-serif);background:linear-gradient(180deg,#fff6d0,#f3c95a 55%,#b9761f);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 3px 2px #3a1d05) drop-shadow(0 0 14px #ff9d2a88)}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-combo span{font:700 .42em/1 var(--pgb-serif);letter-spacing:.12em;color:#ffe7a6;text-shadow:0 2px 3px #3a1d05,0 0 12px #ff9d2a}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-swirl{position:absolute;left:-55%;right:-45%;top:-22%;bottom:-30%;z-index:-1;background:url("./assets/pages/battle/swirl.webp") center/contain no-repeat;opacity:.9}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-reveal{display:flex;flex-direction:column;align-items:center;gap:10px;position:fixed;left:var(--pgb-bf-left);width:var(--pgb-bf-w);top:44vh;z-index:14;pointer-events:none;opacity:0;text-align:center}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-reveal.is-on{animation:pg-battle-reveal 3.2s ease both}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-reveal small{font:700 clamp(14px,1vw,19px)/1 var(--pgb-serif);letter-spacing:.4em;color:#d8c69a;text-shadow:0 1px 3px #000,0 0 10px #000}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-reveal strong{font:700 min(clamp(40px,4.6vw,86px),calc(var(--pgb-bf-w)/12.5))/1.1 var(--pgb-serif);letter-spacing:.18em;text-indent:.18em;color:#f4ecdb;text-shadow:0 3px 4px #000,0 0 26px #000,0 0 50px #000000aa;white-space:nowrap}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-divider{display:block;width:min(86%,900px);height:clamp(18px,1.6vw,30px);background:url("./assets/pages/battle/divider.webp") center/100% 100% no-repeat}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-reveal.is-defeat{left:0;width:100vw;top:50vh;z-index:41}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-reveal.is-defeat strong{background:linear-gradient(180deg,#fff3c4,#e9c25a 55%,#9a6a1c);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none;filter:drop-shadow(0 3px 3px #000) drop-shadow(0 0 18px #ffbf4a88)}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-reveal.is-defeat.is-on{animation:pg-battle-reveal 2.4s ease .35s both}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-layerbanner{display:flex;justify-content:center;position:fixed;left:var(--pgb-bf-left);width:var(--pgb-bf-w);top:24vh;z-index:14;pointer-events:none;opacity:0}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-layerbanner.is-on{animation:pg-battle-sweep 1.9s ease both}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-layerbanner-plate{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:clamp(64px,8vh,96px);padding:0 clamp(70px,7vw,130px);box-sizing:border-box;border-style:solid;border-color:transparent;border-width:calc(clamp(64px,8vh,96px)*120/635) calc(clamp(64px,8vh,96px)*620/635);border-image:url("./assets/desktop/nav/plaque.webp") 120 620 fill/calc(clamp(64px,8vh,96px)*120/635) calc(clamp(64px,8vh,96px)*620/635) stretch;filter:drop-shadow(0 8px 14px #000c)}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-layerbanner b{font:700 clamp(22px,2vw,36px)/1 var(--pgb-serif);letter-spacing:.2em;background:linear-gradient(180deg,#f6e2a8,#c9a25a);-webkit-background-clip:text;background-clip:text;color:transparent}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-layerbanner small{font:600 clamp(12px,.8vw,15px)/1 var(--pgb-serif);letter-spacing:.2em;color:#e3d6b6}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-lethal{display:block;position:fixed;top:var(--pgb-head);bottom:0;left:var(--pgb-edge);right:calc(100vw - var(--pgb-x) + var(--pgb-padx));z-index:4;pointer-events:none;opacity:0;background:radial-gradient(ellipse at 50% 55%,transparent 52%,#b3160c66 85%,#c21a0daa 100%);transition:opacity .4s}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-lethal.is-on{opacity:1;animation:pg-battle-pulse 1.6s ease-in-out infinite}

  /* ---------- top bar stage plaque + pause medallion on the slim stone edge */
  body.desktop-game.desktop-battle .pg-battle .pg-battle-plaque{display:flex;align-items:center;gap:10px;position:fixed;left:var(--pgb-plaque-left);top:calc((var(--pgb-head) - 38px)/2);height:38px;max-width:var(--pgb-plaque-max);box-sizing:border-box;padding:0 22px;z-index:31;border-style:solid;border-color:transparent;border-width:calc(38px*120/635) calc(38px*620/635);border-image:url("./assets/desktop/nav/plaque.webp") 120 620 fill/calc(38px*120/635) calc(38px*620/635) stretch;filter:drop-shadow(0 3px 5px #000b);pointer-events:none}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-plaque-text{font:700 15px/1 var(--pgb-serif);letter-spacing:.1em;color:#f3dfae;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 2px #000}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-pips{display:flex;align-items:center;gap:5px;flex:none}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-pips i{width:10px;height:10px;transform:rotate(45deg);background:#1d1a17;box-shadow:0 0 0 1px #8a6a32}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-pips i.is-on{background:linear-gradient(135deg,#ffe9a8,#e0a73a);box-shadow:0 0 0 1px #6b4a17}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-pips i.is-now{box-shadow:0 0 0 1px #6b4a17,0 0 8px #ffcf6e}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-pips i.is-boss{width:13px;height:13px;background:linear-gradient(135deg,#ff9a8a,#b3261a);box-shadow:0 0 0 1px #8a6a32}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-pips i.is-boss.is-on{background:linear-gradient(135deg,#ffd0c4,#e0503e);box-shadow:0 0 0 1px #f1d896,0 0 10px #ff6b55}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-pause{display:grid;position:fixed;left:calc(var(--pgb-edge)*.08);top:calc(var(--pgb-head) + var(--pgb-edge)*.04);--uk-rs:calc(var(--pgb-edge)*.84);z-index:31}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-pause>span{display:flex;gap:calc(var(--pgb-edge)*.08)}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-pause>span i{width:calc(var(--pgb-edge)*.08);height:calc(var(--pgb-edge)*.3);border-radius:1px;background:linear-gradient(180deg,#fff2c4,#d4b477);box-shadow:0 1px 2px #000}

  /* ---------- pause tablet (dialog in the top layer) */
  dialog.pg-battle-pausemenu{padding:0;margin:auto;border:0;background:none;color:var(--uk-text,#ede7d8);max-width:none;max-height:none;overflow:visible}
  dialog.pg-battle-pausemenu::backdrop{background:#02060ab8;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}
  dialog.pg-battle-pausemenu .pg-battle-pausepanel{display:flex;flex-direction:column;align-items:center;gap:clamp(10px,1.6vh,18px);width:clamp(380px,32vw,560px);box-sizing:border-box;padding:clamp(10px,1.6vh,20px) clamp(14px,1.6vw,28px)}
  dialog.pg-battle-pausemenu .pg-battle-pausepanel[hidden]{display:none}
  dialog.pg-battle-pausemenu .pg-battle-pausetitle{min-width:0;height:clamp(52px,7vh,76px);padding:0 clamp(60px,6vw,96px);border-width:calc(clamp(52px,7vh,76px)*120/635) calc(clamp(52px,7vh,76px)*620/635);border-image-width:calc(clamp(52px,7vh,76px)*120/635) calc(clamp(52px,7vh,76px)*620/635)}
  dialog.pg-battle-pausemenu .pg-battle-pausetitle .uk-plaque-text{font-size:clamp(22px,3vh,32px)}
  dialog.pg-battle-pausemenu .pg-battle-pausestage,dialog.pg-battle-pausemenu .pg-battle-confirmtext{margin:0;font:600 clamp(14px,1.8vh,18px)/1.5 var(--uk-serif,serif);color:#d9c9a0;text-align:center;letter-spacing:.06em}
  dialog.pg-battle-pausemenu .pg-battle-confirmtext{color:#ffc9b8}
  dialog.pg-battle-pausemenu .pg-battle-pauseactions{display:flex;flex-direction:column;align-items:stretch;gap:clamp(8px,1.2vh,14px);width:min(100%,340px)}
  dialog.pg-battle-pausemenu .pg-battle-pauseactions .uk-btn{width:100%;--uk-bh:clamp(42px,5.6vh,60px)}
  dialog.pg-battle-pausemenu .pg-battle-pausenav{display:flex;justify-content:center;gap:clamp(10px,1.4vw,22px);padding-top:4px}
  dialog.pg-battle-pausemenu .pg-battle-navmedal{display:flex;flex-direction:column;align-items:center;gap:4px;margin:0;padding:0;border:0;background:none;color:#f3dfae;font:700 max(12px,1.5vh)/1 var(--uk-serif,serif);letter-spacing:.1em;cursor:pointer;transition:transform .16s,filter .16s}
  dialog.pg-battle-pausemenu .pg-battle-navmedal img{width:clamp(44px,6vh,64px);height:auto;aspect-ratio:470/475;filter:drop-shadow(0 3px 5px #000c)}
  dialog.pg-battle-pausemenu .pg-battle-navmedal:hover{transform:translateY(-2px);filter:brightness(1.12)}
  dialog.pg-battle-pausemenu .pg-battle-navmedal:focus-visible{outline:2px solid #f1d896;outline-offset:3px;border-radius:6px}

  /* ---------- shared presentation layers moved onto the battlefield */
  body.desktop-game.desktop-battle .pg-battle .battle-float{left:var(--pgb-bf-left);right:auto;width:var(--pgb-bf-w);top:40%;z-index:15;font:700 clamp(40px,4.2vw,74px)/1.1 var(--pgb-serif);color:#ffdc9c;text-shadow:0 3px 3px #2a1405,0 0 18px #000}
  body.desktop-game.desktop-battle .pg-battle .battle-float small{font:700 clamp(14px,1vw,18px)/1 var(--pgb-serif);letter-spacing:.24em;margin-top:10px;color:#f6e7c4}
  body.desktop-game.desktop-battle .pg-battle .battle-vfx{left:var(--pgb-bf-left);right:calc(100vw - var(--pgb-bf-right))}
  body.desktop-game.desktop-battle .pg-battle .skill-cutin{left:var(--pgb-bf-left);right:calc(100vw - var(--pgb-bf-right));top:34%;bottom:auto;z-index:18}
  body.desktop-game.desktop-battle .pg-battle .skill-cutin-copy strong{font-family:var(--pgb-serif)}
  body.desktop-game.desktop-battle .pg-battle .skill-cutin-copy small{font:600 14px/1 var(--pgb-serif)}
  body.desktop-game.desktop-battle .pg-battle .wave-intro{left:var(--pgb-bf-left);right:calc(100vw - var(--pgb-bf-right))}
}

@keyframes pg-battle-breathe{0%,100%{opacity:.55}50%{opacity:1}}
@keyframes pg-battle-mote{0%{opacity:0;transform:translateY(0)}20%{opacity:.9}100%{opacity:0;transform:translateY(calc(var(--pgb-ch,120px)*-1.1))}}
@keyframes pg-battle-liquid{from{transform:translateX(0)}to{transform:translateX(52px)}}
@keyframes pg-battle-heartbeat{0%,100%{transform:translateY(-50%) scale(1)}15%{transform:translateY(-50%) scale(1.16)}30%{transform:translateY(-50%) scale(.98)}45%{transform:translateY(-50%) scale(1.1)}}
@keyframes pg-battle-pulse{0%,100%{opacity:1}50%{opacity:.62}}
@keyframes pg-battle-combo{0%{opacity:0;transform:scale(.4) rotate(-6deg)}60%{opacity:1;transform:scale(1.12) rotate(1deg)}100%{opacity:1;transform:scale(1) rotate(0)}}
@keyframes pg-battle-reveal{0%{opacity:0;transform:scale(1.06)}20%{opacity:1;transform:scale(1)}75%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.99)}}
@keyframes pg-battle-heal{0%{opacity:1;background-position:-120% 0}100%{opacity:1;background-position:260% 0}}
@keyframes pg-battle-wobble{0%,100%{transform:translateX(0)}25%{transform:translateX(-3px)}55%{transform:translateX(3px)}80%{transform:translateX(-1px)}}
@keyframes pg-battle-tick{0%{transform:rotate(-45deg)}100%{transform:rotate(0)}}
@keyframes pg-battle-lit{0%{transform:scale(1);filter:brightness(1) drop-shadow(0 2px 3px #000c)}30%{transform:scale(1.18);filter:brightness(1.8) drop-shadow(0 0 12px #9ff5d8)}100%{transform:scale(1);filter:brightness(1) drop-shadow(0 2px 3px #000c)}}
@keyframes pg-battle-burst{0%{opacity:0}20%{opacity:1}100%{opacity:0}}
@keyframes pg-battle-sweep{0%{opacity:0;transform:translateX(-12%)}18%{opacity:1;transform:translateX(0)}78%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(8%)}}

@media (prefers-reduced-motion:reduce){
  body.desktop-game.desktop-battle .pg-battle .pg-battle-motes,body.desktop-game.desktop-battle .pg-battle #player-health-fill:after{display:none}
  body.desktop-game.desktop-battle .pg-battle .hero-card.pgb-ready .pg-battle-card:after,body.desktop-game.desktop-battle .pg-battle .pgb-low .pg-battle-heart,body.desktop-game.desktop-battle .pg-battle .pgb-urgent .pg-battle-cd,body.desktop-game.desktop-battle .pg-battle .battle-bottom.pgb-urgent .pg-battle-seal,body.desktop-game.desktop-battle .pg-battle .pg-battle-lethal.is-on{animation:none}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-combo.is-on{animation:none;opacity:1}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-reveal.is-on,body.desktop-game.desktop-battle .pg-battle .pg-battle-layerbanner.is-on{animation:none;opacity:1}
  body.desktop-game.desktop-battle .pg-battle .pg-battle-ghost.is-falling,body.desktop-game.desktop-battle .pg-battle .hero-card{transition:none}
  body.desktop-game.desktop-battle .pg-battle :is(.player-health-track.pgb-heal:before,.player-health-track.pgb-hurt,.pg-battle-dial.is-tick,.condition-chip.is-lit b,.board-wrap.pgb-burst:after){animation:none}
}
