/* ============================================================
   BOMBER 32 — neon arena UI
   ============================================================ */

@font-face {
  font-family: "Russo One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("russo-one-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Russo One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("russo-one-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-02BA, U+2000-206F, U+2122, U+2191, U+2193, U+2212;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("manrope-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("manrope-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-02BA, U+2000-206F, U+2122, U+2191, U+2193, U+2212;
}

*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --bg: #080b0d;
  --bg-2: #0b1012;
  --panel: rgba(16, 23, 26, .88);
  --panel-solid: #10171a;
  --panel-2: #141d20;
  --line: rgba(239, 244, 229, .085);
  --line-strong: rgba(239, 244, 229, .16);
  --text: #f4f3e9;
  --muted: #89969a;
  --muted-2: #5f6c70;
  --acid: #d8f65a;
  --acid-soft: rgba(216, 246, 90, .14);
  --orange: #ff7a2f;
  --orange-soft: rgba(255, 122, 47, .14);
  --red: #ff5f57;
  --cyan: #78e8d9;
  --gold: #ffd35a;
  --font-display: "Russo One", "Arial Black", system-ui, sans-serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  min-height: 100%;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(216, 246, 90, .075), transparent 60%),
    radial-gradient(900px 600px at -12% 100%, rgba(255, 122, 47, .09), transparent 58%),
    linear-gradient(160deg, #0a0e10 0%, #070a0c 55%, #090d0f 100%);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .32;
  background-image:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 74%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 74%);
}

[hidden] { display: none !important; }

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1em;
  height: 1em;
  display: block;
  fill: currentColor;
}

#app {
  width: 100%;
  max-width: 1460px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding: 14px 18px;
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr) 30px;
  gap: 11px;
}

/* ============================================================
   TOP BAR
   ============================================================ */

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #101507;
  background: linear-gradient(145deg, var(--acid), #b7d936);
  box-shadow: 0 8px 26px rgba(216, 246, 90, .15), inset 0 1px 0 rgba(255, 255, 255, .45);
  transform: rotate(-3deg);
}
.brand-mark .icon { width: 25px; height: 25px; }

.brand-copy { min-width: 0; }
.brand-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  letter-spacing: .2px;
  white-space: nowrap;
}
.brand-copy h1 span { color: var(--acid); }
.brand-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.session-clock {
  width: 190px;
  padding: 6px 14px 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(22, 31, 34, .94), rgba(13, 19, 21, .94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  text-align: center;
}
.clock-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 1px;
}
.clock-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.4px;
}
.clock-id {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .4px;
}
.live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid);
  animation: livePulse 1.8s ease-in-out infinite;
}
.clock-value {
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.12;
  letter-spacing: 1.4px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.clock-value.urgent { color: var(--orange); }
.clock-track {
  height: 2px;
  margin-top: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, .08);
}
.clock-track i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--acid), var(--orange));
  transform-origin: left;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px 10px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(18, 25, 28, .74);
}
.player-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  color: #12170a;
  background: var(--acid);
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
}
.player-chip-copy { min-width: 0; }
.player-chip-copy small {
  display: block;
  color: var(--muted-2);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.1px;
}
.player-chip-copy b {
  display: block;
  max-width: 96px;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(18, 25, 28, .74);
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .1s ease;
}
.icon-btn .icon { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--panel-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.is-off { color: var(--muted-2); opacity: .7; }

/* ============================================================
   LAYOUT
   ============================================================ */

.layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 11px;
}

.arena-card {
  min-width: 0;
  min-height: 0;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(100% 100% at 50% 0%, rgba(216, 246, 90, .035), transparent 55%),
    linear-gradient(180deg, rgba(17, 24, 27, .96), rgba(10, 15, 17, .96));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .03);
  overflow: hidden;
}

.arena-bar {
  height: 18px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
.arena-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--acid);
}
.arena-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}
.arena-map { color: var(--muted-2); }
.arena-count {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  letter-spacing: .7px;
}
.arena-count .icon { width: 11px; height: 11px; color: var(--muted-2); }
.arena-count b { color: var(--text); }

.canvas-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 12px;
  background: #091012;
  isolation: isolate;
  cursor: crosshair;
}
#arena {
  display: block;
  width: 100%;
  height: 100%;
}
.canvas-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 70px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .035);
  background:
    linear-gradient(180deg, rgba(3, 7, 8, .34), transparent 16%, transparent 82%, rgba(3, 7, 8, .32)),
    radial-gradient(130% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, .28));
}

