/* Axie Tactics: Lunacia Chronicles - Tactical Battle Stylesheet */
:root {
  --bg-hud: rgba(13, 20, 33, 0.88);
  --border-gold: #eab308;
  --border-gold-glow: rgba(234, 179, 8, 0.45);
  --color-pa: #0ea5e9;
  --color-pa-glow: rgba(14, 165, 233, 0.6);
  --color-pm: #22c55e;
  --color-pm-glow: rgba(34, 197, 94, 0.6);
  --color-player: #38bdf8;
  --color-enemy: #ef4444;
  --color-text: #f8fafc;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #0b111e;
  font-family: var(--font-main);
  color: var(--color-text);
}

#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#combat-text-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
}

/* Floating 3D Combat Text */
.floating-text {
  position: absolute;
  font-family: 'Impact', 'Arial Black', system-ui, sans-serif;
  font-weight: 900;
  font-size: 32px;
  letter-spacing: 0.8px;
  -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.85);
  paint-order: stroke fill;
  pointer-events: none;
  white-space: nowrap;
  will-change: transform, opacity;
  z-index: 20;
}

/* Hito 81 · icono del estado delante del aviso (assets/ui/buff y debuff) */
.floating-text .float-st-ico {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  min-width: 26px;
  min-height: 26px;
  margin-right: 0.16em;
  vertical-align: -0.16em;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.85)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.7));
}

.float-damage {
  color: #ff3b3b;
  font-size: 40px;
  text-shadow: 0 4px 0 #000, 0 0 16px rgba(255, 59, 59, 0.9), 0 8px 16px rgba(0, 0, 0, 0.7);
}

.float-crit {
  color: #fbbf24;
  font-size: 50px;
  -webkit-text-stroke: 2px #7f1d1d;
  text-shadow: 0 5px 0 #000, 0 0 25px rgba(251, 191, 36, 1), 0 0 35px rgba(239, 68, 68, 0.9);
  animation: critGlow 0.4s ease-in-out infinite alternate;
}

@keyframes critGlow {
  from { text-shadow: 0 4px 0 #000, 0 0 20px rgba(251, 191, 36, 0.8), 0 0 30px rgba(239, 68, 68, 0.7); }
  to { text-shadow: 0 6px 0 #000, 0 0 35px rgba(251, 191, 36, 1), 0 0 50px rgba(239, 68, 68, 1); }
}

.float-collision {
  color: #fb923c;
  font-size: 38px;
  -webkit-text-stroke: 1.5px #7c2d12;
  text-shadow: 0 4px 0 #000, 0 0 20px rgba(234, 88, 12, 1), 0 0 35px rgba(249, 115, 22, 0.8);
}

.float-heal {
  color: #22c55e;
  font-size: 38px;
  -webkit-text-stroke: 1.5px #14532d;
  text-shadow: 0 4px 0 #000, 0 0 18px rgba(34, 197, 94, 0.9);
}

.float-pa {
  color: #38bdf8;
  font-size: 30px;
  -webkit-text-stroke: 1.5px #0369a1;
  text-shadow: 0 3px 0 #000, 0 0 14px rgba(56, 189, 248, 0.9);
}

.float-pm {
  color: #4ade80;
  font-size: 30px;
  -webkit-text-stroke: 1.5px #15803d;
  text-shadow: 0 3px 0 #000, 0 0 14px rgba(74, 222, 128, 0.9);
}

.float-shield {
  color: #22d3ee;
  font-size: 32px;
  -webkit-text-stroke: 1.5px #0e7490;
  text-shadow: 0 3px 0 #000, 0 0 16px rgba(34, 211, 238, 0.9);
}

.float-pushback {
  color: #f97316;
  font-size: 36px;
  -webkit-text-stroke: 2px #7c2d12;
  text-shadow: 0 4px 0 #000, 0 0 20px rgba(249, 115, 22, 0.95);
}

/* UI Overlay Layer */
#ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Top Battle Header */
.battle-header {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: linear-gradient(180deg, rgba(10, 15, 26, 0.9) 0%, rgba(10, 15, 26, 0) 100%);
}

.round-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(22, 32, 51, 0.9);
  border: 2px solid var(--border-gold);
  border-radius: 12px;
  padding: 6px 14px;
  box-shadow: 0 0 12px var(--border-gold-glow);
}

.round-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #eab308;
}

.round-num {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
}

/* Initiative Timeline */
.initiative-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 6px;
  scrollbar-width: none;
}

.timeline-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(18, 26, 43, 0.88);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 6px 12px;
  min-width: 140px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-card.team-player {
  border-left: 4px solid var(--color-player);
}

.timeline-card.team-enemy {
  border-left: 4px solid var(--color-enemy);
}

.timeline-card.active-turn {
  border: 2px solid var(--border-gold);
  background: rgba(45, 36, 17, 0.92);
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.55);
  transform: translateY(-2px) scale(1.06);
}

.card-avatar {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  position: relative;
}

.timeline-card.team-player .card-avatar {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.45);
}

.timeline-card.team-enemy .card-avatar {
  border-color: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.45);
}

.timeline-avatar-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  transform: scale(1.15);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  display: block;
}

.timeline-avatar-fallback {
  font-size: 20px;
  line-height: 1;
}

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

.card-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.card-hp-bar {
  width: 100%;
  height: 6px;
  background: #1e293b;
  border-radius: 3px;
  overflow: hidden;
}

.card-hp-fill {
  height: 100%;
  background: #10b981;
  transition: width 0.3s ease;
}

.team-enemy .card-hp-fill {
  background: #ef4444;
}

.header-actions {
  margin-left: auto;
}

.icon-btn {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 18px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: var(--border-gold);
}

/* Turn Announcement & Alert Banner */
/* Turn Announcement & Alert Banner (Top Layer) */
.turn-banner {
  position: fixed;
  top: 26%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10000;
  animation: bannerPop 1.2s ease-out forwards;
}

.banner-content {
  background: linear-gradient(90deg, transparent 0%, rgba(13, 20, 33, 0.96) 20%, rgba(13, 20, 33, 0.96) 80%, transparent 100%);
  border-top: 2px solid var(--border-gold);
  border-bottom: 2px solid var(--border-gold);
  padding: 14px 70px;
  text-align: center;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 30px rgba(234, 179, 8, 0.4);
  backdrop-filter: blur(8px);
}

#banner-subtitle {
  font-size: 13px;
  letter-spacing: 3px;
  color: #facc15;
  font-weight: 700;
  text-transform: uppercase;
}

#banner-title {
  font-size: 32px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

@keyframes bannerPop {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(0.9); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  35% { transform: translate(-50%, -50%) scale(1.0); }
  75% { opacity: 1; transform: translate(-50%, -50%) scale(1.0); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(0.95); }
}

/* Quest Notification Specific Overrides */
.turn-banner.quest-notification {
  z-index: 10000;
  animation: questBannerPop 3.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.turn-banner.quest-notification .banner-content {
  background: linear-gradient(90deg, transparent 0%, rgba(10, 16, 30, 0.98) 18%, rgba(10, 16, 30, 0.98) 82%, transparent 100%);
  border-top: 2.5px solid #facc15;
  border-bottom: 2.5px solid #facc15;
  padding: 16px 80px;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.85), 0 0 35px rgba(250, 204, 21, 0.45);
}

.turn-banner.quest-notification #banner-subtitle {
  font-size: 14px;
  letter-spacing: 2.5px;
  color: #facc15;
  font-weight: 700;
  margin-bottom: 4px;
  display: block;
}

.turn-banner.quest-notification #banner-title {
  font-size: 30px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1.2px;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.85), 0 2px 5px rgba(0, 0, 0, 0.9);
}

.turn-banner.quest-completed .banner-content {
  border-top-color: #22c55e;
  border-bottom-color: #22c55e;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.85), 0 0 35px rgba(34, 197, 94, 0.5);
}

.turn-banner.quest-completed #banner-subtitle {
  color: #4ade80;
}

.turn-banner.quest-completed #banner-title {
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.85), 0 2px 5px rgba(0, 0, 0, 0.9);
}

@keyframes questBannerPop {
  0% { opacity: 0; transform: translate(-50%, -38%) scale(0.88); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  18% { transform: translate(-50%, -50%) scale(1.0); }
  85% { opacity: 1; transform: translate(-50%, -50%) scale(1.0); }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(0.92); }
}

/* Camera Controls */
.camera-controls {
  pointer-events: auto;
  position: absolute;
  right: 24px;
  bottom: 150px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cam-btn {
  background: rgba(18, 26, 43, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
}

.cam-btn span {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  color: #facc15;
}

.cam-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--border-gold);
  transform: translateX(-3px);
}

/* Bottom Tactical HUD */
.tactical-hud {
  pointer-events: auto;
  width: 100%;
  display: flex;
  justify-content: center;
  padding-bottom: 18px;
}

.hud-main-panel {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-hud);
  backdrop-filter: blur(16px);
  border: 2px solid var(--border-gold);
  border-radius: 20px;
  padding: 12px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px var(--border-gold-glow);
}

/* Profile section */
.unit-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 210px;
}

.avatar-frame {
  width: 56px;
  height: 56px;
  background: radial-gradient(circle, #2d3748 0%, #1a202c 100%);
  border: 2.5px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.45);
  overflow: hidden;
  flex-shrink: 0;
}

.tactical-hud-avatar-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  transform: scale(1.14);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85));
  display: block;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.unit-name {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.unit-archetype {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.hp-bar-container {
  position: relative;
  width: 100%;
  height: 14px;
  background: #1e293b;
  border-radius: 7px;
  overflow: hidden;
  margin-top: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  transition: width 0.3s ease;
}

.hp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 800;
  font-family: monospace;
  color: #ffffff;
  text-shadow: 0 1px 2px #000;
}

/* PA and PM Orbs */
.points-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.point-orb {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 14px;
  background: rgba(18, 26, 43, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: default;
  transition: all 0.2s;
}

.pa-orb {
  border-color: var(--color-pa);
  box-shadow: 0 0 15px var(--color-pa-glow);
}

.pm-orb {
  border-color: var(--color-pm);
  box-shadow: 0 0 15px var(--color-pm-glow);
}

.orb-icon {
  font-size: 24px;
}

.orb-content {
  display: flex;
  flex-direction: column;
}

.orb-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.pa-orb .orb-label { color: #7dd3fc; }
.pm-orb .orb-label { color: #86efac; }

.orb-count {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
}

/* Spell Hotbar */
.spell-hotbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spell-slot {
  position: relative;
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid var(--border-gold);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.spell-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  position: relative;
  z-index: 1;
}

.spell-img-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  pointer-events: none;
  border-radius: 8px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.75));
}

.spell-slot:hover:not(.disabled) {
  transform: translateY(-4px) scale(1.06);
  border-color: #facc15;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.6);
}

.spell-slot.active {
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.9);
  background: linear-gradient(135deg, #0369a1 0%, #0c4a6e 100%);
  transform: translateY(-4px) scale(1.08);
}

.spell-slot.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.hotkey-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #0f172a;
  border: 1px solid var(--border-gold);
  color: #facc15;
  font-size: 11px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

.pa-cost-badge {
  position: absolute;
  top: 3px;
  left: 4px;
  font-size: 10.5px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 5px;
  padding: 1px 4px;
  line-height: 1.1;
  text-shadow: 0 1px 2px #000;
  z-index: 6;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.65);
}

.range-badge {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 9.5px;
  font-weight: 700;
  color: #86efac;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(134, 239, 172, 0.4);
  border-radius: 5px;
  padding: 1px 4px;
  line-height: 1.1;
  text-shadow: 0 1px 2px #000;
  z-index: 6;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.65);
}

/* End Turn Button */
.end-turn-btn {
  position: relative;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 2px solid #fbbf24;
  border-radius: 14px;
  padding: 10px 20px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4);
  transition: all 0.2s;
}

.end-turn-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.6);
}

.end-turn-btn.pulse-ready {
  animation: endTurnPulse 1.5s infinite;
}

@keyframes endTurnPulse {
  0% { box-shadow: 0 0 10px rgba(234, 179, 8, 0.4); }
  50% { box-shadow: 0 0 25px rgba(234, 179, 8, 0.85); }
  100% { box-shadow: 0 0 10px rgba(234, 179, 8, 0.4); }
}

.btn-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.btn-shortcut {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.85;
}

/* Spell Tooltip */
.spell-tooltip {
  pointer-events: none;
  position: absolute;
  bottom: 120px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 14px 18px;
  max-width: 320px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 30;
}

.tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tt-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.tt-pa-badge {
  background: rgba(14, 165, 233, 0.25);
  border: 1px solid var(--color-pa);
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}

.tooltip-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #cbd5e1;
}

.tt-stat {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.tooltip-desc {
  font-size: 12px;
  line-height: 1.4;
  color: #e2e8f0;
}

/* Combat Forecast */
.combat-forecast {
  pointer-events: none;
  position: absolute;
  top: 90px;
  left: 24px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid #ff4757;
  border-radius: 12px;
  padding: 12px 18px;
  min-width: 240px;
  box-shadow: 0 8px 24px rgba(255, 71, 87, 0.3);
  z-index: 25;
}

.forecast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

#forecast-target-name {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
}

.forecast-hp {
  font-size: 12px;
  font-weight: 700;
  font-family: monospace;
  color: #ff6b81;
}

.forecast-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 12px;
}

.damage-badge {
  color: #ff4757;
  font-weight: 800;
}

.push-badge {
  color: #ffa502;
  font-weight: 800;
}

.collision-alert {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  border-radius: 6px;
  color: #fca5a5;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  margin-top: 6px;
  text-align: center;
}

/* Modals */
.modal-backdrop {
  pointer-events: auto;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 17, 30, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-box {
  background: rgba(18, 26, 43, 0.96);
  border: 2px solid var(--border-gold);
  border-radius: 20px;
  padding: 28px 36px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 25px var(--border-gold-glow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
}

.close-btn:hover { color: #fff; }

.help-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.help-section h3 {
  font-size: 14px;
  color: #facc15;
  margin-bottom: 4px;
}

.help-section p, .help-section li {
  font-size: 13px;
  line-height: 1.5;
  color: #cbd5e1;
}

.help-section ul {
  padding-left: 18px;
}

.primary-btn {
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
  border: none;
  border-radius: 10px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(234, 179, 8, 0.5);
}

.victory-box {
  text-align: center;
}

.end-icon {
  font-size: 56px;
  margin-bottom: 12px;
}

.end-title {
  font-size: 28px;
  font-weight: 900;
  color: #facc15;
  margin-bottom: 8px;
}

.end-desc {
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 20px;
}

.stats-summary {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.stat-box {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 12px;
  color: #94a3b8;
}

.stat-num {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
}

/* =========================================================
   TUTORIAL INTERACTIVE OVERLAY
   ========================================================= */
.tutorial-overlay {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  pointer-events: auto;
}

.tut-dialog-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.94);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 14px 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.35);
  backdrop-filter: blur(10px);
  max-width: 620px;
  animation: tutBounceIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes tutBounceIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.tut-avatar {
  background: radial-gradient(circle, #9a3412 0%, #451a03 100%);
  border: 2px solid #f59e0b;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
  overflow: hidden;
  position: relative;
}

.tut-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s ease;
}

.tut-avatar:hover .tut-avatar-img {
  transform: scale(1.08);
}

.tut-content h3 {
  font-size: 16px;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 4px;
}

.tut-content p {
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.4;
}

.tut-content b {
  color: #38bdf8;
}

.tut-next-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  border-radius: 10px;
  color: #1a0f02;
  font-weight: 900;
  font-size: 13px;
  padding: 10px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tut-next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
}

/* Pulsing highlight for restricted tutorial targets */
.tut-highlight {
  animation: tutPulse 0.8s infinite alternate !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.95), inset 0 0 15px rgba(251, 191, 36, 0.6) !important;
}

