/* Layout: full-screen canvas underneath; menus are centered sheets, the in-game HUD hugs the corners. */
:root {
  /* build 66: a brighter, rounder, friendlier look (playful like Roblox: chunky buttons, big rounded cards) */
  --bg: #151618;
  --panel: #1f2024;
  --panel-2: #2a2c31;
  --line: #393b42;
  --text: #f3f5fb;
  --dim: #a3a6b1;
  --accent: #ff6b2c;
  --accent-2: #ff9a3d;
  --accent-ink: #1c0c03;
  --play: #22c55e;
  --play-2: #16a34a;
  --blue: #4c7dff;
  --heal: #43d17a;
  --danger: #ef4444;
  --gold: #fbbf24;
  --display: 'Montserrat', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
/* !important is kept only where a rule must beat everything: [hidden] here, the owner's spectator view (body.watching),
   reduced motion, pieces the player moved (.moved, inline positions) and the layout editor (body.ctl-editing shows
   pieces that are [hidden]); in dash.css also the rainbow name colour. Everything else wins by its selector. */
button, input { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

canvas#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
body.playing canvas#game { cursor: none; }

/* ---------- shared pieces ---------- */
.screen {
  position: fixed; inset: 0; z-index: 5;
  display: flex; overflow-y: auto;
  padding-block: 32px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background:
    radial-gradient(1100px 700px at 10% -10%, rgba(124, 92, 255, 0.28), transparent 60%),
    radial-gradient(900px 700px at 105% 110%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(700px 500px at 80% 0%, rgba(255, 107, 44, 0.12), transparent 60%),
    linear-gradient(180deg, #222328, var(--bg));
}
.eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim);
}
.h2 { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 5vw, 48px); line-height: 1; margin: 6px 0 0; text-wrap: balance; }
h3 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.card { background: linear-gradient(180deg, rgba(150,140,255,.10), rgba(150,140,255,.02) 45%, transparent), var(--panel); border: 1px solid rgba(150,140,255,.16); border-radius: 22px; box-shadow: 0 14px 40px rgba(5,6,25,.5), inset 0 1px 0 rgba(255,255,255,.07); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.count { font-variant-numeric: tabular-nums; color: var(--dim); font-weight: 600; }
.note { margin: 0; color: var(--dim); font-size: 14px; }
.note.center { text-align: center; }
.lead { margin: 0; color: var(--dim); font-size: 17px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.btn {
  appearance: none; border: 1px solid rgba(255,255,255,.08); background: var(--panel-2);
  border-radius: 12px; padding: 11px 18px; font-weight: 800; cursor: pointer; letter-spacing: .01em;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.28), 0 2px 0 rgba(0,0,0,.15);
  transition: background .15s, border-color .15s, transform .08s, box-shadow .08s, filter .15s, opacity .15s;
}
.btn:hover { border-color: rgba(255,255,255,.16); background: #35373d; }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 rgba(0,0,0,.28); }
.btn:focus-visible, input:focus-visible { outline: 3px solid rgba(76,125,255,.7); outline-offset: 2px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: transparent; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.btn.primary:hover { filter: brightness(1.08); background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.btn.play { background: linear-gradient(180deg, #34d97a, var(--play)); border-color: transparent; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.btn.play:hover { filter: brightness(1.08); background: linear-gradient(180deg, #34d97a, var(--play)); }
.btn.ghost { background: rgba(255,255,255,.04); box-shadow: none; }
.btn.big { padding: 14px 22px; font-size: 17px; border-radius: 14px; }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 10px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }
.btn.on { background: var(--heal); border-color: var(--heal); color: #052012; }

input {
  width: 100%; background: #121214; border: 2px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font-size: 16px; font-weight: 600; transition: border-color .15s;
}
input:focus { border-color: var(--blue); }
input::placeholder { color: #6a6d7c; font-weight: 600; }

kbd {
  display: inline-block; min-width: 22px; padding: 1px 6px; margin-right: 3px;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
  background: var(--panel); font-family: var(--body); font-size: 12px; font-weight: 600; text-align: center; color: var(--text);
}

.coin {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 35%, #ffe28a, var(--gold) 55%, #b98a14);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}

/* ---------- menu: a landing page over a live battle ---------- */
.screen.menu { flex-direction: column; overflow-y: auto; overflow-x: hidden; padding: 0; }
.menu-bg { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.menu > *:not(.menu-bg):not(.dashpage) { position: relative; z-index: 1; }
.menu > .dashpage { z-index: 2; }
.lp-top { display: flex; align-items: center; gap: 12px; padding: 14px max(24px, env(safe-area-inset-right, 0px)) 14px max(24px, env(safe-area-inset-left, 0px)); background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); }
.lp-logo { font-family: var(--display); font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
.lp-sp { flex: 1; }
.menu-wrap {
  margin: auto; width: 100%; max-width: 1180px; padding: 24px max(24px, env(safe-area-inset-left, 0px));
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 56px; align-items: center;
}
.brand { animation: lpIn .6s ease both; }
.brand .eyebrow { display: inline-block; padding: 4px 10px; border-radius: 6px; background: rgba(255,107,44,.12); border: 1px solid rgba(255,107,44,.3); }
.logo {
  font-family: var(--display); font-weight: 900; margin: 14px 0 16px; font-style: italic;
  font-size: clamp(56px, 9vw, 120px); line-height: 0.9; letter-spacing: -0.01em;
  text-transform: uppercase; color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, #ffd9b0 45%, #ff8a3d 75%, #ff5a1f 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 5px 0 #3a1a80) drop-shadow(0 0 40px rgba(255,107,44,.35));
}
.logo::after {
  content: ""; display: block; width: 140px; height: 8px; margin-top: 18px;
  background: repeating-linear-gradient(135deg, var(--accent) 0 12px, transparent 12px 20px);
}
.tagline { margin: 0; max-width: 44ch; font-size: 19px; color: #c8cad0; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { display: flex; flex-direction: column; min-width: 92px; padding: 12px 16px; border-radius: 18px; background: linear-gradient(160deg, rgba(124,92,255,.35), rgba(48,49,55,.85)); border: 1px solid rgba(150,140,255,.25); }
.facts strong { font-family: var(--display); font-weight: 900; font-size: 30px; color: #fff; line-height: 1; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.facts span { font-size: 12.5px; color: var(--dim); margin-top: 5px; }
.lp-classes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.lp-cls { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 70px; padding: 6px 4px 8px; border-radius: 12px; background: rgba(13,13,15,.55); border: 1px solid rgba(255,255,255,.07); font-size: 11.5px; font-weight: 600; color: #bec0c8; transition: transform .15s, border-color .15s; }
.lp-cls:hover { transform: translateY(-3px); border-color: var(--accent); }
.lp-cls.paid::after { content: ''; position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; background: #5be3ff; clip-path: polygon(50% 0, 100% 35%, 50% 100%, 0 35%); filter: drop-shadow(0 0 3px #5be3ff); }
@keyframes lpIn { from { opacity: 0; transform: translateY(12px); } }
.menu-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; background: rgba(20,20,23,.93); border-color: rgba(255,255,255,.09); box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05); animation: lpIn .6s .1s ease both; }
.mc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mc-head strong { font-family: var(--display); font-weight: 800; font-size: 22px; }
.mc-head .note { font-size: 12.5px; }
.menu-card .btn.primary.big { box-shadow: 0 8px 28px rgba(255,107,44,.35); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; font-weight: 600; color: var(--dim); }
.join-row { display: flex; gap: 8px; }
.code-input { text-transform: uppercase; letter-spacing: 0.3em; font-weight: 600; text-align: center; }
.code-input::placeholder { letter-spacing: 0.12em; }
.msg { margin: 0; padding: 10px 12px; border-radius: 8px; font-size: 14px; background: rgba(229,72,77,.12); border: 1px solid rgba(229,72,77,.35); color: #ffb3b5; }
.msg.info { background: rgba(255,107,44,.1); border-color: rgba(255,107,44,.35); color: #ffc7a8; }

.keys {
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px 24px 22px; display: flex; flex-wrap: wrap; gap: 10px 26px;
  color: var(--dim); font-size: 14px; justify-content: center;
}

/* ---------- lobby ---------- */
.lobby-wrap { margin: auto; width: 100%; max-width: 1320px; display: flex; flex-direction: column; gap: 18px; }
.lobby-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.code-box {
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 16px; align-items: center;
  padding: 12px 16px; border: 1px dashed rgba(255,107,44,.5); border-radius: var(--radius); background: rgba(255,107,44,.05);
}
.code-box .eyebrow { grid-column: 1; }
.room-code { grid-column: 1; font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: 0.18em; color: var(--accent); line-height: 1.1; }
.code-box .btn { grid-column: 2; grid-row: 1 / span 2; }

.lobby-grid { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.players-card { padding: 18px; }
.lobby-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.settings-card { padding: 18px; }
.sub-head { margin: 16px 0 10px; }
.choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.choice-list .choice:last-child { grid-column: 1 / -1; }
.choice {
  appearance: none; width: 100%; text-align: left; cursor: pointer; padding: 9px 12px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid transparent; display: flex; flex-direction: column; gap: 2px;
}
.choice b { font-weight: 600; font-size: 14px; }
.choice small { color: var(--dim); font-size: 12px; line-height: 1.35; }
.choice[aria-checked="true"] { border-color: var(--accent); background: linear-gradient(90deg, rgba(255,107,44,.1), transparent 70%), var(--panel-2); }
.choice:disabled { cursor: default; }
.choice:disabled:not([aria-checked="true"]) { opacity: .5; }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--panel-2); border-radius: 8px; }
.seg button { appearance: none; border: 0; border-radius: 6px; padding: 8px 4px; background: transparent; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--dim); }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.seg button:disabled { cursor: default; }
.settings-card .note { margin-top: 8px; font-size: 13px; }
.player-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.player {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 9px 10px; border-radius: 8px; background: var(--panel-2);
}
.player.me { box-shadow: inset 0 0 0 1px rgba(236,230,214,.18); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.p-name { min-width: 0; display: flex; flex-direction: column; }
.p-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-name small { font-size: 12px; color: var(--dim); }
.player > .chip { flex-shrink: 0; white-space: nowrap; } /* build 73: the Hazır/Bekliyor/Kurucu chip never gets pushed out */
.chip {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.chip.ok { background: rgba(67,209,122,.15); color: var(--heal); }
.chip.host { background: rgba(255,107,44,.15); color: var(--accent); }
.kick { padding: 4px 9px; font-size: 12px; }
.empty-slot { padding: 9px 10px; border-radius: 8px; border: 1px dashed var(--line); color: #5b665d; font-size: 13px; }

.class-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.class-card {
  appearance: none; text-align: left; cursor: pointer; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, background .15s;
}
.class-card:hover { border-color: #494b54; }
.class-card[aria-checked="true"] { border-color: var(--accent); background: linear-gradient(180deg, rgba(255,107,44,.08), transparent 70%), var(--panel); box-shadow: inset 0 0 0 1px var(--accent); }
.class-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.class-top { display: flex; align-items: center; gap: 10px; }
.class-preview { width: 64px; height: 64px; flex: none; border-radius: 8px; background: radial-gradient(circle at 45% 50%, #2e2f34, #1b1c1f 70%); }
.class-title { display: flex; flex-direction: column; min-width: 0; }
.class-name { font-family: var(--display); font-weight: 800; line-height: 1.1; }
.class-weapon { color: var(--dim); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.class-desc { margin: 0; font-size: 13px; line-height: 1.35; color: #b9bbc3; }
.class-card[disabled] { cursor: default; opacity: .7; }
.bars { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; align-items: center; font-size: 12px; color: var(--dim); }
.bar { height: 5px; border-radius: 3px; background: #2d2e34; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--text); border-radius: 3px; }
.ability { border-top: 1px solid var(--line); padding-top: 8px; font-size: 12.5px; line-height: 1.35; color: var(--dim); margin-top: auto; }
.ability b { color: var(--text); }

.lobby-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
/* build 73: on PC the Hazırım/Başlat bar stays on screen too (it sat below the class list and needed a long scroll) */
.lobby-foot { position: sticky; bottom: 0; z-index: 3; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 48px 0 0 var(--bg); /* covers the page padding under it */ }

/* ---------- HUD ---------- */
.hud { position: fixed; inset: 0; z-index: 4; pointer-events: none; font-variant-numeric: tabular-nums; user-select: none; -webkit-user-select: none; }
body.playing { user-select: none; -webkit-user-select: none; }
.hud > * { pointer-events: auto; }
.hud-tl { position: absolute; top: 16px; left: max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.wave-box {
  display: flex; flex-direction: column; padding: 10px 14px 12px; min-width: 170px;
  background: linear-gradient(180deg, rgba(60,62,69,.86), rgba(32,33,37,.86)); border: 1px solid rgba(150,140,255,.22); border-radius: 18px; box-shadow: 0 8px 22px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
}
#hud-wave { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; margin: 2px 0 4px; }
.hud-sub { font-size: 14px; color: #b9bbc3; }
.mode-tag { margin-top: 6px; align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; background: rgba(255,107,44,.16); color: var(--accent); }
.mev-chip { margin-top: 6px; align-self: flex-start; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 4px; background: #313238; color: #e8e2d2; animation: mevIn .4s ease-out; }
.mev-chip[data-k="moon"] { background: #5a1018; color: #ffd6d9; }
.mev-chip[data-k="dark"] { background: #0f0f11; color: #c9d4ff; border: 1px solid #3d3f47; }
.mev-chip[data-k="horde"] { background: #4a2a10; color: #ffd8a8; }
.mev-chip[data-k="drop"] { background: #1d3a26; color: #c8f7d3; }
@keyframes mevIn { from { transform: translateY(-4px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mev-chip { animation: none; } }
.team { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; width: 190px; }
.team li {
  display: grid; grid-template-columns: 8px minmax(0, 1fr); column-gap: 8px; row-gap: 3px; align-items: center;
  padding: 5px 8px; background: rgba(16,16,18,.6); border-radius: 6px; font-size: 12px;
}
.team li .dot { width: 8px; height: 8px; grid-row: 1 / span 2; }
.team li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.team li.down span { color: var(--danger); text-decoration: line-through; }
.team .mini-hp { height: 3px; background: #2d2e34; border-radius: 2px; overflow: hidden; }
.team .mini-hp i { display: block; height: 100%; background: var(--heal); }

.hud-bottom {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 18px;
  display: flex; gap: 10px; align-items: stretch;
}
.hp-box, .ab-box, .gold-box {
  background: linear-gradient(180deg, rgba(60,62,69,.88), rgba(32,33,37,.88)); border: 1px solid rgba(150,140,255,.22); border-radius: 18px; box-shadow: 0 8px 22px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
}
.hp-box { width: 300px; padding: 10px 14px 12px; }
.hp-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.hp-top > span { white-space: nowrap; }
#hud-class { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#hud-class { color: var(--dim); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.hp-bar { height: 14px; border-radius: 8px; background: rgba(0,0,0,.4); overflow: hidden; box-shadow: inset 0 2px 3px rgba(0,0,0,.4); }
.hp-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(180deg, #6ff0a3, #22c55e 55%, #16a34a); border-radius: 8px; transition: width .15s; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.hp-bar i.low { background: linear-gradient(90deg, #b8323a, var(--danger)); }
.ab-box { position: relative; overflow: hidden; width: 150px; padding: 8px 12px; display: flex; flex-direction: column; justify-content: center; }
.ab-fill { position: absolute; left: 0; bottom: 0; width: 100%; height: 0; background: rgba(255,107,44,.16); }
.ab-box.ready { border-color: var(--accent); }
.ab-box.active { border-color: var(--heal); }
.ab-box.active .ab-cd { color: var(--heal); }
.hud-br { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: 18px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hud-br .btn { background: rgba(16,16,18,.82); }
.hud-br .btn.off { color: var(--dim); }
.hud-br .hint { font-size: 12px; color: var(--dim); background: rgba(16,16,18,.6); padding: 4px 8px; border-radius: 6px; }
.hud-br kbd { font-size: 11px; }
.ab-box.ready .ab-cd { color: var(--accent); }
.ab-key { position: relative; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.ab-box strong { position: relative; font-size: 15px; }
.ab-cd { position: relative; font-size: 12px; color: var(--dim); font-weight: 600; }
.bash-box { width: 84px; }
.bash-box .ab-fill { background: rgba(236,230,214,.12); }
.bash-box.ready { border-color: #bdbfc6; }
.gold-box { padding: 8px 14px; flex-direction: column; justify-content: center; min-width: 104px; }
.gold-box strong { font-size: 22px; line-height: 1.1; display: inline-flex; }
.gold-box { display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: center; }
.gold-box .coin { width: 16px; height: 16px; }
.gold-box .kills { grid-column: 1 / span 2; font-size: 12px; color: var(--dim); }

.shop {
  position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); top: 152px; max-height: calc(100% - 260px);
  overflow: hidden; padding: 16px; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(180deg, rgba(72,74,82,.96), rgba(30,31,35,.97) 35%); border: 1px solid rgba(150,140,255,.28); border-radius: 26px;
  box-shadow: 0 24px 60px rgba(5,6,25,.6), inset 0 1px 0 rgba(255,255,255,.08);
}
.shop-head { display: flex; justify-content: space-between; align-items: flex-start; }
.shop-head h3 { font-family: var(--display); font-weight: 800; font-size: 24px; text-transform: none; letter-spacing: 0; margin-top: 2px; }
.shop-timer { display: flex; align-items: baseline; gap: 3px; color: var(--accent); }
.shop-timer strong { font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; }
.shop-gold { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--dim); }
.shop-gold strong { color: var(--gold); font-size: 18px; }
.shop-list { list-style: none; margin: 0; padding: 0 2px 0 0; display: flex; flex-direction: column; gap: 5px; overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.shop > :not(.shop-list) { flex: none; }
.shop-item {
  appearance: none; width: 100%; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center;
  padding: 7px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid transparent;
}
.shop-item:hover:not([disabled]) { border-color: #494b54; }
.shop-item[disabled] { cursor: not-allowed; opacity: .5; }
.shop-item .hk { grid-row: 1 / span 2; font-size: 11px; font-weight: 700; color: var(--dim); border: 1px solid var(--line); border-radius: 4px; text-align: center; padding: 1px 0; }
.shop-item .nm { font-weight: 600; font-size: 14px; }
.shop-item .ds { grid-column: 2; font-size: 12px; color: var(--dim); }
.shop-item .cost { grid-row: 1 / span 2; grid-column: 3; display: flex; align-items: center; gap: 5px; font-weight: 700; color: var(--gold); }
.pips { display: flex; gap: 2px; margin-top: 3px; grid-column: 2; }
.pips i { width: 10px; height: 3px; border-radius: 1px; background: #373940; }
.pips i.on { background: var(--accent); }
.shop-item.maxed .cost { color: var(--dim); }

.dead { position: absolute; left: 50%; bottom: max(150px, calc(env(safe-area-inset-bottom, 0px) + 150px)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: min(420px, calc(100% - 32px)); }
.dead-top { display: flex; align-items: baseline; gap: 10px; padding: 6px 14px; border-radius: 999px; background: rgba(16,16,18,.8); border: 1px solid rgba(229,72,77,.45); }
.dead-top strong { font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--danger); }
.dead-top span { font-size: 12.5px; color: #b9bbc3; }
.spec { pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 14px; background: rgba(16,16,18,.85); border: 1px solid var(--line); }
.spec-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: 700 24px/1 var(--body); cursor: pointer; }
.spec-btn:hover { border-color: var(--accent); }
.spec-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 150px; }
.spec-mid .eyebrow { font-size: 10px; }
.spec-mid b { font-size: 15px; }
.spec-hp { width: 120px; height: 5px; border-radius: 3px; background: #2d2e34; overflow: hidden; }
.spec-hp i { display: block; height: 100%; background: var(--heal); transition: width .2s; }
.rev { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 12px; background: rgba(16,16,18,.85); border: 1px solid rgba(67,209,122,.5); color: var(--heal); font-weight: 700; font-size: 13px; }
.rev-bar { width: 180px; height: 6px; border-radius: 3px; background: #2d2e34; overflow: hidden; }
.rev-bar i { display: block; height: 100%; background: var(--heal); }
body.touch .dead { bottom: max(200px, calc(env(safe-area-inset-bottom, 0px) + 200px)); }
@media (max-height: 520px) { body.touch .dead { bottom: max(8px, env(safe-area-inset-bottom, 0px)); top: auto; gap: 4px; width: min(330px, calc(100% - 340px)); } .dead-top { padding: 3px 10px; } .dead-top strong { font-size: 14px; } .dead-top span { display: none; } .spec { padding: 4px; } .spec-btn { width: 32px; height: 32px; font-size: 20px; } .spec-mid { min-width: 110px; } .rev { padding: 4px 10px; } }

.banner {
  position: absolute; left: 50%; top: 20%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: none;
  animation: banner 2.6s ease forwards;
}
.banner strong { font-family: var(--display); font-weight: 800; font-size: clamp(48px, 9vw, 96px); line-height: 1; color: var(--text); text-shadow: 0 6px 0 rgba(0,0,0,.4); }
.banner span:last-child { color: #b9bbc3; font-size: 17px; margin-top: 6px; }
.banner .eyebrow { color: var(--accent); }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, 10px); } 12% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; } 100% { opacity: 0; } }

.board { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(9,9,10,.55); }
.board-card { padding: 18px; width: 100%; max-width: 620px; max-height: 100%; overflow: auto; }

.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 9px 8px; border-bottom: 1px solid rgba(51,52,58,.6); font-size: 14px; }
.table .num { text-align: right; }
.table .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.table .who .dot { width: 10px; height: 10px; flex: none; }
.table-wrap { overflow-x: auto; }

/* ---------- game over ---------- */
.over-wrap { margin: auto; width: 100%; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.over-wrap .h2 { color: var(--danger); }

/* ---------- confirm + toasts ---------- */
.confirm { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(9,9,10,.7); }
.confirm-card { padding: 22px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; }
.confirm-card h3 { font-size: 18px; text-transform: none; letter-spacing: 0; }
.confirm-card .row { justify-content: flex-end; }

.toasts { position: fixed; z-index: 30; top: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
.toast {
  padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500;
  background: rgba(25,25,28,.95); border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(0,0,0,.35);
  animation: toast 3.2s ease forwards;
}
.toast.bad { border-color: rgba(229,72,77,.6); }
.toast.good { border-color: rgba(67,209,122,.6); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-6px); } 8% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }

.build {
  position: fixed; z-index: 40; pointer-events: none; user-select: none;
  left: max(10px, env(safe-area-inset-left, 0px)); bottom: max(8px, env(safe-area-inset-bottom, 0px));
  font-size: 9.5px; font-weight: 600; letter-spacing: .06em; color: rgba(139,143,157,.5); font-variant-numeric: tabular-nums;
}

.net-warn {
  position: absolute; left: 50%; top: 16px; transform: translateX(-50%);
  padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600;
  background: rgba(229,72,77,.18); border: 1px solid rgba(229,72,77,.6); color: #ffc2c4;
}
.chat { position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); width: min(380px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.chat-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-log li { align-self: flex-start; max-width: 100%; padding: 4px 9px; border-radius: 6px; background: rgba(16,16,18,.72); font-size: 13.5px; overflow-wrap: anywhere; transition: opacity .8s; }
.chat-log li.old { opacity: 0; }
.chat:not(.open) .chat-log li.old { display: none; }
.chat-log li b { font-weight: 600; margin-right: 6px; }
.chat.open .chat-log li { opacity: 1; }
.chat-input { pointer-events: auto; padding: 9px 12px; font-size: 14px; background: rgba(16,16,18,.92); }
.esc { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(9,9,10,.62); }
.esc-card { width: 100%; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.esc-card h3 { font-family: var(--display); font-weight: 800; font-size: 30px; text-transform: none; letter-spacing: 0; }
.esc-code {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border: 1px dashed rgba(255,107,44,.5); border-radius: var(--radius); background: rgba(255,107,44,.05);
}
.esc-code > div { display: flex; flex-direction: column; }
.esc-code .room-code { font-size: 28px; }
.esc-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.esc-keys { list-style: none; margin: 6px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.esc-keys kbd { font-size: 11px; }

.boss { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); min-width: 240px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; background: rgba(16,16,18,.82); border: 1px solid rgba(255,107,44,.5); border-radius: var(--radius); }
.boss strong { font-family: var(--display); font-weight: 800; }
.boss .eyebrow { color: var(--accent); }
.boss-bar { grid-column: 1 / -1; border-radius: 5px; background: #2a1a14; overflow: hidden; }
.boss-bar i { display: block; height: 100%; background: linear-gradient(90deg, #b8323a, var(--accent)); transition: width .2s; }
.buffs { position: absolute; bottom: calc(100% + 8px); left: 0; display: flex; gap: 6px; }
.buff { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(16,16,18,.85); border: 1px solid; }
.buff.power { color: var(--accent); border-color: var(--accent); }
.buff.haste { color: #4cc9f0; border-color: #4cc9f0; }
.shop-item.weapon { border-color: rgba(245,197,66,.35); }
.shop-item.weapon { border-left: 3px solid var(--pc, rgba(245,197,66,.35)); }
.shop-item.weapon.picking[disabled] { opacity: 1; cursor: default; }
.shop-list .paths { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.shop-list .paths[hidden] { display: none; }
.path-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 6px 8px 8px;
  background: var(--panel-2, #1e1e22); border: 1px solid var(--line); border-top: 3px solid var(--pc); border-radius: 8px; color: var(--text); cursor: pointer; font: inherit;
}
.path-btn:hover:not([disabled]), .path-btn:focus-visible { border-color: var(--pc); }
.path-btn[disabled] { opacity: .5; cursor: not-allowed; }
.path-btn canvas { width: 100%; height: auto; aspect-ratio: 240 / 84; background: radial-gradient(ellipse at center, #535660, #313338); border-radius: 5px; }
.path-btn .nm { font-weight: 700; font-size: 13px; color: var(--pc); }
.path-btn .ds { font-size: 11px; color: var(--dim); line-height: 1.3; }

.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row.end { justify-content: flex-end; }
.settings-dlg { padding: 22px; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.settings-dlg .card-head { margin-bottom: 0; }
.set-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; font-size: 14px; font-weight: 500; }
.set-row output { font-variant-numeric: tabular-nums; color: var(--dim); font-size: 13px; }
.set-row input { grid-column: 1 / -1; padding: 0; accent-color: var(--accent); border: 0; background: transparent; }
.set-check { display: flex; gap: 10px; align-items: center; font-size: 14px; cursor: pointer; }
.record { margin: 0; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: rgba(245,197,66,.15); color: var(--gold); font-weight: 700; font-size: 13px; }
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.award { padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.award.mvp { border-color: var(--gold); background: linear-gradient(180deg, rgba(245,197,66,.1), transparent), var(--panel-2); }
.award .eyebrow { font-size: 10px; }
.award b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.award small { color: var(--dim); font-size: 12px; }
.over-wrap { max-width: 760px; }

/* touch controls */
.touchpad { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.stick { position: absolute; bottom: max(24px, env(safe-area-inset-bottom, 0px)); border-radius: 50%; border: 2px solid rgba(236,230,214,.28); background: rgba(16,16,18,.35); pointer-events: auto; touch-action: none; }
.stick.left { left: max(24px, env(safe-area-inset-left, 0px)); }
.stick.right { right: max(24px, env(safe-area-inset-right, 0px)); border-color: rgba(255,107,44,.45); }
.stick i { position: absolute; left: 50%; top: 50%; border-radius: 50%; background: rgba(236,230,214,.45); }
.stick.right i { background: rgba(255,107,44,.6); }
.t-btn { position: absolute; pointer-events: auto; touch-action: none; border: 1px solid rgba(236,230,214,.3); background: rgba(16,16,18,.7); border-radius: 999px; font-weight: 700; color: var(--text); }
.t-btn.t-ability { right: max(170px, calc(env(safe-area-inset-right, 0px) + 170px)); bottom: max(40px, env(safe-area-inset-bottom, 0px)); padding: 0; border-color: var(--accent); }
.t-btn.t-ability.ready { background: rgba(255,107,44,.3); }
.t-btn.t-bash { right: max(256px, calc(env(safe-area-inset-right, 0px) + 256px)); bottom: max(48px, env(safe-area-inset-bottom, 0px)); padding: 0; }
.t-btn.t-bash.ready { background: rgba(236,230,214,.22); }
.t-btn.t-pause { left: max(14px, env(safe-area-inset-left, 0px)); }
.t-btn.t-score { left: calc(max(14px, env(safe-area-inset-left, 0px)) + 76px); }
.rotate { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px; background: var(--bg); }
.rotate strong { font-family: var(--display); font-weight: 800; font-size: 28px; }
.rotate span { color: var(--dim); }
body.touch .hud-bottom { transform-origin: top center; }
body.touch .hud-bottom .ab-box { display: none; }
body.touch .hud-br, body.touch .team, body.touch .chat-input { display: none; }
body.touch .wave-box { transform-origin: top left; }
body.touch .shop { top: 60px; bottom: auto; right: 8px; width: min(320px, 46%); max-height: calc(100% - 70px); }

/* ---------- small screens ---------- */
@media (max-width: 880px) {
  .menu-wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 8px 16px 24px; }
  .lp-top { padding: 12px 16px; gap: 8px; }
  .tagline { font-size: 16px; }
  .facts li { min-width: 0; flex: 1 1 70px; padding: 10px 12px; }
  .facts strong { font-size: 22px; }
  .lp-cls { width: calc(25% - 6px); }
  .menu-wrap { row-gap: 12px; }
  .brand { display: contents; }
  .brand .eyebrow { order: 1; justify-self: start; }
  .logo { order: 2; margin: 0 0 4px; font-size: clamp(54px, 15vw, 90px); }
  .tagline { order: 3; }
  .menu-card { order: 4; margin-top: 8px; }
  .facts { order: 5; margin-top: 10px; }
  .lp-classes { order: 6; margin-top: 0; }
  .lobby-grid { grid-template-columns: minmax(0, 1fr); }
  .hud-bottom { flex-wrap: wrap; justify-content: center; width: calc(100% - 32px); }
  .hp-box { width: 100%; }
  .shop { bottom: 150px; max-height: 45%; }
  .team { display: none; }
  .hud-br .hint { display: none; }
  .hud-br { bottom: auto; top: 160px; }
}
@media (max-width: 560px) {
  .code-box { grid-template-columns: auto; }
  .code-box .btn { grid-column: 1; grid-row: auto; margin-top: 8px; }
}
/* short landscape screens (phones turned sideways) */
@media (max-height: 520px) and (orientation: landscape) {
  .screen { padding-block: 12px; }
  .menu-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 20px; }
  .logo { font-size: 52px; margin: 4px 0 8px; }
  .logo::after { margin-top: 8px; height: 6px; }
  .tagline { font-size: 14px; }
  .facts { margin-top: 10px; gap: 6px; }
  .facts li { padding: 6px 10px; }
  .facts strong { font-size: 18px; }
  .lp-classes, .menu-promo span, .facts, .build { display: none; }
  .brand { display: block; }
  .menu-card { order: 0; margin-top: 0; }
  .menu-wrap { row-gap: 20px; }
  .lp-top { padding-block: 6px; }
  .menu-wrap { padding-block: 4px 12px; }
  .menu-card { padding: 14px; gap: 9px; }
  .menu-card input { padding: 9px 12px; }
  .btn.big { padding: 10px 16px; font-size: 15px; }
  .keys { display: none; }
  .h2 { font-size: 26px; }
  .class-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .class-card .class-desc, .class-card .bars, .class-card .ability { display: none; }
  .lobby-grid { gap: 10px; }
  .players-card, .settings-card { padding: 12px; }
  .over-wrap { padding: 16px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .banner, .toast { animation-duration: 0.01s; animation-iteration-count: 1; }
  .banner { animation: none; }
  .toast { animation: none; }
}

/* ---------- accounts and leaderboard ---------- */
input[readonly] { opacity: .75; }

/* ---------- messages from the owner's server ---------- */
.live-news { margin: 0 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--panel-2); font-size: 14px; }
.live-note { position: fixed; left: 50%; top: max(10px, env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 90; width: min(400px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px 10px 14px; background: rgba(24,25,27,.94); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.45); animation: lnIn .25s ease both; cursor: default; }
@keyframes lnIn { from { opacity: 0; transform: translate(-50%, -8px); } }
.live-note .ln-h { display: flex; align-items: center; gap: 8px; }
.live-note strong { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-note .ln-x { flex: none; width: 28px; height: 28px; margin: -4px -6px -4px 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.live-note .ln-x:hover { background: rgba(255,255,255,.08); color: var(--ink); }
.live-note p { margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.live-note.clip { cursor: pointer; }
.live-note.clip p::after { content: ''; }
.live-note.open p { display: block; -webkit-line-clamp: unset; max-height: 40vh; overflow-y: auto; }

/* break-time shop on small screens: the ability buttons step aside and the list gets the room */
body.touch:has(#shop:not([hidden])) .t-ability, body.touch:has(#shop:not([hidden])) .t-bash { visibility: hidden; }
@media (max-height: 520px) and (orientation: landscape) {
  body.touch .shop { padding: 10px 12px; gap: 6px; max-height: calc(100% - 66px); }
  .shop-head .eyebrow, #shop-ready-count { display: none; }
  .shop-head h3 { font-size: 18px; margin-top: 0; }
  .shop-timer strong { font-size: 22px; }
  .shop-gold { font-size: 13px; }
  .shop-gold strong { font-size: 15px; }
  .shop .btn.primary { padding-block: 8px; }
}
@media (max-height: 620px) {
  .hud-br .hint { display: none; }
  body:not(.touch) .shop { max-height: calc(100% - 216px); }
}

/* the signed-in home lives in css/dash.css */
.room-dlg { display: flex; flex-direction: column; max-width: 460px; }
.vis-opts { display: flex; flex-direction: column; gap: 8px; }
.vis-opt { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.vis-opt span { color: var(--dim); font-size: 13px; }
.vis-opt[aria-pressed="true"] { border-color: var(--accent); background: rgba(255,107,44,.08); box-shadow: inset 3px 0 0 var(--accent); }
.vis-opt:disabled { opacity: .45; cursor: not-allowed; }
.room-dlg { max-height: calc(100% - 24px); overflow-y: auto; }
.room-set { display: flex; flex-direction: column; gap: 6px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-opt { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--dim); font: 600 13px var(--body); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.chip-opt:hover { color: var(--text); }
.chip-opt[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: rgba(255,107,44,.1); }
@media (max-height: 520px) and (orientation: landscape) { .room-dlg { gap: 8px; } .vis-opt span { display: none; } .vis-opts { flex-direction: row; } .vis-opt { flex: 1; } }

/* ---------- connection test ---------- */
.diag-dlg { display: flex; flex-direction: column; gap: 12px; max-width: 520px; max-height: calc(100% - 24px); overflow-y: auto; }
.diag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.diag-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); font-size: 14px; animation: dpIn .2s ease; }
.diag-list .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--line); color: var(--dim); }
.diag-list li.ok .ic { background: rgba(67,209,122,.18); color: var(--heal); }
.diag-list li.bad .ic { background: rgba(229,72,77,.18); color: var(--danger); }
.diag-list li.warn .ic { background: rgba(245,197,66,.18); color: var(--gold); }
.diag-list li.run .ic::after { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--dim); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.diag-list .dt { color: var(--dim); font-size: 12px; }
.diag-list .dv { color: var(--dim); font-size: 12px; text-align: right; }

/* ---------- armory tabs, weapon levels, items, team upgrades ---------- */
.shop { width: 360px; }
.shop-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: rgba(0,0,0,.3); border: 1px solid rgba(150,140,255,.18); border-radius: 999px; }
.shop-tab { font: inherit; font-size: 12.5px; font-weight: 800; padding: 7px 4px; border: 0; border-radius: 999px; background: transparent; color: var(--dim); cursor: pointer; transition: background .15s, color .15s; }
.shop-tab:hover { color: var(--text); }
.shop-tab.on { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
.shop-sub { font-size: 12px; color: var(--dim); padding: 2px 2px 0; }
.wpn-card { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 8px; border: 1px solid var(--line); border-left: 3px solid var(--pc); border-radius: 8px; background: var(--panel-2, #1e1e22); }
.wpn-card canvas { width: 100%; height: auto; aspect-ratio: 240 / 70; background: radial-gradient(ellipse at center, #535660, #313338); border-radius: 5px; }
.wpn-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wpn-info .eyebrow { color: var(--pc); font-size: 10px; }
.wpn-info strong { font-size: 15px; }
.wpn-info .ds { font-size: 12px; color: var(--dim); line-height: 1.35; }
.wpn-lv { display: flex; gap: 3px; }
.wpn-lv i { flex: 1; height: 5px; border-radius: 3px; background: #313339; }
.wpn-lv i.on { background: var(--pc); }
.wpn-lv i.on.br { box-shadow: 0 0 6px var(--pc); }
.cap { font-size: 11px; color: var(--gold); line-height: 1.3; }
.cap.on { font-weight: 700; font-size: 12px; }
.shop-list .branches { grid-template-columns: 1fr 1fr; }
.wpn-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.wpn-acts .btn { flex: 1 1 auto; font-size: 12px; }
.wpn-acts .btn.warn { border-color: var(--danger); color: var(--danger); }
.shop-item.gear-item { border-left: 3px solid var(--pc); }
.shop-item.ability-up { border-left: 3px solid var(--accent); }
.team-up { display: flex; flex-direction: column; gap: 5px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2, #1e1e22); }
.team-up.maxed { opacity: .65; }
.tu-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tu-head strong { font-size: 14px; }
.team-up .ds { font-size: 12px; color: var(--dim); }
.tu-bar { background: #2d2e34; overflow: hidden; }
.tu-bar i { display: block; height: 100%; transition: width .2s; }
.tu-btns { display: grid; grid-template-columns: auto 1fr; gap: 6px; }
.tu-btns .btn { font-size: 12px; }
.team-up .pips, .tu-head .pips { display: flex; gap: 3px; }
.tu-head .pips i { width: 14px; height: 4px; border-radius: 2px; background: #313339; }
.tu-head .pips i.on { background: var(--gold); }

.gear-bar { display: flex; gap: 6px; }
.gear-slot { position: relative; min-width: 62px; padding: 6px 9px; display: flex; flex-direction: column; justify-content: center; background: rgba(16,16,18,.82); border: 1px solid var(--line); border-bottom: 3px solid var(--pc); border-radius: var(--radius); }
.gear-slot strong { font-size: 13px; }
.gear-n { font-size: 11px; color: var(--dim); font-weight: 700; }
.t-gear-row { position: absolute; right: max(24px, env(safe-area-inset-right, 0px)); bottom: max(168px, calc(env(safe-area-inset-bottom, 0px) + 168px)); display: flex; flex-direction: row-reverse; gap: 8px; pointer-events: none; }
.t-btn.t-gear { position: static; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-color: var(--pc); font-size: 10.5px; }
.t-btn.t-gear b { font-size: 11px; color: var(--pc); }
body.touch .gear-bar { display: none; }
body.touch .keys { display: none; }
@media (max-width: 880px) { .shop { width: calc(100% - 32px); } }
@media (max-height: 520px) and (orientation: landscape) {
  .shop-tab { padding: 4px 2px; font-size: 11.5px; }
  .wpn-card canvas { display: none; }
  body.touch .shop { width: min(360px, 52%); }
}

/* ---------- class picker with the detail panel ---------- */
.class-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 12px; align-items: start; }
.class-wrap .class-card .class-desc, .class-wrap .class-card .bars, .class-wrap .class-card .ability { display: none; }
.class-wrap .class-card { padding: 10px 12px; }
@media (min-width: 1360px) { .class-wrap .class-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.class-detail { padding: 16px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; }
.class-detail.swap { animation: cdIn .22s ease; }
@keyframes cdIn { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.cd-head { display: flex; align-items: center; gap: 12px; }
.cd-pic { width: 88px; height: 88px; flex: none; border-radius: 10px; background: radial-gradient(circle at 45% 50%, #34353b, #1b1c1f 70%); }
.cd-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cd-title strong { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.05; }
.cd-weapon { font-size: 12px; color: var(--dim); line-height: 1.35; }
.cd-desc { margin: 0; font-size: 14px; color: #c7c9cf; line-height: 1.4; }
.cd-stats { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 5px 10px; align-items: center; font-size: 12.5px; color: var(--dim); }
.cd-stats b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.cd-sec { border-top: 1px solid var(--line); padding-top: 9px; display: flex; flex-direction: column; gap: 4px; }
.cd-sec .eyebrow { font-size: 10px; }
.cd-sec p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--dim); }
.cd-sec p b { color: var(--text); }
.cd-mast { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--dim); display: flex; flex-direction: column; gap: 2px; }
.cd-tip { margin: 0; padding: 8px 10px; border-radius: 8px; background: rgba(255,107,44,.08); border-left: 3px solid var(--accent); font-size: 12.5px; color: #c7c9cf; }
@media (max-width: 1180px) { .class-wrap { grid-template-columns: minmax(0, 1fr); } .class-detail { position: static; } .class-wrap .class-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 880px) { .class-wrap .class-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cd-mast, .cd-tip { display: none; } }
@media (max-height: 520px) and (orientation: landscape) {
  .class-wrap .class-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .class-detail { padding: 10px; gap: 8px; }
  .cd-pic { width: 56px; height: 56px; }
  .cd-title strong { font-size: 20px; }
  .cd-stats, .cd-mast, .cd-tip { display: none; }
}
.shop-tab { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.tab-n { font-style: normal; font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; border-radius: 8px; background: var(--gold); color: #1a1405; }
.tab-n:empty { display: none; }
.shop-tab.on .tab-n { background: #1a0d05; color: var(--gold); }
.shop-list > li { animation: shopIn .18s ease both; }
@keyframes shopIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .shop-list > li, .class-detail.swap { animation: none; } }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px; border-radius: 8px; background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.stat-strip div { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 0; }
.stat-strip b { font-size: 14px; font-variant-numeric: tabular-nums; }
.stat-strip span { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.hud:has(#hud-gear:not([hidden])) .hud-br .hint { display: none; }
@media (max-height: 520px) and (orientation: landscape) { .stat-strip { display: none; } }
@media (max-height: 520px) and (orientation: landscape) {
  .wpn-card { padding: 6px 8px; gap: 3px; }
  .wpn-card .ds, .wpn-card .eyebrow { display: none; }
  .wpn-info strong { font-size: 13px; }
  .shop-list .path-btn { padding: 4px 6px 6px; }
  .shop-list .path-btn canvas { display: none; }
  .shop-list .path-btn .ds { font-size: 10.5px; }
  .shop-list .paths:not(.branches) .path-btn .ds { display: none; }
}
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* armory price tags: easy to read at a glance */
.price-tag { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: 2px; padding: 3px 9px 3px 6px; border-radius: 999px; border: 1px solid rgba(245,197,66,.45); font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.price-tag .coin { width: 13px; height: 13px; }
.price-tag.poor { color: #ff8a8a; border-color: rgba(229,72,77,.5); background: rgba(229,72,77,.12); }
.price-tag.poor .coin { filter: grayscale(.6); }
.cost-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shop-item .cost { font-size: 15px; padding: 3px 9px; border-radius: 999px; background: rgba(245,197,66,.12); border: 1px solid rgba(245,197,66,.35); }
.shop-item .cost .coin { width: 13px; height: 13px; }
.shop-item.poor .cost { color: #ff8a8a; border-color: rgba(229,72,77,.45); background: rgba(229,72,77,.1); }
.shop-item.maxed .cost { background: none; border-color: transparent; }

/* team upgrades: one bar with the target written on it, coin buttons */
.tu-bar { position: relative; height: 22px; border-radius: 11px; }
.team-up .tu-bar > i { border-radius: 11px; background: linear-gradient(90deg, #c99a1e, var(--gold)); }
.tu-bt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); font-variant-numeric: tabular-nums; }
.tu-btns .btn { display: inline-flex; align-items: center; gap: 6px; }
.tu-btns .btn .coin { width: 13px; height: 13px; flex: none; }
.team-up.maxed .tu-bar > i { background: linear-gradient(90deg, #2f9a5a, #43d17a); }

/* phones: compact banners and boss bar so the fight stays visible */
@media (max-height: 520px), (max-width: 700px) {
  .banner { top: 16%; gap: 0; padding: 0 16px; }
  .banner strong { font-size: 30px; }
  .banner .eyebrow { font-size: 11px; }
  .banner span:last-child { font-size: 12.5px; margin-top: 2px; max-width: 46ch; }
  .boss { min-width: 200px; }
  .boss .eyebrow { font-size: 9.5px; }
  .toast { font-size: 13px; padding: 7px 12px; }
  .gem-pop { top: 30%; padding: 5px 12px; }
  .gem-pop b { font-size: 16px; }
}

/* messages from the owner: the title on top, the note underneath in its own box */
.live-note p:not([hidden]) { color: #cecfd5; font-size: 13.5px; line-height: 1.4; white-space: pre-wrap; }
@media (max-height: 520px), (max-width: 480px) { .live-note { width: min(340px, calc(100vw - 24px)); padding: 8px 10px 8px 12px; } .live-note strong { font-size: 13px; } .live-note p:not([hidden]) { font-size: 12.5px; -webkit-line-clamp: 2; } }
.live-note.gift { border-color: rgba(91,227,255,.55); }
.live-note.gift strong { color: #c9f6ff; }
.live-note.gift p:not([hidden]) { border-left-color: #5be3ff; }

/* Android: get the app first */
.getapp { position: fixed; inset: 0; z-index: 200; overflow-y: auto; display: flex; background: radial-gradient(600px 400px at 50% -10%, rgba(255,107,44,.25), transparent 70%), linear-gradient(180deg, #17181b, #0e0f10); }
.ga-in { margin: auto; width: min(420px, 100%); padding: 32px 24px max(32px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ga-icon { border-radius: 22px; box-shadow: 0 16px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); animation: lpIn .5s ease both; }
.ga-h { margin: 0; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.1; }
.ga-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.ga-list li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: 15px; text-align: left; }
.ga-list li::before { content: '✓'; color: var(--heal); font-weight: 800; }
.btn.ga-btn { width: 100%; justify-content: center; font-size: 18px; box-shadow: 0 10px 30px rgba(255,107,44,.35); }
.ga-how { margin: 0; font-size: 12.5px; color: var(--dim); }
.ga-skip { margin-top: 6px; background: none; border: 0; color: var(--dim); font: 600 15px var(--body); text-decoration: underline; text-underline-offset: 3px; padding: 10px; cursor: pointer; }
@media (max-height: 520px) { .ga-in { padding-block: 14px; gap: 8px; } .ga-icon { width: 64px; height: 64px; } .ga-list { display: none; } .ga-h { font-size: 24px; } }

/* phones typing in a dialog: top of the screen, scrollable, short note hidden */
body.kb .confirm { align-items: flex-start; padding-top: max(6px, env(safe-area-inset-top, 0px)); }
body.kb .confirm > .card { max-height: 52vh; overflow-y: auto; }
body.kb .dm { bottom: auto; top: 0; height: 52vh; }
body.touch .esc-keys { display: none; }

/* room invites */
.inv-dlg { width: min(440px, calc(100vw - 32px)); }
.inv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.inv-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); }
.inv-list li.empty { display: block; color: var(--dim); text-align: center; padding: 18px; background: none; }
.inv-list li canvas { border-radius: 50%; flex: none; }
.inv-list li div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.inv-list li div span { font-size: 12px; color: var(--dim); }
.players-card .card-head .row { display: flex; align-items: center; gap: 8px; }
.inv-pop { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: min(460px, calc(100vw - 24px)); border-radius: 14px; background: #1b1c1f; border: 1px solid rgba(255,138,61,.5); box-shadow: 0 16px 40px rgba(0,0,0,.55); animation: invIn .35s ease-out; }
.inv-pop > div:not(.row) { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.inv-pop strong { font-size: 14px; }
.inv-pop span { font-size: 12px; color: var(--dim); }
.inv-pop canvas { border-radius: 50%; flex: none; }
.inv-pop .row { display: flex; gap: 6px; flex: none; }
@keyframes invIn { from { transform: translate(-50%, -14px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
@media (max-width: 520px) { .inv-pop { flex-wrap: wrap; } .inv-pop .row { width: 100%; justify-content: flex-end; } }
@media (prefers-reduced-motion: reduce) { .inv-pop { animation: none; } }
/* phones: the mode and event chips sit beside the wave box so the touch buttons under it stay clear */
body.touch .wave-box { position: relative; }
body.touch .mode-tag, body.touch .mev-chip { left: calc(100% + 8px); margin: 0; }
body.touch .mode-tag { top: 6px; }
body.touch .mev-chip { top: 32px; }

/* Esc menu: room, account and game info */
.esc-card { max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; }
.esc-room { display: flex; flex-wrap: wrap; gap: 6px; }
.esc-room:empty { display: none; }
.chip-tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); color: #caccd2; }
.esc-sec { display: flex; flex-direction: column; gap: 6px; }
.esc-me, .esc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.esc-me { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.esc-tile { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); min-width: 0; }
.esc-tile b { font-size: 17px; display: flex; align-items: center; gap: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.esc-tile span { font-size: 11.5px; color: var(--dim); }
.esc-tile.wide { grid-column: 1 / -1; }
.esc-xp { height: 6px; border-radius: 3px; background: #2d2e34; overflow: hidden; margin: 2px 0; }
.esc-xp i { display: block; height: 100%; background: var(--accent); }
.esc-quick { display: flex; flex-wrap: wrap; gap: 6px; }
#esc-leave.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
@media (max-width: 520px), (max-height: 520px) {
  .esc-card { padding: 16px; gap: 10px; }
  .esc-card h3 { font-size: 24px; }
  .esc-me { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .esc-tile { padding: 6px 8px; } .esc-tile b { font-size: 15px; }
}
@media (max-height: 520px) and (orientation: landscape) { .esc-card { max-width: 760px; } .esc-me { grid-template-columns: repeat(4, minmax(0, 1fr)); } .esc-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); } .esc-note, #esc-note { display: none; } }
body.esc-open .touchpad { display: none; }
.esc-l, .esc-r { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.esc-r { justify-content: flex-start; }
@media (min-width: 900px) and (min-height: 600px) {
  .esc-card { max-width: 900px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .esc-r { padding-top: 34px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .esc-card { max-width: 820px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
  .esc-card .esc-keys { display: none; }
  .esc-actions .btn { padding-block: 8px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  #esc-eyebrow { display: none; }
  .esc-card h3 { font-size: 20px; }
  .esc-l, .esc-r { gap: 8px; }
  .esc-sec .eyebrow { font-size: 10px; }
  .esc-tile.wide span { display: none; }
  .esc-tile span { font-size: 10.5px; }
}
/* small class cards: the trial/locked tag moves to the bottom corner so it never covers the name */
@media (max-width: 1100px), (max-height: 520px) {
  .class-card { position: relative; }
  .class-card .cls-tag { position: absolute; left: 8px; top: -8px; margin: 0; font-size: 9.5px; padding: 0 6px; line-height: 15px; background: #212226; z-index: 1; }
  .class-card .cls-tag.try { background: #2b2614; }
  .class-card .cls-tag.lock { background: #161719; }
  .class-top > div, .class-top > span:not(.cls-tag) { min-width: 0; }
}
.lbl-short { display: none; }
@media (max-width: 480px) { .lbl-long { display: none; } .lbl-short { display: inline; } #btn-acct, #btn-apk { white-space: nowrap; } }
@media (max-width: 480px) {
  .lp-top { padding-inline: 12px; gap: 6px; }
  .lp-top .btn.small { padding: 6px 9px; font-size: 12.5px; }
  .lp-top .lp-logo { font-size: 20px; }
}
@media (max-width: 370px) { .lp-top .btn.small { padding: 6px 7px; font-size: 12px; } .lp-top .lp-logo { font-size: 17px; } .lp-top { gap: 5px; padding-inline: 10px; } }

/* boss bars: the biggest boss on top, others smaller underneath */
.boss-more { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.boss-more:empty { display: none; }
.boss-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #f1d9c8; }
.boss-row span { white-space: nowrap; }
.boss-bar.sm { height: 5px; margin-top: 0; }
@media (max-height: 520px), (max-width: 700px) {
  body.touch .boss { min-width: 180px; transition: top .15s; }
  .boss-row { font-size: 10.5px; } .boss-more { margin-top: 3px; gap: 2px; } .boss-bar.sm { height: 4px; }
  body.touch .banner { top: 30%; }
}
/* narrow phones (under 760 px wide in landscape): smaller top row, labels under the Menü / Skor buttons */
@media (max-width: 760px) {
  body.touch .mode-tag, body.touch .mev-chip { left: 0; }
  body.touch .mode-tag { top: 176px; }
  body.touch .mev-chip { top: 204px; }
}

/* ---------- phones: the armory as a full-screen page ---------- */
.shop-close { display: none; }
.armory-fab { position: fixed; z-index: 7; left: 50%; bottom: max(14px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 10px 18px 10px 14px; border-radius: 999px; border: 1px solid rgba(245,197,66,.55); background: rgba(16,16,18,.92); color: var(--text); font: 700 15px var(--body); box-shadow: 0 8px 24px rgba(0,0,0,.45); animation: fabIn .3s ease-out; }
.armory-fab .coin { width: 16px; height: 16px; }
.armory-fab b { color: var(--gold); font-size: 16px; }
.armory-fab .fab-t { color: #e8e2d2; }
.armory-fab .fab-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-size: 12px; display: grid; place-items: center; }
@keyframes fabIn { from { transform: translate(-50%, 14px); opacity: 0; } }
body.touch .shop.full {
  position: fixed; inset: 0; z-index: 8; width: auto; max-height: none; border-radius: 0; border: 0;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, #17181a, #0e0f10); animation: shopIn .22s ease-out;
}
@keyframes shopIn { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { body.touch .shop.full, .armory-fab { animation: none; } }
body.touch .shop.full .shop-head { align-items: center; gap: 12px; }
body.touch .shop.full .shop-head > div:first-child { flex: 1; }
body.touch .shop.full .shop-head h3 { font-size: 26px; }
body.touch .shop.full .shop-close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 20px; }
body.touch .shop.full .shop-gold { font-size: 16px; }
body.touch .shop.full .shop-gold strong { font-size: 20px; }
body.touch .shop.full .shop-tabs button { min-height: 42px; font-size: 15px; }
body.touch .shop.full .shop-list { gap: 8px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
body.touch .shop.full .shop-item { padding: 12px 14px; min-height: 58px; }
body.touch .shop.full .shop-item .nm { font-size: 16px; }
body.touch .shop.full .shop-item .ds { font-size: 13.5px; line-height: 1.35; display: block; }
body.touch .shop.full .shop-item .cost { font-size: 16px; }
body.touch .shop.full .shop-item .cost .coin { width: 14px; height: 14px; }
body.touch .shop.full .shop-item .hk { display: none; }
body.touch .shop.full .path-btn { padding: 10px; gap: 4px; }
body.touch .shop.full .path-btn .nm { font-size: 15px; }
body.touch .shop.full .path-btn .ds { font-size: 12.5px; display: block; }
body.touch .shop.full #btn-shop-ready { min-height: 50px; font-size: 17px; }
body.touch .shop.full .price-tag { font-size: 15px; }
body.touch:has(#shop.full:not([hidden])) .touchpad, body.touch:has(#shop.full:not([hidden])) .hud-bottom, body.touch:has(#shop.full:not([hidden])) #boss { visibility: hidden; }
/* landscape phones: wide list, paths four in a row, everything centred */
@media (orientation: landscape) {
  body.touch .shop.full > * { width: 100%; max-width: 860px; margin-inline: auto; }
  body.touch .shop.full .shop-list .paths { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.touch .shop.full .shop-head h3 { font-size: 22px; }
}
@media (orientation: landscape) and (max-height: 420px) {
  body.touch .shop.full .shop-gold { top: max(14px, env(safe-area-inset-top, 0px)); left: 50%; width: auto; }
  body.touch .shop.full #btn-shop-ready { min-height: 44px; }
  body.touch .shop.full #shop-ready-count { display: none; }
}
/* full-screen armory rows: name, description and level pips on the left, price on the right */
body.touch .shop.full .shop-item { grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 3px; }
body.touch .shop.full .shop-item > :not(.cost):not(.hk) { grid-column: 1; }
body.touch .shop.full .shop-item .cost { grid-column: 2; grid-row: 1 / span 3; }
body.touch .shop.full .pips i { width: 16px; height: 4px; }
@media (orientation: landscape) {
  body.touch .shop.full .shop-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; column-gap: 8px; }
  body.touch .shop.full .shop-list > li:not(:has(> .shop-item)) { grid-column: 1 / -1; }
  body.touch .shop.full .shop-list > li:has(> .shop-item.weapon), body.touch .shop.full .shop-list > li:has(> .team-up) { grid-column: 1 / -1; }
}
.set-q { flex-wrap: wrap; }
.q-seg { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; margin-top: 6px; }
.fps { position: fixed; z-index: 9; left: 50%; bottom: 4px; transform: translateX(-50%); font: 600 11px var(--body); color: #b9bbc3; background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 6px; pointer-events: none; }
body.touch .fps { bottom: auto; top: 2px; }

/* ---------- build 33: phones and new screens ---------- */
/* lobby tabs (only on phones and short screens) */
.lobby-tabs { display: none; }
@media (max-width: 700px), (max-height: 520px) and (orientation: landscape) {
  .lobby-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line); position: sticky; top: 0; z-index: 3; }
  .lobby-tabs button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--dim); font: 700 14px var(--body); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
  .lobby-tabs button[aria-selected="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
  .lt-n { font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; background: rgba(255,255,255,.1); padding: 0 5px; }
  .lobby-grid { grid-template-columns: minmax(0, 1fr); }
  #lobby[data-lt="cls"] .lobby-side { display: none; }
  #lobby[data-lt="set"] .classes, #lobby[data-lt="set"] .players-card { display: none; }
  #lobby[data-lt="pl"] .classes, #lobby[data-lt="pl"] .settings-card { display: none; }
  .lobby-foot { position: sticky; bottom: 0; z-index: 3; padding: 10px 0 max(6px, env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); margin-inline: -16px; padding-inline: 16px; }
  .lobby-foot .row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
  .lobby-foot .note { display: none; }
  .lobby-head { align-items: center; }
}
@media (max-height: 520px) and (orientation: landscape) {
.lobby-head .eyebrow { display: none; }
  #lobby[data-lt="set"] .settings-card .choice-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.p-av { width: 34px; height: 34px; flex: none; border-radius: 50%; display: block; }
.p-avw { position: relative; width: 34px; height: 34px; flex: none; }
.p-avw::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--pc, transparent); box-shadow: 0 0 0 2px var(--panel-2); }

/* room dialog: the create button stays in view at the bottom */
.room-foot { position: sticky; bottom: -22px; margin: 0 -22px -22px; padding: 12px 22px 18px; display: flex; flex-direction: column; gap: 8px; }
.room-foot .note { margin: 0; text-align: center; }
.room-foot .btn { width: 100%; }
@media (max-height: 520px) and (orientation: landscape) { .room-foot { padding-top: 8px; padding-bottom: 12px; } .room-foot .note { display: none; } }

/* phones: map event and mode chips inside the wave box, never over the health bar */
body.touch .mode-tag, body.touch .mev-chip { position: static; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* kill feed and streaks */
.kfeed { position: absolute; top: var(--mm-b, 150px); max-width: min(320px, 40vw); list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: none; z-index: 2; }
.kfeed li { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: rgba(12,13,14,.72); border: 1px solid rgba(255,255,255,.06); font-size: 12.5px; color: var(--dim); white-space: nowrap; animation: kfIn .2s ease-out; transition: opacity .4s, transform .4s; }
.kfeed li b { color: var(--text); font-weight: 700; }
.kfeed li.me { border-color: rgba(255,107,44,.45); }
.kfeed li.kf-boss { color: #ffd6a8; border-color: rgba(255,180,80,.5); background: rgba(40,22,8,.8); }
.kfeed li { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.kfeed .kf-x { color: var(--accent); font-weight: 800; }
.kfeed li.out { opacity: 0; transform: translateX(12px); }
@keyframes kfIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
body.touch .kfeed { top: var(--mm-b, 128px); right: 16px; }
body.touch .kfeed li { font-size: 11px; padding: 3px 8px; }

.streak { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; z-index: 3; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.streak strong { font: 800 30px var(--display, var(--body)); color: #ffb35c; letter-spacing: .02em; }
.streak span { font-size: 13px; font-weight: 700; color: var(--text); opacity: .85; }
.streak.pop { animation: stPop 1.6s ease-out forwards; }
@keyframes stPop { 0% { opacity: 0; transform: translateX(-50%) scale(1.5); } 12% { opacity: 1; transform: translateX(-50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-10px); } }
body.touch .streak { top: 30%; } body.touch .streak strong { font-size: 22px; }
@media (prefers-reduced-motion: reduce) { .streak.pop, .kfeed li { animation: none; } }

/* game over: your take from this game */
.over-me { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.om-t { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); min-width: 0; }
.om-t strong { font-size: 20px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 6px; }
.om-t span { font-size: 12px; color: var(--dim); }
.om-t.gem { border-color: rgba(91,227,255,.4); flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 6px; }
.om-t.gem strong { color: #9fefff; } .om-t.gem span { width: 100%; }
.om-t.om-lv { grid-column: 1 / -1; gap: 6px; }
.om-t.om-lv strong { font-size: 15px; }
.om-t.cta { border-style: dashed; cursor: pointer; border-color: rgba(255,107,44,.55); }
.om-t.cta:hover, .om-t.cta:focus-visible { background: rgba(255,107,44,.12); }
.om-t.cta strong::after { content: " ›"; color: var(--accent); }
.over-wrap .row:last-child { flex-wrap: wrap; }
@media (max-width: 560px) { .over-wrap .row:last-child { display: grid; grid-template-columns: 1fr 1fr; } .over-wrap .row:last-child .btn[hidden] { display: none; } .over-me { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.t-btn.t-pause, .t-btn.t-score { top: var(--tb-top, 104px); }
.room-foot { background: var(--panel); border-top: 1px solid var(--line); }
@media (max-width: 560px) { #btn-over-again { order: -1; grid-column: 1 / -1; } }
@media (max-height: 520px) and (orientation: landscape) {
  .lobby-foot { padding-top: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom, 0px)); }
  .lobby-foot .btn { min-height: 40px; padding-block: 8px; font-size: 15px; }
  .lobby-head .h2 { font-size: 18px; }
  .lobby-tabs button { min-height: 34px; }
}

/* ---------- settings: two sections, switches, scrolls inside the screen ---------- */
.set-dlg { max-width: 760px; max-height: calc(100dvh - 24px); padding: 0; gap: 0; overflow: hidden; }
.set-head { padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
.set-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.set-sec { display: flex; flex-direction: column; gap: 14px; padding: 16px 22px 18px; min-width: 0; }
.set-sec + .set-sec { border-left: 1px solid var(--line); }
.set-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.set-foot .set-build { margin: 0; font-size: 12px; color: var(--dim); }
.set-foot .row { gap: 8px; }
.set-check { justify-content: space-between; min-height: 30px; }
.q-seg button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 620px) { .set-body { grid-template-columns: minmax(0, 1fr); } .set-sec + .set-sec { border-left: 0; border-top: 1px solid var(--line); } }
@media (max-height: 520px) and (orientation: landscape) { .set-head { padding: 10px 16px 8px; } .set-sec { padding: 10px 16px 12px; gap: 9px; } .set-foot { padding: 8px 16px; } .set-check { min-height: 26px; } }
/* Esc menu: tidy key list */
.esc-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.esc-keys li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.set-q .q-seg { grid-column: 1 / -1; }
/* class cards: the name never spills out; narrow cards stack the picture over the name */
.class-card { container-type: inline-size; min-width: 0; }
.class-title { flex: 1 1 auto; }
.class-name { font-size: clamp(14px, 11cqi, 19px); overflow-wrap: anywhere; }
.class-weapon { font-size: clamp(10px, 6.2cqi, 12px); overflow-wrap: anywhere; }
@container (max-width: 205px) {
  .class-top { flex-direction: column; align-items: flex-start; gap: 6px; }
  .class-name { font-size: clamp(14px, 12.5cqi, 19px); }
}
.mode-seg { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }

/* chat: a send row (also on phones), a chat button on phones, and the lobby chat */
.chat-row { display: flex; gap: 6px; pointer-events: auto; }
.chat-row .chat-input { flex: 1; min-width: 0; }
body.touch .chat-input { display: block; }
.chat.open .chat-log { max-height: 34vh; overflow-y: auto; pointer-events: auto; scroll-behavior: smooth; }
.t-btn.t-chat { left: calc(max(14px, env(safe-area-inset-left, 0px)) + 152px); top: var(--tb-top, 104px); }
body.touch .chat { bottom: auto; width: min(360px, 46vw); }
body.touch .chat.open { z-index: 8; }
.lchat { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.lchat-log { list-style: none; margin: 0; padding: 0; max-height: 150px; min-height: 40px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.lchat-log:empty::before { content: 'Henüz mesaj yok.'; color: var(--dim); font-size: 12.5px; }
.lchat-log li { overflow-wrap: anywhere; } .lchat-log li b { margin-right: 6px; }
.lchat-row { display: flex; gap: 6px; } .lchat-row input { flex: 1; min-width: 0; padding: 8px 10px; }

/* Sargı: always in view right under the armory tabs */
.shop-heal { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin: 8px 0 4px; padding: 9px 12px; border-radius: 8px; border: 1px solid rgba(67,209,122,.45); background: rgba(67,209,122,.08); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.shop-heal:hover:not(:disabled) { background: rgba(67,209,122,.16); }
.shop-heal:disabled { opacity: .5; cursor: default; }
.shop-heal .sh-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; } .shop-heal .sh-t b { font-size: 14px; } .shop-heal .sh-t span { font-size: 12px; color: var(--dim); }
.shop-heal .cost { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; white-space: nowrap; }
.shop-heal.full .cost { visibility: hidden; }
/* PC: chat sits above the bottom HUD row; the armory uses the full height on shorter screens */
body:not(.touch) .chat { bottom: 112px; }
@media (max-height: 900px) { body:not(.touch) .shop { top: 136px; max-height: calc(100% - 136px - 108px); gap: 8px; padding: 14px; } body:not(.touch) .shop-head .eyebrow { display: none; } body:not(.touch) .wpn-card canvas { aspect-ratio: 240 / 46; } }

/* the owner's hidden spectator view: no controls, no own-player HUD */
body.watching .hud-bottom, body.watching #touch, body.watching #shop, body.watching #btn-armory, body.watching .t-btn, body.watching #dead, body.watching #rev, body.watching .menu-card > :not(.msg):not(#menu-msg), body.watching .lp-top, body.watching .build { display: none !important; }

/* the class's own weapon paths in the lobby side panel */
.cd-paths { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cd-path { padding: 4px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--pc) 55%, transparent); background: color-mix(in srgb, var(--pc) 14%, transparent); color: var(--ink); font-size: 12.5px; font-weight: 600; }

/* ---------- sign in / sign up page ---------- */
.auth { position: fixed; inset: 0; z-index: 120; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: radial-gradient(900px 600px at 18% 10%, rgba(255,107,44,.20), transparent 60%), radial-gradient(800px 600px at 95% 100%, rgba(76,201,240,.12), transparent 60%), rgba(10,10,11,.95); animation: authIn .35s cubic-bezier(.2,.8,.2,1) both; }
.auth.out { animation: authOut .22s ease both; }
@keyframes authIn { from { opacity: 0; } }
@keyframes authOut { to { opacity: 0; } }
.auth-glow { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
/* build 75.1: no blur filter and no drift (both cost a lot on weak PCs); the soft gradient alone looks the same */
.auth-glow::before, .auth-glow::after { content: ''; position: absolute; width: 760px; height: 760px; border-radius: 50%; opacity: .55; }
.auth-glow::before { left: -160px; top: -200px; background: radial-gradient(circle, rgba(255,107,44,.5), transparent 68%); }
.auth-glow::after { right: -200px; bottom: -220px; background: radial-gradient(circle, rgba(76,201,240,.3), transparent 68%); }
.auth-grid { position: relative; min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); max-width: 1180px; margin: 0 auto; padding: max(24px, env(safe-area-inset-top, 0px)) 32px max(24px, env(safe-area-inset-bottom, 0px)); gap: 48px; align-items: center; }
.auth-side { display: flex; flex-direction: column; gap: 28px; padding: 24px 0; animation: authUp .5s .05s cubic-bezier(.2,.8,.2,1) both; }
.auth-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px 8px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, transform .15s; }
.auth-back:hover { background: rgba(255,255,255,.09); transform: translateX(-2px); }
.auth-brand .eyebrow { margin: 0 0 6px; }
.auth-logo { display: block; font-family: var(--display); font-size: clamp(44px, 6vw, 72px); line-height: .95; letter-spacing: .5px;
  background: linear-gradient(180deg, #fff3e6 0%, #ffb27a 55%, #ff6b2c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 24px rgba(255,107,44,.35)); }
.auth-tag { margin: 12px 0 0; max-width: 420px; color: #bfc1c8; font-size: 17px; line-height: 1.5; }
.auth-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 440px; }
.auth-perks li { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); border: 1px solid rgba(255,255,255,.07); animation: authUp .5s cubic-bezier(.2,.8,.2,1) both; }
.auth-perks li:nth-child(1) { animation-delay: .12s; } .auth-perks li:nth-child(2) { animation-delay: .19s; } .auth-perks li:nth-child(3) { animation-delay: .26s; }
.auth-perks i { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.08); }
.auth-perks strong { display: block; font-size: 15px; }
.auth-perks span { color: var(--dim); font-size: 13.5px; }
.auth-squad { width: 360px; max-width: 100%; height: auto; opacity: .95; filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)); }
@keyframes authUp { from { opacity: 0; transform: translateY(14px); } }

.auth-main { display: flex; justify-content: center; }
.auth-card { position: relative; width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 26px 26px 22px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(34,35,39,.92), rgba(20,20,23,.94)); border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,107,44,.06), inset 0 1px 0 rgba(255,255,255,.06); animation: authUp .5s .08s cubic-bezier(.2,.8,.2,1) both; }
.auth-card::before { content: ''; position: absolute; inset: -1px; border-radius: 23px; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255,107,44,.55), transparent 35%, transparent 65%, rgba(76,201,240,.35)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.auth-card.shake { animation: authShake .4s cubic-bezier(.36,.07,.19,.97); }
@keyframes authShake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.auth-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.06); }
.auth-seg button { position: relative; z-index: 1; padding: 10px 8px; border: 0; border-radius: 10px; background: none; color: var(--dim); font-weight: 600; font-size: 14.5px; cursor: pointer; transition: color .2s; }
.auth-seg button[aria-selected="true"] { color: #1c0c03; }
.auth-seg button:focus-visible { outline: 2px solid rgba(255,255,255,.5); outline-offset: -2px; }
.auth-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: linear-gradient(180deg, #ff8a4c, #ff6b2c); box-shadow: 0 6px 18px rgba(255,107,44,.35); transition: transform .32s cubic-bezier(.3,1.3,.5,1); }
.auth[data-m="reg"] .auth-pill { transform: translateX(100%); }
.auth-head h2 { margin: 4px 0 2px; font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: .3px; }
.auth-sub { margin: 0; color: var(--dim); font-size: 14.5px; }

.af { position: relative; }
.af input { width: 100%; height: 56px; padding: 22px 46px 6px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.32); color: var(--text); font-size: 16px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s; }
.af input:hover { border-color: rgba(255,255,255,.18); }
.af input:focus { border-color: rgba(255,138,76,.8); background: rgba(0,0,0,.42); box-shadow: 0 0 0 4px rgba(255,107,44,.16); }
.af label { position: absolute; left: 17px; top: 18px; color: var(--dim); font-size: 15.5px; pointer-events: none; transform-origin: left top; transition: transform .16s ease, color .16s; }
.af input:focus + label, .af input:not(:placeholder-shown) + label { transform: translateY(-11px) scale(.76); color: #ffb27a; }
.af input:not(:focus):not(:placeholder-shown) + label { color: var(--dim); }
.af-c { position: absolute; right: 14px; top: 19px; color: var(--dim); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.af-eye { position: absolute; right: 6px; top: 8px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--dim); cursor: pointer; display: grid; place-items: center; }
.af-eye:hover { color: var(--text); background: rgba(255,255,255,.06); }
.af-eye .eye-x { transition: opacity .15s; }
.af-eye[aria-pressed="false"] .eye-x { opacity: 1; }
.af.ok input { border-color: rgba(67,209,122,.6); }
.af.bad input { border-color: rgba(229,72,77,.6); }
.af-ok { position: absolute; right: 16px; top: 20px; width: 16px; height: 16px; border-radius: 50%; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s cubic-bezier(.3,1.6,.5,1); background: #43d17a no-repeat center / 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3' fill='none' stroke='%23062' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.af.ok .af-ok { opacity: 1; transform: none; }

.auth-rules { list-style: none; margin: -6px 0 0; padding: 0 4px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--dim); }
.auth-rules li { display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.auth-rules i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; transition: background .15s, border-color .15s; }
.auth-rules li.ok { color: #7fe0a4; } .auth-rules li.ok i { background: #43d17a; border-color: #43d17a; }
.auth-rules li.bad { color: #ff8e8e; }
.auth-rules li.flash { animation: ruleFlash .5s ease; }
@keyframes ruleFlash { 30% { color: #ffd34d; transform: scale(1.05); } }
.auth-meter { display: flex; align-items: center; gap: 10px; margin-top: -6px; padding: 0 4px; font-size: 12.5px; color: var(--dim); }
.am-bar { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.am-bar i { height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); transition: background .2s; }
.auth-meter[data-s="1"] .am-bar i:nth-child(-n+1) { background: #e5484d; }
.auth-meter[data-s="2"] .am-bar i:nth-child(-n+2) { background: #f5a524; }
.auth-meter[data-s="3"] .am-bar i:nth-child(-n+3) { background: #8fdc4a; }
.auth-meter[data-s="4"] .am-bar i { background: #43d17a; }
.auth-meter span { min-width: 92px; text-align: right; }
.auth-msg { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(229,72,77,.12); border: 1px solid rgba(229,72,77,.35); color: #ffb4b4; font-size: 14px; animation: authUp .2s ease both; }
.auth-msg.info { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); color: var(--text); }

.auth-go { position: relative; height: 54px; border: 0; border-radius: 14px; cursor: pointer; overflow: hidden; color: #1c0c03; font-weight: 700; font-size: 16.5px; letter-spacing: .2px;
  background: linear-gradient(180deg, #ff9356, #ff6b2c); box-shadow: 0 10px 26px rgba(255,107,44,.32), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .12s, box-shadow .2s, filter .2s; }
.auth-go::after { content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); opacity: 0; }
.auth-go.ready::after { animation: authShine 2.6s ease-in-out infinite; opacity: 1; }
@keyframes authShine { 0% { left: -40%; } 60%, 100% { left: 130%; } }
.auth-go:hover { filter: brightness(1.06); box-shadow: 0 14px 32px rgba(255,107,44,.42), inset 0 1px 0 rgba(255,255,255,.35); }
.auth-go:active { transform: translateY(1px) scale(.995); }
.auth-go:disabled { cursor: progress; }
.auth-go .ag-spin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2.5px solid rgba(28,12,3,.25); border-top-color: #1c0c03; opacity: 0; }
.auth-go.busy .ag-t { opacity: 0; }
.auth-go.busy .ag-spin { opacity: 1; animation: authRot .7s linear infinite; }
@keyframes authRot { to { transform: rotate(360deg); } }
.auth-go.done { background: linear-gradient(180deg, #5fe08f, #36b867); }
.auth-go.done .ag-t { opacity: 0; }
.auth-go.done::before { content: ''; position: absolute; left: 50%; top: 50%; width: 22px; height: 12px; margin: -9px 0 0 -11px; border-left: 3px solid #062; border-bottom: 3px solid #062; transform: rotate(-45deg) scale(.4); animation: authTick .3s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes authTick { to { transform: rotate(-45deg) scale(1); } }
.auth-alt { margin: -2px 0 0; text-align: center; color: var(--dim); font-size: 14px; }
.auth-alt button { border: 0; background: none; padding: 2px; color: #ffb27a; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,178,122,.4); }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12.5px; text-transform: uppercase; letter-spacing: 1.5px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.08); }
.auth-guest { height: 46px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); color: var(--text); font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.auth-guest:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); }
.auth-legal { margin: 2px 0 0; text-align: center; color: #777b8c; font-size: 12px; line-height: 1.5; }
.auth-legal a { color: #b7b9c1; }
body.authing #menu .menu-wrap, body.authing #menu .lp-top { visibility: hidden; }

@media (max-width: 880px) {
  .auth-grid { grid-template-columns: 1fr; gap: 14px; padding: max(14px, env(safe-area-inset-top, 0px)) 16px max(20px, env(safe-area-inset-bottom, 0px)); align-items: start; }
  .auth-side { gap: 12px; padding: 0; }
  .auth-perks, .auth-squad { display: none; }
  .auth-logo { font-size: 40px; }
  .auth-tag { font-size: 14.5px; margin-top: 6px; }
  .auth-card { padding: 20px 18px 18px; border-radius: 20px; }
  .auth-head h2 { font-size: 23px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .auth-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .auth-tag { display: none; }
  .auth-logo { font-size: 34px; }
  .auth-card { gap: 10px; padding: 16px; }
  .af input { height: 50px; padding-top: 19px; }
  .af label { top: 15px; }
  .auth-go { height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .auth, .auth *, .auth-glow { animation: none !important; transition: none !important; } }

/* ---------- cookie banner and settings ---------- */
.ck-bar { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 130; width: min(760px, calc(100vw - 24px)); display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: 18px; background: linear-gradient(180deg, rgba(36,37,42,.97), rgba(22,22,25,.97)); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 20px 60px rgba(0,0,0,.55);
  transform: translate(-50%, 30px); opacity: 0; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s; }
.ck-bar.in { transform: translate(-50%, 0); opacity: 1; }
.ck-bar.out { transform: translate(-50%, 30px); opacity: 0; }
.ck-ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(217,160,102,.12); border: 1px solid rgba(217,160,102,.25); }
.ck-tx { flex: 1; min-width: 0; }
.ck-tx p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #c6c8cf; }
.ck-tx strong { color: var(--text); }
.ck-tx a, .ck-links a { color: #ffb27a; }
.ck-acts { flex: none; display: flex; gap: 8px; }
.ck-btn { height: 40px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: var(--text); transition: background .15s, filter .15s; }
.ck-btn:hover { background: rgba(255,255,255,.09); }
.ck-btn.primary { border: 0; color: #1c0c03; background: linear-gradient(180deg, #ff9356, #ff6b2c); box-shadow: 0 6px 18px rgba(255,107,44,.3); }
.ck-btn.primary:hover { filter: brightness(1.06); }
@media (max-width: 640px) {
  .ck-bar { flex-wrap: wrap; gap: 10px 12px; padding: 12px; }
  .ck-ic { width: 38px; height: 38px; border-radius: 12px; }
  .ck-tx { flex-basis: calc(100% - 52px); }
  .ck-tx p { font-size: 12.5px; }
  .ck-acts { flex-basis: 100%; }
  .ck-acts .ck-btn { flex: 1; }
}
.ck-dlg { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.6); animation: authIn .2s ease both; overflow-y: auto; }
.ck-card { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 20px; background: linear-gradient(180deg, #222327, #18191b); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: authUp .3s cubic-bezier(.2,.8,.2,1) both; }
.ck-head { display: flex; align-items: center; gap: 10px; }
.ck-head h3 { flex: 1; margin: 0; font-family: var(--display); font-weight: 800; font-size: 22px; }
.ck-x { width: 36px; height: 36px; border: 0; border-radius: 10px; background: rgba(255,255,255,.05); color: var(--dim); font-size: 22px; cursor: pointer; }
.ck-x:hover { color: var(--text); background: rgba(255,255,255,.1); }
.ck-intro { margin: 0; color: #bfc1c8; font-size: 14px; line-height: 1.55; }
.ck-row { padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.07); }
.ck-row-top { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.ck-row.locked .ck-row-top { cursor: default; }
.ck-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ck-row-t strong { font-size: 15px; }
.ck-row-t span { color: var(--dim); font-size: 13px; }
.ck-always { flex: none; font-size: 12px; color: #7fe0a4; padding: 4px 10px; border-radius: 999px; background: rgba(67,209,122,.12); }
.ck-sw { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 26px; border-radius: 999px; background: rgba(255,255,255,.14); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.ck-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.3,1.4,.5,1); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.ck-sw:checked { background: #ff6b2c; }
.ck-sw:checked::after { transform: translateX(20px); }
.ck-sw:focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: 2px; }
.ck-det { margin-top: 8px; }
.ck-det summary { cursor: pointer; color: #b7b9c1; font-size: 13px; }
.ck-det ul { margin: 6px 0 0; padding-left: 18px; color: var(--dim); font-size: 13px; line-height: 1.55; }
.ck-links { margin: 0; font-size: 13px; color: var(--dim); }
.ck-dacts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 480px) { .ck-dacts .ck-btn { flex: 1 1 100%; } }

/* links to the legal pages */
.legal-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 14px; margin-top: 4px; font-size: 12.5px; }
.legal-links a, .legal-links button { color: #8b8f9d; text-decoration: none; background: none; border: 0; padding: 2px 0; cursor: pointer; font: inherit; }
.legal-links a:hover, .legal-links button:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.set-legal { justify-content: flex-start; margin: 2px 0 8px; }
body.playing .ck-bar { display: none; }

/* extra gems for harder difficulties and modes, under the option's name */
.gem-x { display: block; margin-top: 2px; font-size: 11px; font-weight: 700; color: #7fe3ff; letter-spacing: .02em; }
.chip-opt .gem-x { display: inline; margin: 0 0 0 6px; font-size: 11px; }

/* invites: easy to send, impossible to miss */
.inv-slot { display: flex; flex-direction: column; gap: 8px; color: var(--dim); }
.inv-acts { display: flex; flex-wrap: wrap; gap: 6px; }
#inv-all { width: 100%; margin-top: 8px; }
.inv-pop { padding-right: 40px; z-index: 125; }
.inv-pop.pulse { animation: invIn .35s ease-out, invPulse 1.6s ease-in-out .4s 3; }
@keyframes invPulse { 50% { box-shadow: 0 16px 40px rgba(0,0,0,.55), 0 0 0 6px rgba(255,138,61,.25); } }
.inv-x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--dim); font-size: 20px; line-height: 1; cursor: pointer; }
.inv-x:hover { background: rgba(255,255,255,.08); color: var(--text); }

/* phones and the app: no grey flash on taps, no callout or text selection on long press, buttons react at once */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.touch { -webkit-touch-callout: none; overscroll-behavior: none; }
body.touch button, body.touch .btn, body.touch [role="tab"], body.touch a { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
body.touch .btn:not(.t-btn):active { transform: scale(.97); }

/* ---------- PvP ---------- */
.pvp-bar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: stretch; gap: 6px; pointer-events: none; font-family: var(--body, Rubik, system-ui, sans-serif); }
.pvp-bar .pv-side { min-width: 92px; padding: 6px 12px 8px; border-radius: 12px; background: rgba(13,13,15,.78); border: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pvp-bar .pv-side span { font-size: 11px; color: #c5c7ce; letter-spacing: .4px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pvp-bar .pv-side strong { font: 700 26px/1 var(--display, 'Montserrat', sans-serif); }
.pvp-bar .pv-side.t0 { box-shadow: inset 0 -3px 0 #4cc9f0; } .pvp-bar .pv-side.t0 strong { color: #8fdcff; }
.pvp-bar .pv-side.t1 { box-shadow: inset 0 -3px 0 #ff5a5f; } .pvp-bar .pv-side.t1 strong { color: #ff9a9d; }
.pvp-bar .pv-mid { padding: 6px 14px; border-radius: 12px; background: rgba(13,13,15,.86); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pvp-bar .pv-mid strong { font: 700 22px/1 var(--display, 'Montserrat', sans-serif); color: #fff; }
.pvp-bar .pv-mid span { font-size: 10.5px; color: #9598a5; }
.pv-prog { width: 74px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 3px; }
.pv-prog i { display: block; height: 100%; } .pv-prog.t0 i { background: #4cc9f0; } .pv-prog.t1 i { background: #ff5a5f; }
.pv-dots { display: flex; gap: 4px; margin-top: 3px; } .pv-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.15); } .pv-dots i.on { background: #ffd23f; box-shadow: 0 0 6px #ffd23f; }
.pvp-resp { position: fixed; left: 50%; top: 34%; transform: translate(-50%, -50%); z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 26px; border-radius: 16px; background: rgba(13,13,15,.82); border: 1px solid rgba(255,90,95,.35); text-align: center; pointer-events: none; animation: pvIn .25s ease-out; }
.pvp-resp strong { font: 700 34px/1.1 var(--display, 'Montserrat', sans-serif); color: #fff; }
.pvp-resp .eyebrow { color: #ff9a9d; }
.pvp-resp .dim { font-size: 13px; max-width: 300px; }
@keyframes pvIn { from { opacity: 0; transform: translate(-50%, -40%); } }
.kfeed li.pv b { font-weight: 700; }
.gem-x.pv { background: rgba(255,90,95,.18); color: #ffb3b5; }
.pvp-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pvp-opts .pv-teams { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-team.t0 { border-color: rgba(76,201,240,.5); } .pv-team.t1 { border-color: rgba(255,90,95,.5); }
.pv-team.on.t0 { background: rgba(76,201,240,.22); color: #fff; } .pv-team.on.t1 { background: rgba(255,90,95,.22); color: #fff; }
.player.pv-t0 { box-shadow: inset 3px 0 0 #4cc9f0; } .player.pv-t1 { box-shadow: inset 3px 0 0 #ff5a5f; }
@media (max-width: 720px) {
  .pvp-bar { top: 8px; gap: 4px; transform: translateX(-50%) scale(.82); transform-origin: top center; }
  .pvp-resp { top: 30%; padding: 12px 18px; } .pvp-resp strong { font-size: 26px; }
}
#over-h.win { color: #ffd23f; }
body.touch .pvp-bar { transform: translateX(-50%) scale(.74); }
@media (max-height: 520px) { body.touch .pvp-bar { transform: translateX(-50%) scale(.66); } }

/* ping */
.team small.ping, .ping-chip { font-size: 10.5px; font-weight: 600; }
.ping.ok, .ping-chip.ok { color: #7ee08a; } .ping.mid, .ping-chip.mid { color: #ffd23f; } .ping.bad, .ping-chip.bad { color: #ff7b7f; }
.ping-chip { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.06); }

/* voice chat */
.voice-btn.on { background: rgba(67,209,122,.16); border-color: rgba(67,209,122,.5); }
.voice-btn.talk { background: rgba(67,209,122,.4); box-shadow: 0 0 0 3px rgba(67,209,122,.25); }
.voice-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.voice-open { display: flex; align-items: center; font-size: 13px; color: #c5c7ce; }
.team li.talk span { color: #7ee08a; text-shadow: 0 0 6px rgba(67,209,122,.6); }
body.touch #btn-voice { touch-action: none; user-select: none; -webkit-user-select: none; }

/* first-game tutorial */
.tut { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 7; width: min(420px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 16px; background: rgba(13,13,15,.9); border: 1px solid rgba(255,107,44,.45); box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: pvIn .25s ease-out; }
.tut .eyebrow { color: #ff9a5c; }
.tut strong { font: 700 20px/1.2 var(--display, 'Montserrat', sans-serif); }
.tut .dim { font-size: 14px; }
.tut .btn { align-self: flex-end; margin-top: 4px; }
body.touch .tut { bottom: auto; width: min(360px, calc(100% - 340px)); padding: 10px 14px; }
body.touch .tut strong { font-size: 16px; } body.touch .tut .dim { font-size: 12.5px; }
.hud-br-row { display: flex; gap: 8px; align-items: center; }
.clan-t { color: #ffd23f; font-weight: 700; margin-right: 4px; font-size: .9em; }
/* every checkbox on the site is a toggle switch */
input[type="checkbox"]:not(.ck-sw):not(.switch) { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 42px; height: 24px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.14); position: relative; cursor: pointer; transition: background .18s; vertical-align: middle; }
input[type="checkbox"]:not(.ck-sw):not(.switch)::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .2s cubic-bezier(.3,1.4,.5,1); }
input[type="checkbox"]:not(.ck-sw):not(.switch):checked { background: var(--t-a, var(--accent, #ff6b2c)); }
input[type="checkbox"]:not(.ck-sw):not(.switch):checked::after { transform: translateX(18px); }
input[type="checkbox"]:not(.ck-sw):not(.switch):disabled { opacity: .45; cursor: default; }
input[type="checkbox"]:not(.ck-sw):not(.switch):focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: 2px; }
/* in-game mic button: round, hold to talk, the ring follows my voice level */
.vb-wrap { position: relative; display: inline-flex; align-items: center; }
.voice-mic { --lv: 0; position: relative; width: 58px; height: 58px; border-radius: 50%; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 2px solid rgba(255,255,255,.18); background: rgba(18,18,20,.82); color: #c5c7ce; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: background .12s, border-color .12s, transform .08s; }
.voice-mic svg { width: 22px; height: 22px; fill: currentColor; }
.voice-mic .vb-t { font-size: 9px; font-weight: 700; line-height: 1; white-space: nowrap; letter-spacing: .02em; }
.voice-mic .vb-ring { position: absolute; inset: -6px; border-radius: 50%; border: 3px solid #43d17a; opacity: 0; transform: scale(calc(.9 + var(--lv) * .25)); transition: transform .06s linear, opacity .12s; pointer-events: none; }
.voice-mic.on { border-color: rgba(67,209,122,.55); color: #8ff0b4; }
.voice-mic.talk { background: #2fa85f; border-color: #6fe39b; color: #fff; transform: scale(1.06); box-shadow: 0 0 0 4px rgba(67,209,122,.25), 0 6px 18px rgba(0,0,0,.35); }
.voice-mic.talk .vb-ring { opacity: calc(.35 + var(--lv) * .65); }
.voice-mic.open.talk { background: #e0603a; border-color: #ff9a76; box-shadow: 0 0 0 4px rgba(255,107,44,.25), 0 6px 18px rgba(0,0,0,.35); }
.voice-mic.open.talk .vb-ring { border-color: #ff9a76; }
.voice-mic:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.voice-off { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: #202125; color: #c5c7ce; font-size: 14px; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.voice-off:hover { background: #3a1d1d; color: #fff; }
@media (pointer: fine) { .voice-mic { width: 50px; height: 50px; } .voice-mic svg { width: 19px; height: 19px; } }
@media (prefers-reduced-motion: reduce) { .voice-mic, .voice-mic .vb-ring { transition: none; } }
.vb-wrap.t-mic { position: absolute; pointer-events: auto; right: max(258px, calc(env(safe-area-inset-right, 0px) + 258px)); bottom: max(124px, calc(env(safe-area-inset-bottom, 0px) + 124px)); }
body.touch:has(#shop:not([hidden])) .vb-wrap.t-mic { visibility: hidden; }
@media (max-height: 500px) { .vb-wrap.t-mic { bottom: 118px; right: max(250px, calc(env(safe-area-inset-right, 0px) + 250px)); } .vb-wrap.t-mic .voice-mic { width: 52px; height: 52px; } }
/* who downed you */
.dead-by { display: block; font-weight: 700; margin-top: 2px; }
/* "your voice is going out": a pill at the top while the microphone sends */
.voice-live { --lv: 0; position: fixed; left: 50%; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; border-radius: 999px;
  background: rgba(20,60,36,.88); border: 1px solid rgba(111,227,155,.55); color: #d9ffe6; font-weight: 700; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.voice-live.open { background: rgba(80,30,16,.88); border-color: rgba(255,154,118,.6); color: #ffe2d6; }
.voice-live .vl-dot { border-radius: 50%; background: #43d17a; }
.voice-live.open .vl-dot { background: #ff7a4a; }
.voice-live .vl-bars { display: flex; align-items: flex-end; gap: 2px; }
.voice-live .vl-bars i { border-radius: 2px; background: currentColor; opacity: .9; }
@media (prefers-reduced-motion: reduce) { .voice-live .vl-dot { box-shadow: none; } }
/* quick team messages */
.t-btn.t-quick { left: calc(max(14px, env(safe-area-inset-left, 0px)) + 228px); top: var(--tb-top, 104px); }
.quick { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 40; width: min(420px, calc(100vw - 32px)); padding: 12px; border-radius: 16px; background: rgba(15,15,17,.94); border: 1px solid rgba(236,230,214,.2); box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.quick-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: #ece6d6; }
.quick-hint { font-size: 11px; color: var(--dim, #979aa6); }
body.touch .quick-hint { display: none; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.quick-b { --qc: #fff; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--qc) 45%, transparent); background: color-mix(in srgb, var(--qc) 10%, rgba(255,255,255,.03)); color: #ece6d6; font: 600 14px Rubik, system-ui, sans-serif; cursor: pointer; text-align: left; }
.quick-b:hover, .quick-b:focus-visible { background: color-mix(in srgb, var(--qc) 22%, transparent); outline: none; }
.quick-ic { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--qc); color: #0f0f11; font-weight: 800; flex: none; }
.quick-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-b kbd { font-size: 11px; color: var(--dim, #979aa6); }
body.touch .quick-b kbd { display: none; }
.quick-b:last-child { grid-column: 1 / -1; }
.quick-line .quick-m { font-weight: 700; margin-left: 4px; }
@media (max-height: 420px) { .quick { padding: 8px; } .quick-b { min-height: 38px; padding: 6px 8px; } }

/* ---------- build 52: phone controls editor, free joystick, battery saver, loading, intro, map preview ---------- */
.touchpad { --stk: 1; --tbs: 1; --tco: 1; }
.touchpad > :not(.zone-move) { opacity: var(--tco); }
.stick { width: calc(132px * var(--stk)); height: calc(132px * var(--stk)); }
.stick i { width: calc(54px * var(--stk)); height: calc(54px * var(--stk)); margin: calc(-27px * var(--stk)) 0 0 calc(-27px * var(--stk)); }
.t-btn.t-ability { width: calc(76px * var(--tbs)); height: calc(76px * var(--tbs)); font-size: calc(12px * min(1.15, var(--tbs))); }
.t-btn.t-bash { width: calc(60px * var(--tbs)); height: calc(60px * var(--tbs)); font-size: calc(11px * min(1.15, var(--tbs))); }
.t-btn.t-gear { width: calc(46px * var(--tbs)); height: calc(46px * var(--tbs)); font-size: 9.5px; opacity: .92; } /* build 66: smaller, out of the way */
.vb-wrap.t-mic .voice-mic { width: calc(58px * var(--tbs)); height: calc(58px * var(--tbs)); }
@media (max-height: 500px) { .vb-wrap.t-mic .voice-mic { width: calc(52px * var(--tbs)); height: calc(52px * var(--tbs)); } }
.touchpad .moved { left: var(--mx) !important; top: var(--my) !important; right: auto !important; bottom: auto !important; transform: translate(-50%, -50%); }
.zone-move { position: absolute; left: 0; top: 34%; bottom: 0; width: 46%; pointer-events: none; }
.touchpad.free .zone-move { pointer-events: auto; touch-action: none; }
.touchpad.free #stick-move:not(.held) { opacity: calc(var(--tco) * .45); }
.touchpad.free #stick-move.held { left: var(--fx) !important; top: var(--fy) !important; right: auto !important; bottom: auto !important; pointer-events: none; transform: translate(-50%, -50%) scale(var(--ms, 1)) !important; }
body.ctl-editing #stick-aim, body.ctl-editing #t-ab, body.ctl-editing #t-bash, body.ctl-editing #btn-voice { display: flex !important; visibility: visible !important; }
body.ctl-editing #stick-aim, body.ctl-editing #stick-move { display: block !important; }
body.ctl-editing .zone-move { pointer-events: none !important; background: rgba(76,201,240,.07); border-right: 1px dashed rgba(76,201,240,.35); }
body.ctl-editing .touchpad:not(.free) .zone-move { display: none; }
.ctl-ed { position: fixed; inset: 0; z-index: 60; justify-content: center; }
.ctl-bar { z-index: 62; display: flex; flex-wrap: wrap; align-items: center; background: rgba(23,24,26,.96); border: 1px solid rgba(236,230,214,.18); }
.ctl-bar strong { font-size: 14px; }
.ctl-s { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.ctl-s input { flex: 1; min-width: 70px; }
.ctl-c { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ctl-acts { display: flex; }
@media (max-height: 500px) {.ctl-bar .ctl-hint { display: none; } }
.set-ctl { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.loading { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; background: rgba(8,9,10,.82); padding: 16px; animation: ld-in .25s ease; }
@keyframes ld-in { from { opacity: 0; } to { opacity: 1; } }
.ld-in { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; max-width: 420px; }
.ld-spin { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(236,230,214,.15); border-top-color: var(--accent); animation: ld-spin .9s linear infinite; }
@keyframes ld-spin { to { transform: rotate(360deg); } }
.ld-tip { margin: 0; color: var(--muted, #a4a7b2); font-size: 13px; line-height: 1.45; min-height: 2.9em; transition: opacity .3s; }
.ld-tip::before { content: 'İpucu: '; color: var(--accent); font-weight: 700; }
.lobby-tip { margin-top: 4px; font-size: 12px; opacity: .85; }
.lobby-tip:empty { display: none; }
.lobby-tip::before { content: 'İpucu: '; color: var(--accent); font-weight: 700; }
.map-pv-row { display: flex; gap: 10px; align-items: flex-start; }
.map-pv-row .note { margin: 0; flex: 1; }
.map-pv { width: 120px; height: 80px; flex: none; border-radius: 8px; border: 1px solid rgba(236,230,214,.18); background: #111; }
@media (max-width: 420px) { .map-pv { width: 96px; height: 64px; } }
.intro { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: #09090a; pointer-events: none; animation: intro-out .5s ease 1.35s forwards; }
.intro-in { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.intro-logo { font-weight: 900; font-size: clamp(40px, 11vw, 96px); letter-spacing: .12em; color: #ece6d6; text-shadow: 0 0 30px rgba(255,107,44,.45); animation: intro-slam .55s cubic-bezier(.2,1.6,.4,1) both; }
.intro-line { display: block; height: 3px; width: min(70vw, 520px); background: linear-gradient(90deg, transparent, var(--accent), transparent); transform-origin: center; animation: intro-line .5s ease .35s both; }
.intro-sub { font-size: 13px; letter-spacing: .4em; text-transform: uppercase; color: rgba(236,230,214,.6); animation: intro-fade .4s ease .6s both; }
@keyframes intro-slam { from { opacity: 0; transform: scale(1.8); filter: blur(6px); } to { opacity: 1; transform: scale(1); filter: none; } }
@keyframes intro-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes intro-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .intro { display: none; } }
/* the end screen's buttons stay on screen on phones, however long the table is */
body.touch .over-wrap .row:last-child { position: sticky; bottom: -16px; z-index: 2; background: rgba(23,24,26,.97); padding: 10px 0 14px; margin-bottom: -14px; box-shadow: 0 -10px 16px rgba(23,24,26,.9); }

/* ---------- landscape phones (short screens): the lobby and the armory are app-like screens that fit, each part scrolls on its own ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  /* lobby: room code and tabs share the top row, the content fills the middle and scrolls, the buttons sit at the bottom */
  .screen.lobby { padding-block: max(6px, env(safe-area-inset-top, 0px)) 0; overflow: hidden; }
  .lobby-wrap { height: 100%; margin: 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 6px 10px; }
  .lobby-head { grid-column: 1; grid-row: 1; flex-wrap: nowrap; gap: 8px; }
  .lobby-head > div:first-child { display: none; }
  .code-box { padding: 4px 10px; gap: 8px; }
  .code-box .eyebrow { display: none; }
  .room-code { font-size: 18px; }
  #btn-copy { padding: 6px 10px; font-size: 12px; }
  .lobby-tabs { grid-column: 2; grid-row: 1; position: static; align-self: center; }
  .lobby-tabs button { min-height: 36px; font-size: 13px; }
  .lobby-grid { grid-column: 1 / -1; grid-row: 2; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .lobby-foot { grid-column: 1 / -1; grid-row: 3; position: static; margin-inline: 0; padding-inline: 0; }
  .lobby-tip { display: none; }
  /* classes: a 4-wide grid of compact cards on the left, the chosen class's details fixed on the right with their own scroll */
  .classes > .card-head { display: none; }
  .class-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 290px); gap: 8px; align-items: start; }
  .class-wrap .class-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .class-card { gap: 3px; min-height: 0; }
  .class-card .class-preview { width: 38px; height: 38px; }
  .class-card .class-name { font-size: 14px; }
  .class-card .class-weapon { font-size: 10px; }
  .class-detail { position: sticky; top: 0; max-height: calc(100vh - 120px); overflow-y: auto; overscroll-behavior: contain; }
  /* armory: tabs, gold, heal and Hazırım in a narrow column on the left; the list takes the rest of the screen and scrolls */
  body.touch .shop.full { display: grid; grid-template-columns: minmax(150px, 200px) minmax(0, 1fr); grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 6px; padding-block: max(8px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-bottom, 0px)); }
  body.touch .shop.full > * { max-width: none; margin: 0; width: auto; }
  body.touch .shop.full .shop-head { grid-column: 1; grid-row: 1; gap: 6px; }
  body.touch .shop.full .shop-head h3 { font-size: 17px; }
  body.touch .shop.full .shop-head .eyebrow { display: none; }
  body.touch .shop.full .shop-timer { font-size: 13px; }
  body.touch .shop.full .shop-close { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
  body.touch .shop.full .shop-gold { grid-column: 1; grid-row: 2; position: static; transform: none; margin: 0; }
  body.touch .shop.full .shop-tabs { grid-column: 1; grid-row: 3; grid-template-columns: minmax(0, 1fr); }
  body.touch .shop.full .shop-tabs button { min-height: 34px; font-size: 14px; justify-content: flex-start; padding-inline: 10px; }
  body.touch .shop.full .shop-heal { grid-column: 1; grid-row: 4; }
  body.touch .shop.full .shop-heal .sh-t > span { display: none; }
  body.touch .shop.full #btn-shop-ready { grid-column: 1; grid-row: 6; min-height: 42px; font-size: 16px; }
  body.touch .shop.full #shop-ready-count { display: none; }
  body.touch .shop.full .shop-list { grid-column: 2; grid-row: 1 / -1; min-height: 0; max-height: none; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
  body.touch .shop.full .shop-list .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- build 54: reward pop-ups, action notes, result picture, weekly board ---------- */
.qa-pops { position: fixed; top: max(64px, env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 45; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.qa-pop { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(38,39,44,.97), rgba(23,24,26,.97)); border: 1px solid rgba(67,209,122,.55); box-shadow: 0 10px 30px rgba(0,0,0,.45); animation: qaIn .35s cubic-bezier(.2,1.3,.4,1) both; transition: opacity .5s, transform .5s; }
.qa-pop.ach { border-color: rgba(255,211,63,.7); }
.qa-pop.wk { border-color: rgba(91,227,255,.6); }
.qa-pop.out { opacity: 0; transform: translateY(-14px); }
.qa-ic { font-size: 26px; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.07); }
.qa-m { display: flex; flex-direction: column; min-width: 0; }
.qa-m strong { font-size: 14.5px; line-height: 1.25; }
.qa-m span { font-size: 12.5px; color: #b9bbc3; }
@keyframes qaIn { from { opacity: 0; transform: translateY(-20px) scale(.96); } }
@media (max-height: 520px) and (orientation: landscape) { .qa-pops { top: 8px; width: min(380px, 50%); } .qa-pop { padding: 7px 10px; } .qa-ic { width: 32px; height: 32px; font-size: 20px; } }
.toast.act { display: flex; align-items: center; gap: 10px; pointer-events: auto; }
.toast.act span { flex: 1; }
.share-card { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.share-card img { width: 100%; height: auto; border-radius: 12px; display: block; }
.share-card .row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.share-card .row [hidden] { display: none; }
@media (max-height: 520px) and (orientation: landscape) { .share-card { flex-direction: row; align-items: center; width: min(760px, 100%); } .share-card img { width: auto; max-height: calc(100vh - 64px); } .share-card .row { flex-direction: column; } }
.wk-prize { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,211,63,.1); border: 1px solid rgba(255,211,63,.45); margin-bottom: 8px; }
.wk-box .wk-rows { margin-top: 8px; }
.wk-note { margin: 0 0 8px; }

/* ===== build 56: compact phone HUD. Every piece can be moved and resized (Ayarlar → Ekran düzeni) ===== */
.boss { width: min(420px, calc(100% - 520px)); padding: 6px 12px 8px; }
.boss strong { font-size: 16px; }
.boss-bar { height: 8px; margin-top: 4px; }
.boss-more .boss-n { font-size: 11px; color: var(--dim); font-weight: 600; }
.bs-bar { height: 5px; margin-top: 3px; border-radius: 3px; background: #2a1418; overflow: hidden; }
.bs-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c2263a, #ff5d6e); border-radius: 3px; transition: width .15s; }
.buff.chill { color: #9fe3ff; border-color: #9fe3ff; }
.buff.blood { color: #ff7c8a; border-color: #ff5d6e; }
.buff.guard { color: #ffd678; border-color: #ffd678; }
/* the microphone badge: a small pill, never in the way */
.voice-live { top: max(4px, env(safe-area-inset-top)); gap: 6px; padding: 3px 9px 3px 8px; font-size: 11px; opacity: .92; }
.voice-live .vl-dot { width: 7px; height: 7px; box-shadow: 0 0 0 calc(1px + var(--lv) * 3px) rgba(67,209,122,.35); }
.voice-live.open .vl-dot { box-shadow: 0 0 0 calc(1px + var(--lv) * 3px) rgba(255,122,74,.35); }
.voice-live .vl-bars { height: 9px; }
.voice-live .vl-bars i { width: 2px; height: calc(2px + var(--lv) * 7px); }
.voice-live .vl-bars i:nth-child(2) { height: calc(2px + var(--lv) * 5px); } .voice-live .vl-bars i:nth-child(4) { height: calc(2px + var(--lv) * 4px); } .voice-live .vl-bars i:nth-child(5) { height: calc(2px + var(--lv) * 3px); }
body.touch .voice-live { top: auto; bottom: max(4px, env(safe-area-inset-bottom)); padding: 2px 7px; }
body.touch .voice-live .vl-t { display: none; }
.kfeed { right: var(--mm-r, 16px); }
.mm-box { position: fixed; left: var(--mm-x, -999px); top: var(--mm-y, 0); width: var(--mm-w, 0); height: var(--mm-h, 0); pointer-events: none; }
.t-tools { position: absolute; left: max(10px, env(safe-area-inset-left, 0px)); top: var(--tb-top, 52px); display: flex; gap: 6px; pointer-events: none; }
.t-tools .t-btn { position: static; padding: 7px 11px; font-size: 11.5px; }
/* build 66: Menü and Skor as small round icon buttons (their text stays for screen readers) */
.t-tools .t-btn.t-pause, .t-tools .t-btn.t-score { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; font-size: 0; border-radius: 12px; }
.t-tools .t-btn.t-pause::before { content: '☰'; font-size: 18px; }
.t-tools .t-btn.t-score::before { content: '🏆'; font-size: 16px; }

body.touch .hud-tl { top: max(8px, env(safe-area-inset-top, 0px)); left: max(10px, env(safe-area-inset-left, 0px)); gap: 6px; align-items: flex-start; }
body.touch .wave-box { transform: none; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 7px; row-gap: 3px; padding: 5px 10px 6px; min-width: 0; max-width: 230px; border-radius: 10px; }
body.touch .wave-box .eyebrow { font-size: 10px; }
body.touch #hud-wave { font-size: 22px; margin: 0; }
body.touch .hud-sub { font-size: 11.5px; white-space: nowrap; }
body.touch .mode-tag, body.touch .mev-chip, body.touch .ping-chip { margin-top: 0; font-size: 10px; padding: 1px 6px; align-self: center; }
body.touch .hud-bottom { top: max(8px, env(safe-area-inset-top, 0px)); bottom: auto; transform: translateX(-50%); gap: 6px; flex-wrap: nowrap; width: auto; align-items: stretch; }
body.touch .hp-box { width: 186px; padding: 5px 9px 7px; border-radius: 10px; }
body.touch .hp-top { font-size: 11px; margin-bottom: 4px; gap: 6px; }
body.touch .hp-top #hud-class { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body.touch .hp-bar { height: 8px; }
body.touch .gold-box { padding: 4px 10px; min-width: 0; border-radius: 10px; column-gap: 6px; }
body.touch .gold-box strong { font-size: 16px; }
body.touch .gold-box .coin { width: 13px; height: 13px; }
body.touch .gold-box .kills { font-size: 10.5px; }
body.touch .buffs { position: absolute; left: calc(100% + 6px); top: 0; bottom: auto; flex-direction: column; gap: 3px; }
body.touch .buff { font-size: 10.5px; padding: 2px 7px; white-space: nowrap; }
body.touch .boss { top: calc(max(8px, env(safe-area-inset-top, 0px)) + 52px); width: 236px; min-width: 0; padding: 4px 9px 5px; column-gap: 8px; align-items: center; border-radius: 9px; transition: none; }
body.touch .boss .eyebrow { display: none; }
body.touch .boss strong { font-family: var(--body); font-weight: 700; font-size: 12px; white-space: nowrap; max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
body.touch .boss > .boss-bar { grid-column: 2; margin: 0; height: 7px; }
body.touch .boss-more { gap: 3px; margin-top: 4px; }
body.touch .boss-row { font-size: 10.5px; gap: 6px; }
body.touch .boss-bar.sm { height: 4px; }
body.touch .chat { top: calc(var(--tb-top, 52px) + 40px); }
body.touch .tut { top: calc(max(8px, env(safe-area-inset-top, 0px)) + 78px); }
body.touch .pvp-bar { top: calc(max(8px, env(safe-area-inset-top, 0px)) + 44px); }
@media (max-height: 520px) { body.touch .pvp-bar { top: calc(max(8px, env(safe-area-inset-top, 0px)) + 44px); } }
@media (max-width: 720px) { body.touch .hp-box { width: 150px; } body.touch .boss { width: 200px; } body.touch .gold-box .kills { display: none; } }

/* a piece the player has placed or resized */
body.touch [data-ed] { --ms: 1; }
body.touch [data-ed].moved { position: fixed !important; left: var(--mx) !important; top: var(--my) !important; right: auto !important; bottom: auto !important; margin: 0 !important; transform: translate(-50%, -50%) scale(var(--ms)) !important; transform-origin: 50% 50% !important; }
/* editing the layout */
body.ctl-editing #game { filter: brightness(.45); }
body.ctl-editing .touchpad { z-index: 61; }
.ctl-ed { background: none; pointer-events: none; align-items: center; }
.ctl-bar { pointer-events: auto; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.ctl-bar .ctl-row { display: flex; flex-direction: column; gap: 1px; flex: 1 1 100%; }
.ctl-bar .ctl-hint { font-size: 11.5px; }
.ctl-s { flex: 1 1 100%; }
.ctl-s > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ctl-s > b { flex: 0 0 40px; text-align: right; font-variant-numeric: tabular-nums; }
.ctl-acts { flex-wrap: wrap; }
@media (max-height: 500px) { .ctl-bar .ctl-hint { display: block; } .ctl-bar { padding: 8px 10px; } }
body.ctl-editing [data-ed] { pointer-events: auto !important; cursor: grab; outline: 2px dashed rgba(255,211,77,.7); outline-offset: 3px; touch-action: none; visibility: visible !important; opacity: 1 !important; }
body.ctl-editing [data-ed] * { pointer-events: none !important; }
body.ctl-editing [data-ed].sel { outline: 2px solid #43d17a; box-shadow: 0 0 0 5px rgba(67,209,122,.25); cursor: grabbing; }
body.ctl-editing #boss { display: grid !important; }
body.ctl-editing #btn-armory, body.ctl-editing #t-gear, body.ctl-editing #t-tools { display: flex !important; }
body.ctl-editing #t-tools .t-btn { display: inline-block !important; }
body.ctl-editing .mm-box { background: rgba(255,211,77,.06); }
body.ctl-editing #esc, body.ctl-editing #shop, body.ctl-editing .chat, body.ctl-editing #dead, body.ctl-editing #banner, body.ctl-editing #tut, body.ctl-editing #board, body.ctl-editing .kfeed, body.ctl-editing #quick, body.ctl-editing #streak { visibility: hidden !important; }

/* the armory's Sargı (heal) button on phones: impossible to miss */
body.touch .shop.full .shop-heal { border-width: 2px; padding: 8px 10px; min-height: 44px; border-radius: 10px; }
body.touch .shop.full .shop-heal .sh-t b { font-size: 15px; color: #b9f5cf; display: flex; align-items: center; gap: 6px; }
body.touch .shop.full .shop-heal .sh-t b::before { content: '+'; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: #43d17a; color: #062012; font-weight: 900; font-size: 15px; line-height: 1; }
body.touch .shop.full .shop-heal .sh-t > span { display: block; font-size: 11px; color: #cfe9d8; }
body.touch .shop.full .shop-heal .cost { font-size: 15px; color: var(--gold); }
body.touch .shop.full .shop-heal:disabled { opacity: 1; border-color: rgba(67,209,122,.3); background: rgba(67,209,122,.06); }
body.touch .shop.full .shop-heal:disabled .sh-t b, body.touch .shop.full .shop-heal:disabled .cost { opacity: .55; }
body.touch .shop.full .shop-heal.need { animation: healPulse 1.1s ease-in-out infinite; }
.shop-heal.need { border-color: #43d17a; box-shadow: 0 0 0 0 rgba(67,209,122,.5); animation: healPulse 1.3s ease-in-out infinite; }
@keyframes healPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(67,209,122,.55); } 50% { box-shadow: 0 0 0 7px rgba(67,209,122,0); } }
@media (prefers-reduced-motion: reduce) { .shop-heal.need { animation: none; } }
.armory-fab .fab-heal { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #43d17a; color: #062012; font-weight: 900; font-size: 16px; }
body.ctl-editing .touchpad { display: block !important; visibility: visible !important; }
body.ctl-editing .hud-bottom, body.ctl-editing #boss { visibility: visible !important; }
.ctl-ed { display: block; padding: 0; }
.ctl-bar { position: fixed; left: var(--bx, 44%); top: var(--by, 58%); transform: translate(-50%, -50%); width: min(310px, 62vw); max-width: none; padding: 8px 10px; gap: 5px 10px; border-radius: 12px; }
.ctl-bar .ctl-row { cursor: move; touch-action: none; padding-bottom: 2px; }
.ctl-bar .ctl-row strong::after { content: ' ⠿'; opacity: .5; font-weight: 400; }
.ctl-bar .ctl-hint { flex: none; margin: 0; line-height: 1.25; }
.ctl-s > span { flex: 0 0 96px; font-size: 11.5px; }
.ctl-c { flex: 1 1 100%; justify-content: space-between; }
.ctl-acts { flex: 1 1 100%; margin: 0; justify-content: space-between; gap: 6px; }
.ctl-acts .btn { padding: 6px 9px; font-size: 11.5px; min-height: 30px; }
/* narrow class cards: the lock tag keeps only the gem price so it never spills past the card */
.class-card .cls-tag { max-width: calc(100% - 14px); white-space: nowrap; overflow: hidden; }
@container (max-width: 150px) { .class-card .cls-tag.lock > span:first-child { display: none; } }
/* the owner's events (gem weekend, sale): a bright bar inside the page, taking its own room (build 64) */
.ev-strip { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0 0 12px; padding: 9px 14px; border-radius: 12px; background: linear-gradient(90deg, #ffb703, #ff6b2c 55%, #f15bb5); color: #1b0d03; font-size: 14px; box-shadow: 0 6px 20px rgba(255,107,44,.3); animation: evsGlow 2.2s ease-in-out infinite; }
.ev-strip[hidden] { display: none; }
.ev-strip .evs-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .02em; }
.ev-strip .evs-ic { font-size: 16px; }
.ev-strip .evs-left { font-weight: 700; opacity: .85; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-strip.mini { flex-basis: 100%; margin: 4px 0 0; padding: 3px 9px; border-radius: 8px; font-size: 11px; gap: 6px; box-shadow: none; }
.ev-strip.mini .evs-left { display: none; }
@keyframes evsGlow { 50% { box-shadow: 0 6px 26px rgba(241,91,181,.5); } }
@media (max-width: 560px) { .ev-strip { font-size: 12px; padding: 7px 10px; gap: 6px; } .ev-strip .evs-left { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .ev-strip { animation: none; } }
/* the owner's hidden view, listening to voice chat (build 65) */
.watch-lsn { position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 80; padding: 5px 12px; border-radius: 999px; background: rgba(0,0,0,.75); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 12px; pointer-events: none; }
.player .p-name .mute { align-self: flex-start; margin-top: 3px; padding: 2px 8px; font-size: 11px; min-height: 0; }
.player .p-name .mute.on { color: #ff8a8d; border-color: rgba(255,90,95,.45); }
/* build 66: shared playful buttons (also used on the landing page) */
.btn.lp-play::before { content: '▶'; margin-right: 10px; font-size: .8em; }
.btn.lp-play { font-size: 19px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 8px 26px rgba(34,197,94,.3); }
.btn.tile-btn { color: #fff; border: 0; background: linear-gradient(180deg, #484a52, #37383f); text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.btn.tile-btn.t-blue { background: linear-gradient(180deg, #6b93ff, #4c6fff); }
.btn.tile-btn.t-purple { background: linear-gradient(180deg, #a77bff, #8455f0); }
.btn.tile-btn.t-teal { background: linear-gradient(180deg, #2fd0c0, #14a99b); }
.btn.tile-btn:hover { filter: brightness(1.1); }
/* build 66: friends' message pop-ups (top right on PC, top of the screen on phones) and the call card */
.soc-pops { position: fixed; top: max(12px, env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 24px)); pointer-events: none; }
.soc-pop, .soc-call { pointer-events: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: linear-gradient(180deg, #393a41, #2d2e33); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 14px 34px rgba(0,0,0,.45); animation: socIn .28s cubic-bezier(.2,1.3,.4,1); }
.soc-pop.out { opacity: 0; transform: translateX(20px); transition: opacity .35s, transform .35s; }
.soc-pop.sent { border-color: rgba(34,197,94,.6); }
.soc-pop.info { grid-template-columns: auto minmax(0, 1fr) auto; border-color: rgba(239,68,68,.45); }
.soc-pop.info .soc-tx { cursor: default; }
.soc-pop.mini { padding: 7px 10px; }
.soc-pop .soc-reply { grid-column: 1 / -1; display: flex; gap: 6px; }
.soc-pop .soc-reply input { padding: 8px 10px; font-size: 14px; }
.soc-av { width: 40px; height: 40px; border-radius: 12px; background: #1d1e21; }
.soc-tx { min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.soc-tx strong { font-weight: 900; font-size: 14px; }
.soc-tx span { font-size: 13px; color: #d2d4d9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-x { appearance: none; border: 0; background: none; color: var(--dim); font-size: 20px; cursor: pointer; padding: 0 2px; }
.soc-call { position: fixed; z-index: 95; left: 50%; top: max(14px, env(safe-area-inset-top, 0px)); transform: translateX(-50%); grid-template-columns: auto minmax(0, 1fr); width: min(420px, calc(100vw - 24px)); padding: 12px 14px; border-color: rgba(34,197,94,.45); }
.soc-call .soc-av { width: 48px; height: 48px; border-radius: 50%; }
.soc-call .soc-acts { grid-column: 1 / -1; display: flex; gap: 8px; }
.soc-call .soc-acts .btn { flex: 1; }
.soc-call .soc-ey { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.soc-call .gvc-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: var(--panel); }
.soc-st { font-size: 13px; color: #8ff0b4; font-weight: 700; }
@keyframes socIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } }
.soc-call { animation-name: socInC; }
@keyframes socInC { from { opacity: 0; transform: translate(-50%, -12px) scale(.96); } }
@media (max-width: 560px) { .soc-pops { left: 12px; right: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .soc-pop, .soc-call { animation: none; } }
body.soc-calling .soc-pops { top: calc(max(14px, env(safe-area-inset-top, 0px)) + 150px); }
/* ===== build 67: landing page ===== */
.menu-card { background: linear-gradient(180deg, rgba(89,92,103,.55), rgba(34,35,39,.88) 40%); border: 1px solid rgba(150,140,255,.28); border-radius: 26px; box-shadow: 0 30px 80px rgba(5,6,25,.6), 0 0 0 1px rgba(255,255,255,.03) inset, 0 0 60px rgba(124,92,255,.18); }
.mc-head strong { font-size: 24px; }
.lp-cls { border-radius: 18px; background: linear-gradient(170deg, rgba(124,92,255,.32), rgba(34,35,39,.75)); border: 1px solid rgba(150,140,255,.22); }
.lp-cls:hover { border-color: #a78bfa; box-shadow: 0 8px 20px rgba(124,92,255,.35); }
.lp-top { background: linear-gradient(180deg, rgba(35,36,41,.65), rgba(35,36,41,0)); }
.screen.menu::after { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(900px 600px at 0% 0%, rgba(124,92,255,.35), transparent 60%), radial-gradient(800px 600px at 100% 100%, rgba(56,189,248,.18), transparent 60%), linear-gradient(180deg, rgba(34,35,40,.35), rgba(18,18,20,.55)); }
body.signed .screen.menu::after { display: none; }
/* ===== build 67: lobby class cards in their own colour ===== */
.class-card { background: linear-gradient(150deg, color-mix(in srgb, var(--cc, #7c5cff) 28%, transparent), rgba(34,35,39,.6) 60%), var(--panel); border: 1px solid color-mix(in srgb, var(--cc, #7c5cff) 35%, transparent); border-radius: 20px; }
.class-card .cls-role { color: var(--cc, var(--accent)); }
.class-card[aria-checked="true"] { border-color: var(--cc, var(--accent)); box-shadow: 0 0 0 2px var(--cc, var(--accent)), 0 10px 30px color-mix(in srgb, var(--cc, #7c5cff) 35%, transparent); }
.class-card .class-preview { border-radius: 16px; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--cc, #7c5cff) 40%, transparent), rgba(0,0,0,.25)); }
.room-code, .code-box { border-radius: 18px; }
/* ===== build 67: dialogs, Esc menu and the end screen get the same deep, glowing cards ===== */
.confirm { background: rgba(8,8,30,.72); }
.confirm-card, .settings-dlg, .esc-card { border-radius: 26px; background: linear-gradient(180deg, rgba(89,92,103,.6), rgba(34,35,39,.96) 35%); border: 1px solid rgba(150,140,255,.28); }
.confirm-card h3, .settings-dlg h3 { font-family: var(--display); font-weight: 800; font-size: 20px; }
.over-wrap { border-radius: 28px; }
.shop-item { border-radius: 16px; }
.ab-box.ready { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,107,44,.35), 0 8px 22px rgba(0,0,0,.35); }
.code-box { border: 0; border-radius: 22px; background: linear-gradient(135deg, rgba(255,140,60,.35), rgba(124,92,255,.35)); box-shadow: 0 10px 30px rgba(5,6,25,.45), inset 0 1px 0 rgba(255,255,255,.12); }
.room-code { color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
#map-list button, #diff-list button, #mode-list button { border-radius: 14px; }

/* build 73: the game's addresses in the settings */
.set-sites { display: flex; flex-wrap: wrap; gap: 8px; }
.set-sites .btn { flex: 1 1 120px; }

/* build 73: voice blocked until a tap */
.voice-tap { position: fixed; z-index: 96; left: 50%; bottom: max(90px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); padding: 10px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700; pointer-events: none; }

/* ---------- build 75: twists, objectives, perks ---------- */
.hud-var { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
.hud-var:empty, .hud-var:not(:has(> :not([hidden]))) { display: none; }
.tw-chip { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(22,24,30,.88); color: #dfe6ff; border: 1px solid #4a5170; animation: mevIn .4s ease-out; }
.tw-chip .ic { width: 15px; height: 15px; margin-right: 6px; }
.tw-chip.hard { background: #4a1220; color: #ffd6dc; border-color: #ff5a6e; }
.tw-hard { pointer-events: auto; font: inherit; font-size: 13px; font-weight: 800; padding: 9px 14px; min-height: 40px; border-radius: 12px; border: 1px solid #ff5a6e; background: #2a0c14; color: #ffd6dc; cursor: pointer; }
.tw-hard:hover { background: #3c111c; }
.tw-hard.on { background: #ff5a6e; color: #1a0508; }
.obj-box { min-width: 240px; padding: 7px 11px 8px; border-radius: 12px; background: rgba(16,18,22,.88); border: 1px solid rgba(255,190,80,.55); }
.obj-top { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.obj-top .obj-ic .ic { width: 16px; height: 16px; color: #ffc65a; }
.obj-top strong { flex: 1; color: #fff1d6; }
.obj-pct { color: #ffc65a; font-weight: 700; font-variant-numeric: tabular-nums; }
.obj-bar { margin-top: 5px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.obj-bar i { display: block; height: 100%; width: 0; background: #ffc65a; transition: width .3s; }
.obj-box.done { border-color: #43d17a; } .obj-box.done .obj-bar i { background: #43d17a; }
.obj-box.fail { border-color: #ff5a5f; opacity: .8; } .obj-box.fail .obj-bar i { background: #ff5a5f; }
.perk-pick { position: absolute; left: max(16px, calc(50% - 430px)); top: 150px; width: min(500px, calc(100vw - 32px)); padding: 12px; border-radius: 18px; background: rgba(18,19,24,.95); border: 1px solid rgba(255,211,77,.55); box-shadow: 0 18px 40px rgba(0,0,0,.5); z-index: 9; animation: mevIn .3s ease-out; }
.pp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 2px 9px; }
.pp-head strong { font-family: var(--display); font-size: 19px; color: #ffe08a; }
.pp-head span { font-size: 12px; color: var(--dim); }
.pp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pp-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 12px 8px 10px; min-height: 128px; border-radius: 14px; border: 1px solid #3d4150; background: #24262e; color: var(--text); font: inherit; cursor: pointer; }
.pp-card:hover, .pp-card:focus-visible { border-color: #ffd34d; background: #2c2e38; }
.pp-card .pp-ic .ic { width: 30px; height: 30px; color: #ffd34d; }
.pp-card strong { font-size: 14px; line-height: 1.15; }
.pp-card .pp-d { font-size: 12px; line-height: 1.3; color: #b9bbc3; }
.pp-card .pp-r { position: absolute; top: 6px; right: 7px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #9ad0ff; }
.pp-card.r1 { border-color: #3a6aa0; } .pp-card.r1 .pp-ic .ic { color: #9ad0ff; }
.pp-card.r2 { border-color: #9b5cff; } .pp-card.r2 .pp-ic .ic { color: #c9a2ff; } .pp-card.r2 .pp-r { color: #c9a2ff; }
.hud-perks { position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); bottom: 132px; display: flex; flex-wrap: wrap; gap: 4px; max-width: 220px; pointer-events: auto; }
.hp-perk { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(16,16,18,.85); border: 1px solid #5a5030; color: #ffd34d; }
.hp-perk .ic { width: 17px; height: 17px; }
.hp-perk.r1 { border-color: #3a6aa0; color: #9ad0ff; } .hp-perk.r2 { border-color: #9b5cff; color: #c9a2ff; }
.hp-perk b { position: absolute; right: -4px; bottom: -4px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: #ffd34d; color: #111; font-size: 10px; line-height: 14px; text-align: center; }
body.touch .hud-var { position: fixed; left: max(10px, env(safe-area-inset-left, 0px)); top: calc(max(8px, env(safe-area-inset-top, 0px)) + 100px); z-index: 3; }
body.touch .tw-chip { font-size: 12px; padding: 3px 9px; }
body.touch .obj-box { min-width: 200px; padding: 5px 9px 6px; }
body.touch .perk-pick { position: fixed; left: 0; right: 0; margin: 0 auto; top: calc(max(8px, env(safe-area-inset-top, 0px)) + 54px); padding: 9px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45), 0 18px 40px rgba(0,0,0,.5); }
body.touch .pp-card { min-height: 112px; padding: 10px 6px 8px; }
body.touch .pp-card .pp-d { font-size: 11px; }
body.touch .hud-perks { left: auto; right: max(10px, env(safe-area-inset-right, 0px)); bottom: auto; top: calc(max(8px, env(safe-area-inset-top, 0px)) + 150px); max-width: 64px; justify-content: flex-end; pointer-events: none; }
body.touch .hp-perk { width: 24px; height: 24px; }
@media (prefers-reduced-motion: reduce) { .tw-chip, .perk-pick { animation: none !important; } }
.ov-perks { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-left: 6px; vertical-align: middle; }
.ov-perk { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: #2a2b31; color: #ffd34d; }
.ov-perk .ic { width: 12px; height: 12px; }
.ov-perk.r1 { color: #9ad0ff; } .ov-perk.r2 { color: #c9a2ff; }
