/* Dead Seoul (폐허의 서울) — Burnt-Hanji & Dark Tactical Survival HUD */
:root {
  --bg: rgba(16, 18, 22, 0.88);
  --bg-strong: rgba(20, 22, 28, 0.96);
  --bg-hover: rgba(38, 42, 52, 0.95);
  --border: rgba(235, 222, 198, 0.16);
  --text: #f3efe6;
  --text-sub: #a8a298;
  --amber: #f59e0b;
  --crimson: #e11d48;
  --emerald: #10b981;
  --sky: #38bdf8;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.52);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: #0b0d12;
  color: var(--text);
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-font-smoothing: antialiased;
}

#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #0d1017;
}

#osd-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#osd-map.has-tint .openseadragon-canvas canvas {
  filter: url(#seoul-tint);
}

#osd-map .navigator canvas { filter: none !important; }
#osd-map .navigator {
  border-radius: 12px !important;
  border: 1.5px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden !important;
  margin: 0 14px 14px 0 !important;
  background: #10141c !important;
  opacity: 0.88;
}

.map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#layer-season  { z-index: 1; }
#layer-snow    { z-index: 2; }
#layer-lights  { z-index: 3; mix-blend-mode: screen; }
#layer-world   { z-index: 4; }
#layer-vision  { z-index: 5; }
#layer-weather { z-index: 6; }
#layer-debug   { z-index: 7; }

.map-pins {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.pin-btn {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 17, 22, 0.84);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease, background 0.12s ease;
}
.pin-btn:hover { transform: translate(-50%, -105%) scale(1.04); background: rgba(28, 32, 42, 0.96); }
body.mode-follow .pin-btn { pointer-events: none; opacity: 0.72; }
.pin-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pin-btn.risk-green .pin-dot { background: #34d399; }
.pin-btn.risk-amber .pin-dot { background: #f59e0b; }
.pin-btn.risk-red .pin-dot   { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.pin-btn.is-safe { border-color: rgba(52, 211, 153, 0.55); }

/* Top-Left Crest */
.survival-crest {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  background: var(--bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px 13px;
  box-shadow: var(--shadow);
  min-width: 268px;
}

.crest-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.crest-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #271c19, #13161d);
  border: 1px solid rgba(245, 158, 11, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--amber);
}

.crest-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
}

.crest-sub {
  font-size: 10px;
  letter-spacing: 0.7px;
  color: var(--text-sub);
}

.risk-pill {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.risk-pill.is-safe  { background: rgba(16, 185, 129, 0.22); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.45); }
.risk-pill.is-green { background: rgba(34, 197, 94, 0.18); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.4); }
.risk-pill.is-amber { background: rgba(245, 158, 11, 0.20); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.45); }
.risk-pill.is-red   { background: rgba(239, 68, 68, 0.24); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.55); }