@keyframes tutPulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.08); filter: brightness(1.3); }
}

/* =========================================================
   VICTORY REWARDS MODAL (NEW HEROES & LOOT DROPS)
   ========================================================= */
.wide-victory {
  max-width: 680px !important;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.rewards-section {
  margin: 16px 0;
  text-align: left;
}

.section-title {
  font-size: 15px;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  padding-bottom: 4px;
}

.recruits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.recruit-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  padding: 10px;
}

.recruit-avatar {
  font-size: 28px;
  background: #0f172a;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #38bdf8;
  overflow: hidden;
}

.recruit-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.recruit-info {
  display: flex;
  flex-direction: column;
}

.recruit-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.recruit-archetype {
  font-size: 11px;
  color: #94a3b8;
}

.loot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.item-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  position: relative;
}

.item-card:hover {
  transform: translateY(-2px);
}

.item-card.rarity-common {
  border-color: #94a3b8;
}
.item-card.rarity-rare {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}
.item-card.rarity-epic {
  border-color: #c084fc;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.35);
}
.item-card.rarity-legendary {
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45), inset 0 0 8px rgba(245, 158, 11, 0.15);
}

.item-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-icon {
  font-size: 22px;
}

.item-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-slot-tag {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.item-stats-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.stat-badge {
  font-size: 10px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-radius: 4px;
  padding: 2px 5px;
}

.modal-footer-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  justify-content: center;
  align-items: center;
}

#btn-return-overworld {
  min-width: 280px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 12px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#btn-return-overworld:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.6) !important;
}

.glow-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #fff !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4) !important;
}

.secondary-btn {
  background: rgba(51, 65, 85, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #94a3b8;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
}

/* =========================================================
   CAMP & 5-SLOT EQUIPMENT SCREEN
   ========================================================= */
.equipment-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #1e293b 0%, #090d16 100%);
  z-index: 200;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  padding: 24px 32px;
  box-sizing: border-box;
  color: #fff;
}

.camp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.camp-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.camp-nav-tabs {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.camp-tab-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: auto;
}

.camp-tab-btn:hover {
  background: rgba(51, 65, 85, 0.85);
  color: #fff;
  border-color: #38bdf8;
}

.camp-tab-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.4);
}

.camp-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.active-mission-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px 14px;
}

.active-mission-label {
  font-size: 10px;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.5px;
}

.active-mission-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

.camp-tag {
  font-size: 11px;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 1px;
}

.camp-header h2 {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin: 0;
}

.battle-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%) !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.5) !important;
  font-size: 15px !important;
  padding: 12px 24px !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.camp-body {
  display: grid;
  grid-template-columns: 240px 1fr 340px;
  gap: 24px;
  flex: 1;
  min-height: 0;
}

.panel-heading {
  font-size: 15px;
  font-weight: 800;
  color: #94a3b8;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Left: Hero Roster */
.roster-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.roster-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 41, 59, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.roster-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(56, 189, 248, 0.5);
}

.roster-card.active {
  background: rgba(14, 165, 233, 0.15);
  border-color: #0ea5e9;
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.3);
}

.roster-avatar {
  font-size: 26px;
  background: #0f172a;
  border: 2px solid #64748b;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.roster-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.15);
}

.roster-card.active .roster-avatar {
  border-color: #0ea5e9;
}

.roster-name {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.roster-role {
  font-size: 11px;
  color: #94a3b8;
}

/* Center: Equipment & Stats */
.equipment-panel {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  overflow-y: auto;
}

.hero-showcase-header {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 14px;
}

.eq-hero-avatar {
  font-size: 38px;
  background: radial-gradient(circle, #334155 0%, #0f172a 100%);
  border: 3px solid #facc15;
  border-radius: 50%;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.35);
  overflow: hidden;
  flex-shrink: 0;
}

.eq-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.14);
}

.hero-showcase-header h2 {
  font-size: 20px;
  font-weight: 900;
}

.eq-hero-archetype {
  font-size: 12px;
  color: #94a3b8;
}

.eq-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sub-heading {
  font-size: 13px;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.slots-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slot-box {
  background: rgba(30, 41, 59, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.slot-box:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: #38bdf8;
}

.slot-box.has-item {
  border-style: solid;
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.1);
}

.slot-header {
  font-size: 11px;
  font-weight: 900;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.slot-empty {
  font-size: 12px;
  color: #64748b;
  font-style: italic;
}

.slot-equipped-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slot-item-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.slot-unequip-hint {
  font-size: 10px;
  color: #ef4444;
  margin-left: 6px;
}

.stats-panel {
  background: rgba(30, 41, 59, 0.4);
  border-radius: 12px;
  padding: 14px;
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #cbd5e1;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-val {
  font-weight: 900;
  color: #34d399;
}

/* Right: Inventory */
.inventory-panel {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.inv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inv-counter {
  font-size: 12px;
  color: #94a3b8;
}

.inventory-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  margin-top: 12px;
  padding-right: 4px;
}

/* ==========================================================================
   Cinematic Finisher & Dramatic Victory / Defeat Title Card
   ========================================================================== */
.cinematic-banner-container {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.5s ease;
}

.cinematic-banner-container.fade-out {
  opacity: 0;
}

/* 1. Letterbox Cinematic Bars */
.letterbox-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 9vh;
  background: #020617;
  z-index: 20;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.9);
}

.letterbox-top {
  top: 0;
  transform: translateY(-100%);
  animation: slideLetterboxTop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.letterbox-bottom {
  bottom: 0;
  transform: translateY(100%);
  animation: slideLetterboxBottom 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideLetterboxTop {
  to { transform: translateY(0); }
}

@keyframes slideLetterboxBottom {
  to { transform: translateY(0); }
}

/* 2. Atmospheric Dark Vignette */
.cinematic-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.45) 0%, rgba(2, 6, 23, 0.88) 80%);
  backdrop-filter: blur(5px);
  opacity: 0;
  animation: vignetteFade 0.6s ease-out forwards;
}

@keyframes vignetteFade {
  to { opacity: 1; }
}

/* 3. Heroic Centered Typography */
.cinematic-content {
  position: relative;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.cinematic-emblem {
  font-size: 76px;
  filter: drop-shadow(0 0 35px rgba(250, 204, 21, 0.85));
  transform: scale(0) rotate(-15deg);
  animation: emblemPunch 0.7s 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  margin-bottom: 8px;
}

@keyframes emblemPunch {
  0% { transform: scale(0) rotate(-15deg); opacity: 0; }
  70% { transform: scale(1.25) rotate(5deg); opacity: 1; }
  100% { transform: scale(1.0) rotate(0deg); opacity: 1; }
}

.cinematic-title-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cinematic-title {
  font-size: 80px;
  font-weight: 950;
  letter-spacing: 8px;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #fef08a 30%, #f59e0b 70%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 45px rgba(245, 158, 11, 0.75));
  transform: scale(2.4);
  opacity: 0;
  animation: titleZoomPunch 0.75s 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards, titleRadiance 2s infinite ease-in-out;
}

.cinematic-banner-container.defeat .cinematic-title {
  background: linear-gradient(180deg, #ffffff 0%, #fca5a5 30%, #ef4444 70%, #991b1b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 45px rgba(239, 68, 68, 0.8));
}

.cinematic-banner-container.defeat .cinematic-emblem {
  filter: drop-shadow(0 0 35px rgba(239, 68, 68, 0.85));
}

@keyframes titleZoomPunch {
  0% { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(1.0); opacity: 1; }
}

@keyframes titleRadiance {
  0%, 100% { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 35px rgba(245, 158, 11, 0.6)); }
  50% { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 65px rgba(245, 158, 11, 0.95)); }
}

.cinematic-glow-line {
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #facc15 30%, #ffffff 50%, #facc15 70%, transparent 100%);
  margin-top: 14px;
  box-shadow: 0 0 15px #facc15;
  animation: lineExpand 0.7s 0.4s ease-out forwards;
}

.cinematic-banner-container.defeat .cinematic-glow-line {
  background: linear-gradient(90deg, transparent 0%, #f87171 30%, #ffffff 50%, #f87171 70%, transparent 100%);
  box-shadow: 0 0 15px #ef4444;
}

@keyframes lineExpand {
  0% { width: 0; opacity: 0; }
  100% { width: 440px; opacity: 1; }
}

.cinematic-subtitle {
  font-size: 21px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 16px 0 0 0;
  opacity: 0;
  transform: translateY(20px);
  animation: subtitleSlideUp 0.6s 0.55s ease-out forwards;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 255, 255, 0.4);
}

@keyframes subtitleSlideUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Campaign Mission Map (10 Levels)
   ========================================================================== */
.camp-map-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 10px 30px 10px;
  gap: 18px;
}

.map-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 16px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.map-progress-info h3 {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 4px 0;
}

.map-progress-info p {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

.map-stats-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(250, 204, 21, 0.5);
  border-radius: 10px;
  padding: 8px 16px;
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.15);
}

.map-badge-label {
  font-size: 10px;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 1px;
}

.map-badge-val {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
}

.campaign-nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.mission-node-card {
  background: rgba(15, 23, 42, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mission-node-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}

/* Card States */
.mission-node-card.unlocked {
  cursor: pointer;
  border-color: rgba(56, 189, 248, 0.4);
}

.mission-node-card.unlocked:hover {
  transform: translateY(-3px);
  border-color: #38bdf8;
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.25);
  background: rgba(15, 23, 42, 0.9);
}

.mission-node-card.active {
  border-color: #f59e0b;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.35);
  background: rgba(30, 41, 59, 0.8);
}

.mission-node-card.active::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  height: 4px;
}

.mission-node-card.completed {
  border-color: rgba(16, 185, 129, 0.4);
}

.mission-node-card.completed.active {
  border-color: #f59e0b;
}

.mission-node-card.locked {
  opacity: 0.5;
  filter: grayscale(0.5);
  cursor: not-allowed;
  border-color: rgba(51, 65, 85, 0.6);
  background: rgba(15, 23, 42, 0.4);
}

/* Node Elements */
.node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.node-lvl-tag {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #94a3b8;
  text-transform: uppercase;
}

.node-status-badge {
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.node-status-badge.status-completed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid #10b981;
}

.node-status-badge.status-active {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid #f59e0b;
}

.node-status-badge.status-unlocked {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid #0ea5e9;
}

.node-status-badge.status-locked {
  background: rgba(51, 65, 85, 0.5);
  color: #64748b;
  border: 1px solid #475569;
}

.node-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.node-title {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.node-subtitle {
  font-size: 11px;
  color: #94a3b8;
  margin: 0;
}

.node-biome-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.6);
  padding: 4px 10px;
  border-radius: 8px;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.node-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.node-matchup {
  font-weight: 800;
  color: #e2e8f0;
}

.node-enemies-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.node-enemy-pill {
  font-size: 10px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 2px 7px;
  border-radius: 6px;
}

.node-rewards-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #fbbf24;
}

.node-rewards-label {
  font-weight: 800;
  font-size: 10px;
  color: #94a3b8;
}

.node-select-btn {
  margin-top: 4px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.node-select-btn.btn-choose {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #38bdf8;
}

.node-select-btn.btn-choose:hover {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
}

.node-select-btn.btn-selected {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  cursor: default;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.node-select-btn.btn-locked {
  background: rgba(30, 41, 59, 0.4);
  color: #64748b;
  cursor: not-allowed;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   RPG OVERWORLD & CINEMATIC SYSTEM
   ========================================================================== */

/* 1. Cinematic 3D Flythrough */
.cinematic-flythrough {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 120;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: opacity 0.6s ease;
}

.cinematic-flythrough.fade-out {
  opacity: 0;
  pointer-events: none;
}

.cinematic-flythrough.hidden {
  display: none !important;
}

.letterbox-bar {
  width: 100%;
  height: 70px;
  background: #000;
  z-index: 10;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.9);
}

.flythrough-hud {
  position: absolute;
  top: 85px;
  left: 30px;
  right: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 15;
}

.flythrough-lore-badge {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 6px 16px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.skip-cinematic-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(251, 191, 36, 0.6);
  color: #fde047;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.skip-cinematic-btn span {
  color: #ffffff;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.skip-cinematic-btn:hover {
  background: #d97706;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
  transform: scale(1.05);
}

.flythrough-subtitle-container {
  position: absolute;
  bottom: 95px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 40px;
  z-index: 15;
}

.flythrough-subtitle-text {
  max-width: 860px;
  text-align: center;
  font-size: 21px;
  line-height: 1.55;
  color: #f8fafc;
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(14, 165, 233, 0.6);
  background: rgba(15, 23, 42, 0.65);
  padding: 16px 32px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.flythrough-subtitle-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 2. Hero Presentation Card */
.hero-intro-card {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 110;
  pointer-events: auto;
  cursor: pointer;
  animation: introPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: opacity 0.5s ease;
}

.hero-intro-card.fade-out {
  opacity: 0;
}

@keyframes introPop {
  0% { transform: translate(-50%, -40%) scale(0.8); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.intro-card-inner {
  position: relative;
  min-width: 380px;
  background: #0b1120;
  background: linear-gradient(135deg, #0b1120 0%, #1e293b 100%);
  border: 2px solid #38bdf8;
  border-radius: 18px;
  padding: 24px 36px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(56, 189, 248, 0.5), inset 0 0 15px rgba(56, 189, 248, 0.2);
}

.intro-avatar-frame {
  width: 80px;
  height: 80px;
  margin: 0 auto 14px auto;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 3px solid #38bdf8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.55), inset 0 0 12px rgba(56, 189, 248, 0.3);
  overflow: hidden;
}

.intro-role-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 20px;
  padding: 3px 14px;
  display: inline-block;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.intro-hero-title {
  font-size: 32px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.8);
  margin-bottom: 4px;
}

.intro-hero-archetype {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 14px;
}

.intro-mission-hint {
  font-size: 13px;
  color: #38bdf8;
  font-weight: 600;
}

.intro-mission-hint kbd {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  color: #ffffff;
}

/* 3. RPG Dialogue Window */
.dialog-overlay {
  position: absolute;
  bottom: 28px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 105;
  pointer-events: auto;
  padding: 0 20px;
}

.dialog-window {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.98) 100%);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 20px 26px;
  max-width: 820px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 158, 11, 0.35);
  backdrop-filter: blur(14px);
  animation: dialogSlideUp 0.3s ease-out;
}

@keyframes dialogSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.dialog-avatar-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 94px;
  flex-shrink: 0;
}

.dialog-avatar {
  width: 78px;
  height: 78px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(15, 23, 42, 0.95) 85%);
  border: 2.5px solid #facc15;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.45), inset 0 0 10px rgba(245, 158, 11, 0.2);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.dialog-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  animation: dialogAvatarPop 0.24s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
  pointer-events: none;
}

.dialog-avatar-loading {
  font-size: 26px;
  animation: dialogPulse 1.2s infinite ease-in-out;
}

