@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cinzel+Decorative:wght@700&family=VT323&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #050608;
  font-family: 'Cinzel', serif, 'Times New Roman';
  color: #d8cfb8;
  cursor: crosshair;
}

body.cursor-locked,
body.cursor-locked * {
  cursor: none !important;
}

.slot, .btn, #start-btn, button {
  cursor: pointer !important;
}

#game-container {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Center Souls Reticle (Visible only when cursor is locked) */
#reticle {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s ease;
}

body.cursor-locked #reticle,
body.aiming #reticle {
  opacity: 1;
}

.reticle-dot {
  width: 4px;
  height: 4px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 6px #4cc9f0, 0 0 10px #ffffff;
}

.reticle-circle {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(212, 175, 55, 0.65);
  border-radius: 50%;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

@keyframes reticleSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#reticle.aim-hit .reticle-circle {
  border-color: #ff3344;
  transform: scale(1.4);
}

/* === Shoulder-aim crosshair (laser) === */
.reticle-tick,
.reticle-charge,
.reticle-hitmarker {
  position: absolute;
  pointer-events: none;
}

.reticle-tick {
  background: #ffffff;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 0 6px rgba(199, 125, 255, 0.8);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.12s ease, background 0.12s ease;
}

.tick-up, .tick-down { width: 2px; height: 8px; left: 11px; }
.tick-left, .tick-right { width: 8px; height: 2px; top: 11px; }
.tick-up { top: -10px; }
.tick-down { bottom: -10px; }
.tick-left { left: -10px; }
.tick-right { right: -10px; }

body.aiming .reticle-tick { opacity: 1; }
body.aiming .reticle-circle { opacity: 0; }
body.aiming .reticle-dot { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 8px #c77dff; }

/* Ticks pull in as the charge builds, like a bow drawing tight */
#reticle.charging .tick-up { transform: translateY(4px); }
#reticle.charging .tick-down { transform: translateY(-4px); }
#reticle.charging .tick-left { transform: translateX(4px); }
#reticle.charging .tick-right { transform: translateX(-4px); }

/* Enemy under the crosshair */
#reticle.on-target .reticle-tick,
#reticle.on-target .reticle-dot {
  background: #ff4d6d;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 8px #ff4d6d;
}

/* Ally under the crosshair (Heal / Shield targeting) */
#reticle.on-ally .reticle-tick,
#reticle.on-ally .reticle-dot {
  background: #2ec4b6;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 9px #2ec4b6;
}


/* Radial charge meter */
.reticle-charge {
  width: 60px;
  height: 60px;
  left: -18px;
  top: -18px;
  transform: rotate(-90deg);
  opacity: 0;
  transition: opacity 0.15s ease;
}

#reticle.charging .reticle-charge { opacity: 1; }

.charge-track {
  fill: none;
  stroke: rgba(10, 8, 20, 0.55);
  stroke-width: 4;
}

.charge-ring {
  fill: none;
  stroke: #c77dff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 163.36;
  stroke-dashoffset: 163.36;
  filter: drop-shadow(0 0 3px #9d4edd);
}

#reticle.charged .charge-ring {
  stroke: #ffffff;
  filter: drop-shadow(0 0 4px #e0aaff) drop-shadow(0 0 8px #9d4edd);
}

#reticle.charged .reticle-charge {
  animation: chargeRingPulse 0.3s ease-in-out infinite alternate;
}

@keyframes chargeRingPulse {
  from { transform: rotate(-90deg) scale(1); }
  to { transform: rotate(-90deg) scale(1.1); }
}

/* Damage hit-marker (X) */
.reticle-hitmarker {
  width: 30px;
  height: 30px;
  left: -3px;
  top: -3px;
  opacity: 0;
}

.reticle-hitmarker span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 2px;
  margin: -1px 0 0 -15px;
  background: linear-gradient(90deg, #fff 0 30%, transparent 30% 70%, #fff 70% 100%);
  filter: drop-shadow(0 0 1px #000);
}

.reticle-hitmarker span:first-child { transform: rotate(45deg); }
.reticle-hitmarker span:last-child { transform: rotate(-45deg); }

#reticle.hit .reticle-hitmarker { animation: hitMarker 0.14s ease-out; }
#reticle.hit-crit .reticle-hitmarker { animation: hitMarker 0.14s ease-out; }
#reticle.hit-crit .reticle-hitmarker span {
  background: linear-gradient(90deg, #ffd166 0 30%, transparent 30% 70%, #ffd166 70% 100%);
}

@keyframes hitMarker {
  from { opacity: 1; transform: scale(1.35); }
  to { opacity: 0; transform: scale(1); }
}

/* Arcane Laser Charge Bar */
.charge-container {
  position: fixed;
  top: calc(50% + 44px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 50;
  pointer-events: none;
  animation: pulseGlow 1s infinite alternate;
}

.charge-container.hidden {
  display: none;
}

.charge-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #e0aaff;
  text-shadow: 0 0 10px #9d4edd, 0 2px 4px #000;
}

.charge-frame {
  width: 150px;
  height: 6px;
  background: rgba(10, 10, 15, 0.85);
  border: 1.5px solid #c77dff;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 14px rgba(157, 78, 221, 0.6);
}

.charge-fill {
  position: relative;
  height: 100%;
  background: linear-gradient(90deg, #3a0ca3, #7b2cbf, #c77dff, #ffffff);
  background-size: 200% 100%;
  box-shadow: 0 0 12px #c77dff;
  transition: width 0.05s linear;
  animation: chargeFlow 0.6s linear infinite;
}

.charge-fill::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -3px;
  width: 6px;
  height: calc(100% + 6px);
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 0 10px #fff, 0 0 20px #c77dff;
}

@keyframes chargeFlow {
  from { background-position: 200% 0; }
  to { background-position: 0 0; }
}

/* Fully charged: blazing white frame */
.charge-container.full .charge-label {
  color: #ffffff;
  text-shadow: 0 0 12px #e0aaff, 0 0 24px #9d4edd, 0 2px 4px #000;
  animation: chargeFullPulse 0.25s infinite alternate;
}

.charge-container.full .charge-frame {
  border-color: #ffffff;
  box-shadow: 0 0 18px #e0aaff, 0 0 36px rgba(157, 78, 221, 0.9);
}

@keyframes chargeFullPulse {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

@keyframes pulseGlow {
  from { filter: drop-shadow(0 0 4px rgba(199, 125, 255, 0.4)); }
  to { filter: drop-shadow(0 0 12px rgba(199, 125, 255, 0.9)); }
}

/* HUD Overlay */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Souls Status Bars (Top Left) */
.status-container {
  position: absolute;
  top: 28px;
  left: 36px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.8));
}

.bar-frame {
  position: relative;
  height: 16px;
  background: rgba(12, 14, 18, 0.85);
  border: 1.5px solid #4a3e2e;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.9);
}

.hp-frame { width: 340px; }
.fp-frame { width: 280px; }
.stamina-frame { width: 220px; }

.bar-fill {
  height: 100%;
  transition: width 0.12s ease-out;
}

.hp-fill {
  background: linear-gradient(90deg, #660e14, #c9242b, #e63946);
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.6);
}

.fp-fill {
  background: linear-gradient(90deg, #0e2a5c, #1f64c7, #4cc9f0);
  box-shadow: 0 0 10px rgba(76, 201, 240, 0.6);
}

.stamina-fill {
  background: linear-gradient(90deg, #184e28, #2a9d4f, #55d67e);
  box-shadow: 0 0 10px rgba(85, 214, 126, 0.6);
}

.barrier-frame {
  width: 260px;
  border-color: #00b4d8;
  box-shadow: inset 0 0 8px rgba(0, 180, 216, 0.3), 0 0 10px rgba(0, 245, 212, 0.25);
}

.barrier-frame.hidden {
  display: none;
}

.barrier-fill {
  background: linear-gradient(90deg, #0077b6, #00b4d8, #48cae4, #90e0ef, #ffffff);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.85);
  transition: width 0.08s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.barrier-fill.cracked-light {
  background: linear-gradient(90deg, #0077b6, #48cae4, #ffd166);
  box-shadow: 0 0 14px rgba(255, 209, 102, 0.75);
}

.barrier-fill.cracked-heavy {
  background: linear-gradient(90deg, #9b2226, #ae2012, #e63946, #ffb703);
  box-shadow: 0 0 16px rgba(230, 57, 70, 0.9);
}

.bar-label {
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #e5ded2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

.barrier-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: linear-gradient(90deg, rgba(0, 119, 182, 0.88), rgba(10, 35, 60, 0.88));
  border: 1px solid #00f5d4;
  border-radius: 3px;
  color: #cbf3f0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.4);
  animation: pulseBarrier 1.8s infinite ease-in-out;
  margin-top: 4px;
}

.barrier-badge.hidden {
  display: none;
}

@keyframes pulseBarrier {
  0%, 100% { opacity: 0.9; box-shadow: 0 0 12px rgba(0, 245, 212, 0.35); }
  50% { opacity: 1; box-shadow: 0 0 22px rgba(0, 245, 212, 0.8); }
}

.flight-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: linear-gradient(90deg, rgba(30, 80, 140, 0.85), rgba(15, 30, 60, 0.85));
  border: 1px solid #70b4ff;
  border-radius: 3px;
  color: #cae6ff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  box-shadow: 0 0 15px rgba(80, 160, 255, 0.4);
  animation: pulseFlight 2s infinite ease-in-out;
  margin-top: 4px;
}

.flight-badge.hidden {
  display: none;
}

.deadlock-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: linear-gradient(90deg, rgba(138, 3, 3, 0.95), rgba(40, 0, 0, 0.95));
  border: 2px solid #ff0055;
  border-radius: 4px;
  color: #ffccd5;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  box-shadow: 0 0 20px rgba(255, 0, 85, 0.7);
  animation: pulseDeadlock 0.8s infinite alternate ease-in-out;
  margin-top: 4px;
}

.deadlock-badge.hidden {
  display: none;
}

@keyframes pulseDeadlock {
  0% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 0, 85, 0.5); }
  100% { transform: scale(1.05); box-shadow: 0 0 30px rgba(255, 0, 85, 0.95); }
}

@keyframes pulseFlight {
  0%, 100% { opacity: 0.9; box-shadow: 0 0 12px rgba(80, 160, 255, 0.3); }
  50% { opacity: 1; box-shadow: 0 0 20px rgba(80, 180, 255, 0.7); }
}

.astral-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.88), rgba(26, 11, 46, 0.88));
  border: 1px solid #d946ef;
  border-radius: 3px;
  color: #f0abfc;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  box-shadow: 0 0 15px rgba(217, 70, 239, 0.45);
  animation: pulseAstral 2s infinite ease-in-out;
  margin-top: 4px;
}

