/* ================================================================
   WEBVALO — Valorant-inspired UI
   Ink navy / signal red / bone white. Hard angles. Anton + Rajdhani.
   ================================================================ */

:root {
  --ink: #0f1923;
  --ink-2: #1f2933;
  --ink-3: #2c3845;
  --red: #ff4655;
  --red-dim: #bd3944;
  --bone: #ece8e1;
  --teal: #53d9d1;
  --gold: #f5b945;
  --green: #6fdc8c;
  --font-display: 'Anton', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --cut: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --cut-sm: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; background: var(--ink); color: var(--bone); font-family: var(--font-body); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.mono { font-family: var(--font-mono); }
.hidden { display: none !important; }

/* ---------- screens ---------- */
.screen { position: fixed; inset: 0; display: none; }
.screen.active { display: block; animation: screenIn .45s cubic-bezier(.22,1,.36,1) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- shared backgrounds ---------- */
.bg-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(236,232,225,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236,232,225,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 100%);
}
.bg-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 420px at 78% 18%, rgba(255,70,85,.16), transparent 70%),
    radial-gradient(700px 500px at 15% 85%, rgba(83,217,209,.07), transparent 70%);
}

/* ================= LANDING ================= */
#screen-landing { background: linear-gradient(160deg, #0f1923 0%, #101b26 55%, #16121a 100%); }

.landing-deco-text {
  position: absolute; right: -3.2rem; top: 50%; transform: rotate(90deg);
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .6em; color: rgba(236,232,225,.25);
}
.landing-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center; padding: 2rem 3rem;
}
.logo-mark { width: 38px; height: 38px; background: var(--red); clip-path: polygon(0 0, 45% 0, 45% 100%, 0 30%); position: relative; }
.logo-mark::after { content: ''; position: absolute; inset: 0; left: 55%; background: var(--bone); clip-path: polygon(0 0, 100% 0, 45% 100%, 0 100%); }
.top-meta { display: flex; gap: .6rem; }
.meta-chip {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .2em; padding: .4rem .7rem;
  border: 1px solid rgba(236,232,225,.2); color: rgba(236,232,225,.6); clip-path: var(--cut-sm);
}
.meta-chip.red { border-color: rgba(255,70,85,.5); color: var(--red); }

.landing-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.6rem; text-align: center;
}
.landing-title {
  font-family: var(--font-display); font-size: clamp(5rem, 16vw, 13rem);
  line-height: .85; letter-spacing: .01em; display: flex;
}
.title-line { display: inline-block; animation: titleSlide .7s cubic-bezier(.22,1,.36,1) both; }
.title-line.red { color: var(--red); animation-delay: .12s; text-shadow: 0 0 80px rgba(255,70,85,.45); }
@keyframes titleSlide { from { opacity: 0; transform: translateY(40px) skewX(-6deg); } to { opacity: 1; transform: none; } }

.landing-sub {
  font-size: 1rem; font-weight: 600; letter-spacing: .55em; color: rgba(236,232,225,.55);
  animation: fadeUp .6s .35s both;
}
.landing-hints {
  display: flex; align-items: center; gap: .9rem; font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .18em; color: rgba(236,232,225,.4); animation: fadeUp .6s .6s both;
}
.landing-hints i { width: 4px; height: 4px; background: var(--red); transform: rotate(45deg); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.landing-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 1.6rem 3rem;
  display: flex; justify-content: space-between; font-family: var(--font-mono);
  font-size: .62rem; letter-spacing: .15em; color: rgba(236,232,225,.3);
}