.crest-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--text-sub);
}
.crest-meta .sep { opacity: 0.45; }
.clock-chip { font-weight: 700; color: var(--text); }
.clock-chip[data-phase="sunset"] { color: #fb923c; }
.clock-chip[data-phase="night"] { color: #93c5fd; }
.clock-chip[data-phase="dawn"] { color: #fda4af; }

.crest-objective {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(235, 222, 198, 0.10);
  font-size: 11px;
  line-height: 1.35;
  color: #fde68a;
  max-width: 345px;
}
.obj-tag {
  flex: none;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

/* Radio / Sunset Warning Banner (sits cleanly below top HUD row at all screen widths!) */
.radio-banner {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 12.5px;
  font-weight: 600;
  max-width: min(460px, calc(100vw - 24px));
  text-align: center;
}
.radio-banner[hidden] { display: none; }
.rb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
.radio-banner.is-alert { border-color: rgba(239, 68, 68, 0.7); background: rgba(48, 14, 18, 0.94); color: #fecaca; }
.radio-banner.is-alert .rb-dot { background: #ef4444; box-shadow: 0 0 10px #ef4444; }
.radio-banner.is-hero  { border-color: rgba(245, 158, 11, 0.75); color: #fde68a; }
.radio-banner.is-hero .rb-dot  { background: #f59e0b; }
.radio-banner.is-good  { border-color: rgba(16, 185, 129, 0.55); color: #a7f3d0; }
.radio-banner.is-good .rb-dot  { background: #10b981; }
.radio-banner.is-warn  { border-color: rgba(245, 158, 11, 0.55); color: #fde68a; }
.radio-banner.is-warn .rb-dot  { background: #f59e0b; }

/* Top-Right Utility Bar */
.top-utility {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.util-btn {
  background: var(--bg);
  backdrop-filter: blur(10px);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.util-btn:hover { background: var(--bg-hover); }
.util-btn.is-active { border-color: var(--amber); color: #fde68a; }

/* Bottom-Left Survivor HUD */
.survivor-hud {
  position: fixed;
  bottom: 14px;
  left: 12px;
  z-index: 20;
  background: var(--bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  width: min(715px, calc(100vw - 24px));
}

.bleed-badge {
  background: rgba(220, 38, 38, 0.28);
  border: 1px solid rgba(248, 113, 113, 0.7);
  color: #fecaca;
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  animation: pulseBleed 1s infinite alternate;
}
.bleed-badge[hidden] { display: none; }
@keyframes pulseBleed {
  from { opacity: 0.72; }
  to { opacity: 1.0; box-shadow: 0 0 10px rgba(239, 68, 68, 0.55); }
}

.weapon-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  padding: 5px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(235, 222, 198, 0.12);
}
.wp-active {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
}
.wp-active.is-low { color: #fca5a5; }
.wp-name { white-space: nowrap; }
.wp-hint { font-size: 10.5px; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-dur-track {
  flex: 1;
  max-width: 110px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.wp-dur-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f59e0b, #fde047); }
.wp-dur-track i.is-low { background: linear-gradient(90deg, #dc2626, #f87171); }
.wp-dur-txt { font-size: 10.5px; color: #fde68a; min-width: 32px; }
.wp-holster { display: flex; align-items: center; gap: 4px; flex: none; }
.wp-pill {
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-sub);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.wp-pill.is-eq { border-color: rgba(250, 204, 21, 0.7); background: rgba(250, 204, 21, 0.18); color: #fef08a; }
.wp-pill.is-low { border-color: rgba(248, 113, 113, 0.65); }
.wp-pill small { opacity: 0.85; font-size: 9.5px; }

.vitals-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mode-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.vital-bars {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.vbar {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-sub);
  flex: 1;
}
.vbar .track {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  overflow: hidden;
}
.vbar .track i { display: block; height: 100%; border-radius: 999px; transition: width 0.15s ease; }
.fill-hp   { background: linear-gradient(90deg, #ef4444, #f87171); }
.fill-stam { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.fill-warm { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.vbar b { color: var(--text); min-width: 24px; text-align: right; }

.inventory-slots {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 8px;
}

.inv-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 2px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-sub);
  cursor: pointer;
  position: relative;
}
.inv-slot.has-item {
  border-color: rgba(245, 158, 11, 0.30);
  background: rgba(245, 158, 11, 0.08);
  color: var(--text);
}
.iv-ico { font-size: 15px; line-height: 1.1; }
.iv-cnt {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #fde68a;
}
.iv-lbl {
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 2px;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.act-btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.act-btn:hover { background: var(--bg-hover); }
.act-btn.is-on { border-color: rgba(250, 204, 21, 0.65); background: rgba(250, 204, 21, 0.16); color: #fef08a; }
#qa-crouch.is-on { border-color: rgba(167, 139, 250, 0.72); background: rgba(139, 92, 246, 0.22); color: #ddd6fe; }

/* Popups & Drawers */
.popup-sheet, .places-drawer, .inspector-card {
  position: fixed;
  z-index: 35;
  background: var(--bg-strong);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.popup-sheet[hidden], .places-drawer[hidden], .inspector-card[hidden] { display: none; }

#build-sheet, #ping-wheel {
  bottom: 196px;
  left: 12px;
  width: min(410px, calc(100vw - 24px));
  max-height: calc(100vh - 230px);
  overflow-y: auto;
}
.build-cat {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 0.4px;
  margin: 6px 0 2px;
}
.build-cat:first-child { margin-top: 0; }

/* 3-Tab Survival Workbench & Endgame Blueprint Cards */
.build-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 6px;
}
.build-tab {
  border: 1px solid rgba(196, 156, 94, 0.34);
  background: rgba(15, 19, 28, 0.82);
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.build-tab:hover { background: rgba(34, 42, 58, 0.9); color: #f8fafc; }
.build-tab.is-active {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(251, 191, 36, 0.85);
  color: #fef08a;
}
.build-tab.is-endgame.is-active {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.34), rgba(180, 83, 9, 0.34));
  border-color: #fde047;
  color: #fffbeb;
}
.bp-intro {
  font-size: 11px;
  line-height: 1.45;
  color: #cbd5e1;
  background: rgba(14, 22, 34, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 8px;
  padding: 7px 9px;
}
.bp-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 11px;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(22, 26, 36, 0.92), rgba(14, 17, 24, 0.96));
  border: 1.5px solid rgba(196, 156, 94, 0.42);
}
.bp-card.is-unlocked {
  border-color: rgba(74, 222, 128, 0.78);
  box-shadow: inset 0 0 18px rgba(16, 185, 129, 0.14);
}
.bp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.bp-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.bp-tier {
  font-size: 9.5px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.4px;
}
.bp-title-wrap strong { font-size: 13.5px; color: #f8fafc; }
.bp-pct {
  font-size: 11.5px;
  font-weight: 900;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.45);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.bp-card.is-unlocked .bp-pct {
  color: #86efac;
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(74, 222, 128, 0.7);
}
.bp-desc { font-size: 11px; color: #cbd5e1; line-height: 1.4; }
.bp-prog-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(6, 8, 12, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.24);
  overflow: hidden;
}
.bp-prog-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #fbbf24);
  transition: width 0.25s ease;
}
.bp-card.is-unlocked .bp-prog-track i {
  background: linear-gradient(90deg, #10b981, #4ade80);
}
.bp-mat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.bp-mat-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(10, 13, 20, 0.85);
  color: #cbd5e1;
  font-size: 10.5px;
  cursor: pointer;
}
.bp-mat-chip:disabled { opacity: 0.56; cursor: default; }
.bp-mat-chip.is-ready {
  border-color: rgba(251, 191, 36, 0.78);
  background: rgba(42, 30, 12, 0.88);
  color: #fef3c7;
}
.bp-mat-chip.is-ready:hover { background: rgba(64, 44, 14, 0.95); }
.bp-mat-chip.is-done {
  opacity: 0.85;
  border-color: rgba(52, 211, 153, 0.55);
  color: #a7f3d0;
}
.bpm-name { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bpm-bag {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 800;
  color: #4ade80;
  background: rgba(16, 185, 129, 0.2);
  padding: 0 4px;
  border-radius: 4px;
}
.bp-actions, .bp-garage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bp-garage-meta { font-size: 11px; font-weight: 700; color: #fde68a; }
.bp-cta-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1.5px solid rgba(251, 191, 36, 0.8);
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.88), rgba(146, 64, 14, 0.92));
  color: #fffbeb;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.bp-cta-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.bp-cta-btn.is-deploy {
  border-color: #86efac;
  background: linear-gradient(180deg, #059669, #047857);
  color: #ecfdf5;
}

.qa-sheet {
  top: 58px;
  right: 12px;
  width: min(390px, calc(100vw - 24px));
}

.help-modal {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 28px));
}

.places-drawer {
  top: 58px;
  right: 12px;
  width: min(330px, calc(100vw - 24px));
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}

.inspector-card {
  top: 136px;
  left: 12px;
  width: min(290px, calc(100vw - 24px));
}
.inspector-card h3 { margin: 6px 0 4px; font-size: 15px; }
.inspector-card p { margin: 0 0 6px; font-size: 12.5px; color: var(--text-sub); }
.inspector-card small { font-size: 11px; color: var(--text-sub); }
.insp-kicker { font-size: 10px; font-weight: 700; letter-spacing: 0.9px; color: var(--amber); }

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.close-btn {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  width: 26px;
  height: 26px;
  border-radius: 7px;
  cursor: pointer;
}

.build-list { display: flex; flex-direction: column; gap: 7px; }
.build-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.build-item:disabled { opacity: 0.45; cursor: not-allowed; }
.build-item:not(:disabled):hover { background: var(--bg-hover); }
.bi-ico { font-size: 19px; }
.bi-body { flex: 1; display: flex; flex-direction: column; }
.bi-body strong { font-size: 12.5px; }
.bi-body small { font-size: 11px; color: var(--text-sub); }
.bi-cost { font-size: 11.5px; font-weight: 700; color: #fde68a; white-space: nowrap; }

.ping-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ping-opt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--ping-col, var(--border));
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.pg-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--ping-col, var(--amber));
  color: #0b0d12;
}

.qa-group { margin-bottom: 12px; }
.qa-lbl { font-size: 11px; font-weight: 700; color: var(--text-sub); margin-bottom: 6px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 5px; }
.pill-btn {
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 11.5px;
  cursor: pointer;
}
.pill-btn.active { background: rgba(245, 158, 11, 0.24); border-color: var(--amber); color: #fde68a; font-weight: 700; }
.qa-toggle { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-sub); cursor: pointer; }

.places-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}
.place-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}
.place-row:hover { background: var(--bg-hover); }
.pr-top { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.place-row small { font-size: 11px; color: var(--text-sub); }
.pr-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}
.pr-badge.safe  { background: #059669; color: #fff; }
.pr-badge.green { background: #16a34a; color: #fff; }
.pr-badge.amber { background: #d97706; color: #fff; }
.pr-badge.red   { background: #dc2626; color: #fff; }

.help-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-sub);
}
.help-list b { color: var(--text); }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop[hidden] { display: none; }
.modal-backdrop.is-danger { background: rgba(45, 8, 12, 0.76); }

.modal-card {
  width: min(420px, 100%);
  background: var(--bg-strong);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  text-align: center;
}
.camp-sub { font-size: 12px; color: var(--text-sub); margin: 0 0 12px; text-align: left; }
.camp-list { display: flex; flex-direction: column; gap: 8px; }
.camp-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
  color: var(--text);
  cursor: pointer;
}
.camp-choice:hover { background: rgba(16, 185, 129, 0.16); }
.camp-choice strong { font-size: 13px; }
.camp-choice small { font-size: 11px; color: var(--text-sub); }

.downed-timer {
  font-size: 34px;
  font-weight: 800;
  color: #f87171;
  margin: 12px 0;
}
.respawn-btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: none;
  background: var(--emerald);
  color: #06281c;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

/* ==========================================================================
   Mobile-Only Elements (Hidden cleanly on Desktop!)
   ========================================================================== */
.mobile-controls,
.mobile-only-btn,
.m-vitals,
.sheet-backdrop {
  display: none;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 32;
  background: rgba(5, 7, 11, 0.56);
  backdrop-filter: blur(2px);
}
.sheet-backdrop[hidden] { display: none !important; }

/* Mobile Menu & Backpack Sheet Content Styles */
.m-goal-box {
  padding: 9px 11px;
  margin-bottom: 11px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  font-size: 12px;
  line-height: 1.45;
  word-break: keep-all;
}
.m-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.m-menu-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 68px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}
.m-menu-tile:active { transform: scale(0.96); background: rgba(245, 158, 11, 0.18); }
.m-menu-tile span { font-size: 21px; line-height: 1; }
.m-menu-tile b { font-size: 11.5px; font-weight: 700; }

.m-bag-sec-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  margin: 6px 0 7px;
}
.m-bag-sec-lbl:first-of-type { margin-top: 2px; }

.m-bag-weapons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}
.m-bag-wp-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.m-bag-wp-card.is-eq {
  border-color: rgba(250, 204, 21, 0.78);
  background: rgba(245, 158, 11, 0.16);
}
.m-bag-wp-card.is-low { border-color: rgba(248, 113, 113, 0.7); }
.mbw-ico { font-size: 18px; }
.m-bag-wp-card b { font-size: 12px; }
.m-bag-wp-card small { font-size: 10.5px; color: var(--text-sub); }

.m-bag-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.m-bag-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 60px;
  padding: 7px 4px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-sub);
  cursor: pointer;
}
.m-bag-item.has-item {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.08);
  color: var(--text);
}
.m-bag-item.is-usable {
  border-color: rgba(16, 185, 129, 0.65);
  background: rgba(16, 185, 129, 0.14);
}
.m-bag-item:active { transform: scale(0.95); }
.mbi-ico { font-size: 19px; line-height: 1.1; }
.mbi-cnt {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 10.5px;
  font-weight: 800;
  color: #fde68a;
}
.mbi-lbl { font-size: 10.5px; font-weight: 600; text-align: center; }

/* ==========================================================================
   Mobile & Touch-First Responsive Layout (Portrait + Landscape)
   ========================================================================== */
@media (hover: none) and (pointer: coarse), (max-width: 820px) {
  #osd-map .navigator { display: none !important; }
  .survivor-hud { display: none !important; }
  .desk-only-btn { display: none !important; }
  .mobile-only-btn { display: inline-flex; align-items: center; justify-content: center; }
  .mobile-controls { display: block; }
  .sheet-backdrop { display: block; }

  /* Hide bottom gameplay thumb controls cleanly while browsing 5.83km Tactical Map! */
  body.mode-tactical .m-left-zone,
  body.mode-tactical .m-center-dock,
  body.mode-tactical .m-action-arc,
  body.mode-tactical #mb-craft,
  body.mode-tactical #mb-ping,
  body.mode-tactical #mb-heal {
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
  }

  /* 1. Ultra-Slim Top-Left Status Strip */
  .survival-crest {
    top: calc(var(--sat) + 8px);
    left: calc(var(--sal) + 8px);
    right: calc(var(--sar) + 162px);
    min-width: 0;
    max-width: none;
    padding: 6px 8px;
    border-radius: 12px;
    cursor: pointer;
  }
  .crest-top { gap: 7px; }
  .crest-mark { width: 24px; height: 24px; font-size: 13px; border-radius: 7px; flex: none; }
  .crest-title-wrap { display: none; }
  .m-vitals {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
  }
  .m-vbar {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 9.5px;
    font-weight: 800;
    color: #fca5a5;
  }
  .m-vbar b { color: #f8fafc; min-width: 21px; text-align: right; font-size: 10px; }
  .m-track {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
  }
  .m-track i { display: block; height: 100%; border-radius: 999px; transition: width 0.15s ease; }
  .m-vbar-sub {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  .m-track-sm { height: 4px; }

  .risk-pill {
    font-size: 9.5px;
    padding: 2px 6px;
    white-space: nowrap;
    flex: none;
  }
  .crest-meta {
    margin-top: 4px;
    gap: 4px;
    font-size: 9.5px;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
    overflow: visible;
  }
  .crest-meta .sep { display: none; }
  .crest-meta .online-party-chip {
    padding: 1px 6px;
    font-size: 9.5px;
    flex-shrink: 0;
  }
  .crest-objective {
    display: none;
    margin-top: 6px;
    padding-top: 5px;
    font-size: 10.5px;
    max-width: none;
  }
  .survival-crest.is-goal-open .crest-objective { display: flex; }

  /* 2. Clean 3-Icon Top-Right Utility Bar */
  .top-utility {
    top: calc(var(--sat) + 8px);
    right: calc(var(--sar) + 8px);
    left: auto;
    bottom: auto;
    gap: 5px;
    flex-wrap: nowrap;
  }
  .top-utility .util-btn {
    height: 40px;
    min-width: 40px;
    padding: 0 9px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
  }
  #profile-pill-name { display: none; }
  .profile-pill { gap: 3px; padding: 0 8px !important; }
  .pp-ico { font-size: 14px; }
  .sync-dot { font-size: 10px; }

  /* 3. Non-overlapping Radio Toast Banner */
  .radio-banner {
    top: calc(var(--sat) + 64px);
    padding: 6px 12px;
    font-size: 11.5px;
    border-radius: 12px;
    max-width: calc(100vw - 24px);
    line-height: 1.35;
    word-break: keep-all;
  }

  /* 4. Left Thumb Zone: Stance Chip + 104px Analog Sprint Joystick */
  .m-left-zone {
    position: fixed;
    left: calc(var(--sal) + 12px);
    bottom: calc(var(--sab) + 18px);
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .m-status-row {
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
  }
  .m-mode-chip {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(15, 18, 24, 0.84);
    border: 1px solid var(--border);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
  .m-bleed-chip {
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.88);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    animation: pulseBleed 0.9s infinite alternate;
  }
  .m-bleed-chip[hidden] { display: none; }

  .touch-joystick {
    position: relative;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(22, 26, 36, 0.45) 0%, rgba(12, 15, 22, 0.72) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.48), inset 0 0 18px rgba(0, 0, 0, 0.35);
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .joy-sprint-ring {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 1.5px dashed rgba(245, 158, 11, 0.26);
    pointer-events: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
  }
  .touch-joystick.is-sprinting .joy-sprint-ring {
    border-style: solid;
    border-color: #fbbf24;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.65);
  }
  .joy-ticks {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  .joy-ticks span {
    position: absolute;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 2px;
  }
  .joy-ticks span:nth-child(1) { top: 8px; left: 50%; width: 2px; height: 6px; transform: translateX(-50%); }
  .joy-ticks span:nth-child(2) { bottom: 8px; left: 50%; width: 2px; height: 6px; transform: translateX(-50%); }
  .joy-ticks span:nth-child(3) { left: 8px; top: 50%; width: 6px; height: 2px; transform: translateY(-50%); }
  .joy-ticks span:nth-child(4) { right: 8px; top: 50%; width: 6px; height: 2px; transform: translateY(-50%); }

  .touch-knob {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fbbf24, #d97706);
    border: 2px solid rgba(255, 255, 255, 0.88);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    will-change: transform;
  }
  .touch-joystick.is-sprinting .touch-knob {
    background: radial-gradient(circle at 35% 30%, #fef08a, #f59e0b);
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.85);
  }
  .joy-move-lbl {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: rgba(248, 250, 252, 0.56);
    pointer-events: none;
    transition: opacity 0.14s ease;
  }
  .touch-joystick.is-active .joy-move-lbl { opacity: 0; }
  .joy-sprint-lbl {
    position: absolute;
    top: -19px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1px 7px;
    border-radius: 999px;
    background: #f59e0b;
    color: #111318;
    font-size: 9.5px;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.14s ease;
  }
  .touch-joystick.is-sprinting .joy-sprint-lbl { opacity: 1; }

  /* 5. Bottom-Center Compact Weapon & Bag Dock */
  .m-center-dock {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(var(--sab) + 18px);
    z-index: 24;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 84px;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .m-dock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 7px;
    border-radius: 11px;
    border: 1px solid rgba(235, 222, 198, 0.22);
    background: rgba(15, 18, 24, 0.86);
    backdrop-filter: blur(8px);
    color: var(--text);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    touch-action: manipulation;
  }
  .m-dock-btn:active { transform: scale(0.95); }
  .m-weapon-chip {
    justify-content: flex-start;
    padding: 5px 7px;
    min-height: 36px;
    border-color: rgba(245, 158, 11, 0.42);
  }
  .mw-ico { font-size: 16px; flex: none; }
  .mw-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
    text-align: left;
  }
  .mw-meta b {
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fef3c7;
  }
  .mw-dur-track {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
  }
  .mw-dur-track i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fde047);
  }
  .mw-dur-track i.is-low { background: #ef4444; }
  .mw-dur-track i.is-unarmed { background: rgba(148, 163, 184, 0.55); }
  .m-bag-chip { min-height: 32px; font-size: 13px; }
  .m-bag-chip small { font-size: 10.5px; font-weight: 700; color: #e2e8f0; }

  /* 6. Right Thumb Zone: Slim Utility Rail + Ergonomic Combat Arc */
  .m-right-zone {
    position: fixed;
    right: calc(var(--sar) + 10px);
    bottom: calc(var(--sab) + 18px);
    z-index: 25;
    pointer-events: none;
  }
  .m-util-rail {
    position: absolute;
    right: 2px;
    bottom: 132px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
  }
  .m-mini-btn {
    position: relative;
    width: 40px;
    height: 36px;
    border-radius: 11px;
    border: 1px solid rgba(235, 222, 198, 0.22);
    background: rgba(15, 18, 24, 0.84);
    backdrop-filter: blur(8px);
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    touch-action: manipulation;
    transition: opacity 0.2s ease, transform 0.12s ease;
  }
  .m-mini-btn.m-has-cap {
    height: 42px;
    flex-direction: column;
    gap: 1px;
    padding: 2px 0;
  }
  .m-mini-btn.m-has-cap span { font-size: 15px; line-height: 1; }
  .m-mini-btn.m-has-cap small {
    font-size: 8.5px;
    font-weight: 700;
    line-height: 1;
    color: #cbd5e1;
  }
  .m-mini-btn:active { transform: scale(0.92); }
  .m-mini-btn.is-empty { opacity: 0.46; }
  .m-heal-btn.is-urgent {
    border-color: #ef4444;
    background: rgba(220, 38, 38, 0.34);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.65);
    animation: pulseBleed 0.9s infinite alternate;
  }
  .m-cnt {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #111318;
    border: 1px solid rgba(251, 191, 36, 0.65);
    color: #fde68a;
    font-style: normal;
    font-size: 9.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .m-action-arc {
    position: relative;
    width: 142px;
    height: 120px;
    pointer-events: auto;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .m-attack-btn {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(251, 191, 36, 0.78);
    background: radial-gradient(circle at 35% 28%, rgba(217, 119, 6, 0.92), rgba(153, 27, 27, 0.92));
    color: #fffbeb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.58), 0 0 18px rgba(245, 158, 11, 0.28);
    touch-action: none;
    cursor: pointer;
  }
  .m-attack-btn:active { transform: scale(0.91); filter: brightness(1.15); }
  .ma-ico { font-size: 22px; line-height: 1; }
  .ma-lbl { font-size: 9.5px; font-weight: 800; letter-spacing: 0.2px; }

  .m-interact-btn {
    position: absolute;
    right: 70px;
    bottom: 4px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1.5px solid rgba(235, 222, 198, 0.26);
    background: rgba(18, 22, 30, 0.84);
    color: var(--text-sub);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.48);
    touch-action: none;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  }
  .m-interact-btn:active { transform: scale(0.92); }
  .m-interact-btn.is-ready {
    border-color: #34d399;
    background: radial-gradient(circle at 35% 30%, rgba(16, 185, 129, 0.92), rgba(6, 95, 70, 0.94));
    color: #ecfdf5;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.65);
    animation: pulseInteract 1.1s infinite alternate;
  }
  @keyframes pulseInteract {
    from { transform: scale(1); }
    to { transform: scale(1.06); }
  }
  .mi-ico { font-size: 17px; line-height: 1; }
  .mi-lbl { font-size: 8.8px; font-weight: 800; white-space: nowrap; }

  .m-sat-btn {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(235, 222, 198, 0.24);
    background: rgba(16, 20, 28, 0.86);
    backdrop-filter: blur(8px);
    color: var(--text);
    font-size: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.45);
    touch-action: manipulation;
    cursor: pointer;
  }
  .m-sat-btn span { font-size: 14px; line-height: 1; }
  .m-sat-btn small { font-size: 8px; font-weight: 700; line-height: 1; color: #cbd5e1; }
  .m-sat-btn:active { transform: scale(0.91); }
  .m-sat-btn.is-empty { opacity: 0.44; }
  .m-sat-light   { right: 2px;   bottom: 72px; }
  .m-sat-crouch  { right: 52px;  bottom: 68px; }
  .m-sat-molotov { right: 100px; bottom: 62px; }
  .m-sat-flare   { right: 50px;  bottom: 118px; }
  .m-sat-light.is-on  { border-color: rgba(250, 204, 21, 0.82); background: rgba(245, 158, 11, 0.24); }
  .m-sat-crouch.is-on { border-color: rgba(167, 139, 250, 0.85); background: rgba(139, 92, 246, 0.30); }

  /* 7. Mobile Bottom-Sheet Positioning for ALL Drawers & Popups */
  #build-sheet,
  #ping-wheel,
  #qa-sheet,
  #places-drawer,
  #help-modal,
  #mobile-menu-sheet,
  #mobile-bag-sheet {
    position: fixed;
    left: calc(var(--sal) + 8px);
    right: calc(var(--sar) + 8px);
    bottom: calc(var(--sab) + 8px);
    top: auto;
    transform: none;
    width: auto;
    max-width: none;
    max-height: 70dvh;
    border-radius: 18px;
    padding: 14px 14px calc(var(--sab) + 12px);
    z-index: 45;
    overflow-y: auto;
  }
  .inspector-card {
    top: calc(var(--sat) + 64px);
    left: calc(var(--sal) + 10px);
    right: calc(var(--sar) + 10px);
    width: auto;
    z-index: 36;
  }

  /* 8. Mobile Start Gate & Modal Polish (Zero iOS input auto-zoom!) */
  .auth-gate {
    padding: calc(var(--sat) + 12px) 14px calc(var(--sab) + 12px);
  }
  .auth-card {
    padding: 20px 16px 16px;
    border-radius: 18px;
    max-height: calc(100dvh - var(--sat) - var(--sab) - 24px);
  }
  .auth-kicker {
    font-size: 9px;
    letter-spacing: 0.85px;
    white-space: nowrap;
  }
  .auth-title { font-size: 25px; }
  .auth-input { font-size: 16px; padding: 11px 12px; }
  .oauth-btn { padding: 12px 13px; font-size: 14px; }
  .auth-primary-btn { padding: 13px 14px; font-size: 14.5px; }
  .modal-card { max-height: calc(100dvh - 32px); overflow-y: auto; }
}

/* Extra-Narrow Phones (<= 375px, e.g. Galaxy S / iPhone SE) */
@media (max-width: 375px) {
  .survival-crest { right: calc(var(--sar) + 148px); padding: 5px 7px; }
  .crest-meta { font-size: 9px; gap: 3px; }
  .crest-meta .online-party-chip { padding: 1px 5px; font-size: 9px; }
  .top-utility .util-btn { height: 36px; min-width: 36px; font-size: 14px; }
  .profile-pill { padding: 0 6px !important; }
  .touch-joystick { width: 94px; height: 94px; }
  .touch-knob { width: 38px; height: 38px; }
  .m-center-dock { width: 76px; }
  .m-action-arc { width: 132px; }
  .m-attack-btn { width: 58px; height: 58px; }
  .m-interact-btn { right: 64px; width: 48px; height: 48px; }
  .m-sat-molotov { right: 88px; bottom: 58px; }
}

/* Landscape Mobile Phones (e.g. 844x390) */
@media (max-height: 500px) and (max-width: 960px) {
  #osd-map .navigator { display: none !important; }
  .survivor-hud { display: none !important; }
  .desk-only-btn { display: none !important; }
  .mobile-only-btn { display: inline-flex; align-items: center; justify-content: center; }
  .mobile-controls { display: block; }
  .sheet-backdrop { display: block; }

  .survival-crest {
    top: calc(var(--sat) + 6px);
    left: calc(var(--sal) + 10px);
    right: auto;
    width: 270px;
    padding: 5px 8px;
  }
  .crest-title-wrap { display: none; }
  .m-vitals { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .crest-objective { display: none; }
  .top-utility { top: calc(var(--sat) + 6px); right: calc(var(--sar) + 10px); }
  .top-utility .util-btn { height: 36px; min-width: 36px; }
  #profile-pill-name { display: none; }
  .radio-banner { top: calc(var(--sat) + 52px); }

  .m-left-zone { bottom: calc(var(--sab) + 10px); left: calc(var(--sal) + 14px); }
  .touch-joystick { width: 90px; height: 90px; }
  .touch-knob { width: 36px; height: 36px; }
  .m-center-dock {
    bottom: calc(var(--sab) + 10px);
    flex-direction: row;
    width: auto;
  }
  .m-weapon-chip { width: 112px; }
  .m-bag-chip { width: 68px; }
  .m-right-zone { bottom: calc(var(--sab) + 10px); right: calc(var(--sar) + 14px); }
  .m-action-arc { width: 186px; height: 116px; }
  .m-sat-light   { right: 4px;   bottom: 70px; }
  .m-sat-crouch  { right: 50px;  bottom: 66px; }
  .m-sat-molotov { right: 96px;  bottom: 62px; }
  .m-sat-flare   { right: 142px; bottom: 54px; }
  .m-util-rail {
    bottom: 124px;
    right: 0;
    flex-direction: row;
    gap: 6px;
  }
  .m-mini-btn { width: 34px; height: 34px; font-size: 13px; }
  .auth-card { padding: 14px 16px; }
  .auth-crest { width: 32px; height: 32px; font-size: 16px; margin-bottom: 4px; }
  .auth-title { font-size: 21px; }
  .auth-desc { margin-bottom: 10px; font-size: 11.5px; }
  #party-sheet,
  #radio-sheet,
  #stash-sheet,
  #board-sheet {
    position: fixed;
    left: calc(var(--sal) + 8px);
    right: calc(var(--sar) + 8px);
    bottom: calc(var(--sab) + 8px);
    top: auto;
    transform: none;
    width: auto;
    max-width: none;
    max-height: 78dvh;
    border-radius: 18px;
    padding: 12px 12px calc(var(--sab) + 10px);
    z-index: 48;
    overflow-y: auto;
  }
}

/* ==========================================================================
   Start Screen Auth Gate, Profile Pill & Cloud Save Modal
   ========================================================================== */
.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(26, 22, 18, 0.84);
  font-weight: 700;
}
.profile-pill[data-provider="kakao"] { border-color: rgba(254, 229, 0, 0.65); }
.profile-pill[data-provider="google"] { border-color: rgba(96, 165, 250, 0.65); }
.pp-ico { font-size: 12px; }
.sync-dot { font-size: 10.5px; color: #34d399; font-weight: 700; }
.sync-dot.is-saving { color: #fbbf24; }

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: radial-gradient(circle at 50% 35%, rgba(16, 12, 10, 0.42), rgba(7, 8, 11, 0.82) 72%);
  backdrop-filter: blur(4px);
}
.auth-gate[hidden] { display: none; }

.auth-card {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  word-break: keep-all;
  background: linear-gradient(180deg, rgba(20, 17, 15, 0.94) 0%, rgba(12, 13, 17, 0.96) 100%);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 20px;
  padding: 24px 22px 20px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 220, 165, 0.12);
}

.auth-hero {
  text-align: center;
  margin-bottom: 16px;
}
.auth-crest {
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: radial-gradient(circle at 35% 30%, rgba(245, 158, 11, 0.28), rgba(225, 29, 72, 0.22));
  border: 1px solid rgba(245, 158, 11, 0.48);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.22);
}
.auth-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: #f59e0b;
  margin-bottom: 4px;
}
.auth-title {
  margin: 0;
  font-family: 'Noto Serif KR', serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #fef3c7;
  text-shadow: 0 2px 18px rgba(245, 158, 11, 0.25);
}
.auth-en-sub {
  margin-top: 3px;
  font-size: 10.5px;
  letter-spacing: 1.4px;
  color: var(--text-sub);
}

.auth-alert {
  margin-bottom: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}
.auth-alert[hidden] { display: none; }
.auth-alert.is-ok { border-color: rgba(16, 185, 129, 0.5); background: rgba(16, 185, 129, 0.14); color: #a7f3d0; }
.auth-alert.is-warn { border-color: rgba(245, 158, 11, 0.5); background: rgba(245, 158, 11, 0.14); color: #fde68a; }
.auth-alert.is-err { border-color: rgba(239, 68, 68, 0.55); background: rgba(239, 68, 68, 0.14); color: #fecaca; }

.auth-panel[hidden] { display: none; }
.auth-desc {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-sub);
  text-align: center;
}
.auth-sub-title {
  margin: 6px 0 6px;
  font-size: 17px;
  text-align: center;
  color: #fef3c7;
}

.oauth-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.oauth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.14s ease, opacity 0.14s ease;
}
.oauth-btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.oauth-btn:active { transform: translateY(0); }
.oauth-ico { width: 18px; height: 18px; flex-shrink: 0; }
.btn-kakao {
  background: #FEE500;
  color: #191919;
}
.btn-google {
  background: #ffffff;
  color: #1f2937;
  border-color: rgba(255, 255, 255, 0.3);
}
.oauth-btn.is-unconfigured { opacity: 0.76; }
.oauth-status-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.16);
  color: inherit;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0 12px;
  font-size: 11px;
  color: var(--text-sub);
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.guest-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-row {
  display: flex;
  gap: 8px;
}
.auth-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 9, 13, 0.72);
  color: #f8fafc;
  font-size: 13px;
  outline: none;
}
.auth-input:focus {
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.18);
}
.field-hint {
  min-height: 16px;
  font-size: 11px;
  text-align: left;
  padding-left: 2px;
  color: var(--text-sub);
}
.field-hint.is-ok { color: #34d399; }
.field-hint.is-err { color: #f87171; }

.auth-primary-btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #fffbeb;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.14s ease;
}
.auth-primary-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.auth-primary-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.auth-primary-btn.is-guest {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fde68a;
}

.auth-footnote {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-sub);
  text-align: center;
}

.provider-chip-row {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}
.provider-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
}
.provider-badge[data-provider="kakao"] { background: #FEE500; color: #191919; }
.provider-badge[data-provider="google"] { background: #ffffff; color: #1f2937; }
.provider-badge[data-provider="guest"] { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.4); }

.resume-header {
  text-align: center;
  margin-bottom: 12px;
}
.resume-welcome {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: #34d399;
}
.resume-name-row {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.resume-name-row strong { font-size: 19px; color: #fef3c7; }

.resume-snapshot {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 11px 12px;
  margin-bottom: 14px;
}
.snap-empty { font-size: 12px; color: var(--text-sub); text-align: center; }
.snap-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 8px;
}
.snap-zone { font-weight: 700; color: #fde68a; }
.snap-time { font-size: 11px; color: #34d399; }
.snap-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: #e2e8f0;
}

.resume-secondary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}
.auth-ghost-btn {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.auth-ghost-btn:hover { background: rgba(255, 255, 255, 0.11); color: var(--text); }

.upgrade-nudge {
  margin-top: 13px;
  padding: 10px 11px;
  border-radius: 11px;
  border: 1px dashed rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.07);
  text-align: left;
}
.un-txt { font-size: 11.5px; line-height: 1.45; color: #fde68a; margin-bottom: 8px; }
.un-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.mini-oauth {
  padding: 7px 9px;
  border-radius: 8px;
  border: none;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
.mini-oauth.is-kakao { background: #FEE500; color: #191919; }
.mini-oauth.is-google { background: #ffffff; color: #1f2937; }

/* Profile Modal */
.profile-card {
  width: min(440px, 100%);
  text-align: left;
  word-break: keep-all;
}
.prof-id-row {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  margin-bottom: 11px;
}
.prof-id-main { display: flex; align-items: center; gap: 8px; }
.prof-id-main h3 { margin: 0; font-size: 17px; color: #fef3c7; }
.prof-email { font-size: 11.5px; color: var(--text-sub); margin-top: 4px; }
.prof-save-meta { font-size: 11px; color: #34d399; margin-top: 4px; font-weight: 600; }

.prof-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 12px;
}
.pstat {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pstat small { font-size: 10.5px; color: var(--text-sub); }
.pstat b { font-size: 12.5px; color: #f8fafc; }

.prof-section { margin-bottom: 10px; }
.prof-lbl { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-sub); margin-bottom: 5px; }
.prof-rename-row { display: flex; gap: 7px; }
.prof-rename-row .util-btn { white-space: nowrap; padding: 0 14px; }

.prof-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 13px;
}
.auth-danger-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.auth-danger-btn:hover { background: rgba(239, 68, 68, 0.16); }
.auth-danger-btn.is-armed {
  background: #dc2626;
  border-color: #ef4444;
  color: #ffffff;
}

/* ==========================================================================
   Contextual 4-Seat Vehicle Durability, Fuel & Crew Maintenance Strip
   ========================================================================== */
.vehicle-bar {
  position: fixed;
  left: 14px;
  bottom: 206px;
  z-index: 26;
  width: min(440px, calc(100vw - 28px));
  padding: 9px 11px;
  border-radius: 13px;
  background: rgba(14, 18, 26, 0.90);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(251, 191, 36, 0.42);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.48);
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: auto;
}
.vehicle-bar[hidden] { display: none !important; }
body.mode-tactical .vehicle-bar { display: none !important; }
.vehicle-bar.is-broken {
  border-color: rgba(239, 68, 68, 0.78);
  box-shadow: 0 10px 26px rgba(153, 27, 27, 0.42);
}

.vb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
}
.vb-role {
  font-weight: 800;
  color: #fef3c7;
  white-space: nowrap;
}
.vb-crew {
  flex: 1;
  min-width: 0;
  text-align: right;
  font-size: 10.5px;
  color: #a7f3d0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vb-close-btn {
  flex: none;
  width: 24px;
  height: 24px;
  margin-left: 2px;
  border-radius: 7px;
  border: 1px solid rgba(196, 156, 94, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, transform 0.1s;
}
.vb-close-btn:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(248, 113, 113, 0.72);
  color: #fff;
}
.vb-close-btn:active {
  transform: scale(0.92);
}

.vb-meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.vb-meter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #cbd5e1;
}
.vbm-lbl { font-weight: 700; white-space: nowrap; }
.vb-meter b { min-width: 32px; text-align: right; color: #f8fafc; font-size: 10.5px; }
.vb-track {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  overflow: hidden;
}
.vb-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.16s ease;
}
.vb-track i.is-good { background: linear-gradient(90deg, #22c55e, #4ade80); }
.vb-track i.is-warn { background: linear-gradient(90deg, #d97706, #facc15); }
.vb-track i.is-crit { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.vb-track i.is-fuel { background: linear-gradient(90deg, #d97706, #fbbf24); }

.vb-actions {
  display: flex;
  gap: 6px;
}
.vb-btn {
  flex: 1;
  min-width: 0;
  padding: 7px 6px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}
.vb-btn:active { transform: scale(0.96); }
.vb-btn.is-repair.is-needed {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(74, 222, 128, 0.72);
  color: #bbf7d0;
}
.vb-btn.is-repair.is-urgent {
  background: rgba(239, 68, 68, 0.26);
  border-color: rgba(248, 113, 113, 0.85);
  color: #fecaca;
}
.vb-btn.is-refuel.is-needed {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(251, 191, 36, 0.72);
  color: #fef3c7;
}
.vb-btn.is-board {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.48);
  color: #e0f2fe;
}
.vb-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

@media (hover: none) and (pointer: coarse), (max-width: 820px) {
  .vehicle-bar {
    left: 50%;
    top: calc(var(--sat) + 72px);
    bottom: auto;
    transform: translateX(-50%);
    width: min(368px, calc(100vw - 16px));
    padding: 7px 9px;
    gap: 5px;
    border-radius: 12px;
  }
  body.has-vehicle-bar .radio-banner {
    top: calc(var(--sat) + 174px);
  }
  .vb-head { font-size: 11px; }
  .vb-btn {
    padding: 8px 4px;
    font-size: 11px;
    min-height: 36px;
  }
}

/* ==========================================================================
   Emergency Radio Directives & Relief Airdrop Modal (#radio-sheet)
   ========================================================================== */
.crest-objective.is-clickable {
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.crest-objective.is-clickable:hover {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.55);
}
.crest-objective.has-airdrop .obj-tag {
  background: #f97316;
  color: #fff7ed;
}
.btn-radio-top.has-airdrop {
  border-color: rgba(251, 146, 60, 0.85);
  background: rgba(249, 115, 22, 0.22);
  color: #fed7aa;
}

.radio-sheet {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 24px));
  max-height: min(76vh, 620px);
  overflow-y: auto;
  z-index: 48;
}
.radio-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  word-break: keep-all;
}
.rd-status-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.rd-status-pill.is-online {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(14, 165, 233, 0.11);
  color: #bae6fd;
}
.rd-status-pill.is-offline {
  border-color: rgba(245, 158, 11, 0.52);
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}

.rd-card {
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.36);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rd-card.is-airdrop {
  border-color: rgba(251, 146, 60, 0.55);
  background: rgba(45, 22, 10, 0.52);
}
.rd-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  color: #7dd3fc;
  font-weight: 700;
}
.rd-timer {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  color: #fde68a;
  font-weight: 800;
}
.rd-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: #f8fafc;
}
.rd-brief {
  margin: 0;
  font-size: 11.8px;
  line-height: 1.48;
  color: #cbd5e1;
}
.rd-obj-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rd-obj-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
}
.rd-obj-row.is-done {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.11);
  color: #a7f3d0;
}
.rd-obj-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
}
.rd-prog-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  overflow: hidden;
}
.rd-prog-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  border-radius: 999px;
}
.rd-obj-row.is-done .rd-prog-track i {
  background: linear-gradient(90deg, #10b981, #4ade80);
}
.rd-reward {
  font-size: 11.2px;
  color: #fed7aa;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(249, 115, 22, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.32);
}
.rd-btn-row {
  display: flex;
  gap: 7px;
}
.rd-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(14, 165, 233, 0.18);
  color: #e0f2fe;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
.rd-btn.is-donate {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.22);
  color: #bbf7d0;
}
.rd-btn.is-drop {
  border-color: rgba(251, 146, 60, 0.65);
  background: rgba(249, 115, 22, 0.22);
  color: #ffedd5;
}
.rd-btn:disabled { opacity: 0.45; cursor: default; }
.rd-drop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(251, 146, 60, 0.28);
  font-size: 11.2px;
}
.rd-drop-row button {
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid rgba(251, 146, 60, 0.6);
  background: rgba(249, 115, 22, 0.24);
  color: #ffedd5;
  font-size: 10.8px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.rd-log-box {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10.8px;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rd-log-box b { color: #cbd5e1; font-size: 11px; margin-bottom: 2px; }

/* ==========================================================================
   DEAD SEOUL — HAND-INKED WEATHERED SURVIVAL ILLUSTRATED UI THEME (?v=ds19)
   9-Slice Riveted Steel/Brass Plates + Stitched Leather Slots + Watercolor Art
   ========================================================================== */

/* Shared Hand-Inked Icon System */
.ui-ico {
  display: inline-block;
  object-fit: contain;
  flex: none;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.82));
}
.ui-ico-xs   { width: 15px; height: 15px; }
.ui-ico-sm   { width: 18px; height: 18px; }
.ui-ico-act  { width: 19px; height: 19px; }
.ui-ico-slot { width: 17px; height: 17px; }
.ui-ico-wp   { width: 24px; height: 24px; }
.ui-ico-md   { width: 22px; height: 22px; }
.ui-ico-lg   { width: 28px; height: 28px; }
.ui-ico-inv  { width: 32px; height: 32px; }
.ui-ico-bag-item { width: 32px; height: 32px; }
.ui-ico-bag-wp   { width: 28px; height: 28px; }
.ui-ico-build    { width: 30px; height: 30px; }
.ui-ico-cost     { width: 15px; height: 15px; }
.ui-ico-tile     { width: 28px; height: 28px; }

/* 1. Weathered Brushed-Iron Console Panels (Zero Flat Black Boxes) */
.survival-crest,
.survivor-hud,
.vehicle-bar,
.popup-sheet,
.places-drawer,
.inspector-card,
.modal-card,
.auth-card {
  background-color: #16171a;
  background-image:
    linear-gradient(180deg, rgba(22, 20, 18, 0.66) 0%, rgba(12, 13, 15, 0.82) 100%),
    url('./ui/panel_hud_surface.webp');
  background-size: cover;
  background-position: center;
  border: 1.5px solid rgba(196, 156, 94, 0.44);
  border-bottom: 3.5px solid rgba(8, 7, 6, 0.96);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.66),
    inset 0 1px 0 rgba(246, 217, 162, 0.22),
    inset 0 -2px 8px rgba(0, 0, 0, 0.62);
}

.auth-crest {
  width: 68px;
  height: 68px;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.survival-crest {
  border-radius: 12px;
  padding: 10px 13px;
}

.crest-mark {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 50%;
  flex: none;
}
.crest-emblem-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.78));
}
.crest-title {
  color: #f6ebd6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}
.crest-objective {
  background: rgba(15, 13, 10, 0.46);
  border: 1px solid rgba(196, 156, 94, 0.26);
  border-radius: 7px;
  padding: 5px 8px;
  margin-top: 8px;
}

/* 2. Top-Right Utility Bar — 9-Slice Riveted Steel & Amber Brass Plaques */
.top-utility {
  gap: 4px;
}

.util-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  backdrop-filter: none;
  border-style: solid;
  border-width: 8px 9px;
  border-image-source: url('./ui/btn_plate_steel.png');
  border-image-slice: 30 36 30 36 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  padding: 0 3px;
  min-height: 36px;
  color: #f4ead6;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.94);
  box-shadow: none;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.58));
  transition: transform 0.10s cubic-bezier(0.22, 1, 0.36, 1), filter 0.14s ease;
}
.util-btn:hover {
  background: transparent;
  transform: translateY(-1px);
  filter: brightness(1.13) drop-shadow(0 5px 8px rgba(0, 0, 0, 0.66));
}
.util-btn:active {
  transform: translateY(2px) scale(0.96);
  filter: brightness(0.95) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.72));
}