.astral-badge.hidden {
  display: none;
}

@keyframes pulseAstral {
  0%, 100% { opacity: 0.9; box-shadow: 0 0 12px rgba(217, 70, 239, 0.35); }
  50% { opacity: 1; box-shadow: 0 0 24px rgba(217, 70, 239, 0.85); }
}

#astral-orb-dots {
  letter-spacing: 3px;
  color: #e879f9;
  text-shadow: 0 0 8px #d946ef, 0 0 14px #a855f7;
}

#slot-9.has-orbs {
  border-color: #d946ef;
  box-shadow: 0 0 16px rgba(217, 70, 239, 0.65), inset 0 0 8px rgba(168, 85, 247, 0.4);
}

#slot-9.has-orbs .slot-cost {
  color: #f0abfc;
  font-weight: 700;
  text-shadow: 0 0 8px #d946ef;
}

/* === Stealth & Invisibility Badge === */
.stealth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: linear-gradient(90deg, rgba(20, 70, 30, 0.90), rgba(10, 35, 15, 0.90));
  border: 1px solid #52b788;
  border-radius: 3px;
  color: #d8f3dc;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  box-shadow: 0 0 15px rgba(82, 183, 136, 0.5);
  animation: pulseStealth 2s infinite ease-in-out;
  margin-top: 4px;
}

.stealth-badge.hidden {
  display: none;
}

@keyframes pulseStealth {
  0%, 100% { opacity: 0.9; box-shadow: 0 0 10px rgba(82, 183, 136, 0.35); }
  50% { opacity: 1; box-shadow: 0 0 22px rgba(82, 183, 136, 0.85); }
}

/* === Boss Relics Inventory Badge === */
.relics-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: linear-gradient(90deg, rgba(80, 15, 15, 0.92), rgba(35, 5, 5, 0.92));
  border: 1px solid #e63946;
  border-radius: 3px;
  color: #ffccd5;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 0 15px rgba(230, 57, 70, 0.45);
  margin-top: 4px;
}

.relics-badge.hidden {
  display: none;
}

.relic-item-icons {
  display: inline-flex;
  gap: 6px;
  margin-left: 6px;
  font-size: 14px;
}

.relic-dim {
  opacity: 0.25;
  filter: grayscale(1);
  transition: all 0.3s ease;
}

.relic-active {
  opacity: 1;
  filter: none;
  text-shadow: 0 0 8px #ff4d6d;
  transform: scale(1.15);
}

/* === Abyssal Shadow Hands (Slot 0) Toggle Aura Badge & Active Slot Styling === */
.unseen-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  background: linear-gradient(90deg, rgba(20, 2, 38, 0.95), rgba(76, 15, 125, 0.88), rgba(20, 2, 38, 0.95));
  backdrop-filter: blur(8px);
  border: 1px solid #a855f7;
  border-radius: 4px;
  color: #f3e8ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 0 10px #c084fc, 0 0 20px #7e22ce;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.6), inset 0 0 12px rgba(126, 34, 206, 0.5);
  animation: pulseShadowAura 2.2s infinite ease-in-out;
  margin-top: 4px;
}

.unseen-badge.hidden {
  display: none;
}

/* Companion (Novice Monk) HUD */
.companion-hud {
  display: block;
}

.companion-hud.hidden {
  display: none !important;
}

@keyframes pulseShadowAura {
  0%, 100% {
    opacity: 0.92;
    box-shadow: 0 0 14px rgba(147, 51, 234, 0.5), inset 0 0 8px rgba(88, 28, 135, 0.4);
    border-color: #9333ea;
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 26px rgba(192, 132, 252, 0.95), 0 0 15px rgba(168, 85, 247, 0.8), inset 0 0 14px rgba(147, 51, 234, 0.7);
    border-color: #c084fc;
  }
}

#unseen-drain-rate {
  color: #c084fc;
  font-weight: 700;
  text-shadow: 0 0 8px #a855f7;
}

.skill-slot.slot-toggle-active {
  border-color: #a855f7 !important;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.85), 0 0 10px rgba(88, 28, 135, 0.7), inset 0 0 12px rgba(126, 34, 206, 0.7) !important;
  animation: shadowSlotPulse 1.6s infinite ease-in-out;
}

.skill-slot.slot-toggle-active .slot-name {
  color: #f3e8ff;
  font-weight: 700;
  text-shadow: 0 0 8px #a855f7;
}

.skill-slot.slot-toggle-active .slot-cost {
  color: #c084fc;
  font-weight: 700;
  text-shadow: 0 0 6px #7e22ce;
}

@keyframes shadowSlotPulse {
  0%, 100% {
    box-shadow: 0 0 14px rgba(147, 51, 234, 0.6), inset 0 0 8px rgba(88, 28, 135, 0.5);
    border-color: #9333ea;
  }
  50% {
    box-shadow: 0 0 28px rgba(192, 132, 252, 0.95), 0 0 16px rgba(168, 85, 247, 0.85), inset 0 0 14px rgba(147, 51, 234, 0.8);
    border-color: #d8b4fe;
  }
}

/* Skill Hotbar (Bottom Center) */
.hotbar-container {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
}

.hotbar {
  display: flex;
  gap: 8px;
  background: rgba(14, 16, 20, 0.85);
  padding: 8px 12px;
  border: 1px solid #5a4933;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.8), inset 0 0 12px rgba(0,0,0,0.6);
}

.skill-slot {
  position: relative;
  width: 62px;
  height: 66px;
  background: #181b22;
  border: 1.5px solid #3c3222;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.15s ease;
  overflow: hidden;
}

.skill-slot:hover, .skill-slot.active {
  border-color: #d4af37;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
  transform: translateY(-2px);
}

.slot-key {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #e8d08d;
  text-shadow: 0 1px 2px #000;
}

.slot-icon {
  font-size: 22px;
  margin-top: 2px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.slot-name {
  font-size: 8px;
  font-weight: 600;
  color: #b8b2a3;
  text-align: center;
  line-height: 1;
  margin-top: 4px;
  max-width: 58px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-cost {
  font-size: 8px;
  color: #5bb3ff;
  margin-top: 2px;
  font-weight: 700;
}

.cooldown-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: rgba(0, 0, 0, 0.75);
  border-bottom: 2px solid #5bb3ff;
  pointer-events: none;
  transition: height 0.05s linear;
}

/* Mobility Slot (Arcane Phase Blink) */
.skill-slot.mobility-slot {
  border-color: #00f5d4;
  background: linear-gradient(180deg, #0e1e28 0%, #061118 100%);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.25), inset 0 0 8px rgba(0, 245, 212, 0.15);
}

.skill-slot.mobility-slot:hover {
  border-color: #70d6ff;
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.6), inset 0 0 10px rgba(0, 245, 212, 0.3);
  transform: translateY(-2px);
}

.skill-slot.mobility-slot .slot-key {
  color: #00f5d4;
  font-size: 8px;
  letter-spacing: -0.2px;
}

.skill-slot.mobility-slot .slot-cost {
  color: #70d6ff;
}

.skill-slot.mobility-slot.on-cooldown {
  opacity: 0.75;
  filter: grayscale(35%);
}

#cd-blink {
  border-bottom: 2px solid #00f5d4;
  background: rgba(4, 15, 20, 0.82);
}

/* Guard Slot (Arcane Aegis Barrier [E]) */
.skill-slot.guard-slot {
  border-color: #48cae4;
  background: linear-gradient(180deg, #0a192f 0%, #06101e 100%);
  box-shadow: 0 0 10px rgba(72, 202, 228, 0.25), inset 0 0 8px rgba(72, 202, 228, 0.15);
}

.skill-slot.guard-slot:hover {
  border-color: #90e0ef;
  box-shadow: 0 0 16px rgba(72, 202, 228, 0.6), inset 0 0 10px rgba(72, 202, 228, 0.3);
  transform: translateY(-2px);
}

.skill-slot.guard-slot .slot-key {
  color: #48cae4;
  font-size: 11px;
  font-weight: 700;
}

.skill-slot.guard-slot .slot-cost {
  color: #90e0ef;
}

#cd-e {
  border-bottom: 2px solid #e63946;
  background: rgba(30, 8, 12, 0.85);
}

.cooldown-timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 5px #000, 0 0 10px rgba(0, 245, 212, 0.9), 0 2px 4px #000;
  pointer-events: none;
  z-index: 5;
  letter-spacing: 0.5px;
}

