/* Shared ELEMENT palette. The menu and combat interface use the same tokens. */
:root{--element-ink:#eeede7;--element-muted:#92938f;--element-accent:#ef613f;--element-line:#f0eee526;--element-panel:#101114d9;--element-type:Bahnschrift,'Arial Narrow','Segoe UI',sans-serif;--element-mono:Consolas,'Courier New',monospace}
.sf-stage{--hud-edge:28px;--hud-gap:5px;--hud-tile:40px;color:var(--element-ink)}
.sf-stage .game-header{top:24px;left:var(--hud-edge);right:var(--hud-edge);align-items:center;gap:16px;text-shadow:none}
.hud-emblem{display:block;width:26px;height:26px;opacity:.85;flex:none}
.sf-stage .combat-score{gap:0;margin-left:auto;background:var(--element-panel);border-bottom:1px solid var(--element-line);padding:8px 0}
.sf-stage .combat-score>span{padding:0 13px;gap:7px;color:var(--element-ink)}.sf-stage .combat-score>span+span{border-left:1px solid var(--element-line)}
.sf-stage .combat-score i{width:17px;height:17px;color:#a5a8a4}.sf-stage .combat-score b{font:15px/1 var(--element-mono);font-variant-numeric:tabular-nums}
.sf-stage .lan-score{top:0;font:30px/1.1 var(--element-type);font-weight:600;letter-spacing:.12em;padding:7px 18px 9px;border-top:2px solid var(--element-accent);background:var(--element-panel);color:var(--element-ink)}
.sf-stage .resource-hud{position:absolute;right:var(--hud-edge);bottom:24px;width:194px;display:flex;flex-direction:column;gap:12px;padding:12px 14px 13px;border-left:2px solid var(--element-accent);background:var(--element-panel);pointer-events:none}
.sf-stage .sf-vitals{position:static;display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;order:0}
.sf-stage .status-icons{grid-column:1/-1;justify-content:flex-end;gap:5px;max-width:none;flex-wrap:wrap}.sf-stage .status-icons:empty{display:none}
.sf-stage .state-icon{position:relative;width:25px;height:29px;padding:4px 4px 7px;color:var(--status-color);background:#eeede707;border:1px solid #eeede719;border-radius:0}
.sf-stage .state-icon:after{inset:auto 2px 2px;display:block;height:2px;border-radius:0;background:var(--status-color);mask:none;transform-origin:left;transform:scaleX(var(--remaining-ratio,1))}
.sf-stage .health-compact{grid-column:2;grid-row:2;justify-self:end;gap:8px;color:var(--element-ink)}.sf-stage .health-compact>i{width:19px;height:19px;color:var(--element-ink)}
.sf-stage .health-compact b{font:35px/1 Impact,'Arial Narrow',sans-serif;font-variant-numeric:tabular-nums;letter-spacing:.015em}.sf-stage .health-compact.low,.sf-stage .health-compact.low>i{color:var(--element-accent)}
.sf-stage .barrier-hud{grid-column:1;grid-row:2;align-self:center;gap:5px;color:#d0d0c5;font:16px/1 var(--element-mono)}.sf-stage .barrier-hud i{width:17px;height:17px}.sf-stage .barrier-hud[hidden]{display:none}
.health-meter{grid-column:1/-1;height:3px;background:#eeede71c;overflow:hidden}.health-meter>div{width:100%;height:100%;background:var(--element-ink)}.health-meter.low>div{background:var(--element-accent)}
.sf-stage .energy-panel{position:static;width:auto;order:1;text-shadow:none;border:0}
.sf-stage .energy-heading{justify-content:space-between;gap:8px;color:#c4c8c3;letter-spacing:0}.sf-stage .energy-heading>i{width:15px;height:15px;color:#b1b6b1}.sf-stage .energy-heading strong{font:17px/1 var(--element-mono);font-variant-numeric:tabular-nums}
.sf-stage .energy-meter{height:4px;margin:7px 0 0;border:0;border-radius:0;background:#eeede71a;overflow:hidden}.sf-stage #sf-energy-fill{background:#d3d7d0;box-shadow:none}.sf-stage .energy-meter.low #sf-energy-fill{background:var(--element-accent)}
.sf-stage #sf-energy-preview{background:#ef613f99;border-right:1px solid var(--element-accent)}
.sf-stage .sf-spell{left:var(--hud-edge);bottom:24px;width:149px;max-width:none;gap:9px;text-shadow:none;padding:10px 11px 12px;background:var(--element-panel);border-left:2px solid #eeede750}
.sf-stage .spell-sources{width:auto;gap:5px;height:26px;align-items:center}.sf-stage .source-icon{width:25px;height:25px;padding:3px;border:1px solid #eeede71a;background:#eeede705;opacity:.5}
.sf-stage .source-icon.filled{opacity:1;border-color:#eeede73d}.sf-stage .source-link{width:8px;height:1px;background:#eeede72b}
.sf-stage .source-icon.chest-source{border:1px solid #eeede71a!important;border-top:2px solid #eeede74d!important}.sf-stage .source-icon.chest-source.filled{border-color:#eeede73d!important;border-top-color:var(--element-accent)!important}
.sf-stage .spell-icon-row{gap:13px}.sf-stage .spell-badge{--cooldown-ratio:0;width:47px;height:47px;padding:9px;border:1px solid #eeede74d;border-radius:0;background:none;color:var(--sf-element);box-shadow:none}
.sf-stage .spell-badge:after{inset:auto -1px -5px;display:block;height:2px;border-radius:0;background:var(--element-ink);mask:none;transform-origin:left;transform:scaleX(var(--cooldown-ratio))}
.sf-stage .spell-badge.empty{color:#858b87;border-color:#eeede720}.sf-stage .spell-badge.charging{border-color:var(--sf-element)}.sf-stage .spell-badge.ready{box-shadow:none;background:#eeede70a;border-color:var(--element-ink)}
.sf-stage .spell-cost{color:#c5cac4;gap:4px}.sf-stage .spell-cost i{width:13px;height:13px;color:#8e9790}.sf-stage .spell-cost b{font:15px/1 var(--element-mono)}
.sf-stage #sf-self-ready,.sf-stage #sf-special-ready{width:18px;height:18px;padding:3px;border:1px solid #eeeae260;border-radius:0;background:#15171b;color:var(--element-ink);top:-6px;bottom:auto}.sf-stage #sf-special-ready{right:-6px}.sf-stage #sf-self-ready{left:-6px}
.sf-stage .sf-charge{width:100%;height:3px;margin-top:3px;background:#eeede71c}.sf-stage .sf-charge.ready #sf-charge-fill{box-shadow:none;background:var(--element-ink)}
.sf-stage .hud-keys{display:flex;grid-template-columns:none;position:absolute;left:50%;right:auto;bottom:24px;transform:translateX(-50%);gap:var(--hud-gap);padding:7px;background:var(--element-panel);border-bottom:2px solid #eeede72b;flex-wrap:nowrap}
.sf-stage .element-tile{width:var(--hud-tile);height:46px;padding:11px 9px 7px;border:1px solid transparent;border-radius:0;background:none;box-shadow:none;color:var(--element-color)}
.sf-stage .element-tile .element-key{left:4px;top:0;color:#8c958e;font:10px/1.4 var(--element-mono)}.sf-stage .element-tile.active{background:#eeede70b;border-color:#eeede734;border-bottom-color:var(--element-color)}
.sf-stage .element-stack{bottom:3px;gap:3px}.sf-stage .element-stack i{height:2px;width:5px;border-radius:0}
.sf-stage .target-prop{color:var(--element-ink);font:13px/1 var(--element-mono);padding:5px 7px;gap:5px;background:#101114a6;border-radius:0}.sf-stage .target-prop>i{width:15px;height:15px}
#sf-fps{border:0;border-left:2px solid var(--element-accent);border-radius:0;background:var(--element-panel);color:var(--element-ink);left:var(--hud-edge,28px);top:64px;font:12px/1.4 var(--element-mono);box-shadow:none}
@media(max-width:1000px){.sf-stage{--hud-edge:20px;--hud-tile:35px;--hud-gap:3px}.sf-stage .sf-spell{width:138px}.sf-stage .resource-hud{width:175px}.sf-stage .element-tile{height:42px;padding:10px 7px 6px}}
@media(max-width:760px){.sf-stage{--hud-edge:15px;--hud-tile:32px}.sf-stage .hud-keys{bottom:18px;padding:5px;gap:2px}.sf-stage .sf-spell{bottom:88px;width:129px;padding:8px 9px 11px}.sf-stage .resource-hud{bottom:88px;width:160px;padding:9px 11px;gap:9px}.sf-stage .game-header{top:16px}.sf-stage .combat-score>span{padding-inline:9px}.sf-stage .combat-score b{font-size:13px}.sf-stage .lan-score{font-size:24px;padding:6px 11px}.sf-stage .health-compact b{font-size:30px}.sf-stage .energy-heading strong{font-size:15px}.sf-stage .status-icons{gap:4px}.sf-stage .state-icon{width:23px;height:27px}}
@media(max-width:400px){.sf-stage{--hud-edge:12px;--hud-tile:31px}.sf-stage .combat-score>span{padding-inline:7px}.sf-stage .combat-score i{width:15px;height:15px}.sf-stage .hud-keys{gap:1px}.sf-stage .element-tile{height:40px}.sf-stage .resource-hud{width:151px}.sf-stage .sf-spell{width:124px}}
@media(max-height:520px) and (min-width:761px){.sf-stage .game-header{top:13px}.sf-stage .hud-keys{bottom:16px}.sf-stage .sf-spell,.sf-stage .resource-hud{bottom:16px}.sf-stage .sf-spell{padding-block:7px}.sf-stage .source-icon{width:22px;height:22px}.sf-stage .spell-sources{height:22px}.sf-stage .spell-badge{width:40px;height:40px;padding:7px}.sf-stage .resource-hud{gap:7px;padding-block:8px}}

.sf-stage .status-icons:empty~.health-compact,.sf-stage .status-icons:empty~.barrier-hud{grid-row:1}

@media(max-width:400px){.sf-stage .lan-score{top:43px}}

/* Flat DOM overlays: no extra scene, blur, or GPU post-processing. */
.match-feed{position:absolute;z-index:3;right:var(--hud-edge);top:76px;width:max-content;max-width:calc(100% - var(--hud-edge)*2);margin:0;padding:0;list-style:none;display:flex;flex-direction:column;align-items:flex-end;gap:5px;pointer-events:none;font-family:var(--element-type);color:var(--element-ink)}
.match-kill{display:flex;align-items:center;gap:9px;min-height:38px;max-width:100%;padding:5px 10px;background:#101114eb;border-left:2px solid #eeede744;font-size:14px;line-height:1.2}
.match-kill.is-outgoing{border-left-color:var(--element-accent)}.match-kill.is-incoming{border-left-color:#f28e8e;background:#25181bef}.match-kill .is-you{color:var(--element-accent)}.match-kill.is-incoming .kill-target{color:#f5b5b5}
.kill-source,.kill-target{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:145px}.kill-target{font-weight:600}.kill-spell{display:flex;align-items:center;gap:6px;padding:0 7px;border-inline:1px solid var(--element-line);flex-shrink:0}.kill-result{display:block;width:24px;height:24px}.kill-recipe{display:flex;gap:1px}.kill-recipe i{display:block;width:13px;height:15px}.kill-head{width:17px;height:19px;flex-shrink:0;color:#f0d18a}.kill-direction{width:16px;height:16px;flex-shrink:0;color:var(--element-muted)}
.match-feed svg,.match-board svg{width:100%;height:100%;display:block}.match-board[hidden]{display:none}.match-board{position:absolute;z-index:4;left:50%;top:50%;transform:translate(-50%,-50%);width:min(640px,calc(100% - var(--hud-edge)*2));max-height:calc(100% - 32px);overflow:auto;padding:22px 25px 19px;background:#101114f5;border:1px solid var(--element-line);border-top:3px solid var(--element-accent);box-sizing:border-box;pointer-events:none;color:var(--element-ink);font:16px var(--element-type)}
.match-board-heading{display:flex;align-items:center;gap:11px;padding-bottom:19px}.match-board-heading strong{font:26px Impact,'Arial Narrow',sans-serif;letter-spacing:1.2px}.match-mode{color:var(--element-muted);font:12px var(--element-mono);margin-left:auto;text-transform:uppercase}.match-board kbd{font:11px var(--element-mono);padding:3px 5px;border:1px solid #eeede73b;color:var(--element-muted);background:transparent}.match-board table{border-collapse:collapse;width:100%;table-layout:fixed}.match-board th{font-weight:400;text-align:left}.match-board thead th{height:33px;font:11px var(--element-mono);color:var(--element-muted);border-bottom:1px solid var(--element-line)}.match-board th:not(:first-child){width:64px}.match-board thead i{display:block;width:19px;height:19px;margin:auto}.match-board td{text-align:center;font:20px var(--element-mono)}.match-board tbody tr{border-bottom:1px solid #eeede70e}.match-board tbody th{display:flex;align-items:center;gap:11px;height:52px;padding:0 11px}.match-board tbody tr.is-local{background:#ef613f12;box-shadow:inset 2px 0 var(--element-accent)}.match-avatar{display:block;width:23px;height:25px;flex-shrink:0;color:var(--element-muted)}.match-player-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.match-you{font:10px var(--element-mono);color:var(--element-accent)}.match-board .is-fallen .match-avatar{color:#b48f8f!important}.match-board .is-fallen .match-player-name,.match-board .is-offline .match-player-name{color:var(--element-muted)}.match-board .is-offline .match-avatar{opacity:.35}
@media(max-width:760px){.match-feed{top:66px}.match-board{padding:16px}.match-board-heading{padding-bottom:12px}.match-mode{font-size:11px}.kill-source,.kill-target{max-width:100px}.match-kill{gap:6px}}
@media(max-width:400px){.match-feed{top:103px}.match-kill{gap:5px;padding-inline:7px;font-size:13px}.kill-source,.kill-target{max-width:70px}.kill-spell{gap:3px;padding-inline:4px}.kill-result{width:21px;height:22px}.kill-recipe i{width:11px;height:13px}.kill-direction{width:13px}.kill-head{width:14px}.match-board th:not(:first-child){width:43px}.match-board-heading{gap:8px}.match-board-heading strong{font-size:24px}.match-mode{font-size:10px}.match-board tbody th{gap:7px;padding-inline:8px}.match-you{display:none}}
@media(max-height:520px){.match-board{padding-block:12px}.match-board-heading{padding-bottom:6px}.match-board tbody th{height:35px}.match-board thead th{height:26px}}

.death-recap{color:var(--element-ink);font-family:var(--element-type);background:#101114f5;border:1px solid var(--element-line);border-top:3px solid var(--element-accent);padding:21px 24px 24px;box-sizing:border-box;text-align:left}
.death-recap[hidden],.menu-open>.death-live{display:none}.death-live{position:absolute;z-index:3;left:50%;top:52%;transform:translate(-50%,-50%);width:min(470px,calc(100% - 32px));pointer-events:none}.death-menu{width:min(620px,100%);margin:16px 0 29px}.has-death-recap .brand-hero{display:none}
.death-recap svg{display:block;width:100%;height:100%}.death-heading{display:flex;align-items:center;gap:8px;color:var(--element-accent);font:11px var(--element-mono);letter-spacing:.12em}.death-heading i{display:block;width:18px;height:20px}.death-killer{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:40px/1.2 Impact,'Arial Narrow',Bahnschrift,sans-serif;margin:14px 0 20px;letter-spacing:.015em}.death-details{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;border-top:1px solid var(--element-line);padding-top:18px;align-items:center}.death-weapon{display:flex;align-items:center;gap:13px;min-width:0}.death-spell-icon{display:block;width:45px;height:48px;flex-shrink:0}.death-spell-description{min-width:0}.death-spell-name{display:block;font-size:15px;line-height:1.3;overflow-wrap:anywhere}.death-recipe{display:flex;align-items:center;gap:5px;margin-top:8px}.death-recipe i{display:block;width:17px;height:18px}.death-recipe .death-zone{border-left:1px solid var(--element-line);padding-left:8px;margin-left:4px;width:25px;color:var(--element-muted)}.death-damage{display:grid;grid-template-columns:auto auto;gap:2px 5px;align-items:baseline;border-left:1px solid var(--element-line);padding-left:18px}.death-damage-label{grid-column:1/-1;color:var(--element-muted);font:10px var(--element-mono);letter-spacing:.08em}.death-damage-value{font:43px/1.1 Impact,'Arial Narrow',sans-serif;font-variant-numeric:tabular-nums}.death-damage-unit{color:var(--element-muted);font:11px var(--element-mono)}
@media(max-width:400px){.death-recap{padding:17px 16px 19px}.death-killer{font-size:33px}.death-details{gap:10px}.death-weapon{gap:8px}.death-spell-icon{width:34px;height:38px}.death-spell-name{font-size:14px}.death-damage{padding-left:11px}.death-damage-value{font-size:36px}.death-recipe{gap:3px}.death-menu{margin-top:6px}}
@media(max-height:520px){.death-live{top:50%;padding-block:12px}.death-live .death-killer{margin-block:8px 12px;font-size:32px}.death-live .death-details{padding-top:12px}}

.match-tools{display:flex;flex-direction:column;gap:8px;order:2;min-width:0}.body-status{position:static;line-height:1.5;overflow-wrap:anywhere;padding:.5rem .7rem;background:#151c22e8;color:#d7e3da;font:600 .8rem monospace;pointer-events:none;border-left:3px solid #7ddba5}.body-status.injured{border-color:#f15b42;color:#ffb69a}.source-disabled{opacity:.18!important;filter:grayscale(1)}.element-locked{opacity:.3!important;filter:grayscale(1)}.progression-panel{padding:1rem 0;border-bottom:1px solid #ffffff25;margin-bottom:1.5rem}.progression-panel p{font-size:.95rem;line-height:1.5}.unlock-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.6rem;margin:1rem 0}.unlock-card{display:flex;flex-direction:column;align-items:center;gap:.4rem;padding:.8rem!important;min-height:100px}.unlock-card svg{width:28px;height:28px}.unlock-card span{font-size:.8rem}.unlock-card:disabled{opacity:.5}@media(max-width:600px){.unlock-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.body-status{font-size:.75rem}}

.match-shop{position:absolute;z-index:40;top:50%;left:50%;transform:translate(-50%,-50%);width:min(640px,92vw);max-height:82vh;overflow:auto;background:#161b20f5;color:#f6f2e9;padding:1.4rem;border:1px solid #ff704f;box-shadow:0 20px 80px #0009;pointer-events:auto}.match-shop[hidden],.match-buy[hidden]{display:none!important}.match-buy{position:static;width:100%;min-width:0;font:600 .8rem/1.4 var(--element-mono);padding:.6rem .8rem;background:#222b30;color:#fff;border:1px solid #ef613f;pointer-events:auto}.match-shop h2{font-size:1.5rem}.match-shop .unlock-card{color:#f6f2e9;background:#283139;border:1px solid #8d746b}.match-shop .unlock-card:not(:disabled):hover{border-color:#f87753;background:#44352f}

/* Keep match information in the resource panel, clear of the minimap. */
.touch-mode .sf-stage .match-tools{position:fixed;left:calc(var(--touch-left) + 128px);top:calc(var(--touch-top) + 86px);width:min(200px,calc(100vw - var(--touch-left) - var(--touch-right) - 128px));gap:6px}
.touch-mode .match-tools .body-status{padding:5px 7px;font-size:.75rem}
.touch-mode .match-tools .match-buy{min-height:44px;padding:6px 8px;font-size:.75rem}
@media(orientation:portrait){.touch-mode .sf-stage .match-tools{left:var(--touch-left);top:calc(var(--touch-top) + 155px);width:calc(100vw - var(--touch-left) - var(--touch-right) - 128px)}}

.body-status.spawn-protected{border-color:#7acfff;color:#b8e6ff}

.sf-stage .element-tile.element-locked{--element-color:#7d858b!important;color:#7d858b;opacity:1!important;filter:grayscale(1);border-color:#636b7155;background:#151b20e6;box-shadow:none}
.sf-stage .element-tile.element-locked .element-key{color:#8b9297}

.spell-history{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;pointer-events:auto}.spell-history[hidden]{display:none!important}.spell-recall{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0;min-height:38px;padding:6px;background:#192127e8;color:#eeede7;border:1px solid #eeede738;border-radius:0;cursor:pointer}.spell-recall kbd{font:13px var(--element-mono)}.spell-recall span{width:22px;height:22px}.spell-recall:disabled{opacity:.35;cursor:default}.spell-recall:not(:disabled):hover{border-color:#ef613f}.touch-mode .spell-recall{min-height:44px}

.match-actions{display:flex;align-items:stretch;gap:6px;min-width:0}.match-actions .match-buy{flex:1;width:auto;min-width:0;padding:6px}.match-actions .spell-history{flex:1;min-width:0}.match-actions .spell-recall{gap:4px;padding:4px}.match-actions .spell-recall span{width:16px;height:18px;flex:none}

.sf-stage .spell-sources button.source-icon{display:grid;place-items:center;min-height:25px;pointer-events:auto;cursor:pointer;line-height:1;border-radius:0}.sf-stage .spell-sources button.source-icon:disabled{cursor:default}.sf-stage .spell-sources button.source-icon:enabled:hover{border-color:#ef613f;background:#ef613f24}.sf-stage .spell-sources button.source-icon:focus-visible{outline:2px solid #e8f7ff;outline-offset:2px}

.sf-stage .weapon-summary{display:flex;flex-direction:column;gap:4px;margin-bottom:10px;color:#f4fbff;font:700 11px/1.35 var(--element-mono);overflow-wrap:anywhere}.sf-stage .weapon-summary[hidden]{display:none}.sf-stage .weapon-summary span{font:11px/1.4 var(--element-mono);color:#b3c6d0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
