/* The scene owns projection. DOM labels stay upright and accessible. */
.arena-stage{position:relative}
.board-shell.scene-active{width:100%!important;height:100%!important;max-width:none!important;aspect-ratio:auto!important;transform:none!important;perspective:none!important;border:0!important;box-shadow:none!important;background:none!important;border-radius:0;isolation:isolate}
.arena-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;z-index:0;touch-action:none;outline:0;cursor:pointer}
.arena-canvas:active{cursor:grabbing}
.scene-active #board{position:absolute;inset:0;display:block;aspect-ratio:auto;width:100%;height:100%;padding:0;gap:0;border:0;border-radius:0;background:none;box-shadow:none;transform:none!important;perspective:none;overflow:visible;pointer-events:none;isolation:auto;z-index:2}
.scene-active #board::before,.scene-active #board::after{display:none}
.scene-active #board .cell{position:absolute;display:block;background:none!important;border:0!important;box-shadow:none!important;transform:none!important;pointer-events:none;overflow:visible;outline:0;filter:none!important}
.scene-active #board .cell::before,.scene-active #board .cell::after,.scene-active .pillar-art,.scene-active .move-marker,.scene-active .field-origin,.scene-active .field-layer,.scene-active .cell-coordinate{display:none!important}
.scene-active #board .cell:focus-visible{outline:2px solid #bc8b37;outline-offset:-4px;border-radius:2px}
.scene-active #board .pawn{position:absolute;left:0;top:0;display:block;width:44px;height:56px;max-width:none;max-height:none;min-width:0;border:0;outline:0;background:none!important;box-shadow:none!important;border-radius:0;transform:none!important;filter:none!important;pointer-events:none;transition:none;color:#fff;z-index:2}
.scene-active #board .pawn::before,.scene-active #board .pawn::after,.scene-active #board .pawn>svg,.scene-active #board .pawn>.xinfa-icon,.scene-active #board .pawn-time{display:none!important}
.scene-active #board .pawn-name{display:block!important;position:absolute;left:50%;right:auto;bottom:auto;top:calc(100% + 3px);width:max-content;height:16px;overflow:visible;transform:translateX(-50%);font-size:12px;line-height:16px;font-weight:650;letter-spacing:.02em;color:#243b48;text-shadow:0 1px 2px #f1f4ec,1px 0 2px #f1f4ec,-1px 0 2px #f1f4ec;white-space:nowrap}
.scene-active #board .pawn-hpbar{position:absolute;left:3px;right:3px;bottom:1px;height:5px;border:1px solid #244e5c;border-radius:3px;background:#304551;box-shadow:0 1px 1px #ffffff66}
.scene-active #board .pawn-hpbar>i{background:#35a492}
.scene-active #board .pawn.enemy .pawn-hpbar{border-color:#704c3c;background:#593b38}
.scene-active #board .pawn.enemy .pawn-hpbar>i{background:#db8061}
.scene-active #board .pawn-health-number{position:absolute;top:auto;left:auto;right:-8px;bottom:-1px;border:0;border-radius:3px;padding:1px 3px;background:#153f43;color:#fff;font-size:12px;line-height:14px;font-weight:650;text-shadow:none}
.scene-active #board .pawn.enemy .pawn-health-number{background:#874d3d}
.scene-active #board .pawn.selected .pawn-name{color:#126c61}
.scene-active #board .target-preview{position:absolute;top:0;left:0;transform:translate(-50%,-100%)!important;border:1px solid #fce5d3;background:#913f30ed;color:#fff6eb;border-radius:4px;padding:3px 5px;font-size:13px;line-height:16px;font-weight:700;box-shadow:0 2px 8px #301a1526;z-index:8;white-space:nowrap;pointer-events:none}
.scene-active #board .target-preview.beneficial{background:#176d61ed;color:#f4fff4;border-color:#c8e8d0}
.scene-active .connection-layer{display:none}
.scene-active .motion-layer{z-index:6}
.scene-active .combat-cue{z-index:8}
.scene-active .motion-ghost{background:none!important;border:0!important;box-shadow:none!important}
.scene-active .motion-ghost>img,.scene-active .motion-ghost>svg{display:none}
.scene-active .motion-number{font-size:25px;text-shadow:0 2px 2px #18242a,1px 0 #18242a,-1px 0 #18242a}
@media(max-width:760px){
 .scene-active #board .pawn-name{font-size:12px;line-height:16px;top:calc(100% + 1px)}
 .scene-active #board .pawn-health-number{font-size:11px;line-height:13px;right:-6px;bottom:-1px;padding:0 2px}
 .scene-active #board .pawn-hpbar{left:4px;right:4px;height:4px}
 .scene-active #board .target-preview{font-size:12px;padding:2px 4px}
}

/* Compact, tappable status strips. They live outside the board's cell buttons. */
.status-layer{position:absolute;inset:0;z-index:5;pointer-events:none;overflow:visible}
.unit-status-icons{position:absolute;display:flex;flex-wrap:nowrap;align-items:center;gap:2px;width:max-content;min-width:0;min-height:0;margin:0;padding:1px;border:0;border-radius:4px;background:none;box-shadow:none;color:#fff;pointer-events:auto;touch-action:manipulation;cursor:pointer;line-height:1;isolation:isolate}
.unit-status-icons:hover{background:#1d35484d}
.unit-status-icons:focus-visible{outline:2px solid #f6e3ae;outline-offset:1px}
.unit-status-icons::after{content:"";position:absolute;top:var(--status-pin-y,100%);left:var(--status-pin-x,50%);width:1px;height:var(--status-tail,0px);background:#465a6aa6;transform:rotate(var(--status-angle,0rad));transform-origin:top center;pointer-events:none;z-index:-1}
.status-icon{position:relative;display:block;box-sizing:border-box;width:22px;height:22px;border:1.5px solid #9ad1ba;border-radius:4px;background:#203645;box-shadow:0 1px 3px #13233399;overflow:visible;flex-shrink:0}
.unit-status-icons .status-icon{width:20px;height:20px;border-width:1px;border-radius:3px;box-shadow:0 1px 1px #13233355}
.status-icon.debuff{border-color:#f19585}
.status-icon.expiring{border-color:#ffda83}
.status-icon img{display:block;width:100%;height:100%;border-radius:2px;object-fit:cover;pointer-events:none}
.status-icon b{position:absolute;right:-1px;bottom:-2px;min-width:10px;padding:0 2px;border-radius:3px;background:#132c40ed;color:#fff7de;font-size:10px;line-height:12px;font-weight:750;font-variant-numeric:tabular-nums;text-align:center;text-shadow:none;box-sizing:border-box;pointer-events:none}
.status-icon.debuff b{background:#673c44f2}
.status-icon.expiring b{color:#ffe19a}
.status-more{display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:750;border-color:#c0c6b9;background:#2a414f}
.unit-status-icons .status-more{width:auto;min-width:16px;height:16px;padding:0 2px;border-radius:7px;font-size:10px;line-height:14px;box-shadow:none;color:#e9f0ea;background:#233947bd;border-color:#748b91}
.unit-status-icons .status-more.has-debuff{color:#ffdfd6;border-color:#de8f82;background:#543c45e6}
.info-status-list{display:grid;gap:8px;margin:0 0 16px;padding:12px;border:1px solid #516368;border-radius:8px;background:#162a3c}
.info-status-row{display:flex;align-items:flex-start;gap:10px}
.info-status-row .status-icon{width:30px;height:30px;margin-top:2px}
.info-status-row strong{font-size:14px;color:#f1e4bf}
.info-status-row p{margin:3px 0 0;font-size:13px;line-height:1.6;color:#c2cdd2}
@media(max-width:760px){
 .unit-status-icons .status-icon{width:18px;height:18px}
 .unit-status-icons .status-more{width:auto;min-width:16px;height:16px}
 .status-icon b{font-size:10px;line-height:11px}
 .info-status-list{padding:10px}
}

/* The same marks remain available when a device loses its 3D context. */
#board .cell.pve-danger{background-image:repeating-linear-gradient(35deg,transparent 0 9px,#ce5a4933 9px 12px);box-shadow:inset 0 0 0 2px #bd6254}
#board .cell.pve-safe{background-image:linear-gradient(#38aa8433,#38aa8433);box-shadow:inset 0 0 0 2px #57bea7}
#board .pawn[data-xinfa="censhang"]{background:#51414d;border-color:#d49c94}
.scene-active #board .pawn[data-xinfa="censhang"] .pawn-name{color:#6f384a;font-weight:750}
.scene-active #board .pawn[data-xinfa="censhang"] .pawn-hpbar{border-color:#6d3546;background:#4b3040}
.scene-active #board .pawn[data-xinfa="censhang"] .pawn-hpbar>i{background:#c76679}
.scene-active #board .pawn[data-xinfa="censhang"] .pawn-health-number{background:#70384c}