/* Boss Health Bar (Bottom Center Above Hotbar) */
.boss-container {
  position: absolute;
  bottom: 112px;
  left: 50%;
  transform: translateX(-50%);
  width: 620px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.boss-container.hidden {
  opacity: 0;
  pointer-events: none;
}

.boss-name-bar {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #dfcaa4;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9);
}

.boss-hp-frame {
  position: relative;
  height: 14px;
  background: rgba(10, 12, 16, 0.9);
  border: 1.5px solid #846838;
  box-shadow: 0 0 15px rgba(0,0,0,0.9);
  overflow: hidden;
}

.boss-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c1319, #c41e26, #f34b53);
  box-shadow: 0 0 12px rgba(243, 75, 83, 0.8);
  transition: width 0.15s ease-out;
}

/* Controls & Audio Hint (Top Right) */
.top-right-bar {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 20;
}

.hud-sound-btn {
  background: rgba(18, 22, 28, 0.85);
  border: 1px solid #7c6846;
  color: #d8cfb8;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 3px;
  pointer-events: auto;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hud-sound-btn:hover {
  border-color: #d4af37;
  color: #ffffff;
  background: rgba(30, 36, 46, 0.95);
}

.hud-sound-btn.muted {
  border-color: #6c4646;
  color: #a89494;
}

#controls-hint {
  background: rgba(10, 12, 16, 0.85);
  border: 1px solid #3c3222;
  padding: 8px 14px;
  font-size: 11px;
  line-height: 1.5;
  color: #a8a090;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-align: right;
}

#controls-hint b {
  color: #dfcaa4;
}

/* Victory Banner */
.banner {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  animation: bannerFade 4s forwards ease-out;
}

.banner.hidden {
  display: none;
}

.banner-text {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 48px;
  letter-spacing: 8px;
  color: #e5c158;
  text-shadow: 0 0 24px rgba(229, 193, 88, 0.8), 0 0 50px rgba(229, 193, 88, 0.4);
}

@keyframes bannerFade {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(0.9); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1.05); }
}

/* Floating Damage Numbers */
#damage-numbers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.dmg-number {
  position: absolute;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 20px;
  color: #fffae8;
  text-shadow: 0 0 6px #ff3344, 0 2px 4px #000;
  animation: floatDmg 0.9s forwards ease-out;
  transform: translate(-50%, -50%);
}

.dmg-number.crit {
  font-size: 28px;
  color: #ffe66d;
  text-shadow: 0 0 10px #ff9900, 0 2px 6px #000;
}

.dmg-number.freeze {
  color: #90e0ef;
  text-shadow: 0 0 8px #0077b6, 0 2px 4px #000;
}

.dmg-number.stun {
  color: #ffe66d;
  text-shadow: 0 0 8px #ffd166, 0 2px 4px #000;
}

.dmg-number.heal {
  font-size: 28px;
  color: #34d399;
  text-shadow: 0 0 14px #10b981, 0 0 24px #059669, 0 2px 4px #000;
}

@keyframes floatDmg {
  0% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50px) scale(1.3); }
}

/* Start / Overlay Screen */
#start-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(16, 20, 26, 0.88) 0%, rgba(5, 6, 8, 0.97) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
  transition: opacity 0.4s ease;
}

#start-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* .ui-block children force pointer-events back on; while the overlay is faded out they would still
   swallow clicks meant for anything underneath (e.g. the warp gate modal). */
#start-overlay.hidden .ui-block,
#start-overlay.hidden .ui-block * {
  pointer-events: none;
}

.title-card {
  text-align: center;
  max-width: 680px;
  padding: 40px;
  border: 1.5px solid #6b573a;
  background: rgba(14, 18, 24, 0.92);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(0, 0, 0, 0.7);
}

/* Modern 2-Column Dashboard Layout */
.title-card.dashboard-layout {
  max-width: 980px;
  width: 95vw;
  max-height: 90vh;
  padding: 22px 26px;
  border-radius: 8px;
  border: 1.5px solid #7c6238;
  background: radial-gradient(ellipse at 50% 0%, rgba(26, 32, 42, 0.96) 0%, rgba(10, 13, 18, 0.98) 100%);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.95), 0 0 20px rgba(212, 175, 55, 0.15), inset 0 0 30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.menu-header {
  margin-bottom: 12px;
  text-align: center;
  flex-shrink: 0;
}

.menu-header .game-title {
  font-size: 34px;
  margin: 0;
  line-height: 1.1;
  letter-spacing: 6px;
}

.menu-header .game-subtitle {
  font-size: 12px;
  margin: 4px 0 0 0;
  letter-spacing: 5px;
  color: #d4af37;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.menu-body-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.menu-col-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.menu-col-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.menu-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 2px;
  color: #dfcaa4;
  font-weight: 700;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.section-icon {
  font-size: 14px;
}

/* Big Hero Start Button */
.main-start-btn {
  width: 100%;
  padding: 15px 18px;
  background: linear-gradient(135deg, #c99330 0%, #e5c158 50%, #996e1e 100%);
  color: #0b0d10;
  border: 1.5px solid #ffecb3;
  border-radius: 6px;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  flex-shrink: 0;
}

.main-start-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
  box-shadow: 0 0 35px rgba(212, 175, 55, 0.8), inset 0 1px 0 #fff;
}

.main-start-btn:active {
  transform: translateY(1px);
}

.main-start-btn .btn-main-text {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #0d0f12;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.main-start-btn .btn-sub-text {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #2b220d;
  font-weight: 700;
}

/* Name row wrapper */
.player-name-box {
  padding: 7px 12px;
  background: rgba(10, 13, 18, 0.8);
  border: 1px solid #3d3426;
  border-radius: 4px;
  flex-shrink: 0;
}

.player-name-box .name-label {
  font-size: 10.5px;
  letter-spacing: 1.5px;
  color: #dfcaa4;
  font-weight: 700;
}

/* Modern Controls Guide */
.instruction-box.modern-controls {
  margin: 0;
  padding: 10px 12px;
  background: rgba(10, 13, 18, 0.85);
  border: 1px solid #3d3426;
  border-radius: 6px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.controls-title {
  font-size: 11px;
  letter-spacing: 2px;
  color: #dfcaa4;
  margin-bottom: 8px;
  font-weight: 700;
  border-bottom: 1px solid #2d261b;
  padding-bottom: 4px;
  text-align: left;
}

.keys-grid.modern-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 10px;
  font-size: 10.5px;
}

.key-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a69e90;
}

.key-item.highlight {
  color: #00f5d4;
  font-weight: 600;
}

.key-badge {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid #554433;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 700;
  color: #f0e6d6;
  min-width: 50px;
  text-align: center;
  flex-shrink: 0;
}

.key-item.highlight .key-badge {
  border-color: #00f5d4;
  color: #00f5d4;
  background: rgba(0, 245, 212, 0.12);
}

.key-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-title {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #e8d5b5;
  text-shadow: 0 0 16px rgba(232, 213, 181, 0.6), 0 4px 8px #000;
}

.game-subtitle {
  font-size: 14px;
  letter-spacing: 6px;
  color: #8c7d6b;
  margin-top: 6px;
  margin-bottom: 28px;
}

.instruction-box {
  margin: 20px 0 32px 0;
  padding: 20px;
  background: rgba(8, 10, 14, 0.7);
  border: 1px solid #3d3426;
  text-align: left;
}

.instruction-box h3 {
  font-size: 14px;
  letter-spacing: 2px;
  color: #dfcaa4;
  margin-bottom: 12px;
  text-align: center;
  border-bottom: 1px solid #4a3e2e;
  padding-bottom: 8px;
}

.keys-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  font-size: 12px;
  color: #a69e90;
}

.keys-grid b {
  color: #e5ded2;
}