/* ---------- buttons ---------- */
.btn-primary {
  position: relative; display: inline-flex; align-items: center; gap: 1rem;
  background: var(--red); color: var(--ink); padding: 1.1rem 3.4rem;
  font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .12em;
  clip-path: var(--cut); transition: transform .15s ease, background .15s ease;
  animation: fadeUp .6s .5s both;
}
.btn-primary:hover { background: var(--bone); transform: translateY(-2px); }
.btn-primary:disabled { background: var(--ink-3); color: rgba(236,232,225,.3); cursor: not-allowed; transform: none; }
.btn-primary.big { font-size: 1.8rem; padding: 1.2rem 4.2rem; }
.btn-arrow { font-size: 1.2rem; }
.btn-ghost {
  font-family: var(--font-body); font-weight: 700; letter-spacing: .25em; font-size: .8rem;
  color: rgba(236,232,225,.6); padding: .8rem 1.4rem; border: 1px solid rgba(236,232,225,.25);
  clip-path: var(--cut-sm); transition: all .15s;
}
.btn-ghost:hover { color: var(--bone); border-color: var(--bone); }

/* ================= AGENT SELECT ================= */
#screen-agents { background: linear-gradient(135deg, #0f1923 0%, #131e2b 60%, #1a1420 100%); flex-direction: column; }
#screen-agents.active { display: flex; }

.select-header {
  display: flex; align-items: center; justify-content: space-between; padding: 1.6rem 3rem; z-index: 2;
}
.select-title { font-family: var(--font-display); font-size: 2rem; letter-spacing: .08em; }
.select-title em { font-style: normal; color: var(--red); }
.select-timer { font-size: 1.4rem; color: var(--red); border: 1px solid rgba(255,70,85,.4); padding: .3rem 1rem; clip-path: var(--cut-sm); }

.select-body { flex: 1; display: flex; gap: 2rem; padding: 0 3rem; min-height: 0; z-index: 2; }

.agent-rail { flex: 1.4; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; align-content: center; }
.agent-card {
  position: relative; aspect-ratio: 3 / 4.4; clip-path: var(--cut); overflow: hidden;
  border: 1px solid rgba(236,232,225,.12); background: var(--ink-2);
  transition: transform .2s cubic-bezier(.22,1,.36,1), border-color .2s; text-align: left;
}
.agent-card:hover { transform: translateY(-8px); border-color: rgba(236,232,225,.4); }
.agent-card.selected { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 18px 50px -12px rgba(255,70,85,.45); transform: translateY(-8px); }
.agent-card .card-bg { position: absolute; inset: 0; opacity: .92; }
.agent-card .card-figure {
  position: absolute; inset: 12% 18% 22% 18%;
  clip-path: polygon(50% 0, 78% 14%, 78% 52%, 96% 100%, 4% 100%, 22% 52%, 22% 14%);
  opacity: .95; mix-blend-mode: screen;
}
.agent-card .card-name {
  position: absolute; left: .8rem; bottom: .6rem; font-family: var(--font-display);
  font-size: 1.25rem; letter-spacing: .06em; color: var(--bone); text-shadow: 0 2px 12px rgba(0,0,0,.7);
}
.agent-card .card-role {
  position: absolute; left: .8rem; bottom: 2.1rem; font-family: var(--font-mono);
  font-size: .55rem; letter-spacing: .25em; color: rgba(236,232,225,.75);
}
.agent-card .card-num {
  position: absolute; top: .5rem; right: .7rem; font-family: var(--font-display);
  font-size: 1rem; color: rgba(236,232,225,.35);
}
.agent-card.selected .card-num { color: var(--red); }

.agent-detail {
  flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1.1rem; padding: 1rem 0;
}
.detail-role { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .4em; color: var(--red); }
.detail-name { font-family: var(--font-display); font-size: clamp(3rem, 6vw, 5.5rem); line-height: .9; letter-spacing: .02em; }
.detail-bio { font-size: 1.02rem; font-weight: 500; color: rgba(236,232,225,.7); max-width: 46ch; line-height: 1.5; }
.detail-abilities { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-top: .4rem; max-width: 480px; }
.detail-ab {
  border: 1px solid rgba(236,232,225,.14); background: rgba(31,41,51,.55); padding: .7rem .65rem;
  clip-path: var(--cut-sm); display: flex; flex-direction: column; gap: .35rem;
}
.detail-ab .key { font-family: var(--font-display); color: var(--red); font-size: .95rem; }
.detail-ab .ab-ic { font-size: 1.25rem; line-height: 1; }
.detail-ab .ab-name { font-size: .68rem; font-weight: 700; letter-spacing: .12em; color: rgba(236,232,225,.85); }
.detail-ab .ab-desc { font-size: .62rem; color: rgba(236,232,225,.45); line-height: 1.35; }
.detail-ab.ult { border-color: rgba(245,185,69,.5); }
.detail-ab.ult .key { color: var(--gold); }