.player-stats {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, 1fr);
  gap: 5px;
}
.pstat {
  min-width: 0;
  height: 48px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .022);
}
.pstat-icon {
  width: 23px;
  height: 23px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--acid);
  background: var(--acid-soft);
}
.pstat-icon .icon { width: 14px; height: 14px; }
.pstat-hp .pstat-icon { color: var(--red); background: rgba(255, 95, 87, .1); }
.pstat:nth-child(3) .pstat-icon { color: var(--orange); background: var(--orange-soft); }
.pstat:nth-child(4) .pstat-icon { color: var(--cyan); background: rgba(120, 232, 217, .11); }
.pstat-frags .pstat-icon { color: var(--gold); background: rgba(255, 211, 90, .1); }
.pstat-copy { min-width: 0; display: flex; align-items: baseline; gap: 4px; }
.pstat-copy b {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pstat-copy small {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pstat-frags { background: linear-gradient(110deg, rgba(255, 211, 90, .075), rgba(255, 255, 255, .018)); }
.pstat-frags .pstat-copy b { color: var(--gold); }

.hp-pips { display: none; gap: 2px; margin-left: auto; }
.hp-pips i {
  width: 4px;
  height: 12px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .1);
}
.hp-pips i.on { background: var(--red); box-shadow: 0 0 7px rgba(255, 95, 87, .45); }

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(19, 27, 30, .9), rgba(12, 18, 20, .92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.board-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 13px 10px 8px;
  overflow: hidden;
}
.panel-head {
  padding: 0 4px 9px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.panel-head-small { padding-bottom: 7px; }
.panel-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--muted-2);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.2px;
}
.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .8px;
}
.panel-pill {
  padding: 3px 7px;
  border: 1px solid rgba(216, 246, 90, .2);
  border-radius: 5px;
  color: var(--acid);
  background: rgba(216, 246, 90, .06);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .9px;
}

.board-cols {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 28px;
  gap: 5px;
  padding: 0 8px 5px;
  color: var(--muted-2);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .7px;
  border-bottom: 1px solid var(--line);
}
.board-cols span:last-child { text-align: right; }

.leaderboard {
  min-height: 0;
  margin: 0;
  padding: 3px 0 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .14) transparent;
}
.leaderboard::-webkit-scrollbar { width: 3px; }
.leaderboard::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 3px; }