.elden-btn {
  display: inline-block;
  padding: 16px 36px;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #f0e6d2;
  background: linear-gradient(180deg, #2b241c 0%, #171410 100%);
  border: 1.5px solid #a68449;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.elden-btn:hover {
  background: linear-gradient(180deg, #42372a 0%, #251e18 100%);
  border-color: #d8b063;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(216, 176, 99, 0.4);
  transform: translateY(-2px);
}

/* ===================== CO-OP MULTIPLAYER ===================== */
.ui-block,
.ui-block * {
  pointer-events: auto;
}

.coop-input {
  user-select: text;
  cursor: text !important;
  background: rgba(6, 8, 11, 0.9);
  border: 1px solid #4a3e2e;
  color: #f0e6d2;
  font-family: 'Cinzel', 'Leelawadee UI', Tahoma, serif;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 8px 10px;
  border-radius: 2px;
  outline: none;
  min-width: 0;
  transition: border-color 0.2s ease;
}

.coop-input:focus {
  border-color: #d4af37;
}

.coop-input:disabled {
  opacity: 0.55;
}

.coop-btn-primary,
.coop-btn-secondary {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 9px 14px;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.coop-btn-primary {
  color: #fff8e6;
  background: linear-gradient(180deg, #6b5226 0%, #3d2e14 100%);
  border: 1px solid #d4af37;
}

.coop-btn-primary:hover {
  background: linear-gradient(180deg, #8a6a30 0%, #54401c 100%);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.45);
}

.coop-btn-secondary {
  color: #e5ded2;
  background: linear-gradient(180deg, #2b241c 0%, #171410 100%);
  border: 1px solid #7c6846;
}

.coop-btn-secondary:hover {
  border-color: #d8b063;
  color: #ffffff;
}

.coop-join-row,
.coop-link-row {
  display: flex;
  gap: 6px;
}

.coop-join-row .coop-input,
.coop-link-row .coop-input {
  flex: 1;
}

#coop-join-input,
#menu-join-input {
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* HUD button + panel */
.coop-btn.online {
  border-color: #55d67e;
  color: #d9ffe5;
  box-shadow: 0 0 10px rgba(85, 214, 126, 0.35);
}

.coop-panel {
  width: 340px;
  padding: 14px 16px 16px;
  background: rgba(14, 18, 24, 0.95);
  border: 1.5px solid #6b573a;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.coop-panel.hidden {
  display: none;
}

.coop-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #dfcaa4;
  border-bottom: 1px solid #4a3e2e;
  padding-bottom: 8px;
}

.coop-icon-btn {
  background: none;
  border: none;
  color: #a69e90;
  font-size: 14px;
  padding: 2px 6px;
}

.coop-icon-btn:hover {
  color: #ffffff;
}

#coop-solo,
#coop-room {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#coop-solo.hidden,
#coop-room.hidden {
  display: none;
}

.coop-status {
  font-size: 12px;
  line-height: 1.5;
  color: #dfcaa4;
  padding: 8px 10px;
  background: rgba(212, 175, 55, 0.08);
  border-left: 2px solid #d4af37;
}

.coop-status.error {
  color: #ffb3b3;
  background: rgba(201, 36, 43, 0.12);
  border-left-color: #c9242b;
}

.coop-status.hidden {
  display: none;
}

.coop-hint {
  font-family: 'Cinzel', 'Leelawadee UI', Tahoma, serif;
  font-size: 11.5px;
  line-height: 1.55;
  color: #a8a090;
}

.coop-warn {
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 11.5px;
  line-height: 1.5;
  color: #ffd49a;
  background: rgba(255, 159, 28, 0.1);
  border-left: 2px solid #ff9f1c;
  padding: 8px 10px;
}

.coop-warn.hidden {
  display: none;
}

.coop-code-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: #8c7d6b;
  text-align: center;
}

.coop-code {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 34px;
  letter-spacing: 10px;
  text-align: center;
  color: #e5c158;
  text-shadow: 0 0 16px rgba(229, 193, 88, 0.55);
  user-select: text;
}

.coop-link-row .coop-input {
  font-size: 11px;
  letter-spacing: 0;
}

.coop-players {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid #3d3426;
  padding-top: 10px;
}

.coop-players li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #e5ded2;
  padding: 5px 8px;
  background: rgba(8, 10, 14, 0.6);
  border: 1px solid #2c261d;
}

.coop-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.coop-name {
  font-family: 'Cinzel', 'Leelawadee UI', Tahoma, serif;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coop-tag {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #d4af37;
}

.coop-hp {
  font-size: 11px;
  color: #e63946;
  min-width: 56px;
  text-align: right;
}

.coop-leave {
  align-self: flex-end;
  font-size: 11px;
  padding: 6px 12px;
}

/* Join / leave notifications (left side, under the status bars) */
.coop-feed {
  position: absolute;
  top: 150px;
  left: 36px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  z-index: 20;
}

.coop-toast {
  font-family: 'Cinzel', 'Leelawadee UI', Tahoma, serif;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #e5ded2;
  background: rgba(10, 12, 16, 0.88);
  border-left: 2px solid #d4af37;
  padding: 7px 12px;
  max-width: 380px;
  animation: coopToastIn 0.3s ease-out;
  transition: opacity 0.6s ease;
}

.coop-toast.join {
  border-left-color: #55d67e;
}

.coop-toast.leave {
  border-left-color: #c9242b;
}

.coop-toast.fade {
  opacity: 0;
}

@keyframes coopToastIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Start screen co-op section */
#start-overlay .title-card {
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}

.coop-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 auto 18px;
  max-width: 440px;
}

.coop-menu:last-child {
  margin: 18px auto 0;
}

.coop-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  font-size: 11px;
  letter-spacing: 2px;
  color: #8c7d6b;
}

.coop-name-row .coop-input {
  flex: 1;
}

.coop-invite-note {
  width: 100%;
  font-family: 'Cinzel', 'Leelawadee UI', Tahoma, serif;
  font-size: 13px;
  line-height: 1.5;
  color: #e5c158;
  padding: 10px 14px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid #6b573a;
}

.coop-invite-note.hidden,
.coop-menu-actions.hidden,
.coop-text-btn.hidden {
  display: none;
}

.coop-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.coop-text-btn {
  background: none;
  border: none;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #8c7d6b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.coop-text-btn:hover {
  color: #dfcaa4;
}

/* ===================== ANOMALY PLAYGROUND (analog horror) ===================== */
#start-overlay .title-card:not(.dashboard-layout) {
  max-height: 96vh;
  overflow-y: auto;
}

/* Map picker in Dashboard */
.map-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 0;
}

.map-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  padding: 10px 12px;
  background: rgba(10, 13, 18, 0.85);
  border: 1px solid #4a3e2c;
  border-radius: 6px;
  color: #d8cfb8;
  font-family: 'Cinzel', serif;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 96px;
  cursor: pointer;
}

.map-card-badge {
  font-size: 8.5px;
  letter-spacing: 1.5px;
  color: #d4af37;
  font-weight: 700;
  opacity: 0.9;
}

.map-card:hover {
  border-color: #d4af37;
  transform: translateY(-2px);
  background: rgba(22, 28, 38, 0.95);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
}

.map-card.selected {
  border-color: #d4af37;
  background: linear-gradient(135deg, rgba(28, 35, 48, 0.98), rgba(16, 20, 28, 0.98));
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.4), inset 0 0 10px rgba(212, 175, 55, 0.15);
}

.map-card.selected::after {
  content: '✓ ACTIVE';
  position: absolute;
  top: 7px;
  right: 9px;
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: #22c55e;
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.map-play-hint {
  font-size: 8px;
  letter-spacing: 0.8px;
  color: #00f5d4;
  margin-top: auto;
  padding-top: 4px;
  font-weight: 600;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.map-card:hover .map-play-hint {
  opacity: 1;
  color: #5eead4;
}

.map-name {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #e8d5b5;
  line-height: 1.25;
}

.map-desc {
  font-size: 9.5px;
  line-height: 1.35;
  letter-spacing: 0.3px;
  color: #9a927f;
}

.map-desc.th,
.eas-line.th {
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
}

.map-card.anomaly {
  border-color: #3a4440;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgba(14, 18, 16, 0.9), rgba(6, 8, 7, 0.95));
}

.map-card.anomaly .map-name {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 3px;
  color: #e6ece8;
  text-shadow: 2px 0 rgba(255, 0, 60, 0.5), -2px 0 rgba(0, 220, 255, 0.5);
}

.map-card.anomaly.selected {
  border-color: #cfd8d4;
  box-shadow: 0 0 16px rgba(200, 220, 215, 0.25);
}

.map-card.anomaly.selected::after {
  content: '● REC';
  color: #ff4a4a;
  font-family: 'VT323', monospace;
  font-size: 14px;
}

.map-card.paddy {
  border-color: #59422a;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(90, 20, 10, 0.4) 0%, transparent 75%),
    linear-gradient(180deg, rgba(18, 14, 10, 0.95), rgba(7, 9, 8, 0.98));
}

.map-card.paddy .map-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ffcc88;
  text-shadow: 0 0 10px rgba(255, 60, 20, 0.6);
}

.map-card.paddy.selected {
  border-color: #d97706;
  box-shadow: 0 0 18px rgba(217, 119, 6, 0.45);
}

.map-card.paddy.selected::after {
  content: '☠ CURSED';
  color: #ef4444;
  font-size: 11px;
  letter-spacing: 1.5px;
}

.map-card.celestial {
  border-color: #4a3d75;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(114, 9, 183, 0.45) 0%, transparent 75%),
    linear-gradient(180deg, rgba(16, 12, 28, 0.95), rgba(5, 6, 12, 0.98));
}

.map-card.celestial .map-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ffd166;
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.65), 0 0 24px rgba(114, 9, 183, 0.5);
}

.map-card.celestial:hover {
  border-color: #ffd166;
  box-shadow: 0 0 16px rgba(72, 202, 228, 0.35);
}

.map-card.celestial.selected {
  border-color: #ffd166;
  box-shadow: 0 0 22px rgba(255, 209, 102, 0.55), inset 0 0 12px rgba(72, 202, 228, 0.25);
}

.map-card.celestial.selected::after {
  content: '✦ ECLIPSE';
  color: #ffd166;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-shadow: 0 0 8px rgba(255, 209, 102, 0.8);
}

.map-lock {
  display: none;
  font-size: 9px;
  letter-spacing: 1px;
  color: #ff7b7b;
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
}

.map-card.locked {
  opacity: 0.5;
  cursor: not-allowed !important;
}

.map-card.locked .map-lock {
  display: block;
}

/* Camcorder OSD */
#anomaly-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: 'VT323', 'Courier New', 'Leelawadee UI', monospace;
  color: #f2f2ea;
  text-shadow: 2px 0 rgba(255, 40, 80, 0.45), -2px 0 rgba(40, 220, 255, 0.45), 0 0 6px rgba(0, 0, 0, 0.9);
}

#anomaly-hud.hidden {
  display: none;
}

.osd {
  position: absolute;
  letter-spacing: 2px;
  line-height: 1.05;
}

.osd-top {
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.osd-rec {
  font-size: 28px;
}

.osd-dot {
  color: #ff2a2a;
  animation: osdBlink 1s steps(1) infinite;
}

.osd-kills {
  display: inline-block;
  font-size: 21px;
}

.osd-kills.bump {
  animation: killBump 0.35s ease-out;
}

.osd-zone {
  font-size: 18px;
  opacity: 0.85;
}

.osd-zone.danger {
  color: #ff6060;
  opacity: 1;
  animation: osdBlink 0.9s steps(1) infinite;
}

.osd-bottom {
  left: 36px;
  bottom: 26px;
  font-size: 21px;
  opacity: 0.88;
}

#osd-broadcast.off {
  color: #9aa6a2;
}

