/* ================================================================
   DXED Arena 1v1 — game screens + HUD
   ================================================================ */

.arena-body { overflow: hidden; }
#gameCanvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; background: #0b0e1a; }

/* ── Full-screen overlay screens ── */
.scr {
  position: fixed; inset: 0; z-index: 100; overflow-y: auto;
  background: radial-gradient(1200px 700px at 50% -10%, rgba(35, 42, 66, .55), rgba(5, 5, 6, .96));
  display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px 8vh;
  backdrop-filter: blur(4px);
}
.scr-card { width: 100%; max-width: 640px; }
.scr-card.wide { max-width: 860px; }
.scr-head h1 { font-size: 30px; font-weight: 800; letter-spacing: .5px; margin: 14px 0 6px; }
.scr-head .accent, a.accent { color: var(--accent); }
.scr-head .sub { color: var(--text-secondary); font-size: 14px; line-height: 1.5; margin-bottom: 22px; }
.sect { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin: 22px 0 12px; }

/* ── Menu ── */
.menu-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.menu-mode { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.menu-mode h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.menu-mode p { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; flex: 1; }
.menu-note { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-top: 8px; }
.menu-opts { margin-top: 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-secondary); }
.fld input[type="number"], .fld input[type="text"], .fld select {
  background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text-primary);
  border-radius: 9px; padding: 9px 12px; font-size: 14px; font-family: inherit; outline: none;
}
.fld.inline { flex-direction: row; align-items: center; gap: 10px; }
.menu-queue { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-secondary); }
.spin { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Lobby / loadouts ── */
.loadout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.loadout-card {
  background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 14px; cursor: pointer; transition: all .15s;
}
.loadout-card:hover { border-color: rgba(154,164,192,.5); }
.loadout-card.sel { border-color: #e8e9ee; background: #1d2029; }
.loadout-card h4 { font-size: 15px; margin-bottom: 4px; }
.loadout-card .lo-preview {
  display: block; width: 100%; height: 84px; object-fit: contain;
  background: radial-gradient(ellipse at 50% 60%, rgba(154, 164, 192, 0.1), transparent 70%);
  border-radius: 8px; margin: 2px 0 6px;
}
.loadout-card .lo-blurb { font-size: 11.5px; color: var(--text-secondary); line-height: 1.45; min-height: 48px; }
.loadout-card .lo-stat { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.loadout-card .lo-stat b { color: var(--text-primary); font-weight: 600; }

.fund-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
.fund-addr { display: flex; gap: 10px; align-items: center; margin: 12px 0; font-size: 12px; }
.fund-addr code { background: rgba(255,255,255,.05); padding: 6px 10px; border-radius: 8px; word-break: break-all; color: var(--accent); flex: 1; }
.fund-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fund-manual summary { cursor: pointer; font-size: 12px; color: var(--text-muted); }
.fund-manual input { width: 320px; max-width: 100%; margin: 8px 8px 0 0; }
.fund-status { margin-top: 10px; font-size: 12.5px; min-height: 18px; }
.fund-status.ok { color: var(--green); }
.fund-status.err { color: var(--red); }

.lobby-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; gap: 14px; flex-wrap: wrap; }
.lobby-players { display: flex; gap: 10px; flex-wrap: wrap; }
.lobby-pill { background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; color: var(--text-secondary); }
.lobby-pill b { color: var(--text-primary); }
.lobby-pill .ok { color: var(--green); }
.lobby-pill .wait { color: var(--gold); }
.lobby-actions { display: flex; gap: 10px; }

/* ── Results ── */
.res-score { font-size: 54px; font-weight: 800; text-align: center; margin: 10px 0 4px; letter-spacing: 2px; }
.res-wager { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; font-size: 13px; color: var(--text-secondary); margin: 14px 0; line-height: 1.6; }
.res-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
#scrResults .scr-card { text-align: center; }
#resTitle.win { color: var(--green); }
#resTitle.loss { color: var(--red); }

/* ═══════════ Main menu — cinematic tactical lobby ═══════════
   Same design language as the match intro: charcoal glass, steel-blue
   undertones, amber tactical accents, thin borders, clipped corners.
   All UI is pinned to the LEFT COLUMN + slim top/bottom bars; the
   centre/right of the frame stays open for the operator walking in the
   live backdrop. */
.scr.menu2 {
  --amb: #ffb35c;
  --amb2: #ff9038;
  --steel: #aeb9d0;
  --mut: #7d8698;
  --m2-glass: rgba(8, 10, 17, 0.5);
  --m2-glass2: rgba(9, 12, 19, 0.6);
  --m2-line: rgba(174, 185, 208, 0.14);
  --m2-aline: rgba(255, 179, 92, 0.42);
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  background: linear-gradient(90deg, rgba(3, 4, 8, 0.93) 0%, rgba(3, 4, 8, 0.78) 24%, rgba(3, 4, 8, 0.3) 44%, rgba(3, 4, 8, 0.02) 60%, rgba(4, 5, 10, 0.25) 100%);
  backdrop-filter: none;
}

/* Atmosphere: faint scanlines, corner brackets, edge vignette */
.m2-fx { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.m2-fx::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 62% at 56% 52%, transparent 46%, rgba(3, 4, 8, 0.42) 100%),
    repeating-linear-gradient(180deg, rgba(220, 228, 245, 0.016) 0 1px, transparent 1px 4px);
}
.m2-fx::after {
  content: ''; position: absolute; inset: 18px;
  background:
    linear-gradient(rgba(255, 179, 92, 0.3), rgba(255, 179, 92, 0.3)) 0 0 / 18px 1px no-repeat,
    linear-gradient(rgba(255, 179, 92, 0.3), rgba(255, 179, 92, 0.3)) 0 0 / 1px 18px no-repeat,
    linear-gradient(rgba(255, 179, 92, 0.3), rgba(255, 179, 92, 0.3)) 100% 100% / 18px 1px no-repeat,
    linear-gradient(rgba(255, 179, 92, 0.3), rgba(255, 179, 92, 0.3)) 100% 100% / 1px 18px no-repeat;
}
.m2-top, .m2-body, .m2-foot, .m2-gate { position: relative; z-index: 1; }

/* ── Top bar: slim tactical header ── */
.m2-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 9px 26px; background: rgba(4, 5, 9, 0.55);
  border-bottom: 1px solid var(--m2-line); backdrop-filter: blur(9px);
}
.m2-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.m2-logo { font-size: 16px; font-weight: 900; letter-spacing: 3.5px; white-space: nowrap; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7); }
.m2-logo span { font-weight: 300; letter-spacing: 5.5px; color: var(--steel); }
.m2-logo::before { content: ''; display: inline-block; width: 3px; height: 12px; background: var(--amb2); margin-right: 11px; vertical-align: -1px; box-shadow: 0 0 8px rgba(255, 144, 56, 0.6); }
.m2-pill {
  font-style: normal; font-size: 8.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: var(--amb); background: rgba(255, 179, 92, 0.08); border: 1px solid var(--m2-aline);
  padding: 3px 9px; white-space: nowrap;
}
.m2-profile { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.m2-net { display: flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--mut); }
.m2-net i { width: 6px; height: 6px; border-radius: 50%; background: #5fd8a2; box-shadow: 0 0 8px rgba(95, 216, 162, 0.9); animation: m2pulse 2.2s ease-in-out infinite; }
@keyframes m2pulse { 50% { opacity: 0.45; } }
.m2-prof-t { display: flex; align-items: baseline; gap: 9px; line-height: 1.2; }
.m2-prof-t b { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; }
.m2-prof-t span { font-size: 9.5px; color: var(--amb); letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; }
.m2-lvl {
  min-width: 22px; height: 20px; padding: 0 6px; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 800; color: var(--steel);
  background: rgba(174, 185, 208, 0.07); border: 1px solid var(--m2-line);
}
.m2-gear {
  width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--text-secondary);
  transition: all 0.25s;
}
.m2-gear svg { width: 15px; height: 15px; }
.m2-gear:hover { color: var(--amb); border-color: var(--m2-aline); transform: rotate(45deg); }

/* ── Body: slim rail + left content column; the rest stays open ── */
.m2-body { flex: 1; display: flex; min-height: 0; padding: 10px 26px 8px; gap: 22px; }

.m2-rail {
  display: flex; flex-direction: column; gap: 2px; width: 204px; flex-shrink: 0;
  padding: 6px 12px 6px 0; border-right: 1px solid var(--m2-line);
  overflow-y: auto; scrollbar-width: thin;
}
.m2-item {
  position: relative; display: flex; align-items: center; gap: 11px; text-align: left;
  font-family: inherit; cursor: pointer; background: transparent; border: none;
  border-left: 2px solid transparent;
  color: var(--text-secondary); padding: 7px 10px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.m2-item .ic {
  width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center;
  color: var(--mut); transition: color 0.2s;
}
.m2-item .ic svg { width: 15px; height: 15px; }
.m2-item .tx { font-size: 11px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; line-height: 1.2; min-width: 0; }
.m2-item .tx small { display: block; font-size: 9.5px; font-weight: 500; letter-spacing: 0.3px; color: var(--mut); text-transform: none; margin-top: 2px; }
.m2-item:hover { color: var(--text-primary); background: rgba(174, 185, 208, 0.05); }
.m2-item:hover .ic { color: var(--steel); }
.m2-item.sel {
  color: #fff; border-left-color: var(--amb2);
  background: linear-gradient(90deg, rgba(255, 144, 56, 0.1), rgba(255, 144, 56, 0.015) 65%, transparent);
}
.m2-item.sel .ic { color: var(--amb); filter: drop-shadow(0 0 6px rgba(255, 144, 56, 0.5)); }
.m2-item.sel .tx small { color: rgba(255, 217, 168, 0.55); }
.m2-div { height: 1px; background: var(--m2-line); margin: auto 10px 8px 0; flex-shrink: 0; }
.m2-item.danger { color: rgba(240, 120, 124, 0.85); }
.m2-item.danger .ic { color: #f0787c; }
.m2-item.danger:hover { background: rgba(207, 90, 94, 0.1); color: #ff9a9e; }

/* Content column — capped width so the operator stays featured */
.m2-panel {
  flex: 0 1 auto; width: min(600px, 46vw); min-width: 0;
  overflow-y: auto; padding: 4px 14px 20px 2px;
  animation: m2in 0.32s ease-out; scrollbar-width: thin;
}
@keyframes m2in { from { opacity: 0; transform: translateX(-14px); } }
.m2-panel h2 {
  display: flex; align-items: center; gap: 11px;
  font-size: 21px; font-weight: 900; letter-spacing: 4px; text-transform: uppercase;
  margin-bottom: 5px; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}
.m2-panel h2 .hIc {
  width: 28px; height: 28px; display: grid; place-items: center; flex-shrink: 0;
  color: var(--amb); background: rgba(255, 179, 92, 0.07); border: 1px solid var(--m2-aline);
}
.m2-panel h2 .hIc svg { width: 14px; height: 14px; }
.m2-panel .m2-sub { color: var(--mut); font-size: 12px; margin-bottom: 18px; letter-spacing: 0.4px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }

/* ── Cards: compact charcoal glass, thin borders, clipped corner ── */
.m2-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.m2-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start;
  background: var(--m2-glass2); border: 1px solid var(--m2-line);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  padding: 14px 16px; backdrop-filter: blur(9px);
  transition: border-color 0.22s, background 0.22s;
}
.m2-card:hover { border-color: rgba(174, 185, 208, 0.32); background: rgba(12, 15, 24, 0.68); }
.m2-card h3 { font-size: 12.5px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; }
.m2-card p { position: relative; font-size: 11.5px; color: var(--text-secondary); line-height: 1.55; margin: 8px 0 12px; }
.m2-lab { position: relative; display: block; font-size: 9px; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase; color: var(--amb); margin: 2px 0 7px; }
.m2-note { position: relative; font-size: 10.5px; color: var(--mut); margin-top: 10px; min-height: 14px; }
.m2-card .soon {
  position: absolute; top: 12px; right: 16px; font-size: 8px; font-weight: 800; letter-spacing: 1.6px;
  color: var(--mut); background: rgba(174, 185, 208, 0.06); border: 1px solid var(--m2-line);
  padding: 2px 7px; text-transform: uppercase;
}
.m2-card.locked { opacity: 0.5; }
.m2-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.m2-swatches { position: relative; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.m2-sw {
  width: 24px; height: 24px; border-radius: 3px; cursor: pointer; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18); background: var(--sw); transition: all 0.15s;
}
.m2-sw:hover { transform: scale(1.14); }
.m2-sw.sel { border-color: #fff; box-shadow: 0 0 10px var(--sw); }
.m2-swatches input[type="color"] {
  width: 24px; height: 24px; padding: 0; border-radius: 3px; cursor: pointer;
  border: 1px dashed rgba(255, 255, 255, 0.35); background: transparent;
}

/* ── Play: deployment panel — selected mode, match-type rows, settings ── */
.p3-lab {
  display: flex; align-items: center; gap: 10px;
  font-size: 9px; font-weight: 800; letter-spacing: 2.6px; text-transform: uppercase; color: var(--amb);
  margin: 18px 0 8px;
}
.p3-lab::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 179, 92, 0.28), transparent); }
.p3-mode {
  padding: 10px 13px; background: var(--m2-glass2); border: 1px solid var(--m2-line);
  border-left: 2px solid var(--amb2); backdrop-filter: blur(9px);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.p3-mode b { font-size: 15px; font-weight: 900; letter-spacing: 3px; }
.p3-mode span { display: block; font-size: 10px; color: var(--mut); letter-spacing: 1.4px; text-transform: uppercase; margin-top: 3px; }
.p3-rows { display: flex; flex-direction: column; gap: 5px; }
.p3-row {
  display: flex; align-items: center; gap: 11px; text-align: left; width: 100%;
  font-family: inherit; cursor: pointer; color: var(--text-secondary);
  background: var(--m2-glass); border: 1px solid var(--m2-line); border-left: 2px solid transparent;
  padding: 8px 11px; backdrop-filter: blur(9px);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.p3-row .ic {
  width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center;
  color: var(--mut); background: rgba(174, 185, 208, 0.05); border: 1px solid var(--m2-line);
  transition: all 0.2s;
}
.p3-row .ic svg { width: 14px; height: 14px; }
.p3-row .tx { min-width: 0; }
.p3-row .tx b { display: block; font-size: 11px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; color: var(--text-primary); }
.p3-row .tx small { display: block; font-size: 10px; color: var(--mut); margin-top: 2px; line-height: 1.35; }
.p3-row .tag {
  margin-left: auto; flex-shrink: 0; font-size: 8px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--mut); border: 1px solid var(--m2-line); padding: 2px 7px;
}
.p3-row:hover { border-color: rgba(174, 185, 208, 0.3); }
.p3-row.sel {
  border-color: var(--m2-aline); border-left-color: var(--amb2);
  background: linear-gradient(90deg, rgba(255, 144, 56, 0.09), rgba(255, 144, 56, 0.012) 60%, transparent);
  box-shadow: inset 0 0 22px rgba(255, 144, 56, 0.05);
}
.p3-row.sel .ic { color: var(--amb); border-color: var(--m2-aline); background: rgba(255, 179, 92, 0.07); }
.p3-row.sel .tag { color: var(--amb); border-color: var(--m2-aline); }
.p3-set {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 6px 1px; border-bottom: 1px solid rgba(174, 185, 208, 0.08);
}
.p3-set > span { flex-shrink: 0; white-space: nowrap; font-size: 9.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--mut); }
.menu2 .p3-set select, .menu2 .p3-set input[type="number"], .menu2 .p3-set input[type="text"] { width: 190px; margin: 0; padding: 7px 11px; font-size: 12px; }
.menu2 .p3-set select { padding-right: 30px; }
.p3-actions { display: flex; gap: 9px; margin-top: 18px; }
.p3-actions .arc-btn { flex: 1; text-align: center; }