.lb-row {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 3px 8px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 10px;
  transition: background .25s ease;
}
.lb-row:nth-child(odd) { background: rgba(255, 255, 255, .016); }
.lb-row.me {
  color: var(--text);
  background: linear-gradient(90deg, rgba(216, 246, 90, .13), rgba(216, 246, 90, .02));
  box-shadow: inset 2px 0 0 var(--acid);
}
.lb-rank {
  color: var(--muted-2);
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: .4px;
}
.lb-row:nth-child(1) .lb-rank { color: var(--gold); }
.lb-row:nth-child(2) .lb-rank { color: #d8e1e3; }
.lb-row:nth-child(3) .lb-rank { color: #d39664; }
.lb-who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lb-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 2px;
  background: var(--c, #888);
  box-shadow: 0 0 6px color-mix(in srgb, var(--c, #888) 55%, transparent);
}
.lb-name {
  overflow: hidden;
  font-weight: 700;
  letter-spacing: .1px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-row.dead .lb-name { opacity: .45; }
.lb-row.dead .lb-dot { filter: grayscale(1); opacity: .4; }
.lb-frags {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.lb-row.me .lb-frags { color: var(--acid); }

.board-me {
  margin-top: 5px;
  padding: 7px 7px 3px;
  border-top: 1px solid var(--line);
}
.board-me .lb-row { background: rgba(216, 246, 90, .08); }

.feed-panel {
  flex: none;
  height: 133px;
  padding: 10px 11px 7px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.feed-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--orange);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1px;
}
.feed-live i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
.killfeed {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  list-style: none;
}
.killfeed li {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 2px 4px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  animation: feedIn .25s ease both;
}
.killfeed li.mine { color: var(--text); background: rgba(216, 246, 90, .055); }
.killfeed .killer, .killfeed .victim {
  overflow: hidden;
  max-width: 88px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.killfeed .killer { color: var(--text); font-weight: 800; }
.killfeed .boom { color: var(--orange); }
.feed-empty {
  margin: auto;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
}

.tip-strip {
  flex: none;
  padding: 9px 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px dashed rgba(255, 255, 255, .1);
  border-radius: 11px;
  background: rgba(255, 255, 255, .016);
}
.tip-strip > span {
  flex: none;
  padding-top: 1px;
  color: var(--orange);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1px;
}
.tip-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.45;
}

/* ============================================================
   FOOTER / TOUCH
   ============================================================ */

.footbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
}
.desktop-controls { display: flex; align-items: center; gap: 17px; }
.desktop-controls span { display: inline-flex; align-items: center; gap: 4px; }
kbd {
  min-width: 19px;
  padding: 2px 4px;
  display: inline-flex;
  justify-content: center;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
  background: rgba(255, 255, 255, .035);
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .3px;
}
.foot-meta { display: flex; align-items: center; gap: 18px; letter-spacing: .4px; }
.foot-meta span { display: inline-flex; align-items: center; gap: 5px; }
.foot-meta b { color: var(--muted); font-weight: 700; }
#foot-status { color: var(--acid); }
#foot-status.paused { color: var(--orange); }
#foot-status.paused .live-dot { background: var(--orange); box-shadow: 0 0 8px var(--orange); animation: none; }

.touch-controls { display: none; }

/* ============================================================
   IN-CANVAS HUD
   ============================================================ */

.countdown {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: radial-gradient(circle, rgba(8, 12, 13, .42), rgba(8, 12, 13, .8));
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  pointer-events: none;
}
.countdown span {
  font-family: var(--font-display);
  font-size: clamp(68px, 12vw, 130px);
  line-height: .95;
  color: var(--acid);
  text-shadow: 0 0 44px rgba(216, 246, 90, .38);
  animation: countPop .55s cubic-bezier(.2, 1.7, .5, 1) both;
}
.countdown small {
  color: var(--text);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 3px;
  opacity: .8;
}

.game-toast {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 7;
  padding: 7px 12px;
  border: 1px solid rgba(216, 246, 90, .26);
  border-radius: 7px;
  color: var(--text);
  background: rgba(9, 14, 15, .9);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .4);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .3px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.game-toast.show { opacity: 1; transform: translate(-50%, 0); }
.game-toast.acid { color: var(--acid); border-color: rgba(216, 246, 90, .35); }
.game-toast.danger { color: #ffb0ac; border-color: rgba(255, 95, 87, .35); }

.respawn-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: 156px;
  padding: 13px 12px 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 1px solid rgba(255, 95, 87, .28);
  border-radius: 11px;
  background: rgba(11, 15, 17, .9);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.respawn-label { color: var(--red); font-size: 7px; font-weight: 800; letter-spacing: 1.6px; }
.respawn-card b { font-family: var(--font-display); font-size: 29px; font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }
.respawn-hint { color: var(--muted-2); font-size: 7px; font-weight: 700; letter-spacing: .4px; }

.hitflash {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, transparent 35%, rgba(255, 47, 38, .42) 100%);
  box-shadow: inset 0 0 80px rgba(255, 51, 40, .65);
}
.hitflash.on { animation: hitFlash .42s ease-out; }

/* ============================================================
   MENU SCREEN
   ============================================================ */

.screen {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.menu-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 28px 24px 58px;
  background:
    radial-gradient(900px 560px at 16% 10%, rgba(216, 246, 90, .08), transparent 60%),
    radial-gradient(700px 500px at 90% 85%, rgba(255, 122, 47, .1), transparent 60%),
    rgba(6, 9, 10, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.menu-aura {
  position: fixed;
  width: 560px;
  height: 560px;
  top: -260px;
  left: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 246, 90, .12), transparent 64%);
  pointer-events: none;
  filter: blur(10px);
  animation: auraDrift 12s ease-in-out infinite alternate;
}
.menu-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 68%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 68%);
}

.menu-inner {
  position: relative;
  z-index: 1;
  width: min(1030px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(320px, .86fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
}

.menu-hero { min-width: 0; }
.menu-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  padding: 6px 9px;
  border: 1px solid rgba(216, 246, 90, .19);
  border-radius: 5px;
  color: var(--acid);
  background: rgba(216, 246, 90, .045);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.6px;
}
.menu-eyebrow i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 7px var(--acid);
}
.menu-logo { display: flex; align-items: center; gap: 18px; }
.menu-bomb {
  position: relative;
  width: 64px;
  height: 64px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #111607;
  background: linear-gradient(145deg, var(--acid), #b4d738);
  box-shadow: 0 14px 46px rgba(216, 246, 90, .18), inset 0 1px 0 rgba(255, 255, 255, .5);
  transform: rotate(-5deg);
  animation: bombFloat 4.2s ease-in-out infinite;
}
.menu-bomb .icon { width: 38px; height: 38px; }
.menu-bomb .spark {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 14px var(--acid);
  animation: sparkBlink 1.4s ease-in-out infinite;
}
.menu-logo h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(49px, 6.6vw, 91px);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.025em;
  white-space: nowrap;
}
.menu-logo h2 span {
  margin-left: .02em;
  color: var(--acid);
  text-shadow: 0 0 42px rgba(216, 246, 90, .18);
}
.menu-tagline {
  margin: 21px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.45vw, 18px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .1px;
}
.menu-tagline b { color: var(--text); font-weight: 800; }
.menu-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.menu-tags span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: rgba(255, 255, 255, .022);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .9px;
}

.lobby-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 29px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.lobby-avatars { display: flex; padding-left: 2px; }
.lobby-avatars i {
  width: 23px;
  height: 23px;
  margin-left: -5px;
  border: 2px solid #0b0f11;
  border-radius: 7px;
  background: var(--c, #555);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06);
}
.lobby-avatars i:first-child { margin-left: 0; }
.lobby-row p { margin: 0; color: var(--muted-2); font-size: 9px; font-weight: 600; letter-spacing: .2px; }
.lobby-row b { color: var(--text); font-weight: 800; }

.menu-panel {
  position: relative;
  padding: 21px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 19px;
  background:
    linear-gradient(155deg, rgba(24, 33, 36, .94), rgba(12, 18, 20, .97));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.menu-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(216, 246, 90, .11), transparent 34%);
  mask-image: linear-gradient(#000, transparent 42%);
  -webkit-mask-image: linear-gradient(#000, transparent 42%);
}
.briefing-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}
.briefing-head span {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.6px;
}
.briefing-head b {
  color: var(--acid);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1px;
}

.rules { position: relative; margin: 0; padding: 9px 0 5px; list-style: none; }
.rules li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
}
.rule-ico {
  width: 29px;
  height: 29px;
  flex: none;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 8px;
  color: var(--orange);
  background: rgba(255, 255, 255, .025);
}
.rule-ico .icon { width: 14px; height: 14px; }
.rules li:first-child .rule-ico { color: var(--red); }
.rules li:last-child .rule-ico { color: var(--gold); }
.rules p { margin: 0; min-width: 0; }
.rules b { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 800; }
.rules small { display: block; color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.35; }

.nickname-field {
  position: relative;
  display: block;
  margin-top: 9px;
}
.nickname-field > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted-2);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.2px;
}
.nickname-field input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(6, 10, 11, .47);
  font-size: 12px;
  font-weight: 700;
  transition: border-color .15s ease, background .15s ease;
}
.nickname-field input::placeholder { color: var(--muted-2); }
.nickname-field input:focus { border-color: rgba(216, 246, 90, .42); background: rgba(6, 10, 11, .7); outline: none; }