@keyframes dialogAvatarPop {
  0% { transform: scale(0.85); opacity: 0.3; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes dialogPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

.dialog-speaker-title {
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  margin-top: 6px;
  text-align: center;
  max-width: 110px;
  line-height: 1.2;
}

.dialog-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.dialog-speaker-name {
  font-size: 18px;
  font-weight: 800;
  color: #fef08a;
  letter-spacing: 0.5px;
}

.dialog-rune-accent {
  color: #f59e0b;
  font-size: 12px;
  letter-spacing: 4px;
}

.dialog-text {
  font-size: 16px;
  line-height: 1.55;
  color: #e2e8f0;
  min-height: 52px;
  font-weight: 400;
}

.dialog-footer {
  margin-top: 10px;
  text-align: right;
}

.dialog-prompt {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
}

.dialog-prompt kbd {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  color: #ffffff;
}

/* 4. Interaction Prompt */
.interaction-prompt {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid #38bdf8;
  padding: 10px 22px;
  border-radius: 30px;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
  backdrop-filter: blur(8px);
  z-index: 102;
  pointer-events: none;
  animation: promptBob 1.2s ease-in-out infinite alternate;
}

@keyframes promptBob {
  from { transform: translateX(-50%) translateY(0); }
  to { transform: translateX(-50%) translateY(-5px); }
}

.prompt-key {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  font-weight: 900;
  font-size: 14px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
}

.prompt-text {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

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

.overworld-quest-tracker {
  position: absolute;
  top: 24px;
  left: 24px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 12px 18px;
  max-width: 320px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.quest-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

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

.quest-title {
  font-size: 11px;
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 1.5px;
}

.quest-desc {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.4;
}

/* Navigational Direction Compass Widget */
.hud-quest-navigator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 5px 10px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
}

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

.hud-nav-compass {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid rgba(251, 191, 36, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hud-compass-arrow {
  font-size: 12px;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.8);
  animation: compassPulseAnim 1.6s ease-in-out infinite;
  display: inline-block;
}

@keyframes compassPulseAnim {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); }
}

.hud-nav-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hud-nav-label {
  font-size: 8.5px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 1px;
}

.hud-nav-direction-text {
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.overworld-controls-guide {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 16px;
  backdrop-filter: blur(6px);
}

.guide-item {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-item kbd {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

/* 5b. Overworld Squad HUD (Frames, HP, PA & PM) */
.overworld-squad-hud {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 96;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  animation: squadHudFadeIn 0.3s ease-out;
}

@keyframes squadHudFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.squad-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
  max-width: 280px;
}

.squad-hud-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.squad-hud-title-icon {
  font-size: 13px;
}

.squad-hud-title-text {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.squad-hud-count {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.squad-hud-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.squad-member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 14px 8px 10px;
  width: 270px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

.squad-member-card:hover {
  transform: translateX(5px) scale(1.01);
}

/* Class Themes ("Visual tipo Marco") */
/* 1. Bestia (Kotaro) */
.squad-member-card.class-beast {
  border-left: 3px solid #f59e0b;
}
.squad-member-card.class-beast:hover {
  border-color: #f59e0b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(245, 158, 11, 0.35);
}
.squad-member-card.class-beast .squad-frame-outer {
  border: 2px solid #f59e0b;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(180, 83, 9, 0.4) 100%);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5), inset 0 0 6px rgba(245, 158, 11, 0.3);
}
.squad-member-card.class-beast .squad-frame-gem {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}
.squad-member-card.class-beast .squad-class-tag {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* 2. Pájaro (Bing) */
.squad-member-card.class-bird {
  border-left: 3px solid #38bdf8;
}
.squad-member-card.class-bird:hover {
  border-color: #38bdf8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(56, 189, 248, 0.35);
}
.squad-member-card.class-bird .squad-frame-outer {
  border: 2px solid #38bdf8;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(2, 132, 199, 0.4) 100%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5), inset 0 0 6px rgba(56, 189, 248, 0.3);
}
.squad-member-card.class-bird .squad-frame-gem {
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}
.squad-member-card.class-bird .squad-class-tag {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* 3. Planta (Pomodoro) */
.squad-member-card.class-plant {
  border-left: 3px solid #10b981;
}
.squad-member-card.class-plant:hover {
  border-color: #10b981;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(16, 185, 129, 0.35);
}
.squad-member-card.class-plant .squad-frame-outer {
  border: 2px solid #10b981;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.4) 100%);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5), inset 0 0 6px rgba(16, 185, 129, 0.3);
}
.squad-member-card.class-plant .squad-frame-gem {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}
.squad-member-card.class-plant .squad-class-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* 4. Sapidae: Rastreador Gogo (Musgo oliva) (Hito 95) */
.squad-member-card.class-sapidae-stargazer {
  border-left: 3px solid #8F9E3A;
}
.squad-member-card.class-sapidae-stargazer:hover {
  border-color: #B4C25A;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(143, 158, 58, 0.4);
}
.squad-member-card.class-sapidae-stargazer .squad-frame-outer {
  border: 2px solid #8F9E3A;
  background: radial-gradient(circle, rgba(143, 158, 58, 0.3) 0%, rgba(74, 83, 28, 0.55) 100%);
  box-shadow: 0 0 10px rgba(143, 158, 58, 0.55), inset 0 0 6px rgba(143, 158, 58, 0.35);
}
.squad-member-card.class-sapidae-stargazer .squad-frame-gem {
  background: #B4C25A;
  box-shadow: 0 0 8px #8F9E3A;
}
.squad-member-card.class-sapidae-stargazer .squad-level-badge {
  border-color: #B4C25A;
  color: #E3E9B8;
}

/* 5. Sapidae: Alfarero de Gólems (Terracota) (Hito 95) */
.squad-member-card.class-sapidae-crafter {
  border-left: 3px solid #C8643B;
}
.squad-member-card.class-sapidae-crafter:hover {
  border-color: #E0845C;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(200, 100, 59, 0.4);
}
.squad-member-card.class-sapidae-crafter .squad-frame-outer {
  border: 2px solid #C8643B;
  background: radial-gradient(circle, rgba(200, 100, 59, 0.3) 0%, rgba(110, 48, 20, 0.55) 100%);
  box-shadow: 0 0 10px rgba(200, 100, 59, 0.55), inset 0 0 6px rgba(200, 100, 59, 0.35);
}
.squad-member-card.class-sapidae-crafter .squad-frame-gem {
  background: #E0845C;
  box-shadow: 0 0 8px #C8643B;
}
.squad-member-card.class-sapidae-crafter .squad-level-badge {
  border-color: #E0845C;
  color: #F6D2BF;
}

/* 6. Sapidae: Comandante de Sombrero (Vino) (Hito 95) */
.squad-member-card.class-sapidae-shepard {
  border-left: 3px solid #A83A44;
}
.squad-member-card.class-sapidae-shepard:hover {
  border-color: #CC5A63;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(168, 58, 68, 0.4);
}
.squad-member-card.class-sapidae-shepard .squad-frame-outer {
  border: 2px solid #A83A44;
  background: radial-gradient(circle, rgba(168, 58, 68, 0.3) 0%, rgba(90, 24, 32, 0.55) 100%);
  box-shadow: 0 0 10px rgba(168, 58, 68, 0.55), inset 0 0 6px rgba(168, 58, 68, 0.35);
}
.squad-member-card.class-sapidae-shepard .squad-frame-gem {
  background: #CC5A63;
  box-shadow: 0 0 8px #A83A44;
}
.squad-member-card.class-sapidae-shepard .squad-level-badge {
  border-color: #CC5A63;
  color: #F2C9CC;
}

/* 7. Sapidae: Guardián de Campanas (Jade de pátina) (Hito 95) */
.squad-member-card.class-sapidae-lunalogist {
  border-left: 3px solid #3FB89A;
}
.squad-member-card.class-sapidae-lunalogist:hover {
  border-color: #62D3B5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(63, 184, 154, 0.4);
}
.squad-member-card.class-sapidae-lunalogist .squad-frame-outer {
  border: 2px solid #3FB89A;
  background: radial-gradient(circle, rgba(63, 184, 154, 0.3) 0%, rgba(20, 94, 76, 0.55) 100%);
  box-shadow: 0 0 10px rgba(63, 184, 154, 0.55), inset 0 0 6px rgba(63, 184, 154, 0.35);
}
.squad-member-card.class-sapidae-lunalogist .squad-frame-gem {
  background: #62D3B5;
  box-shadow: 0 0 8px #3FB89A;
}
.squad-member-card.class-sapidae-lunalogist .squad-level-badge {
  border-color: #62D3B5;
  color: #C3F0E3;
}

/* Portrait Frame Details */
.squad-portrait-frame {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.squad-frame-outer {
  position: absolute;
  inset: 2px;
  border-radius: 12px;
  transform: rotate(45deg) scale(0.85);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.squad-member-card:hover .squad-frame-outer {
  transform: rotate(45deg) scale(0.92);
}

.squad-frame-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.squad-avatar-icon {
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}

.squad-avatar-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.85));
  transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1);
  display: block;
  transform: scale(1.15);
}

.squad-member-card:hover .squad-avatar-img {
  transform: scale(1.25);
}

/* Sapidae Full-Body Standing Avatar inside the Diamond Frame */
.squad-avatar-img.squad-avatar-sapidae-body {
  width: 46px;
  height: 56px;
  object-fit: contain;
  transform: scale(1.22) translateY(-2px);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.9));
  pointer-events: none;
}

.squad-member-card:hover .squad-avatar-img.squad-avatar-sapidae-body {
  transform: scale(1.32) translateY(-3px);
}

.squad-level-badge {
  position: absolute;
  bottom: -6px;
  right: -8px;
  z-index: 4;
  background: rgba(11, 17, 32, 0.96);
  border: 1.5px solid #fbbf24;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 9.5px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.squad-frame-gem {
  position: absolute;
  top: -3px;
  left: calc(50% - 3.5px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  z-index: 4;
}

/* Info Column */
.squad-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

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

.squad-hero-name {
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.squad-class-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.squad-class-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
}

.squad-class-icon.squad-sapidae-class-icon {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 50%;
  border: 1.5px solid rgba(251, 191, 36, 0.95);
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.5), inset 0 0 4px rgba(0, 0, 0, 0.4);
}

.squad-member-card.class-sapidae-stargazer .squad-class-icon.squad-sapidae-class-icon {
  border-color: rgba(168, 85, 247, 0.95);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6), inset 0 0 4px rgba(0, 0, 0, 0.4);
}

.squad-member-card.class-sapidae-shepard .squad-class-icon.squad-sapidae-class-icon {
  border-color: rgba(56, 189, 248, 0.95);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6), inset 0 0 4px rgba(0, 0, 0, 0.4);
}

.squad-member-card.class-sapidae-lunalogist .squad-class-icon.squad-sapidae-class-icon {
  border-color: rgba(16, 185, 129, 0.95);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6), inset 0 0 4px rgba(0, 0, 0, 0.4);
}

.squad-member-card:hover .squad-class-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
}

/* HP Bar */
.squad-hp-row {
  width: 100%;
}

.squad-hp-bar {
  position: relative;
  height: 11px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.squad-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  border-radius: 5px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.squad-hp-text {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  line-height: 11px;
  pointer-events: none;
}

/* Points Row (PA & PM) */
.squad-points-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.squad-stat-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
}

.squad-stat-badge .badge-icon {
  font-size: 10px;
}

.squad-stat-badge.pa-badge {
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}

.squad-stat-badge.pm-badge {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
}

/* Combat Hide Rule */
body.state-combat #overworld-hud,
body.state-combat .overworld-hud,
body.state-combat #overworld-squad-hud,
body.state-combat .overworld-controls-guide,
body.state-combat .overworld-quest-tracker,
.overworld-hud.hidden #overworld-squad-hud {
  display: none !important;
}

/* 6. Battle Encounter Transition */
.battle-transition {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000000;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.battle-transition.active {
  opacity: 1;
}

.battle-transition.return-fade {
  opacity: 1;
}

.battle-transition.fade-out {
  opacity: 0;
}

.transition-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  animation: encounterFlash 0.5s ease-out forwards;
}

@keyframes encounterFlash {
  0% { opacity: 1; }
  50% { opacity: 0.9; }
  100% { opacity: 0; }
}

.transition-vortex {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: vortexSpin 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes vortexSpin {
  0% { transform: scale(0.2) rotate(0deg); opacity: 0; }
  60% { transform: scale(1.3) rotate(360deg); opacity: 1; }
  100% { transform: scale(1) rotate(540deg); opacity: 1; }
}

.rune-glyph {
  position: absolute;
  font-size: 36px;
  color: #38bdf8;
  text-shadow: 0 0 20px #38bdf8;
}

.rune-1 { top: 0; }
.rune-2 { right: 0; }
.rune-3 { bottom: 0; }
.rune-4 { left: 0; }

.transition-text {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #ffffff;
  text-shadow: 0 0 25px rgba(56, 189, 248, 0.9), 0 4px 10px #000;
  margin-top: 24px;
  animation: textZoom 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes textZoom {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   6. 7x7 WORLD MAP MODAL (PINWHEEL BIOMES & 2x2 SUB-QUADRANTS)
   ========================================================================== */
.world-map-modal {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  animation: fadeInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.world-map-modal.hidden {
  display: none !important;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.world-map-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(10px);
}

.world-map-container {
  position: relative;
  width: 94%;
  max-width: 1060px;
  max-height: 92vh;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.world-map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.world-map-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.world-map-badge {
  font-size: 10px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 2px;
}

.world-map-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: #f8fafc;
}

.world-map-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.world-map-close-btn:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  transform: scale(1.08);
}

/* Legend */
.world-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 24px;
  background: rgba(2, 6, 23, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: #94a3b8;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Tabs Switcher */
.world-map-tabs {
  display: flex;
  align-items: center;
  background: rgba(2, 6, 23, 0.7);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 4px;
}

.map-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.map-tab-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.map-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.45);
}

/* Body & Panels */
.world-map-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  padding: 14px 20px;
  align-items: stretch;
  min-height: 480px;
}

.world-map-view-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px;
  overflow: hidden;
}

.world-map-view-panel.hidden {
  display: none !important;
}

/* 5 Islands Cross Container */
.islands-cross-container {
  position: relative;
  width: 460px;
  height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.islands-sea-routes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.sea-route-line {
  stroke: rgba(56, 189, 248, 0.35);
  stroke-width: 2.5;
  stroke-dasharray: 6 5;
}

.sea-route-circle {
  fill: none;
  stroke: rgba(56, 189, 248, 0.12);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
}

.islands-cross-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 140px);
  grid-template-rows: repeat(3, 140px);
  gap: 10px;
}

.island-cell {
  position: relative;
  border-radius: 12px;
  box-sizing: border-box;
}

.island-cell-ocean {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(56, 189, 248, 0.06);
}

.ocean-compass-rose {
  font-size: 16px;
  color: rgba(56, 189, 248, 0.18);
}

.island-card {
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid #334155;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  user-select: none;
}

.island-card:hover {
  transform: translateY(-3px) scale(1.04);
  filter: brightness(1.22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.8);
  z-index: 5;
}

.island-card.selected-island {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.45);
  z-index: 6;
}

.island-card.current-island-cell {
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.55);
}

/* Biome-specific island cards */
.island-card.biome-forest {
  background: radial-gradient(circle at top, rgba(34, 197, 94, 0.22) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: #22c55e !important;
}

.island-card.biome-savannah {
  background: radial-gradient(circle at top, rgba(234, 179, 8, 0.20) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: #FAC651 !important;
}

.island-card.biome-arctic {
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.22) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: #38bdf8 !important;
}

.island-card.biome-mystic {
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.25) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: #6366f1 !important;
}

.island-card.biome-dungeon {
  background: radial-gradient(circle at top, rgba(239, 68, 68, 0.24) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: #ef4444 !important;
}

.island-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.island-direction-tag {
  font-size: 8px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.8px;
}

.island-status-pill {
  font-size: 8px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
}

.island-status-pill.status-current {
  background: rgba(34, 197, 94, 0.25);
  color: #4ade80;
  border: 1px solid #22c55e;
}

.island-status-pill.status-available {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.island-card-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.island-card-icon {
  font-size: 26px;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.6));
}