.util-btn.profile-pill,
.util-btn.is-active,
.util-btn.btn-radio-top.has-airdrop {
  border-width: 8px 13px;
  border-image-source: url('./ui/btn_plate_amber.png');
  border-image-slice: 28 42 28 42 fill;
  color: #fff7df;
  text-shadow: 0 1px 3px rgba(32, 14, 0, 0.95);
}

.util-btn.util-btn-sq {
  border-width: 8px;
  border-image-source: url('./ui/slot_frame_dark.png');
  border-image-slice: 44 fill;
  border-image-repeat: stretch;
  padding: 0;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
}
.util-btn.util-btn-sq .ui-ico {
  width: 20px;
  height: 20px;
}
.util-btn.mobile-only-btn {
  display: none;
}

/* Keep desktop Vehicle Bar & Bottom Sheets cleanly anchored above collapsed OR expanded Survivor HUD */
.vehicle-bar {
  bottom: 72px;
  transition: bottom 0.16s ease;
}
#build-sheet, #ping-wheel {
  bottom: 72px;
  max-height: calc(100vh - 110px);
  transition: bottom 0.16s ease;
}
body.is-inv-open .vehicle-bar {
  bottom: 250px;
}
body.is-inv-open #build-sheet,
body.is-inv-open #ping-wheel {
  bottom: 250px;
  max-height: calc(100vh - 280px);
}