.play-btn {
  position: relative;
  width: 100%;
  height: 49px;
  margin-top: 11px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  color: #101507;
  background: linear-gradient(100deg, var(--acid), #c5e445);
  box-shadow: 0 12px 34px rgba(216, 246, 90, .13), inset 0 1px 0 rgba(255, 255, 255, .46);
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.play-btn::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -70%;
  width: 38%;
  height: 210%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .33), transparent);
  transform: skewX(-18deg);
  animation: btnShine 3.8s ease-in-out infinite;
}
.play-btn .icon { width: 19px; height: 19px; }
.play-btn:hover { filter: brightness(1.045); box-shadow: 0 16px 42px rgba(216, 246, 90, .2), inset 0 1px 0 rgba(255, 255, 255, .46); }
.play-btn:active { transform: scale(.985); }
.menu-note {
  margin: 9px 0 0;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  letter-spacing: .2px;
}

.menu-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  min-height: 43px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, .055);
  color: var(--muted-2);
  background: rgba(6, 9, 10, .35);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .2px;
}
.menu-footer span { display: inline-flex; align-items: center; gap: 4px; }
.menu-version { margin-left: auto; letter-spacing: 1px; opacity: .8; }

/* ============================================================
   MODALS
   ============================================================ */

.modal-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(5, 8, 9, .74);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.modal-card {
  width: min(390px, 100%);
  max-height: calc(100dvh - 44px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 19px;
  background:
    radial-gradient(100% 80% at 50% 0%, rgba(216, 246, 90, .06), transparent 58%),
    linear-gradient(180deg, #172023, #0e1416);
  box-shadow: 0 34px 100px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .04);
  text-align: center;
  animation: modalIn .3s cubic-bezier(.2, 1.1, .4, 1) both;
}
.modal-kicker {
  display: block;
  color: var(--orange);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.7px;
}
.modal-card h2 {
  margin: 8px 0 8px;
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.01em;
}
.pause-card h2 { margin-bottom: 9px; }
.modal-copy {
  margin: 0 auto;
  max-width: 270px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.pause-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 18px 0 4px;
}
.pause-stats div {
  padding: 10px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .02);
}
.pause-stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.pause-stats small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 7px; font-weight: 700; letter-spacing: .4px; }
.pause-card .play-btn { margin-top: 15px; }
.ghost-btn {
  width: 100%;
  height: 36px;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.ghost-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, .025); }