.island-card-name {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.island-card-tagline {
  font-size: 9px;
  color: #cbd5e1;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.island-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
}

.island-level-tag {
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
}

.island-player-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 20px;
  height: 20px;
}

.island-player-pin .pin-symbol {
  font-size: 13px;
  z-index: 2;
  filter: drop-shadow(0 2px 4px #000);
}

.island-player-pin .pin-halo {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #22c55e;
  background: rgba(34, 197, 94, 0.35);
  animation: pinPulseAnim 1.6s ease-out infinite;
  z-index: 1;
}

/* Island Canvas Wrapper */
.island-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
}

#island-map-canvas {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

.island-map-hud-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.island-hud-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.15s;
}

.island-hud-btn:hover {
  background: #0284c7;
  border-color: #38bdf8;
  transform: scale(1.05);
}

.island-map-tooltip {
  position: absolute;
  background: rgba(15, 23, 42, 0.94);
  border: 1.5px solid #facc15;
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 25;
  min-width: 160px;
  animation: popoverFadeIn 0.15s ease-out;
}

.island-map-tooltip.hidden {
  display: none !important;
}

.tooltip-title {
  font-size: 12px;
  font-weight: 800;
  color: #facc15;
  margin-bottom: 2px;
}

.tooltip-desc {
  font-size: 10px;
  color: #cbd5e1;
  line-height: 1.3;
}

.tooltip-coords {
  font-size: 9px;
  font-weight: 700;
  color: #38bdf8;
  margin-top: 4px;
  font-family: monospace;
}

.island-map-watermark {
  position: absolute;
  bottom: 8px;
  left: 12px;
  display: flex;
  gap: 16px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
  pointer-events: none;
}

/* Detail Sidebar Meta & Landmarks */
.detail-meta-box {
  display: flex;
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.meta-label {
  color: #94a3b8;
  font-weight: 600;
}

.meta-val {
  font-weight: 800;
  color: #f8fafc;
}

.meta-val.status-active {
  color: #4ade80;
}

.meta-val.status-locked {
  color: #94a3b8;
}

.detail-desc-text {
  margin: 0;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
}

.detail-landmarks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  padding-right: 4px;
}

.landmark-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.15s;
}

.landmark-row:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateX(2px);
}

.landmark-icon {
  font-size: 15px;
  line-height: 1;
}

.landmark-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.landmark-name {
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
}

.landmark-desc {
  font-size: 9.5px;
  color: #94a3b8;
  line-height: 1.25;
}

.detail-action-container {
  margin-top: 4px;
}

.detail-action-btn {
  width: 100%;
  padding: 9px 14px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid #38bdf8;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
  transition: all 0.18s;
}

.detail-action-btn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.6);
}

.detail-action-btn.btn-travel-island {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border: 1px solid #fbbf24;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.detail-action-btn.btn-travel-island:hover {
  background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.6);
}

/* 5c. Real-Time Overworld Minimap HUD (Top-Right) */
.overworld-minimap-hud {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 95;
  pointer-events: all;
  animation: squadHudFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.overworld-minimap-hud.hidden,
body.state-combat .overworld-minimap-hud {
  display: none !important;
}

.minimap-outer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.minimap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 180px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 4px 8px;
  backdrop-filter: blur(8px);
}

.minimap-biome-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.minimap-zone-title {
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.5px;
}

.minimap-expand-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.minimap-expand-btn:hover {
  background: #0284c7;
  color: #fff;
  transform: scale(1.1);
}

.minimap-radar-frame {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 20px rgba(34, 197, 94, 0.25);
  cursor: pointer;
  overflow: visible;
  transition: transform 0.18s;
}

.minimap-radar-frame:hover {
  transform: scale(1.02);
}

#minimap-canvas {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: block;
}

.compass-marker {
  position: absolute;
  font-size: 10px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  text-shadow: 0 1px 3px #000;
}

.compass-n { top: 2px; left: 50%; transform: translateX(-50%); color: #facc15; }
.compass-s { bottom: 2px; left: 50%; transform: translateX(-50%); }
.compass-e { right: 4px; top: 50%; transform: translateY(-50%); }
.compass-w { left: 4px; top: 50%; transform: translateY(-50%); }

.minimap-zoom-controls {
  position: absolute;
  bottom: 6px;
  right: -6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 10;
}

.minimap-zoom-btn {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.minimap-zoom-btn:hover {
  background: #0284c7;
  color: #fff;
  transform: scale(1.15);
}

.minimap-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 180px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 3px 8px;
  backdrop-filter: blur(8px);
}

.minimap-coords-text {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  font-family: monospace;
}

.minimap-target-dist {
  font-size: 9.5px;
  font-weight: 800;
  color: #facc15;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 1px 5px;
  border-radius: 4px;
}

.minimap-target-dist.hidden {
  display: none !important;
}

/* Detail Sidebar */
.world-map-detail {
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.detail-biome-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #38bdf8;
  width: fit-content;
}

.detail-zone-name {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
}

.detail-zone-coord {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 700;
}

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
}

.detail-footer-hint {
  margin-top: auto;
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
}

/* HUD Enhancements */
.hud-zone-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  background: rgba(2, 6, 23, 0.7);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: fit-content;
}

.hud-biome-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.hud-zone-name {
  font-size: 11px;
  font-weight: 700;
  color: #f1f5f9;
}

.hud-zone-coord {
  font-size: 10px;
  font-weight: 800;
  color: #38bdf8;
}

.hud-subq-badge {
  font-size: 10px;
  font-weight: 800;
  color: #facc15;
  background: rgba(250, 204, 21, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(250, 204, 21, 0.3);
  margin-left: 4px;
}

/* ==========================================================================
   INVENTORY & EQUIPMENT MODAL SYSTEM (3 COLUMNS)
   ========================================================================== */

.inventory-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.inventory-modal.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.inventory-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 20, 0.82);
  backdrop-filter: blur(8px);
}

.inventory-container {
  position: relative;
  width: 95vw;
  max-width: 1240px;
  height: 88vh;
  max-height: 860px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.95) 100%);
  border: 2px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px rgba(251, 191, 36, 0.15);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f8fafc;
  font-family: system-ui, -apple-system, sans-serif;
  z-index: 1;
}

.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
  flex-shrink: 0;
}

.inventory-title-group {
  display: flex;
  flex-direction: column;
}

.inventory-header-badge {
  font-size: 11px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.inventory-title {
  font-size: 20px;
  font-weight: 800;
  margin: 2px 0 0 0;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.inventory-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.inventory-close-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  border-color: #ef4444;
  color: #fff;
  transform: scale(1.08);
}

.inventory-body {
  display: grid;
  grid-template-columns: 225px 375px 1fr;
  gap: 14px;
  padding: 16px 22px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Col 1: Roster */
.inv-col-roster {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden !important;
}

.inv-section-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0;
}

.inv-roster-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inv-roster-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.inv-roster-card:hover {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(251, 191, 36, 0.4);
  transform: translateX(2px);
}

.inv-roster-card.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.12));
  border: 1.5px solid #fbbf24;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.2);
}

.inv-roster-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.inv-roster-avatar {
  font-size: 26px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.inv-roster-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inv-roster-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inv-roster-name {
  font-weight: 800;
  font-size: 14px;
  color: #f8fafc;
}

.inv-roster-level-badge {
  font-size: 10px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 1px 6px;
  border-radius: 4px;
}

.inv-roster-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inv-roster-notify-badge {
  font-size: 10px;
  background: #f59e0b;
  color: #000;
  font-weight: 900;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px #f59e0b;
  animation: pulse 1.5s infinite;
}

.inv-active-dot {
  font-size: 9px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.inv-locked-badge {
  font-size: 11px;
}

.inv-roster-role {
  font-size: 11px;
  color: #94a3b8;
}

/* Col 2: Equipment & Stats */
.inv-col-equipment {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden !important;
}

.inv-hero-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.inv-hero-avatar {
  font-size: 20px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.15);
  border: 1.5px solid rgba(251, 191, 36, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inv-hero-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inv-hero-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inv-hero-name {
  font-size: 15px;
  font-weight: 800;
  color: #fbbf24;
  margin: 0;
}

.inv-hero-level-badge {
  font-size: 11px;
  font-weight: 800;
  color: #000;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  padding: 2px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.inv-hero-archetype {
  font-size: 10.5px;
  color: #94a3b8;
}

.inv-hero-exp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.inv-hero-exp-track {
  flex: 1;
  height: 6px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.inv-hero-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 3px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.inv-hero-exp-text {
  font-size: 9.5px;
  color: #94a3b8;
  font-weight: 700;
  white-space: nowrap;
}

/* Universal scrollbar removal for inventory modal (per user preference: no scrollbars) */
.inventory-modal,
.inventory-modal *,
.inv-col-roster,
.inv-col-equipment,
.inv-col-backpack,
.inv-items-grid,
.inv-view-pane,
.inventory-container,
.inventory-body {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.inventory-modal *::-webkit-scrollbar,
.inv-col-roster::-webkit-scrollbar,
.inv-col-equipment::-webkit-scrollbar,
.inv-col-backpack::-webkit-scrollbar,
.inv-items-grid::-webkit-scrollbar,
.inv-view-pane::-webkit-scrollbar,
.inventory-container::-webkit-scrollbar,
.inventory-body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.inv-doll-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 0 2px 0;
  position: relative;
}

.inv-sub-title {
  font-size: 10.5px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0;
}

/* Paper Doll Cross Grid (3x3 Formation from User Sketch) */
.inv-doll-grid {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  grid-template-rows: repeat(3, 48px);
  gap: 5px;
  justify-content: center;
  align-items: center;
  position: relative;
  margin: 2px 0;
}

/* Subtle glowing silhouette / aura behind the paper doll */
.inv-doll-grid::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 10%;
  right: 10%;
  bottom: 10%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.09) 0%, rgba(15, 23, 42, 0) 70%);
  pointer-events: none;
  border-radius: 50%;
}

/* Slot grid coordinate assignments */
.inv-doll-slot[data-slot="hat"] {
  grid-column: 2;
  grid-row: 1;
}
.inv-doll-slot[data-slot="weapon"] {
  grid-column: 1;
  grid-row: 2;
}
.inv-doll-slot[data-slot="body"] {
  grid-column: 2;
  grid-row: 2;
}
.inv-doll-slot[data-slot="shield"] {
  grid-column: 3;
  grid-row: 2;
}
.inv-doll-slot[data-slot="boots"] {
  grid-column: 2;
  grid-row: 3;
}

/* Base slot styling */
.inv-doll-slot {
  width: 48px;
  height: 48px;
  border-radius: 9px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

/* Empty slot */
.inv-doll-slot.empty {
  background: rgba(30, 41, 59, 0.35);
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
}
.inv-doll-slot.empty .inv-doll-slot-icon {
  font-size: 20px;
  opacity: 0.32;
  filter: grayscale(1);
}
.inv-doll-slot.empty .inv-doll-slot-label {
  font-size: 7px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

/* Equipped slot - only shows the item icon/image */
.inv-doll-slot.has-item {
  background: rgba(30, 41, 59, 0.9);
  border: 2px solid #94a3b8;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.inv-doll-slot.has-item:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7), 0 0 14px rgba(251, 191, 36, 0.45);
}

.inv-doll-slot.has-item.rarity-common {
  border-color: #94a3b8;
  box-shadow: 0 4px 10px rgba(148, 163, 184, 0.25);
}
.inv-doll-slot.has-item.rarity-rare {
  border-color: #38bdf8;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35), inset 0 0 8px rgba(56, 189, 248, 0.2);
}
.inv-doll-slot.has-item.rarity-epic {
  border-color: #c084fc;
  box-shadow: 0 4px 16px rgba(192, 132, 252, 0.45), inset 0 0 10px rgba(192, 132, 252, 0.25);
}
.inv-doll-slot.has-item.rarity-legendary {
  border-color: #f59e0b;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.55), inset 0 0 12px rgba(245, 158, 11, 0.3);
}

.inv-doll-slot.has-item .inv-doll-item-icon {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.75));
  transition: transform 0.15s ease;
  transform: scale(0.70);
}
.inv-doll-slot.has-item:hover .inv-doll-item-icon {
  transform: scale(0.80);
}

/* Floating Tooltip */
.inv-floating-tooltip {
  position: fixed;
  z-index: 100000;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.97);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  backdrop-filter: blur(12px);
  border-radius: 10px;
  padding: 10px 12px;
  width: 250px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.85), 0 0 20px rgba(251, 191, 36, 0.2);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: opacity 0.12s ease, transform 0.12s ease;
  color: #f8fafc;
}
.inv-floating-tooltip.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
}

.inv-tt-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inv-tt-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.inv-tt-title-group {
  flex: 1;
  min-width: 0;
}
.inv-tt-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  display: block;
}
.inv-tt-tags {
  display: flex;
  gap: 4px;
  margin-top: 2px;
  align-items: center;
}
.inv-tt-slot-tag {
  font-size: 8px;
  font-weight: 800;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}
.inv-tt-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1px 0;
}
.inv-tt-desc {
  font-size: 9.5px;
  color: #94a3b8;
  font-style: italic;
  line-height: 1.35;
}
.inv-tt-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.inv-tt-hint {
  font-size: 9px;
  font-weight: 700;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px dashed rgba(239, 68, 68, 0.3);
  border-radius: 4px;
  padding: 3px 6px;
  text-align: center;
  margin-top: 2px;
}

/* Combat Stats 2-Column Grid Layout */
.inv-combat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 6px;
  margin-top: 4px;
}

.inv-combat-stat-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.inv-combat-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inv-combat-stat-label {
  font-size: 9.5px;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-combat-stat-val {
  font-size: 11px;
  color: #f8fafc;
  font-weight: 800;
}

.inv-combat-stat-breakdown {
  font-size: 8px;
  color: #64748b;
  display: flex;
  gap: 3px;
  align-items: center;
}

.inv-stats-wrapper {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 0;
}

.inv-stats-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

.inv-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
}

.inv-stat-label {
  color: #94a3b8;
  font-weight: 600;
}

.inv-stat-vals {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-stat-bonus {
  color: #4ade80;
  font-weight: 800;
  font-size: 11px;
}

.inv-stat-gear-bonus {
  color: #38bdf8;
  font-weight: 700;
  font-size: 10px;
}

.inv-stat-alloc-bonus {
  color: #4ade80;
  font-weight: 800;
  font-size: 10px;
}

.inv-stat-total {
  color: #f8fafc;
  font-weight: 800;
  font-size: 11.5px;
}

.inv-stat-add-btn {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: 1px solid #4ade80;
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
}

.inv-stat-add-btn:hover {
  transform: scale(1.15);
  background: #16a34a;
  box-shadow: 0 0 10px #22c55e;
}

.inv-stat-group-title {
  font-size: 9px;
  font-weight: 800;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 0 2px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 3px;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inv-stat-hint {
  font-size: 8.5px;
  color: #64748b;
  font-weight: 600;
  text-transform: none;
}

.inv-stat-label-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.inv-stat-hint-tag {
  font-size: 8px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
}

.inv-stat-alloc-pts {
  font-size: 11px;
  font-weight: 800;
  color: #f1f5f9;
}

.inv-stat-level-bonus {
  color: #fbbf24;
  font-weight: 700;
  font-size: 9.5px;
}

.inv-attr-row {
  background: rgba(255, 255, 255, 0.02);
  padding: 2px 4px;
  border-radius: 4px;
}

/* Col 2 Navigation Subtabs */
.inv-col2-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.inv-subtab-btn {
  flex: 1;
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(30, 41, 59, 0.6);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}

.inv-subtab-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #fff;
}

.inv-subtab-btn.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.15));
  border-color: #fbbf24;
  color: #fbbf24;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.2);
}