/* Audio 3-State Visual Indicator (All / SFX-Only / Muted) */
#btn-audio.is-sfx-only .ui-ico,
#mm-audio.is-sfx-only .ui-ico {
  opacity: 0.78;
}
#btn-audio.is-sfx-only::after {
  content: 'SFX';
  position: absolute;
  right: 1px;
  bottom: 1px;
  padding: 0 3px;
  border-radius: 3px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.75);
  color: #fde68a;
  font-size: 7.5px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.2px;
  pointer-events: none;
}
#btn-audio.is-muted .ui-ico,
#mm-audio.is-muted .ui-ico {
  opacity: 0.48;
  filter: grayscale(0.75) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}
#btn-audio.is-muted::after,
#mm-audio.is-muted::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2.5px;
  background: #ef4444;
  border-radius: 999px;
  transform: rotate(-38deg);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

/* 3. Bottom Survivor HUD Dock — Recessed Gauges, Stitched Slots & 9-Slice Action Bar */
.survivor-hud {
  width: min(792px, calc(100vw - 24px));
  border-radius: 13px;
  padding: 10px 12px 11px;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border-style: solid;
  border-width: 7px 10px;
  border-image-source: url('./ui/btn_plate_steel.png');
  border-image-slice: 30 36 30 36 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  padding: 0 3px;
  color: #f4ead6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.52));
}