/* ── Controls: hard tactical style — dark base, thin border, amber accent ── */
.menu2 select, .menu2 input[type="number"], .menu2 input[type="text"] {
  position: relative; width: 100%;
  background: rgba(6, 8, 14, 0.72); border: 1px solid var(--m2-line); color: var(--text-primary);
  border-radius: 2px; padding: 9px 12px; font-size: 12.5px; font-family: inherit; outline: none;
  margin-bottom: 12px; appearance: none; -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.menu2 select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23969aa6' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; cursor: pointer;
}
.menu2 select:focus, .menu2 input[type="number"]:focus, .menu2 input[type="text"]:focus {
  border-color: var(--m2-aline); box-shadow: 0 0 0 2px rgba(255, 144, 56, 0.1);
}
.menu2 .arc-btn {
  font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase; font-size: 11px;
  background: rgba(8, 10, 17, 0.72); border: 1px solid rgba(174, 185, 208, 0.28); color: #dfe4ee;
  border-radius: 0; padding: 10px 16px;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
  transition: all 0.2s;
}
.menu2 .arc-btn:hover { border-color: rgba(223, 228, 238, 0.5); background: rgba(174, 185, 208, 0.1); }
.menu2 .arc-btn.primary {
  background: linear-gradient(180deg, rgba(255, 179, 92, 0.16), rgba(255, 144, 56, 0.07));
  border: 1px solid var(--m2-aline); color: #ffd9a8;
  text-shadow: 0 0 12px rgba(255, 144, 56, 0.35);
}
.menu2 .arc-btn.primary:hover {
  border-color: rgba(255, 179, 92, 0.8); color: #ffe7c8;
  box-shadow: inset 0 0 20px rgba(255, 144, 56, 0.16);
}
.menu2 .arc-btn.block { display: block; width: 100%; margin-top: auto; position: relative; }
.menu2 .arc-btn.small { padding: 6px 11px; font-size: 9.5px; }
.menu2 .arc-btn.big { padding: 14px 34px; font-size: 13px; letter-spacing: 3px; }
.menu2 .arc-btn { transition: transform .12s ease, background .14s, border-color .14s; }
.menu2 .arc-btn:active { transform: scale(.98); }
.p3-row { transition: border-color .14s, background .14s, transform .14s; }
.p3-row:hover { transform: translateX(2px); }
.menu2 .spin { border-color: var(--m2-line); border-top-color: var(--amb); }

/* ── Footer: thin status strip ── */
.m2-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 7px 26px; font-size: 10px; color: var(--mut);
  background: rgba(4, 5, 9, 0.55); border-top: 1px solid var(--m2-line); backdrop-filter: blur(9px);
}
.m2-keys { display: flex; gap: 15px; flex-wrap: wrap; }
.m2-keys span { display: flex; align-items: center; gap: 7px; letter-spacing: 0.6px; }
.m2-keys kbd {
  font-family: inherit; font-size: 8.5px; font-weight: 800; color: var(--steel);
  background: rgba(174, 185, 208, 0.06); border: 1px solid var(--m2-line);
  padding: 2px 6px; letter-spacing: 0.5px;
}
.m2-status { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: 1.8px; color: var(--steel); white-space: nowrap; text-transform: uppercase; font-size: 9px; }
.m2-status i { width: 6px; height: 6px; border-radius: 50%; background: #5fd8a2; box-shadow: 0 0 8px rgba(95, 216, 162, 0.9); animation: m2pulse 2.2s ease-in-out infinite; }
.m2-status em { font-style: normal; font-weight: 500; letter-spacing: 0.6px; color: var(--mut); margin-left: 4px; text-transform: none; }

.m2-gate {
  position: absolute; left: 50%; bottom: 12vh; transform: translateX(-50%); text-align: center;
  font-size: 13px; color: var(--text-secondary); width: max-content; max-width: 92vw;
  background: var(--m2-glass2); border: 1px solid var(--m2-aline);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  padding: 15px 25px; backdrop-filter: blur(10px);
}
.m2-gate a { color: var(--amb); }

/* ── Section content: leaderboard table, intel feed ── */
.m2-lb table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--m2-glass2); border: 1px solid var(--m2-line); backdrop-filter: blur(9px); }
.m2-lb th { text-align: left; font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--mut); padding: 10px 14px; border-bottom: 1px solid var(--m2-line); }
.m2-lb td { padding: 9px 14px; border-bottom: 1px solid rgba(174, 185, 208, 0.06); }
.m2-news { display: flex; flex-direction: column; gap: 8px; }
.m2-news article {
  background: var(--m2-glass2); border: 1px solid var(--m2-line); border-left: 2px solid rgba(174, 185, 208, 0.28);
  padding: 12px 16px; backdrop-filter: blur(9px);
}
.m2-news h4 { font-size: 12.5px; margin-bottom: 3px; letter-spacing: 0.6px; }
.m2-news time { font-size: 8.5px; color: var(--amb); letter-spacing: 2px; text-transform: uppercase; font-weight: 800; }
.m2-news p { font-size: 11.5px; color: var(--text-secondary); line-height: 1.55; margin-top: 5px; }

@media (max-width: 900px) {
  .m2-body { flex-direction: column; padding: 6px 14px 10px; gap: 10px; }
  .m2-rail { flex-direction: row; width: auto; overflow-x: auto; padding: 4px 0; border-right: 0; border-bottom: 1px solid var(--m2-line); }
  .m2-item { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; }
  .m2-item.sel { border-bottom-color: var(--amb2); }
  .m2-item .tx small { display: none; }
  .m2-div { display: none; }
  .m2-panel { width: 100%; }
  .m2-prof-t, .m2-net { display: none; }
  .m2-keys { display: none; }
}

/* ═══════════ Match intro — pre-match deployment sequence ═══════════
   Layered over the live cinematic backdrop. The centre ~40% of the frame
   is a protected visual lane (the operator walks there); every panel is
   pinned to the edges. Phase classes on #matchIntro drive the reveals:
   .p-deploy → .p-brief → .p-count, then .out on the FIGHT cut. */
#matchIntro {
  --mi-amber: #ffb35c;
  --mi-amber2: #ff9038;
  --mi-steel: #aeb9d0;
  --mi-muted: #7d8698;
  --mi-glass: rgba(8, 10, 17, 0.52);
  --mi-line: rgba(174, 185, 208, 0.16);
  position: fixed; inset: 0; z-index: 400; pointer-events: none; overflow: hidden;
  font-family: 'Inter', sans-serif; color: #eef1f7;
  opacity: 1; transition: opacity 0.55s ease-out;
}
#matchIntro.out { opacity: 0; }

/* Atmosphere: edge vignette (centre stays clear), faint scanlines, and a
   slow light sweep. No opaque fills anywhere near the middle. */
#matchIntro .mi-fx { position: absolute; inset: 0; }
#matchIntro .mi-fx::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 62% 60% at 50% 52%, transparent 42%, rgba(3, 4, 8, 0.5) 100%),
    repeating-linear-gradient(180deg, rgba(220, 228, 245, 0.02) 0 1px, transparent 1px 4px);
}
#matchIntro .mi-fx::after {
  content: ''; position: absolute; inset: -30%;
  background: linear-gradient(115deg, transparent 46%, rgba(255, 179, 92, 0.045) 50%, transparent 54%);
  animation: miSweep 5.5s linear infinite;
}
@keyframes miSweep { from { transform: translateX(-30%); } to { transform: translateX(30%); } }

/* Cinematic letterbox — retracts as the intro fades */
#matchIntro .mi-bar { position: absolute; left: 0; right: 0; height: 8vh; transition: transform 0.55s ease-in; }
#matchIntro .mi-bar.top { top: 0; background: linear-gradient(180deg, rgba(2, 3, 6, 0.94), rgba(2, 3, 6, 0.6) 62%, transparent); }
#matchIntro .mi-bar.bot { bottom: 0; background: linear-gradient(0deg, rgba(2, 3, 6, 0.94), rgba(2, 3, 6, 0.6) 62%, transparent); }
#matchIntro.out .mi-bar.top { transform: translateY(-100%); }
#matchIntro.out .mi-bar.bot { transform: translateY(100%); }

/* Corner brackets — thin amber edge framing */
#matchIntro .mi-corner { position: absolute; width: 22px; height: 22px; border: 1px solid rgba(255, 179, 92, 0.32); }
#matchIntro .mi-corner.tl { top: 24px; left: 24px; border-right: 0; border-bottom: 0; }
#matchIntro .mi-corner.tr { top: 24px; right: 24px; border-left: 0; border-bottom: 0; }
#matchIntro .mi-corner.bl { bottom: 24px; left: 24px; border-right: 0; border-top: 0; }
#matchIntro .mi-corner.br { bottom: 24px; right: 24px; border-left: 0; border-top: 0; }

/* Top-left: brand + mode kicker */
#matchIntro .mi-brand { position: absolute; top: 3.2vh; left: 3.2vw; animation: miIn 0.5s ease-out both; }
#matchIntro .mi-brand b { display: block; font-size: 17px; font-weight: 900; letter-spacing: 4px; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8); }
#matchIntro .mi-brand b span { font-weight: 300; letter-spacing: 6px; color: var(--mi-steel); }
#matchIntro .mi-brand em {
  display: inline-block; margin-top: 8px; padding: 3px 0 4px; font-style: normal;
  font-size: 10px; font-weight: 800; letter-spacing: 3.5px; color: var(--mi-amber);
  border-top: 1px solid rgba(255, 179, 92, 0.4);
}

/* Left: tactical briefing panel — glass, fine borders, clipped corner,
   scan-line texture. Hidden until the brief phase. */
#matchIntro .mi-brief {
  position: absolute; left: 3.2vw; top: 50%; transform: translate(-26px, -50%); opacity: 0;
  width: min(288px, 24vw); padding: 16px 18px 14px;
  background: var(--mi-glass); border: 1px solid var(--mi-line); border-left: 2px solid rgba(255, 179, 92, 0.55);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  backdrop-filter: blur(9px);
  transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