.select-footer {
  display: flex; align-items: center; justify-content: space-between; padding: 1.4rem 3rem 2rem; z-index: 2;
}
.map-pick { display: flex; align-items: center; gap: 1.2rem; }
.map-label { font-family: var(--font-mono); font-size: .65rem; letter-spacing: .35em; color: rgba(236,232,225,.45); }
.map-card {
  display: flex; align-items: center; gap: 1rem; border: 1px solid rgba(236,232,225,.18);
  padding: .6rem .9rem; clip-path: var(--cut-sm); background: rgba(31,41,51,.5);
}
.map-thumb {
  width: 84px; height: 48px; clip-path: var(--cut-sm);
  background:
    linear-gradient(135deg, rgba(255,70,85,.7), transparent 55%),
    repeating-linear-gradient(45deg, #2c3845 0 8px, #24303c 8px 16px);
}
.map-info { display: flex; flex-direction: column; }
.map-info strong { font-family: var(--font-display); letter-spacing: .1em; font-size: 1.05rem; }
.map-info span { font-family: var(--font-mono); font-size: .55rem; letter-spacing: .15em; color: rgba(236,232,225,.45); }
.map-locked { font-size: .7rem; color: var(--teal); }

/* ================= GAME / HUD ================= */
#screen-game { background: #000; }
#game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- loading ---------- */
.loading {
  position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #16222e 0%, #0c141c 100%);
}
.loading-box { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; text-align: center; }
.loading-mark {
  width: 54px; height: 54px; background: var(--red); position: relative;
  clip-path: polygon(0 0, 45% 0, 45% 100%, 0 30%); animation: loadSpin 1.2s linear infinite;
}
.loading-mark::after { content: ''; position: absolute; inset: 0; left: 55%; background: var(--bone); clip-path: polygon(0 0, 100% 0, 45% 100%, 0 100%); }
@keyframes loadSpin { 50% { transform: rotate(8deg) scale(.92); } }
.loading-box h3 { font-family: var(--font-display); font-size: 2.4rem; letter-spacing: .18em; }
.loading-bar { width: min(360px, 70vw); height: 6px; background: rgba(236,232,225,.12); clip-path: var(--cut-sm); }
.loading-fill { height: 100%; width: 0; background: var(--red); transition: width .25s ease; }
.loading-box p { font-size: .68rem; letter-spacing: .25em; color: rgba(236,232,225,.5); }
#btn-deploy { margin-top: .4rem; animation: fadeUp .3s both; }

.hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-body); }

/* crosshair */
.crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.crosshair i { position: absolute; background: #aef9e9; box-shadow: 0 0 4px rgba(0,0,0,.8); }
.crosshair i:nth-child(1) { width: 2px; height: 7px; left: -1px; top: -13px; }
.crosshair i:nth-child(2) { width: 2px; height: 7px; left: -1px; top: 6px; }
.crosshair i:nth-child(3) { width: 7px; height: 2px; left: -13px; top: -1px; }
.crosshair i:nth-child(4) { width: 7px; height: 2px; left: 6px; top: -1px; }
#hitmarker {
  position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; opacity: 0;
  background:
    linear-gradient(45deg, transparent 42%, #fff 42% 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, #fff 42% 58%, transparent 58%);
}
#hitmarker.show { animation: hitPop .18s ease-out; }
#hitmarker.kill { filter: drop-shadow(0 0 6px var(--red)); background:
    linear-gradient(45deg, transparent 42%, var(--red) 42% 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, var(--red) 42% 58%, transparent 58%); }
