/* Souk Siege — one deliberate look: dusk over a desert town.
   Ink ground, plaster text, saffron accent, zellige teal secondary. */
:root {
  --ink: #12151c;
  --ink-2: #1b202a;
  --ink-3: #262c38;
  --line: rgba(239, 228, 207, 0.14);
  --plaster: #efe4cf;
  --plaster-dim: #b9ae98;
  --saffron: #e6a23c;
  --saffron-deep: #b87a1f;
  --teal: #2e8c86;
  --brick: #c9412f;
  --sand: #d98b2b;
  --sky: #3f8fd0;
  --good: #7fc47a;
  --display: 'Reem Kufi', 'Trebuchet MS', 'Gill Sans', sans-serif;
  --body: 'Barlow Semi Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--ink); color: var(--plaster); font: 16px/1.4 var(--body); }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }

#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- buttons & fields ---------- */
.btn {
  border: 0; border-radius: 3px; padding: 10px 18px; background: var(--saffron); color: #1a1206;
  font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 14px;
  transition: background 0.15s;
}
.btn:hover { background: #f0b457; }
.btn:active { filter: brightness(0.92); }
.btn.ghost { background: transparent; color: var(--plaster); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--plaster-dim); background: rgba(239, 228, 207, 0.05); }
.btn.danger { background: transparent; color: #f08a78; box-shadow: inset 0 0 0 1px rgba(201, 65, 47, 0.5); }
.btn.danger:hover { background: rgba(201, 65, 47, 0.15); }

.field { display: grid; gap: 6px; }
.field span, .loadout-title, .notes-eyebrow, .browser-head h2, .panel-sub.label {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--plaster-dim); font-weight: 600;
}
.field input {
  background: rgba(18, 21, 28, 0.7); border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px;
  font-size: 18px; font-weight: 600; width: 100%; max-width: 320px;
}
.field input:focus { border-color: var(--saffron); outline: none; }

/* ---------- main menu ---------- */
#menu {
  position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: 32px; padding: max(32px, env(safe-area-inset-top)) 40px 40px;
  background: linear-gradient(90deg, rgba(18, 21, 28, 0.94) 0%, rgba(18, 21, 28, 0.72) 42%, rgba(18, 21, 28, 0.25) 70%, rgba(18, 21, 28, 0.8) 100%);
  overflow-y: auto;
}
.menu-col { display: flex; flex-direction: column; gap: 26px; max-width: 560px; }
.brand { display: grid; gap: 6px; }
.brand-mark {
  width: 46px; height: 54px; background: var(--saffron);
  clip-path: path('M0 54 V24 Q23 -8 46 24 V54 Z');
  -webkit-mask: radial-gradient(circle at 50% 70%, transparent 7px, #000 8px);
          mask: radial-gradient(circle at 50% 70%, transparent 7px, #000 8px);
}
.brand h1 {
  margin: 4px 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(44px, 7vw, 84px);
  line-height: 0.95; letter-spacing: -0.01em; color: var(--plaster); text-wrap: balance;
}
.tagline { margin: 0; color: var(--plaster-dim); font-size: 18px; max-width: 34ch; }

.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mode {
  position: relative; text-align: left; border: 0; border-radius: 4px; padding: 16px 16px 14px;
  background: rgba(27, 32, 42, 0.86); box-shadow: inset 0 0 0 1px var(--line);
  display: grid; gap: 4px; transition: box-shadow 0.15s, background 0.15s;
}
.mode:hover { background: rgba(38, 44, 56, 0.95); box-shadow: inset 0 0 0 1px var(--saffron); }
.mode:disabled { opacity: 0.5; cursor: default; transform: none; }
.mode .m-name { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.1; }
.mode .m-desc { color: var(--plaster-dim); font-size: 14px; line-height: 1.3; }
.mode .m-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; font-size: 13px; color: var(--plaster-dim); }
.mode .m-count { font-family: var(--mono); color: var(--saffron); font-weight: 700; }
.mode .m-play { font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--plaster); font-size: 12px; }
.menu-foot { display: flex; gap: 10px; flex-wrap: wrap; }