#matchIntro .mi-brief::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(220, 228, 245, 0.025) 0 1px, transparent 1px 3px);
}
#matchIntro.p-brief .mi-brief, #matchIntro.p-count .mi-brief { opacity: 1; transform: translate(0, -50%); }
#matchIntro .mi-brief header {
  display: flex; align-items: center; gap: 8px;
  font-size: 9px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: var(--mi-amber);
}
#matchIntro .mi-brief header i { width: 6px; height: 6px; background: var(--mi-amber2); animation: miBlink 1.6s steps(2) infinite; }
@keyframes miBlink { 50% { opacity: 0.25; } }
#matchIntro .mi-brief h1 { margin: 10px 0 3px; font-size: clamp(20px, 1.9vw, 26px); font-weight: 900; letter-spacing: 2.5px; text-transform: uppercase; line-height: 1.1; }
#matchIntro .mi-sector { font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--mi-muted); }
#matchIntro .mi-schem { margin: 13px 0 4px; border: 1px solid var(--mi-line); background: rgba(4, 6, 11, 0.45); }
#matchIntro .mi-schem svg { display: block; width: 100%; height: 96px; }
#matchIntro .mi-schem rect { fill: none; stroke: rgba(174, 185, 208, 0.5); stroke-width: 0.5; }
#matchIntro .mi-schem rect.bounds { stroke: rgba(174, 185, 208, 0.28); stroke-dasharray: 2 1.4; }
#matchIntro .mi-schem rect.hi { stroke: rgba(255, 179, 92, 0.75); }
#matchIntro .mi-schem circle { fill: rgba(255, 179, 92, 0.9); }
#matchIntro .mi-brief dl { margin: 10px 0 0; }
#matchIntro .mi-brief dl div { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid rgba(174, 185, 208, 0.09); }
#matchIntro .mi-brief dt { flex: 0 0 62px; font-size: 8.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--mi-muted); padding-top: 2px; }
#matchIntro .mi-brief dd { font-size: 11.5px; font-weight: 600; color: #dfe4ee; line-height: 1.45; }
#matchIntro .mi-vs { margin-top: 11px; padding-top: 10px; border-top: 1px solid rgba(174, 185, 208, 0.09); font-size: 12.5px; font-weight: 800; letter-spacing: 0.4px; }
#matchIntro .mi-vs em { font-style: normal; margin: 0 9px; font-size: 9px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: var(--mi-amber); }

/* Bottom-left: deployment uplink — segmented bar, no spinner */
#matchIntro .mi-deploy {
  position: absolute; left: 3.2vw; bottom: 10.5vh; width: min(288px, 24vw);
  animation: miIn 0.5s ease-out both; transition: opacity 0.5s;
}
#matchIntro.p-brief .mi-deploy, #matchIntro.p-count .mi-deploy { opacity: 0.55; }
#matchIntro .mi-deployHead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
#matchIntro .mi-deployHead span { font-size: 9.5px; font-weight: 800; letter-spacing: 3px; color: var(--mi-steel); }
#matchIntro .mi-deployHead b { font-size: 11px; font-weight: 800; color: var(--mi-amber); font-variant-numeric: tabular-nums; }
#matchIntro .mi-seg { display: flex; gap: 3px; }
#matchIntro .mi-seg i { flex: 1; height: 5px; background: rgba(220, 228, 245, 0.08); transition: background 0.12s; }
#matchIntro .mi-seg i.on { background: linear-gradient(180deg, #ffc37a, var(--mi-amber2)); box-shadow: 0 0 7px rgba(255, 144, 56, 0.45); }
#matchIntro .mi-status { margin-top: 8px; font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--mi-muted); min-height: 13px; }

/* Lower-right: telemetry micro-panels */
#matchIntro .mi-side {
  position: absolute; right: 3.2vw; bottom: 10.5vh; display: flex; flex-direction: column; gap: 6px;
  opacity: 0; transform: translateX(18px); transition: opacity 0.5s 0.1s, transform 0.5s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
#matchIntro.p-brief .mi-side, #matchIntro.p-count .mi-side { opacity: 1; transform: none; }
#matchIntro .mi-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-width: 148px; padding: 6px 11px;
  background: var(--mi-glass); border: 1px solid var(--mi-line); border-right: 2px solid rgba(174, 185, 208, 0.3);
  backdrop-filter: blur(8px);
}
#matchIntro .mi-chip span { font-size: 8.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--mi-muted); }
#matchIntro .mi-chip b { font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--mi-steel); }
#matchIntro .mi-chip b.ok { color: #5fd8a2; }
#matchIntro .mi-chip b.ok::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #5fd8a2; margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 6px rgba(95, 216, 162, 0.8); }

/* Upper-middle: countdown ring. Sits high in the frame — a thin ring and a
   translucent numeral, so the operator stays visible beneath/behind it. */
#matchIntro .mi-count {
  position: absolute; left: 50%; top: 11%; transform: translateX(-50%) scale(0.86);
  width: 148px; height: 148px; opacity: 0; transition: opacity 0.4s, transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
#matchIntro.p-count .mi-count { opacity: 1; transform: translateX(-50%) scale(1); }
#matchIntro .mi-count svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
#matchIntro .mi-count circle { fill: none; }
#matchIntro .mi-count circle.bg { stroke: rgba(220, 228, 245, 0.13); stroke-width: 1.5; }
#matchIntro .mi-count circle.arc {
  stroke: var(--mi-amber); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 339.3; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 6px rgba(255, 144, 56, 0.55));
}
#matchIntro .mi-count b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 58px; font-weight: 800; color: rgba(255, 255, 255, 0.94); font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px rgba(255, 179, 92, 0.45), 0 3px 18px rgba(0, 0, 0, 0.7);
}
#matchIntro .mi-count b.pop { animation: miPop 0.85s ease-out; }
@keyframes miPop { 0% { transform: scale(1.24); opacity: 0.35; filter: blur(2px); } 30% { opacity: 1; filter: blur(0); } 100% { transform: scale(1); } }
#matchIntro .mi-count span {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  font-size: 9.5px; font-weight: 800; letter-spacing: 4px; text-transform: uppercase; color: var(--mi-steel); white-space: nowrap;
}

/* Bottom-centre tip — lives inside the letterbox band */
#matchIntro .mi-tip {
  position: absolute; left: 50%; bottom: 2.8vh; transform: translateX(-50%);
  max-width: min(520px, 60vw); text-align: center;
  font-size: 11px; color: var(--mi-muted); line-height: 1.55;
}
@keyframes miIn { from { opacity: 0; transform: translateY(10px); } }

/* ── Class select rail: bottom-center, over the deployed arena ── */
#matchIntro .mi-classes {
  position: absolute; left: 50%; bottom: 7.5vh; transform: translateX(-50%);
  width: min(760px, 86vw); pointer-events: auto;
  animation: miIn 0.5s 0.35s ease-out backwards;
}
#matchIntro .mi-classHead {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 10px; font-weight: 800; letter-spacing: 3px; color: var(--mi-steel);
  margin-bottom: 8px; padding: 0 2px;
}
#matchIntro .mi-classHead span { letter-spacing: 1px; font-weight: 600; color: var(--mi-muted); text-transform: lowercase; }
#matchIntro .mi-classRow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
#matchIntro .mi-class {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 10px 12px 9px; text-align: left; cursor: pointer;
  background: linear-gradient(180deg, rgba(13, 17, 27, 0.88), rgba(8, 11, 18, 0.92));
  border: 1px solid rgba(88, 106, 138, 0.28); border-radius: 8px;
  color: var(--text, #dfe6f2); font: inherit;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
  backdrop-filter: blur(6px);
}
#matchIntro .mi-class:hover { border-color: rgba(120, 170, 240, 0.55); transform: translateY(-2px); }
#matchIntro .mi-class.sel {
  border-color: var(--blue, #2e9bff);
  background: linear-gradient(180deg, rgba(18, 40, 66, 0.92), rgba(10, 20, 34, 0.94));
  box-shadow: 0 0 0 1px rgba(46, 155, 255, 0.35), 0 6px 22px rgba(46, 155, 255, 0.12);
}
#matchIntro .mi-class .mc-key {
  position: absolute; top: 7px; right: 8px; font-size: 9px; font-weight: 800;
  color: var(--mi-steel); border: 1px solid rgba(88, 106, 138, 0.4); border-radius: 3px;
  padding: 1px 4px; line-height: 1;
}
#matchIntro .mi-class.sel .mc-key { color: var(--blue, #2e9bff); border-color: rgba(46, 155, 255, 0.5); }
#matchIntro .mi-class .mc-glyph { font-style: normal; font-size: 15px; color: var(--blue, #2e9bff); line-height: 1; }
#matchIntro .mi-class b { font-size: 13px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; }
#matchIntro .mi-class .mc-weps { font-size: 10px; color: var(--mi-muted); line-height: 1.35; }
#matchIntro .mi-class .mc-weps em { font-style: normal; opacity: 0.7; display: block; }
#matchIntro .mi-class .mc-spd {
  font-size: 8.5px; font-weight: 800; letter-spacing: 2px; color: var(--mi-amber, #f0a63f);
}
#matchIntro.p-fight .mi-classes { opacity: 0; pointer-events: none; transition: opacity 0.25s; }
/* the class rail owns the bottom lane — the tip rides above it */
#matchIntro .mi-tip { bottom: 1vh; }
@media (max-width: 900px) {
  #matchIntro .mi-classRow { grid-template-columns: repeat(2, 1fr); }
  #matchIntro .mi-classes { bottom: 5vh; }
}

/* ── Tactical minimap + streak pips (top-left) ── */
#tacmap {
  position: absolute; top: 18px; left: 18px;
  width: 176px; height: 176px;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}
#streakPips {
  position: absolute; top: 198px; left: 18px; display: flex; gap: 6px;
  pointer-events: none;
}
#streakPips .sp {
  width: 22px; height: 22px; display: grid; place-items: center;
  font: 800 10px 'Inter', sans-serif; color: #7d8698;
  background: rgba(6, 9, 15, 0.6); border: 1px solid rgba(174, 185, 208, 0.25);
  border-radius: 50%;
}
#streakPips .sp.got { color: #dfe6f2; border-color: rgba(46, 155, 255, 0.7); }
#streakPips .sp.live {
  color: #fff; background: rgba(46, 155, 255, 0.3); border-color: #2e9bff;
  box-shadow: 0 0 10px rgba(46, 155, 255, 0.5);
  animation: spLive 1.2s infinite;
}
@keyframes spLive { 50% { box-shadow: 0 0 16px rgba(46, 155, 255, 0.8); } }
@media (max-width: 900px) {
  #tacmap { width: 128px; height: 128px; }
  #streakPips { top: 152px; }
}

/* FIGHT beat: a fast dark pulse that carries the cut from the cinematic
   backdrop into first-person, with the callout riding on top. */
#introCut { position: fixed; inset: 0; z-index: 450; pointer-events: none; opacity: 0; }
#introCut::before {
  content: ''; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(ellipse at 50% 44%, rgba(16, 18, 26, 0.9), rgba(2, 3, 6, 0.99));
}
#introCut b {
  position: absolute; left: 50%; top: 20%; transform: translateX(-50%);
  font-family: 'Inter', sans-serif; font-size: clamp(52px, 7vw, 84px); font-weight: 900;
  letter-spacing: 16px; text-indent: 16px; color: #fff4e6; opacity: 0;
  text-shadow: 0 0 44px rgba(255, 144, 56, 0.85), 0 0 12px rgba(255, 179, 92, 0.6), 0 4px 26px rgba(0, 0, 0, 0.8);
}
#introCut.go { opacity: 1; }
#introCut.go::before { animation: miCut 0.6s ease-out both; }
#introCut.go b { animation: miFight 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes miCut { 0% { opacity: 0; } 16% { opacity: 0.96; } 100% { opacity: 0; } }
@keyframes miFight {
  0% { opacity: 0; transform: translateX(-50%) scale(0.55); }
  14% { opacity: 1; transform: translateX(-50%) scale(1.12); }
  26% { transform: translateX(-50%) scale(1); }
  74% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) scale(1.03); }
}

@media (max-width: 900px) {
  #matchIntro .mi-brief { width: min(258px, 44vw); }
  #matchIntro .mi-deploy { width: min(258px, 44vw); }
  #matchIntro .mi-side { display: none; }
  #matchIntro .mi-count { top: 9%; transform: translateX(-50%) scale(0.72); }
  #matchIntro.p-count .mi-count { transform: translateX(-50%) scale(0.82); }
}

/* ═══════════ HUD ═══════════ */
#hud { position: fixed; inset: 0; z-index: 50; pointer-events: none; font-family: 'Inter', sans-serif; opacity: 0; transition: opacity 0.45s ease-out; }
#hud.live { opacity: 1; }

/* Slide speed FX: darkened edge vignette + rotating radial streaks. Works on
   top of the WebGL afterimage trails for a strong sense of speed. */
/* Opacity is driven per-frame from the game loop (inline style) so the fade
   tracks the slide exactly, independent of CSS transition timing. */
#slideFx { position: absolute; inset: 0; opacity: 0; overflow: hidden; }
#slideFx::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 52%, transparent 34%, rgba(4, 7, 14, 0.78) 100%);
}
#slideFx::before {
  content: ''; position: absolute; inset: -12%;
  background: repeating-conic-gradient(from 0deg at 50% 50%,
    rgba(255, 255, 255, 0) 0deg 6.5deg,
    rgba(205, 220, 255, 0.13) 7.5deg 9deg);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 30%, #000 68%);
  mask: radial-gradient(circle at 50% 50%, transparent 30%, #000 68%);
  animation: slideStreaks .45s linear infinite;
}
@keyframes slideStreaks { to { transform: rotate(16deg); } }