.inv-tab-notify-dot {
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px #ef4444;
}

.inv-view-pane {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inv-stats-header-row,
.inv-skills-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inv-unspent-badge {
  font-size: 10px;
  font-weight: 800;
  color: #000;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  padding: 2px 8px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  animation: pulse 1.5s infinite;
}

/* Skills View Cards */
.inv-skills-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inv-skill-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all 0.2s;
}

.inv-skill-card:hover {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(30, 41, 59, 0.9);
}

.inv-skill-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.inv-skill-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inv-skill-icon {
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inv-skill-name {
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
  display: block;
}

.inv-skill-cost-row {
  display: flex;
  gap: 6px;
  margin-top: 3px;
}

.inv-skill-pa {
  font-size: 9.5px;
  font-weight: 800;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 4px;
  padding: 1px 5px;
}

.inv-skill-range {
  font-size: 9.5px;
  font-weight: 800;
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 4px;
  padding: 1px 5px;
}

.inv-skill-level-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.inv-skill-level-text {
  font-size: 11px;
  font-weight: 800;
  color: #fbbf24;
}

.inv-skill-pips {
  display: flex;
  gap: 3px;
}

.inv-skill-pip {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.inv-skill-pip.active {
  background: #f59e0b;
  border-color: #fbbf24;
  box-shadow: 0 0 6px #f59e0b;
}

.inv-skill-desc {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.4;
  margin: 0;
}

.inv-skill-scaling-box {
  background: rgba(15, 23, 42, 0.65);
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.inv-skill-scaling-label {
  font-size: 8.5px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.5px;
}

.inv-skill-scaling-val {
  color: #e2e8f0;
  font-weight: 700;
}

.inv-skill-action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.inv-skill-upgrade-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1px solid #fbbf24;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.inv-skill-upgrade-btn:hover {
  transform: scale(1.04);
  background: #d97706;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}

.inv-skill-status-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
}

.inv-skill-status-tag.max {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-weight: 800;
}

.inv-skill-status-tag.locked {
  color: #64748b;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Victory Screen EXP Rewards Section */
.exp-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.exp-hero-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
}

.exp-hero-card.active-hero {
  border-color: rgba(251, 191, 36, 0.5);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(15, 23, 42, 0.8));
}

.exp-hero-avatar {
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid rgba(251, 191, 36, 0.4);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6), 0 2px 5px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.exp-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.exp-hero-avatar .exp-avatar-fallback {
  font-size: 24px;
  line-height: 1;
}

.exp-hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.exp-hero-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.exp-hero-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.exp-leader-tag {
  font-size: 9px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 6px;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.exp-ally-tag {
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 6px;
}

.exp-gained-val {
  font-size: 12px;
  font-weight: 900;
  color: #4ade80;
}

.exp-bar-track {
  height: 6px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.exp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 3px;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.exp-bar-legend {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: #94a3b8;
  font-weight: 700;
}

.exp-levelup-badge {
  font-size: 10.5px;
  font-weight: 900;
  color: #000;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 3px;
  align-self: flex-start;
  animation: pulse 1.5s infinite;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Col 3: Backpack */
.inv-col-backpack {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.inv-backpack-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  flex-shrink: 0;
}

.inv-backpack-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inv-items-counter {
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 3px 9px;
  border-radius: 10px;
}

.inv-filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.inv-filter-btn {
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
}

.inv-filter-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #f8fafc;
  border-color: rgba(251, 191, 36, 0.3);
}

.inv-filter-btn.active {
  background: rgba(251, 191, 36, 0.2);
  border-color: #fbbf24;
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.15);
}

.inv-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  grid-auto-rows: min-content;
  gap: 14px;
  overflow-y: auto;
  overflow-x: hidden !important;
  padding-right: 6px;
  align-content: start;
}

.inv-item-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  height: auto;
  min-height: auto;
  box-sizing: border-box;
}

.inv-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.5);
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(30, 41, 59, 0.9);
}

.inv-item-card.rarity-common {
  border-left: 4px solid #94a3b8;
}

.inv-item-card.rarity-rare {
  border-left: 4px solid #38bdf8;
  box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.05);
}

.inv-item-card.rarity-epic {
  border-left: 4px solid #c084fc;
  box-shadow: inset 0 0 12px rgba(192, 132, 252, 0.08);
}

.inv-item-card.rarity-legendary {
  border-left: 4px solid #f59e0b;
  box-shadow: inset 0 0 15px rgba(245, 158, 11, 0.15), 0 0 10px rgba(245, 158, 11, 0.15);
}

.inv-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0;
}

.inv-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-card-icon {
  font-size: 22px;
  width: 50px;
  text-align: center;
}

.inv-card-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #f8fafc;
}

.inv-card-tags {
  display: flex;
  gap: 5px;
}

.inv-slot-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.inv-rarity-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.inv-rarity-badge.common {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.inv-rarity-badge.rare {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.inv-rarity-badge.epic {
  background: rgba(192, 132, 252, 0.15);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.inv-card-desc {
  font-size: 11px;
  line-height: 1.45;
  color: #cbd5e1;
  margin-bottom: 0;
  flex: none;
  font-style: italic;
  background: rgba(0,0,0,0.18);
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.03);
}

.inv-card-stats-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0;
  background: rgba(0,0,0,0.3);
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.inv-benefits-label {
  font-size: 9px;
  font-weight: 800;
  color: #facc15;
  letter-spacing: 0.5px;
}

.inv-benefits-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.inv-stat-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.pill-dmg {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.pill-hp {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.pill-pa {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.pill-pm {
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.pill-shield {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.pill-init {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.inv-card-action {
  width: 100%;
  margin-top: 4px;
}

.inv-equip-btn {
  width: 100%;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.3));
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fef08a;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.inv-equip-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.inv-use-btn {
  width: 100%;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(16, 185, 129, 0.3));
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #a7f3d0;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.inv-use-btn:hover {
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: #052e16;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.45);
}

.inv-quest-badge-btn {
  width: 100%;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 7px;
  background: rgba(14, 165, 233, 0.15);
  border: 1px dashed rgba(56, 189, 248, 0.5);
  color: #7dd3fc;
  text-align: center;
  pointer-events: none;
  letter-spacing: 0.3px;
}

.inv-item-card.item-consumable {
  border-left: 4px solid #10b981;
  box-shadow: inset 0 0 10px rgba(16, 185, 129, 0.06);
}

.inv-item-card.item-quest {
  border-left: 4px solid #38bdf8;
  box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.08);
}

.pill-quest {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.inv-slot-badge.consumable {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.inv-slot-badge.quest {
  background: rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.inv-slot-badge.equipment {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.inv-card-icon-emoji {
  font-size: 26px;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.inv-doll-item-emoji {
  font-size: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.inv-toast-msg {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid #10b981;
  color: #f8fafc;
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(16, 185, 129, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
}

.inv-toast-msg.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.inv-empty-backpack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
  color: #64748b;
  gap: 10px;
  grid-column: 1 / -1;
}

.inv-empty-icon {
  font-size: 40px;
  opacity: 0.5;
}

.inv-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #cbd5e1;
}

.inv-empty-desc {
  font-size: 12px;
  color: #94a3b8;
  max-width: 320px;
  line-height: 1.4;
}


/* ==========================================================================
   QUEST BOOK & JOURNAL SYSTEM (LUNACIAN TOME)
   ========================================================================== */

.quest-book-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.quest-book-modal.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.quest-book-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 14, 0.84);
  backdrop-filter: blur(8px);
}

.quest-book-container {
  position: relative;
  width: 95vw;
  max-width: 1220px;
  height: 88vh;
  max-height: 850px;
  background: linear-gradient(135deg, #1b1528 0%, #151020 100%);
  border: 2.5px solid #d97706;
  outline: 1px solid rgba(251, 191, 36, 0.3);
  outline-offset: -6px;
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.95), 0 0 45px rgba(217, 119, 6, 0.25), inset 0 0 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f8fafc;
  font-family: system-ui, -apple-system, sans-serif;
  z-index: 1;
}

.quest-book-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 26px;
  background: rgba(22, 16, 34, 0.9);
  border-bottom: 2px solid rgba(217, 119, 6, 0.35);
  flex-shrink: 0;
}

.quest-header-title-group {
  display: flex;
  flex-direction: column;
}

.quest-header-badge {
  font-size: 11px;
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.quest-book-title {
  font-size: 20px;
  font-weight: 800;
  margin: 2px 0 0 0;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.quest-book-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.quest-book-close-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  border-color: #ef4444;
  color: #fff;
  transform: scale(1.08);
}

.quest-book-body {
  display: grid;
  grid-template-columns: 380px 12px 1fr;
  padding: 18px 24px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(35, 26, 52, 0.4) 0%, rgba(15, 10, 24, 0.6) 100%);
}

.quest-book-spine {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(217, 119, 6, 0.3), rgba(0, 0, 0, 0.5));
  border-radius: 6px;
  height: 100%;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.8);
}

/* Left Page */
.quest-page-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(26, 19, 40, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  overflow: hidden;
}

.quest-left-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
  flex-shrink: 0;
}

.quest-toggle-completed-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  font-weight: 700;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  padding: 7px 12px;
  border-radius: 8px;
  transition: all 0.15s;
}

.quest-toggle-completed-label:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
}

.quest-toggle-completed-label input {
  accent-color: #f59e0b;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.quest-category-bar {
  display: flex;
  gap: 6px;
}

.quest-cat-btn {
  flex: 1;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(45, 34, 68, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.quest-cat-btn:hover {
  background: rgba(65, 50, 95, 0.8);
  color: #fff;
}

.quest-cat-btn.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #fbbf24;
}

.quest-list-scroll {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
  min-height: 0;
}

.quest-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quest-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 4px;
}

.quest-group-header.completed {
  color: #34d399;
}

.quest-empty-group {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

.quest-entry-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: rgba(38, 28, 58, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s;
  border-left: 4px solid #f59e0b;
}

.quest-entry-card:hover {
  background: rgba(55, 40, 85, 0.85);
  transform: translateX(3px);
  border-color: rgba(245, 158, 11, 0.4);
}

.quest-entry-card.selected {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.12));
  border-color: #f59e0b;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.18);
}

.quest-entry-card.is-completed {
  border-left-color: #10b981;
  opacity: 0.85;
}

.quest-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quest-card-cat {
  font-size: 9.5px;
  font-weight: 800;
  color: #cbd5e1;
  letter-spacing: 0.5px;
}

.quest-card-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.quest-card-badge.in-progress {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.quest-card-badge.turn-in {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.quest-card-badge.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.quest-card-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  line-height: 1.3;
}

.quest-card-giver {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
}

/* Right Page */
.quest-page-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(26, 19, 40, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  overflow-y: auto;
}

.quest-no-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
  gap: 12px;
}

.quest-no-sel-icon {
  font-size: 44px;
  opacity: 0.5;
}

.quest-no-sel-title {
  font-size: 16px;
  font-weight: 700;
  color: #cbd5e1;
}

.quest-no-sel-desc {
  font-size: 12px;
  color: #94a3b8;
  max-width: 320px;
  line-height: 1.4;
}

.quest-detail-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.quest-detail-badges-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quest-detail-cat-badge {
  font-size: 10px;
  font-weight: 800;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 5px;
}

.quest-detail-status-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
}

.quest-detail-status-pill.in-progress {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.quest-detail-status-pill.turn-in {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.5);
}

.quest-detail-status-pill.completed {
  background: rgba(16, 185, 129, 0.2);
  color: #4ade80;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.quest-detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quest-track-btn {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #fbbf24;
  color: #fbbf24;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quest-track-btn:hover {
  background: #fbbf24;
  color: #0f172a;
}

.quest-track-btn.is-tracking {
  background: #fbbf24;
  color: #0f172a;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.quest-location-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #38bdf8;
  margin-top: 4px;
}

.quest-detail-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

.quest-detail-giver-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(15, 10, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.quest-detail-giver-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 0 10px rgba(245, 158, 11, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.quest-detail-giver-avatar img,
.quest-detail-giver-avatar .quest-giver-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 10px;
}

.quest-giver-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.35);
  overflow: hidden;
  flex-shrink: 0;
}

.quest-giver-avatar img,
.quest-card-giver .quest-giver-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 5px;
}

.quest-giver-img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  vertical-align: middle;
  border-radius: 4px;
}

.quest-giver-img-loading {
  opacity: 0.6;
  filter: grayscale(0.5);
  transition: opacity 0.25s ease;
}

.quest-detail-giver-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.quest-detail-giver-label {
  font-size: 9px;
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 0.8px;
}

.quest-detail-giver-name {
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
}

.quest-detail-giver-title {
  font-size: 11px;
  color: #94a3b8;
}

.quest-section-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(15, 10, 24, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.quest-box-heading {
  font-size: 11px;
  font-weight: 800;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0;
}

.quest-npc-quote {
  margin: 0;
  font-size: 12.5px;
  font-style: italic;
  color: #fef08a;
  line-height: 1.5;
  border-left: 3px solid #f59e0b;
  padding-left: 10px;
  background: rgba(245, 158, 11, 0.06);
  padding: 8px 10px;
  border-radius: 0 6px 6px 0;
}

.quest-lore-text {
  font-size: 11.5px;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
}

.quest-objective-summary {
  font-size: 12px;
  line-height: 1.45;
  color: #e2e8f0;
  font-weight: 600;
  margin: 0;
}

.quest-steps-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.quest-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.quest-step-item.step-done {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.quest-step-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}

.quest-step-item.step-done .quest-step-box {
  background: #10b981;
  border-color: #10b981;
  color: #064e3b;
}

.quest-rewards-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quest-reward-claim-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}

.quest-reward-claim-badge.claimed {
  background: rgba(16, 185, 129, 0.2);
  color: #4ade80;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.quest-reward-claim-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.quest-rewards-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quest-reward-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 6px;
  width: fit-content;
}

.quest-reward-pill.gold {
  background: rgba(245, 158, 11, 0.18);
  color: #fde047;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.quest-reward-pill.exp {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.quest-reward-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(30, 22, 46, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  border-left: 3px solid #38bdf8;
}

.quest-reward-item-icon {
  font-size: 22px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
}

.quest-reward-item-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(15, 10, 25, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4), 0 2px 5px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.quest-reward-item-card:hover .quest-reward-item-img {
  transform: scale(1.06);
  border-color: rgba(255, 255, 255, 0.3);
}

.quest-reward-item-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quest-reward-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quest-reward-item-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #f8fafc;
}