/* Narrow windows: tuck the OSD under the status bars and above the hotbar */
@media (max-width: 1150px) {
  .osd-top {
    top: 104px;
    left: 36px;
    transform: none;
    text-align: left;
  }

  .osd-rec {
    font-size: 22px;
  }

  .osd-kills,
  .osd-zone {
    font-size: 16px;
  }

  .osd-bottom {
    bottom: 124px;
    font-size: 16px;
  }
}

@keyframes osdBlink {
  50% { opacity: 0; }
}

@keyframes killBump {
  0% { transform: scale(1.4); color: #ffffff; }
  100% { transform: scale(1); }
}

/* Emergency Alert System ticker (while in the field) */
.eas-ticker {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  overflow: hidden;
  background: rgba(150, 8, 8, 0.85);
  border-bottom: 1px solid #ff6060;
}

.eas-ticker.hidden {
  display: none;
}

.eas-ticker-track {
  display: inline-block;
  padding-left: 100%;
  white-space: nowrap;
  font-size: 19px;
  line-height: 22px;
  color: #ffffff;
  animation: easScroll 34s linear infinite;
}

@keyframes easScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* Full-screen emergency broadcast (elite spawn) */
.eas-alert {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 70, 0.35);
}

.eas-alert.hidden {
  display: none;
}

.eas-alert.show {
  animation: easFlash 3.6s linear forwards;
}

.eas-box {
  padding: 22px 36px;
  text-align: center;
  background: #0a0a0a;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 6px #b00000, 0 0 40px rgba(255, 0, 0, 0.5);
}

.eas-title {
  margin-bottom: 12px;
  padding: 2px 16px;
  font-size: 46px;
  letter-spacing: 4px;
  color: #ffffff;
  background: #b00000;
}

.eas-line {
  font-size: 30px;
  letter-spacing: 3px;
}

.eas-line.th {
  margin-top: 6px;
  font-size: 20px;
  letter-spacing: 1px;
}

@keyframes easFlash {
  0%, 9%, 19% { opacity: 1; }
  4%, 14% { opacity: 0.15; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

/* "SAFE HOUSE" / "SIGNAL DETECTED" notice */
.zone-toast {
  position: absolute;
  top: 24%;
  left: 50%;
  padding: 4px 16px;
  font-size: 30px;
  letter-spacing: 3px;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateX(-50%);
}

.zone-toast.show {
  animation: zoneToast 2.8s ease-out forwards;
}

@keyframes zoneToast {
  0% { opacity: 0; transform: translate(-50%, 8px); }
  12% { opacity: 1; transform: translate(-50%, 0); }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

/* Channel Zero's boss bar looks like a dying signal */
body[data-map="anomaly"] .boss-title {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 26px;
  letter-spacing: 8px;
  color: #eef2f0;
  text-shadow: 2px 0 rgba(255, 40, 80, 0.5), -2px 0 rgba(40, 220, 255, 0.5);
}

body[data-map="anomaly"] .boss-hp-fill {
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.25) 0 2px, transparent 2px 5px),
    linear-gradient(90deg, #6d7572, #d7dfdc, #ffffff);
  box-shadow: 0 0 12px rgba(220, 235, 230, 0.7);
}

/* NPCs: talk prompt, idle banter, dialogue */
.npc-prompt {
  position: absolute;
  padding: 5px 12px;
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 14px;
  white-space: nowrap;
  color: #f0e6d2;
  background: rgba(10, 12, 16, 0.85);
  border: 1px solid #8a7348;
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, -100%);
  pointer-events: none;
}

.npc-key {
  display: inline-block;
  min-width: 20px;
  margin-right: 6px;
  padding: 0 5px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  text-align: center;
  color: #e8d08d;
  border: 1px solid #d4af37;
  border-radius: 3px;
}

.npc-bubble {
  position: absolute;
  max-width: 320px;
  padding: 7px 12px;
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: #1a1a1a;
  background: rgba(245, 240, 228, 0.92);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -100%);
  pointer-events: none;
}

.npc-bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  border: 7px solid transparent;
  border-top-color: rgba(245, 240, 228, 0.92);
  border-bottom: 0;
  transform: translateX(-50%);
}

.npc-prompt.hidden,
.npc-bubble.hidden,
.dialogue-box.hidden {
  display: none;
}

.dialogue-box {
  position: absolute;
  left: 50%;
  bottom: 172px;
  width: min(680px, 92vw);
  padding: 14px 20px 12px;
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  background: linear-gradient(180deg, rgba(12, 14, 19, 0.94), rgba(6, 7, 10, 0.96));
  border: 1px solid #6b573a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 0 18px rgba(0, 0, 0, 0.6);
  transform: translateX(-50%);
  cursor: pointer;
}

.dlg-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #3d3426;
}

.dlg-name {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #e8d08d;
}

.dlg-title {
  font-size: 12px;
  color: #9a927f;
}

.dlg-text {
  min-height: 54px;
  font-size: 17px;
  line-height: 1.6;
  color: #f0ebe0;
}

.dlg-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.dlg-choice {
  padding: 7px 12px;
  text-align: left;
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 14px;
  color: #e5ded2;
  background: rgba(30, 26, 20, 0.85);
  border: 1px solid #4a3e2e;
  transition: all 0.15s ease;
}

.dlg-choice:hover {
  color: #ffffff;
  background: rgba(60, 48, 30, 0.9);
  border-color: #d4af37;
  transform: translateX(4px);
}

.dlg-hint {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-align: right;
  color: #7d766a;
}

/* === Cursed Paddy Basin Overlays === */
.lightning-flash-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.05s ease-out;
}

.interaction-prompt {
  position: absolute;
  bottom: 124px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 18, 14, 0.92);
  border: 1.5px solid #d4af37;
  padding: 8px 20px;
  border-radius: 4px;
  color: #ffeedd;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.5);
  z-index: 50;
  pointer-events: none;
  animation: promptPulse 1.8s infinite ease-in-out;
  text-align: center;
}

.interaction-prompt.hidden {
  display: none;
}

.prompt-key {
  color: #ffe600;
  text-shadow: 0 0 8px #ffbe0b;
  font-weight: 900;
  margin-right: 4px;
}

@keyframes promptPulse {
  0%, 100% {
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
    border-color: #d4af37;
  }
  50% {
    box-shadow: 0 0 24px rgba(255, 230, 0, 0.85);
    border-color: #ffe600;
  }
}

/* ===================== DIMENSIONAL WARP GATE MODAL ===================== */
.warp-modal {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(10, 14, 22, 0.88) 0%, rgba(3, 4, 8, 0.96) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 95;
  backdrop-filter: blur(6px);
  transition: opacity 0.25s ease;
}

.warp-modal.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.warp-card {
  width: 92%;
  max-width: 760px;
  max-height: 92vh;
  overflow-y: auto;
  background: rgba(12, 16, 24, 0.95);
  border: 1.5px solid #d4af37;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 245, 212, 0.25);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.warp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  padding-bottom: 12px;
}

.warp-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.warp-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px #00f5d4);
}

.warp-title {
  margin: 0;
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 20px;
  letter-spacing: 2.5px;
  color: #ffd166;
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.6);
}

.warp-subtitle {
  margin: 2px 0 0;
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 13px;
  color: #a4b0be;
}

.warp-close-btn {
  background: transparent;
  border: 1px solid #555;
  color: #aaa;
  font-size: 18px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.warp-close-btn:hover {
  border-color: #ffd166;
  color: #ffd166;
  transform: scale(1.08);
}

.warp-realms-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .warp-realms-list {
    grid-template-columns: 1fr;
  }
}

.warp-realm-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(18, 22, 32, 0.85);
  border: 1px solid #2e3547;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.warp-realm-card:hover:not(.current) {
  border-color: #00f5d4;
  background: rgba(24, 30, 44, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.3);
}

.warp-realm-card.selected {
  border-color: #ffd166 !important;
  background: rgba(36, 32, 24, 0.95);
  box-shadow: 0 0 20px rgba(255, 209, 102, 0.45);
}

.warp-realm-card.current {
  opacity: 0.65;
  cursor: default;
  border-color: #48cae4;
  background: rgba(14, 24, 32, 0.7);
}

.realm-icon-wrap {
  font-size: 24px;
  flex-shrink: 0;
  padding-top: 2px;
}

.realm-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
}

.realm-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.realm-name {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
}

.realm-badge {
  font-size: 9px;
  letter-spacing: 1px;
  padding: 2px 6px;
  border: 1px solid;
  border-radius: 2px;
  white-space: nowrap;
}

.realm-name-th {
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #ffd166;
}

.realm-desc {
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 11px;
  color: #8fa3b8;
  line-height: 1.35;
}

.warp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  padding-top: 14px;
}

.warp-hint {
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 12px;
  color: #7d8b99;
}

.warp-confirm-btn {
  padding: 10px 22px;
  background: linear-gradient(180deg, #d4af37, #aa820a);
  border: 1px solid #ffe600;
  color: #0b0c10;
  font-family: 'Cinzel', 'Leelawadee UI', serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.5);
  transition: all 0.2s ease;
}

.warp-confirm-btn:hover:not(.disabled) {
  background: linear-gradient(180deg, #ffe600, #d4af37);
  box-shadow: 0 0 24px rgba(255, 230, 0, 0.85);
  transform: translateY(-2px);
}

.warp-confirm-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #333;
  border-color: #555;
  color: #888;
  box-shadow: none;
}