/* Recessed Armored Tactical Vital Gauges */
.vbar {
  color: #d6c8ad;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.vbar .track,
.wp-dur-track,
.vb-track {
  height: 10px;
  border-radius: 4px;
  background: rgba(8, 9, 11, 0.88);
  border: 1px solid rgba(196, 156, 94, 0.34);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.88), 0 1px 0 rgba(255, 240, 210, 0.08);
}
.vbar .track i,
.wp-dur-track i,
.vb-track i {
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -1px 2px rgba(0, 0, 0, 0.35);
}
.fill-hp   { background: linear-gradient(90deg, #b91c1c, #ef4444, #f87171); }
.fill-stam { background: linear-gradient(90deg, #0369a1, #0ea5e9, #38bdf8); }
.fill-warm { background: linear-gradient(90deg, #b45309, #f59e0b, #fbbf24); }

/* Weapon Bar & Holster Slots */
.weapon-bar {
  background: rgba(10, 10, 12, 0.56);
  border: 1px solid rgba(196, 156, 94, 0.28);
  border-radius: 8px;
  padding: 5px 8px;
  margin-bottom: 8px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.55);
}
.wp-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f6ebd6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
.wp-holster { gap: 4px; }
.wp-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: transparent;
  border-style: solid;
  border-width: 6px 7px;
  border-image-source: url('./ui/slot_frame_dark.png');
  border-image-slice: 44 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  padding: 0 2px;
  color: #d6c8ad;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
  transition: transform 0.1s ease, filter 0.12s ease;
}
.wp-pill:hover { filter: brightness(1.15) drop-shadow(0 3px 5px rgba(0, 0, 0, 0.65)); }
.wp-pill:active { transform: translateY(1px) scale(0.95); }
.wp-pill.is-eq {
  border-image-source: url('./ui/slot_frame_amber.png');
  border-image-slice: 48 fill;
  color: #fff6d6;
}
.wp-pill.is-low {
  filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.65));
}

/* 9-Slot Hand-Inked Stitched Leather & Riveted Steel Backpack */
.inventory-slots {
  gap: 6px;
  margin-bottom: 9px;
}
.inv-slot {
  position: relative;
  min-height: 64px;
  padding: 2px 1px 1px;
  background: transparent;
  border-style: solid;
  border-width: 9px;
  border-image-source: url('./ui/slot_frame_dark.png');
  border-image-slice: 44 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  color: #a99f8d;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.56));
  transition: transform 0.10s cubic-bezier(0.22, 1, 0.36, 1), filter 0.14s ease;
}
.inv-slot:hover {
  transform: translateY(-2px);
  filter: brightness(1.14) drop-shadow(0 5px 8px rgba(0, 0, 0, 0.68));
}
.inv-slot:active {
  transform: translateY(2px) scale(0.95);
}
.inv-slot:not(.has-item) .ui-ico-inv {
  opacity: 0.38;
  filter: saturate(0.35) brightness(0.85) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}
.inv-slot.has-item {
  border-image-source: url('./ui/slot_frame_amber.png');
  border-image-slice: 48 fill;
  color: #f7ecd6;
}
.inv-slot.has-item .ui-ico-inv {
  opacity: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.85));
}
.iv-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.iv-cnt {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 16px;
  padding: 0 4px;
  border-radius: 5px;
  background: rgba(15, 13, 11, 0.92);
  border: 1px solid rgba(196, 156, 94, 0.50);
  color: #d6c8ad;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.65);
}
.inv-slot.has-item .iv-cnt {
  background: linear-gradient(180deg, #4b2f10, #2a1907);
  border-color: rgba(251, 191, 36, 0.75);
  color: #fef08a;
}
.iv-lbl {
  font-size: 9.5px;
  font-weight: 700;
  margin-top: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
}

/* 8-Button Tactical Action Bar — 9-Slice Illustrated Metal Plates */
.action-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 4px;
}
.act-btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border-style: solid;
  border-width: 7px 9px;
  border-image-source: url('./ui/btn_plate_steel.png');
  border-image-slice: 30 36 30 36 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  padding: 1px 4px;
  min-height: 36px;
  color: #f3e9d6;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.56));
  transition: transform 0.10s cubic-bezier(0.22, 1, 0.36, 1), filter 0.14s ease;
}
.act-btn:hover {
  background: transparent;
  transform: translateY(-1px);
  filter: brightness(1.14) drop-shadow(0 5px 7px rgba(0, 0, 0, 0.66));
}
.act-btn:active {
  transform: translateY(2px) scale(0.95);
  filter: brightness(0.95) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}
.act-btn.is-on,
.act-btn.act-btn-combat {
  border-width: 7px 10px;
  border-image-source: url('./ui/btn_plate_amber.png');
  border-image-slice: 28 42 28 42 fill;
  color: #fff6dc;
  text-shadow: 0 1px 3px rgba(32, 14, 0, 0.95);
}
#qa-crouch.is-on {
  border-image-source: url('./ui/btn_plate_amber.png');
  border-image-slice: 28 42 28 42 fill;
  filter: hue-rotate(215deg) saturate(1.2) drop-shadow(0 3px 6px rgba(139, 92, 246, 0.45));
  color: #ede9fe;
}

/* Vehicle Bar & Crafting / Sheet Buttons */
.vb-btn,
.rd-btn,
.pill-btn {
  background: transparent;
  border-style: solid;
  border-width: 7px 9px;
  border-image-source: url('./ui/btn_plate_steel.png');
  border-image-slice: 30 36 30 36 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  padding: 1px 4px;
  color: #f4ead6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.92);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.54));
}
.vb-btn.is-needed,
.vb-btn.is-urgent,
.pill-btn.active,
.rd-btn.is-drop,
.rd-btn.is-donate {
  border-image-source: url('./ui/btn_plate_amber.png');
  border-image-slice: 28 42 28 42 fill;
  color: #fff7df;
}
.build-item {
  background: rgba(14, 15, 18, 0.72);
  border: 1px solid rgba(196, 156, 94, 0.30);
  border-bottom: 2.5px solid rgba(6, 6, 8, 0.9);
}
.bi-cost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.bi-cost-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(10, 10, 12, 0.75);
  border: 1px solid rgba(196, 156, 94, 0.32);
}

/* Mobile Sheets (Menu Tiles, Bag Weapons, Bag Items) */
.m-menu-tile,
.m-bag-item,
.m-bag-wp-card {
  background: transparent;
  border-style: solid;
  border-width: 9px;
  border-image-source: url('./ui/slot_frame_dark.png');
  border-image-slice: 44 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.56));
}
.m-bag-item.has-item,
.m-bag-item.is-usable,
.m-bag-wp-card.is-eq {
  border-image-source: url('./ui/slot_frame_amber.png');
  border-image-slice: 48 fill;
  color: #fff6dc;
}
.m-bag-item:not(.has-item) .ui-ico-bag-item {
  opacity: 0.38;
  filter: saturate(0.35);
}

/* 4. Mobile Touch Layout Harmony (<=820px / touch) */
@media (hover: none) and (pointer: coarse), (max-width: 820px) {
  .util-btn.mobile-only-btn { display: inline-flex; }
  .vehicle-bar { bottom: auto; }
  #build-sheet, #ping-wheel { bottom: calc(var(--sab) + 8px); max-height: 76dvh; }
  .crest-mark { width: 28px; height: 28px; }
  .top-utility .util-btn {
    height: 40px;
    min-height: 40px;
    min-width: 40px;
    border-width: 7px;
    border-image-source: url('./ui/slot_frame_dark.png');
    border-image-slice: 44 fill;
    padding: 0 2px;
  }
  .top-utility .util-btn.profile-pill,
  .top-utility .util-btn.is-active {
    border-image-source: url('./ui/slot_frame_amber.png');
    border-image-slice: 48 fill;
  }
  #lbl-tactical { display: none; }
  .m-mode-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 15, 13, 0.88);
    border: 1px solid rgba(196, 156, 94, 0.44);
  }

  /* Mobile Center Weapon & Bag Dock — Illustrated Slots */
  .m-center-dock { width: 92px; }
  .m-dock-btn {
    background: transparent;
    backdrop-filter: none;
    border-style: solid;
    border-width: 7px 8px;
    border-image-source: url('./ui/slot_frame_dark.png');
    border-image-slice: 44 fill;
    border-image-repeat: stretch;
    border-radius: 0;
    padding: 1px 2px;
    box-shadow: none;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.62));
  }
  .m-weapon-chip {
    border-image-source: url('./ui/slot_frame_amber.png');
    border-image-slice: 48 fill;
  }
  .m-mini-btn {
    background: transparent;
    backdrop-filter: none;
    border-style: solid;
    border-width: 6px;
    border-image-source: url('./ui/slot_frame_dark.png');
    border-image-slice: 44 fill;
    border-image-repeat: stretch;
    border-radius: 0;
    box-shadow: none;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.58));
  }
  .m-mini-btn.m-has-cap {
    width: 44px;
    height: 44px;
  }
  .m-mini-btn.m-has-cap .ui-ico-sm { width: 17px; height: 17px; }
  .m-heal-btn.is-urgent {
    border-image-source: url('./ui/slot_frame_amber.png');
    border-image-slice: 48 fill;
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.8));
  }

  /* Mobile Round Riveted Combat Medallion (#mb-attack) */
  .m-attack-btn {
    width: 68px;
    height: 68px;
    border: none;
    background: url('./ui/btn_round_combat.png') center/100% 100% no-repeat;
    box-shadow: none;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.72));
  }
  .m-attack-btn:active {
    transform: scale(0.91);
    filter: brightness(1.16) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.78));
  }
  .m-interact-btn {
    width: 58px;
    height: 58px;
    border: 2.5px solid rgba(196, 156, 94, 0.68);
    background: radial-gradient(circle at 35% 28%, #34332f 0%, #191a1e 72%, #0e0f12 100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.65), inset 0 2px 3px rgba(255, 232, 185, 0.2);
  }
  .m-sat-btn {
    width: 46px;
    height: 46px;
    border: 2px solid rgba(186, 150, 96, 0.56);
    background: radial-gradient(circle at 35% 28%, #2e2e2c 0%, #17181c 78%, #0e0f12 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.58), inset 0 1px 2px rgba(255, 236, 195, 0.16);
  }
  .m-sat-btn .ui-ico-sm { width: 17px; height: 17px; }
  .m-sat-light.is-on {
    border-color: #f59e0b;
    background: radial-gradient(circle at 35% 28%, #6e4516 0%, #3a230a 78%, #1e1205 100%);
  }
}
@media (max-height: 500px) and (max-width: 960px) {
  .util-btn.mobile-only-btn { display: inline-flex; }
}

/* ==========================================================================
   DEAD SEOUL (?v=ds21) — BOSS BAR, DEFENSE WAVE STRIP, CAMP STASH & HALL OF FAME
   ========================================================================== */

/* Top-Center Defense Wave & Apex Boss Health Bar */
.boss-wave-hud {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: min(410px, calc(100vw - 28px));
  pointer-events: none;
}

.wave-strip,
.boss-bar {
  width: 100%;
  padding: 8px 12px 9px;
  border-radius: 10px;
  background-color: #1a1214;
  background-image:
    linear-gradient(180deg, rgba(38, 12, 16, 0.84) 0%, rgba(16, 10, 12, 0.92) 100%),
    url('./ui/panel_hud_surface.webp');
  background-size: cover;
  border: 1.5px solid rgba(244, 63, 94, 0.68);
  border-bottom: 3px solid rgba(10, 4, 6, 0.96);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.68), 0 0 18px rgba(225, 29, 72, 0.25);
}
.wave-strip {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.62), 0 0 16px rgba(245, 158, 11, 0.22);
}
.ws-head,
.bb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}
.ws-title { color: #fde68a; }
.ws-timer {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fef08a;
  font-size: 11px;
}
.bb-name { color: #fecdd3; letter-spacing: -0.1px; }
.bb-meta { color: #fda4af; font-size: 11px; font-weight: 700; }
.ws-track,
.bb-track {
  height: 9px;
  border-radius: 4px;
  background: rgba(8, 6, 8, 0.9);
  border: 1px solid rgba(244, 63, 94, 0.42);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.85);
}
.ws-track { border-color: rgba(251, 191, 36, 0.42); }
.ws-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ea580c, #f59e0b, #fde047);
  transition: width 0.2s linear;
}
.bb-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #9f1239, #e11d48, #fb7185);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: width 0.14s ease-out;
}