/* Scope overlay for magnified optics (Sentinel DMR): circular sight picture
   with fine reticle lines; the weapon model hides while this is up. */
#scopeOverlay { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, transparent 0, transparent 27vmin, rgba(3, 4, 8, 0.985) 28.5vmin); }
#scopeOverlay::before, #scopeOverlay::after { content: ''; position: absolute; background: rgba(230, 235, 245, 0.85); }
#scopeOverlay::before { left: 50%; top: 50%; width: 54vmin; height: 1px; transform: translate(-50%, -0.5px); }
#scopeOverlay::after { left: 50%; top: 50%; width: 1px; height: 54vmin; transform: translate(-0.5px, -50%); }
#scopeOverlay i { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(230, 235, 245, 0.35); border-radius: 50%; }
#scopeOverlay i:nth-child(1) { width: 18vmin; height: 18vmin; transform: translate(-50%, -50%); }
#scopeOverlay i:nth-child(2) { width: 40vmin; height: 40vmin; transform: translate(-50%, -50%); }

/* ── Crosshair: thin blueprint reticle; ADS collapses it to a micro dot ── */
#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: scale(var(--ch-scale, 1)); }
#crosshair i { position: absolute; background: var(--ch-color, rgba(240,246,255,.95)); box-shadow: var(--ch-glow, 0 0 3px rgba(46,155,255,.7)); transition: opacity .12s; }
#crosshair i:nth-child(1) { width: var(--ch-w, 2px); height: var(--ch-len, 7px); left: calc(var(--ch-w, 2px) / -2); top: calc(0px - var(--ch-len, 7px) - var(--gap, 5px)); }
#crosshair i:nth-child(2) { width: var(--ch-w, 2px); height: var(--ch-len, 7px); left: calc(var(--ch-w, 2px) / -2); top: var(--gap, 5px); }
#crosshair i:nth-child(3) { width: var(--ch-len, 7px); height: var(--ch-w, 2px); top: calc(var(--ch-w, 2px) / -2); left: calc(0px - var(--ch-len, 7px) - var(--gap, 5px)); }
#crosshair i:nth-child(4) { width: var(--ch-len, 7px); height: var(--ch-w, 2px); top: calc(var(--ch-w, 2px) / -2); left: var(--gap, 5px); }
#crosshair b { position: absolute; width: var(--ch-dot, 2px); height: var(--ch-dot, 2px); left: calc(var(--ch-dot, 2px) / -2); top: calc(var(--ch-dot, 2px) / -2); background: var(--ch-color, rgba(240,246,255,.95)); box-shadow: var(--ch-glow, 0 0 4px rgba(46,155,255,.9)); }
#crosshair.ads i { opacity: 0; }
#crosshair.ads b { width: 3px; height: 3px; left: -1.5px; top: -1.5px; border-radius: 50%; }

/* Floating damage numbers — small, brief, never center-screen clutter */
.dmg-num { position: absolute; font: 800 15px 'Inter', sans-serif; color: #f2f6fc;
  text-shadow: 0 1px 3px rgba(0,0,0,.8); pointer-events: none;
  animation: dmgfloat .72s ease-out forwards; }
.dmg-num.head { color: #ffce54; }
@keyframes dmgfloat {
  0% { opacity: 0; transform: translateY(4px) scale(.85); }
  18% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-26px) scale(.92); }
}

#hitmarker {
  position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  opacity: 0; transform: rotate(45deg) scale(.8);
}
#hitmarker::before, #hitmarker::after { content: ''; position: absolute; background: var(--hit-c, #fff); }
#hitmarker::before { width: 2px; height: 100%; left: 12px; }
#hitmarker::after { height: 2px; width: 100%; top: 12px; }
#hitmarker.show { animation: hitpop .18s ease-out; }
#hitmarker.head::before, #hitmarker.head::after { background: #ffce54; }
#hitmarker.kill::before, #hitmarker.kill::after { background: var(--kill-c, #ff5a5e); }
#hitmarker.far::before, #hitmarker.far::after { background: #9fd8ff; }
@keyframes hitpop { 0% { opacity: 1; transform: rotate(45deg) scale(1.25); } 100% { opacity: 0; transform: rotate(45deg) scale(.8); } }

#dmgVignette { position: absolute; inset: 0; box-shadow: inset 0 0 140px rgba(207,60,64,0); transition: box-shadow .25s; }
#dmgVignette.hurt { box-shadow: inset 0 0 140px rgba(207,60,64,.55); }
#dmgDir {
  position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px;
  opacity: 0; transition: opacity .3s;
}
#dmgDir::before {
  content: ''; position: absolute; left: 50%; top: -14px; margin-left: -12px;
  border: 12px solid transparent; border-bottom: 16px solid rgba(207,60,64,.85);
}
#dmgDir.show { opacity: 1; }

/* ═══ HUD — restrained tactical identity ═══
   One material (dark glass that fades toward the screen edge), one radius,
   one accent. Information sits on the glass without a box around every
   item; --hud-scale and --hud-safe come from settings. */
#hud { --dxb: #2e9bff; --dxb-dim: rgba(46,155,255,.32); --plate: rgba(7,11,17,.55);
  --hud-safe: 0px; }
.tick { display: none; }

/* ── Enemy nametag ── */
/* Enemy tag — bare red name over the head while aimed at (no plate, no bar) */
#nametag {
  position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity;
  display: flex; flex-direction: column; align-items: center;
  transition: opacity .1s linear; pointer-events: none;
}
#nametag b { font-size: 12.5px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  color: #ff4a4e; text-shadow: 0 1px 4px rgba(0,0,0,.9), 0 0 8px rgba(255,50,54,.35); white-space: nowrap; }
#ntHpWrap { width: 92px; height: 3px; background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden; }
#ntHp { display: block; height: 100%; background: var(--dxb); border-radius: 2px; transition: width .18s; }
#ntHpWrap.low #ntHp { background: #f07f1f; }

/* ── Score ── */
#hudScore {
  position: absolute; top: calc(14px + var(--hud-safe)); left: 50%;
  transform: translateX(-50%) scale(var(--hud-scale, 1));
  transform-origin: top center;
  display: flex; align-items: center; gap: 16px; font-size: 27px; font-weight: 800;
  background: linear-gradient(180deg, var(--plate), rgba(7,11,17,.2));
  padding: 7px 26px 9px; border-radius: 4px; backdrop-filter: blur(3px);
  font-variant-numeric: tabular-nums;
}
#hudScore::after { content: ''; position: absolute; left: 26px; right: 26px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--dxb-dim), transparent); }
#hudScore em { font-style: normal; font-size: 10px; color: #8fa0b8; letter-spacing: 2px; text-transform: uppercase; }
#hudScore #hsMe { color: #f2f6fc; }
#hudScore #hsOpp { color: #ff8a8e; }
#hudScore span.pop { animation: numpop .28s cubic-bezier(.2,1.6,.4,1); }
@keyframes numpop { 40% { transform: scale(1.22); } }
#hudTimer { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700;
  letter-spacing: 2px; color: #cfd6e0; margin-top: 6px; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(0,0,0,.8); }

/* ── Killfeed ── */
#killfeed { position: absolute; top: calc(16px + var(--hud-safe)); right: calc(16px + var(--hud-safe));
  display: flex; flex-direction: column; gap: 4px; align-items: flex-end;
  transform: scale(var(--hud-scale, 1)); transform-origin: top right; }
.kf-item { background: linear-gradient(90deg, rgba(7,11,17,.15), var(--plate));
  border-right: 2px solid var(--dxb); border-radius: 3px; padding: 5px 12px;
  font-size: 12px; letter-spacing: .3px; backdrop-filter: blur(2px); animation: kfin .18s ease-out; }
.kf-item b.me { color: #f2f6fc; } .kf-item b.opp { color: #ff8a8e; }
.kf-item .kf-w { color: #7d8ba0; margin: 0 7px; font-size: 11px; }
@keyframes kfin { from { transform: translateX(20px); opacity: 0; } }

/* ── Bottom: integrity + weapon. Same glass, anchored to the frame edge ── */
#hudBottom { position: absolute; bottom: calc(18px + var(--hud-safe)); left: 0; right: 0;
  display: flex; justify-content: space-between;
  padding: 0 calc(22px + var(--hud-safe)); align-items: flex-end; pointer-events: none; }
#hudHealth {
  position: relative; width: 264px;
  background: linear-gradient(90deg, var(--plate), rgba(7,11,17,.12));
  border-radius: 4px; padding: 9px 14px 11px;
  backdrop-filter: blur(3px); transform: scale(var(--hud-scale, 1)); transform-origin: bottom left;
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'label hp' 'track hp'; column-gap: 12px;
}
#hudHealth::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px;
  border-radius: 1px; background: var(--dxb); opacity: .8; transition: background .2s; }
#hudHealth label { grid-area: label; font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase; color: #8fa0b8; margin-bottom: 5px; }
#hpTrack { grid-area: track; position: relative; height: 7px; background: rgba(255,255,255,.08);
  border-radius: 2px; overflow: hidden; }
#hpBar { height: 100%; width: 100%; background: linear-gradient(90deg, #1f7ae0, #4fb2ff);
  transition: width .15s, background .2s; }
#hpTrack .seg { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(5,8,12,.8); }
#hpTrack .seg:nth-of-type(1) { left: 25%; } #hpTrack .seg:nth-of-type(2) { left: 50%; } #hpTrack .seg:nth-of-type(3) { left: 75%; }
#hudHealth.low #hpBar { background: linear-gradient(90deg, #cf4a2e, #f07f1f); }
#hudHealth.low::before { background: #f07f1f; animation: lowpulse 1.1s ease-in-out infinite; }
@keyframes lowpulse { 50% { opacity: .35; } }
#hpText { grid-area: hp; align-self: center; font-size: 26px; font-weight: 800; color: #f2f6fc; min-width: 44px;
  text-align: right; font-variant-numeric: tabular-nums; }

#hudAmmo {
  position: relative; text-align: right;
  background: linear-gradient(270deg, var(--plate), rgba(7,11,17,.12));
  border-radius: 4px; padding: 9px 16px 10px; min-width: 186px;
  backdrop-filter: blur(3px); transform: scale(var(--hud-scale, 1)); transform-origin: bottom right;
}
#hudAmmo::before { content: ''; position: absolute; right: 0; top: 6px; bottom: 6px; width: 2px;
  border-radius: 1px; background: var(--dxb); opacity: .8; }
#reloadBar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--dxb); opacity: 0; }
#hudAmmo em { display: block; font-style: normal; font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase; color: #8fa0b8; margin-bottom: 2px; }
#hudAmmo .ammo-nums b { display: inline-block; font-size: 32px; font-weight: 800; color: #f2f6fc; font-variant-numeric: tabular-nums; }
#hudAmmo .ammo-nums b.bump { animation: ammotick .16s ease-out; }
@keyframes ammotick { 30% { transform: translateY(1.5px); } }
#hudAmmo .ammo-nums span { font-size: 14px; color: #7d8ba0; margin-left: 5px; font-variant-numeric: tabular-nums; }
#hudAmmo.reloading .ammo-nums b { color: var(--dxb); }
#hudAmmo.low .ammo-nums b { color: #f07f1f; }
#ammoHint { font-size: 9px; letter-spacing: 2px; color: #f07f1f; font-weight: 700; min-height: 12px; margin-top: 2px; }
#hudAmmo.reloading #ammoHint { color: var(--dxb); }

#hudCenter { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); font-size: 15px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--dxb); text-shadow: 0 2px 10px rgba(0,0,0,.8); text-align: center; }

/* ── Respawn fade + killcam card ── */
#respawnFade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
#killcam { position: absolute; left: 50%; bottom: 17%; transform: translate(-50%, 14px);
  width: min(430px, 84vw); opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
#killcam.show { opacity: 1; transform: translate(-50%, 0); }
#kcBanner { position: relative; display: flex; align-items: baseline; gap: 10px; padding: 13px 18px;
  border: 1px solid var(--dxb-dim); border-radius: 3px; overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.5), inset 0 0 60px rgba(0,0,0,.35); }
#kcEliminated { font-size: 9px; letter-spacing: 3px; color: #ffb1b4; font-weight: 700; }
#kcName { font-size: 19px; font-weight: 800; letter-spacing: 1px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
#kcTitle { font-style: normal; font-size: 10px; letter-spacing: 1.5px; color: #b9c6da; text-transform: uppercase; }
#kcLevel { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: #eaf3ff;
  background: rgba(46,155,255,.25); border: 1px solid rgba(46,155,255,.5); border-radius: 2px; padding: 3px 8px; }
#killcam .kc-line { text-align: center; font-size: 11px; letter-spacing: 2px; color: #aeb9c9;
  text-transform: uppercase; padding: 8px 0 2px; }
#kcTimer { text-align: center; font-size: 13px; font-weight: 800; letter-spacing: 3px; color: var(--dxb);
  padding-top: 4px; text-shadow: 0 0 14px rgba(46,155,255,.5); }