.quest-reward-rarity-badge {
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.quest-reward-rarity-badge.rare {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.quest-reward-rarity-badge.epic {
  background: rgba(192, 132, 252, 0.2);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.quest-reward-rarity-badge.legendary {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.quest-reward-item-card.rarity-epic {
  border-left-color: #c084fc;
}

.quest-reward-item-card.rarity-legendary {
  border-left-color: #f59e0b;
}

.quest-reward-item-desc {
  font-size: 10.5px;
  color: #94a3b8;
  font-style: italic;
}

.quest-reward-item-stats {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  margin-top: 2px;
}

/* ==========================================================================
   Overworld Guided Tutorial Banner - Lateral Derecho (Top-Right HUD)
   ========================================================================== */
.overworld-tutorial-banner {
  box-sizing: border-box;
  position: fixed;
  top: 24px;
  right: 24px;
  left: auto;
  transform: none;
  z-index: 2100;
  width: calc(100% - 48px);
  max-width: 380px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.92));
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  border-right: 4px solid #f59e0b;
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(245, 158, 11, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
  animation: tutBannerSlideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.overworld-tutorial-banner *,
.overworld-tutorial-banner *::before,
.overworld-tutorial-banner *::after {
  box-sizing: border-box;
}

.overworld-tutorial-banner.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@keyframes tutBannerSlideInRight {
  0% {
    opacity: 0;
    transform: translateX(35px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.overworld-tutorial-banner.position-left {
  right: auto;
  left: 24px;
  top: 132px;
  border-right: 1.5px solid rgba(245, 158, 11, 0.55);
  border-left: 4px solid #f59e0b;
  animation: tutBannerSlideInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tutBannerSlideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-35px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.tut-banner-glow {
  position: absolute;
  top: -2px;
  right: 10%;
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fbbf24, transparent);
  border-radius: 2px;
  opacity: 0.8;
}

.tut-banner-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.tut-step-badge {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 20px;
  padding: 2px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tut-step-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: #f8fafc;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.tut-step-text {
  margin: 0;
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.45;
}

.tut-step-text kbd {
  display: inline-block;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid #64748b;
  border-bottom: 2px solid #475569;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.overworld-tutorial-banner.is-completed {
  border-color: rgba(16, 185, 129, 0.6);
  border-right-color: #10b981;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 30px rgba(16, 185, 129, 0.4);
}

.overworld-tutorial-banner.position-left.is-completed {
  border-left-color: #10b981;
}

.overworld-tutorial-banner.is-completed .tut-banner-glow {
  background: linear-gradient(90deg, transparent, #34d399, transparent);
}

.overworld-tutorial-banner.is-completed .tut-step-badge {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.5);
}

/* 8. HUD Action Buttons & Progressive Feature Locks */
.hud-action-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  pointer-events: auto;
}

.hud-inv-btn, .hud-quest-btn, .hud-map-btn, .hud-options-btn {
  margin: 0 !important;
  padding: 6px 12px;
  height: 32px;
  box-sizing: border-box;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: all 0.25s ease;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  vertical-align: middle;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hud-inv-btn {
  background: rgba(236, 72, 153, 0.25);
  color: #f472b6;
  border-color: rgba(236, 72, 153, 0.5);
}
.hud-inv-btn:hover:not(.hud-btn-locked) {
  background: rgba(236, 72, 153, 0.5);
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.6);
}

.hud-quest-btn {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.5);
}
.hud-quest-btn:hover:not(.hud-btn-locked) {
  background: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.hud-map-btn {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.5);
}
.hud-map-btn:hover:not(.hud-btn-locked) {
  background: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.hud-btn-locked {
  opacity: 0.3 !important;
  filter: grayscale(0.9) !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

.hud-btn-unlocked {
  opacity: 1 !important;
  filter: none !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  animation: unlockPulse 1.2s ease-out;
}

@keyframes unlockPulse {
  0% { transform: scale(1.15); box-shadow: 0 0 22px rgba(251, 191, 36, 0.9); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   Guided Tutorial Action Lock, Dimming Spotlight & Cutscene Styles
   ========================================================================== */
.tutorial-focus-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 18, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.tutorial-focus-overlay.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.tutorial-overlay-backdrop {
  position: absolute;
  inset: 0;
}

/* Elevated spotlight element above dark overlay */
.tutorial-spotlight-target {
  position: relative !important;
  z-index: 10002 !important;
  pointer-events: auto !important;
  box-shadow: 0 0 0 3px #fbbf24, 0 0 25px rgba(251, 191, 36, 0.95), 0 6px 20px rgba(0, 0, 0, 0.7) !important;
  animation: tutorialSpotlightPulse 1.4s infinite ease-in-out !important;
  border-color: #fbbf24 !important;
}

@keyframes tutorialSpotlightPulse {
  0% {
    box-shadow: 0 0 0 3px #fbbf24, 0 0 15px rgba(251, 191, 36, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 5px #f59e0b, 0 0 30px rgba(245, 158, 11, 0.95);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 3px #fbbf24, 0 0 15px rgba(251, 191, 36, 0.6);
    transform: scale(1);
  }
}

.tutorial-spotlight-banner {
  z-index: 10002 !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(251, 191, 36, 0.4) !important;
}

/* Golden glowing frame around the cutout hole */
.tutorial-spotlight-highlight-box {
  position: fixed;
  pointer-events: none;
  border: 2px solid #fbbf24;
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.4), 0 0 25px rgba(251, 191, 36, 0.95);
  animation: tutorialSpotlightPulse 1.4s infinite ease-in-out;
  z-index: 10002;
}

.tutorial-spotlight-highlight-box.hidden {
  display: none !important;
}

/* Floating pointer indicator */
.tutorial-spotlight-pointer {
  position: fixed;
  z-index: 10003;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
  border: 1.5px solid #fbbf24;
  border-radius: 12px;
  padding: 8px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(251, 191, 36, 0.4);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
  animation: pointerFloat 1.2s infinite ease-in-out;
  white-space: nowrap;
}

.tutorial-spotlight-pointer.hidden {
  display: none !important;
}

.tutorial-spotlight-pointer .pointer-hand {
  font-size: 18px;
}

.tutorial-spotlight-pointer kbd {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid #f59e0b;
  border-radius: 4px;
  padding: 1px 6px;
  color: #fbbf24;
  font-family: inherit;
  font-weight: 900;
}

@keyframes pointerFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Dramatic Chimera Cutscene Banner */
.tutorial-cutscene-alert {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10005;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.97), rgba(88, 28, 135, 0.94));
  border: 2px solid #a855f7;
  border-radius: 16px;
  padding: 16px 32px;
  color: #ffffff;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 35px rgba(168, 85, 247, 0.6);
  pointer-events: none;
  animation: cutsceneAlertIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tutorial-cutscene-alert.hidden {
  display: none !important;
}

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

/* Spotlight inside Inventory Modal */
.tutorial-spotlight-sword {
  border: 2.5px solid #fbbf24 !important;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.5), 0 0 25px rgba(251, 191, 36, 0.85) !important;
  animation: swordCardPulse 1.3s infinite ease-in-out !important;
  position: relative;
}

@keyframes swordCardPulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.5), 0 0 16px rgba(251, 191, 36, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.85), 0 0 28px rgba(245, 158, 11, 0.95);
    transform: scale(1.02);
  }
}

.inv-tutorial-sword-banner {
  margin-top: 6px;
  padding: 4px 8px;
  background: linear-gradient(90deg, #f59e0b, #eab308);
  color: #0f172a;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-align: center;
  animation: swordBannerPulse 1.2s infinite ease-in-out;
}

@keyframes swordBannerPulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; filter: brightness(1.2); }
}

.inv-tutorial-hint {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.22), rgba(245, 158, 11, 0.12));
  border: 1.5px solid rgba(251, 191, 36, 0.6);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 12px;
  color: #fef08a;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.inv-tutorial-hint.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.15));
  border-color: rgba(52, 211, 153, 0.7);
  color: #a7f3d0;
}

.inv-tutorial-hint kbd {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 11px;
}

/* Shake warning animation for blocked close */
.shake-warning {
  animation: shakeWarningAnim 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeWarningAnim {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-7px, 0, 0); }
  40%, 60% { transform: translate3d(7px, 0, 0); }
}

/* ==========================================================================
   NPC Interaction Prompt & Floating 3D Speech Bubbles (Globos de Diálogo)
   ========================================================================== */
.interaction-prompt {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid #facc15;
  border-radius: 30px;
  padding: 8px 22px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(250, 204, 21, 0.35);
  z-index: 950;
  pointer-events: none;
  animation: promptPulse 1.8s infinite ease-in-out;
}

.prompt-key {
  background: linear-gradient(180deg, #fef08a, #facc15);
  color: #0f172a;
  font-weight: 900;
  font-size: 14px;
  padding: 3px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.prompt-text {
  color: #f8fafc;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

@keyframes promptPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.04); }
}

/* Floating 3D Screen-Space Quest Pin */
.hud-3d-quest-pin {
  position: fixed;
  transform: translate(-50%, -100%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.90);
  border: 1.5px solid #facc15;
  border-radius: 20px;
  padding: 6px 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 16px rgba(250, 204, 21, 0.4);
  z-index: 850;
  pointer-events: none;
  font-family: 'Segoe UI', Roboto, sans-serif;
  transition: opacity 0.25s ease, transform 0.2s ease;
  white-space: nowrap;
}
.hud-3d-quest-pin.hidden {
  display: none !important;
}
.hud-quest-pin-icon {
  font-size: 14px;
  animation: pinBounce 1.5s infinite ease-in-out;
}
.hud-quest-pin-title {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}
.hud-quest-pin-dist {
  color: #facc15;
  font-size: 12px;
  font-weight: 800;
  background: rgba(250, 204, 21, 0.18);
  padding: 2px 7px;
  border-radius: 10px;
}
@keyframes pinBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Floating 3D Overworld Speech Bubble (Balón de Diálogo) */
.npc-speech-bubble {
  position: fixed;
  transform: translate(-50%, -100%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid #38bdf8;
  border-radius: 18px;
  padding: 10px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.35);
  z-index: 900;
  pointer-events: none;
  max-width: 320px;
  animation: speechBubbleBounce 2.5s infinite ease-in-out;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.npc-speech-bubble.turn-in {
  border-color: #22c55e;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(34, 197, 94, 0.4);
}

.npc-speech-bubble.recruit {
  border-color: #facc15;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(250, 204, 21, 0.4);
}

.npc-bubble-badge {
  font-size: 20px;
  line-height: 1;
  background: rgba(30, 41, 59, 0.9);
  padding: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: badgeBounce 1.5s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.npc-bubble-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.npc-bubble-speaker {
  font-size: 11.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fbbf24;
}

.npc-bubble-text {
  font-size: 13px;
  font-style: italic;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.35;
}

/* Comic Speech Bubble Triangle Tail pointing down towards NPC */
.npc-bubble-tail {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #38bdf8;
}

.npc-speech-bubble.turn-in .npc-bubble-tail {
  border-top-color: #22c55e;
}

.npc-speech-bubble.recruit .npc-bubble-tail {
  border-top-color: #facc15;
}

@keyframes speechBubbleBounce {
  0%, 100% {
    margin-top: 0px;
  }
  50% {
    margin-top: -6px;
  }
}

@keyframes badgeBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px) scale(1.1); }
}

/* Combat State Safeguards: Hide Overworld 3D callouts & prompts during battle */
body.state-combat #npc-speech-bubble,
body.state-combat .npc-speech-bubble,
body.state-combat #interaction-prompt,
body.state-combat .interaction-prompt {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   START SCREEN & SAVE SLOTS UI (Lunacia Chronicles Theme)
   ========================================================================== */

.start-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.start-screen-overlay.fade-out {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.start-screen-overlay.hidden {
  display: none !important;
}

.start-screen-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(11, 17, 30, 0.65) 0%, rgba(6, 10, 18, 0.92) 80%, #030712 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.start-screen-content {
  position: relative;
  z-index: 2;
  width: 92%;
  max-width: 1140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  animation: startContentFadeIn 0.8s ease-out;
}

@keyframes startContentFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header & Title Logo */
.start-screen-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-logo-wrapper {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 6px auto;
  max-width: 100%;
}

.game-logo-img {
  max-width: clamp(320px, 42vw, 500px);
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 24px rgba(56, 189, 248, 0.45));
  mask-image: radial-gradient(ellipse 92% 84% at 50% 50%, black 72%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 92% 84% at 50% 50%, black 72%, transparent 100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
  cursor: pointer;
}

.game-logo-img:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 32px rgba(56, 189, 248, 0.7));
}

.game-pretitle {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3.5px;
  color: #38bdf8;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
  margin-bottom: 4px;
}

.game-logo-title {
  font-family: 'Impact', 'Arial Black', system-ui, sans-serif;
  font-size: clamp(42px, 6vw, 68px);
  letter-spacing: 3px;
  line-height: 1;
  text-transform: uppercase;
  margin: 0;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.8));
}

.logo-gold {
  background: linear-gradient(180deg, #fef08a 0%, #f59e0b 50%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(245, 158, 11, 0.4);
}

.logo-cyan {
  background: linear-gradient(180deg, #e0f2fe 0%, #38bdf8 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
}

.game-subtitle {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 5px;
  color: #e2e8f0;
  text-transform: uppercase;
  margin-top: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.game-tagline {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 6px;
  max-width: 520px;
  line-height: 1.4;
}

/* Slots Section */
.start-slots-section {
  width: 100%;
}

.slots-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  padding: 0 4px;
}

.slots-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #facc15;
  text-transform: uppercase;
}

.slots-hint {
  font-size: 12px;
  color: #64748b;
}

.start-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

@media (max-width: 860px) {
  .start-slots-grid {
    grid-template-columns: 1fr;
    max-height: 52vh;
    overflow-y: auto;
  }
}

/* Slot Cards */
.slot-card {
  position: relative;
  background: rgba(13, 22, 38, 0.88);
  border: 1.5px solid rgba(234, 179, 8, 0.32);
  border-radius: 16px;
  padding: 20px 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 235px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  overflow: hidden;
}

.slot-card:hover {
  transform: translateY(-6px);
  border-color: #fbbf24;
  box-shadow: 0 18px 40px rgba(251, 191, 36, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.slot-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 3px 8px;
  border-radius: 20px;
  width: fit-content;
}

.slot-saved-date {
  font-size: 11px;
  color: #64748b;
}

/* Empty Slot */
.slot-empty {
  border-style: dashed;
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(11, 18, 32, 0.7);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.slot-empty:hover {
  border-color: #38bdf8;
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.2);
}

.empty-slot-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}

.empty-icon-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px dashed rgba(56, 189, 248, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  background: rgba(56, 189, 248, 0.08);
  transition: transform 0.25s ease, background 0.25s ease;
}

.slot-empty:hover .empty-icon-ring {
  transform: scale(1.1) rotate(90deg);
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
}

.empty-plus-icon {
  font-size: 28px;
  color: #38bdf8;
  line-height: 1;
}

.empty-slot-title {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
}

.empty-slot-sub {
  font-size: 12px;
  color: #94a3b8;
  max-width: 200px;
  line-height: 1.35;
}

.btn-slot-create {
  margin-top: 10px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border: 1px solid #38bdf8;
  border-radius: 20px;
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-slot-create:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
}

/* Occupied Slot */
.slot-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
}

.slot-hero-preview {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
  min-height: 130px;
}

.slot-standing-duo {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  height: 130px;
  position: relative;
}

.slot-standing-figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.slot-standing-sapidae {
  width: 68px;
  height: 128px;
}

.slot-fullbody-img {
  max-height: 124px;
  width: auto;
  max-width: 200%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
  z-index: 1;
  position: relative;
  transition: transform 0.25s ease;
}

.slot-card:hover .slot-fullbody-img {
  transform: translateY(-3px) scale(1.03);
}

.slot-standing-companion {
  width: 54px;
  height: 84px;
  margin-bottom: 2px;
}

.slot-companion-fullbody-img {
  max-height: 80px;
  width: auto;
  max-width: 140%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
  z-index: 1;
  position: relative;
  transition: transform 0.25s ease;
}

.slot-card:hover .slot-companion-fullbody-img {
  transform: translateY(-2px) scale(1.04);
}

.slot-ground-shadow {
  position: absolute;
  bottom: 0px;
  width: 56px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 75%);
  pointer-events: none;
  z-index: 0;
}