/* Modal Header Icons & Action Group */
.sheet-title-ico {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #f6ebd6;
}
.sheet-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Camp Shared Stash & Hall of Fame Centered Illustrated Modals */
.stash-sheet,
.board-sheet {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 24px));
  max-height: min(82vh, 690px);
  overflow-y: auto;
  z-index: 48;
}
.board-sheet {
  width: min(520px, calc(100vw - 24px));
}
.stash-sheet-body,
.board-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  word-break: keep-all;
}

/* Stash Section & 9-Slot Shared Supply Grid */
.st-sec-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #f5d69b;
  letter-spacing: 0.2px;
  margin-top: 2px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(196, 156, 94, 0.22);
}
.stash-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.stash-slot {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 5px 4px;
  background: transparent;
  border-style: solid;
  border-width: 8px;
  border-image-source: url('./ui/slot_frame_dark.png');
  border-image-slice: 44 fill;
  border-image-repeat: stretch;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.52));
}
.stash-slot.has-stock {
  border-image-source: url('./ui/slot_frame_amber.png');
  border-image-slice: 48 fill;
}
.st-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.st-ico {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.st-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.24;
}
.st-meta strong {
  font-size: 11.5px;
  color: #f6ebd6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.st-stock { font-size: 10px; color: #bef264; }
.st-stock b { color: #ecfccb; }
.st-mine { font-size: 9.8px; color: #cbd5e1; }
.st-mine b { color: #fde68a; }
.st-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.st-act {
  padding: 4px 5px;
  border-radius: 5px;
  border: 1px solid rgba(196, 156, 94, 0.42);
  background: rgba(20, 22, 26, 0.88);
  color: #f4ead6;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.08s ease, filter 0.12s ease;
}
.st-act.is-dep {
  border-color: rgba(132, 204, 22, 0.62);
  background: rgba(54, 83, 20, 0.56);
  color: #ecfccb;
}
.st-act.is-take {
  border-color: rgba(245, 158, 11, 0.64);
  background: rgba(120, 53, 15, 0.56);
  color: #fef3c7;
}
.st-act:not(:disabled):hover { filter: brightness(1.18); }
.st-act:not(:disabled):active { transform: scale(0.95); }
.st-act:disabled { opacity: 0.34; cursor: default; }

.st-wp-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.st-wp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(14, 16, 20, 0.78);
  border: 1px solid rgba(196, 156, 94, 0.30);
}
.st-wp-row.is-mine {
  border-color: rgba(132, 204, 22, 0.36);
}
.st-wp-ico { flex: none; display: flex; align-items: center; }
.st-wp-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.st-wp-info b { font-size: 12px; color: #f6ebd6; }
.st-wp-info small { font-size: 10.5px; color: #94a3b8; }
.st-wp-row .st-act { flex: none; padding: 5px 10px; font-size: 10.8px; }
.st-empty {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(196, 156, 94, 0.22);
  font-size: 11.2px;
  color: #94a3b8;
  text-align: center;
}
.st-log-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.8px;
  color: #cbd5e1;
}
.st-log-row.is-dep b { color: #bef264; }
.st-log-row.is-take b { color: #fde68a; }
.st-log-row em {
  font-style: normal;
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
}

/* Hall of Fame Tabs, Rows & Rank Tier Badges */
.bd-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.bd-tab {
  background: transparent;
  border-style: solid;
  border-width: 7px 8px;
  border-image-source: url('./ui/btn_plate_steel.png');
  border-image-slice: 30 36 30 36 fill;
  border-image-repeat: stretch;
  padding: 0 2px;
  min-height: 34px;
  color: #d6c8ad;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.92);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.bd-tab.is-active {
  border-image-source: url('./ui/btn_plate_amber.png');
  border-image-slice: 28 42 28 42 fill;
  color: #fff8e1;
}
.bd-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 2px;
}
.bd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(14, 16, 20, 0.78);
  border: 1px solid rgba(196, 156, 94, 0.24);
}
.bd-row.is-me {
  background: rgba(68, 42, 12, 0.45);
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: inset 0 0 12px rgba(245, 158, 11, 0.14);
}
.bd-rank {
  width: 28px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 800;
  color: #94a3b8;
  flex: none;
}
.bd-rank.is-gold,
.bd-rank.is-silver,
.bd-rank.is-bronze { font-size: 17px; }
.bd-wp-ico { flex: none; display: flex; align-items: center; }
.bd-who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bd-name-line {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.bd-name-line b {
  font-size: 12.5px;
  color: #f8fafc;
}
.bd-who small {
  font-size: 10.3px;
  color: #94a3b8;
}
.bd-online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  flex: none;
}
.rank-tier {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.rank-tier.is-legend   { background: rgba(234, 179, 8, 0.24); border-color: #facc15; color: #fef08a; }
.rank-tier.is-warden   { background: rgba(244, 63, 94, 0.22); border-color: #fb7185; color: #fecdd3; }
.rank-tier.is-vanguard { background: rgba(14, 165, 233, 0.22); border-color: #38bdf8; color: #bae6fd; }
.rank-tier.is-scout    { background: rgba(16, 185, 129, 0.22); border-color: #34d399; color: #a7f3d0; }
.rank-tier.is-rookie   { background: rgba(148, 163, 184, 0.18); border-color: rgba(148, 163, 184, 0.4); color: #cbd5e1; }

.bd-val {
  flex: none;
  font-size: 13px;
  font-weight: 800;
  color: #fde68a;
  text-align: right;
  white-space: nowrap;
}
.bd-me-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(84, 48, 12, 0.62), rgba(28, 22, 16, 0.85));
  border: 1.5px solid rgba(251, 191, 36, 0.68);
}
.bd-me-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.bd-me-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f59e0b;
  color: #141210;
}
.bd-me-left b { font-size: 13px; color: #fffbeb; }
.bd-me-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.bd-me-right b { font-size: 13.5px; color: #fde047; }
.bd-me-right small { font-size: 10px; color: #e2e8f0; }
.bd-me-hint {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

/* Mobile Responsive Polish for Stash, Board & Boss HUD */
@media (hover: none) and (pointer: coarse), (max-width: 820px) {
  .boss-wave-hud {
    top: calc(var(--sat) + 64px);
    width: min(350px, calc(100vw - 24px));
  }
  #party-sheet,
  #radio-sheet,
  #stash-sheet,
  #board-sheet {
    position: fixed;
    left: calc(var(--sal) + 8px);
    right: calc(var(--sar) + 8px);
    bottom: calc(var(--sab) + 8px);
    top: auto;
    transform: none;
    width: auto;
    max-width: none;
    max-height: 76dvh;
    border-radius: 18px;
    padding: 14px 12px calc(var(--sab) + 12px);
    z-index: 48;
    overflow-y: auto;
  }
  .stash-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bd-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bd-list {
    max-height: 36dvh;
  }
}

/* ==========================================================================
   DEAD SEOUL (?v=ds22) — COLLAPSIBLE SURVIVOR INVENTORY DRAWER (I KEY + BUTTON)
   ========================================================================== */
.survivor-hud {
  transition: width 0.16s ease, padding 0.16s ease;
}
.survivor-hud.is-inv-collapsed {
  width: min(640px, calc(100vw - 24px));
  padding: 7px 11px;
}
.survivor-hud.is-inv-collapsed .vitals-row {
  margin-bottom: 0;
}
.survivor-hud.is-inv-collapsed .hud-inv-drawer {
  display: none;
}
.survivor-hud:not(.is-inv-collapsed) .hud-wp-mini {
  display: none;
}

.hud-wp-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  background: transparent;
  border-style: solid;
  border-width: 6px 8px;
  border-image-source: url('./ui/slot_frame_dark.png');
  border-image-slice: 44 fill;
  border-image-repeat: stretch;
  padding: 0 3px;
  min-height: 32px;
  color: #d6c8ad;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.92);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.52));
}
.hud-wp-mini.has-weapon {
  border-image-source: url('./ui/slot_frame_amber.png');
  border-image-slice: 48 fill;
  color: #fff6dc;
}
.hud-wp-mini.is-low {
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.72));
  color: #fecaca;
}
.hud-wp-mini:hover {
  filter: brightness(1.14) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.62));
}

.hud-inv-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  background: transparent;
  border-style: solid;
  border-width: 7px 10px;
  border-image-source: url('./ui/btn_plate_steel.png');
  border-image-slice: 30 36 30 36 fill;
  border-image-repeat: stretch;
  padding: 0 3px;
  min-height: 34px;
  color: #f4ead6;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.56));
  transition: transform 0.10s ease, filter 0.14s ease;
}
.hud-inv-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(1.14) drop-shadow(0 5px 8px rgba(0, 0, 0, 0.66));
}
.hud-inv-toggle:active {
  transform: translateY(1px) scale(0.96);
}
.hud-inv-toggle.is-open {
  border-image-source: url('./ui/btn_plate_amber.png');
  border-image-slice: 28 42 28 42 fill;
  color: #fff8df;
}
.inv-badge-cnt {
  font-style: normal;
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(12, 11, 9, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.58);
  color: #fef08a;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}
.inv-chev {
  font-style: normal;
  font-size: 11px;
  color: #fde68a;
  line-height: 1;
}

@media (hover: none) and (pointer: coarse), (max-width: 820px) {
  body.is-inv-open .vehicle-bar {
    bottom: auto;
  }
  body.is-inv-open #build-sheet,
  body.is-inv-open #ping-wheel {
    bottom: calc(var(--sab) + 8px);
    max-height: 76dvh;
  }
}

/* ==========================================================================
   DEAD SEOUL (?v=ds23) — CHECKPOINT SAFE CAMP DIRECTORY & RESUME SNAPSHOT
   ========================================================================== */
.camp-choice.is-active {
  border-color: rgba(52, 211, 153, 0.72);
  background: rgba(16, 185, 129, 0.14);
}
.camp-choice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.camp-status-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.camp-status-badge.is-active {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(52, 211, 153, 0.75);
  color: #a7f3d0;
}
.camp-status-badge.is-visited {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #bae6fd;
}
.camp-status-badge.is-locked {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.38);
  color: #94a3b8;
}
.camp-map-hint {
  font-size: 10.5px;
  color: #fde68a;
  margin-top: 2px;
}
.resume-secondary-row.is-single {
  grid-template-columns: 1fr;
}
.snap-camp {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: #a7f3d0;
}
.snap-camp b { color: #ecfdf5; }


/* ==========================================================================
   DEAD SEOUL (?v=ds25) — ULTRA-MINIMAL 4-PLAYER CO-OP PARTY UI
   Invisible when solo (0px overhead); razor-slim live HP strip when in party!
   ========================================================================== */
.online-party-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #bae6fd;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.35;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.online-party-chip:hover {
  background: rgba(56, 189, 248, 0.28);
  border-color: rgba(125, 211, 252, 0.78);
  color: #f0f9ff;
}
.online-party-chip:active {
  transform: scale(0.96);
}
.online-party-chip.in-party {
  background: rgba(16, 185, 129, 0.24);
  border-color: rgba(52, 211, 153, 0.72);
  color: #a7f3d0;
}

/* Desktop Floating Mini Party HP Strip (clean 10px gap right below survival-crest!) */
.party-strip {
  position: fixed;
  top: 158px;
  left: 16px;
  z-index: 21;
  width: 214px;
  border-radius: 10px;
  background: rgba(14, 16, 20, 0.80);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.36);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.50);
  overflow: hidden;
  pointer-events: auto;
  transition: opacity 0.15s ease;
}
.party-strip[hidden] { display: none !important; }
.ps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 4px 9px;
  background: rgba(12, 22, 30, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.party-strip.is-collapsed .ps-head { border-bottom: none; }
.party-strip.is-collapsed .ps-members { display: none; }
.ps-head-main {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #e0f2fe;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.ps-head-main:hover .ps-title { color: #ffffff; }
.ps-code {
  font-size: 10px;
  font-weight: 800;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.36);
  padding: 0 5px;
  border-radius: 4px;
  letter-spacing: 0.4px;
}
.ps-mini-btn {
  appearance: none;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
}
.ps-mini-btn:hover { background: rgba(255, 255, 255, 0.1); color: #f8fafc; }

.ps-members {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px 6px 6px;
}
.ps-row {
  appearance: none;
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 1fr 62px 26px;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(22, 26, 33, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #f1f5f9;
  font: inherit;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.ps-row:hover {
  background: rgba(34, 42, 54, 0.88);
  border-color: rgba(56, 189, 248, 0.45);
}
.ps-row.is-me {
  background: rgba(16, 30, 38, 0.78);
  border-color: rgba(56, 189, 248, 0.28);
}
.ps-row.is-crit {
  border-color: rgba(244, 63, 94, 0.72);
  background: rgba(45, 12, 18, 0.84);
}
.ps-row.is-downed {
  border-color: #ef4444;
  background: rgba(65, 10, 18, 0.90);
  animation: partyCritPulse 1.1s ease-in-out infinite;
}
@keyframes partyCritPulse {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.2); }
  50% { box-shadow: inset 0 0 12px rgba(239, 68, 68, 0.42); }
}
.ps-who {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
}
.ps-nm {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-flag {
  font-size: 10px;
  flex-shrink: 0;
}
.ps-bar-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ps-track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(6, 8, 12, 0.92);
  overflow: hidden;
}
.ps-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #10b981, #4ade80);
  transition: width 0.14s linear;
}
.ps-track i.is-warn { background: linear-gradient(90deg, #d97706, #fbbf24); }
.ps-track i.is-crit { background: linear-gradient(90deg, #b91c1c, #fb7185); }
.ps-hp-num {
  font-size: 10px;
  font-weight: 800;
  color: #cbd5e1;
  min-width: 19px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ps-dist {
  font-size: 9.5px;
  font-weight: 700;
  color: #7dd3fc;
  text-align: right;
  white-space: nowrap;
}

/* Non-Intrusive Top-Center Invite Toast */
.party-invite-toast {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 48;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 14px;
  border-radius: 999px;
  background: rgba(14, 22, 30, 0.94);
  border: 1.5px solid rgba(56, 189, 248, 0.78);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65), 0 0 18px rgba(56, 189, 248, 0.26);
  color: #f0f9ff;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.party-invite-toast[hidden] { display: none !important; }
.pit-actions { display: flex; gap: 6px; }
.pit-btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 4px 11px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
.pit-btn.is-accept {
  background: linear-gradient(180deg, #10b981, #059669);
  color: #052016;
}
.pit-btn.is-decline {
  background: rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
}

/* Compact 4-Player Party Sheet (max 348px wide — cleanly below survival-crest, zero bloat!) */
.party-sheet {
  top: 158px;
  left: 16px;
  width: min(348px, calc(100vw - 24px));
  max-height: min(70dvh, 500px);
  z-index: 48;
}
.party-sheet-body {
  padding: 10px 12px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pt-hero-btn {
  appearance: none;
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  border: 1.5px solid #fde68a;
  color: #140e06;
  font: inherit;
  font-size: 13.5px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.25);
}
.pt-hero-btn:active { transform: scale(0.985); }
.pt-code-form {
  display: flex;
  gap: 6px;
}
.pt-code-input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(8, 10, 14, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #f8fafc;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-align: center;
}
.pt-code-input:focus {
  outline: none;
  border-color: #38bdf8;
}
.pt-act-btn {
  appearance: none;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.20);
  border: 1px solid rgba(56, 189, 248, 0.62);
  color: #e0f2fe;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.pt-act-btn:hover { background: rgba(56, 189, 248, 0.32); }
.pt-act-btn.is-danger {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
}
.pt-act-btn.is-sm {
  padding: 4px 9px;
  font-size: 11px;
}
.pt-code-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(16, 28, 36, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.45);
}
.pt-code-val {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fde68a;
}
.pt-sec-lbl {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.3px;
  margin-bottom: -4px;
}
.pt-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(20, 24, 32, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.pt-item-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.pt-item-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pt-item-sub {
  font-size: 10.5px;
  color: #94a3b8;
}
.pt-hp-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pt-hp-inline .ps-track { height: 6px; }
.pt-empty {
  font-size: 11.5px;
  color: #64748b;
  text-align: center;
  padding: 8px 6px;
}

/* Mobile Responsive: Ultra-Slim Single-Row Horizontal Teammate Strip below Top Crest (ZERO joystick overlap!) */
@media (hover: none) and (pointer: coarse), (max-width: 820px) {
  .party-strip {
    top: calc(var(--sat) + 52px);
    left: calc(var(--sal) + 8px);
    right: calc(var(--sar) + 8px);
    width: auto;
    border-radius: 8px;
    background: rgba(12, 15, 20, 0.76);
  }
  .ps-head { display: none; }
  .ps-members {
    flex-direction: row;
    align-items: center;
    gap: 5px;
    padding: 3px 5px;
    overflow-x: auto;
  }
  /* Mobile already shows own HP bar right above in top strip — show up to 3 teammates side-by-side without scrolling! */
  .party-strip.has-teammates .ps-row.is-me {
    display: none;
  }
  .ps-row {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 2px 6px;
  }
  .ps-bar-wrap { width: 34px; flex-shrink: 0; }
  .ps-hp-num { display: none; }
  .ps-dist { font-size: 9px; flex-shrink: 0; }
  #party-sheet,
  #radio-sheet {
    position: fixed;
    left: calc(var(--sal) + 8px);
    right: calc(var(--sar) + 8px);
    bottom: calc(var(--sab) + 8px);
    top: auto;
    transform: none;
    width: auto;
    max-width: none;
    max-height: 76dvh;
    border-radius: 18px;
    padding: 14px 12px calc(var(--sab) + 12px);
    z-index: 48;
    overflow-y: auto;
  }
  .pt-code-input {
    font-size: 16px;
  }
  .party-invite-toast {
    top: calc(var(--sat) + 54px);
    font-size: 11.5px;
    max-width: calc(100vw - 16px);
  }
  body.has-party .vehicle-bar {
    top: calc(var(--sat) + 86px);
  }
  body.has-party.has-vehicle-bar .radio-banner {
    top: calc(var(--sat) + 188px);
  }
}

/* ==========================================================================
   INTERACTIVE FIRST-TIME SURVIVAL TUTORIAL CARD (?v=ds32)
   Non-blocking, auto-suppressed on sheets/vehicle-bar, zero HUD residue
   ========================================================================== */
.tutorial-card {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  width: min(430px, calc(100vw - 24px));
  padding: 9px 12px 10px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(22, 20, 17, 0.94), rgba(12, 13, 17, 0.94));
  border: 1px solid rgba(245, 158, 11, 0.56);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(254, 243, 199, 0.14);
  backdrop-filter: blur(10px);
  color: #f5efe0;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.22s ease;
}
.tutorial-card[hidden],
.tutorial-card.is-suppressed,
body.mode-tactical .tutorial-card {
  display: none !important;
}
.tutorial-card.is-step-done {
  border-color: rgba(52, 211, 153, 0.85);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.28), inset 0 1px 0 rgba(167, 243, 208, 0.24);
}

body.has-tutorial .radio-banner {
  top: 170px;
}

.tut-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.tut-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.20);
  border: 1px solid rgba(245, 158, 11, 0.44);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.tutorial-card.is-step-done .tut-badge {
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.24);
  border-color: rgba(52, 211, 153, 0.62);
}

.tut-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tut-dots i {
  display: block;
  width: 14px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.22s ease, width 0.22s ease;
}
.tut-dots i.is-done {
  background: #34d399;
}
.tut-dots i.is-cur {
  width: 22px;
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.tut-prog {
  font-size: 10.5px;
  font-weight: 800;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.35);
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}
.tut-prog[hidden] { display: none; }

.tut-skip-btn {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(235, 222, 198, 0.22);
  color: #cbd5e1;
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.tut-skip-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.tut-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tut-text {
  min-width: 0;
  flex: 1;
}
.tut-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #fff8e7;
  line-height: 1.25;
  margin-bottom: 2px;
}
.tut-desc {
  margin: 0;
  font-size: 11.4px;
  line-height: 1.38;
  color: #d6cebd;
  word-break: keep-all;
}

.tut-cta-btn {
  flex: none;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid rgba(251, 191, 36, 0.72);
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.92), rgba(146, 64, 14, 0.95));
  color: #fffbeb;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.34);
  transition: transform 0.12s ease, filter 0.15s ease;
}
.tut-cta-btn[hidden] { display: none; }
.tut-cta-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.tut-cta-btn:active { transform: translateY(1px) scale(0.97); }