.results-card { width: min(430px, 100%); text-align: left; }
.results-card h2 { margin: 9px 0 0; font-size: 38px; }
.results-card h2 span { color: var(--acid); }
.winner-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 9px;
  padding: 10px;
  border: 1px solid rgba(255, 211, 90, .2);
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(255, 211, 90, .1), rgba(255, 211, 90, .02));
}
.winner-crown {
  width: 31px;
  height: 31px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--gold);
  background: rgba(255, 211, 90, .1);
}
.winner-crown .icon { width: 17px; height: 17px; }
.winner-line div { min-width: 0; }
.winner-line small { display: block; color: var(--muted-2); font-size: 6px; font-weight: 800; letter-spacing: 1px; }
.winner-line b {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.winner-line strong {
  margin-left: auto;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
}
.results-list { margin: 0; padding: 0; list-style: none; }
.results-list li {
  display: grid;
  grid-template-columns: 25px 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .045);
  color: var(--muted);
  font-size: 10px;
}
.results-list li:first-child { border-top: 1px solid rgba(255, 255, 255, .045); }
.results-list .pos { color: var(--muted-2); font-family: var(--font-display); font-size: 9px; }
.results-list .who { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.results-list .who i { width: 6px; height: 6px; margin-right: 6px; display: inline-block; border-radius: 2px; background: var(--c); }
.results-list .fr { color: var(--text); font-family: var(--font-display); font-size: 10px; }
.results-list li.me { background: rgba(216, 246, 90, .075); color: var(--text); }
.your-result {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px dashed rgba(216, 246, 90, .28);
  border-radius: 8px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .5px;
}
.your-result b { color: var(--acid); font-family: var(--font-display); font-size: 14px; font-weight: 400; }
.your-result strong { margin-left: auto; color: var(--muted); font-size: 9px; font-weight: 600; }
.your-result strong span { color: var(--text); }
.results-card .play-btn { margin-top: 12px; }
.auto-note { margin: 8px 0 0; color: var(--muted-2); font-size: 8px; text-align: center; }
.auto-note b { color: var(--muted); }

/* ============================================================
   TOAST
   ============================================================ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 52px;
  z-index: 200;
  max-width: 88vw;
  padding: 8px 15px;
  border: 1px solid rgba(216, 246, 90, .22);
  border-radius: 8px;
  color: var(--text);
  background: rgba(10, 15, 16, .95);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.82); }
}
@keyframes countPop {
  0% { opacity: 0; transform: scale(1.7); filter: blur(5px); }
  45% { opacity: 1; }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}
@keyframes hitFlash {
  0% { opacity: 0; }
  15% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes feedIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
@keyframes auraDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(110px, 70px, 0) scale(1.16); }
}
@keyframes bombFloat {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50% { transform: rotate(-1deg) translateY(-6px); }
}
@keyframes sparkBlink {
  0%, 100% { opacity: .5; transform: scale(.7); }
  50% { opacity: 1; transform: scale(1.2); }
}
@keyframes btnShine {
  0%, 62% { left: -70%; }
  100% { left: 135%; }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE — TABLET / MOBILE
   ============================================================ */

@media (max-width: 1120px) {
  .layout { grid-template-columns: minmax(0, 1fr) 278px; }
  .player-chip-copy { display: none; }
  .player-chip { padding-right: 5px; }
  .menu-inner { gap: 34px; }
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  body { overflow: hidden; }
  #app {
    padding: calc(8px + env(safe-area-inset-top)) 8px calc(7px + env(safe-area-inset-bottom));
    grid-template-rows: 48px minmax(0, 1fr) auto;
    gap: 7px;
  }
  .topbar { grid-template-columns: auto 1fr auto; gap: 7px; }
  .brand { gap: 8px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 10px; }
  .brand-mark .icon { width: 21px; height: 21px; }
  .brand-copy h1 { font-size: 17px; }
  .brand-copy p { font-size: 6.5px; letter-spacing: .9px; margin-top: 3px; }
  .session-clock {
    justify-self: center;
    width: 132px;
    padding: 4px 9px 6px;
    border-radius: 10px;
  }
  .clock-state { font-size: 6.5px; letter-spacing: 1px; }
  .clock-id { font-size: 6.5px; }
  .clock-value { font-size: 17px; letter-spacing: .8px; }
  .top-actions { gap: 5px; }
  .player-chip { display: none; }
  .icon-btn { width: 32px; height: 32px; border-radius: 9px; }
  .icon-btn .icon { width: 15px; height: 15px; }

  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 7px;
  }
  .arena-card {
    padding: 6px;
    gap: 5px;
    border-radius: 14px;
  }
  .arena-bar { height: 15px; padding: 0 2px; font-size: 7px; letter-spacing: 1px; }
  .arena-map { display: none; }
  .arena-count .icon { width: 10px; height: 10px; }

  .canvas-frame {
    flex: none;
    width: 100%;
    aspect-ratio: 25 / 17;
    min-height: 0;
    border-radius: 9px;
  }
  .player-stats { grid-template-columns: 1.2fr repeat(4, 1fr); gap: 4px; }
  .pstat { height: 42px; padding: 0 6px; gap: 5px; border-radius: 8px; }
  .pstat-icon { width: 19px; height: 19px; border-radius: 5px; }
  .pstat-icon .icon { width: 12px; height: 12px; }
  .pstat-copy { display: block; }
  .pstat-copy b { display: block; font-size: 14px; }
  .pstat-copy small { display: block; margin-top: 1px; font-size: 6.5px; letter-spacing: .3px; }
  .hp-pips { display: flex; position: absolute; opacity: 0; }
  .pstat-hp { position: relative; }

  .sidebar { min-height: 0; }
  .feed-panel, .tip-strip { display: none; }
  .board-panel { padding: 8px 8px 5px; border-radius: 12px; min-height: 0; }
  .panel-head { padding: 0 3px 5px; }
  .panel-kicker { font-size: 6px; margin-bottom: 2px; }
  .panel-head h2 { font-size: 11px; letter-spacing: .4px; }
  .panel-pill { font-size: 6px; padding: 2px 5px; }
  .board-cols { padding: 0 6px 3px; font-size: 6px; grid-template-columns: 20px minmax(0, 1fr) 24px; }
  .lb-row { grid-template-columns: 20px minmax(0, 1fr) 24px; min-height: 22px; padding: 2px 6px; font-size: 9px; }
  .lb-rank { font-size: 8px; }
  .lb-frags { font-size: 10px; }
  .lb-dot { width: 6px; height: 6px; }

  .footbar {
    min-height: 112px;
    padding: 3px 5px 0;
    display: block;
  }
  .desktop-controls, .foot-meta { display: none; }
  .touch-controls {
    height: 109px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }
  .joystick {
    position: relative;
    width: 104px;
    height: 104px;
    flex: none;
    border-radius: 50%;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }
  .joystick-base {
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    background:
      radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .045), transparent 58%),
      rgba(16, 23, 26, .55);
    box-shadow: inset 0 0 24px rgba(0, 0, 0, .3);
  }
  .joystick::before {
    content: "";
    position: absolute;
    inset: 17px;
    border: 1px dashed rgba(255, 255, 255, .05);
    border-radius: 50%;
  }
  .joystick-arrows span {
    position: absolute;
    width: 0;
    height: 0;
    opacity: .3;
  }
  .joystick-arrows .up { top: 12px; left: 50%; margin-left: -4px; border-right: 4px solid transparent; border-bottom: 6px solid var(--text); border-left: 4px solid transparent; }
  .joystick-arrows .down { bottom: 12px; left: 50%; margin-left: -4px; border-top: 6px solid var(--text); border-right: 4px solid transparent; border-left: 4px solid transparent; }
  .joystick-arrows .left { top: 50%; left: 12px; margin-top: -4px; border-top: 4px solid transparent; border-right: 6px solid var(--text); border-bottom: 4px solid transparent; }
  .joystick-arrows .right { top: 50%; right: 12px; margin-top: -4px; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid var(--text); }
  .joystick-stick {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    background: radial-gradient(circle at 40% 32%, #273337, #131a1d);
    box-shadow: 0 7px 18px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .09);
    transform: translate(-50%, -50%);
    transition: transform .1s ease-out;
    pointer-events: none;
  }
  .touch-bomb-wrap { display: flex; align-items: center; justify-content: flex-end; width: 118px; }
  .bomb-btn {
    position: relative;
    width: 88px;
    height: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 50%;
    color: #101507;
    background:
      radial-gradient(circle at 40% 28%, #e5ff7a, #d5f057 38%, #b0cf39 100%);
    box-shadow: 0 10px 28px rgba(216, 246, 90, .16), 0 0 0 6px rgba(216, 246, 90, .06), inset 0 2px 0 rgba(255, 255, 255, .44);
    cursor: pointer;
    touch-action: manipulation;
    transition: transform .09s ease;
  }
  .bomb-btn::after {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px dashed rgba(16, 21, 7, .22);
    border-radius: 50%;
    pointer-events: none;
  }
  .bomb-btn .icon { width: 29px; height: 29px; }
  .bomb-btn span { font-family: var(--font-display); font-size: 8px; letter-spacing: 1px; }
  .bomb-btn:active { transform: scale(.93); }
  .bomb-btn.cooling { opacity: .45; }

  .menu-screen { padding: 22px 16px 54px; align-items: flex-start; }
  .menu-inner { grid-template-columns: 1fr; gap: 23px; width: min(450px, 100%); margin: auto 0; }
  .menu-eyebrow { margin-bottom: 13px; font-size: 7px; }
  .menu-logo { gap: 11px; }
  .menu-bomb { width: 46px; height: 46px; border-radius: 13px; }
  .menu-bomb .icon { width: 28px; height: 28px; }
  .menu-logo h2 { font-size: clamp(34px, 10.2vw, 46px); }
  .menu-tagline { margin-top: 13px; font-size: 13px; }
  .menu-tags { margin-top: 13px; gap: 4px; }
  .menu-tags span { padding: 4px 6px; font-size: 6.5px; }
  .lobby-row { display: none; }
  .menu-panel { padding: 15px; border-radius: 15px; }
  .rules { padding: 4px 0 1px; }
  .rules li { align-items: center; padding: 5px 0; gap: 8px; }
  .rule-ico { width: 25px; height: 25px; border-radius: 7px; }
  .rules b { font-size: 10px; }
  .rules small { font-size: 8px; }
  .nickname-field { margin-top: 6px; }
  .nickname-field input { height: 34px; font-size: 11px; }
  .play-btn { height: 44px; font-size: 13px; }
  .menu-note { font-size: 7px; }
  .menu-footer { display: none; }

  .modal-screen { padding: 14px; }
  .modal-card { padding: 20px; }
  .toast { bottom: 128px; }
}

