:root {
  color-scheme: dark;
  --ink: #f5f5ff;
  --muted: #a3a8c9;
  --base: #0c0d19;
  --panel: rgba(15, 17, 34, .94);
  --edge: #343755;
  --lime: #dcfc75;
  --blue: #63dfff;
  --red: #ff6a9d;
  --radius: 14px;
  font: 16px/1.5 "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; color: var(--ink); background: var(--base); }
body[data-screen="playing"] { overflow: hidden; overscroll-behavior: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .53; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
h1, h2, p { margin: 0; }
.muted { color: var(--muted); font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

#arena-viewport, .backdrop { position: fixed; inset: 0; }
#arena-viewport { background: radial-gradient(ellipse at 70% 45%, #282550, #0d0e1e 74%); }
#arena-viewport canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.backdrop { pointer-events: none; background: linear-gradient(90deg, #0a0c19 0%, #0b0d1bea 27%, #0b0d1b40 65%, #0b0d1b08), linear-gradient(0deg, #0a0c1ae6, transparent 39%, #090b1860); }
body[data-screen="lobby"] .backdrop, body[data-screen="results"] .backdrop { background: #08091ac9; }
body[data-screen="playing"] .backdrop { display: none; }
.site-header { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1540px; margin: auto; padding: 24px clamp(18px, 5vw, 78px); }
.brand { display: flex; align-items: center; gap: 10px; font-size: .96rem; font-weight: 900; letter-spacing: .15em; white-space: nowrap; }
.brand-accent { color: var(--lime); }
.brand-icon { display: inline-block; flex: 0 0 auto; width: 23px; height: 28px; background: var(--lime); clip-path: polygon(55% 0, 100% 0, 72% 38%, 98% 38%, 23% 100%, 39% 54%, 0 54%); }
.header-actions { display: flex; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 16px; border: 1px solid transparent; border-radius: 8px; color: var(--ink); font-weight: 700; font-size: .9rem; line-height: 1.2; text-align: center; transition: background .16s, border-color .16s, box-shadow .16s; }
.button.small { min-height: 37px; padding: 7px 11px; font-size: .86rem; }
.button.primary { color: #141821; background: var(--lime); border-color: var(--lime); box-shadow: 0 0 24px #d5f86e2b; }
.button.primary:hover:not(:disabled) { background: #edffa9; box-shadow: 0 0 32px #d5f86e50; }
.button.secondary { background: #242748; border-color: #494e77; }
.button.secondary:hover:not(:disabled) { background: #343963; border-color: #747da9; }
.button.subtle { background: #14172dc7; border-color: #393d60; }
.button.subtle:hover:not(:disabled) { background: #2a2d4d; border-color: #6a719a; }
.button.wide { width: 100%; }
input:not([type="checkbox"]) { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--edge); border-radius: 8px; color: var(--ink); background: #0d1023; }
input::placeholder { color: #9298ba; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--lime); }
.home { position: relative; display: flex; align-items: center; width: min(1540px, 100%); min-height: calc(100dvh - 85px); padding: 22px clamp(20px, 7.5vw, 116px) 54px; margin: auto; }
.home-content { width: min(100%, 472px); }
.home h1 { font-family: "Arial Black", "Segoe UI", sans-serif; font-weight: 950; }
.home h1 > span { display: block; margin-bottom: 7px; color: #d7d9f6; font: 700 clamp(1.05rem, 2vw, 1.45rem)/1.2 "Segoe UI", sans-serif; letter-spacing: .22em; text-transform: uppercase; }
.home h1 strong { display: block; font-size: clamp(5.15rem, 10.1vw, 10.6rem); font-weight: 950; letter-spacing: -.105em; line-height: .78; transform: skew(-7deg); transform-origin: left center; }
.home h1 em { color: var(--lime); font-style: normal; text-shadow: 0 0 52px #c8ff4b3b; }
.home-description { margin: 24px 0 23px; color: #c4c9e6; font-size: clamp(1rem, 1.7vw, 1.2rem); }
.entry-form { display: grid; gap: 10px; max-width: 384px; padding: 17px; border: 1px solid var(--edge); border-radius: var(--radius); background: #12152cdb; }
.entry-form label { color: #d3d6ef; font-size: .9rem; font-weight: 700; }
.entry-divider { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .84rem; }
.entry-divider::before, .entry-divider::after { content: ""; height: 1px; flex: 1; background: #343857; }
.entry-join { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
#entry-code { text-transform: uppercase; letter-spacing: .13em; }
.inline-error { color: #ffa4bf; font-size: .88rem; }
.preview-caption { display: flex; align-items: center; gap: 12px; position: absolute; right: clamp(20px, 6vw, 88px); bottom: 42px; }
.preview-caption span:not(.preview-mark) { display: block; font-size: .8rem; color: #b6b9db; }
.preview-caption strong { display: block; font-weight: 800; font-size: 1.07rem; }
.preview-mark { display: block; width: 25px; height: 25px; border: 1px solid #bba8ff; transform: rotate(45deg); box-shadow: inset 0 0 15px #8e6cff50; }
.preview-mark::before { content: ""; position: absolute; inset: 5px; background: #c2b1ff; }

.lobby { position: relative; width: min(1240px, calc(100% - 48px)); margin: 10px auto 36px; }
.lobby-top { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 21px; }
.lobby-top h1, .results h1 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.055em; font-weight: 900; }
.lobby-top p { margin-top: 6px; }
.lobby-actions, .result-actions, .modal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.code-button { gap: 10px; color: #d8ddf5; background: #1b2030; border-color: #566943; }
.code-button:hover { border-color: var(--lime); }
.code-button strong { color: var(--lime); font: 800 1rem/1.2 Consolas, monospace; letter-spacing: .13em; }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr); align-items: stretch; gap: 14px; }
.lobby-main { display: grid; gap: 14px; }
.panel { min-width: 0; padding: clamp(14px, 2vw, 22px); border: 1px solid var(--edge); border-radius: var(--radius); background: var(--panel); box-shadow: 0 12px 35px #02041535; }
.panel-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 13px; }
.panel-heading h2, .live-score-panel h2 { font-size: 1.19rem; font-weight: 850; letter-spacing: -.02em; }
.map-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.map-card { position: relative; overflow: hidden; min-height: 103px; padding: 58px 9px 9px; border: 1px solid #47496e; border-radius: 9px; text-align: left; color: var(--ink); background: #191926; font-weight: 800; line-height: 1.15; isolation: isolate; }
.map-card[aria-pressed="true"] { border-color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }
.map-card:disabled { opacity: 1; cursor: default; }
.map-card::before, .map-card::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.map-card::before { inset: 0 0 17px; background: repeating-linear-gradient(90deg, #ffffff17 0 1px, transparent 1px 19px), repeating-linear-gradient(0deg, #ffffff16 0 1px, transparent 1px 18px), radial-gradient(ellipse at 50% 20%, var(--swatch-high), var(--swatch-low) 76%); transform: perspective(95px) rotateX(27deg) scale(1.4); transform-origin: 50% 100%; }
.map-card::after { inset: 12px 9% 29px; opacity: .86; background: linear-gradient(140deg, var(--swatch-high), var(--swatch-low)); clip-path: polygon(4% 91%, 4% 39%, 20% 39%, 20% 11%, 42% 11%, 42% 38%, 34% 38%, 34% 65%, 60% 65%, 60% 26%, 82% 26%, 82% 7%, 97% 7%, 97% 58%, 76% 58%, 76% 96%, 57% 96%, 57% 85%, 22% 85%, 22% 99%); }
.map-card[data-map="classic"] { --swatch-high: #7d58df; --swatch-low: #29264b; }
.map-card[data-map="arcade"] { --swatch-high: #e44a99; --swatch-low: #542244; }
.map-card[data-map="blackout"] { --swatch-high: #46c0a0; --swatch-low: #103a38; }
.map-card[data-map="arcade"]::after { clip-path: polygon(6% 91%, 6% 23%, 28% 23%, 28% 78%, 39% 78%, 39% 8%, 59% 8%, 59% 62%, 70% 62%, 70% 23%, 95% 23%, 95% 95%, 73% 95%, 73% 83%, 27% 83%, 27% 96%); }
.map-card[data-map="blackout"]::after { clip-path: polygon(3% 89%, 3% 50%, 10% 50%, 10% 35%, 34% 35%, 34% 66%, 47% 66%, 47% 42%, 60% 42%, 60% 15%, 92% 15%, 92% 51%, 84% 51%, 84% 76%, 67% 76%, 67% 95%); }
.map-card span { position: relative; display: inline; padding: 2px 3px; background: #121426e8; box-decoration-break: clone; border-radius: 2px; }
.map-description { margin: 11px 0 12px; font-size: .92rem; color: #d0d5ed; }
.mode-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; padding: 10px 0 11px; margin-bottom: 8px; border-block: 1px solid #343755; }
.mode-settings > span { color: #e4e6f9; font-size: .9rem; font-weight: 750; }
.mode-options { display: flex; gap: 6px; }
.mode-options .button[aria-pressed="true"] { border-color: var(--lime); color: var(--lime); background: #334131; }
.mode-options .button:disabled { opacity: .8; }
.mode-settings p { flex: 1 1 100%; }
.match-settings { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.match-settings label { display: flex; align-items: center; gap: 7px; font-size: .88rem; color: #d5d9f5; }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.team { min-width: 0; padding: 10px; border: 1px solid #3a4760; border-top: 2px solid var(--team); border-radius: 9px; background: #141b2e; }
.blue { --team: var(--blue); }
.red { --team: var(--red); }
.team.red { background: #22162b; border-color: #55374f; border-top-color: var(--team); }
.team-heading { display: flex; justify-content: space-between; align-items: center; gap: 4px; color: var(--team); }
.team-heading strong { font-size: .92rem; }
.team .button.small { min-height: 30px; padding: 5px 7px; font-size: .76rem; }
.player-list { margin: 7px 0 0; padding: 0; list-style: none; }
.player-row { display: flex; align-items: center; gap: 6px; min-height: 35px; border-top: 1px solid #c8cdff1a; font-size: .87rem; }
.player-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.player-status { margin-left: auto; flex: 0 0 auto; color: var(--muted); font-size: .76rem; }
.player-status.ready { color: var(--lime); }
.player-status.offline { color: #f3b26e; }
.player-menu { display: flex; gap: 3px; margin-left: auto; }
.player-menu .button.small { padding: 4px 5px; }
.team-empty { color: var(--muted); font-size: .87rem; }
.lobby-start { display: flex; justify-content: space-between; align-items: center; gap: 9px; margin-top: 15px; }
.lobby-start .button { white-space: nowrap; }
.chat-panel { display: flex; flex-direction: column; min-height: 0; }
.voice-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border: 1px solid #464a73; border-radius: 8px; background: #1e2140; }
.voice-panel .muted { font-size: .8rem; }
.voice-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.voice-speakers { width: fit-content; margin: 6px 0 0; padding: 3px 7px; border-radius: 5px; color: var(--lime); background: #10172de8; font-size: .79rem; }
.playing .voice-speakers { position: absolute; top: 58px; left: 16px; max-width: 70%; }
.chat-log { flex: 1; height: 0; min-height: 190px; margin: 12px 0; padding: 0 5px 0 0; overflow-y: auto; list-style: none; scrollbar-color: #5a5e8a #1b1d33; }
.chat-log li { padding: 6px 0; overflow-wrap: anywhere; font-size: .9rem; }
.chat-log .system { color: #a6aaca; font-size: .84rem; }
.chat-log b { margin-right: 7px; color: var(--team); }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }

.playing { position: fixed; inset: 0; user-select: none; pointer-events: none; }
.playing button { pointer-events: auto; }
.match-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 12px; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.match-map, .match-actions { display: flex; align-items: center; gap: 8px; }
.match-map { justify-self: start; padding: 8px 10px; background: #0b0e1bd9; border-radius: 8px; }
.match-map .brand-icon { width: 16px; height: 20px; }
.match-actions { justify-self: end; }
.score-strip { display: flex; align-items: stretch; border: 1px solid #ced5ff44; border-radius: 10px; overflow: hidden; background: #0a0e20ec; box-shadow: 0 5px 18px #0006; }
.score-side { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 90px; padding: 5px 10px; color: var(--team); background: color-mix(in srgb, var(--team) 12%, #0e1124); }
.score-side span { font-size: .71rem; font-weight: 850; letter-spacing: .1em; }
.score-side strong, .match-clock { font: 850 1.45rem/1.4 Consolas, monospace; font-variant-numeric: tabular-nums; }
.match-clock { align-content: center; padding: 5px 10px; }
.match-clock.overtime { color: var(--lime); }
.zone-panel { --zone: var(--lime); position: absolute; top: 71px; left: 50%; display: flex; align-items: center; gap: 8px; width: max-content; max-width: 90%; padding: 6px 11px; transform: translateX(-50%); border: 1px solid #cad3a854; border-radius: 7px; color: var(--zone); background: #0e1326ec; }
.zone-panel.blue { --zone: var(--blue); }
.zone-panel.red { --zone: var(--red); }
.zone-panel.core { --zone: #ffdc72; }
.zone-panel strong, .zone-panel span { display: block; font-size: .84rem; }
.zone-panel #zone-status { font-size: .73rem; color: #d5daf4; }
.zone-bearing { flex: 0 0 auto; width: 21px; height: 23px; clip-path: polygon(50% 0, 100% 100%, 50% 72%, 0 100%); background: var(--zone); }
.zone-meter { height: 3px; margin-top: 3px; background: #424961; }
.zone-meter div { width: 0; height: 3px; background: var(--zone); }
.tag-feed { position: absolute; top: 72px; right: 16px; display: grid; justify-items: end; gap: 5px; }
.tag-feed p { padding: 4px 8px; border-radius: 5px; background: #0b0d1de3; font-size: .8rem; }
.tag-feed strong { color: var(--team); font-weight: 800; }
.reticle { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); color: #ecf8ff; filter: drop-shadow(0 0 2px #080915); transition: transform .095s ease-out, color .095s; }
.reticle i, .reticle b { position: absolute; background: currentColor; border-radius: 1px; }
.reticle > i:nth-child(1), .reticle > i:nth-child(2) { width: 2px; height: 6px; left: 16px; }
.reticle > i:nth-child(1) { top: 1px; }
.reticle > i:nth-child(2) { bottom: 1px; }
.reticle > i:nth-child(3), .reticle > i:nth-child(4) { width: 6px; height: 2px; top: 16px; }
.reticle > i:nth-child(3) { left: 1px; }
.reticle > i:nth-child(4) { right: 1px; }
.reticle b { width: 3px; height: 3px; top: 15.5px; left: 15.5px; }
.reticle.kick { color: #ffefbd; transform: translate(-50%, -50%) scale(1.14); }
.hit-mark { position: absolute; inset: -2px; opacity: 0; }
.hit-mark i { width: 2px; height: 10px; }
.hit-mark i:nth-child(1) { top: 4px; left: 7px; transform: rotate(-45deg); }
.hit-mark i:nth-child(2) { top: 4px; right: 7px; transform: rotate(45deg); }
.hit-mark i:nth-child(3) { bottom: 4px; left: 7px; transform: rotate(45deg); }
.hit-mark i:nth-child(4) { bottom: 4px; right: 7px; transform: rotate(-45deg); }
.reticle.hit .hit-mark, .reticle.shield-hit .hit-mark { opacity: 1; }
.reticle.hit, .reticle.shield-hit { transform: translate(-50%, -50%); }
.reticle.hit .hit-mark { color: #e8ff91; filter: drop-shadow(0 0 5px #bffa5d); }
.reticle.shield-hit .hit-mark { color: #7aeeff; filter: drop-shadow(0 0 5px #34c6ff); }
.tag-confirm { position: absolute; top: calc(50% + 33px); left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 1px; width: max-content; max-width: 62%; text-align: center; text-shadow: 0 2px 6px #060711, 0 1px 3px #060711; animation: tag-appear .16s ease-out; }
.tag-confirm strong { color: #e9ff9d; font-size: clamp(.95rem, 3.2vw, 1.3rem); font-weight: 900; letter-spacing: .075em; }
.tag-confirm span { color: #f3efff; font-size: .79rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@keyframes tag-appear { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.screen-flash { position: absolute; inset: 0; opacity: 0; box-shadow: inset 0 0 23vmin #ff4d8c; background: #ff4d8c27; transition: opacity .32s; }
.screen-flash.on { opacity: .9; transition: opacity .05s; }
.match-message, .control-prompt { position: absolute; top: 68%; left: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; width: max-content; max-width: 92%; text-align: center; }
.match-message { top: 42%; padding: 11px 18px; border: 1px solid #aeb8ff60; border-radius: 10px; background: #0d1023e8; }
.match-message strong { font-size: clamp(1.4rem, 4.5vw, 2.45rem); font-weight: 900; letter-spacing: -.02em; }
.match-message span, .control-prompt span { color: #d8dcf3; font-size: .89rem; text-shadow: 0 1px 5px #090a15; }
.match-bottom { position: absolute; right: max(15px, env(safe-area-inset-right)); bottom: max(17px, env(safe-area-inset-bottom)); left: max(15px, env(safe-area-inset-left)); display: flex; align-items: end; gap: 9px; }
.loadout, .personal-score { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid #a8b7ff51; border-radius: 8px; background: #0b0e21e8; }
.loadout strong, .loadout span:not(.team-light) { display: block; }
.loadout span:not(.team-light) { color: #bbc0df; font-size: .77rem; }
.team-light { width: 7px; align-self: stretch; border-radius: 3px; background: var(--team, var(--lime)); box-shadow: 0 0 13px var(--team, var(--lime)); }
.charge-bar { height: 3px; width: 94px; margin-top: 5px; background: #393e5e; }
.charge-bar div { width: 100%; height: 3px; background: var(--lime); }
.dash-meter { padding: 8px 10px; border: 1px solid #5d708789; border-radius: 7px; color: #b6e8fe; background: #101629e8; font-size: .79rem; white-space: nowrap; }
.dash-meter .charge-bar { width: 67px; }
.dash-meter .charge-bar div { background: #72dcff; }
.active-buffs { display: flex; flex-wrap: wrap; gap: 5px; }
.buff { padding: 5px 8px; color: var(--buff); background: #11152dee; border: 1px solid currentColor; border-radius: 6px; font-size: .82rem; font-weight: 800; }
.personal-score { margin-left: auto; color: var(--lime); }
.personal-score strong { font-size: 1.35rem; line-height: 1; }
.personal-score span { font-size: .73rem; font-weight: 800; letter-spacing: .1em; }
.live-score-panel { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); width: min(590px, 94vw); max-height: 74%; overflow: auto; pointer-events: auto; }
.live-score-panel h2 { margin-bottom: 10px; }
.touch-controls { position: absolute; inset: 0; }
.touch-stick, .touch-fire, .touch-jump, .touch-dash { position: absolute; touch-action: none; pointer-events: auto; }
.touch-stick { left: max(22px, env(safe-area-inset-left)); bottom: calc(86px + env(safe-area-inset-bottom)); display: grid; place-items: center; width: 105px; height: 105px; border: 1px solid #c0c5ff76; border-radius: 50%; background: #14172d75; }
.touch-stick > div { width: 42px; height: 42px; border: 1px solid #d6dcffae; border-radius: 50%; background: #7b85b279; }
.touch-fire, .touch-jump { right: max(22px, env(safe-area-inset-right)); bottom: calc(87px + env(safe-area-inset-bottom)); width: 72px; height: 72px; border: 1px solid var(--lime); border-radius: 50%; color: var(--lime); background: #222b23e3; font-weight: 900; }
.touch-jump { right: calc(105px + env(safe-area-inset-right)); bottom: calc(82px + env(safe-area-inset-bottom)); width: 57px; height: 57px; border-color: #b8c2fa; color: #edf0ff; background: #17213be6; font-size: .89rem; }
.touch-dash { right: calc(103px + env(safe-area-inset-right)); bottom: calc(151px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border: 1px solid #72dcff; border-radius: 50%; color: #c4eeff; background: #163849e6; font-weight: 850; font-size: .86rem; }
.touch-dash.charging { opacity: .46; }
.touch-fire:active, .touch-jump:active, .touch-dash:active { background: #4a5740; }

.results { position: relative; display: grid; justify-items: center; margin: 16px 16px 40px; }
.result-card { width: min(720px, 100%); }
.result-card > .muted { margin: 6px 0; }
.final-score { display: flex; align-items: center; gap: 14px; margin: 16px 0; font: 900 1.7rem/1.2 Consolas, monospace; }
.final-score span { color: var(--team); }
.result-spotlight { margin: 0 0 10px; color: var(--lime); font-size: .9rem; font-weight: 750; }
.result-actions { justify-content: flex-end; margin-top: 19px; }
.score-table-wrap { overflow-x: auto; }
.score-table { width: 100%; border-collapse: collapse; font-size: .87rem; text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
.score-table th, .score-table td { padding: 7px 8px; border-bottom: 1px solid #c0c5ff27; }
.score-table th { color: #b8bfde; font-weight: 700; }
.score-table td:first-child { color: var(--team, var(--ink)); font-weight: 700; }
.score-table .self { background: #defe7516; }
.modal { width: min(550px, 94%); max-height: 86%; padding: 21px; border: 1px solid #63678b; border-radius: var(--radius); color: var(--ink); background: #14172c; box-shadow: 0 20px 70px #0009; }
.modal::backdrop { background: #050715b5; }
.modal > p { margin-bottom: 11px; }
.board-modal { width: min(640px, 94%); }
.controls-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.controls-list div { padding: 8px; border-radius: 6px; background: #242846; font-size: .9rem; }
.controls-list dt { font-weight: 800; }
.controls-list dd { margin: 0; color: var(--muted); }
.match-voice-players { display: grid; gap: 6px; margin: 13px 0; }
.match-voice-players div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-actions { margin-top: 13px; }
.toast { position: fixed; z-index: 8; right: 17px; bottom: 17px; max-width: min(450px, calc(100% - 34px)); padding: 11px 15px; border: 1px solid #6f769e; border-radius: 9px; color: var(--ink); background: #171d37; box-shadow: 0 5px 35px #0005; }

@media (max-width: 850px) {
  .home h1 strong { font-size: clamp(5.1rem, 13vw, 7.7rem); }
  .preview-caption { bottom: 24px; }
  .lobby-grid { grid-template-columns: minmax(0, 1fr); }
  .chat-log { min-height: 175px; max-height: 240px; }
  .lobby-top { align-items: start; }
}
@media (max-width: 620px) {
  .site-header { padding: 15px 13px; }
  .brand { gap: 6px; font-size: .85rem; }
  .brand-icon { width: 17px; height: 22px; }
  .header-actions { gap: 4px; }
  .header-actions .button { padding: 6px; font-size: .8rem; }
  .home { align-items: start; min-height: calc(100dvh - 67px); padding: 44px 19px 30px; }
  .home-description { margin: 20px 0 17px; }
  .preview-caption { display: none; }
  .backdrop { background: linear-gradient(90deg, #0a0c19ed, #0b0d1b84), linear-gradient(0deg, #0a0c1a, transparent); }
  .lobby { width: calc(100% - 22px); margin-top: 5px; }
  .lobby-top { flex-direction: column; gap: 11px; margin-bottom: 13px; }
  .lobby-actions .button { min-height: 39px; padding: 7px 8px; font-size: .81rem; }
  .map-card { min-height: 92px; padding: 46px 5px 7px; font-size: .83rem; }
  .team-grid { gap: 6px; }
  .team { padding: 7px; }
  .player-row { flex-wrap: wrap; gap: 2px 5px; }
  .player-status { font-size: .71rem; }
  .lobby-start .muted { font-size: .81rem; }
  .match-top { grid-template-columns: 1fr auto; padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left)); gap: 5px; }
  .match-map { display: none; }
  .score-strip { justify-self: start; }
  .match-actions { gap: 3px; }
  .match-actions .button.small { min-height: 33px; padding: 4px 5px; font-size: .75rem; }
  .score-side { min-width: 43px; padding: 3px 6px; gap: 4px; }
  .score-side strong, .match-clock { font-size: 1.1rem; }
  .score-side span { font-size: .6rem; }
  .match-clock { padding: 3px 4px; }
  .tag-feed { top: 47px; right: 7px; }
  .zone-panel { top: 84px; right: auto; left: 7px; transform: none; padding: 4px 7px; max-width: 58%; }
  .zone-panel strong { font-size: .75rem; }
  .zone-bearing { width: 15px; height: 17px; }
  .playing .voice-speakers { top: 45px; left: 7px; max-width: 45%; }
  .tag-feed p { padding: 3px 5px; font-size: .73rem; }
  .match-bottom { left: 7px; right: 7px; bottom: max(7px, env(safe-area-inset-bottom)); }
  .loadout, .personal-score { padding: 6px 7px; }
  .dash-meter { display: none; }
}
@media (pointer: coarse) and (max-height: 550px) {
  .touch-stick { left: max(9px, env(safe-area-inset-left)); bottom: calc(62px + env(safe-area-inset-bottom)); width: 86px; height: 86px; }
  .touch-fire { right: max(10px, env(safe-area-inset-right)); bottom: calc(60px + env(safe-area-inset-bottom)); width: 63px; height: 63px; }
  .touch-jump { right: calc(80px + env(safe-area-inset-right)); bottom: calc(55px + env(safe-area-inset-bottom)); }
  .touch-dash { right: calc(82px + env(safe-area-inset-right)); bottom: calc(118px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; }
  .tag-confirm { animation: none; }
}