/* Golden spotlight pulse for target HUD buttons during tutorial */
.tut-pulse {
  animation: tutPulseGlow 1.15s ease-in-out infinite !important;
  position: relative;
}
@keyframes tutPulseGlow {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.65)) brightness(1.04);
  }
  50% {
    filter: drop-shadow(0 0 13px rgba(251, 191, 36, 0.98)) brightness(1.24);
  }
}

/* Replay tutorial button inside Controls Help modal */
.help-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(235, 222, 198, 0.14);
  display: flex;
  justify-content: center;
}
.help-tut-btn {
  width: 100%;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.28), rgba(146, 64, 14, 0.34));
  color: #fde68a;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}
.help-tut-btn:hover {
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.42), rgba(146, 64, 14, 0.48));
  color: #fffbeb;
}
.help-tut-btn:active {
  transform: scale(0.98);
}

@media (hover: none) and (pointer: coarse), (max-width: 820px) {
  body.has-vehicle-bar .tutorial-card {
    display: none !important;
  }
  .tutorial-card {
    top: calc(var(--sat) + 88px);
    left: calc(var(--sal) + 8px);
    right: calc(var(--sar) + 8px);
    width: auto;
    transform: none;
    padding: 8px 10px 9px;
    border-radius: 11px;
  }
  body.has-party .tutorial-card {
    top: calc(var(--sat) + 112px);
  }
  body.has-tutorial .radio-banner {
    top: calc(var(--sat) + 190px);
  }
  .tut-head { gap: 6px; margin-bottom: 4px; }
  .tut-badge { font-size: 10px; padding: 2px 6px; }
  .tut-dots i { width: 10px; height: 3.5px; }
  .tut-dots i.is-cur { width: 16px; }
  .tut-title { font-size: 12px; }
  .tut-desc { font-size: 10.8px; line-height: 1.32; }
  .tut-cta-btn { padding: 6px 9px; font-size: 11px; }
  .tut-skip-btn { padding: 3px 7px; font-size: 10px; }
}

/* ==========================================================================
   DEAD SEOUL (?v=ds33) — PC GAMER OVERHAUL
   1. Low-HP Peripheral Screen Vignette
   2. High-Contrast 2-Group Top Menu Capsules with Crisp Keycap Badges
   3. Bottom-Center Always-Visible 9-Slot PC Survival Hotbar + Thick Vitals
   (Zero Mobile Regression: Mobile <= 820px keeps its exact 3-icon bar & thumb pad)
   ========================================================================== */
.low-hp-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 14;
  opacity: 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 56%, rgba(185, 28, 28, 0.34) 84%, rgba(127, 29, 29, 0.68) 100%);
  transition: opacity 0.32s ease;
}
.low-hp-vignette.is-low,
.low-hp-vignette.is-bleed {
  opacity: 0.72;
  animation: lowHpPulse 1.6s ease-in-out infinite;
}
.low-hp-vignette.is-crit {
  opacity: 1;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 48%, rgba(220, 38, 38, 0.44) 80%, rgba(127, 29, 29, 0.82) 100%);
  animation: lowHpPulse 0.88s ease-in-out infinite;
}
@keyframes lowHpPulse {
  0%, 100% { filter: brightness(0.90); }
  50% { filter: brightness(1.18); }
}