.browser {
  align-self: start; background: rgba(18, 21, 28, 0.82); border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line);
  padding: 18px; display: grid; gap: 12px; backdrop-filter: blur(6px);
}
.browser-head { display: flex; justify-content: space-between; align-items: center; }
.browser-head h2 { margin: 0; }
.status { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--plaster-dim); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--plaster-dim); }
.status.online i { background: var(--good); box-shadow: 0 0 8px var(--good); }
.status.offline i, .status.lost i { background: var(--brick); }
.room-list { display: grid; gap: 6px; max-height: 52vh; overflow-y: auto; }
.room {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; text-align: left;
  background: rgba(38, 44, 56, 0.55); border: 0; border-radius: 3px; padding: 10px 12px;
}
.room:hover { background: rgba(56, 64, 80, 0.8); }
.room .r-name { font-weight: 600; }
.room .r-phase { grid-column: 1; font-size: 13px; color: var(--plaster-dim); }
.room .r-count { grid-row: 1 / span 2; grid-column: 2; font-family: var(--mono); font-weight: 700; font-size: 15px; }
.room.full { opacity: 0.5; cursor: default; }
.room .r-live { color: var(--good); }
.browser-note { margin: 0; font-size: 13px; color: var(--plaster-dim); }
.version { position: fixed; right: 16px; bottom: 12px; font-family: var(--mono); font-size: 12px; color: var(--plaster-dim); }

/* ---------- overlays & panels ---------- */
.overlay { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; z-index: 20; }
.overlay.dim { background: rgba(10, 12, 16, 0.72); backdrop-filter: blur(3px); }
.panel {
  width: min(720px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--ink-2); border-radius: 5px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 1px var(--line); padding: 26px 28px; display: grid; gap: 16px;
}
.panel.narrow { width: min(360px, 100%); }
.panel.wide { width: min(820px, 100%); }
.panel h2 { margin: 0; font-family: var(--display); font-size: 30px; font-weight: 700; }
.panel-sub { margin: 0; color: var(--plaster-dim); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; }
.pause-buttons { display: grid; gap: 8px; }
.pause-version { font-family: var(--mono); font-size: 12px; color: var(--plaster-dim); text-align: center; }

.tabs { display: flex; gap: 4px; background: var(--ink); padding: 4px; border-radius: 4px; }
.tab { border: 0; background: transparent; padding: 6px 12px; border-radius: 3px; color: var(--plaster-dim); font-weight: 600; }
.tab.on { background: var(--ink-3); color: var(--plaster); }
.tab-body { display: grid; gap: 14px; }

#binds { display: grid; gap: 2px; }
.bind-group, .bind { display: grid; grid-template-columns: 1fr 140px 140px; gap: 8px; align-items: center; }
.bind-group { margin-top: 10px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--saffron); font-weight: 700; }
.bind-group span + span { color: var(--plaster-dim); font-weight: 600; text-align: center; }
.bind { padding: 5px 0; border-bottom: 1px solid var(--line); }
.bind button {
  min-width: 0; width: 100%; border: 0; border-radius: 3px; padding: 6px 10px; background: var(--ink-3); font-family: var(--mono);
  font-size: 13px; font-weight: 700; text-align: center;
}
.bind button:hover { box-shadow: inset 0 0 0 1px var(--plaster-dim); }
.bind button.listening { background: var(--saffron); color: #1a1206; }
.bind button.clash { box-shadow: inset 0 0 0 1px var(--brick); }

.slider { display: grid; grid-template-columns: 170px 1fr 56px; gap: 14px; align-items: center; }
.slider input { width: 100%; accent-color: var(--saffron); }
.slider output { font-family: var(--mono); font-size: 14px; text-align: right; }
.check { display: flex; gap: 10px; align-items: center; }
.check input { width: 18px; height: 18px; accent-color: var(--saffron); }

/* patch notes */
.notes-panel { width: min(620px, 100%); }
.notes-eyebrow { color: var(--saffron); }
.note-release { display: grid; gap: 8px; }
.note-release + .note-release { padding-top: 16px; border-top: 1px solid var(--line); }
.note-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.note-ver { font-family: var(--mono); font-weight: 700; color: var(--saffron); font-size: 15px; }
.note-title { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.1; }
.note-date { color: var(--plaster-dim); font-size: 14px; }
.note-release ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; max-width: 62ch; }
.note-release.older .note-title { font-size: 20px; }