/* === Chest Opening Progress Bar (5s Channel) === */
.chest-progress-container {
  position: absolute;
  bottom: 168px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(14, 18, 14, 0.94);
  border: 1.5px solid #ffbe0b;
  padding: 8px 18px;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(255, 190, 11, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.8);
  z-index: 55;
  pointer-events: none;
}

.chest-progress-container.hidden {
  display: none;
}

.chest-progress-label {
  font-family: 'Cinzel', 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ffd166;
  text-shadow: 0 0 8px #ffbe0b;
}

.chest-progress-frame {
  width: 220px;
  height: 10px;
  background: rgba(10, 12, 10, 0.9);
  border: 1px solid #aa820a;
  border-radius: 2px;
  overflow: hidden;
}

.chest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #ffe600);
  box-shadow: 0 0 10px #ffe600;
  transition: width 0.05s linear;
}

/* === Pop Demon Awareness Indicator (สัญลักษณ์รู้สึกตัว) === */
.pop-awareness-indicator {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  pointer-events: none;
  animation: awarenessPulse 1.1s infinite alternate ease-in-out;
}

.pop-awareness-indicator.hidden {
  display: none;
}

.awareness-eye-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: radial-gradient(circle, rgba(180, 0, 20, 0.85) 0%, rgba(40, 2, 8, 0.9) 70%, transparent 100%);
  border: 2px solid #ff0054;
  border-radius: 50%;
  box-shadow: 0 0 25px #d90429, inset 0 0 14px #800f2f;
}