/* Crisp Universal Keycap Badge */
.hk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 16px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(7, 9, 14, 0.94);
  border: 1px solid rgba(251, 191, 36, 0.56);
  border-bottom: 2px solid rgba(180, 83, 9, 0.75);
  color: #fde68a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  flex: none;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

/* Desktop-Only High-Contrast 2-Group Menu Capsules & Centered Always-Visible Hotbar */
@media (min-width: 821px) and (hover: hover) {
  .survival-crest {
    max-width: 392px;
  }
  .top-utility {
    top: 10px;
    right: 12px;
    gap: 6px;
    flex-wrap: wrap;
    max-width: calc(100vw - 420px);
  }
  .tu-group {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 4px;
    border-radius: 11px;
    background: rgba(10, 13, 19, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 214, 192, 0.22);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 250, 235, 0.10);
  }
  .tu-group.tu-primary {
    border-color: rgba(245, 158, 11, 0.36);
  }
  .tu-group.tu-system {
    border-color: rgba(148, 163, 184, 0.24);
  }

  .top-utility .util-btn {
    border-image: none;
    border-style: solid;
    border-width: 1px;
    border-color: rgba(226, 214, 192, 0.22);
    border-radius: 7px;
    background: linear-gradient(180deg, rgba(35, 40, 52, 0.94), rgba(19, 22, 30, 0.96));
    height: 30px;
    min-height: 30px;
    padding: 0 7px;
    gap: 4px;
    font-size: 11.2px;
    font-weight: 700;
    color: #f8f4ea;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.09);
    filter: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
    transition: background 0.14s ease, border-color 0.14s ease, transform 0.10s ease, box-shadow 0.14s ease;
  }
  .top-utility .util-btn:hover {
    background: linear-gradient(180deg, rgba(50, 57, 74, 0.96), rgba(28, 32, 44, 0.98));
    border-color: rgba(251, 191, 36, 0.62);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(251, 191, 36, 0.18);
    filter: none;
  }
  .top-utility .util-btn:active {
    transform: translateY(1px) scale(0.97);
    filter: none;
  }
  .top-utility .util-btn.util-btn-sq {
    border-image: none;
    border-width: 1px;
    border-radius: 7px;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
  }
  .top-utility .util-btn.util-btn-sq .ui-ico {
    width: 16px;
    height: 16px;
  }

  /* Clear Role Accent Borders on Top Gameplay Menus */
  .top-utility .btn-map-toggle { border-color: rgba(251, 191, 36, 0.42); }
  .top-utility .btn-radio-top  { border-color: rgba(56, 189, 248, 0.44); }
  .top-utility .btn-stash-top  { border-color: rgba(132, 204, 22, 0.40); }
  .top-utility .btn-board-top  { border-color: rgba(250, 204, 21, 0.36); }
  .top-utility .btn-help-top   { border-color: rgba(148, 163, 184, 0.38); }

  .top-utility .util-btn.profile-pill {
    border-image: none;
    border-width: 1px;
    border-color: rgba(245, 158, 11, 0.52);
    background: linear-gradient(180deg, rgba(66, 48, 24, 0.94), rgba(36, 26, 14, 0.96));
    color: #fef3c7;
  }
  .top-utility .util-btn.is-active,
  .top-utility .util-btn.btn-radio-top.has-airdrop {
    border-image: none;
    border-width: 1px;
    border-color: rgba(251, 191, 36, 0.85);
    background: linear-gradient(180deg, rgba(180, 83, 9, 0.90), rgba(120, 53, 15, 0.94));
    color: #fffbeb;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.38);
  }
  .top-utility .btn-aim-mode {
    border-color: rgba(52, 211, 153, 0.44);
    background: linear-gradient(180deg, rgba(18, 52, 44, 0.92), rgba(11, 32, 28, 0.96));
    color: #d1fae5;
  }
  .top-utility .btn-aim-mode.is-mouse-aim {
    border-color: rgba(251, 191, 36, 0.56);
    background: linear-gradient(180deg, rgba(72, 45, 16, 0.92), rgba(44, 26, 10, 0.96));
    color: #fde68a;
  }

  /* Bottom-Center PC Survival Dock (Always-Visible Vitals + 9-Slot Hotbar + Expandable Backpack Above) */
  .survivor-hud,
  .survivor-hud.is-inv-collapsed {
    left: 50%;
    transform: translateX(-50%);
    bottom: 12px;
    width: min(748px, calc(100vw - 24px));
    border-image: none;
    border: 1px solid rgba(245, 158, 11, 0.36);
    border-radius: 15px;
    background: linear-gradient(180deg, rgba(15, 18, 25, 0.93), rgba(9, 11, 16, 0.96));
    backdrop-filter: blur(12px);
    padding: 8px 10px 9px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 248, 225, 0.12);
    filter: none;
  }
  .survivor-hud.is-inv-collapsed .vitals-row {
    margin-bottom: 0;
  }
  .survivor-hud .hud-inv-drawer {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(235, 222, 198, 0.14);
  }
  .survivor-hud .inventory-slots {
    margin-bottom: 0;
  }

  /* Thick, High-Contrast Vitals Strip right above the PC Hotbar */
  .survivor-hud .vitals-row {
    gap: 9px;
    margin-bottom: 0;
  }
  .survivor-hud .vbar {
    font-size: 11px;
    font-weight: 800;
    color: #e2e8f0;
    gap: 6px;
  }
  .survivor-hud .vbar .track {
    height: 10px;
    background: rgba(6, 8, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.65);
  }
  .survivor-hud .vbar b {
    font-size: 11.5px;
    font-weight: 800;
    color: #ffffff;
    min-width: 26px;
  }
  .survivor-hud .hud-inv-toggle {
    border-image: none;
    border: 1px solid rgba(226, 214, 192, 0.30);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(38, 43, 56, 0.94), rgba(21, 25, 34, 0.96));
    padding: 0 8px;
    min-height: 30px;
    height: 30px;
    filter: none;
  }
  .survivor-hud .hud-inv-toggle.is-open {
    border-image: none;
    border-color: rgba(251, 191, 36, 0.78);
    background: linear-gradient(180deg, rgba(160, 74, 10, 0.90), rgba(105, 46, 12, 0.95));
  }
  .survivor-hud .hud-wp-mini {
    border-image: none;
    border: 1px solid rgba(226, 214, 192, 0.26);
    border-radius: 8px;
    background: rgba(18, 21, 29, 0.92);
    padding: 0 7px;
    min-height: 30px;
    height: 30px;
    filter: none;
  }
  .survivor-hud .hud-wp-mini.has-weapon {
    border-image: none;
    border-color: rgba(251, 191, 36, 0.62);
    background: linear-gradient(180deg, rgba(72, 48, 18, 0.90), rgba(40, 26, 11, 0.94));
  }

  /* Always-Visible 9-Slot PC Quick-Action Hotbar */
  .pc-hotbar {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 5px;
    margin-top: 7px;
  }
  .pc-hotbar .act-btn {
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 50px;
    padding: 13px 3px 4px;
    border-image: none;
    border: 1px solid rgba(226, 214, 192, 0.22);
    border-bottom: 2px solid rgba(6, 8, 12, 0.92);
    border-radius: 9px;
    background: linear-gradient(180deg, rgba(31, 36, 48, 0.94), rgba(17, 20, 28, 0.97));
    color: #f3eee3;
    font-size: 10px;
    font-weight: 700;
    filter: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.10s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
  }
  .pc-hotbar .act-btn:hover {
    background: linear-gradient(180deg, rgba(48, 55, 72, 0.96), rgba(26, 31, 42, 0.98));
    border-color: rgba(251, 191, 36, 0.64);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.56);
    filter: none;
  }
  .pc-hotbar .act-btn:active {
    transform: translateY(1px) scale(0.96);
    filter: none;
  }
  .pc-hotbar .act-btn .ui-ico-act {
    width: 20px;
    height: 20px;
  }
  .pc-hotbar .act-btn .hk {
    position: absolute;
    top: 3px;
    left: 4px;
    height: 14px;
    min-width: 15px;
    font-size: 8.5px;
    padding: 0 3.5px;
  }
  .pc-hotbar .hk-cnt {
    position: absolute;
    top: 3px;
    right: 4px;
    font-style: normal;
    min-width: 15px;
    height: 14px;
    padding: 0 3.5px;
    border-radius: 999px;
    background: rgba(12, 14, 20, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.45);
    color: #e2e8f0;
    font-size: 9px;
    font-weight: 800;
    line-height: 12px;
    text-align: center;
  }
  .pc-hotbar .act-btn.is-empty {
    opacity: 0.44;
  }
  .pc-hotbar .act-btn.act-btn-combat {
    border-image: none;
    border-color: rgba(248, 113, 113, 0.52);
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.64), rgba(69, 10, 10, 0.80));
    color: #fee2e2;
  }
  .pc-hotbar .act-btn.act-btn-interact.is-ready {
    border-color: rgba(52, 211, 153, 0.88);
    background: linear-gradient(180deg, rgba(6, 118, 86, 0.82), rgba(6, 78, 59, 0.92));
    color: #ecfdf5;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.42);
  }
  .pc-hotbar .act-btn.act-btn-heal {
    border-color: rgba(52, 211, 153, 0.36);
  }
  .pc-hotbar .act-btn.act-btn-heal.is-urgent {
    border-color: rgba(248, 113, 113, 0.92);
    background: linear-gradient(180deg, rgba(153, 27, 27, 0.78), rgba(6, 95, 70, 0.86));
    color: #ffffff;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.52);
    animation: healUrgentPulse 1s ease-in-out infinite;
  }
  @keyframes healUrgentPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.22); }
  }
  .pc-hotbar .act-btn.act-btn-craft {
    border-color: rgba(245, 158, 11, 0.58);
    background: linear-gradient(180deg, rgba(120, 53, 15, 0.58), rgba(69, 26, 3, 0.76));
    color: #fef3c7;
  }
  .pc-hotbar .act-btn.act-btn-craft.is-craft-ready::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 8px #fbbf24;
  }
  .pc-hotbar .act-btn.is-on {
    border-image: none;
    border-color: rgba(251, 191, 36, 0.78);
    background: linear-gradient(180deg, rgba(161, 98, 7, 0.70), rgba(92, 52, 6, 0.84));
    color: #fef9c3;
  }
  .pc-hotbar #qa-crouch.is-on {
    border-image: none;
    filter: none;
    border-color: rgba(167, 139, 250, 0.82);
    background: linear-gradient(180deg, rgba(91, 33, 182, 0.74), rgba(59, 7, 100, 0.86));
    color: #ede9fe;
  }

  /* Centered Craft/Ping Sheets cleanly above PC Hotbar */
  #build-sheet, #ping-wheel {
    left: 50%;
    transform: translateX(-50%);
    bottom: 122px;
    max-height: calc(100vh - 155px);
  }
  body.is-inv-open #build-sheet,
  body.is-inv-open #ping-wheel {
    bottom: 248px;
    max-height: calc(100vh - 280px);
  }

  /* Vehicle Bar cleanly sits bottom-left beside the centered hotbar on >= 1220px! */
  .vehicle-bar {
    left: 14px;
    bottom: 12px;
    width: 252px;
    border-image: none;
    border: 1px solid rgba(245, 158, 11, 0.36);
    border-radius: 13px;
    background: linear-gradient(180deg, rgba(16, 19, 27, 0.94), rgba(10, 12, 18, 0.96));
    filter: none;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.62);
  }
  .vehicle-bar .vb-btn {
    font-size: 10.2px;
    padding: 1px 2px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #help-modal {
    max-height: calc(100vh - 76px);
    overflow-y: auto;
  }
  body.is-inv-open .vehicle-bar {
    bottom: 12px;
  }
}

/* Medium desktop widths (821px–1259px): stack Vehicle Bar cleanly above hotbar left edge */
@media (min-width: 821px) and (max-width: 1259px) and (hover: hover) {
  .vehicle-bar {
    bottom: 122px;
    width: 280px;
  }
  body.is-inv-open .vehicle-bar {
    bottom: 248px;
  }
}

/* Preserve exact Mobile 3-icon top bar layout (zero regression on <= 820px / touch!) */
@media (hover: none) and (pointer: coarse), (max-width: 820px) {
  .tu-group {
    display: contents;
  }
  .desk-only-hk {
    display: none !important;
  }
  #btn-profile {
    order: -1;
  }
}

/* Auth Gate Language Switcher Pill (?v=ds34) */
.auth-lang-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.44);
  background: rgba(15, 19, 28, 0.88);
  color: #fde68a;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.10s ease;
}
.auth-lang-btn:hover {
  background: rgba(180, 83, 9, 0.35);
  border-color: rgba(251, 191, 36, 0.78);
  color: #fffbeb;
}
.auth-lang-btn:active {
  transform: scale(0.96);
}