@keyframes hitPop { 0% { opacity: 1; transform: scale(1.5); } 100% { opacity: 0; transform: scale(.8); } }

/* top */
.hud-top { position: absolute; top: 1.2rem; left: 50%; transform: translateX(-50%); }
.scoreboard { display: flex; align-items: stretch; gap: 2px; }
.score {
  font-family: var(--font-display); font-size: 1.5rem; padding: .25rem 1.1rem;
  background: rgba(15,25,35,.75); clip-path: var(--cut-sm);
}
.score.ally { color: var(--teal); }
.score.enemy { color: var(--red); }
.round-clock { font-size: 1.1rem; padding: .55rem 1rem; background: rgba(15,25,35,.75); color: var(--bone); clip-path: var(--cut-sm); }

/* killfeed */
.killfeed { position: absolute; top: 1.2rem; right: 1.4rem; display: flex; flex-direction: column; gap: .35rem; align-items: flex-end; }
.kf-row {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em;
  background: rgba(15,25,35,.8); border-right: 3px solid var(--red);
  padding: .35rem .7rem; clip-path: var(--cut-sm); animation: kfIn .25s ease-out both;
}
.kf-row .k { color: var(--teal); font-weight: 700; } .kf-row .d { color: var(--red); }
.kf-row.enemy { border-right-color: var(--teal); }
.kf-row.enemy .k { color: var(--red); } .kf-row.enemy .d { color: var(--teal); }
@keyframes kfIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* bottom left: hp */
.hud-bottom-left { position: absolute; left: 1.6rem; bottom: 1.4rem; display: flex; flex-direction: column; gap: .5rem; }
.hp-block { display: flex; align-items: center; gap: .8rem; background: rgba(15,25,35,.7); padding: .6rem .9rem; clip-path: var(--cut-sm); }
.hp-num { font-family: var(--font-display); font-size: 2rem; min-width: 3.2rem; color: var(--bone); }
.hp-bar, .armor-bar { width: 150px; height: 7px; background: rgba(236,232,225,.12); }
.armor-bar { height: 4px; margin-top: 4px; }
.hp-fill { height: 100%; width: 100%; background: var(--bone); transition: width .2s; }
.hp-fill.low { background: var(--red); }
.armor-fill { height: 100%; width: 100%; background: var(--teal); transition: width .2s; }
.money { font-size: .85rem; color: var(--green); letter-spacing: .1em; }