#hudBanner { position: absolute; top: calc(88px + var(--hud-safe)); left: 50%; transform: translateX(-50%); font-size: 12.5px; font-weight: 600;
  letter-spacing: .5px; color: #f5b13e; background: var(--plate); border: 1px solid rgba(240,160,50,.35);
  border-left: 2px solid #f07f1f; border-radius: 2px; padding: 8px 16px; display: none; backdrop-filter: blur(2px); }

/* ── Scoreboard ── */
#scoreboard {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  background: rgba(6,9,14,.94); border: 1px solid var(--dxb-dim); border-radius: 4px;
  padding: 22px 28px; min-width: 420px; backdrop-filter: blur(6px);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
#scoreboard h3 { font-size: 13px; letter-spacing: 3px; margin-bottom: 14px; color: #f2f6fc;
  border-bottom: 1px solid rgba(46,155,255,.25); padding-bottom: 10px; }
#scoreboard .sb-sub { float: right; font-size: 10px; letter-spacing: 1.5px; color: #8fa0b8; text-transform: uppercase; }
#scoreboard table { width: 100%; border-collapse: collapse; font-size: 14px; }
#scoreboard th { text-align: left; font-size: 10px; letter-spacing: 2px; color: #7d8ba0; text-transform: uppercase; padding: 6px 8px; }
#scoreboard td { padding: 9px 8px; border-top: 1px solid rgba(255,255,255,.05); }
#sbMeta { font-size: 10.5px; letter-spacing: 1px; color: #7d8ba0; margin-top: 12px; text-transform: uppercase; }

/* ═══ Settings — premium tabbed menu (ESC in-match, gear in the lobby) ═══
   The match stays visible behind a light blur — pausing should never feel
   like leaving the arena. */
#settingsMenu { position: fixed; inset: 0; z-index: 320; background: rgba(4,6,10,.45); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; pointer-events: auto;
  font-family: 'Inter', sans-serif; animation: pmIn .16s ease-out; }
@keyframes pmIn { from { opacity: 0; } }
.pm-wrap { display: flex; width: min(880px, 94vw); height: min(560px, 88vh);
  background: rgba(8,12,18,.86); border: 1px solid rgba(60,130,220,.3); border-radius: 6px;
  overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.04); }
.pm-rail { width: 212px; flex: none; display: flex; flex-direction: column; gap: 4px;
  padding: 20px 14px; background: rgba(4,7,12,.85); border-right: 1px solid rgba(60,130,220,.18); }
