/* ============ VOXELWATCH UI ============ */
:root {
  --blue: #18c8ff;
  --blue-dk: #0a7fb4;
  --orange: #ff7a2f;
  --red: #ff4d4d;
  --cream: #f5efdf;
  --ink: #101623;
  --panel: rgba(10, 18, 32, 0.82);
  --panel-lite: rgba(22, 34, 56, 0.78);
  --gold: #ffd23f;
  --heal: #37e07f;
  --ult: #ffe14d;
  --font: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Arial Black", "Avenir Next Heavy", "Segoe UI Black", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0a1220; font-family: var(--font); }
#game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }

/* ============ BOOT ============ */
#boot {
  position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 26px;
  background: linear-gradient(160deg, #0d1a30 0%, #132f52 55%, #0d1a30 100%);
  transition: opacity .5s ease;
}
#boot.fade { opacity: 0; pointer-events: none; }
.boot-logo {
  font-family: var(--font-head); font-size: clamp(38px, 8vw, 76px); letter-spacing: .06em;
  color: var(--cream); text-shadow: 0 4px 0 rgba(0,0,0,.35);
}
.boot-logo span { color: var(--blue); }
.boot-bar { width: min(420px, 70vw); height: 12px; background: rgba(255,255,255,.12); transform: skewX(-18deg); }
.boot-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--blue), #7fe9ff); transition: width .2s; }
.boot-tip { color: rgba(245,239,223,.6); font-size: 14px; letter-spacing: .18em; text-transform: uppercase; }

/* ============ GENERIC SCREEN ============ */
#screens { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: auto;
  opacity: 0; transition: opacity .28s ease;
}
.screen.show { opacity: 1; }
.screen > * { position: relative; z-index: 2; }

.vw-title {
  font-family: var(--font-head); font-size: clamp(42px, 9vw, 96px); color: var(--cream);
  letter-spacing: .05em; line-height: .95; text-align: center;
  text-shadow: 0 6px 0 rgba(0,0,0,.3), 0 0 42px rgba(24,200,255,.35);
}
.vw-title .x { color: var(--blue); }
.vw-sub {
  margin-top: 10px; color: rgba(245,239,223,.75); font-size: clamp(12px, 1.8vw, 17px);
  letter-spacing: .42em; text-transform: uppercase; text-align: center;
}