.awareness-eye-icon {
  font-size: 30px;
  filter: drop-shadow(0 0 10px #ff0000);
}

.awareness-alert-mark {
  position: absolute;
  top: -8px;
  right: -4px;
  font-size: 22px;
  font-weight: 900;
  color: #ffff3f;
  text-shadow: 0 0 10px #ffea00;
  animation: pingMark 0.5s infinite alternate ease-in-out;
}

@keyframes awarenessPulse {
  0% {
    transform: translateX(-50%) scale(0.92);
    filter: drop-shadow(0 0 10px rgba(230, 57, 70, 0.6));
  }
  100% {
    transform: translateX(-50%) scale(1.18);
    filter: drop-shadow(0 0 26px rgba(255, 0, 60, 0.95));
  }
}

@keyframes pingMark {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

/* === Locked Skill Slots in Paddy Map === */
.skill-slot.spell-locked {
  opacity: 0.28 !important;
  filter: grayscale(1) !important;
  cursor: not-allowed !important;
  border-color: #242220 !important;
  box-shadow: none !important;
}

.skill-slot.spell-locked::after {
  content: '🔒';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  z-index: 5;
  filter: drop-shadow(0 0 4px #000);
}


/* ===================== Quick item (flask) badge ===================== */
.quick-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-family: 'Cinzel', 'Leelawadee UI', Tahoma, serif;
  font-size: 13px;
  color: #f1dcc0;
  text-shadow: 0 1px 3px #000;
}
.quick-item-icon { font-size: 18px; filter: hue-rotate(-115deg) drop-shadow(0 0 6px rgba(230, 57, 70, 0.8)); }
.quick-item-key {
  border: 1px solid #6b573a;
  background: rgba(8, 10, 14, 0.8);
  padding: 0 5px;
  font-size: 11px;
  color: #d4af37;
}
.quick-item-hint { margin-left: 8px; font-size: 11px; color: rgba(216, 207, 184, 0.55); }
.quick-item.empty .quick-item-icon { filter: grayscale(1) opacity(0.5); }
.quick-item.empty #quick-item-count { color: #7a6f60; }

/* ===================== Pause menu [ESC] ===================== */
.pause-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  /* keep the left of the screen clear for the live character showcase */
  background: linear-gradient(90deg, rgba(5, 6, 8, 0) 0%, rgba(5, 6, 8, 0.15) 45%, rgba(5, 6, 8, 0.85) 70%);
  animation: pause-fade 0.35s ease;
}
.pause-menu.hidden { display: none; }
@keyframes pause-fade { from { opacity: 0; } to { opacity: 1; } }

.pause-card {
  width: min(430px, 92vw);
  margin-right: 5vw;
  padding: 7vh 0 5vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.pause-title {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 44px;
  letter-spacing: 8px;
  color: #e8d9a8;
  text-shadow: 0 0 22px rgba(212, 175, 55, 0.45);
}
.pause-sub { font-family: 'Leelawadee UI', Tahoma, sans-serif; color: rgba(216, 207, 184, 0.7); margin-top: -8px; }
.pause-coop-note {
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 13px;
  color: #ffb4a2;
  border-left: 2px solid #c9242b;
  padding-left: 8px;
}
.pause-coop-note.hidden { display: none; }
.pause-section-label {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 3px;
  color: #a8966e;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  padding-bottom: 6px;
}
.pause-characters { display: flex; flex-direction: column; gap: 8px; }

.char-card {
  --char-accent: #d4af37;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  background: rgba(12, 16, 24, 0.82);
  border: 1px solid rgba(107, 87, 58, 0.8);
  color: #d8cfb8;
  text-align: left;
  font-family: 'Cinzel', 'Leelawadee UI', Tahoma, serif;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.char-card:hover { border-color: var(--char-accent); transform: translateX(-4px); }
.char-card.selected {
  border-color: var(--char-accent);
  background: linear-gradient(90deg, rgba(12, 16, 24, 0.9), rgba(12, 16, 24, 0.6));
  box-shadow: inset 3px 0 0 var(--char-accent), 0 0 18px rgba(0, 0, 0, 0.6);
}
.char-emblem {
  font-size: 26px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--char-accent);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--char-accent);
  flex-shrink: 0;
}
.char-text { display: flex; flex-direction: column; gap: 2px; }
.char-name { font-size: 18px; letter-spacing: 3px; color: #f1e6c8; }
.char-title { font-size: 12px; color: rgba(216, 207, 184, 0.7); }
.char-tag {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--char-accent);
}
.pause-char-detail {
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(216, 207, 184, 0.85);
}
.char-staff { margin-top: 4px; color: #d4af37; font-size: 12px; }

.pause-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.pause-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  background: rgba(8, 10, 14, 0.75);
  border: 1px solid rgba(107, 87, 58, 0.8);
  color: #d8cfb8;
  font-family: 'Cinzel', 'Leelawadee UI', Tahoma, serif;
  font-size: 14px;
  letter-spacing: 1px;
  transition: border-color 0.2s, color 0.2s;
}
.pause-btn:hover { border-color: #d4af37; color: #f1e6c8; }
.pause-btn.primary { border-color: #d4af37; color: #f1e6c8; }
.pause-key {
  font-size: 11px;
  color: #a8966e;
  border: 1px solid rgba(168, 150, 110, 0.6);
  padding: 1px 6px;
}

/* The HUD steps aside while paused */
#hud, #reticle { transition: opacity 0.3s ease; }
body.game-paused #hud,
body.game-paused #reticle { opacity: 0; }

/* ===================== Weapon HUD Switcher (Bottom Left) ===================== */
.weapon-hud {
  position: fixed;
  left: 24px;
  bottom: 95px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(10, 13, 20, 0.85);
  border: 1px solid rgba(138, 109, 59, 0.6);
  padding: 6px 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  pointer-events: auto;
  font-family: 'Cinzel', 'Leelawadee UI', Tahoma, serif;
  user-select: none;
}
.weapon-hud-title {
  font-size: 9px;
  letter-spacing: 2px;
  color: #cca43b;
  text-shadow: 0 1px 2px #000;
}
.weapon-hud-slots {
  display: flex;
  gap: 8px;
}
.weapon-hud-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(20, 24, 34, 0.8);
  border: 1px solid rgba(107, 87, 58, 0.6);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.weapon-hud-slot:hover {
  border-color: #d4af37;
  background: rgba(30, 36, 50, 0.9);
}
.weapon-hud-slot.active {
  border-color: #ffd166;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(20, 24, 34, 0.95) 100%);
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.4), inset 0 0 6px rgba(255, 209, 102, 0.2);
}
.w-hud-num {
  font-size: 11px;
  font-weight: bold;
  color: #d4af37;
}
.w-hud-icon {
  font-size: 16px;
}
.w-hud-name {
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 11px;
  color: #e5dcc3;
}

/* ===================== PoE Style Inventory [I] ===================== */
.inventory-panel.poe-theme {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 95;
  width: min(920px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(135deg, rgba(12, 14, 20, 0.97) 0%, rgba(6, 8, 12, 0.98) 100%);
  border: 2px solid #6b573a;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.95), inset 0 0 60px rgba(212, 175, 55, 0.05);
  font-family: 'Cinzel', 'Leelawadee UI', Tahoma, serif;
  animation: pause-fade 0.2s ease;
  user-select: none;
}
.inventory-panel.hidden { display: none; }

.poe-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(138, 109, 59, 0.4);
  padding-bottom: 8px;
}
.poe-title {
  font-size: 22px;
  letter-spacing: 4px;
  color: #f1e3c6;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}
.poe-sub {
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 12px;
  color: rgba(216, 207, 184, 0.7);
}

.poe-main-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
}
@media (max-width: 860px) {
  .poe-main-container {
    grid-template-columns: 1fr;
  }
}

.poe-section-title {
  font-size: 11px;
  letter-spacing: 2px;
  color: #cca43b;
  margin-bottom: 8px;
  border-left: 3px solid #cca43b;
  padding-left: 6px;
}

/* Equipment Column */
.poe-equipment-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(16, 20, 28, 0.65);
  border: 1px solid rgba(107, 87, 58, 0.4);
  padding: 12px;
  border-radius: 4px;
}

.poe-weapon-sets {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.poe-wset-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #a8966e;
}
.poe-wset-btn {
  padding: 3px 12px;
  background: rgba(25, 30, 42, 0.8);
  border: 1px solid rgba(107, 87, 58, 0.7);
  color: #cca43b;
  font-family: 'Cinzel', serif;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
}
.poe-wset-btn:hover {
  border-color: #d4af37;
  color: #fff;
}
.poe-wset-btn.active {
  background: #d4af37;
  color: #0b0d13;
  border-color: #ffe699;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

/* Paperdoll Grid Layout */
.poe-paperdoll-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.poe-slot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.poe-slot-header {
  font-size: 9px;
  letter-spacing: 1px;
  color: #8a7a58;
}
.poe-socket {
  position: relative;
  width: 72px;
  height: 72px;
  background: radial-gradient(circle at 50% 50%, rgba(30, 36, 48, 0.9) 0%, rgba(14, 17, 24, 0.95) 100%);
  border: 1.5px solid rgba(107, 87, 58, 0.65);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: grab;
  transition: all 0.2s ease;
}
.poe-socket-small {
  width: 58px;
  height: 58px;
}
.poe-socket.empty-socket {
  border-style: dashed;
  border-color: rgba(90, 75, 50, 0.4);
}
.poe-socket.has-item {
  border-color: var(--socket-tint, #cca43b);
  box-shadow: 0 0 10px color-mix(in srgb, var(--socket-tint, #cca43b) 30%, transparent), inset 0 0 8px color-mix(in srgb, var(--socket-tint, #cca43b) 20%, transparent);
}
.poe-socket.drag-hover {
  border-color: #00f5d4 !important;
  background: rgba(0, 245, 212, 0.25) !important;
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.6) !important;
}
.active-weapon-border .poe-socket {
  border-color: #ffd166 !important;
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.5), inset 0 0 10px rgba(255, 209, 102, 0.2) !important;
}

.poe-socket-placeholder {
  font-size: 16px;
  opacity: 0.35;
  color: #a8966e;
}
.poe-item-icon {
  font-size: 26px;
  filter: drop-shadow(0 0 6px var(--socket-tint, #cca43b));
}
.poe-socket-item-name {
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 10px;
  color: #f1e3c6;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

/* Flask Row */
.poe-flask-bar {
  margin-top: 6px;
  padding: 6px;
  background: rgba(10, 13, 20, 0.7);
  border: 1px solid rgba(107, 87, 58, 0.3);
  border-radius: 4px;
}
.poe-flasks-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.poe-socket-flask {
  width: 54px;
  height: 54px;
}

/* Character Stat Summary Box */
.poe-stats-box {
  margin-top: 4px;
  padding: 8px 10px;
  background: rgba(10, 13, 18, 0.8);
  border: 1px solid rgba(107, 87, 58, 0.4);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 11px;
}
.poe-stat-line {
  display: flex;
  justify-content: space-between;
  color: #c5bba6;
}
.poe-stat-label {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 1px;
  color: #8a7a58;
}
.poe-highlight-gold { color: #ffd166; font-weight: bold; }
.poe-highlight-teal { color: #00f5d4; }
.poe-highlight-blue { color: #70d6ff; }

/* Backpack Column & PoE Grid */
.poe-backpack-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.inv-grid.poe-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  background: rgba(14, 18, 26, 0.7);
  border: 1px solid rgba(107, 87, 58, 0.5);
  padding: 10px;
  border-radius: 4px;
}
.inv-slot.poe-slot {
  --item-tint: #cca43b;
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--item-tint) 20%, transparent) 0%, rgba(16, 20, 28, 0.95) 75%);
  border: 1px solid rgba(107, 87, 58, 0.6);
  border-radius: 3px;
  cursor: grab;
  transition: all 0.15s ease;
}
.inv-slot.poe-slot.empty {
  background: rgba(12, 15, 22, 0.65);
  border-color: rgba(50, 42, 32, 0.45);
  cursor: default;
}
.inv-slot.poe-slot:not(.empty):hover {
  border-color: var(--item-tint);
  transform: translateY(-1px);
  box-shadow: 0 0 10px color-mix(in srgb, var(--item-tint) 40%, transparent);
}
.inv-slot.poe-slot.selected {
  border-color: #ffd166;
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.5), inset 0 0 8px rgba(255, 209, 102, 0.25);
}
.inv-slot.poe-slot.drag-hover {
  border-color: #00f5d4 !important;
  background: rgba(0, 245, 212, 0.25) !important;
}

/* Detail Card (PoE Style Tooltip Card) */
.poe-detail-card {
  padding: 12px 14px;
  border: 1px solid rgba(138, 109, 59, 0.6);
  background: linear-gradient(135deg, rgba(20, 24, 34, 0.85) 0%, rgba(12, 14, 20, 0.95) 100%);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
}
.poe-card-head {
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(107, 87, 58, 0.3);
  padding-bottom: 6px;
}
.poe-card-title {
  font-size: 16px;
  font-weight: bold;
  color: #ffd166;
  text-shadow: 0 0 6px rgba(255, 209, 102, 0.3);
}
.poe-card-subtitle {
  font-size: 11px;
  letter-spacing: 1px;
  color: #a8966e;
}
.poe-card-stats {
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 12px;
  color: #70d6ff;
  font-weight: 500;
  line-height: 1.4;
  padding: 2px 0;
}
.poe-card-desc {
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 12px;
  color: rgba(229, 220, 195, 0.85);
  line-height: 1.45;
}
.poe-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.poe-foot {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-top: 1px solid rgba(107, 87, 58, 0.4);
  padding-top: 8px;
  font-family: 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 11px;
  color: #a8966e;
}
.poe-foot-hint {
  color: #ffd166;
}

/* Narrow windows on the Anomaly map */
@media (max-width: 1150px) {
  body[data-map="anomaly"] .quick-item { margin-top: 62px; }
  .weapon-hud { bottom: 140px; }
}
.party-hud { position:fixed;left:18px;top:210px;z-index:1400;width:235px;padding:12px;background:rgba(8,20,32,.9);border:1px solid #48cae4;border-radius:10px;color:#caf0f8;font-family:sans-serif; }
.party-hud.hidden { display:none; }
#party-members { display:grid;gap:6px;margin:9px 0;max-height:50vh;overflow-y:auto; }
#party-members button { text-align:left;border:1px solid #31556c;border-radius:6px;padding:8px;background:#132d3d;color:#e0f7fa;cursor:pointer; }
#party-members button.selected { border-color:#80ed99;background:#1b493f; }
#party-members button:disabled { opacity:.45;cursor:default; }
.party-hud small { display:block;font-size:11px;line-height:1.5;color:#a5bdcc; }
/* Recruited village allies share the party status panel, including in solo play. */
.party-npc { display: flex; flex-direction: column; gap: 5px; }
.party-health-track { display: block; height: 5px; width: 100%; background: #492631; border-radius: 4px; overflow: hidden; }
.party-health-track > span { display: block; height: 100%; background: #74c69d; transition: width .2s; }
/* Skills are taught in village conversations, then freely assigned to the ten keys. */
.village-skills-panel{position:fixed;inset:0;z-index:180;display:grid;place-items:center;background:rgba(7,13,20,.86);padding:20px;pointer-events:auto}
.village-skills-panel.hidden,#sniper-scope.hidden,#temple-ward-hud.hidden{display:none!important}
.village-skills-card{width:min(900px,96vw);max-height:88vh;overflow:auto;border:1px solid #9a8659;border-radius:16px;background:linear-gradient(145deg,#17242a,#10181d);padding:28px;color:#e9e5d5;box-shadow:0 18px 80px #0008}
.village-skills-card h2{color:#dfc589;margin-top:0}.village-skills-card p{color:#b9c8c3;font-size:14px;line-height:1.6}.skill-close{float:right;background:#293a3d;border:1px solid #6b7c72;border-radius:7px;padding:8px 12px;color:#e0dcc9;cursor:pointer}
.skill-binding-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin:22px 0}.skill-binding-grid label{color:#dbc58e;font-size:13px}.skill-binding-grid select{display:block;width:100%;margin-top:6px;border:1px solid #60796c;background:#202f32;color:#f1ebd4;padding:9px 4px;border-radius:7px;cursor:pointer}
.village-skill-catalog{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.village-skill-catalog article{border:1px solid #516755;border-radius:10px;padding:14px;background:#20342d}.village-skill-catalog article.locked{background:#202b30;border-color:#3b494f;opacity:.7}.village-skill-catalog small{color:#c7b17c}.villager-learn{border:1px solid #8cac85;border-radius:8px;background:#284338;color:#eee5cd;padding:12px;cursor:pointer}
@media(max-width:700px){.skill-binding-grid{grid-template-columns:repeat(2,1fr)}.village-skill-catalog{grid-template-columns:1fr}.village-skills-card{padding:18px}}
#sniper-scope{position:fixed;inset:0;z-index:110;pointer-events:none;background:radial-gradient(circle at center,transparent 0%,transparent 33%,rgba(2,5,8,.94) 34%,#020508 47%);color:#c8dcc9;font-family:monospace}
.scope-reticle{position:absolute;left:50%;top:50%;width:min(68vh,68vw);height:min(68vh,68vw);transform:translate(-50%,-50%);border:1px solid #a9beb477;border-radius:50%;background:linear-gradient(transparent calc(50% - .5px),#071311 50%,transparent calc(50% + .5px)),linear-gradient(90deg,transparent calc(50% - .5px),#071311 50%,transparent calc(50% + .5px))}
.scope-reticle:after{content:'┴  ┴  ┴  ┴';position:absolute;top:54%;left:50%;transform:translateX(-50%);font-size:14px;letter-spacing:6px;color:#203329}.scope-label{position:absolute;left:50%;bottom:5%;transform:translateX(-50%);text-align:center;font-size:14px;line-height:1.8}.scope-readout{position:absolute;left:50%;top:12%;transform:translateX(-50%);font-size:14px}

.graphics-settings { padding: 12px; margin-bottom: 12px; }
.graphics-settings label { display: block; color: #e6d4a8; font-size: 13px; margin-bottom: 8px; }
.graphics-row { display: flex; gap: 8px; flex-wrap: wrap; }
.graphics-row select { flex: 1; min-width: 160px; background: #181824; color: #fff; border: 1px solid #776846; border-radius: 6px; padding: 9px; }
.graphics-settings small { display: block; color: #bdb8ac; margin-top: 7px; line-height: 1.4; }
#graphics-apply:disabled { opacity: .45; cursor: default; }
.super-low-graphics .ui-block, .super-low-graphics .title-card, .super-low-graphics .pause-card { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

.starter-choice{width:min(1120px,96vw);max-height:90vh;overflow:auto;padding:38px 32px 26px;border:1px solid #a9905a66;border-radius:24px;background:radial-gradient(ellipse at 50% 0%,#34304b 0,transparent 58%),linear-gradient(155deg,#141b2b,#0b101c);box-shadow:0 30px 100px #000b;color:#f4ecdb;text-align:center}
.starter-eyebrow{font-size:10px;letter-spacing:3px;color:#c9b785}.starter-choice h2{font-size:clamp(26px,4vw,42px);font-weight:600;margin:14px 0 10px;line-height:1.3}.starter-choice header p{font-size:14px;color:#abaec0;margin:0 0 28px}
.starter-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.starter-spell{display:flex;flex-direction:column;align-items:center;position:relative;min-width:0;padding:22px 17px 18px;border:1px solid #ffffff16;border-radius:16px;background:linear-gradient(180deg,#ffffff07,#ffffff02);color:#f4ecdb;text-align:center;font:inherit;cursor:pointer;transition:transform .2s,border-color .2s,background .2s}.starter-spell:hover,.starter-spell:focus-visible{transform:translateY(-5px);border-color:var(--spell-color);background:#ffffff09;outline:2px solid var(--spell-color);outline-offset:3px}.starter-art{display:grid;place-items:center;width:100px;height:100px;margin:0 0 18px;border-radius:50%;border:1px solid var(--spell-color);color:var(--spell-color);font-size:64px;line-height:1;background:radial-gradient(circle,#ffffff15,transparent 68%);text-shadow:0 0 24px var(--spell-color);box-shadow:inset 0 0 30px #ffffff08,0 0 36px #ffffff05}.starter-tag{color:var(--spell-color);font-size:11px;letter-spacing:.4px;margin-bottom:12px}.starter-spell strong{font-size:19px;font-weight:600;line-height:1.35;min-height:52px}.starter-subtitle{font-size:11px;color:var(--spell-color);margin-top:-9px;margin-bottom:9px}.starter-description{font-size:13px;line-height:1.8;color:#b8b9c7;margin:13px 0 22px}.starter-pick{margin-top:auto;display:flex;justify-content:space-between;align-items:center;align-self:stretch;padding:11px 13px;border-radius:8px;border:1px solid #ffffff20;color:var(--spell-color);font-size:13px}.starter-choice footer{font-size:12px;line-height:1.9;color:#ccb78b;margin-top:24px}.starter-choice footer span{color:#9197ab}
@media(max-width:900px){.starter-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.starter-choice{padding:26px 20px}.starter-art{width:76px;height:76px;font-size:46px}.starter-spell strong{min-height:0}}
@media(max-width:480px){.starter-choice{padding:24px 12px;border-radius:16px}.starter-cards{gap:10px}.starter-spell{padding:16px 10px}.starter-spell strong{font-size:16px}.starter-description{font-size:12px}.starter-tag{font-size:10px}}
@media(prefers-reduced-motion:reduce){.starter-spell{transition:none}.starter-spell:hover,.starter-spell:focus-visible{transform:none}}

/* Terrain atlas and expanded map */
.rpg-map.ui-block{background:linear-gradient(145deg,#182c28ee,#101d1cee);border:1px solid #b6a87988;border-radius:16px;padding:12px;box-shadow:0 12px 35px #0006;color:#e9e5cd;font:11px Tahoma;width:244px;box-sizing:border-box}
.rpg-map.ui-block[hidden]{display:none!important}.rpg-map .map-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#cabc92;font-size:9px;letter-spacing:2px;margin-bottom:10px}.rpg-map.ui-block button{border:1px solid #a6b69655;border-radius:6px;background:#233a33;color:#f1e9d2;padding:5px 9px;font:11px Tahoma;cursor:pointer}.rpg-map.ui-block button:hover,.rpg-map.ui-block button:focus-visible{background:#425849;border-color:#d0c190;outline:2px solid #d0c190;outline-offset:2px}.rpg-map.ui-block .rpg-zone{font-size:12px;min-height:24px;color:#f1e9cf}.map-surface{position:relative;border:1px solid #98a87866;border-radius:9px;overflow:hidden;background:#243a31}.rpg-map.ui-block canvas{width:100%;height:auto;aspect-ratio:1;display:block}.map-north{position:absolute;right:10px;top:10px;color:#fff5d7;font-size:11px;text-shadow:0 1px 4px #000}.map-toolbar{display:flex;align-items:center;gap:5px;margin-top:10px}.map-scale{margin-left:auto;color:#b9c6ac;font-size:10px}.map-markers{display:flex;gap:12px;font-size:10px;margin-top:10px;color:#b4c4b5}.map-markers span:first-child{color:#ffdf70}.map-markers span:nth-child(2){color:#ff7bb0}.map-markers span:last-child{color:#fff5d7}
.rpg-map.ui-block.expanded{position:fixed;z-index:170;top:50%;left:50%;right:auto;transform:translate(-50%,-50%);width:min(760px,94vw,calc(100dvh - 180px));max-height:94dvh;overflow:auto;padding:18px;border-color:#cbbc8c;border-radius:20px;box-shadow:0 0 0 100vmax #071310d9,0 20px 80px #0009}.rpg-map.expanded .map-heading{font-size:11px}.rpg-map.expanded .rpg-zone{font-size:16px}.rpg-map.ui-block.expanded .rpg-map-legend{max-width:none;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px;font-size:11px}.rpg-map.expanded .map-north{font-size:16px}.rpg-map.expanded .map-markers{font-size:12px}.rpg-map.expanded .map-scale{font-size:12px}
@media(max-width:700px){.rpg-map.ui-block{width:168px;right:8px;padding:8px;top:100px}.rpg-map.ui-block .rpg-zone{font-size:10px}.map-markers{gap:6px;font-size:8px}.rpg-map .map-heading{letter-spacing:1px;font-size:8px}.rpg-map.ui-block.expanded{width:min(94vw,calc(100dvh - 180px));padding:12px}.rpg-map.ui-block.expanded .rpg-map-legend{grid-template-columns:repeat(2,minmax(0,1fr));font-size:10px}.rpg-map.ui-block.expanded .rpg-zone{font-size:13px}}

.desk-points{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:16px 18px;background:linear-gradient(100deg,#393723,#223a3c);border:1px solid #ad9a5877;border-radius:10px;margin:18px 0 24px}.desk-points strong{font-size:21px;color:#f1d18c}.desk-points span{color:#b9c8bf;font-size:12px}.desk-skill-catalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:26px}.desk-skill{padding:18px;border:1px solid #58716b;border-radius:12px;background:linear-gradient(145deg,#253739,#172629)}.desk-skill.untrained{border-color:#5f6558;background:#1a282a}.desk-skill-heading{display:flex;gap:12px;justify-content:space-between;align-items:start}.desk-skill-heading strong{font-size:14px;line-height:1.6;color:#e8e6cf}.desk-skill-heading span{white-space:nowrap;color:#d5b875;font-size:11px;margin-top:3px}.desk-rank-pips{display:flex;gap:5px;margin-top:14px}.desk-rank-pips i{display:block;width:28px;height:5px;background:#405049;border-radius:3px}.desk-rank-pips i.filled{background:#d5b875;box-shadow:0 0 8px #d5b87544}.desk-skill p{font-size:12px!important;min-height:38px;margin:12px 0}.desk-skill small{display:block;font-size:11px;color:#a7b8ad;line-height:1.8}.desk-skill button{display:block;width:100%;margin-top:14px;padding:10px;border:1px solid #b5995a;border-radius:7px;color:#f3dfae;background:#504629;font:13px Tahoma;cursor:pointer}.desk-skill button:disabled{opacity:.4;cursor:default}.desk-skill button:not(:disabled):hover,.desk-skill button:focus-visible{background:#73603a;outline:2px solid #e0c181;outline-offset:2px}
@media(max-width:600px){.desk-skill-catalog{grid-template-columns:1fr}.desk-points{flex-direction:column;align-items:start}.desk-skill{padding:14px}}

.desk-skill{display:flex;flex-direction:column}.desk-skill button{margin-top:auto}.desk-skill small{margin-bottom:14px}

/* Progression and temporary status rows share one flow, so new badges push down. */
.status-container{max-width:min(340px,calc(100vw - 32px))}
.status-container .rpg-hud{position:static;align-self:flex-start;max-width:100%;text-align:left;white-space:normal;line-height:1.5}
.status-container>div{max-width:100%;box-sizing:border-box}
.status-container .deadlock-badge{letter-spacing:0;line-height:1.5;flex-wrap:wrap}