@media (max-width: 900px) and (max-height: 720px) {
  #app { grid-template-rows: 43px minmax(0, 1fr) auto; gap: 5px; }
  .brand-copy p { display: none; }
  .brand-mark { width: 31px; height: 31px; }
  .brand-copy h1 { font-size: 15px; }
  .session-clock { padding: 3px 8px 4px; }
  .clock-value { font-size: 15px; }
  .player-stats .pstat { height: 37px; }
  .pstat-icon { width: 17px; height: 17px; }
  .pstat-copy b { font-size: 12px; }
  .sidebar { display: flex; min-height: 0; }
  .layout { grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }
  .footbar { min-height: 99px; }
  .touch-controls { height: 96px; }
  .joystick { width: 91px; height: 91px; }
  .bomb-btn { width: 78px; height: 78px; }
  .bomb-btn .icon { width: 25px; height: 25px; }
  .touch-bomb-wrap { width: 102px; }
  .menu-screen { padding-top: 14px; }
  .menu-logo h2 { font-size: 34px; }
  .menu-tagline { display: none; }
  .menu-tags { display: none; }
  .menu-inner { gap: 13px; }
  .menu-panel .rules li:nth-child(3) { display: none; }
}

@media (max-width: 900px) and (max-height: 620px) {
  .sidebar { display: none; }
  .layout { grid-template-rows: auto; align-content: start; }
}

