.turn-order { position:absolute; z-index:4; right:22px; bottom:10px; display:flex; flex-direction:column; gap:5px; width:max-content; max-width:min(550px,55%); min-width:290px; padding:8px 10px 9px; border:1px solid #b7c49a38; border-radius:8px; background:linear-gradient(145deg,#26362ff5,#1d2926f5); box-shadow:0 5px 18px #14201c50; }
.turn-order[hidden], .current-turn[hidden] { display:none; }
.turn-order-heading { display:flex; align-items:center; gap:10px; }
.turn-order-heading>span:first-child { font-size:8px; letter-spacing:1.5px; color:#b3bda6; }
.turn-order-heading strong { font-size:10px; color:#e5d49f; font-weight:500; }
.combat-speed { padding:2px 5px; border:1px solid #d9bd7833; border-radius:3px; color:#efcf8a; font-size:9px; }
.turn-order-list { display:flex; gap:6px; overflow-x:auto; max-width:100%; padding:2px 1px 3px; scrollbar-width:thin; }
.initiative-unit { position:relative; flex:none; width:57px; height:68px; border:1px solid #78b5ce65; background:linear-gradient(#42637573,#293e42b3); border-radius:5px; padding:3px 2px 4px; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:1px; }
.initiative-unit img { width:38px; height:38px; object-fit:contain; pointer-events:none; }
.initiative-unit[data-side=red] { border-color:#ce877b80; background:linear-gradient(#84534266,#44302a99); }
.initiative-number { position:absolute; top:3px; left:4px; font-size:9px; color:#e1dfc7; }
.initiative-name { width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:9px; line-height:11px; color:#dce3d5; }
.initiative-unit.played { opacity:.5; }
.initiative-unit.dead { filter:grayscale(1); opacity:.3; }
.initiative-unit.current { opacity:1; border-color:#ffe1a0; background:linear-gradient(#a48a4659,#594b2c59); box-shadow:inset 0 0 0 1px #ffe1a040,0 0 10px #e2c25c28; }
.initiative-unit:focus-visible { outline:2px solid #fff1bd; outline-offset:1px; }
.current-turn { position:absolute; top:76px; right:22px; z-index:4; width:213px; padding:8px 11px; line-height:1.25; color:#e8e8d5; background:linear-gradient(145deg,#283830f5,#202a25f5); border:1px solid #d9bd785e; border-radius:8px; box-shadow:0 8px 26px #0002; }
.current-turn-heading { display:flex; align-items:center; gap:5px; font-size:8px; letter-spacing:.7px; color:#b7c6aa; }
.turn-live-dot { width:5px; height:5px; border-radius:50%; background:#eed08a; box-shadow:0 0 8px #eed08a70; }
.current-turn-monster { display:flex; align-items:center; gap:9px; margin:4px 0 6px; }
.current-turn-monster img { width:28px; height:28px; object-fit:contain; }
.current-turn-monster h2 { margin:0 0 2px; font-size:15px; line-height:16px; font-weight:550; }
#turn-behavior { display:block; line-height:12px; font-size:10px; color:#b5bfa9; }
.turn-resource { display:flex; align-items:center; gap:8px; margin-top:4px; font-variant-numeric:tabular-nums; }
.turn-resource>span { width:20px; font-size:10px; color:#cbd6bf; }
.turn-resource>strong { margin-left:auto; font-size:11px; font-weight:500; }
.resource-pips { display:flex; gap:4px; }
.resource-pips i { display:block; width:10px; height:10px; border:1px solid #8198a24d; border-radius:2px; background:#172320; }
.pa-charge-label { font-size:9px; color:#9fc3d2; }
.pm-pips i.filled { background:#a1bd73; border-color:#c6d49c; box-shadow:0 0 5px #a1bd7325; }
.turn-action { padding-top:5px; border-top:1px solid #a7b58f25; margin:6px 0 3px; font-size:12px; color:#f0d69c; }
#turn-action-detail { display:block; color:#a9baa3; font-size:10px; line-height:1.4; min-height:14px; }
.combat-unit { transition:opacity .15s; }
.combat-unit .turn-indicator, .combat-unit .combat-resources { display:none; }
.combat-unit.taking-turn .turn-indicator, .combat-unit.taking-turn .combat-resources { display:block; }
.turn-indicator { fill:#ffdf8f; filter:drop-shadow(0 0 3px #c49f59); }
.combat-resources { fill:#f9e7b0; font-size:10px; paint-order:stroke; stroke:#26312e; stroke-width:3px; }
#map .cell.acting-cell { stroke:#f9d889; stroke-width:2; fill:#cab25a20; }
.movement-guide { stroke:#f3dc9c; stroke-width:2; stroke-dasharray:3 3; opacity:.65; pointer-events:none; }
.sprite-facing { pointer-events:none; }
.combat-unit.resting .combat-visual { transform-box:view-box; transform-origin:0 0; animation:monster-rest 2.8s ease-in-out var(--rest-delay,0s) infinite; }
@keyframes monster-rest { 0%,100% { transform:scale(1,1); } 50% { transform:scale(1.012,1.025); } }
@media (prefers-reduced-motion:reduce) { .combat-unit.resting .combat-visual { animation:none; } }
.combat-feed { bottom:38px; left:22px; transform:none; max-width:calc(100% - 580px); min-width:0; text-align:left; }
body[data-phase=combat] .loot-tray { display:none; }

.native-attack-effect { pointer-events:none; }
.combat-unit.defeated.playing-hit { opacity:1; }
.health-fill { transition:width .1s; }
body[data-phase=combat] .map-note,body[data-phase=results] .map-note,body[data-phase=ended] .map-note { display:none; }
@media (max-width:1050px) {
 .current-turn { right:12px; width:185px; padding:9px; }
 .turn-resource { gap:5px; } .resource-pips { gap:3px; } .resource-pips i { width:9px; height:9px; }
 .turn-order { right:12px; max-width:55%; } .initiative-unit { width:51px; }
 .combat-feed { max-width:40%; left:15px; }
}
@media (max-width:850px) {
 .current-turn { top:114px; width:167px; } .current-turn-heading { font-size:7px; letter-spacing:.3px; }
 .current-turn-monster h2 { font-size:13px; } .resource-pips { gap:2px; }
 .turn-order { max-width:calc(100% - 24px); }
 .combat-feed { display:none; }
 .live-match .map-viewport { bottom:112px; }
}
@media (max-width:600px) {
 .turn-order { right:8px; bottom:7px; max-width:calc(100% - 16px); padding:6px 8px; min-width:270px; }
 .initiative-unit { height:60px; width:48px; } .initiative-unit img { width:30px; height:30px; }
 .current-turn { top:112px; width:150px; padding:8px; }
 .current-turn-monster { margin:5px 0; } .current-turn-heading { letter-spacing:0; }
 .resource-pips i { width:8px; height:8px; } .turn-resource { gap:4px; }
 .turn-action { margin:6px 0 3px; padding-top:5px; }
}
@media (prefers-reduced-motion:reduce) { .combat-unit,.health-fill { transition:none; } }