.companion-shadow {
  width: 44px;
  height: 8px;
}

.slot-sapidae-class-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #fbbf24;
  box-shadow: 0 0 5px rgba(251, 191, 36, 0.4);
  flex-shrink: 0;
}

.slot-hero-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.slot-hero-name {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.slot-hero-archetype {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.slot-class-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.slot-level-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.slot-level-badge {
  font-size: 10px;
  font-weight: 800;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  padding: 1px 6px;
  border-radius: 10px;
}

.slot-zone-name {
  font-size: 11px;
  color: #94a3b8;
}

.slot-actions-row {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: auto;
}

.btn-slot-play {
  flex: 1;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid #34d399;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-slot-play:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
}

.btn-slot-delete {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  padding: 0 12px;
  font-size: 14px;
  color: #f87171;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-slot-delete:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: #ef4444;
}

/* Footer info */
.start-screen-footer {
  display: flex;
  justify-content: center;
  font-size: 11px;
  color: #64748b;
}

.footer-info {
  display: flex;
  gap: 14px;
  align-items: center;
}

.footer-badge {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 8px;
  color: #94a3b8;
}

/* ==========================================================================
   HERO SELECTION MODAL
   ========================================================================== */

.hero-select-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease-out;
}

.hero-select-modal.hidden {
  display: none !important;
}

.hero-select-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-select-container {
  position: relative;
  z-index: 2;
  width: 95%;
  max-width: 1060px;
  max-height: 96vh;
  overflow-y: auto;
  background: rgba(13, 20, 36, 0.96);
  border: 1.5px solid rgba(250, 204, 21, 0.4);
  border-radius: 20px;
  padding: 14px 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(250, 204, 21, 0.15);
}

.hero-select-header {
  position: relative;
  text-align: center;
  margin-bottom: 12px;
}

.hero-select-logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 6px auto;
}

.hero-select-logo-img {
  max-width: 230px;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 16px rgba(56, 189, 248, 0.4));
  mask-image: radial-gradient(ellipse 92% 84% at 50% 50%, black 72%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 92% 84% at 50% 50%, black 72%, transparent 100%);
}

.hero-select-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
}

.hero-select-title {
  font-family: 'Impact', 'Arial Black', system-ui, sans-serif;
  font-size: 24px;
  letter-spacing: 1.5px;
  color: #fef08a;
  margin: 3px 0;
  text-shadow: 0 2px 10px rgba(250, 204, 21, 0.3);
}

.hero-select-desc {
  font-size: 11.5px;
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.3;
}

.hero-select-desc strong {
  color: #f8fafc;
}

.hero-select-close-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.hero-select-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fff;
}

/* 3-Hero Roster Grid */
.hero-roster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .hero-roster-grid {
    grid-template-columns: 1fr;
  }
}

.hero-card {
  background: rgba(18, 28, 48, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.hero-card:hover {
  transform: translateY(-4px);
  border-color: #38bdf8;
  box-shadow: 0 16px 35px rgba(56, 189, 248, 0.25);
}

.hero-card-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.hero-class-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
  cursor: pointer;
}

.hero-card:hover .hero-class-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7));
}

.hero-class-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 6px;
}

.hero-class-tag.class-beast,
.hero-class-tag.class-bestia {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #fcd34d;
}

.hero-class-tag.class-aquatic,
.hero-class-tag.class-acuático,
.hero-class-tag.class-acuatico {
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid #0ea5e9;
  color: #7dd3fc;
}

.hero-class-tag.class-plant,
.hero-class-tag.class-planta {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  color: #86efac;
}

.hero-class-tag.class-pájaro,
.hero-class-tag.class-pajaro,
.hero-class-tag.class-bird {
  background: rgba(192, 132, 252, 0.2);
  border: 1px solid #c084fc;
  color: #e9d5ff;
}

.hero-axie-id {
  font-size: 10px;
  font-family: monospace;
  color: #64748b;
}

.hero-card-avatar-wrapper {
  width: 100%;
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
  margin-bottom: 4px;
}

.hero-preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s ease;
}

.hero-card:hover .hero-preview-img {
  transform: scale(1.08);
}

.hero-crest {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.25s ease;
}

.hero-card:hover .hero-crest {
  transform: scale(1.1);
}

.hero-crest.crest-beast,
.hero-crest.crest-bestia {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, rgba(180, 83, 9, 0.15) 70%, transparent 100%);
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.hero-crest.crest-aquatic,
.hero-crest.crest-acuático,
.hero-crest.crest-acuatico {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.35) 0%, rgba(3, 105, 161, 0.15) 70%, transparent 100%);
  border-color: #0ea5e9;
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
}

.hero-crest.crest-plant,
.hero-crest.crest-planta {
  background: radial-gradient(circle, rgba(34, 197, 94, 0.35) 0%, rgba(21, 128, 61, 0.15) 70%, transparent 100%);
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.hero-crest.crest-bird,
.hero-crest.crest-pájaro,
.hero-crest.crest-pajaro {
  background: radial-gradient(circle, rgba(192, 132, 252, 0.35) 0%, rgba(147, 51, 234, 0.15) 70%, transparent 100%);
  border-color: #c084fc;
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.4);
}

.crest-emoji {
  font-size: 34px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.slot-crest {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: none;
}

.slot-crest .crest-emoji {
  font-size: 26px;
}

.hero-card-name {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 2px 0;
}

.hero-card-archetype {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 6px;
}

.hero-card-lore {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.3;
  margin-bottom: 10px;
}

/* Stats Box */
.hero-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(11, 18, 32, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 4px;
  margin-bottom: 10px;
  text-align: center;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.stat-label {
  font-size: 8px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.stat-val {
  font-size: 12px;
  font-weight: 800;
}

.val-hp { color: #f87171; }
.val-pa { color: #38bdf8; }
.val-pm { color: #4ade80; }
.val-init { color: #fbbf24; }

/* Skills list */
.hero-card-skills {
  background: rgba(11, 18, 32, 0.4);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  flex-grow: 1;
}

.skills-heading {
  font-size: 10px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.skills-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.25;
}

.skills-list strong {
  color: #e2e8f0;
}

.skills-list .cost {
  color: #38bdf8;
  font-weight: 700;
}

/* Select Hero Button */
.btn-select-hero {
  width: 100%;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid #38bdf8;
  border-radius: 10px;
  padding: 9px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-select-hero:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.55);
}

/* ==========================================================================
   SAPIDAE CHARACTER CREATION MULTI-PANEL WIZARD
   ========================================================================== */
.char-wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 14px 0;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
}

.char-step-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.char-step-tab:hover {
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
}

.char-step-tab.active {
  color: #f8fafc;
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

.char-step-tab.completed {
  color: #10b981;
}

.char-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

.char-step-tab.active .char-step-num {
  background: #38bdf8;
  color: #030712;
}

.char-step-tab.completed .char-step-num {
  background: #10b981;
  color: #030712;
}

.char-step-divider {
  color: rgba(255, 255, 255, 0.15);
  font-size: 14px;
  user-select: none;
}

.char-wizard-panel {
  animation: modalFadeIn 0.25s ease-out;
}

/* Panel 1: Class Selection */
.char-class-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 950px) {
  .char-class-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .char-class-grid {
    grid-template-columns: 1fr;
  }
}

.char-class-card {
  position: relative;
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 10px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.char-class-card:hover {
  transform: translateY(-3px);
  border-color: rgba(250, 204, 21, 0.5);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(250, 204, 21, 0.2);
}

.char-class-card.active {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(251, 191, 36, 0.3);
}

.char-class-card-img-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin-bottom: 8px;
  overflow: hidden;
  border: 2.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  position: relative;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, rgba(15, 23, 42, 0.9) 80%);
}

.char-class-card.active .char-class-card-img-wrap {
  border-color: #fbbf24;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.5);
}

.char-class-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

.char-class-card:hover .char-class-card-img {
  transform: scale(1.2);
}

.char-class-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.char-class-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 2px;
}

.char-class-card.active .char-class-title {
  color: #fef08a;
}

.char-class-subtitle {
  font-size: 10px;
  color: #94a3b8;
  margin-bottom: 8px;
  line-height: 1.2;
}

.char-class-stats-row {
  display: flex;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(2, 6, 23, 0.5);
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Panel 1: Class Detail Box & Clean 6-Skill Row */
.class-detail-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.class-detail-name {
  color: #fef08a;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.class-detail-title {
  font-size: 11px;
  color: #94a3b8;
  margin-left: 8px;
  font-style: italic;
}

.class-detail-stats {
  display: flex;
  gap: 12px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.6);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.class-detail-stats .stat-hp { color: #f87171; }
.class-detail-stats .stat-ap { color: #38bdf8; }
.class-detail-stats .stat-mp { color: #4ade80; }
.class-detail-stats .stat-init { color: #fbbf24; }

.class-detail-desc {
  font-size: 11.5px;
  color: #cbd5e1;
  margin: 4px 0 10px 0;
  line-height: 1.45;
}

.class-skills-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

.class-skills-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.class-skills-section-label {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.class-skills-hint-label {
  font-size: 10.5px;
  color: #94a3b8;
  font-style: italic;
}

.class-skills-icon-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.class-skill-icon-btn {
  position: relative;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  user-select: none;
}

.class-skill-icon-btn:hover,
.class-skill-icon-btn:focus-visible {
  transform: translateY(-3px) scale(1.08);
}

.class-skill-icon-frame {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1.8px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.class-skill-icon-btn:hover .class-skill-icon-frame,
.class-skill-icon-btn:focus-visible .class-skill-icon-frame {
  border-color: #facc15;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7), 0 0 12px rgba(250, 204, 21, 0.4);
}

.class-skill-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.class-skill-num-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.75);
  color: #e2e8f0;
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

/* Floating Skill Tooltip */
.class-skill-tooltip {
  position: fixed;
  z-index: 10050;
  width: 280px;
  background: rgba(11, 19, 43, 0.96);
  border: 1.5px solid rgba(250, 204, 21, 0.7);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 18px rgba(250, 204, 21, 0.2);
  border-radius: 12px;
  padding: 12px;
  pointer-events: none;
  animation: skillTooltipFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}

@keyframes skillTooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.skill-tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.skill-tooltip-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1.5px solid #38bdf8;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.skill-tooltip-title-wrap {
  flex: 1;
  min-width: 0;
}

.skill-tooltip-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #fef08a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-tooltip-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.skill-tooltip-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.skill-tooltip-badge.type-dano,
.skill-tooltip-badge.type-directo {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.skill-tooltip-badge.type-curacion {
  background: rgba(34, 197, 94, 0.25);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.skill-tooltip-badge.type-escudo {
  background: rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.skill-tooltip-badge.type-area {
  background: rgba(234, 179, 8, 0.25);
  color: #fef08a;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.skill-tooltip-badge.type-invocacion,
.skill-tooltip-badge.type-utilidad {
  background: rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.skill-tooltip-cost {
  font-size: 10px;
  font-weight: 800;
  color: #38bdf8;
}

.skill-tooltip-range {
  font-size: 10px;
  font-weight: 700;
  color: #cbd5e1;
}

.skill-tooltip-body {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.45;
}

/* ==========================================================================
   UNIFIED CHARACTER CREATION STUDIO (DOFUS UNITY STYLE)
   ========================================================================== */

.dofus-studio-container {
  position: relative;
  z-index: 2;
  width: 96vw;
  max-width: 1420px;
  height: 92vh;
  max-height: 890px;
  background: radial-gradient(ellipse at top center, rgba(17, 24, 39, 0.98) 0%, rgba(9, 14, 28, 0.98) 100%);
  border: 1.8px solid rgba(250, 204, 21, 0.45);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9), 0 0 45px rgba(250, 204, 21, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: studioFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes studioFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* Top Navigation Bar */
.dofus-top-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: rgba(3, 7, 18, 0.6);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.dofus-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.dofus-back-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fff;
  transform: translateX(-2px);
}

.dofus-back-arrow {
  font-size: 16px;
  line-height: 1;
}

.dofus-title-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  z-index: 1;
}

.dofus-super-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: #38bdf8;
  text-transform: uppercase;
  margin-bottom: 1px;
}

.dofus-main-title {
  font-family: 'Impact', 'Arial Black', system-ui, sans-serif;
  font-size: 21px;
  letter-spacing: 1.5px;
  color: #fef08a;
  margin: 0;
  text-shadow: 0 2px 10px rgba(250, 204, 21, 0.35);
}

.dofus-slot-indicator {
  font-size: 11px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 4px 12px;
  border-radius: 12px;
  letter-spacing: 1px;
  z-index: 2;
}

/* 3-Column Main Grid - Balanced Symmetrical Side Columns */
.dofus-main-grid {
  display: grid;
  grid-template-columns: 330px 1fr 330px;
  gap: 14px;
  padding: 14px 20px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 1200px) {
  .dofus-main-grid {
    grid-template-columns: 290px 1fr 290px;
    gap: 10px;
    padding: 10px 14px;
  }
}
    gap: 10px;
    padding: 10px 14px;
  }
}

@media (max-width: 960px) {
  .dofus-studio-container {
    height: auto;
    max-height: 96vh;
    overflow-y: auto;
  }
  .dofus-main-grid {
    grid-template-columns: 1fr;
    overflow-y: visible;
  }
}

/* Columns */
.dofus-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.dofus-col::-webkit-scrollbar {
  width: 5px;
}
.dofus-col::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.dofus-col::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.dofus-col::-webkit-scrollbar-thumb:hover {
  background: rgba(250, 204, 21, 0.4);
}

/* Card Box (Dofus Style Frame) */
.dofus-card-box {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.dofus-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.dofus-box-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #38bdf8;
  text-transform: uppercase;
}

.dofus-box-hint {
  font-size: 9.5px;
  color: #94a3b8;
  font-style: italic;
}

.dofus-box-val {
  font-size: 10.5px;
  font-weight: 700;
  color: #fbbf24;
}

/* Left Column: Class Pills */
.dofus-class-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.dofus-class-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(2, 6, 23, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  user-select: none;
}

.dofus-class-pill:hover {
  border-color: rgba(250, 204, 21, 0.6);
  transform: translateY(-2px);
  background: rgba(251, 191, 36, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dofus-class-pill.active {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.18);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.38);
}

.dofus-class-pill-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.dofus-class-pill:hover .dofus-class-pill-img {
  border-color: rgba(250, 204, 21, 0.8);
}

.dofus-class-pill.active .dofus-class-pill-img {
  border-color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.dofus-class-pill-name {
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.2;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dofus-class-pill.active .dofus-class-pill-name {
  color: #fef08a;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

/* Class Details & Stats */
.dofus-class-archetype-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.dofus-class-desc-text {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.4;
  margin-bottom: 8px;
}

.dofus-stats-compact-row {
  display: flex;
  justify-content: space-between;
  background: rgba(2, 6, 23, 0.6);
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10px;
  font-weight: 800;
}

/* Skills Grid in Dofus Studio (2 rows of 3) */
.dofus-skills-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 12px;
  justify-items: center;
  align-items: center;
  padding: 4px 6px;
}

/* Left Column: Companion Axie Selector */
.dofus-companion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.dofus-comp-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(2, 6, 23, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.dofus-comp-item:hover {
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-2px);
  background: rgba(56, 189, 248, 0.08);
}

.dofus-comp-item.active {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.dofus-comp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  object-fit: cover;
  margin-bottom: 4px;
  background: #090e1d;
}

.dofus-comp-item.active .dofus-comp-avatar {
  border-color: #34d399;
}

.dofus-comp-name {
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.dofus-comp-class-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
  flex-shrink: 0;
}

.dofus-comp-class {
  font-size: 9px;
  color: #94a3b8;
  margin-top: 1px;
}

/* Companion Skills Box */
.dofus-comp-skills-box {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(6, 78, 59, 0.14);
}

.dofus-comp-skills-box .dofus-box-title {
  color: #34d399;
}

.comp-skill-frame {
  border-color: rgba(52, 211, 153, 0.45);
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22) 0%, rgba(6, 30, 24, 0.95) 100%);
}

.comp-skill-icon-btn:hover .comp-skill-frame,
.comp-skill-icon-btn:focus-visible .comp-skill-frame {
  border-color: #34d399;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7), 0 0 12px rgba(52, 211, 153, 0.45);
}

.comp-skill-part-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.92);
  border: 1.2px solid rgba(245, 158, 11, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.75);
  pointer-events: none;
  z-index: 2;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.comp-skill-icon-btn:hover .comp-skill-part-badge,
.comp-skill-icon-btn:focus-visible .comp-skill-part-badge {
  transform: scale(1.15);
  border-color: #fde047;
}

.comp-skill-part-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.skill-tooltip-badge.skill-tooltip-part-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.22);
  color: #fde047;
  border: 1px solid rgba(245, 158, 11, 0.55);
  padding: 1px 6px;
  font-weight: 800;
}

.skill-tooltip-part-icon {
  width: 13px;
  height: 13px;
  object-fit: contain;
  vertical-align: middle;
}

/* Center Column: The Diorama Stage */
.dofus-center-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 4px 0;
  overflow: visible;
}

.dofus-diorama-class-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(250, 204, 21, 0.4);
  padding: 5px 18px;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  margin-bottom: 4px;
}

.dofus-diorama-constel-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.2px solid rgba(251, 191, 36, 0.6);
  object-fit: cover;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
  flex-shrink: 0;
}

.dofus-diorama-class-name {
  font-family: 'Impact', 'Arial Black', system-ui, sans-serif;
  font-size: 18px;
  letter-spacing: 1px;
  color: #fef08a;
  text-shadow: 0 2px 8px rgba(250, 204, 21, 0.4);
}



.dofus-diorama-viewport-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 380px;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 60%, rgba(30, 58, 138, 0.22) 0%, rgba(7, 11, 22, 0.65) 80%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dofus-3d-canvas-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dofus-rotation-controls {
  position: absolute;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
  background: rgba(2, 6, 23, 0.75);
  padding: 4px 14px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.dofus-rot-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.dofus-rot-btn:hover {
  background: rgba(250, 204, 21, 0.25);
  border-color: #facc15;
  color: #fef08a;
  transform: scale(1.1);
}

.dofus-rot-hint {
  font-size: 10px;
  color: #94a3b8;
  font-style: italic;
  user-select: none;
  pointer-events: none;
}



/* Center Bottom: Centered Epic Play Button */
.dofus-bottom-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

/* Name Field in Right Customization Column */
.dofus-name-card-box {
  margin-top: 2px;
}

.dofus-name-field-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.dofus-char-name-input {
  flex: 1;
  background: rgba(2, 6, 23, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  padding: 8px 12px;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dofus-char-name-input:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.dofus-dice-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.dofus-dice-btn:hover {
  background: rgba(251, 191, 36, 0.25);
  border-color: #fbbf24;
  transform: rotate(18deg) scale(1.1);
}

/* The Grand JUGAR Button (Dofus Style) */
.dofus-play-btn {
  position: relative;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 45%, #b45309 100%);
  border: 2px solid #fef08a;
  border-radius: 14px;
  padding: 12px 80px;
  min-width: 250px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(217, 119, 6, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  flex-shrink: 0;
  text-align: center;
}

.dofus-play-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.7), inset 0 2px 6px rgba(255, 255, 255, 0.6);
  border-color: #ffffff;
}

.dofus-play-btn:active {
  transform: translateY(1px) scale(0.98);
}

.dofus-play-text {
  font-family: 'Impact', 'Arial Black', system-ui, sans-serif;
  font-size: 19px;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Right Column: Customization Controls */
.dofus-randomize-all-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.dofus-randomize-all-btn:hover {
  background: rgba(251, 191, 36, 0.25);
  border-color: #fbbf24;
  color: #fef08a;
}

.dofus-gender-toggle-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.dofus-gender-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(2, 6, 23, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.dofus-gender-btn:hover {
  border-color: rgba(56, 189, 248, 0.5);
  color: #f8fafc;
}

.dofus-gender-btn.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.dofus-gender-sym {
  font-size: 14px;
}

/* Trait Selector Buttons (Hair, Eyes, Horns) */
.dofus-traits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

.dofus-traits-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 6px;
}

.dofus-trait-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(2, 6, 23, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 5px 8px;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dofus-trait-btn:hover {
  border-color: rgba(250, 204, 21, 0.5);
  color: #fff;
}

.dofus-trait-btn.active {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.18);
  color: #fef08a;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.25);
}



/* ==========================================================================
   Dofus Modular Customization: Visual Item Cards & RGB Full-Spectrum Picker
   ========================================================================== */
.dofus-item-cards-grid {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.grid-hair {
  grid-template-columns: repeat(4, 1fr);
}

.grid-eyes {
  grid-template-columns: repeat(3, 1fr);
}

.grid-horns {
  grid-template-columns: repeat(3, 1fr);
}

.dofus-item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px 3px 5px 3px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dofus-item-card:hover {
  border-color: rgba(250, 204, 21, 0.6);
  background: rgba(251, 191, 36, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.dofus-item-card.active {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.18);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.35);
}

.dofus-item-icon-box {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
  flex-shrink: 0;
}

.dofus-item-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  transition: transform 0.18s ease;
}

.dofus-item-card:hover .dofus-item-svg {
  transform: scale(1.12);
}

.dofus-item-card.active .dofus-item-svg {
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
}

.dofus-item-card-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #cbd5e1;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.dofus-item-card.active .dofus-item-card-label {
  color: #fef08a;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}

/* Intuitive Color Selector Bar & Revert Button */
.dofus-color-intuitive-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.dofus-color-picker-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.85));
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  user-select: none;
}

.dofus-color-picker-box:hover {
  border-color: rgba(250, 204, 21, 0.7);
  background: linear-gradient(135deg, rgba(40, 53, 76, 0.85), rgba(20, 30, 55, 0.95));
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 12px rgba(250, 204, 21, 0.15);
}

.dofus-color-swatch-glow {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6), inset 0 0 4px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  transition: background-color 0.15s ease, transform 0.18s ease;
}

.dofus-color-picker-box:hover .dofus-color-swatch-glow {
  transform: scale(1.1);
  border-color: #ffffff;
}

.dofus-color-box-texts {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 1px;
}

.dofus-color-box-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dofus-color-rainbow-icon {
  font-size: 13px;
  line-height: 1;
}

.dofus-color-action-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #f8fafc;
}

.dofus-color-value-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.dofus-color-value-badge.is-custom {
  font-family: monospace;
  color: #fef08a;
  text-shadow: 0 0 8px rgba(254, 240, 138, 0.3);
}

.dofus-color-value-badge.is-original {
  font-family: inherit;
  color: #38bdf8;
}

.dofus-color-open-arrow {
  font-size: 10px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.dofus-color-picker-box:hover .dofus-color-open-arrow {
  background: rgba(251, 191, 36, 0.25);
  border-color: #fbbf24;
  color: #fff;
  transform: translateX(1px);
}

.dofus-color-revert-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 5px 12px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  min-width: 64px;
  flex-shrink: 0;
}

.dofus-color-revert-btn:hover {
  border-color: rgba(56, 189, 248, 0.6);
  color: #f8fafc;
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-1px);
}