.pm-brand { font-size: 17px; font-weight: 900; letter-spacing: 3px; color: #f2f6fc; padding: 0 10px 16px; }
.pm-brand span { color: #2e9bff; font-weight: 300; }
.pm-brand em { display: block; font-style: normal; font-size: 9px; letter-spacing: 4px; color: #7d8ba0; margin-top: 4px; }
.pm-item { display: flex; align-items: center; gap: 8px; text-align: left; font: 600 13px/1 'Inter', sans-serif;
  letter-spacing: 1px; color: #aeb9c9; background: none; border: 1px solid transparent; border-radius: 3px;
  padding: 11px 12px; cursor: pointer; transition: all .14s; }
.pm-item:hover { color: #f2f6fc; background: rgba(46,155,255,.08); border-color: rgba(46,155,255,.2); }
.pm-item.on { color: #f2f6fc; background: rgba(46,155,255,.13); border-color: rgba(46,155,255,.4);
  box-shadow: inset 2px 0 0 #2e9bff; }
.pm-resume { color: #eaf3ff; background: rgba(46,155,255,.16); border-color: rgba(46,155,255,.45); margin-bottom: 12px; }
.pm-resume i { font-style: normal; font-size: 9px; color: #2e9bff; }
.pm-resume:hover { background: rgba(46,155,255,.28); }
.pm-tabs { display: flex; flex-direction: column; gap: 3px; }
.pm-spacer { flex: 1; }
.pm-leave { color: #ff9a9e; }
.pm-leave:hover { color: #ffc2c4; background: rgba(207,60,64,.12); border-color: rgba(207,60,64,.35); }
.pm-foot { font-size: 9px; letter-spacing: 2px; color: #55617a; padding: 12px 10px 0; }
.pm-panel { position: relative; flex: 1; padding: 26px 30px; overflow-y: auto; }
.pm-corner { position: absolute; width: 14px; height: 14px; pointer-events: none; }
.pm-corner.tl { left: 8px; top: 8px; border-left: 2px solid rgba(46,155,255,.5); border-top: 2px solid rgba(46,155,255,.5); }
.pm-corner.br { right: 8px; bottom: 8px; border-right: 2px solid rgba(46,155,255,.5); border-bottom: 2px solid rgba(46,155,255,.5); }
.pm-panel h4 { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: #2e9bff;
  margin: 20px 0 10px; padding-bottom: 6px; border-bottom: 1px solid rgba(46,155,255,.18); }
.pm-panel h4:first-child { margin-top: 0; }
.pm-row { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 8px 2px; font-size: 13px; color: #cfd6e0; }
.pm-row > span { flex: 1; }
.pm-row small { display: block; font-size: 10.5px; color: #7d8ba0; margin-top: 2px; letter-spacing: .3px; }
.pm-row input[type=range] { width: 190px; accent-color: #2e9bff; }
.pm-row .pm-val { min-width: 46px; text-align: right; font-weight: 700; color: #f2f6fc; font-variant-numeric: tabular-nums; }
.pm-color { width: 46px; height: 26px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; background: none; cursor: pointer; }
.pm-color::-webkit-color-swatch-wrapper { padding: 2px; }
.pm-color::-webkit-color-swatch { border: none; border-radius: 4px; }
.pm-seg { display: flex; gap: 4px; }
.pm-seg button { font: 600 11px/1 'Inter', sans-serif; letter-spacing: .5px; color: #aeb9c9;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 3px;
  padding: 7px 12px; cursor: pointer; transition: all .12s; }
.pm-seg button:hover { color: #f2f6fc; border-color: rgba(46,155,255,.4); }
.pm-seg button.on { color: #eaf3ff; background: rgba(46,155,255,.18); border-color: rgba(46,155,255,.55); }
.pm-check { width: 40px; height: 22px; border-radius: 12px; background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.14); position: relative; cursor: pointer; transition: all .15s; flex: none; }
.pm-check::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #aeb9c9; transition: all .15s; }
.pm-check.on { background: rgba(46,155,255,.35); border-color: rgba(46,155,255,.6); }
.pm-check.on::after { left: 20px; background: #eaf3ff; box-shadow: 0 0 8px rgba(46,155,255,.8); }
.pm-bind { font: 700 11.5px/1 'Inter', sans-serif; letter-spacing: 1px; color: #eaf3ff; min-width: 96px;
  text-align: center; background: rgba(255,255,255,.05); border: 1px solid rgba(46,155,255,.3);
  border-radius: 3px; padding: 8px 10px; cursor: pointer; transition: all .12s; text-transform: uppercase; }
.pm-bind:hover { border-color: rgba(46,155,255,.6); background: rgba(46,155,255,.1); }
.pm-bind.listening { color: #f07f1f; border-color: rgba(240,127,31,.7); animation: bindblink .8s step-end infinite; }
@keyframes bindblink { 50% { background: rgba(240,127,31,.15); } }
.pm-bind-warn { font-size: 11px; color: #f5b13e; padding: 6px 2px; min-height: 24px; }
.pm-reset { margin-top: 14px; font: 600 11px/1 'Inter', sans-serif; letter-spacing: 1px; color: #aeb9c9;
  background: none; border: 1px solid rgba(255,255,255,.16); border-radius: 3px; padding: 9px 14px; cursor: pointer; }
.pm-reset:hover { color: #f2f6fc; border-color: rgba(46,155,255,.5); }
.pm-note { font-size: 11px; color: #7d8ba0; line-height: 1.5; padding: 8px 2px; }

/* ── Pause → Change Loadout ── */
.pm-loadouts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.pm-lo { display: flex; flex-direction: column; gap: 5px; text-align: left; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.1); border-radius: 4px;
  padding: 13px 15px; transition: border-color .14s, background .14s, transform .14s; }
.pm-lo:hover { border-color: rgba(46,155,255,.45); background: rgba(46,155,255,.06); transform: translateY(-1px); }
.pm-lo.on { border-color: rgba(46,155,255,.65); background: rgba(46,155,255,.12); }
.pm-lo b { font: 800 14px/1 'Inter', sans-serif; letter-spacing: 1px; color: #f2f6fc; text-transform: uppercase; }
.pm-lo span { font-size: 11px; color: #8fa0b8; letter-spacing: .3px; }
.pm-lo em { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: 2px; color: #2e9bff; min-height: 11px; }

/* ═══ Match-end verdict ═══ */
#matchEnd { position: fixed; inset: 0; z-index: 260; cursor: pointer;
  font-family: 'Inter', sans-serif; opacity: 0; transition: opacity .4s ease; }
#matchEnd.in { opacity: 1; }
#matchEnd .me-veil { position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 44%, rgba(4,6,10,.14) 0%, rgba(4,6,10,.62) 100%); }
#matchEnd .me-inner { position: absolute; left: 0; right: 0; top: 34%;
  display: flex; flex-direction: column; align-items: center; text-align: center; }
#matchEnd .me-kicker { font-size: 10px; letter-spacing: 6px; color: #8fa0b8; margin-bottom: 12px; }
#matchEnd h1 { font-size: clamp(46px, 9vw, 96px); font-weight: 900; letter-spacing: 14px; margin: 0;
  line-height: 1; text-indent: 14px; color: #f2f6fc; text-shadow: 0 8px 46px rgba(0,0,0,.7); }
#matchEnd.in h1 { animation: meLand .5s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes meLand { from { transform: scale(1.18); opacity: 0; } }
#matchEnd h1.win { color: #eaf6ff; text-shadow: 0 0 44px rgba(46,155,255,.55), 0 8px 46px rgba(0,0,0,.7); }
#matchEnd h1.loss { color: #ffd9db; text-shadow: 0 0 44px rgba(207,60,64,.45), 0 8px 46px rgba(0,0,0,.7); }
#matchEnd .me-score { margin-top: 18px; font-size: 26px; font-weight: 800; letter-spacing: 6px;
  color: #cfd6e0; font-variant-numeric: tabular-nums; }
#matchEnd.in .me-score { animation: meFade .5s .25s ease-out both; }
@keyframes meFade { from { opacity: 0; transform: translateY(8px); } }
#matchEnd .me-skip { position: absolute; left: 50%; bottom: 7vh; transform: translateX(-50%);
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: #7d8ba0; }
#matchEnd.in .me-skip { animation: meFade .4s 1.1s ease-out both; }

/* results stat chips */
.res-stats { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.res-stats > div { display: flex; flex-direction: column; align-items: center; min-width: 86px;
  padding: 10px 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 4px; }
.res-stats b { font-size: 20px; font-weight: 800; color: #f2f6fc; font-variant-numeric: tabular-nums; }
.res-stats span { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: #8fa0b8; margin-top: 3px; }

/* ── Rivalry Card — persistent head-to-head record on the results screen ── */
.res-rivalry { background: linear-gradient(180deg, rgba(46,155,255,.07), rgba(255,255,255,.02));
  border: 1px solid rgba(46,155,255,.22); border-radius: var(--radius, 10px);
  padding: 12px 16px 14px; margin: 12px 0; }
.riv-head { display: flex; justify-content: space-between; align-items: baseline; }
.riv-head span { font-size: 10px; letter-spacing: 3px; font-weight: 800; color: #6fb9ff; }
.riv-head em { font-style: normal; font-size: 10.5px; color: #8fa0b8; letter-spacing: .5px; }
.riv-score { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 10px 0 6px; }
.riv-side { display: flex; flex-direction: column; align-items: center; min-width: 110px; }
.riv-side b { font-size: 12.5px; color: #c9d4e4; font-weight: 700; max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.riv-side i { font-style: normal; font-size: 30px; font-weight: 800; color: #f2f6fc;
  font-variant-numeric: tabular-nums; line-height: 1.15; }
.riv-side.won i { color: #58d68b; }
.riv-vs { font-size: 10px; letter-spacing: 2px; color: #5d6c82; font-weight: 800; }
.riv-streak { text-align: center; font-size: 11.5px; color: #9fb2ca; letter-spacing: .4px; margin-bottom: 8px; }
.riv-facts { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.riv-facts > div { display: flex; flex-direction: column; align-items: center; min-width: 92px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px; padding: 7px 10px; }
.riv-facts b { font-size: 13px; font-weight: 800; color: #eaf1fb; }
.riv-facts span { font-size: 8.5px; letter-spacing: 1.4px; text-transform: uppercase; color: #8494ab; margin-top: 2px; }

/* ── modal ── */
.modal { position: fixed; inset: 0; z-index: 300; background: rgba(5,5,6,.75); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; width: 520px; max-width: 94vw; display: flex; flex-direction: column; gap: 14px; max-height: 86vh; overflow-y: auto; }
.terms-body { font-size: 13px; color: var(--text-secondary); line-height: 1.65; display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 700px) {
  .menu-modes { grid-template-columns: 1fr; }
  #hudScore { font-size: 22px; }
}

/* scoreboard cosmetics */
.sb-lvl { font-size: 9px; font-weight: 800; letter-spacing: 1px; color: #eaf3ff;
  background: rgba(46,155,255,.22); border: 1px solid rgba(46,155,255,.45); border-radius: 2px; padding: 1px 5px; margin-left: 7px; }
.sb-title { display: block; font-size: 9.5px; letter-spacing: 1.5px; color: #8fa0b8; text-transform: uppercase; margin-top: 2px; }

/* ═══ Armory ═══ */
.arm-head { display: flex; align-items: center; gap: 16px; margin: 6px 0 10px; }
.arm-lvl { display: flex; flex-direction: column; align-items: center; padding: 8px 16px;
  background: rgba(46,155,255,.1); border: 1px solid rgba(46,155,255,.4); border-radius: 4px; }
.arm-lvl b { font-size: 26px; font-weight: 900; color: #eaf3ff; line-height: 1; }
.arm-lvl span { font-size: 8px; letter-spacing: 3px; color: #8fa0b8; margin-top: 3px; }
.arm-xp { flex: 1; }
.arm-xpbar { height: 7px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.arm-xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #1f7ae0, #4fb2ff); box-shadow: 0 0 10px rgba(46,155,255,.5); }
.arm-xp span { font-size: 10.5px; letter-spacing: 1px; color: #8fa0b8; display: block; margin-top: 5px; text-transform: uppercase; }
.arm-next { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.arm-next-l { font-size: 9px; letter-spacing: 2.5px; color: #2e9bff; font-weight: 700; }
.arm-chip { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #cfd6e0; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 3px; padding: 4px 9px; }
.arm-chip:hover { border-color: rgba(46,155,255,.5); }
.arm-chip i { width: 8px; height: 8px; border-radius: 2px; }
.arm-chip em { font-style: normal; font-size: 9px; color: #7d8ba0; }
.arm-body { display: flex; gap: 16px; align-items: flex-start; }
.arm-left { flex: 1; min-width: 0; }
.arm-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; align-items: center; }
.arm-fsep { width: 1px; height: 18px; background: rgba(255,255,255,.12); margin: 0 4px; }
.arm-f { font: 600 10.5px/1 'Inter', sans-serif; letter-spacing: .5px; color: #aeb9c9; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 3px; padding: 6px 10px; }
.arm-f.on { color: #eaf3ff; background: rgba(46,155,255,.16); border-color: rgba(46,155,255,.5); }
.arm-f.rar.on { border-color: var(--rc); color: var(--rc); background: rgba(255,255,255,.05); }
.arm-search { width: 100%; margin-bottom: 10px; font: 500 12px 'Inter', sans-serif; color: #eaf3ff;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 3px; padding: 9px 12px; outline: none; }
.arm-search:focus { border-color: rgba(46,155,255,.5); }
.arm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
  max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.arm-item { position: relative; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.09);
  border-radius: 4px; padding: 10px 11px 9px; cursor: pointer; transition: border-color .12s, background .12s; }
.arm-item:hover { border-color: rgba(46,155,255,.45); }
.arm-item.sel { border-color: #2e9bff; background: rgba(46,155,255,.09); }
.arm-item.eq { border-color: rgba(125,255,217,.55); }
.arm-item.locked { opacity: .55; }
.arm-item b { display: block; font-size: 12px; color: #eaf3ff; margin: 7px 0 2px; }
.arm-item .arm-cat { display: block; font-size: 9px; letter-spacing: 1.5px; color: #7d8ba0; text-transform: uppercase; }
.arm-item .arm-rar { display: block; font-size: 9.5px; letter-spacing: 1px; font-weight: 700; text-transform: uppercase; margin-top: 2px; }
.arm-item em { position: absolute; right: 9px; top: 9px; font-style: normal; font-size: 8.5px; letter-spacing: 1px;
  font-weight: 800; color: #7d8ba0; }
.arm-item.eq em { color: #7dffd9; }
.arm-sw { display: block; width: 34px; height: 22px; border-radius: 3px; border: 1px solid rgba(255,255,255,.15); }
.arm-sw.wide { width: 64px; }
.arm-sw.glyph { display: flex; align-items: center; justify-content: center; font-size: 15px; background: rgba(255,255,255,.05); font-style: normal; }
.arm-side { width: 320px; flex: none; }
.arm-preview { position: relative; height: 240px; background: radial-gradient(340px 200px at 50% 40%, #131c2c, #090c12 80%);
  border: 1px solid rgba(46,155,255,.28); border-radius: 4px; overflow: hidden; }
.arm-preview canvas { display: block; cursor: grab; }
#armPrevCss { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.arm-banner { width: 260px; height: 74px; border-radius: 4px; border: 1px solid rgba(255,255,255,.2);
  display: flex; flex-direction: column; justify-content: center; padding: 0 16px; }
.arm-banner b { font-size: 16px; color: #fff; letter-spacing: 1px; }
.arm-banner em { font-style: normal; font-size: 9px; letter-spacing: 2px; color: rgba(255,255,255,.75); text-transform: uppercase; }
.arm-emblem { font-size: 72px; text-shadow: 0 0 24px currentColor; }
.arm-ret { position: relative; width: 100px; height: 100px; }
.arm-ret i { position: absolute; left: 50%; top: 50%; background: #f2f6fc; box-shadow: 0 0 4px rgba(46,155,255,.8); }
.arm-ret b { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: #f2f6fc; border-radius: 50%; }
.arm-fx { display: flex; flex-direction: column; gap: 12px; font-size: 17px; font-weight: 800; letter-spacing: 2px; }
.arm-title { text-align: center; }
.arm-title b { display: block; font-size: 18px; color: #eaf3ff; letter-spacing: 1px; }
.arm-title em { font-style: normal; font-size: 10px; letter-spacing: 3px; color: #2e9bff; text-transform: uppercase; }
.arm-info { min-height: 84px; padding: 12px 4px; }
.arm-info b { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; }
.arm-info h3 { font-size: 17px; color: #eaf3ff; margin: 3px 0; }
.arm-info span { display: block; font-size: 11px; color: #8fa0b8; }
.arm-info em { display: block; font-style: normal; font-size: 10.5px; letter-spacing: 1px; color: #7dffd9; margin-top: 6px; text-transform: uppercase; }
#armEquip { width: 100%; margin-bottom: 8px; }
#armTrackBtn { width: 100%; }
.arm-track { margin-top: 14px; max-height: 40vh; overflow-y: auto; border: 1px solid rgba(255,255,255,.1); border-radius: 4px; }
.arm-trow { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid rgba(255,255,255,.05); }
.arm-trow b { width: 34px; font-size: 11px; color: #7d8ba0; font-weight: 800; }
.arm-trow.done b { color: #7dffd9; }
.arm-trow.big { background: rgba(46,155,255,.05); }
.arm-trow span { font-size: 11px; color: #cfd6e0; cursor: pointer; border-left: 2px solid var(--rc, #555); padding-left: 7px; }
.arm-trow span:hover { color: #fff; }

/* ── Winner identity strip on the match-end overlay ── */
.me-ident { display: inline-flex; align-items: center; gap: 12px; margin-top: 26px;
  padding: 10px 22px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 10px 34px rgba(0,0,0,.5); animation: meLand .5s .18s cubic-bezier(.2,1.4,.4,1) both; }
.me-ident i { font-style: normal; font-size: 22px; line-height: 1; }
.me-ident-t { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.me-ident-t b { font-size: 15px; font-weight: 800; letter-spacing: 1px; color: #f2f6fc; }
.me-ident-t span { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: #b8c6da; }
.me-ident em { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: 1.5px;
  color: #cfe0f5; background: rgba(0,0,0,.3); border-radius: 6px; padding: 4px 8px; }

/* ── Your identity plate on the results card ── */
.res-ident { display: flex; align-items: center; gap: 12px; margin: -6px -6px 14px;
  padding: 12px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); }
.res-ident i { font-style: normal; font-size: 20px; line-height: 1; }
.res-ident-t { display: flex; flex-direction: column; flex: 1; }
.res-ident-t b { font-size: 14px; font-weight: 800; letter-spacing: .5px; color: #f2f6fc; }
.res-ident-t span { font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; color: #b8c6da; }
.res-ident em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  color: #cfe0f5; background: rgba(0,0,0,.3); border-radius: 6px; padding: 4px 9px; }

/* Killer emblem glyph on the killcam banner */
#kcEmblem { font-style: normal; font-size: 18px; line-height: 1; margin-right: 2px; }

/* ── DXED profile pictures (social-app identity, everywhere in Arena) ── */
.pfp { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  object-fit: cover; color: #fff; font-weight: 800; letter-spacing: 0;
  border: 1px solid rgba(255,255,255,.25); flex: none; overflow: hidden; }
.pfp.bot { background: #1a2230; }
.sb-op { display: flex; align-items: center; gap: 8px; }

/* ── Match-end final scoreboard (BO2-style, you=blue / enemy=red) ── */
.me-board { margin: 26px auto 0; max-width: 560px; text-align: left;
  animation: meLand .5s .3s cubic-bezier(.2,1.4,.4,1) both; }
.me-prow { display: grid; grid-template-columns: 38px 1fr 70px 64px 64px 64px;
  align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; margin-bottom: 5px;
  background: rgba(6,9,15,.72); border: 1px solid rgba(255,255,255,.08); }
.me-prow.head { background: none; border: none; padding: 2px 14px; margin-bottom: 2px; }
.me-prow.head b, .me-prow.head span, .me-prow.head i { font-size: 8.5px; letter-spacing: 2px;
  color: #7d8ba0; font-style: normal; font-weight: 800; }
.me-prow b { font-size: 13.5px; color: #f2f6fc; font-weight: 800; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.me-prow b u { text-decoration: none; font-size: 8px; letter-spacing: 1.5px; color: #6fb9ff;
  vertical-align: 2px; margin-left: 6px; }
.me-prow span { font-size: 10px; letter-spacing: 1px; color: #9fb2ca; }
.me-prow i { font-style: normal; font-size: 15px; font-weight: 800; color: #e6edf8;
  text-align: center; font-variant-numeric: tabular-nums; }
.me-prow.friendly { border-color: rgba(46,155,255,.45); background: rgba(24,50,86,.55); }
.me-prow.enemy { border-color: rgba(207,60,64,.4); background: rgba(70,22,26,.5); }
#kcPfp .pfp { vertical-align: -7px; margin-right: 4px; }

/* ── Lobby deployment card (loadout locked pre-match) ── */
.dl-card { background: var(--bg-card, rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 16px 18px; }
.dl-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.dl-head span { font-size: 9px; letter-spacing: 2.5px; color: #6fb9ff; font-weight: 800; }
.dl-head b { font-size: 17px; letter-spacing: 1px; color: #f2f6fc; }
.dl-weps { display: flex; gap: 12px; flex-wrap: wrap; }
.dl-wep { flex: 1; min-width: 200px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.dl-cat { font-size: 8.5px; letter-spacing: 2px; color: #8fa0b8; font-weight: 800; }
.dl-wep img { height: 54px; object-fit: contain; align-self: center; }
.dl-wep b { font-size: 13.5px; color: #eef4fd; }
.dl-wep em { font-style: normal; font-size: 9.5px; letter-spacing: 1.5px; color: #58d68b; font-weight: 800; }
.dl-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.09); overflow: hidden; }
.dl-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2e9bff, #17d8c0); }
.dl-wep small { font-size: 10px; color: #8fa0b8; }
.dl-note { font-size: 11px; color: #8fa0b8; margin: 12px 0 0; line-height: 1.5; }

/* ── In-match loadout console (two-panel, reference style) ── */
.cl { display: grid; grid-template-columns: 220px 1fr; gap: 14px; }
.cl-left h4, .cl-info h4 { margin: 0 0 8px; font-size: 10px; letter-spacing: 2.5px; color: #6fb9ff; }
.cl-slot { display: block; width: 100%; text-align: left; font: 800 12px 'Inter', sans-serif;
  letter-spacing: 1.5px; color: #c9d4e4; background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12); border-radius: 4px; padding: 11px 12px;
  margin-bottom: 6px; cursor: pointer; position: relative; }
.cl-slot:hover { border-color: rgba(46,155,255,.5); color: #fff; }
.cl-slot.on { background: rgba(46,120,190,.35); border-color: #4fa8e8; color: #fff; }
.cl-slot em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-style: normal; font-size: 8px; letter-spacing: 1.5px; color: #17d8c0; }
.cl-info { background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px; padding: 12px 14px; }
.cl-title { font-size: 22px; font-weight: 900; letter-spacing: 2px; color: #f2f6fc; margin-bottom: 8px; }
.cl-sect { display: block; font-size: 9px; letter-spacing: 2.5px; color: #8fa0b8;
  font-weight: 800; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 4px; margin: 10px 0 8px; }
.cl-weps { display: flex; gap: 10px; flex-wrap: wrap; }
.cl-wep { flex: 1; min-width: 180px; background: rgba(120,30,26,.28);
  border: 1px solid rgba(255,255,255,.1); border-radius: 4px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 3px; position: relative; }
.cl-cat { font-size: 8.5px; letter-spacing: 2px; color: #d8c6c2; font-weight: 800; }
.cl-chips { position: absolute; top: 9px; right: 10px; display: flex; gap: 3px; }
.cl-chips i { width: 12px; height: 9px; background: #e8a33d; border-radius: 1px; display: block; }
.cl-wep b { font-size: 14px; color: #f6efee; }
.cl-wep em { font-style: normal; font-size: 9px; letter-spacing: 1.5px; color: #bcd8c4; font-weight: 800; }
.cl-bar { height: 4px; border-radius: 2px; background: rgba(0,0,0,.4); overflow: hidden; }
.cl-bar i { display: block; height: 100%; background: #58d68b; }
.cl-wep small { font-size: 9.5px; color: #cbb; }
.cl-mob { font-size: 11.5px; color: #aeb9c9; line-height: 1.5; }

/* ── Match-end: staged fades over the crane pull-out ── */
#matchEnd { cursor: default; }
#matchEnd.in .me-veil { animation: meVeil 3s ease both; }
@keyframes meVeil { 0% { opacity: 0; } 100% { opacity: 1; } }
#matchEnd .me-ident { animation-delay: .5s; }
#matchEnd .me-board { opacity: 0; }
#matchEnd.in .me-board { animation: meFade .8s 1.1s ease both; }
.me-sub { margin-top: 14px; font-size: 12px; letter-spacing: .5px; color: #9fb2ca; opacity: 0; }
#matchEnd.in .me-sub { animation: meFade .8s 1.5s ease both; }
.me-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; opacity: 0; pointer-events: none; }
#matchEnd.in .me-actions { animation: meFade .8s 2s ease both; pointer-events: auto; }
@keyframes meFade { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: none; } }

/* Match-end layout: one centered flex column — nothing can overlap however
   tall the content gets (verdict scales down, column scrolls if it must). */
#matchEnd .me-inner { top: 0; bottom: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; overflow-y: auto; padding: 5vh 20px; }
#matchEnd h1 { font-size: clamp(36px, 6.5vw, 68px); }
#matchEnd .me-score { margin-top: 10px; }
#matchEnd .me-ident { margin-top: 16px; }
#matchEnd .me-board { margin-top: 16px; width: min(560px, 92vw); }

/* ════════════════════════════════════════════════════════════════
   TRICKSHOT SYSTEM — charcoal surfaces, strong type, minimal chrome.
   Small temporary medal panel in regular modes; the Lab gets the full
   diagnostics column; the Final Shot card is the only "big" moment.
   ════════════════════════════════════════════════════════════════ */

/* ── Medal panel (bottom-centre, above the ammo block) ── */
#tsMedal { position: absolute; left: 50%; bottom: 120px; transform: translate(-50%, 14px);
  text-align: center; opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease; z-index: 30; }
#tsMedal.show { opacity: 1; transform: translate(-50%, 0); }
.ts-medal-row { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 7px; }
.ts-chip { font: 700 10px/1 'Inter', sans-serif; letter-spacing: 1.4px; text-transform: uppercase;
  color: #d9e4f2; background: rgba(16, 20, 28, .82); border: 1px solid rgba(146, 160, 186, .28);
  border-bottom: 2px solid #17d8c0; border-radius: 3px; padding: 6px 9px 5px; }
.ts-medal-line { font: 600 13px 'Inter', sans-serif; letter-spacing: .6px; color: #eef4fc;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.ts-medal-line em { font-style: normal; }
.ts-medal-line i { font-style: normal; color: #17d8c0; margin: 0 7px; }
.ts-kf { color: #17d8c0; }

/* ── Live rotation counter (Trickshot Lab only) ── */
#tsCounter { position: absolute; left: 50%; top: 38%; transform: translateX(-50%);
  font: 800 26px 'Inter', sans-serif; letter-spacing: 1px; color: #eaf2ff;
  text-shadow: 0 0 14px rgba(23, 216, 192, .45), 0 2px 10px rgba(0, 0, 0, .7);
  opacity: 0; transition: opacity .12s; pointer-events: none; z-index: 28; }
#tsCounter.show { opacity: .92; }

/* ── Trickshot Lab diagnostics (right column, hideable) ── */
#tsDiag { position: absolute; right: 16px; top: 50%; transform: translate(8px, -50%);
  width: 228px; background: rgba(11, 14, 20, .86); border: 1px solid rgba(146, 160, 186, .2);
  border-left: 2px solid #17d8c0; border-radius: 6px; padding: 10px 12px 12px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 32;
  font-family: 'Inter', sans-serif; }
#tsDiag.show { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.ts-diag-head { display: flex; justify-content: space-between; align-items: center;
  font: 800 10px/1 'Inter', sans-serif; letter-spacing: 2.4px; color: #17d8c0; margin-bottom: 9px; }
.ts-diag-head button { background: none; border: 1px solid rgba(146, 160, 186, .3); color: #9fb2ca;
  width: 20px; height: 20px; border-radius: 3px; cursor: pointer; font-size: 12px; line-height: 1; }
.ts-diag-head button:hover { color: #fff; border-color: #17d8c0; }
.ts-diag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.ts-diag-grid div { background: rgba(255, 255, 255, .03); border-radius: 4px; padding: 6px 8px; }
.ts-diag-grid small { display: block; font-size: 8.5px; letter-spacing: 1.6px; color: #7d8ba1; }
.ts-diag-grid b { font-size: 15px; color: #edf3fb; font-weight: 800; }
.ts-diag-chain { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; min-height: 18px; }
.ts-diag-chain i { font: 700 8.5px/1 'Inter', sans-serif; font-style: normal; letter-spacing: 1px;
  color: #b9c6da; background: rgba(255, 255, 255, .05); border-radius: 2px; padding: 4px 5px; }
.ts-diag-chain i.fire { color: #0b0e14; background: #17d8c0; }
.ts-diag-last { margin-top: 9px; font-size: 11px; color: #dfe8f4; }
.ts-diag-last b { display: block; font-size: 11.5px; }
.ts-diag-last small { display: block; margin-top: 4px; font-size: 9px; color: #7d8ba1; line-height: 1.6; }
.ts-diag-keys { margin-top: 9px; font-size: 9px; letter-spacing: .8px; color: #6d7a90;
  border-top: 1px solid rgba(146, 160, 186, .14); padding-top: 7px; }
#tsDiagChip { position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  display: none; background: rgba(11, 14, 20, .85); border: 1px solid rgba(146, 160, 186, .25);
  border-left: 2px solid #17d8c0; color: #9fb2ca; font: 800 9px/1 'Inter', sans-serif;
  letter-spacing: 2px; padding: 9px 8px; border-radius: 4px; cursor: pointer; z-index: 32; }
#tsDiagChip.show { display: block; }
#tsDiagChip:hover { color: #fff; }

/* ── DXED Final Shot card ── */
#tsFinal { position: fixed; inset: 0; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 9vh; pointer-events: none; opacity: 0; transition: opacity .4s ease; z-index: 1200; }
#tsFinal.show { opacity: 1; }
.ts-final-inner { text-align: center; background: linear-gradient(180deg, rgba(10, 13, 19, .0), rgba(10, 13, 19, .88) 30%);
  padding: 26px 44px 22px; border-radius: 8px; }
.ts-final-brand { font: 300 13px 'Inter', sans-serif; letter-spacing: 7px; color: #9fb2ca; }
.ts-final-brand b { font-weight: 900; color: #17d8c0; letter-spacing: 7px; }
.ts-final-name { font: 900 30px 'Inter', sans-serif; letter-spacing: 1.5px; color: #f2f7ff; margin-top: 7px; }
.ts-final-line { margin-top: 8px; font: 600 14px 'Inter', sans-serif; color: #dfe9f6; }
.ts-final-line em { font-style: normal; }
.ts-final-line i { font-style: normal; color: #17d8c0; margin: 0 8px; }
.ts-final-meta { display: flex; gap: 18px; justify-content: center; margin-top: 10px;
  font: 600 11px 'Inter', sans-serif; letter-spacing: 1.2px; color: #8fa0b8; text-transform: uppercase; }
.ts-final-medals { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }

/* ── Save Clip modal ── */
#tsClip { position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(4, 6, 10, .72); z-index: 1400; }
#tsClip.show { display: flex; }
.ts-clip-card { width: min(520px, 94vw); background: #10141c; border: 1px solid rgba(146, 160, 186, .22);
  border-radius: 8px; overflow: hidden; font-family: 'Inter', sans-serif; }
.ts-clip-head { display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: rgba(255, 255, 255, .03);
  font: 800 11px/1 'Inter', sans-serif; letter-spacing: 3px; color: #17d8c0; }
.ts-clip-head button { background: none; border: 0; color: #8fa0b8; font-size: 14px; cursor: pointer; }
.ts-clip-head button:hover { color: #fff; }
.ts-clip-body { padding: 14px 16px 16px; }
.ts-clip-line { font-size: 12.5px; color: #dfe9f6; margin-bottom: 10px; }
.ts-clip-line em { font-style: normal; }
#tsClipVideo { width: 100%; border-radius: 5px; margin-bottom: 10px; background: #000; max-height: 46vh; }
.ts-clip-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.ts-clip-row label { font-size: 11px; color: #9fb2ca; display: flex; align-items: center; gap: 6px; }
.ts-clip-row input[type="number"] { width: 62px; background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(146, 160, 186, .25); color: #edf3fb; border-radius: 4px; padding: 5px 7px; font-size: 12px; }
.ts-clip-row input[type="text"] { flex: 1; min-width: 200px; background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(146, 160, 186, .25); color: #edf3fb; border-radius: 4px; padding: 8px 10px; font-size: 12.5px; }
.ts-clip-tog { user-select: none; }
.ts-btn { background: rgba(255, 255, 255, .06); border: 1px solid rgba(146, 160, 186, .3);
  color: #dfe8f4; font: 600 11.5px 'Inter', sans-serif; letter-spacing: .5px;
  padding: 9px 14px; border-radius: 4px; cursor: pointer; text-decoration: none; }
.ts-btn:hover { border-color: #17d8c0; color: #fff; }
.ts-btn.accent { background: #17d8c0; border-color: #17d8c0; color: #06231f; font-weight: 800; }
.ts-btn.accent:hover { background: #2ce8d1; color: #06231f; }
.ts-btn:disabled { opacity: .45; cursor: default; }
.ts-clip-note { font-size: 10.5px; color: #7d8ba1; line-height: 1.6; }

/* ── Elimination card — YOUR kill confirm: the player card you equipped
     (banner / emblem / title) stamped on every elimination, with the XP
     the kill actually pays. Sits under the crosshair, above the killcam
     band so the two can never overlap. ── */
#elimCard { position: absolute; left: 50%; bottom: 31%; transform: translate(-50%, 10px) scale(.96);
  width: min(340px, 74vw); opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .22s cubic-bezier(.2, 1.4, .4, 1); z-index: 30; }
#elimCard.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
#elimCard .ec-plate { display: flex; align-items: baseline; gap: 9px; padding: 9px 14px;
  border: 1px solid var(--dxb-dim); border-radius: 3px; overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,.45), inset 0 0 44px rgba(0,0,0,.35); }
#elimCard .ec-emblem { font-size: 15px; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
#elimCard .ec-id b { font-size: 15px; font-weight: 800; letter-spacing: .8px; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.8); }
#elimCard .ec-id i { font-style: normal; font-size: 9px; letter-spacing: 1.5px; color: #c3cfe1;
  text-transform: uppercase; margin-left: 8px; }
#elimCard .ec-lvl { margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: 1.5px; color: #eaf3ff;
  background: rgba(46,155,255,.25); border: 1px solid rgba(46,155,255,.5); border-radius: 2px; padding: 2px 7px; }
#elimCard .ec-line { text-align: center; font-size: 10.5px; letter-spacing: 2.5px; color: #cdd8e6;
  text-transform: uppercase; padding: 7px 0 1px; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
#elimCard .ec-line b { color: #fff; }
#elimCard .ec-line em { font-style: normal; color: #17d8c0; margin-left: 6px; }
#elimCard .ec-xp { text-align: center; font-size: 13px; font-weight: 800; letter-spacing: 2px;
  color: #8ef0c8; text-shadow: 0 0 14px rgba(60,220,150,.45); padding-top: 3px; }
#elimCard .ec-xp s { text-decoration: none; color: #6c7a90; }
#elimCard .ec-xp em { font-style: normal; font-size: 10.5px; font-weight: 700; color: #b9c6da; letter-spacing: 1.2px; }
#elimCard .ec-plate { align-items: center; }
#elimCard .ec-pfp .pfp { vertical-align: -5px; }

/* ── Touch controls (DXTOUCH) — landscape-first control overlay ── */
#touchUI { position: fixed; inset: 0; z-index: 40; pointer-events: none;
  -webkit-user-select: none; user-select: none; font-family: 'Inter', sans-serif; }
#touchUI button { -webkit-tap-highlight-color: transparent; touch-action: none; }
#tcStick { position: absolute; left: max(18px, env(safe-area-inset-left)); bottom: max(20px, env(safe-area-inset-bottom));
  width: 132px; height: 132px; border-radius: 50%; pointer-events: auto; touch-action: none;
  background: radial-gradient(circle, rgba(18,28,44,.42) 0%, rgba(18,28,44,.18) 68%, transparent 72%);
  border: 1px solid rgba(146,160,186,.3); display: none; }
#tcStick.sprint { border-color: #17d8c0; }
#tcNub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(210,225,245,.28); border: 1px solid rgba(210,225,245,.5);
  box-shadow: 0 2px 10px rgba(0,0,0,.4); }
#touchUI .tc-cluster { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  width: 224px; height: 218px; display: none; }
#touchUI .tc-btn { position: absolute; pointer-events: auto; border-radius: 50%;
  background: rgba(14,22,36,.55); border: 1px solid rgba(146,160,186,.4); color: #cfdaea;
  font: 700 10px 'Inter', sans-serif; letter-spacing: 1px; width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
#touchUI .tc-btn.on { background: rgba(23,216,192,.3); border-color: #17d8c0; color: #fff; }
#tcFire { width: 92px; height: 92px; right: 6px; bottom: 6px; font-size: 12px;
  border-color: rgba(240,127,31,.55); color: #ffd9b0; background: rgba(60,30,10,.4); }
#tcFire.on { background: rgba(240,127,31,.45); border-color: #f07f1f; color: #fff; }
#tcAds { right: 112px; bottom: 26px; }
#tcJump { right: 20px; bottom: 112px; }
#tcCrouch { right: 112px; bottom: 96px; width: 50px; height: 50px; }
#tcReload { right: 92px; bottom: 158px; width: 50px; height: 50px; }
#tcSwap { right: 24px; bottom: 178px; width: 50px; height: 50px; }
#tcTac { right: 166px; bottom: 160px; width: 50px; height: 50px; display: none; }
#tcStyle { right: 172px; bottom: 96px; width: 46px; height: 46px; display: none; }
#tcTac.primed { background: rgba(23,216,192,.45); border-color: #17d8c0; color: #04211c; }
#touchUI.combat #tcStick, #touchUI.combat .tc-cluster { display: block; }
#touchUI.ts #tcTac, #touchUI.ts #tcStyle { display: flex; }
#touchUI:not(.combat) #tcTac, #touchUI:not(.combat) #tcStyle { display: none; }
#touchUI .tc-top { position: absolute; top: max(10px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right));
  display: flex; gap: 10px; }
#touchUI .tc-mini { position: static; width: 44px; height: 44px; border-radius: 8px; font-size: 13px; }
#touchUI .tc-wide { position: absolute; left: 50%; bottom: 15%; transform: translateX(-50%);
  pointer-events: auto; display: none; padding: 14px 26px; border-radius: 6px;
  background: rgba(23,216,192,.22); border: 1px solid #17d8c0; color: #eafffb;
  font: 800 13px 'Inter', sans-serif; letter-spacing: 2px; }

/* Touch mode HUD adjustments — keep the stick/cluster corners clear.
   body.touch-mode is stamped by DXTOUCH while the overlay is up. */
body.touch-mode #hudBottom { left: 50%; transform: translateX(-50%); right: auto;
  width: min(520px, 52vw); bottom: max(10px, env(safe-area-inset-bottom)); }
body.touch-mode #tsDiag, body.touch-mode #tsDiagChip {
  right: auto; left: 10px; top: 58%; transform: translate(0, -50%) scale(.82); transform-origin: left center; }
body.touch-mode #tsDiag.show { transform: translate(0, -50%) scale(.82); }
body.touch-mode #killcam { bottom: 34%; }

/* ════════════════════════════════════════════════════════════════
   MOBILE LAYER — the whole arena UI fits any phone screen, portrait
   AND landscape, with no horizontal overflow. Three tiers:
     · phones (either orientation): ≤760px wide OR ≤500px tall
     · portrait refinements:  (max-width: 760px) and (orientation: portrait)
     · landscape refinements: (max-height: 500px) and (orientation: landscape)
   Everything scrolls INSIDE its own panel; the page never pans.
   ════════════════════════════════════════════════════════════════ */

/* ── Shared phone rules (both orientations) ── */
@media (max-width: 760px), (max-height: 500px) {
  .scr { padding: 10px 10px calc(12px + env(safe-area-inset-bottom)); }
  .scr.menu2 { height: 100dvh; padding: 0; }
  /* menu chrome slims down; keyboard hints are meaningless on touch */
  .m2-top { padding: 6px max(12px, env(safe-area-inset-left)); gap: 10px; }
  .m2-logo { font-size: 13px; letter-spacing: 2.5px; }
  .m2-net { display: none; }
  .m2-prof-t span { display: none; }
  .m2-keys { display: none; }
  .m2-foot { padding: 5px max(12px, env(safe-area-inset-left)) max(5px, env(safe-area-inset-bottom)); }
  .m2-body { padding: 6px 12px 6px; gap: 8px; }
  /* the content panel owns the full width once the rail is a tab bar */
  .m2-panel { width: auto; flex: 1 1 auto; max-width: none; padding: 4px 2px 16px; }
  .m2-panel h2 { font-size: 17px; letter-spacing: 2.5px; }
  .m2-fx::after { display: none; }
  .m2-gate { bottom: 8vh; padding: 12px 16px; font-size: 12px; }

  /* pause / settings — full screen sheet */
  .pm-wrap { width: 100dvw; height: 100dvh; border-radius: 0; border: none; }
  .pm-panel { padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); }
  .pm-row { gap: 10px; padding-right: 2px; }
  .pm-row input[type=range] { width: min(150px, 34vw); }
  .pm-corner { display: none; }

  /* scoreboard fits the viewport, always */
  #scoreboard { min-width: 0; width: min(94vw, 480px); padding: 14px 12px; max-height: 86dvh; overflow: auto; }
  #scoreboard table { font-size: 12px; }
  #scoreboard th, #scoreboard td { padding: 6px 5px; }

  /* match end + verdict overlay */
  #matchEnd .me-prow { font-size: 12px; }
  #meVerdict { font-size: clamp(34px, 9vw, 56px) !important; }

  /* killcam + elimination cards scale to the short side */
  #killcam { width: min(400px, 88vw); }
  #elimCard { width: min(320px, 80vw); }
}

/* ── Portrait phones: single column everywhere ── */
@media (max-width: 760px) and (orientation: portrait) {
  /* pause menu: rail becomes a horizontally-scrolling chip strip on top */
  .pm-wrap { flex-direction: column; }
  .pm-rail { width: auto; flex-direction: row; align-items: center; gap: 6px;
    padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top));
    overflow-x: auto; border-right: 0; border-bottom: 1px solid rgba(60,130,220,.18);
    scrollbar-width: none; }
  .pm-rail::-webkit-scrollbar { display: none; }
  .pm-brand { display: none; }
  .pm-tabs { flex-direction: row; gap: 6px; }
  .pm-item { white-space: nowrap; padding: 9px 11px; }
  .pm-item.on { box-shadow: inset 0 -2px 0 #2e9bff; }
  .pm-resume { margin-bottom: 0; }
  .pm-spacer { display: none; }
  .pm-foot { display: none; }

  /* match intro: the side briefing panel makes no sense at 390px wide —
     the countdown + deploy strip carry the moment */
  #matchIntro .mi-brief { display: none; }
  #matchIntro .mi-deploy { width: min(320px, 86vw); left: 50%; transform: translateX(-50%); }
  #matchIntro .mi-classRow { grid-template-columns: repeat(2, 1fr); }

  /* verdict board rows tighten up */
  #matchEnd .me-prow { gap: 6px; }
  #matchEnd .me-prow span:nth-child(3) { display: none; }   /* LEVEL column */

  /* leaderboard table drops its least-important columns */
  .m2-lb th:nth-child(n+5), .m2-lb td:nth-child(n+5) { display: none; }
}

/* ── Landscape phones: compress vertical chrome, keep two panes ── */
@media (max-height: 500px) and (orientation: landscape) {
  .m2-top { padding: 4px max(12px, env(safe-area-inset-left)); }
  .m2-body { padding: 4px 12px; }
  .m2-rail { padding: 4px 8px 4px 0; }
  .m2-item { padding: 5px 8px; }
  .m2-item .tx { font-size: 10px; letter-spacing: 1.2px; }
  .m2-item .tx small { display: none; }
  .m2-panel { padding-bottom: 10px; }
  .m2-foot { display: none; }

  /* pause menu: keep the side rail but slim it; panel scrolls */
  .pm-rail { width: 168px; padding: 10px 8px; padding-left: max(8px, env(safe-area-inset-left)); }
  .pm-brand { font-size: 13px; padding: 0 8px 8px; }
  .pm-brand em { display: none; }
  .pm-item { padding: 7px 9px; font-size: 12px; }
  .pm-foot { display: none; }

  /* match intro panels shrink into the short frame */
  #matchIntro .mi-brief { width: min(240px, 34vw); }
  #matchIntro .mi-deploy { width: min(240px, 34vw); }
  #matchIntro .mi-classes { bottom: 3vh; }
  #matchIntro .mi-count { transform: translateX(-50%) scale(.6); }
  #matchIntro.p-count .mi-count { transform: translateX(-50%) scale(.68); }

  /* in-game top HUD pulls in from the edges of the notch */
  #hudBanner { top: calc(64px + var(--hud-safe)); font-size: 11px; }
  #tacmap { width: 108px; height: 108px; }
  #streakPips { top: 128px; }
  body.touch-mode #tsDiag, body.touch-mode #tsDiagChip { transform: translate(0, -50%) scale(.7); }
}

/* Very narrow portrait (≤420px): the touch cluster + stick shrink so both
   corners fit beside the centered HUD. */
@media (max-width: 420px) and (orientation: portrait) {
  #tcStick { width: 112px; height: 112px; }
  #tcNub { width: 46px; height: 46px; }
  #touchUI .tc-cluster { transform: scale(.86); transform-origin: bottom right; }
  body.touch-mode #hudBottom { width: min(420px, 62vw); }
  #hudAmmo .ammo-nums b { font-size: 26px; }
}

/* Tablet / narrow window: once the rail is a tab bar (≤900px), the content
   panel owns the full width — the 46vw desktop cap no longer applies. */
@media (max-width: 900px) {
  .m2-panel { width: auto; max-width: none; flex: 1 1 auto; }
}

/* Intrinsic-width containment: a horizontal scroll strip must never inflate
   its ancestors to the strip's content width (that's what pushed the whole
   panel to 1600px+ on phones). contain:inline-size zeroes the contribution;
   the max-width clamps are the belt for engines without it. */
@media (max-width: 900px) {
  .m2-body { max-width: 100%; overflow-x: hidden; }
  .m2-panel { max-width: 100%; overflow-x: hidden; }
  .m2-rail { contain: inline-size; max-width: 100%; }
}
@media (max-width: 760px) and (orientation: portrait) {
  .pm-rail { contain: inline-size; max-width: 100%; }
  .pm-wrap { max-width: 100dvw; }
  .pm-panel { max-width: 100%; overflow-x: hidden; }
}

/* ── Portrait phones IN-MATCH: HUD arranged around the touch controls ── */
@media (max-width: 760px) and (orientation: portrait) {
  /* score plate stays clear of the pause/scores buttons */
  #hudScore { font-size: 16px; gap: 8px; padding: 5px 12px 7px;
    max-width: calc(100vw - 128px); left: calc(50% - 46px); }
  #hudScore em { font-size: 8px; letter-spacing: 1px; }
  #touchUI .tc-mini { width: 38px; height: 38px; }

  /* health + ammo rise ABOVE the stick/cluster zone (mobile-shooter row) */
  body.touch-mode #hudBottom { width: min(340px, 92vw);
    bottom: calc(226px + env(safe-area-inset-bottom)); }
  body.touch-mode #hudBottom #hudHealth, body.touch-mode #hudBottom #hudAmmo { transform: scale(.9); }
  #hudAmmo .ammo-nums b { font-size: 24px; }

  /* Lab diagnostics shrink into the top-left, under the streak pips */
  body.touch-mode #tsDiag, body.touch-mode #tsDiagChip {
    left: 6px; top: auto; bottom: auto; transform: none;
    transform-origin: top left; }
  body.touch-mode #tsDiag { top: 176px; transform: scale(.6); }
  body.touch-mode #tsDiag.show { transform: scale(.6); }
  body.touch-mode #tsDiagChip { top: 176px; }
  /* smaller minimap keeps the corner airy */
  #tacmap { width: 104px; height: 104px; }
  #streakPips { top: 124px; }

  /* killcam + elimination card sit above the (hidden-when-dead) controls */
  #killcam { bottom: 30%; }
  #elimCard { bottom: 44%; }
}
/* Portrait scoreboard: compact columns so every stat fits 390px */
@media (max-width: 760px) and (orientation: portrait) {
  #scoreboard { padding: 12px 8px; }
  #scoreboard h3 { font-size: 11px; letter-spacing: 1.5px; }
  #scoreboard .sb-sub { font-size: 8px; }
  #scoreboard table { font-size: 11.5px; }
  #scoreboard th, #scoreboard td { padding: 6px 4px; }
  #scoreboard .sb-title { display: none; }
  #scoreboard .sb-lvl { display: none; }
}
