/* index.html styles. Changes to this file go live without anyone reloading the page (hot.js swaps it in place). */
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d1117; color: #e6edf3;
  font-family: system-ui, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif; user-select: none; }
canvas#game { display: block; width: 100vw; height: 100vh; }

/* ---------- menus (main menu, match list, dialogs) ---------- */
kbd { background: #0d1117; border: 1px solid #30363d; border-radius: 4px; padding: 0 6px; font: inherit; font-size: 12px; color: #e6edf3; }
input, select, button { font: inherit; font-size: 15px; border-radius: 8px; box-sizing: border-box; }
input, select { padding: 9px 12px; background: #0d1117; color: inherit; border: 1px solid #30363d; }
input:focus, select:focus { outline: 2px solid #388bfd; border-color: transparent; }
button { padding: 9px 16px; border: 1px solid #30363d; background: #21262d; color: #e6edf3; font-weight: 600; cursor: pointer; }
button:hover { background: #30363d; }
button.primary { background: #238636; border-color: #2ea043; color: #fff; }
button.primary:hover { background: #2ea043; }
button.danger { background: #3d1418; border-color: #6e2128; color: #ffb3b8; }
button.danger:hover { background: #57191f; }
.screen { position: fixed; inset: 0; z-index: 10; display: none; }
.screen.on { display: block; }
/* main menu: the 3D arena slowly flies by behind it */
#menu { background: linear-gradient(90deg, rgba(6,9,14,.88) 0%, rgba(6,9,14,.55) 45%, rgba(6,9,14,.15) 100%); }
#menu .title { position: absolute; left: 64px; top: 22%; }
#menu .title h1 { margin: 0; font-size: 56px; font-weight: 900; letter-spacing: .04em; line-height: 1; text-shadow: 0 4px 24px rgba(0,0,0,.6); }
#menu .title h1 span { color: #ff5252; }
#menu .title p { margin: 10px 0 0; color: #8b949e; letter-spacing: .3em; font-size: 13px; }
#menu .namebox { position: absolute; left: 64px; top: calc(22% + 150px); width: 300px; }
#menu .namebox label { display: block; font-size: 12px; color: #8b949e; letter-spacing: .15em; margin-bottom: 6px; }
#menu .namebox input { width: 100%; font-size: 17px; }
/* "NXID でログイン" button: NXID's button rules (black #141414, white text, #707070 border on dark, 40px) */
.nxid-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 40px; margin-top: 12px;
  padding: 0 16px; background: #141414; color: #fff; border: 1px solid #707070; border-radius: 8px; font-size: 15px; font-weight: 600; }
.nxid-btn:hover { background: #262626; }
.nxid-btn img { width: 20px; height: 20px; }
.nxid-btn:disabled { opacity: .55; cursor: default; }
.login-note { margin: 8px 0 0; font-size: 12px; color: #8b949e; line-height: 1.6; }
#menu .account { position: absolute; left: 64px; top: calc(22% + 150px); width: 360px; background: rgba(13,17,23,.75);
  border: 1px solid #30363d; border-radius: 12px; padding: 16px; }
.acc-head { display: flex; align-items: center; gap: 12px; }
/* player icons: an uploaded picture, or the initial on a coloured circle */
.avatar { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--avbg, #30363d); color: #fff; font-weight: 800; font-size: 20px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-btn { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; }
.avatar-btn .edit { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; font-size: 11px;
  background: rgba(0,0,0,.55); opacity: 0; transition: opacity .15s; }
.avatar-btn:hover .edit { opacity: 1; }
.av-editor { display: flex; gap: 18px; align-items: flex-start; }
#avCanvas { width: 180px; height: 180px; border-radius: 50%; background: #0d1117; border: 1px solid #30363d; cursor: grab; touch-action: none; }
#avCanvas:active { cursor: grabbing; }
.av-side { flex: 1; }
.filebtn { display: inline-block; padding: 9px 16px; border: 1px solid #30363d; border-radius: 8px; background: #21262d; cursor: pointer; font-weight: 600; }
.filebtn input { display: none; }
.av-side .range { margin-top: 14px; font-size: 13px; color: #8b949e; }
.av-hint { font-size: 12px; color: #8b949e; line-height: 1.6; margin: 10px 0 0; }
#tablist .tav { width: 20px; height: 20px; font-size: 11px; margin-right: 8px; vertical-align: -5px; }
.death .kc-av { width: 34px; height: 34px; font-size: 15px; vertical-align: -7px; margin-right: 8px; }
.acc-id { flex: 1; min-width: 0; }
.acc-name { font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-sub { font-size: 12px; color: #8b949e; }
.acc-head button { font-size: 12px; padding: 6px 10px; }
.acc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.acc-stats div { background: #0d1117; border-radius: 8px; padding: 8px 6px; text-align: center; }
.acc-stats b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.acc-stats span { font-size: 11px; color: #8b949e; }
.acct { color: #56d364; font-weight: 800; }
#conn { position: absolute; left: 64px; bottom: 36px; font-size: 13px; color: #8b949e; }
#conn.ok::before { content: "●"; color: #3fb950; margin-right: 6px; }
#conn.bad::before { content: "●"; color: #f85149; margin-right: 6px; }
#btnStart { position: absolute; right: 48px; bottom: 40px; font-size: 26px; font-weight: 900; letter-spacing: .12em;
  padding: 16px 56px; border-radius: 10px; background: #238636; border: 1px solid #3fb950; color: #fff;
  box-shadow: 0 8px 30px rgba(35,134,54,.35); }
#btnStart:hover { background: #2ea043; transform: translateY(-1px); }
.btnSettings { position: absolute; right: 32px; top: 26px; font-size: 15px; background: rgba(13,17,23,.7); }
/* match list */
#browser { background: rgba(6,9,14,.9); overflow: auto; }
#browser .wrap { width: min(1100px, 94vw); margin: 0 auto; padding: 28px 0 40px; }
#browser header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
#browser header h2 { margin: 0 8px; font-size: 22px; letter-spacing: .06em; }
#browser header .spacer { flex: 1; }
#code { width: 130px; text-transform: uppercase; letter-spacing: .2em; }
.mtable { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 14px; }
.mtable th { text-align: left; color: #8b949e; font-size: 12px; font-weight: 600; padding: 0 14px 2px; letter-spacing: .08em; }
.mtable td { padding: 12px 14px; background: #161b22; border-top: 1px solid #30363d; border-bottom: 1px solid #30363d; }
.mtable td:first-child { border-left: 1px solid #30363d; border-radius: 8px 0 0 8px; }
.mtable td:last-child { border-right: 1px solid #30363d; border-radius: 0 8px 8px 0; text-align: right; }
.mtable tr.row { cursor: pointer; }
.mtable tr.row:hover td { background: #1c2330; border-color: #388bfd; }
.mtable tr.full { opacity: .5; cursor: not-allowed; }
.mtable .mname { font-weight: 700; font-size: 15px; }
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; margin-left: 8px; vertical-align: 1px; font-weight: 600; }
.badge.public { background: #12361f; color: #56d364; }
.badge.private { background: #3b2300; color: #e3b341; }
.mtable .sub { color: #8b949e; font-size: 12px; margin-top: 2px; }
.mtable .players b { font-size: 16px; }
.mtable .bar { height: 4px; background: #30363d; border-radius: 2px; margin-top: 6px; overflow: hidden; width: 140px; }
.mtable .bar i { display: block; height: 100%; background: #388bfd; }
#browserMsg { color: #8b949e; text-align: center; padding: 30px; }
/* dialogs */
.modal { position: fixed; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.55); }
.modal.on { display: flex; }
.dialog { background: #161b22; border: 1px solid #30363d; border-radius: 14px; padding: 24px 28px; width: min(520px, 92vw); max-height: 90vh; overflow: auto; }
.dialog h3 { margin: 0 0 16px; font-size: 20px; }
.field { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 14px; }
.field > span { color: #8b949e; }
.field input, .field select { width: 100%; }
.seg { display: flex; gap: 6px; }
.seg label { flex: 1; text-align: center; padding: 8px; border: 1px solid #30363d; border-radius: 8px; cursor: pointer; background: #0d1117; }
.seg input { display: none; }
.seg label:has(input:checked) { border-color: #388bfd; background: #0d2142; }
.hint { color: #8b949e; font-size: 12px; margin: -4px 0 12px 140px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.range { display: flex; align-items: center; gap: 10px; }
.range input { flex: 1; padding: 0; }
.range output { width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; color: #c9d1d9; }
.check input { width: 16px; height: 16px; accent-color: #2f81f7; }
.set-hint { margin: -4px 0 10px 140px; font-size: 12px; line-height: 1.6; color: #8b949e; }
.set-hint.warn { color: #d29922; }
.keys { color: #c9d1d9; font-size: 13px; line-height: 1.9; border-top: 1px solid #30363d; margin-top: 14px; padding-top: 12px; }
/* pause menu (in a match, mouse released) */
#pause .dialog { width: min(380px, 92vw); text-align: center; }
#pause .room { color: #8b949e; font-size: 13px; margin: -8px 0 16px; }
#pause .code { font: 800 28px ui-monospace, Consolas, monospace; letter-spacing: .3em; color: #e3b341; margin: 4px 0 2px; }
#pause button { width: 100%; margin-top: 8px; padding: 12px; }
#toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 30; background: #3d1418; border: 1px solid #6e2128;
  color: #ffb3b8; padding: 10px 18px; border-radius: 8px; font-size: 14px; display: none; }
#toast.on { display: block; }
#announce { position: fixed; left: 50%; top: 18px; transform: translate(-50%, -12px); z-index: 31; max-width: min(720px, 92vw); pointer-events: none;
  background: rgba(13, 33, 66, .94); border: 1px solid #388bfd; color: #e6edf3; padding: 10px 18px; border-radius: 10px; font-size: 15px;
  box-shadow: 0 6px 24px rgba(0,0,0,.5); display: flex; gap: 10px; align-items: baseline; opacity: 0; transition: opacity .25s, transform .25s; }
#announce.on { opacity: 1; transform: translate(-50%, 0); }
#announce b { color: #79c0ff; font-size: 12px; letter-spacing: .08em; white-space: nowrap; }
#announce span { white-space: pre-wrap; overflow-wrap: anywhere; }
#notice { position: absolute; right: 48px; top: 22%; width: min(380px, 40vw); background: rgba(13, 25, 45, .82); border: 1px solid #1f4f8f; border-radius: 10px;
  padding: 12px 16px; backdrop-filter: blur(4px); flex-direction: column; gap: 4px !important; color: #c9d1d9; font-size: 14px; line-height: 1.6; display: flex; gap: 10px; align-items: baseline; text-align: left; }
#notice[hidden] { display: none; }
#notice b { color: #79c0ff; font-size: 12px; white-space: nowrap; }
#notice span { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; display: none; }
#hud.on { display: block; }
.shadow { text-shadow: 0 1px 3px rgba(0,0,0,.9); }
/* dynamic crosshair: --gap (px) follows the weapon's current spread */
#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; --gap: 6px; }
#crosshair i { position: absolute; background: rgba(255,255,255,.92); box-shadow: 0 0 2px #000; }
#crosshair .u, #crosshair .d { width: 2px; height: 9px; left: -1px; }
#crosshair .l, #crosshair .r { height: 2px; width: 9px; top: -1px; }
#crosshair .u { bottom: var(--gap); } #crosshair .d { top: var(--gap); }
#crosshair .l { right: var(--gap); } #crosshair .r { left: var(--gap); }
#crosshair .c { width: 2px; height: 2px; left: -1px; top: -1px; display: none; }
#crosshair.melee .u, #crosshair.melee .d, #crosshair.melee .l, #crosshair.melee .r { display: none; }
#crosshair.melee .c { display: block; width: 4px; height: 4px; left: -2px; top: -2px; border-radius: 50%; }
#crosshair.hidden { display: none; }
/* sniper scope */
#scope { position: absolute; inset: 0; display: none;
  background: radial-gradient(circle at center, transparent 0 min(38vh, 38vw), rgba(0,0,0,.35) calc(min(38vh, 38vw) + 1px), #000 calc(min(38vh, 38vw) + 3px)); }
#scope.on { display: block; }
#scope::before, #scope::after { content: ""; position: absolute; background: rgba(0,0,0,.85); }
#scope::before { left: 50%; top: 0; bottom: 0; width: 1px; }
#scope::after { top: 50%; left: 0; right: 0; height: 1px; }
#scope .dot { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #ff3b3b; }
#hitmarker { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0; transition: opacity .15s; }
#hitmarker::before, #hitmarker::after { content: ""; position: absolute; background: #fff; }
#hitmarker::before { left: 14px; top: 0; width: 2px; height: 30px; }
#hitmarker::after { top: 14px; left: 0; height: 2px; width: 30px; }
#hitmarker.show { opacity: 1; transition: none; }
#hitmarker.head::before, #hitmarker.head::after { background: #ff4040; }
#damage { position: absolute; inset: 0; box-shadow: inset 0 0 160px 40px rgba(255, 0, 0, .65); opacity: 0; transition: opacity .4s; }
#damage.show { opacity: 1; transition: none; }

#metrics { position: absolute; left: 12px; top: 12px; font: 12px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace;
  background: rgba(13,17,23,.6); border-radius: 8px; padding: 8px 12px; white-space: pre; min-width: 250px; }
#metrics .k { color: #8b949e; }
#metrics .good { color: #3fb950; } #metrics .ok { color: #d29922; } #metrics .bad { color: #f85149; }
#metrics .dbg { color: #ff7b72; font-weight: 700; }
#metrics .sep { color: #30363d; }
#scoreboard { position: absolute; right: 16px; top: 14px; font-size: 14px; min-width: 180px;
  background: rgba(13,17,23,.55); border-radius: 8px; padding: 8px 12px; }
#scoreboard .row { display: flex; justify-content: space-between; gap: 16px; }
#scoreboard .me { color: #ffd740; }
#scoreboard .title { color: #8b949e; font-size: 12px; margin-bottom: 4px; }
/* match bar (top centre): map, time left, kill limit */
#matchbar { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: flex; align-items: stretch;
  font-size: 13px; background: rgba(13,17,23,.7); border-radius: 6px; overflow: hidden; }
#matchbar > span { padding: 5px 12px; }
#matchbar .map { color: #c9d1d9; letter-spacing: .15em; font-weight: 700; border-right: 1px solid #30363d; }
#matchbar .time { font: 700 16px/1.1 ui-monospace, Consolas, monospace; color: #fff; padding-top: 4px; }
#matchbar .time.low { color: #ff6b6b; }
#matchbar .limit { color: #8b949e; border-left: 1px solid #30363d; }
/* end-of-match results */
#results { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, 92vw); display: none;
  background: rgba(13,17,23,.92); border: 1px solid #30363d; border-radius: 14px; padding: 22px 26px; text-align: center; z-index: 6; }
#results.on { display: block; }
#results .title { font-size: 13px; letter-spacing: .4em; color: #8b949e; }
#results .winner { margin: 6px 0 2px; font-size: 30px; font-weight: 900; }
#results .winner small { display: block; font-size: 13px; font-weight: 600; color: #ffd740; letter-spacing: .2em; }
#results table { width: 100%; border-collapse: collapse; margin: 14px 0 12px; font-size: 14px; font-variant-numeric: tabular-nums; }
#results td, #results th { padding: 5px 8px; text-align: right; border-bottom: 1px solid rgba(48,54,61,.6); }
#results th { color: #8b949e; font-size: 12px; font-weight: 600; }
#results .name { text-align: left; }
#results tr.me td { color: #ffd740; }
#results .next { color: #c9d1d9; font-size: 15px; }
#results .next b { color: #fff; font-size: 18px; }
#killfeed { position: absolute; left: 50%; top: 48px; transform: translateX(-50%); font-size: 14px; text-align: center; line-height: 1.7; }
#killfeed .hs { color: #ff6b6b; }
/* ---------- player card (bottom left): name tag + health ---------- */
#card { position: absolute; left: 22px; bottom: 22px; width: 330px; --pc: #40c4ff; }
#card .tag { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 14px 0 0;
  background: linear-gradient(90deg, rgba(13,17,23,.85), rgba(13,17,23,.55)); transform: skewX(-12deg);
  border-left: 5px solid var(--pc); width: fit-content; max-width: 100%; }
#card .tag > * { transform: skewX(12deg); }
#card .tag .icon { width: 22px; height: 22px; margin-left: 10px; border-radius: 4px; background: var(--pc);
  display: grid; place-items: center; font-size: 12px; font-weight: 900; color: #0d1117; overflow: hidden; }
#card .tag .icon.pic { background: #0d1117; box-shadow: 0 0 0 1.5px var(--pc); }
#card .tag .icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
#card .tag .name { font-size: 15px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
#card .tag .kd { font-size: 12px; color: #8b949e; font-variant-numeric: tabular-nums; white-space: nowrap; }
#card .tag .kd b { color: #e6edf3; }
#card .hp { display: flex; align-items: flex-end; gap: 10px; margin-top: 6px; }
#card .hpnum { font-size: 40px; font-weight: 900; line-height: .9; min-width: 72px; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 6px rgba(0,0,0,.8); }
#card .hpnum .cross { font-size: 18px; color: var(--hpc, #e6edf3); margin-right: 4px; vertical-align: 6px; }
#card .barwrap { flex: 1; padding-bottom: 3px; }
#card .barlabel { display: flex; justify-content: space-between; font-size: 11px; color: #8b949e; letter-spacing: .15em; margin-bottom: 3px; }
#hpbar { position: relative; height: 14px; background: rgba(13,17,23,.7); transform: skewX(-12deg); overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
#hptrail, #hpfill { position: absolute; left: 0; top: 0; bottom: 0; }
#hptrail { background: rgba(255,255,255,.75); width: 100%; transition: width .5s ease-out .35s; } /* recent damage lingers, then drains */
#hpfill { width: 100%; background: var(--hpc, #e6edf3); }
/* 10 segments */
#hpbar::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(13,17,23,.9) calc(10% - 2px) 10%); }
#card.low #hpbar { animation: lowhp .8s ease-in-out infinite; }
@keyframes lowhp { 50% { box-shadow: inset 0 0 0 1px rgba(255,80,80,.9), 0 0 12px rgba(255,60,60,.6); } }
#weapon { position: absolute; right: 22px; bottom: 22px; text-align: right; }
#wname { font-size: 13px; letter-spacing: .25em; color: #c9d1d9; font-weight: 700; margin-bottom: 4px; }
#wname small { letter-spacing: 0; color: #8b949e; font-weight: 400; margin-left: 6px; }
#slots { display: flex; gap: 4px; justify-content: flex-end; margin-top: 8px; }
#slots .s { min-width: 54px; padding: 3px 6px; font-size: 10px; text-align: left; line-height: 1.3;
  background: rgba(13,17,23,.55); border-bottom: 2px solid transparent; transform: skewX(-12deg); color: #8b949e; }
#slots .s > * { display: block; transform: skewX(12deg); }
#slots .s b { color: #c9d1d9; font-size: 10px; }
#slots .s.on { background: rgba(13,17,23,.85); border-bottom-color: #ffd740; color: #e6edf3; }
#slots .s.on b { color: #ffd740; }
#slots .s.empty { color: #f85149; }
#ammo { font-size: 34px; font-weight: 800; line-height: 1; }
#ammo small { font-size: 18px; color: #8b949e; font-weight: 600; }
#ammo.low { color: #f85149; }
#reload { margin-top: 6px; font-size: 13px; color: #d29922; height: 18px; }
#reloadbar { width: 120px; height: 4px; background: rgba(255,255,255,.15); border-radius: 2px; margin: 3px 0 0 auto; overflow: hidden; visibility: hidden; }
#reloadfill { height: 100%; width: 0; background: #d29922; }
#kills { font-size: 15px; color: #c9d1d9; margin-top: 4px; }
#regen { color: #3fb950; font-size: 13px; }
/* who's under the crosshair */
#target { position: absolute; left: 50%; top: calc(50% + 26px); transform: translateX(-50%); font-size: 13px; font-weight: 600;
  white-space: nowrap; color: #e6edf3; }
/* spawn protection */
#shield { position: absolute; left: 50%; top: calc(50% + 70px); transform: translateX(-50%); padding: 5px 14px; border-radius: 999px;
  background: rgba(88,166,255,0.16); border: 1px solid rgba(88,166,255,0.6); color: #cfe3ff; font-size: 13px; font-weight: 700;
  white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.7); }
#shield b { color: #fff; font-variant-numeric: tabular-nums; }
/* kill confirmation */
#killconfirm { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); text-align: center; opacity: 0; pointer-events: none; }
#killconfirm.show { animation: kc 1.9s ease-out forwards; }
@keyframes kc {
  0% { opacity: 0; transform: translateX(-50%) scale(1.6); }
  8% { opacity: 1; transform: translateX(-50%) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-12px); }
}
#killconfirm .kc-icon { font-size: 46px; font-weight: 900; color: #ff3b3b; line-height: 1; text-shadow: 0 0 18px rgba(255,59,59,.7); }
#killconfirm .kc-main { font-size: 26px; font-weight: 900; letter-spacing: .06em; margin-top: 2px; }
#killconfirm .kc-sub { font-size: 14px; color: #c9d1d9; margin-top: 4px; }
#killconfirm .hs { color: #ff6b6b; }
/* headshot kill: its own icon and a big red banner */
#killconfirm .kc-hsicon { width: 58px; height: 58px; color: #ff3b3b; filter: drop-shadow(0 0 10px rgba(255,59,59,.8)); }
#killconfirm .kc-hs { font-size: 34px; font-weight: 900; letter-spacing: .14em; color: #ff4d4d; line-height: 1.05;
  text-shadow: 0 0 16px rgba(255,60,60,.75), 0 2px 4px rgba(0,0,0,.9); }
#killconfirm.headshot .kc-main { font-size: 22px; }
#killfeed .hstag { display: inline-block; font-size: 10px; font-weight: 800; color: #fff; background: #d73a3a; border-radius: 3px;
  padding: 0 4px; line-height: 15px; vertical-align: 1px; letter-spacing: .05em; }
#killconfirm .multi { color: #ffd740; letter-spacing: .12em; }
#tablist { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); min-width: min(620px, 92vw); max-height: 86vh; overflow-y: auto;
  background: rgba(13,17,23,.88); border: 1px solid #30363d; border-radius: 12px; padding: 16px 20px; display: none; z-index: 5; }
#tablist.on { display: block; }
#tablist .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-weight: 700; font-size: 16px; }
#tablist .k { color: #8b949e; font-weight: 400; font-size: 13px; }
#tablist table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
#tablist th { color: #8b949e; font-weight: 600; font-size: 12px; text-align: right; padding: 4px 8px; border-bottom: 1px solid #30363d; }
#tablist td { text-align: right; padding: 5px 8px; border-bottom: 1px solid rgba(48,54,61,.5); }
#tablist .name { text-align: left; }
#tablist .rank { color: #8b949e; width: 24px; }
#tablist tr.me td { color: #ffd740; background: rgba(255,215,64,.07); }
#tablist tr.dead td { opacity: .55; }
#tablist .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
#tablist .weapon { text-align: center; width: 96px; }
/* weapon silhouette: the pre-rendered PNG is a mask, filled with the text colour */
.wsil { display: inline-block; width: 84px; height: 26px; vertical-align: middle; background: currentColor; opacity: .9;
  -webkit-mask: var(--wsil) center / contain no-repeat; mask: var(--wsil) center / contain no-repeat; }
#tablist .botmark { color: #8b949e; font-size: 11px; border: 1px solid #30363d; border-radius: 4px; padding: 0 5px; }
#tablist .good { color: #3fb950; } #tablist .ok { color: #d29922; } #tablist .bad { color: #f85149; }
#center { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); text-align: center; font-size: 20px; }
#center.dead { top: 26%; width: min(560px, 92vw); }
#hud.is-dead #crosshair, #hud.is-dead #hitmarker { display: none; }
#deathfx { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(80,0,0,.12), rgba(40,0,0,.6)); display: none; }
#hud.is-dead #deathfx { display: block; }
.death .label { font-size: 15px; letter-spacing: .3em; color: #ff8a80; }
.death .killer { margin-top: 6px; font-size: 34px; font-weight: 800; }
.death .killer .by { font-size: 22px; font-weight: 600; color: #e6edf3; }
.death .detail { margin-top: 6px; font-size: 14px; color: #c9d1d9; }
.death .detail .hs { color: #ff6b6b; font-weight: 700; }
.death .respawn { margin-top: 34px; font-size: 16px; color: #c9d1d9; letter-spacing: .1em; }
.death .count { font-size: 76px; font-weight: 900; line-height: 1.1; color: #fff; animation: pop .45s ease-out; }
@keyframes pop { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- live updates / reconnecting ---------- */
#toast.info { background: #0d2142; border-color: #1f4f8f; color: #cfe3ff; }
#reconnect { position: fixed; inset: 0; z-index: 25; display: none; align-items: center; justify-content: center; gap: 14px;
  background: rgba(6, 9, 14, .72); color: #e6edf3; font-size: 16px; }
#reconnect.on { display: flex; }
#reconnect i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #30363d; border-top-color: #58a6ff; animation: zfspin .8s linear infinite; }
@keyframes zfspin { to { transform: rotate(360deg); } }
#updateNote { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); font-size: 12px; color: #cfe3ff;
  background: rgba(13, 33, 66, .8); border: 1px solid #1f4f8f; border-radius: 6px; padding: 3px 10px; display: none; }
#updateNote.on { display: block; }
/* ---------- ad slots (small, at the side; match list and respawn wait only) ---------- */
.adslot { display: none; box-sizing: border-box; width: 220px; background: rgba(13, 17, 23, .88); border: 1px solid #30363d; border-radius: 10px;
  padding: 12px 14px; font-size: 13px; line-height: 1.6; color: #c9d1d9; text-shadow: none; }
.adslot.on { display: block; }
.adslot a, .adslot > div { color: inherit; text-decoration: none; display: block; }
.adslot a:hover b { text-decoration: underline; }
.adslot .adlabel { display: block; font-size: 10px; letter-spacing: .12em; color: #8b949e; margin-bottom: 4px; }
.adslot b { display: block; color: #e6edf3; font-size: 14px; margin-bottom: 2px; }
.adslot p { margin: 0; }
#adBrowser { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 2; }
#browser.has-ad .wrap { width: min(1100px, calc(100vw - 250px - 6vw)); margin-left: calc((100vw - 250px - min(1100px, calc(100vw - 250px - 6vw))) / 2); }
#adDeath { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: auto; }
#hud:not(.is-dead) #adDeath { display: none; }