#lobby {
  --paper: #e5e9d9;
  --signal: #ff8a50;
  --dim: #bbc7bc;
  --gutter: clamp(20px, 5vw, 96px);
  width: 100%;
  max-width: none;
  min-height: 100svh;
  margin: 0;
  padding: 0 var(--gutter);
  color: #f6f4df;
  background-color: #15251f;
  background-image: radial-gradient(ellipse at 10% 40%, #283c31, transparent 55%), repeating-linear-gradient(135deg, transparent 0 49px, #e2f4ce07 49px 50px);
  font-family: system-ui, sans-serif;
}
#lobby .mast, .lobby-foot, .cover { width: min(100%, 1620px); margin-inline: auto; }
#lobby .mast {
  height: clamp(60px, 8.5vh, 88px); flex: none;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #a6bea32e;
}
.arena-brand { display: inline-flex; align-items: center; color: #fbf3da; font: italic 950 19px/1 system-ui,sans-serif; letter-spacing: -.07em; text-decoration: none; }
.arena-brand span { color: var(--signal); }
.arena-brand i { width: 27px; height: 26px; background: var(--signal); clip-path: polygon(0 5%,100% 5%,86% 31%,61% 31%,40% 96%,12% 96%,34% 31%,0 31%); margin-right: 9px; }
.mast-tools { display: flex; gap: clamp(12px, 2.4vw, 40px); }
.mast-tools button { padding: 7px 0; border: none; background: transparent; color: #e0e7d9; font-size: 14px; font-weight: 650; }
.mast-tools button:hover { color: var(--signal); }
.cover { flex: 1; display: grid; grid-template-columns: minmax(280px, .76fr) minmax(375px, 1.24fr); align-items: center; gap: clamp(24px,5vw,110px); padding-block: clamp(22px,4.6vh,64px); }
.deploy { max-width: 490px; }
.mode-line, .plate-head, .kit-kind, .lobby-foot { font: 700 13px/1.35 var(--mono); }
.mode-line { letter-spacing:.12em; text-transform: uppercase; display:flex; align-items:center; gap:12px; color:#d3dccb; }
.mode-line i { width: 27px; height: 8px; background:repeating-linear-gradient(120deg,var(--signal) 0 4px,transparent 4px 8px); }
#lobby h1 { transform:none; margin: clamp(15px,2.4vh,32px) 0 0; font: 1000 clamp(80px,min(8.3vw,14vh),158px)/.79 'Arial Black',system-ui,sans-serif; letter-spacing:-.09em; }
#lobby h1 span { display:block; width:max-content; font-size:inherit; letter-spacing:inherit; color:inherit; transform:skew(-7deg); transform-origin:bottom left; }
#lobby h1 span+span { color:var(--signal); margin-top:.075em; }
#lobby h1 small { font-size:.34em; letter-spacing:-.06em; padding-left:.11em; }
.pitch { margin:clamp(18px,3.2vh,35px) 0; color:#d5dfd2; line-height:1.55; font-size:clamp(15px,1.17vw,19px); }
#launch { max-width:450px; }
.loadout-inputs { display:grid; grid-template-columns: .87fr 1.13fr; gap:11px; }
.loadout-inputs label { min-width:0; margin:0; color:#dce3d4; font:650 14px system-ui,sans-serif; }
#lobby #name, #lobby #tournamentPassword, #lobby #startingWeapon { width:100%; height:45px; margin-top:6px; border-radius:3px; border:1px solid #647366; color:#f6f4df; background-color:#1d3027; padding:0 12px; font:500 16px system-ui,sans-serif; }
#lobby #startingWeapon { appearance:none; padding-right:27px; background-image:linear-gradient(45deg, transparent 50%, #d6dfd1 50%),linear-gradient(135deg,#d6dfd1 50%,transparent 50%);background-position:calc(100% - 16px) 52%,calc(100% - 12px) 52%;background-size:4px 4px;background-repeat:no-repeat; }
#lobby #launchButton { min-height:53px; margin-top:13px; border-radius:3px; background:var(--signal); color:#17251d; font:800 18px system-ui,sans-serif; box-shadow: inset 0 -3px #b8552d; }
#launchButton i { width:12px;height:14px;background:currentColor;clip-path:polygon(0 0,100% 50%,0 100%); }
#lobby #launchButton:hover { background:#ffa56d; }
#lobby .arsenal { --swatch:#b6c8ba; color:#1c302a; background:var(--paper); min-width:0; position:relative; padding: clamp(16px,1.6vw,30px); border-radius:3px; box-shadow:6px 7px 0 #09150f5e; }
.plate-head { display:flex; align-items:center; justify-content:space-between; gap:12px; color:#415347; text-transform:uppercase; letter-spacing:.09em; border-bottom:1px solid #5e71664d; padding-bottom:11px; }
.plate-head h2 { margin:0; font:inherit; }
#slotCount { font-variant-numeric: tabular-nums; letter-spacing:.03em; }
.print { width:100%; height:clamp(176px,30vh,400px); margin:0; position:relative; overflow:hidden; }
.print canvas { display:block; height:100%; width:100%; }
.kit-copy { border-top:1px solid #5e71664d; padding-top:12px; }
.kit-kind { margin:0; color:#526454; text-transform:uppercase; letter-spacing:.12em; font-size:12px; }
.kit-copy h3 { margin:1px 0 4px; font:850 clamp(29px,3vw,52px)/1.08 system-ui,sans-serif; letter-spacing:-.055em; }
#kitEffect { min-height:2.7em; margin:0; color:#354b3c; font:500 clamp(15px,1.12vw,18px)/1.36 system-ui,sans-serif; }
#kitChoices { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); margin-top:12px; gap:5px; }
#kitChoices button { position:relative; display:grid; justify-items:center; align-content:end; gap:1px; min-width:0; min-height:66px; padding:4px 2px 6px; color:#294236; border:1px solid #879b88; border-radius:2px; background:#d4ddca; font:700 clamp(12px,1vw,15px) system-ui,sans-serif; }
#kitChoices button:hover { background:#ecf0df; }
#kitChoices button[aria-pressed=true] { background:#223b30; border-color:#223b30; color:#f9f6e5; box-shadow:inset 0 -4px var(--signal); }
#kitChoices button:focus-visible { outline:3px solid #ad4c22; outline-offset:1px; }
#kitChoices canvas { height:29px; width:40px; }
#kitChoices b { position:absolute; top:4px; left:6px; opacity:.78; font:650 11px var(--mono); }
#lobby .lobby-foot { display:flex; justify-content:space-between; align-items:center; padding:13px 0 15px; border-top:1px solid #a6bea32e; color:var(--dim); font-size:12px; }
.lobby-foot span { display:flex; align-items:center; gap:12px; }
.guide a { color:inherit; text-underline-offset:4px; }
.teams-dot { width:6px; height:6px; border-radius:50%; background:#dd705c; box-shadow:7px 0 #7caf79,14px 0 #7ca8cf; margin-right:13px; }
.guide { color:#eef1de; background:#20352a; border:1px solid #72917a; border-radius:5px; padding:22px; width:min(450px,calc(100% - 28px)); max-height:87svh; }
.guide::backdrop { background:#08160edd; }
.guide-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.guide-head h2 { margin:0; font-size:24px; }
.guide-head button { width:38px;height:38px;line-height:1; border:1px solid #839784;background:transparent;color:inherit;font-size:25px; }
.guide img { width:100%;background:#e1e5cf;margin-top:14px; }
.guide dl { display:grid; grid-template-columns:auto 1fr; gap:11px 17px; }
.guide dt { color:#ffb788; font-family:var(--mono); }
.guide dd { margin:0; }
@media(max-width:780px) {
  #lobby { --gutter:clamp(16px,4vw,32px); }
  .cover {grid-template-columns:minmax(230px,.8fr) minmax(325px,1.2fr);gap:18px;}
  #lobby h1 {font-size:clamp(66px,10vw,82px);}
  .loadout-inputs {grid-template-columns:1fr;}
  .print {height:185px;}
}
@media(max-width:635px) {
  #lobby .mast {height:57px;} .arena-brand {font-size:16px;} .arena-brand i{width:20px;height:21px;margin-right:5px;}
  .mast-tools {gap:12px;} .mast-tools button{font-size:12px;}
  .cover {grid-template-columns:1fr;gap:24px;padding-block:23px;} .deploy, #launch {max-width:none;}
  #lobby h1 {font-size:clamp(48px,12.1vw,74px);display:flex;line-height:.9;margin-top:10px;}
  #lobby h1 span+span{margin-top:0;}
  .mode-line {font-size:11px;margin:0;} .pitch{margin:10px 0 14px;font-size:14px;} .pitch br{display:none;} .pitch br::after{content:' ';}
  .loadout-inputs {grid-template-columns:.85fr 1.15fr;} #lobby #launchButton{min-height:47px;}
  .print{height:clamp(157px,43vw,245px);} #kitEffect{min-height:2.75em;}
  #kitChoices button{min-height:58px;} #kitChoices canvas{height:24px;width:33px;} #kitChoices{gap:3px;}
}
@media(max-width:350px){#kitChoices button{font-size:10px;}.mast-tools{gap:8px;}}
#kitChoices { grid-template-columns:repeat(6,minmax(0,1fr)); }
.kit-meta { display:flex;align-items:center;justify-content:space-between;gap:7px; }
#overview, #toggleReplay { font:700 13px system-ui,sans-serif; cursor:pointer;color:#294536; border:0; border-radius:2px; }
#overview { padding:2px 5px; background:transparent;text-decoration:underline;text-underline-offset:3px; }
#toggleReplay { padding:5px 9px;background:#d2dac5; }
#toggleReplay:hover {background:#c0cdb5;}
#kitReplay {width:100%;height:100%;object-fit:contain;background:#c8ccbf;display:block;}
@media(max-width:1050px) and (min-width:636px), (max-width:440px) {
  #kitChoices { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #kitChoices button {min-height:44px;grid-template-columns:25px max-content;justify-content:center;align-items:center;align-content:center;gap:0;}
  #kitChoices canvas {height:22px;width:25px;}
}

#matchOptions{display:contents}
.touch-nav,.touch-intro,#touchScores,.guide .touch-guide{display:none}
@media(pointer:coarse){
  #lobby{padding-inline:max(var(--gutter),env(safe-area-inset-left)) max(var(--gutter),env(safe-area-inset-right));padding-top:env(safe-area-inset-top)}
  .touch-intro{display:block;margin:0 0 12px;color:#dbebd5;font:600 14px/1.4 system-ui}
  .guide .key-guide{display:none}.guide .touch-guide{display:grid}
  #session{box-sizing:border-box;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);height:100svh;height:100dvh;overflow:hidden}
  #session nav{position:relative;z-index:8;flex:none;display:flex;flex-wrap:nowrap;gap:7px;padding:3px 8px;min-height:44px;box-sizing:border-box;border-bottom:1px solid #4a5b4c;font:600 12px system-ui}
  #session nav>b,#session .serverLabel{display:none}
  #session #population,#session #latency{white-space:nowrap}#session #latency{margin-right:auto}
  #session .touch-nav{display:block;min-height:40px;padding:4px 11px;font:700 14px system-ui}
  #session .touch-nav[aria-expanded=true]{background:#ffb783;color:#1a2c21;border-color:#ffb783}
  #session #matchOptions,#session #arenaChat{display:none}
  #session[data-panel=menu] #matchOptions,#session[data-panel=chat] #arenaChat{background:#1d2c24;box-shadow:0 6px 18px #14261c55;border:1px solid #64786a;border-radius:6px;position:absolute;z-index:8;right:5px;width:min(320px,calc(100% - 10px));box-sizing:border-box}
  #session[data-panel=menu] #matchOptions{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:8px;top:100%;padding:12px;max-height:calc(100dvh - 58px);overflow:auto}
  #matchOptions .teamPicker{display:grid;margin:0;gap:2px}#matchOptions .teamPicker select{width:100%;min-height:40px;font-size:16px}
  #matchOptions .volumes{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px}
  #matchOptions .volumes>div{width:auto}.volumes input{min-height:28px}
  #matchOptions button{min-height:40px}#matchOptions #voiceStatus:not(:empty){grid-column:1/-1}#matchOptions #exit{grid-column:1/-1;margin:0}
  #session[data-panel=chat] #arenaChat{display:flex;top:3px;height:min(250px,74%);min-height:110px}
  #session #chatHeading{padding:6px 9px}#session #chatFeed{font-size:14px;padding:4px 9px}#session #chatForm{padding:4px}#chatForm input,#chatForm button{min-height:40px}
  #touchScores{display:block;grid-column:1/-1}#touchScores summary{cursor:pointer;padding:8px 0}#touchScores ol{margin:3px 0;padding-left:26px}#touchScores li{padding:2px 0}#touchScores [data-team="0"]{color:#ffad9e}#touchScores [data-team="1"]{color:#a2dfaa}#touchScores [data-team="2"]{color:#a5caff}
  #session #playArea iframe{flex:1;width:100%}
  @media(max-width:635px){.mast-tools button{min-height:44px}.cover{padding-block:18px}.pitch{margin-bottom:8px}.touch-intro{max-width:34ch}.arsenal #kitChoices button{min-height:44px}}
}

.mode-switch {display:inline-flex;border:1px solid #647366;border-radius:4px;padding:3px;margin-bottom:13px;gap:3px}
.mode-switch button {border:0;background:transparent;color:#e0e7d9;padding:8px 15px;border-radius:2px;font-weight:650}
.mode-switch button[aria-pressed="true"] {background:#d6e3c8;color:#192c21}
#tournamentHint {font-size:14px;color:#d5dfd2;margin:0 0 13px}
#launch [hidden],#matchOptions #openStandings[hidden],#standingsPages[hidden] {display:none}
#standingsDialog table {width:100%;border-collapse:collapse;margin:12px 0;font-variant-numeric:tabular-nums}
#standingsDialog td,#standingsDialog th {padding:5px 8px;text-align:left;border-bottom:1px solid #526257}
#standingsDialog th:last-child,#standingsDialog td:last-child {text-align:right}
#standingsDialog tr.mine {background:#324f3e;color:#ffbf90}
#standingsDialog select,#standingsPages button {padding:7px;color:inherit;border:1px solid #718675;background:#253d2e;border-radius:3px}
#standingsPages {display:flex;align-items:center;justify-content:space-between}
#myTournamentScore {font-weight:bold;color:#ffbc89}
@media(pointer:coarse){.mode-switch button,#standingsDialog button,#standingsSort{min-height:44px}}