/* bottom center: abilities */
.hud-bottom-center { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); }
.abilities { display: flex; gap: .55rem; }
.ability {
  position: relative; width: 62px; height: 56px; background: rgba(15,25,35,.75);
  clip-path: var(--cut-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-bottom: 2px solid rgba(236,232,225,.25);
}
.ability .ic { font-size: 1.3rem; line-height: 1; }
.ability .kb { font-family: var(--font-mono); font-size: .58rem; color: rgba(236,232,225,.55); letter-spacing: .1em; }
.ability .cd {
  position: absolute; inset: 0; background: rgba(15,25,35,.85); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.1rem; color: var(--red); opacity: 0; transition: opacity .15s;
}
.ability.cooling .cd { opacity: 1; }
.ability.ready { border-bottom-color: var(--teal); }
.ability.ult { border-bottom-color: var(--gold); width: 70px; }
.ability.ult .ult-pips { display: flex; gap: 3px; position: absolute; bottom: 4px; }
.ability.ult .pip { width: 5px; height: 5px; transform: rotate(45deg); background: rgba(236,232,225,.2); }
.ability.ult .pip.on { background: var(--gold); }
.ability.ult.ready { box-shadow: 0 0 18px rgba(245,185,69,.45); animation: ultPulse 1.6s infinite; }
@keyframes ultPulse { 50% { box-shadow: 0 0 28px rgba(245,185,69,.75); } }

/* charge count badge (e.g. Raze's 2 Blast Packs) */
.charge-badge {
  position: absolute; top: 3px; right: 4px; min-width: 14px; height: 14px; padding: 0 3px;
  font-family: var(--font-display); font-size: .72rem; line-height: 14px; text-align: center;
  color: var(--ink); background: var(--teal); clip-path: var(--cut-sm);
}
.charge-badge.partial { background: var(--gold); }
.charge-badge.depleted { background: var(--red-dim); color: rgba(236,232,225,.7); }

/* bottom right: weapon */
.hud-bottom-right { position: absolute; right: 1.6rem; bottom: 1.4rem; text-align: right; background: rgba(15,25,35,.7); padding: .6rem 1rem; clip-path: var(--cut-sm); }
.weapon-name { font-weight: 700; letter-spacing: .25em; font-size: .75rem; color: rgba(236,232,225,.6); }
.ammo { font-family: var(--font-display); font-size: 2rem; color: var(--bone); }
.ammo-res { font-size: .8rem; color: rgba(236,232,225,.45); margin-left: .4rem; }

/* announcements */
.announce {
  position: absolute; top: 22%; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-size: 3rem; letter-spacing: .15em; color: var(--bone);
  text-shadow: 0 0 40px rgba(255,70,85,.6); opacity: 0; pointer-events: none; white-space: nowrap;
}
.announce.show { animation: annIn 2.2s ease-out both; }
.announce.red { color: var(--red); }
@keyframes annIn { 0% { opacity: 0; transform: translateX(-50%) scale(1.3); } 12% { opacity: 1; transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

/* kill streak banner */
.streak {
  position: absolute; top: 32%; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-size: 1.8rem; letter-spacing: .22em; color: var(--gold);
  text-shadow: 0 0 28px rgba(245,185,69,.7); opacity: 0; pointer-events: none; white-space: nowrap;
}
.streak.show { animation: streakIn 1.6s ease-out both; }
@keyframes streakIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.8); }
  16% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.08); }
  30% { transform: translateX(-50%) translateY(0) scale(1); }
  78% { opacity: 1; } 100% { opacity: 0; }
}

/* overlays */
.damage-vignette {
  position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(255,70,85,.55) 100%);
}
.flash-overlay { position: absolute; inset: 0; background: #fff; opacity: 0; transition: opacity .2s; }
.ult-overlay {
  position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .4s;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(83,217,209,.25) 100%);
  backdrop-filter: hue-rotate(0deg);
}
.ult-overlay.yoru { opacity: 1; background: radial-gradient(ellipse at center, rgba(20,10,40,.25) 30%, rgba(60,20,120,.55) 100%); }

/* ================= BUY MENU ================= */
.buy-menu {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(880px, 92vw); background: rgba(15,25,35,.96); border: 1px solid rgba(236,232,225,.15);
  clip-path: var(--cut); padding: 1.6rem 1.8rem; z-index: 30; animation: screenIn .25s ease-out;
}
.buy-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.2rem; }
.buy-head h3 { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: .08em; }
.buy-head em { font-style: normal; font-family: var(--font-mono); font-size: .65rem; color: var(--green); letter-spacing: .2em; }
.buy-money { color: var(--green); font-size: 1.1rem; }
.buy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.buy-item {
  display: flex; flex-direction: column; gap: .3rem; text-align: left; padding: .9rem 1rem;
  background: var(--ink-2); border: 1px solid rgba(236,232,225,.1); clip-path: var(--cut-sm);
  transition: all .12s;
}
.buy-item:hover { border-color: var(--red); background: var(--ink-3); transform: translateY(-2px); }
.buy-item.equipped { border-color: var(--teal); }
.buy-item.cant-afford { opacity: .42; cursor: not-allowed; }
.buy-item.cant-afford:hover { transform: none; border-color: rgba(236,232,225,.1); background: var(--ink-2); }
.buy-item.cant-afford .bi-price { color: var(--red); }
.buy-item .bi-top { display: flex; justify-content: space-between; align-items: baseline; }
.buy-item .bi-key { font-family: var(--font-mono); font-size: .6rem; color: var(--red); }
.buy-item .bi-name { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .08em; }
.buy-item .bi-stats { font-family: var(--font-mono); font-size: .58rem; color: rgba(236,232,225,.45); letter-spacing: .08em; }
.buy-item .bi-price { font-family: var(--font-mono); font-size: .68rem; color: var(--green); }
.buy-foot { margin-top: 1.2rem; font-size: .62rem; letter-spacing: .15em; color: rgba(236,232,225,.4); }
.buy-foot b { color: var(--red); }