.dofus-color-revert-btn.active {
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.dofus-revert-icon {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

.dofus-revert-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.dofus-rgb-native-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
  margin: 0;
}


/* Panel 2: Personalización (Legacy compatibility) */
.char-custom-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}

@media (max-width: 820px) {
  .char-custom-grid {
    grid-template-columns: 1fr;
  }
}

.char-avatar-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.char-avatar-frame {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid #38bdf8;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(15, 23, 42, 0.9) 75%);
}

.char-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
}

.char-name-input-group {
  width: 100%;
  margin-bottom: 12px;
  text-align: left;
}

.char-name-label {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 5px;
  display: block;
}

.char-name-input {
  width: 100%;
  background: #0b1329;
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  padding: 8px 12px;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.char-name-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.char-gender-grid {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.char-gender-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: #0b1329;
  color: #94a3b8;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.char-gender-btn.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.char-gender-btn img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* Modular Customizer Styles (Horns, Eyes, Hair, Hat) */
.char-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
  margin-bottom: 12px;
}

.char-preview-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.char-trait-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(2, 6, 23, 0.65);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.char-trait-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-trait-title {
  font-size: 12px;
  font-weight: bold;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.char-trait-selected {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 600;
}

.char-trait-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px;
}

.char-trait-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.char-trait-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
}

.char-trait-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.char-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.8);
  color: #94a3b8;
  transition: all 0.2s ease;
}

.char-toggle-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

/* Wizard Navigation Bar */
.char-wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-wizard-prev {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-wizard-prev:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-wizard-next {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid #38bdf8;
  color: #ffffff;
  padding: 9px 22px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.btn-wizard-next:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.6);
}

.btn-wizard-finish {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1.5px solid #fbbf24;
  color: #ffffff;
  padding: 10px 26px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

.btn-wizard-finish:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.65);
}

/* Companion Card Selected State */
.hero-card.companion-active {
  border-color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.12) !important;
  box-shadow: 0 16px 35px rgba(251, 191, 36, 0.3) !important;
}

/* Confirmation Modal */
.start-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.start-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(6px);
}

.start-confirm-box {
  position: relative;
  z-index: 2;
  background: #0f172a;
  border: 1.5px solid rgba(239, 68, 68, 0.4);
  border-radius: 16px;
  padding: 24px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(239, 68, 68, 0.2);
}

.confirm-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.confirm-title {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 8px;
}

.confirm-msg {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.4;
  margin-bottom: 18px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.confirm-actions .btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: 1px solid #f87171;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.hud-title-btn {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde047;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-title-btn:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: #facc15;
}

.hud-sound-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-sound-btn:hover {
  background: rgba(56, 189, 248, 0.3);
  border-color: #38bdf8;
}

/* Strict Suppression of Overworld Modals & HUDs During Combat
   (Hito 74: el menú de Opciones —#settings-modal— sí se abre en combate: botón ⚙ del tablero o Esc) */
body.state-combat #inventory-modal,
body.state-combat #quest-book-modal,
body.state-combat #world-map-modal,
body.state-combat .inventory-modal,
body.state-combat .quest-book-modal,
body.state-combat .world-map-modal,
body.state-combat .overworld-hud-container,
body.state-combat #overworld-hud,
body.state-combat .squad-hud-container {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* ==========================================================================
   SETTINGS / OPTIONS MODAL
   ========================================================================== */
.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.settings-modal.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.settings-modal.fade-out {
  opacity: 0;
}

.settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 16, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.settings-container {
  position: relative;
  z-index: 1;
  width: 92%;
  max-width: 540px;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(10, 15, 29, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75), 0 0 30px rgba(56, 189, 248, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: settingsModalPop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes settingsModalPop {
  0% { transform: scale(0.92) translateY(12px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #38bdf8;
  text-transform: uppercase;
}

.settings-title {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.settings-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
  transform: rotate(90deg);
}

.settings-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 72vh;
  overflow-y: auto;
}

.settings-section {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.section-info h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
}

.section-info p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

/* Quality Preset Buttons */
.quality-selector-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quality-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quality-btn .q-icon {
  font-size: 18px;
}

.quality-btn .q-name {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}

.quality-btn .q-sub {
  font-size: 10px;
  color: #64748b;
}

.quality-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
}

.quality-btn.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(2, 132, 199, 0.38));
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}

.quality-btn.active .q-name {
  color: #38bdf8;
}

.quality-btn.active .q-sub {
  color: #bae6fd;
}

/* Audio Sliders */
.audio-sliders-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.audio-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-label-col {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slider-name {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}

.slider-val-badge {
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  min-width: 44px;
  text-align: center;
}

.settings-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 7px;
  border-radius: 4px;
  background: rgba(30, 41, 59, 0.9);
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.2s;
}

.settings-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.settings-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #7dd3fc;
}

.settings-range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  cursor: pointer;
  border: none;
}

.audio-mute-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-mute-toggle-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.settings-mute-toggle-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
}

.settings-mute-toggle-btn.is-muted {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.settings-mute-toggle-btn.is-muted:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
}

/* Exit Section */
.exit-section {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.04);
}

.settings-exit-btn {
  width: 100%;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(185, 28, 28, 0.35));
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fecaca;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.settings-exit-btn:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.4), rgba(185, 28, 28, 0.55));
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

/* Modal Footer */
.settings-footer {
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: flex-end;
}

.settings-resume-btn {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid #38bdf8;
  color: #ffffff;
  padding: 9px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.settings-resume-btn:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.55);
}

.hud-options-btn {
  background: rgba(14, 165, 233, 0.25);
  border-color: rgba(56, 189, 248, 0.5);
  color: #7dd3fc;
  white-space: nowrap;
}

.hud-options-btn:hover {
  background: rgba(14, 165, 233, 0.5);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

/* ==========================================================================
   Zone Transition & Biome Loading Screen (GPU Composited)
   ========================================================================== */
.zone-curtain {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  background: radial-gradient(circle at center, #111827 0%, #030712 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  will-change: opacity;
  transform: translateZ(0);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.zone-curtain.active {
  opacity: 1;
  pointer-events: all;
}

.zone-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  user-select: none;
  max-width: 440px;
  width: 90%;
  will-change: transform;
  transform: translateZ(0);
  animation: zoneCurtainFloat 2.4s ease-in-out infinite alternate;
}

@keyframes zoneCurtainFloat {
  0% { transform: translateY(0px) translateZ(0); }
  100% { transform: translateY(-6px) translateZ(0); }
}

.zone-loading-runic-emblem {
  position: relative;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.zone-loading-orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #22c55e;
  border-bottom-color: #38bdf8;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: strict;
  animation: zoneSpinnerRotate 1.0s linear infinite;
}

@keyframes zoneSpinnerRotate {
  0% { transform: rotate(0deg) translateZ(0); }
  100% { transform: rotate(360deg) translateZ(0); }
}

.zone-loading-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.3) 0%, transparent 70%);
  filter: blur(10px);
}

.zone-loading-icon {
  font-size: 38px;
  z-index: 2;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.6));
}

.zone-loading-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #22c55e;
  margin-bottom: 6px;
  text-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.zone-loading-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #f8fafc;
  margin: 0 0 6px 0;
  text-shadow: 0 4px 16px rgba(0,0,0,0.8);
}

.zone-loading-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 22px;
}

.zone-loading-bar-track {
  width: 240px;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
  margin-bottom: 12px;
}

.zone-loading-bar-fill {
  position: absolute;
  inset: 0;
  width: 50%;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  animation: zoneLoadingBarSweep 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes zoneLoadingBarSweep {
  0% { transform: translateX(-100%) scaleX(0.7) translateZ(0); }
  50% { transform: translateX(50%) scaleX(1.1) translateZ(0); }
  100% { transform: translateX(200%) scaleX(0.7) translateZ(0); }
}

.zone-loading-hint {
  font-size: 12px;
  color: #64748b;
  letter-spacing: 0.3px;
}

/* Hide grass / Demo_Scena debug evaluador button */
#btn-fab-open,
.hud-fab-toggle {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}