@media (max-width: 380px) {
  .brand-copy h1 { font-size: 15px; }
  .brand-copy p { display: none; }
  .session-clock { width: 118px; }
  .clock-value { font-size: 15px; }
  .pstat { padding: 0 4px; }
  .pstat-icon { display: none; }
  .pstat-copy b { font-size: 13px; }
  .pstat-copy small { font-size: 6px; }
  .lb-row { font-size: 8px; }
  .joystick { width: 92px; height: 92px; }
  .touch-bomb-wrap { width: 100px; }
  .bomb-btn { width: 80px; height: 80px; }
}

@media (min-width: 901px) and (max-width: 1180px) and (max-height: 720px) {
  .sidebar { display: none; }
  .layout { grid-template-columns: 1fr; }
  .feed-panel { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ============================================================
   LANDSCAPE PHONE — map in the middle, thumb controls on sides
   ============================================================ */

@media (max-width: 1000px) and (max-height: 500px) and (orientation: landscape) {
  #app {
    grid-template-rows: 38px minmax(0, 1fr) 0;
    gap: 4px;
    padding: calc(4px + env(safe-area-inset-top)) 7px 4px;
  }
  .topbar { grid-template-columns: 1fr auto 1fr; }
  .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
  .brand-mark .icon { width: 18px; height: 18px; }
  .brand-copy h1 { font-size: 15px; }
  .brand-copy p { display: none; }
  .session-clock { width: 120px; padding: 2px 8px 4px; }
  .clock-state { font-size: 6px; }
  .clock-id { display: none; }
  .clock-value { font-size: 15px; }
  .top-actions .icon-btn { width: 29px; height: 29px; }
  .layout { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); }
  .sidebar { display: none; }
  .arena-card { min-height: 0; padding: 4px; gap: 4px; }
  .arena-bar { height: 14px; font-size: 6.5px; }
  .arena-map { display: inline; }
  .canvas-frame {
    flex: 1;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    min-height: 0;
    border-radius: 8px;
  }
  .player-stats { gap: 4px; }
  .pstat { height: 31px; padding: 0 6px; gap: 4px; border-radius: 6px; }
  .pstat-icon { width: 16px; height: 16px; }
  .pstat-icon .icon { width: 10px; height: 10px; }
  .pstat-copy b { font-size: 11px; }
  .pstat-copy small { font-size: 6px; }
  .footbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 25;
    height: 0;
    min-height: 0;
    padding: 0;
    pointer-events: none;
  }
  .desktop-controls, .foot-meta { display: none; }
  .touch-controls {
    position: absolute;
    right: 14px;
    bottom: 52px;
    left: 14px;
    height: 86px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    pointer-events: none;
  }
  .joystick { width: 84px; height: 84px; pointer-events: auto; opacity: .82; }
  .joystick-base { inset: 4px; }
  .touch-bomb-wrap { width: 82px; pointer-events: auto; }
  .bomb-btn { width: 70px; height: 70px; opacity: .9; }
  .bomb-btn .icon { width: 23px; height: 23px; }
  .bomb-btn span { font-size: 6.5px; }
  .toast { bottom: 96px; }
  .respawn-card { width: 150px; padding: 9px; }
  .menu-screen { padding: 12px 18px; }
  .menu-inner { width: min(880px, 100%); grid-template-columns: 1.1fr .9fr; gap: 24px; margin: auto; }
  .menu-eyebrow { margin-bottom: 8px; }
  .menu-bomb { width: 40px; height: 40px; border-radius: 11px; }
  .menu-bomb .icon { width: 24px; height: 24px; }
  .menu-logo h2 { font-size: 42px; }
  .menu-tagline { display: block; margin-top: 8px; font-size: 11px; }
  .menu-tags, .lobby-row { display: none; }
  .menu-panel { padding: 13px 15px; border-radius: 14px; }
  .rules { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; padding: 2px 0; }
  .rules li { padding: 4px 0; }
  .rules li:nth-child(3) { display: none; }
  .rules b { font-size: 9px; }
  .rules small { font-size: 7.5px; }
  .nickname-field { margin-top: 2px; }
  .nickname-field > span { margin-bottom: 3px; }
  .nickname-field input { height: 31px; }
  .play-btn { height: 39px; margin-top: 6px; font-size: 12px; }
  .menu-note { display: none; }
}