/* loadouts */
.loadouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ld {
  border: 0; border-radius: 4px; padding: 12px; text-align: left; background: var(--ink-3); display: grid; gap: 4px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.ld:hover { box-shadow: inset 0 0 0 1px var(--plaster-dim); }
.ld.on { box-shadow: inset 0 0 0 2px var(--saffron); background: #2e2a22; }
.ld .ld-key { font-family: var(--mono); font-size: 11px; color: var(--plaster-dim); }
.ld .ld-title { font-family: var(--display); font-size: 19px; font-weight: 700; }
.ld .ld-gun { font-weight: 700; color: var(--saffron); font-size: 14px; }
.ld .ld-blurb { font-size: 13px; color: var(--plaster-dim); line-height: 1.3; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; font-family: var(--body); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
#topbar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: stretch; }
.tb-team { min-width: 78px; padding: 6px 12px; border-radius: 3px; text-align: center; background: rgba(18, 21, 28, 0.6); }
.tb-team .n { font-family: var(--mono); font-size: 26px; font-weight: 700; line-height: 1; }
.tb-team .l { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
.tb-team.sand { box-shadow: inset 0 -3px 0 var(--sand); }
.tb-team.sky { box-shadow: inset 0 -3px 0 var(--sky); }
.tb-team.mine .l::after { content: ' · you'; }
.tb-mid { padding: 6px 14px; background: rgba(18, 21, 28, 0.72); border-radius: 3px; text-align: center; min-width: 120px; }
.tb-mid .time { font-family: var(--mono); font-size: 22px; font-weight: 700; line-height: 1.1; }
.tb-mid .sub { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--plaster-dim); }
.tb-mid .time.hot { color: #ff7a5c; }

#killfeed { position: absolute; top: 12px; right: 14px; display: grid; gap: 4px; justify-items: end; }
.kf { background: rgba(18, 21, 28, 0.62); padding: 3px 10px; border-radius: 3px; font-weight: 600; font-size: 15px; display: flex; gap: 8px; align-items: center; animation: kfIn 0.18s ease-out; }
.kf .as { font-size: 11px; opacity: 0.8; }
.lk-nade.locked { opacity: 0.45; cursor: not-allowed; }
#moved { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; text-align: center; background: rgba(239, 228, 207, 0.96); color: #000; }
#moved h1 { font-size: clamp(28px, 6vw, 64px); color: #000; margin: 0 0 16px; letter-spacing: 0.04em; }
#moved a { color: #000; font-size: clamp(18px, 3vw, 32px); font-weight: 700; }
.kf .w { font-family: var(--mono); font-size: 11px; color: var(--plaster-dim); text-transform: uppercase; }
.kf .hs { color: var(--saffron); font-size: 11px; font-family: var(--mono); }
.kf.me { box-shadow: inset 0 0 0 1px rgba(230, 162, 60, 0.7); }
@keyframes kfIn { from { transform: translateX(12px); opacity: 0; } }

#minimap { position: absolute; top: 12px; left: 12px; width: 180px; height: 180px; border-radius: 4px; background: rgba(18, 21, 28, 0.55); box-shadow: inset 0 0 0 1px var(--line); }

#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#crosshair .ch { position: absolute; background: #f4f0e6; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55); }
#crosshair .t, #crosshair .b { width: 2px; height: 9px; left: -1px; }
#crosshair .l, #crosshair .r { height: 2px; width: 9px; top: -1px; }
#crosshair .dot { position: absolute; width: 2px; height: 2px; left: -1px; top: -1px; background: #f4f0e6; }
#crosshair.enemy .ch, #crosshair.enemy .dot { background: #ff6a55; }
#hitmarker { position: absolute; left: 50%; top: 50%; width: 0; height: 0; opacity: 0; transition: opacity 0.2s; }
#hitmarker i { position: absolute; width: 11px; height: 2px; background: #fff; box-shadow: 0 0 2px #000; }
#hitmarker i:nth-child(1) { transform: translate(-15px, -10px) rotate(45deg); }
#hitmarker i:nth-child(2) { transform: translate(4px, -10px) rotate(-45deg); }
#hitmarker i:nth-child(3) { transform: translate(-15px, 8px) rotate(-45deg); }
#hitmarker i:nth-child(4) { transform: translate(4px, 8px) rotate(45deg); }
#hitmarker.show { opacity: 1; transition: none; }
#hitmarker.kill i { background: #ff5a44; width: 14px; }
#hitmarker.head i { background: var(--saffron); }
#hitmarker.blocked i { background: #7fc8ff; width: 8px; }

#vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(160, 20, 10, 0.75) 100%); opacity: 0; }
#dmgdirs { position: absolute; left: 50%; top: 50%; }
.dmgdir { position: absolute; left: -40px; top: -140px; width: 80px; height: 30px; transform-origin: 40px 140px;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 60, 40, 0.85), transparent 70%); }

#scope { position: absolute; inset: 0; }
#scope .scope-ring { position: absolute; inset: 0; background: radial-gradient(circle at center, transparent 0, transparent min(42vh, 42vw), #050505 calc(min(42vh, 42vw) + 1px)); }
#scope .scope-h { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, 0.9); }
#scope .scope-v { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(0, 0, 0, 0.9); }
#scope .scope-mils { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border: 1px solid rgba(200, 30, 20, 0.95); border-radius: 50%; }

#center { position: absolute; left: 0; right: 0; top: 22%; text-align: center; display: grid; gap: 6px; justify-items: center; }
#center-big { font-family: var(--display); font-size: clamp(28px, 4vw, 48px); font-weight: 700; line-height: 1.1; text-wrap: balance; padding-inline: 16px; }
#center-small { font-size: 18px; color: var(--plaster); opacity: 0.9; }
#center-big.sand { color: var(--sand); }
#center-big.sky { color: var(--sky); }
#center-big.warn { color: #ff7a5c; }

#prompt { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); display: grid; gap: 6px; justify-items: center; }
#prompt-text { font-weight: 600; font-size: 17px; background: rgba(18, 21, 28, 0.66); padding: 4px 12px; border-radius: 3px; }
#prompt .bar { width: 220px; height: 6px; background: rgba(18, 21, 28, 0.66); border-radius: 3px; overflow: hidden; }
#prompt .bar i { display: block; height: 100%; width: 0; background: var(--saffron); }

#vitals { position: absolute; left: 18px; bottom: 18px; display: grid; gap: 4px; min-width: 200px; }
.hp-num { font-family: var(--mono); font-size: 40px; font-weight: 700; line-height: 1; }
.hp-bar { height: 6px; background: rgba(18, 21, 28, 0.6); border-radius: 3px; overflow: hidden; }
.hp-bar i { display: block; height: 100%; width: 100%; background: var(--plaster); transition: width 0.15s; }
.hp-bar i.low { background: #ff5a44; }
.vitals-label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }

#arms { position: absolute; right: 18px; bottom: 18px; text-align: right; display: grid; gap: 2px; justify-items: end; }
.ammo { font-family: var(--mono); font-weight: 700; line-height: 1; }
#ammo-mag { font-size: 44px; }
#ammo-mag.low { color: #ff7a5c; }
.ammo .sep { font-size: 22px; opacity: 0.5; margin: 0 4px; }
#ammo-res { font-size: 22px; opacity: 0.8; }
.weapon-name { font-weight: 600; font-size: 16px; letter-spacing: 0.04em; }
.nades { display: flex; gap: 5px; margin-top: 4px; }
.nades i { width: 12px; height: 15px; border-radius: 50% 50% 45% 45%; background: #7a8a52; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); }
.nades i.used { background: rgba(122, 138, 82, 0.2); }
.reload-hint { font-size: 14px; color: #ffb49f; }
#bombcarry { position: absolute; left: 18px; bottom: 110px; background: rgba(201, 65, 47, 0.85); padding: 4px 10px; border-radius: 3px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 13px; }
#fps { position: absolute; right: 8px; top: 50%; font-family: var(--mono); font-size: 12px; opacity: 0.7; }

#markers { position: absolute; inset: 0; }
.mk { position: absolute; transform: translate(-50%, -100%); display: grid; justify-items: center; gap: 1px; }
.mk .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 15px;
  background: rgba(18, 21, 28, 0.7); box-shadow: inset 0 0 0 2px var(--plaster); }
.mk .dist { font-family: var(--mono); font-size: 11px; }
.mk.site .ic { box-shadow: inset 0 0 0 2px #e05a46; color: #ffb2a6; }
.mk.bomb .ic { background: #c9412f; box-shadow: none; }
.mk.hill .ic { box-shadow: inset 0 0 0 2px var(--plaster); }
.mk.hill.own0 .ic { box-shadow: inset 0 0 0 2px var(--sand); background: rgba(217, 139, 43, 0.5); }
.mk.hill.own1 .ic { box-shadow: inset 0 0 0 2px var(--sky); background: rgba(63, 143, 208, 0.5); }
.mk.hill.contested .ic { animation: blink 0.5s steps(2) infinite; }
@keyframes blink { 50% { background: rgba(255, 255, 255, 0.5); } }

#scoreboard {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100% - 32px));
  background: rgba(18, 21, 28, 0.92); border-radius: 5px; padding: 18px 22px; box-shadow: inset 0 0 0 1px var(--line); text-shadow: none;
  display: grid; gap: 14px;
}
.sb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sb-head h3 { margin: 0; font-family: var(--display); font-size: 24px; }
.sb-head span { color: var(--plaster-dim); font-size: 14px; }
.sb-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.sb-table th { text-align: right; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--plaster-dim); font-weight: 600; padding: 4px 8px; }
.sb-table th:first-child, .sb-table td:first-child { text-align: left; }
.sb-table td { padding: 6px 8px; text-align: right; font-family: var(--mono); font-size: 14px; border-top: 1px solid var(--line); }
.sb-table td:first-child { font-family: var(--body); font-weight: 600; font-size: 15px; }
.sb-table tr.me td { background: rgba(230, 162, 60, 0.12); }
.sb-table tr.dead td:first-child { opacity: 0.55; }
.sb-team { font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 13px; display: flex; justify-content: space-between; }
.sb-team.sand { color: var(--sand); }
.sb-team.sky { color: var(--sky); }
.swatch { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }

#spectate { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); background: rgba(18, 21, 28, 0.7); padding: 6px 14px; border-radius: 3px; text-align: center; }

/* death screen */
#death { align-items: end; padding-bottom: 6vh; background: linear-gradient(transparent 40%, rgba(10, 12, 16, 0.8)); z-index: 15; }
.death-card { display: grid; gap: 10px; justify-items: center; width: min(820px, 100%); text-align: center; }
.death-by { font-family: var(--display); font-size: 30px; font-weight: 700; }
.death-by b { color: #ff7a5c; }
.death-timer { font-family: var(--mono); font-size: 16px; color: var(--plaster-dim); }
.death-hint { font-size: 14px; color: var(--plaster-dim); }
#death .loadouts { width: 100%; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink-3); padding: 10px 16px; border-radius: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 1px var(--line); z-index: 50; }

@media (max-width: 860px) {
  #menu { grid-template-columns: 1fr; padding: 24px 16px 60px; }
  .modes { grid-template-columns: 1fr; }
  .loadouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bind-group, .bind { grid-template-columns: 1fr 104px 104px; }
  .slider { grid-template-columns: 1fr 56px; }
  .slider span { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- locker & crates ---------- */
.dinar { display: inline-block; width: 0.95em; height: 0.95em; border-radius: 50%; vertical-align: -0.12em;
  background: radial-gradient(circle at 35% 35%, #ffe08a, #d9a441 55%, #9a6d1d); box-shadow: inset 0 0 0 1.5px rgba(90, 60, 10, 0.6); }
.dinar-pill { display: inline-flex; gap: 5px; align-items: center; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(26, 18, 6, 0.25); font-family: var(--mono); }
.lk-head-right { display: flex; gap: 12px; align-items: center; }
.dinar-balance { display: flex; gap: 8px; align-items: baseline; font-family: var(--mono); font-size: 24px; font-weight: 700; color: #f0c25a; }
.dinar-balance small { font-family: var(--body); font-size: 13px; color: var(--plaster-dim); font-weight: 500; }
.locker-panel { width: min(1060px, 100%); }
.crates { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.crate-card { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; gap: 8px 12px; align-items: center; padding: 12px; border-radius: 5px;
  background: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.crate-card .btn { grid-column: 1 / -1; }
.crate-art { width: 56px; height: 46px; border-radius: 4px; position: relative;
  background: repeating-linear-gradient(90deg, #7a5530 0 10px, #6a4828 10px 20px); box-shadow: inset 0 0 0 3px #3e2a15; }
.crate-art::after { content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 14px; margin: -7px 0 0 -9px; border-radius: 3px; background: #c9a13b; }
.wardrobe .crate-art { background: repeating-linear-gradient(90deg, #2f6f73 0 10px, #275f63 10px 20px); box-shadow: inset 0 0 0 3px #173a3d; }
.crate-name { font-family: var(--display); font-size: 20px; font-weight: 700; }
.crate-desc { font-size: 14px; color: var(--plaster-dim); }
.crate-open:disabled { opacity: 0.45; cursor: default; }
.lk-earn { font-size: 13px; }
.lk-body { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; }
.lk-preview { border-radius: 5px; background: radial-gradient(ellipse at 50% 60%, #2c3140, #151820 70%); min-height: 320px; box-shadow: inset 0 0 0 1px var(--line); }
.lk-preview canvas { width: 100%; height: 100%; display: block; min-height: 320px; }
.lk-collection { display: grid; gap: 10px; align-content: start; min-width: 0; }
.lk-collection .tabs { justify-self: start; }
.lk-weapons { display: flex; gap: 6px; flex-wrap: wrap; }
.lk-chip { border: 0; border-radius: 999px; padding: 5px 12px; background: var(--ink-3); color: var(--plaster-dim); font-weight: 600; }
.lk-chip.on { background: var(--plaster); color: var(--ink); }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.lk-count { font-size: 13px; color: var(--plaster-dim); }
.sk { position: relative; border: 0; border-radius: 4px; padding: 8px 8px 10px; text-align: left; background: var(--ink-3); display: grid; gap: 2px;
  box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.sk:hover { box-shadow: inset 0 0 0 1px var(--plaster-dim); }
.sk.equipped { box-shadow: inset 0 0 0 2px var(--saffron); }
.sk-swatch { height: 56px; border-radius: 3px; margin-bottom: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3); }
.sk-name { font-weight: 700; font-size: 14px; line-height: 1.15; }
.sk-sub { font-size: 12px; color: var(--plaster-dim); }
.sk-rarity { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--plaster-dim); }
.sk-eq { position: absolute; top: 6px; right: 6px; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; background: var(--saffron); color: #1a1206; padding: 1px 6px; border-radius: 2px; }
.sk-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }

.crate-panel { width: min(900px, 100%); }
.reel { position: relative; height: 150px; overflow: hidden; border-radius: 5px; background: #0d1015; box-shadow: inset 0 0 0 1px var(--line);
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.reel-strip { position: absolute; top: 10px; left: 0; display: flex; gap: 8px; will-change: transform; }
.reel-tile { width: 150px; flex: 0 0 150px; height: 130px; }
.reel-mark { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--saffron); box-shadow: 0 0 10px var(--saffron); }
.crate-result { display: grid; gap: 12px; justify-items: center; text-align: center; }
.crate-result .sk.big { width: 240px; box-shadow: 0 0 0 2px var(--rar), 0 0 40px color-mix(in srgb, var(--rar) 45%, transparent); animation: prizeIn 0.4s ease-out; }
.crate-result .sk.big .sk-swatch { height: 110px; }
.crate-result .sk.big .sk-name { font-size: 20px; font-family: var(--display); }
.crate-result p { margin: 0; color: var(--plaster-dim); }
@keyframes prizeIn { from { transform: scale(0.85); opacity: 0; } }

#earns { position: absolute; right: 18px; bottom: 140px; display: grid; gap: 4px; justify-items: end; }
.earn-pop { font-size: 15px; font-weight: 600; color: #f0c25a; animation: earnUp 2.6s ease-out forwards; }
.earn-pop b { font-family: var(--mono); }
.earn-pop span { color: var(--plaster-dim); font-weight: 500; margin-left: 4px; }
@keyframes earnUp { 0% { transform: translateY(8px); opacity: 0; } 12% { transform: none; opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-14px); opacity: 0; } }

@media (max-width: 860px) {
  .crates, .lk-body { grid-template-columns: 1fr; }
  .crate-card { grid-template-columns: 48px 1fr; }
  .crate-card .btn { grid-column: 1 / -1; }
}

/* bazaar crate: loud on purpose */
.bazaar { background: linear-gradient(135deg, #3a1e4d, #1d3a5a 60%, #264d2e); box-shadow: inset 0 0 0 1px rgba(255, 110, 200, 0.45); }
.bazaar .crate-art { background: conic-gradient(from 45deg, #ff4f79, #ffd23f, #2ec27e, #3fc1ff, #b061ff, #ff4f79); box-shadow: inset 0 0 0 3px rgba(20, 10, 30, 0.6); }
.bazaar .crate-name { background: linear-gradient(90deg, #ff8fc8, #ffd23f, #6bff5c, #3fc1ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.blade { box-shadow: inset 0 0 0 1px rgba(190, 200, 210, 0.35); }
.blade .crate-art { background: linear-gradient(135deg, #2a2e36 0 45%, #cfd6dc 45% 55%, #2a2e36 55%); box-shadow: inset 0 0 0 3px #1a1d22; }
.blade .crate-art::after { width: 8px; height: 26px; margin: -13px 0 0 -4px; border-radius: 2px; background: #e8eef4; transform: rotate(20deg); }
.crate-bazaar .reel-mark { background: #ff4fd8; box-shadow: 0 0 12px #ff4fd8; }

.lk-account { font-size: 13px; color: var(--plaster-dim); margin-top: 2px; }
.lk-tabs-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.lk-content.loadouts { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; align-items: start; }
.lk-loadouts { display: grid; gap: 6px; }
.lk-ld { position: relative; border: 0; border-radius: 4px; padding: 10px 12px; text-align: left; background: var(--ink-3); display: grid; gap: 1px; box-shadow: inset 0 0 0 1px var(--line); }
.lk-ld:hover { box-shadow: inset 0 0 0 1px var(--plaster-dim); }
.lk-ld.on { box-shadow: inset 0 0 0 2px var(--saffron); background: #2e2a22; }
.lk-ld .ld-title { font-family: var(--display); font-size: 17px; font-weight: 700; }
.lk-ld .ld-gun { font-size: 13px; color: var(--saffron); font-weight: 700; }
.lk-ld .ld-perk { font-size: 12px; color: var(--plaster-dim); }
.lk-inuse { position: absolute; top: 8px; right: 8px; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--good); }
.lk-detail { display: grid; gap: 12px; }
.lk-detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.lk-detail-head h3 { margin: 0; font-family: var(--display); font-size: 24px; }
.lk-detail-head p { margin: 2px 0 0; color: var(--plaster-dim); font-size: 14px; }
.lk-detail-head .btn { flex: none; }
.lk-detail-head .btn:disabled { opacity: 0.6; cursor: default; }
.lk-section { display: grid; gap: 6px; }
.lk-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; font-size: 14px; }
.lk-sec-head small { font-weight: 500; color: var(--plaster-dim); font-size: 12px; }
.lk-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.sk.small { width: 112px; flex: 0 0 112px; padding: 6px 6px 8px; }
.sk.small .sk-swatch { height: 38px; }
.sk.small .sk-name { font-size: 13px; }
.lk-hint { align-self: center; font-size: 13px; color: var(--plaster-dim); padding: 0 8px; }
.lk-perk { margin: 0; font-size: 14px; }
.lk-nades { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lk-nade { border: 0; border-radius: 4px; padding: 8px 12px; background: var(--ink-3); text-align: left; display: grid; box-shadow: inset 0 0 0 1px var(--line); }
.lk-nade.on { box-shadow: inset 0 0 0 2px var(--saffron); }
.lk-nade small { color: var(--plaster-dim); font-size: 12px; }
.lk-nade:disabled { cursor: default; }

/* HUD: perk, flash, chat, pings */
.perk { margin-top: 6px; font-size: 14px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.perk .pk-key { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border-radius: 2px; background: rgba(239, 228, 207, 0.18); }
.perk b { font-family: var(--mono); color: var(--saffron); }
.perk .pk-nade { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--plaster-dim); margin-left: 6px; }
.perk.spent { opacity: 0.45; }
#drone { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); display: grid; gap: 5px; justify-items: center; padding: 8px 14px; border-radius: 4px; background: rgba(18, 21, 28, 0.55); pointer-events: none; }
#drone .dr-title { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #7fc8ff; font-weight: 700; }
#drone .dr-bat { width: 180px; height: 8px; border-radius: 2px; background: rgba(239, 228, 207, 0.18); overflow: hidden; }
#drone .dr-bat i { display: block; height: 100%; width: 100%; background: #7fc8ff; transition: width 0.2s linear; }
#drone .dr-bat i.low { background: #ff5a44; }
#drone .dr-hint { display: grid; gap: 2px; font-size: 12px; color: var(--plaster-dim); justify-items: start; }
#drone .dr-hint div { display: flex; gap: 8px; align-items: baseline; }
#drone .dr-hint b { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border-radius: 2px; background: rgba(239, 228, 207, 0.18); color: var(--plaster); min-width: 44px; text-align: center; }
#flash { position: absolute; inset: 0; background: #fffdf4; opacity: 0; pointer-events: none; }
#chat { position: absolute; left: 18px; bottom: 120px; width: min(420px, calc(100% - 36px)); display: grid; gap: 6px; }
#chat-log { display: grid; gap: 2px; max-height: 190px; overflow: hidden; align-content: end; }
.chat-line { font-size: 15px; line-height: 1.3; padding: 2px 8px; border-radius: 3px; background: rgba(18, 21, 28, 0.55); justify-self: start; max-width: 100%; overflow-wrap: anywhere; transition: opacity 0.6s; }
.chat-line.old { opacity: 0; }
#chat-log.open .chat-line.old { opacity: 0.85; }
.chat-line.sys { color: var(--plaster-dim); font-style: italic; }
.chat-tag { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--good); margin-right: 6px; }
#chat-entry { display: flex; gap: 6px; align-items: center; pointer-events: auto; }
#chat-mode { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; padding: 6px 8px; border-radius: 3px; background: var(--ink-3); }
#chat-mode.team { background: #2d4a2b; color: #b8f0b2; }
#chat-input { flex: 1; min-width: 0; background: rgba(18, 21, 28, 0.85); border: 1px solid var(--saffron); border-radius: 3px; padding: 7px 10px; font-size: 15px; outline: none; }
.mk.ping .ic { background: rgba(201, 65, 47, 0.8); box-shadow: inset 0 0 0 2px #ffb2a6; color: #fff; width: 22px; height: 22px; font-size: 12px; }

/* accounts */
.account-strip { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.account-strip .field input { max-width: 260px; }
.signed-in { display: grid; gap: 2px; }
.si-label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--plaster-dim); font-weight: 600; }
.si-name { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--saffron); line-height: 1.1; }
.account-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.account-buttons .btn { padding: 9px 14px; }
.auth-panel { width: min(420px, 100%); }
.auth-tabs { justify-self: start; }
#auth-form { display: grid; gap: 12px; }
#auth-form .field input { max-width: none; }
.auth-hint { margin: 0; font-size: 13px; color: var(--plaster-dim); }
.auth-err { margin: 0; min-height: 1.2em; color: #ff9a86; font-weight: 600; }
.auth-note { margin: 0; font-size: 13px; color: var(--plaster-dim); }
#auth-submit.busy { opacity: 0.6; }

@media (max-width: 860px) {
  .lk-content.loadouts { grid-template-columns: 1fr; }
  .lk-loadouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

#area { position: absolute; top: 198px; left: 12px; width: 180px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 15px;
  letter-spacing: 0.02em; opacity: 0; transition: opacity 0.5s; }
#area.on { opacity: 0.95; }

.mode.range { grid-column: 1 / -1; background: linear-gradient(90deg, rgba(27, 32, 42, 0.9), rgba(46, 40, 28, 0.9)); }
.mode.range .m-name::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%;
  border: 2px solid var(--saffron); box-shadow: inset 0 0 0 3px rgba(27, 32, 42, 0.9), inset 0 0 0 6px var(--saffron); vertical-align: 1px; }

/* the locker scrolls as one page, smoothly, and stops at its ends instead of dragging the page behind it */
.locker-panel { overscroll-behavior: contain; scroll-behavior: auto; }
.lk-preview { position: sticky; top: 0; align-self: start; }
.lk-row { overscroll-behavior-x: contain; }

/* where the server can't keep accounts, the sign-in buttons stay hidden */
.account-strip.no-accounts .account-buttons, .account-strip.no-accounts .signed-in { display: none !important; }
.account-strip.no-accounts #name-field { display: grid !important; }

/* attachments */
.at-row { display: flex; gap: 10px; margin-bottom: 8px; }
.at-items { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.at-slot { flex: 0 0 68px; padding-top: 10px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--plaster-dim); }
.at { position: relative; flex: 1 1 120px; max-width: 170px; border: 0; border-radius: 4px; padding: 8px 10px 9px; text-align: left; background: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 2px; align-content: start; }
.at:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--plaster-dim); }
.at.on { box-shadow: inset 0 0 0 2px var(--saffron); background: #2e2a22; }
.at.locked { opacity: 0.45; cursor: default; }
.at-name { font-weight: 700; font-size: 14px; line-height: 1.15; }
.at-sub { font-size: 12px; color: var(--plaster-dim); line-height: 1.25; }
.at-lock { margin-top: 2px; font-size: 11px; font-family: var(--mono); color: #ffb49f; }
.at-on { margin-top: 2px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--saffron); }

/* the whole map, on M */
#fullmap { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 12, 16, 0.72);
  backdrop-filter: blur(2px); z-index: 6; }
#fullmap-canvas { width: min(78vh, 78vw); height: min(78vh, 78vw); border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(239, 228, 207, 0.25), 0 20px 60px rgba(0, 0, 0, 0.6); background: rgba(18, 21, 28, 0.9); }
#fullmap-hint { margin-top: 10px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; color: var(--plaster-dim); }