.btn {
  display: block; min-width: 300px; padding: 15px 34px; border: 0;
  font-family: var(--font-head); font-size: 19px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cream); background: linear-gradient(180deg, rgba(48,72,110,.95), rgba(26,42,70,.95));
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  transition: transform .12s, background .15s, filter .15s;
  position: relative;
}
.btn:hover { transform: translateY(-2px) scale(1.02); background: linear-gradient(180deg, #3f9fe0, #1c6fb4); filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #28b7f2, #0d7cc0); color: #fff; box-shadow: 0 8px 28px rgba(24,200,255,.35); }
.btn.primary:hover { background: linear-gradient(180deg, #4fcfff, #1295dd); }
.btn.warn { background: linear-gradient(180deg, #f2803a, #c74d17); }
.btn.ghost { background: rgba(255,255,255,.08); }
.btn.small { min-width: 0; padding: 10px 22px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.4); }

.menu-col { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.press-start {
  margin-top: 46px; font-family: var(--font-head); color: var(--cream); font-size: clamp(16px,2.4vw,24px);
  letter-spacing: .3em; text-transform: uppercase; animation: pulse 1.6s ease-in-out infinite;
  background: none; border: 0;
}
@keyframes pulse { 0%,100% { opacity: .55; transform: scale(1);} 50% { opacity: 1; transform: scale(1.04);} }
.screen-foot {
  position: absolute; bottom: 18px; width: 100%; text-align: center;
  color: rgba(245,239,223,.4); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
}

/* ============ TITLE/MENU backdrops ============ */
.scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.scrim.bottom { background: linear-gradient(180deg, transparent 40%, rgba(5,10,20,.78) 100%); }
.scrim.vignette { background: radial-gradient(ellipse at center, transparent 45%, rgba(4,8,16,.7) 100%); }
.menu-panel {
  background: var(--panel); padding: 26px 34px; min-width: 340px;
  clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
  border-left: 4px solid var(--blue);
}
.menu-panel h2 {
  font-family: var(--font-head); color: var(--cream); font-size: 26px; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: 18px;
}

/* ============ SETTINGS ============ */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin: 13px 0; color: var(--cream); }
.set-row label { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.set-row input[type=range] { width: 190px; accent-color: var(--blue); }
.set-row .val { width: 44px; text-align: right; font-variant-numeric: tabular-nums; color: var(--blue); font-weight: 700; }
.set-row select, .set-row input[type=checkbox] { accent-color: var(--blue); font-size: 14px; }
.set-row select { background: #16223a; color: var(--cream); border: 1px solid #33507e; padding: 5px 9px; }

/* ============ CONTROLS ============ */
.ctl-grid { display: grid; grid-template-columns: auto 1fr; gap: 9px 22px; margin: 8px 0 20px; }
.ctl-grid .k {
  font-family: var(--font-head); font-size: 13px; color: var(--ink); background: var(--cream);
  padding: 4px 10px; text-align: center; min-width: 56px;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.ctl-grid .d { color: rgba(245,239,223,.85); font-size: 14px; align-self: center; }

/* ============ HERO SELECT ============ */
#select-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; z-index: 2; }
.select-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 22px 34px 0;
}
.select-head h1 { font-family: var(--font-head); color: var(--cream); font-size: clamp(24px,4vw,42px); letter-spacing: .1em; text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.select-head .sub { color: rgba(245,239,223,.65); letter-spacing: .28em; font-size: 12px; text-transform: uppercase; margin-top: 4px; }
.select-timer { font-family: var(--font-head); font-size: 30px; color: var(--gold); text-align: right; }
.select-timer .lbl { font-size: 11px; letter-spacing: .3em; color: rgba(245,239,223,.55); display: block; }

.hero-grid {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-content: flex-end;
  padding: 0 30px 18px; margin-top: auto; max-width: 1150px; width: 100%;
}
.hero-card {
  width: 96px; border: 0; background: var(--panel-lite); padding: 0 0 8px;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: transform .12s, filter .15s; position: relative;
}
.hero-card img { width: 100%; display: block; aspect-ratio: 1; }
.hero-card .nm {
  font-family: var(--font-head); font-size: 11px; color: var(--cream); text-align: center;
  letter-spacing: .05em; margin-top: 5px; display: block;
}
.hero-card .rl { position: absolute; top: 5px; left: 7px; width: 15px; height: 15px; }
.hero-card:hover { transform: translateY(-5px) scale(1.06); filter: brightness(1.25); z-index: 3; }
.hero-card.picked { outline: 3px solid var(--gold); filter: brightness(1.2); }
.hero-card.taken { filter: grayscale(.8) brightness(.5); }
.role-tag { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; padding: 2px 8px; display: inline-block; }
.role-tank { background: #2d6fbe; color: #cfe6ff; }
.role-damage { background: #d95b2a; color: #ffe3d3; }
.role-support { background: #2ea86e; color: #d8ffe9; }

.select-side {
  position: absolute; right: 30px; top: 110px; width: 320px; max-height: calc(100% - 330px);
  overflow-y: auto; background: var(--panel); padding: 20px 22px; z-index: 2;
  clip-path: polygon(16px 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
  border-right: 4px solid var(--blue);
}
.select-side h2 { font-family: var(--font-head); color: var(--cream); font-size: 26px; letter-spacing: .08em; }
.select-side .hero-title { color: var(--blue); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; margin: 2px 0 12px; }
.select-side .bio { color: rgba(245,239,223,.8); font-size: 13px; line-height: 1.5; margin-bottom: 14px; }
.stat-bars { margin-bottom: 12px; }
.stat-bars .row { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.stat-bars .row span { width: 62px; font-size: 11px; letter-spacing: .12em; color: rgba(245,239,223,.7); text-transform: uppercase; }
.stat-bars .bar { flex: 1; height: 7px; background: rgba(255,255,255,.12); transform: skewX(-16deg); }
.stat-bars .bar i { display: block; height: 100%; background: var(--blue); }
.ab-row { display: flex; gap: 10px; margin: 9px 0; align-items: flex-start; }
.ab-row .key {
  font-family: var(--font-head); font-size: 11px; background: var(--cream); color: var(--ink);
  min-width: 40px; text-align: center; padding: 4px 7px;
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}
.ab-row .key.ult { background: var(--ult); }
.ab-row .ab-name { color: var(--cream); font-weight: 700; font-size: 13px; }
.ab-row .ab-desc { color: rgba(245,239,223,.65); font-size: 12px; line-height: 1.4; }
.lockin-btn { margin-top: 14px; width: 100%; }

.team-strip { position: absolute; left: 30px; top: 110px; width: 230px; z-index: 2; }
.team-strip .tm { color: rgba(245,239,223,.55); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; margin-bottom: 8px; }
.mate-card { display: flex; align-items: center; gap: 10px; background: var(--panel-lite); padding: 7px 10px; margin-bottom: 7px; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.mate-card img { width: 38px; height: 38px; }
.mate-card .mn { color: var(--cream); font-weight: 700; font-size: 13px; }
.mate-card .mr { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(245,239,223,.55); }
.mate-card.you { border-left: 3px solid var(--gold); }

/* ============ COUNTDOWN ============ */
#countdown-wrap { text-align: center; }
.count-num { font-family: var(--font-head); font-size: clamp(80px, 18vw, 190px); color: var(--cream); text-shadow: 0 8px 0 rgba(0,0,0,.3), 0 0 60px rgba(24,200,255,.5); }
.count-label { font-family: var(--font-head); color: var(--blue); letter-spacing: .4em; font-size: clamp(14px,2.4vw,22px); text-transform: uppercase; }

/* ============ HUD ============ */
#hud { position: fixed; inset: 0; z-index: 40; pointer-events: none; font-family: var(--font); }
#hud > * { position: absolute; }

/* crosshair */
#crosshair { left: 50%; top: 50%; transform: translate(-50%,-50%); width: 80px; height: 80px; }
#crosshair .ch-dot { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; background: #fff; border-radius: 50%; box-shadow: 0 0 3px rgba(0,0,0,.8); }
.ch-line { position: absolute; background: #fff; box-shadow: 0 0 3px rgba(0,0,0,.7); transition: none; }
.ch-t { left: 50%; top: 50%; width: 2px; height: 9px; margin-left: -1px; }
.ch-b { left: 50%; top: 50%; width: 2px; height: 9px; margin-left: -1px; }
.ch-l { left: 50%; top: 50%; width: 9px; height: 2px; margin-top: -1px; }
.ch-r { left: 50%; top: 50%; width: 9px; height: 2px; margin-top: -1px; }
#hitmarker {
  left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(45deg); width: 34px; height: 34px;
  opacity: 0;
}
#hitmarker span { position: absolute; background: #fff; }
#hitmarker .h1 { left: 0; top: 0; width: 10px; height: 3px; }
#hitmarker .h2 { right: 0; top: 0; width: 3px; height: 10px; }
#hitmarker .h3 { right: 0; bottom: 0; width: 10px; height: 3px; }
#hitmarker .h4 { left: 0; bottom: 0; width: 3px; height: 10px; }
#hitmarker.pop { animation: hitpop .18s ease-out; }
#hitmarker.pop.head span { background: var(--red); }
#hitmarker.pop.kill span { background: var(--red); }
@keyframes hitpop { 0% { opacity: 1; transform: translate(-50%,-50%) rotate(45deg) scale(1.35);} 100% { opacity: 0; transform: translate(-50%,-50%) rotate(45deg) scale(.8);} }

/* health */
#hp-box { left: 26px; bottom: 24px; display: flex; align-items: flex-end; gap: 12px; }
#hp-hero { width: 62px; height: 62px; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
#hp-col { display: flex; flex-direction: column; gap: 5px; }
#hp-num { font-family: var(--font-head); font-size: 34px; color: var(--cream); text-shadow: 0 3px 0 rgba(0,0,0,.5); line-height: 1; }
#hp-num .max { font-size: 16px; color: rgba(245,239,223,.55); }
#hp-bar { width: 210px; height: 12px; background: rgba(6,12,22,.7); transform: skewX(-16deg); overflow: hidden; }
#hp-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #43e97b, #b8ff5e); transition: width .12s; }
#hp-fill.mid { background: linear-gradient(90deg, #ffd23f, #ffb03a); }
#hp-fill.low { background: linear-gradient(90deg, #ff5252, #ff8a5e); }
#hp-shield { width: 210px; height: 5px; background: rgba(6,12,22,.5); transform: skewX(-16deg); overflow: hidden; }
#hp-shield i { display: block; height: 100%; background: #8fe3ff; }

/* ammo + weapon */
#ammo-box { right: 30px; bottom: 26px; text-align: right; }
#wpn-name { color: rgba(245,239,223,.6); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
#ammo-num { font-family: var(--font-head); font-size: 42px; color: var(--cream); text-shadow: 0 3px 0 rgba(0,0,0,.5); line-height: 1; }
#ammo-num .mag { font-size: 19px; color: rgba(245,239,223,.5); }
#reload-hint { color: var(--gold); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; height: 16px; }

/* abilities */
#abilities { left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; gap: 12px; align-items: flex-end; }
.ab {
  width: 56px; height: 56px; position: relative; background: rgba(8,15,28,.78);
  clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
}
.ab canvas { width: 100%; height: 100%; }
.ab .key {
  position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-head); font-size: 10px; background: var(--cream); color: var(--ink);
  padding: 1px 8px; clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}
.ab .cd-sweep { position: absolute; inset: 0; background: rgba(4,8,16,.78); transform-origin: bottom; transform: scaleY(0); }
.ab .cd-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); color: var(--cream); font-size: 20px; text-shadow: 0 2px 0 #000; }
.ab .charges { position: absolute; top: 2px; right: 4px; font-family: var(--font-head); font-size: 11px; color: var(--gold); }
.ab.ult { width: 74px; height: 74px; }
.ab.ult .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); color: var(--ult); font-size: 15px; text-shadow: 0 2px 0 #000; }
.ab.ult.ready { animation: ultglow 1.1s ease-in-out infinite; }
.ab.ult.ready .pct { color: #fff; font-size: 13px; }
@keyframes ultglow { 0%,100% { filter: drop-shadow(0 0 4px var(--ult)); } 50% { filter: drop-shadow(0 0 16px var(--ult)); } }
.ab.active-fx { outline: 2px solid var(--heal); }

/* objective bar */
#obj-bar { top: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
#obj-teams { display: flex; align-items: center; gap: 14px; }
.team-pct { font-family: var(--font-head); font-size: 22px; width: 64px; text-align: center; }
.team-pct.b { color: var(--blue); } .team-pct.r { color: var(--orange); }
#point-disc { width: 54px; height: 54px; position: relative; }
#point-disc svg { width: 100%; height: 100%; transform: rotate(-90deg); }
#point-disc .ring-bg { stroke: rgba(255,255,255,.22); }
#point-disc .ring-fg { stroke: var(--cream); transition: stroke .2s; }
#point-disc .pt-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); color: var(--cream); font-size: 18px; text-shadow: 0 2px 0 #000; }
#point-disc.cap-b .pt-label { color: var(--blue); }
#point-disc.cap-r .pt-label { color: var(--orange); }
#point-disc.contested { animation: shake .5s ease-in-out infinite; }
@keyframes shake { 0%,100% { transform: translateX(0);} 25% { transform: translateX(-3px);} 75% { transform: translateX(3px);} }
#obj-status { font-family: var(--font-head); font-size: 13px; letter-spacing: .3em; color: var(--cream); text-transform: uppercase; text-shadow: 0 2px 0 rgba(0,0,0,.5); }
#match-timer { font-family: var(--font-head); font-size: 17px; color: rgba(245,239,223,.85); }
#match-timer.ot { color: var(--red); animation: pulse 1s infinite; }

/* team frames */
#team-frames { left: 20px; top: 18px; display: flex; flex-direction: column; gap: 6px; }
.tf { display: flex; align-items: center; gap: 7px; }
.tf img { width: 30px; height: 30px; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.tf .tf-hp { width: 74px; height: 6px; background: rgba(6,12,22,.65); transform: skewX(-16deg); }
.tf .tf-hp i { display: block; height: 100%; background: var(--heal); }
.tf .tf-ult { width: 7px; height: 30px; background: rgba(6,12,22,.6); }
.tf .tf-ult i { display: block; width: 100%; background: var(--ult); }
.tf.dead { opacity: .4; } .tf.dead img { filter: grayscale(1); }
.tf .tf-dead { font-family: var(--font-head); color: var(--red); font-size: 11px; width: 74px; }

/* killfeed */
#killfeed { right: 18px; top: 16px; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.kf { display: flex; align-items: center; gap: 8px; background: rgba(8,14,26,.8); padding: 5px 12px; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); animation: kfin .2s ease-out; }
.kf img { width: 24px; height: 24px; }
.kf .n { font-weight: 800; font-size: 13px; }
.kf .b { color: var(--blue); } .kf .r { color: var(--orange); }
.kf .arr { color: rgba(245,239,223,.6); font-size: 11px; }
.kf.me { outline: 1px solid var(--gold); }
@keyframes kfin { from { transform: translateX(30px); opacity: 0;} to { transform: none; opacity: 1;} }

/* announcements */
#announce { top: 22%; left: 50%; transform: translateX(-50%); text-align: center; }
.ann { font-family: var(--font-head); color: var(--cream); font-size: clamp(26px, 4.6vw, 46px); letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 4px 0 rgba(0,0,0,.4), 0 0 34px rgba(24,200,255,.5); animation: annin .4s ease-out; }
.ann .sub { display: block; font-size: .42em; color: var(--blue); letter-spacing: .4em; margin-top: 6px; }
.ann.red { text-shadow: 0 4px 0 rgba(0,0,0,.4), 0 0 34px rgba(255,77,77,.55); }
.ann.red .sub { color: var(--red); }
@keyframes annin { from { transform: scale(1.4); opacity: 0;} to { transform: scale(1); opacity: 1;} }
#elim-banner { top: 34%; left: 50%; transform: translateX(-50%); text-align: center; }
.elim-pop { font-family: var(--font-head); color: var(--cream); font-size: 26px; letter-spacing: .14em; text-shadow: 0 3px 0 rgba(0,0,0,.45); animation: annin .3s; }
.elim-pop .who { color: var(--red); }

/* damage indicator */
#dmg-ring { left: 50%; top: 50%; width: 130px; height: 130px; transform: translate(-50%,-50%); }
.dmg-tick { position: absolute; left: 50%; top: 50%; width: 8px; height: 26px; margin: -65px 0 0 -4px; transform-origin: 4px 65px; background: linear-gradient(180deg, rgba(255,60,60,.95), transparent); clip-path: polygon(50% 0, 100% 100%, 0 100%); animation: dmgtick .7s ease-out forwards; }
@keyframes dmgtick { to { opacity: 0; } }

/* low hp / fx overlays */
#lowhp { inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 42%, rgba(200,10,20,.5) 100%); transition: opacity .3s; }
#dmgflash { inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, rgba(255,40,40,.12), rgba(255,30,30,.3)); }
#healflash { inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(60,230,130,.28) 100%); }
#ult-overlay { left: 50%; top: 62%; transform: translateX(-50%); font-family: var(--font-head); color: var(--ult); font-size: 18px; letter-spacing: .34em; text-transform: uppercase; text-shadow: 0 0 22px rgba(255,225,77,.8); opacity: 0; }

/* respawn / death */
#death-wrap { text-align: center; }
.death-title { font-family: var(--font-head); color: var(--red); font-size: clamp(34px,6vw,60px); letter-spacing: .14em; text-shadow: 0 4px 0 rgba(0,0,0,.4); }
.death-sub { color: rgba(245,239,223,.8); font-size: 15px; margin-top: 8px; }
.death-sub b { color: var(--cream); }
.respawn-ring { margin: 26px auto 10px; width: 110px; height: 110px; position: relative; }
.respawn-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.respawn-ring .num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 34px; color: var(--cream); }
.swap-hint { color: rgba(245,239,223,.55); font-size: 13px; letter-spacing: .1em; }
.swap-hint .k { background: var(--cream); color: var(--ink); font-weight: 800; padding: 1px 8px; font-size: 11px; }

/* scoreboard */
#score-wrap { display: flex; gap: 26px; }
.sb-team { background: var(--panel); min-width: 380px; padding: 14px 18px; clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%); }
.sb-team h3 { font-family: var(--font-head); letter-spacing: .18em; font-size: 15px; margin-bottom: 8px; }
.sb-team.b h3 { color: var(--blue); } .sb-team.r h3 { color: var(--orange); }
.sb-row { display: grid; grid-template-columns: 30px 1fr 52px 52px 66px 66px; gap: 6px; align-items: center; padding: 4px 0; color: rgba(245,239,223,.85); font-size: 13px; }
.sb-row.head { color: rgba(245,239,223,.45); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.sb-row img { width: 26px; height: 26px; }
.sb-row .you { color: var(--gold); font-weight: 800; }
.sb-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.sb-row .dead-mark { color: var(--red); font-size: 10px; }

/* end screens */
#end-wrap { text-align: center; }
.end-word { font-family: var(--font-head); font-size: clamp(56px, 12vw, 130px); letter-spacing: .1em; }
.end-word.win { color: var(--blue); text-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 60px rgba(24,200,255,.6); }
.end-word.lose { color: var(--red); text-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 60px rgba(255,77,77,.55); }
.end-word.draw { color: var(--gold); }
.end-sub { color: rgba(245,239,223,.75); font-size: 16px; letter-spacing: .24em; text-transform: uppercase; margin-top: 6px; }
.end-stats { display: flex; gap: 34px; justify-content: center; margin: 30px 0; }
.end-stat { text-align: center; }
.end-stat .v { font-family: var(--font-head); font-size: 34px; color: var(--cream); }
.end-stat .k { font-size: 11px; letter-spacing: .26em; color: rgba(245,239,223,.55); text-transform: uppercase; }

/* pause */
#pause-wrap .menu-panel { min-width: 380px; }

/* ============ TOUCH UI ============ */
#touch-ui { position: fixed; inset: 0; z-index: 45; pointer-events: none; }
#touch-ui > * { position: absolute; }
#stick-zone { left: 0; bottom: 0; width: 44%; height: 62%; pointer-events: auto; }
#stick-base { left: 60px; bottom: 90px; width: 120px; height: 120px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); background: rgba(10,18,32,.4); }
#stick-nub { left: 96px; bottom: 126px; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.55); }
#look-zone { right: 0; bottom: 0; width: 56%; height: 78%; pointer-events: auto; }
.tbtn {
  pointer-events: auto; width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35);
  background: rgba(10,18,32,.5); color: var(--cream); font-family: var(--font-head); font-size: 13px;
  display: flex; align-items: center; justify-content: center; user-select: none;
}
.tbtn:active { background: rgba(24,200,255,.4); }
#tb-fire { right: 40px; bottom: 120px; width: 84px; height: 84px; font-size: 15px; }
#tb-jump { right: 148px; bottom: 76px; }
#tb-ab1 { right: 40px; bottom: 224px; }
#tb-ab2 { right: 128px; bottom: 216px; }
#tb-ult { right: 216px; bottom: 156px; border-color: var(--ult); color: var(--ult); }
#tb-reload { right: 148px; bottom: 8px; width: 54px; height: 54px; }
#tb-pause { right: 14px; top: 12px; width: 46px; height: 46px; border-radius: 8px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .btn { min-width: 240px; padding: 13px 24px; font-size: 16px; }
  .select-side { position: static; width: calc(100% - 40px); max-height: 34vh; margin: 0 auto 8px; }
  #select-wrap { justify-content: flex-start; overflow-y: auto; }
  .team-strip { display: none; }
  .hero-grid { padding-bottom: 8px; }
  .hero-card { width: 74px; }
  #hp-box { left: 12px; bottom: 14px; transform: scale(.85); transform-origin: bottom left; }
  #ammo-box { right: 14px; bottom: 14px; transform: scale(.85); transform-origin: bottom right; }
  #abilities { bottom: 14px; transform: translateX(-50%) scale(.82); transform-origin: bottom center; }
  #score-wrap { flex-direction: column; gap: 12px; max-height: 80vh; overflow-y: auto; }
  .sb-team { min-width: 320px; }
  #team-frames { transform: scale(.85); transform-origin: top left; }
}
@media (max-height: 520px) {
  .vw-title { font-size: 44px; }
  .menu-col { gap: 9px; }
}