/* ================= PAUSE / DEATH ================= */
.pause-menu, .death-screen {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(15,25,35,.82); z-index: 40; backdrop-filter: blur(6px);
}
.pause-box, .death-box { display: flex; flex-direction: column; gap: 1.2rem; align-items: center; text-align: center; }
.pause-box h3, .death-box h3 { font-family: var(--font-display); font-size: 3.4rem; letter-spacing: .1em; }
.death-box h3 { color: var(--red); text-shadow: 0 0 60px rgba(255,70,85,.7); }
.death-box p { color: rgba(236,232,225,.6); letter-spacing: .2em; font-size: .8rem; }

/* ================= SETTINGS ================= */
.settings-modal {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(8,14,20,.78); backdrop-filter: blur(8px);
}
.settings-box {
  width: min(540px, 92vw); background: rgba(15,25,35,.97); border: 1px solid rgba(236,232,225,.15);
  clip-path: var(--cut); padding: 1.6rem 1.8rem; display: flex; flex-direction: column; gap: 1.1rem;
  animation: screenIn .22s ease-out;
}
.settings-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .2rem; }
.settings-head h3 { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: .1em; }
.setting-row { display: grid; grid-template-columns: 1.1fr 1.5fr auto; align-items: center; gap: 1rem; }
.setting-row label { font-weight: 700; letter-spacing: .12em; font-size: .8rem; color: rgba(236,232,225,.82); }
.setting-row label small { display: block; font-weight: 500; letter-spacing: .06em; font-size: .58rem; color: rgba(236,232,225,.4); }
.setting-row.toggle { grid-template-columns: 1fr auto; }
.set-val { color: var(--teal); font-size: .85rem; min-width: 3rem; text-align: right; }
.settings-box input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  background: rgba(236,232,225,.16); outline: none; cursor: pointer;
}
.settings-box input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; background: var(--red); cursor: pointer;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.settings-box input[type=range]::-moz-range-thumb { width: 15px; height: 15px; border: none; background: var(--red); cursor: pointer; }
.set-switch { width: 48px; height: 24px; background: rgba(236,232,225,.16); position: relative; clip-path: var(--cut-sm); transition: background .15s; }
.set-switch span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: var(--bone); transition: left .15s, background .15s; }
.set-switch.on { background: var(--teal); }
.set-switch.on span { left: 27px; background: var(--ink); }
.settings-foot { font-size: .58rem; letter-spacing: .2em; color: rgba(236,232,225,.35); text-align: center; margin-top: .3rem; }
.landing-settings { margin-top: -.2rem; }

/* FPS meter */
.fps-meter {
  position: absolute; top: 1.2rem; left: 1.4rem; font-size: .68rem; letter-spacing: .12em;
  color: var(--teal); background: rgba(15,25,35,.7); padding: .25rem .55rem; clip-path: var(--cut-sm);
}

@media (max-width: 900px) {
  .agent-rail { grid-template-columns: repeat(3, 1fr); }
  .select-body { flex-direction: column; overflow-y: auto; }
  .buy-grid { grid-template-columns: repeat(2, 1fr); }
}
