/* ============================================================
   SHADOW RPG — Dark Terminal-Luxe Theme
   ============================================================ */

:root {
  /* Core palette */
  --bg-deep: #0a0a0f;
  --bg-main: #111118;
  --bg-card: #181822;
  --bg-elevated: #1f1f2e;
  --bg-hover: #252538;

  /* Text */
  --text-primary: #e8e6f0;
  --text-secondary: #9896a8;
  --text-muted: #5c5a6e;

  /* Accent colors */
  --accent-primary: #7c5cbf;
  --accent-primary-glow: #9d7de8;
  --accent-success: #2ecc71;
  --accent-danger: #e74c3c;
  --accent-warning: #f39c12;
  --accent-info: #3498db;
  --accent-gold: #f1c40f;

  /* HP/SP/XP bars */
  --hp-color: #e74c3c;
  --hp-bg: #3d1515;
  --sp-color: #3498db;
  --sp-bg: #152a3d;
  --xp-color: #9b59b6;
  --xp-bg: #2a1540;

  /* Rarity */
  --rarity-common: #9ca3af;
  --rarity-uncommon: #22c55e;
  --rarity-rare: #3b82f6;
  --rarity-epic: #a855f7;

  /* Layout */
  --sidebar-width: 220px;
  --border-radius: 8px;
  --transition: 0.15s ease;

  /* Fonts */
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── RESET ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-deep);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ─────────────────────────────────────────────── */
#game-container {
  display: flex;
  height: 100vh;
  max-width: 1500px;
  margin: 0 auto;
}

#game-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-main);
  border-right: 1px solid rgba(124, 92, 191, 0.15);
  overflow-y: auto;
  padding: 0;
}

#game-main {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  background: var(--bg-deep);
  scrollbar-width: thin;
  scrollbar-color: var(--bg-elevated) var(--bg-deep);
}

#game-main::-webkit-scrollbar {
  width: 6px;
}

#game-main::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

#game-main::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 3px;
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar-content {
  padding: 16px 14px;
}

.sidebar-name {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-primary-glow);
  margin-bottom: 2px;
}

.sidebar-job {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.bar-group {
  display: grid;
  grid-template-columns: 24px 1fr 60px;
  align-items: center;
  gap: 6px;
}

.bar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.bar-track {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.hp-fill {
  background: linear-gradient(90deg, var(--hp-color), #ff6b6b);
}

.sp-fill {
  background: linear-gradient(90deg, var(--sp-color), #5dade2);
}

.xp-fill {
  background: linear-gradient(90deg, var(--xp-color), #c39bd3);
}

.bar-value {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  text-align: right;
}

.sidebar-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-stats div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.sidebar-status {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.status-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.status-poison {
  background: #1a3a1a;
  color: #44cc44;
}

.status-burn {
  background: #3a1a1a;
  color: #ff6644;
}

.status-stun {
  background: #3a3a1a;
  color: #ffcc44;
}

.status-slow {
  background: #1a2a3a;
  color: #44aaff;
}

.sidebar-alert {
  margin-top: 10px;
  padding: 6px 8px;
  background: rgba(157, 125, 232, 0.15);
  border: 1px solid rgba(157, 125, 232, 0.3);
  border-radius: var(--border-radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary-glow);
  text-align: center;
  animation: pulse 2s infinite;
}

.sidebar-alert.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-alert.clickable:hover {
  background: rgba(157, 125, 232, 0.25);
  border-color: rgba(157, 125, 232, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(157, 125, 232, 0.2);
}

.sidebar-quirk {
  margin-top: 8px;
  padding: 4px 8px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-gold);
  text-align: center;
  letter-spacing: 1px;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius);
  cursor: pointer;
  background: var(--bg-elevated);
  color: var(--text-primary);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-lg {
  font-size: 16px;
  padding: 12px 28px;
}

.btn-xs {
  font-size: 11px;
  padding: 3px 8px;
}

.btn-primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary-glow);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-primary-glow);
  box-shadow: 0 0 15px rgba(124, 92, 191, 0.3);
}

.btn-secondary {
  background: var(--bg-card);
}

.btn-success {
  background: rgba(46, 204, 113, 0.15);
  border-color: rgba(46, 204, 113, 0.3);
  color: var(--accent-success);
}

.btn-success:hover:not(:disabled) {
  background: rgba(46, 204, 113, 0.25);
}

.btn-info {
  background: rgba(52, 152, 219, 0.15);
  border-color: rgba(52, 152, 219, 0.3);
  color: var(--accent-info);
}

.btn-danger {
  background: rgba(231, 76, 60, 0.15);
  border-color: rgba(231, 76, 60, 0.3);
  color: var(--accent-danger);
}

.btn-accent {
  background: rgba(241, 196, 15, 0.1);
  border-color: rgba(241, 196, 15, 0.2);
  color: var(--accent-gold);
}

/* ── TITLE SCREEN ───────────────────────────────────────── */
.title-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  background-color: #0a0a12;
  background-size: 100% auto;
  background-position: center top;
  background-repeat: no-repeat;
}

.title-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 24px 32px;
  width: 100%;
  background: linear-gradient(to bottom,
      transparent 0%,
      rgba(10, 10, 18, 0.6) 30%,
      rgba(10, 10, 18, 0.95) 100%);
}

.title-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 6px;
  text-transform: uppercase;
}

.title-ai-hint {
  font-size: 11px;
  opacity: 0.4;
  text-align: center;
  max-width: 400px;
}

.title-menu {
  display: flex;
  gap: 16px;
}

/* ── CHARACTER CREATION ─────────────────────────────────── */
.create-screen {
  max-width: 700px;
  margin: 0 auto;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--accent-primary-glow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 16px;
  outline: none;
  transition: border-color var(--transition);
}

.input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(124, 92, 191, 0.2);
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.job-card {
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.job-card:hover {
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.12);
}

.job-card.selected {
  border-color: var(--accent-primary);
  background: rgba(124, 92, 191, 0.1);
  box-shadow: 0 0 15px rgba(124, 92, 191, 0.15);
}

.job-card h3 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.job-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.job-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.stat-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(157, 125, 232, 0.15);
  border-radius: 4px;
  color: var(--accent-primary-glow);
}

.job-passive {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── EXPLORE ────────────────────────────────────────────── */
.explore-screen {
  max-width: 700px;
}

.location-header {
  margin-bottom: 20px;
}

.zone-name {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.location-header h2 {
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.area-desc {
  color: var(--text-secondary);
  font-style: italic;
}

.message-box {
  padding: 12px 16px;
  background: var(--bg-card);
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin-bottom: 16px;
  color: var(--text-primary);
  line-height: 1.6;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.travel-section {
  margin-top: 8px;
}

.travel-section h3 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.travel-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-travel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 14px;
  text-align: left;
}

.btn-travel .travel-name {
  font-weight: 600;
}

.btn-travel .travel-zone {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-travel .travel-lock {
  font-size: 10px;
  color: var(--accent-warning);
}

.btn-travel.locked {
  opacity: 0.5;
  border-color: rgba(243, 156, 18, 0.2);
}

.boss-warning {
  padding: 12px 16px;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.25);
  border-radius: var(--border-radius);
  color: var(--accent-danger);
  font-weight: 500;
  margin-top: 16px;
}

/* SHADOW Threat Indicator */
.shadow-threat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shadow-threat strong {
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.shadow-threat-text {
  font-size: 12px;
  font-style: italic;
  opacity: 0.85;
}

.shadow-threat-dormant {
  background: rgba(46, 204, 113, 0.08);
  border-color: rgba(46, 204, 113, 0.2);
  color: var(--accent-success);
}

.shadow-threat-stirring {
  background: rgba(241, 196, 15, 0.08);
  border-color: rgba(241, 196, 15, 0.25);
  color: var(--accent-warning);
  animation: shadow-pulse 3s ease-in-out infinite;
}

.shadow-threat-awakening {
  background: rgba(243, 156, 18, 0.1);
  border-color: rgba(243, 156, 18, 0.3);
  color: #f39c12;
  animation: shadow-pulse 2s ease-in-out infinite;
}

.shadow-threat-raging {
  background: rgba(231, 76, 60, 0.12);
  border-color: rgba(231, 76, 60, 0.35);
  color: var(--accent-danger);
  animation: shadow-pulse 1.5s ease-in-out infinite;
}

@keyframes shadow-pulse {

  0%,
  100% {
    box-shadow: 0 0 6px rgba(231, 76, 60, 0.1);
  }

  50% {
    box-shadow: 0 0 16px rgba(231, 76, 60, 0.3);
  }
}

/* ── COMBAT ─────────────────────────────────────────────── */
.combat-screen {
  max-width: 900px;
}

/* ── Two-Panel Arena ──────────────────────────────────────── */
.combat-arena {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  min-height: 200px;
}

.combat-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--border-radius);
  background: var(--bg-card);
}

.hero-side {
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-right: none;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.shadow-side {
  flex: 1;
  border: 1px solid rgba(231, 76, 60, 0.15);
  border-left: none;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.side-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-label {
  color: rgba(56, 189, 248, 0.8);
}

.shadow-label {
  color: rgba(231, 76, 60, 0.8);
}

.side-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ── VS Divider ──────────────────────────────────────────── */
.vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(180deg,
      transparent 0%,
      rgba(255, 255, 255, 0.03) 20%,
      rgba(255, 255, 255, 0.06) 50%,
      rgba(255, 255, 255, 0.03) 80%,
      transparent 100%);
}

.vs-divider::before {
  content: '';
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg,
      transparent,
      rgba(255, 255, 255, 0.12) 30%,
      rgba(255, 255, 255, 0.12) 70%,
      transparent);
}

.vs-badge {
  font-size: 18px;
  color: var(--text-muted);
  z-index: 1;
  background: var(--bg-main);
  padding: 4px;
  border-radius: 50%;
}

/* ── Character Card (shared: player, companion, enemy) ──── */
.char-card {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(20, 20, 35, 0.5);
  transition: all 0.2s ease;
  position: relative;
}

.char-name {
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.char-portrait {
  font-size: 16px;
}

.boss-name {
  color: var(--accent-warning) !important;
  text-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}

.hero-card {
  border-color: rgba(56, 189, 248, 0.12);
}

.companion-card {
  border-color: rgba(46, 204, 113, 0.12);
}

.companion-hp-fill {
  background: linear-gradient(90deg, #2ecc71, #27ae60) !important;
}

/* ── Boss Portrait in Combat ────────────────────────────── */
.boss-portrait-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.boss-portrait-img {
  width: 400px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(255, 215, 0, 0.6);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3),
    0 0 24px rgba(255, 215, 0, 0.1);
  animation: boss-portrait-glow 3s ease-in-out infinite alternate;
}

/* ── Hero Portrait in Combat ────────────────────────────── */
.hero-portrait-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.hero-portrait-img {
  width: 400px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3),
    0 0 24px rgba(56, 189, 248, 0.1);
  animation: hero-portrait-glow 3s ease-in-out infinite alternate;
}

@keyframes hero-portrait-glow {
  from {
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3), 0 0 24px rgba(56, 189, 248, 0.1);
  }

  to {
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.5), 0 0 36px rgba(56, 189, 248, 0.2);
  }
}

@keyframes boss-portrait-glow {
  from {
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.3), 0 0 24px rgba(255, 215, 0, 0.1);
  }

  to {
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.5), 0 0 36px rgba(255, 215, 0, 0.2);
  }
}

/* ── Enemy Card (extends char-card) ──────────────────────── */
.enemy-card {
  cursor: pointer;
  border-color: rgba(231, 76, 60, 0.1);
}

.enemy-card:hover:not(.dead) {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(30, 30, 50, 0.8);
}

.enemy-card.targeted {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(56, 189, 248, 0.06);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15),
    inset 0 0 6px rgba(56, 189, 248, 0.04);
  animation: target-pulse 2s ease-in-out infinite;
}

.target-badge {
  font-size: 12px;
  margin-left: auto;
}

.dead-badge {
  font-size: 14px;
  margin-left: auto;
}

@keyframes target-pulse {

  0%,
  100% {
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.1);
  }

  50% {
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
  }
}

.enemy-card.dead {
  opacity: 0.3;
  cursor: default;
  filter: grayscale(0.7);
}

.enemy-card.dead .char-name {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ── Corruption Bar ──────────────────────────────────────── */
.corruption-bar {
  height: 8px;
  background: rgba(147, 51, 234, 0.1);
  border: 1px solid rgba(147, 51, 234, 0.2);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  margin-bottom: 4px;
}

.corruption-fill {
  height: 100%;
  background: linear-gradient(90deg, #9333ea, #ec4899);
  transition: width 0.4s ease;
  border-radius: 5px;
}

.corruption-fill.corruption-critical {
  animation: corruption-pulse 1.2s ease-in-out infinite;
}

@keyframes corruption-pulse {

  0%,
  100% {
    box-shadow: 0 0 4px rgba(236, 72, 153, 0.4);
    filter: brightness(1);
  }

  50% {
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.8);
    filter: brightness(1.3);
  }
}

.corruption-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  z-index: 2;
}

/* Seduced enemy card */
.enemy-card.seduced {
  opacity: 0.5;
  cursor: default;
  border-color: rgba(147, 51, 234, 0.3);
  background: rgba(147, 51, 234, 0.06);
}

.enemy-card.seduced .char-name {
  color: #c084fc;
  font-style: italic;
}

.seduced-badge {
  font-size: 12px;
  margin-left: auto;
  color: #c084fc;
  font-weight: 700;
}

/* Player corruption/seduction card */
.player-corruption-card {
  border-color: rgba(236, 72, 153, 0.3) !important;
  background: rgba(236, 72, 153, 0.06) !important;
}

.corruption-warning {
  font-size: 11px;
  font-weight: 700;
  color: #ec4899;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.player-corruption-bar {
  height: 10px;
  border-color: rgba(236, 72, 153, 0.3);
}

/* Seduction victory header */
.victory-seduced {
  border-color: rgba(147, 51, 234, 0.3) !important;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.08), rgba(236, 72, 153, 0.08)) !important;
}

.victory-seduced .victory-title {
  background: linear-gradient(90deg, #c084fc, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Seduction Phase Animations ──────────────────────────── */
/* Phase 1: soft pink glow — distracted */
.enemy-card.seduce-phase-1 {
  border-color: rgba(236, 72, 153, 0.2);
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.1);
}

/* Phase 2: heartbeat pulse — weakening */
.enemy-card.seduce-phase-2 {
  border-color: rgba(236, 72, 153, 0.35);
  animation: seduce-heartbeat 1.2s ease-in-out infinite;
}

@keyframes seduce-heartbeat {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.15);
    transform: scale(1);
  }

  15% {
    box-shadow: 0 0 16px rgba(236, 72, 153, 0.35);
    transform: scale(1.01);
  }

  30% {
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.15);
    transform: scale(1);
  }

  45% {
    box-shadow: 0 0 14px rgba(236, 72, 153, 0.3);
    transform: scale(1.008);
  }

  60% {
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.15);
    transform: scale(1);
  }
}

/* Phase 3: deep blush + tremble — wavering */
.enemy-card.seduce-phase-3 {
  border-color: rgba(236, 72, 153, 0.5);
  background: rgba(236, 72, 153, 0.08) !important;
  animation: seduce-tremble 0.3s ease-in-out infinite;
}

@keyframes seduce-tremble {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-1px);
  }

  75% {
    transform: translateX(1px);
  }
}

/* Phase 4: shimmering dissolve — climax */
.enemy-card.seduce-phase-4 {
  border-color: rgba(236, 72, 153, 0.6);
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.12), rgba(236, 72, 153, 0.12)) !important;
  animation: seduce-climax 1.5s ease-in-out infinite;
}

@keyframes seduce-climax {

  0%,
  100% {
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.3), 0 0 24px rgba(147, 51, 234, 0.15);
    filter: brightness(1);
  }

  50% {
    box-shadow: 0 0 24px rgba(236, 72, 153, 0.6), 0 0 48px rgba(147, 51, 234, 0.3);
    filter: brightness(1.15);
  }
}

/* Seduction phase label on corruption bar */
.corruption-phase-label {
  position: absolute;
  top: -14px;
  right: 0;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ec4899;
}

/* ── Thought Bubble (Seduction Dialogue) ─────────────────── */
.thought-bubble {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  z-index: 100;
  max-width: 280px;
  min-width: 120px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(30, 10, 30, 0.95), rgba(50, 15, 40, 0.95));
  border: 2px solid rgba(236, 72, 153, 0.5);
  border-radius: 16px;
  color: #fda4af;
  font-size: 12px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.25),
    0 0 40px rgba(147, 51, 234, 0.1);
  animation: bubble-pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: none;
}

/* Bubble tail — pointing down to the enemy */
.thought-bubble::after {
  content: '';
  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 rgba(236, 72, 153, 0.5);
}

/* Inner tail for background color match */
.thought-bubble::before {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(40, 12, 35, 0.95);
  z-index: 1;
}

@keyframes bubble-pop-in {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-80%) scale(0.3);
  }

  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(-105%) scale(1.05);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(-100%) scale(1);
  }
}

/* ── Character Stats Row ─────────────────────────────────── */
.char-stats-row {
  display: flex;
  gap: 8px;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
}

.char-stat {
  color: var(--text-secondary);
}

.iteration-tag {
  color: var(--accent-warning);
  font-weight: 600;
}

/* ── Boss Equipment Display (Arms Race) ──────────────────── */
.boss-equip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 4px 6px;
  background: rgba(231, 76, 60, 0.04);
  border: 1px solid rgba(231, 76, 60, 0.1);
  border-radius: 6px;
}

.boss-equip-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.boss-equip-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 600;
  border: 1px solid;
  border-radius: 4px;
  cursor: help;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.3);
}

.boss-equip-badge:hover {
  background: rgba(0, 0, 0, 0.6);
  filter: brightness(1.3);
  box-shadow: 0 0 8px currentColor;
  transform: translateY(-1px);
}

/* ── Status Effects ──────────────────────────────────────── */
.status-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.status-icon {
  font-size: 11px;
  cursor: help;
}

/* ── Enemy Intent ────────────────────────────────────────── */
.enemy-intent {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
}

.intent-icon {
  font-size: 12px;
}

/* ── Combat Items Grid ───────────────────────────────────── */
.combat-items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.combat-item-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-family: var(--font-ui);
  font-size: 11px;
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.2);
  border-radius: 6px;
  color: var(--accent-success);
  cursor: pointer;
  transition: all 0.15s ease;
}

.combat-item-btn:hover {
  background: rgba(46, 204, 113, 0.2);
  border-color: rgba(46, 204, 113, 0.4);
}

.combat-item-name {
  font-weight: 500;
}

.combat-item-qty {
  font-family: var(--font-mono);
  font-size: 9px;
  opacity: 0.7;
}

/* ── Enemy Skills Grid ────────────────────────────────────── */
.enemy-skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.enemy-skill-tag {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  font-size: 10px;
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.15);
  border-radius: 5px;
  color: var(--text-secondary);
}

.enemy-skill-tag.enemy-skill-aoe {
  border-color: rgba(249, 115, 22, 0.25);
  background: rgba(249, 115, 22, 0.06);
}

.enemy-skill-icon {
  font-size: 12px;
}

.enemy-skill-name {
  font-weight: 500;
}

.enemy-skill-cost {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(231, 76, 60, 0.6);
}

/* Enemy SP bar variant */
.enemy-sp-fill {
  background: linear-gradient(90deg, #9b59b6, #8e44ad) !important;
}

/* ── AoE Skill Card Variant ──────────────────────────────── */
.card-aoe {
  border-color: rgba(249, 115, 22, 0.3) !important;
}

.card-aoe::before {
  background: rgba(249, 115, 22, 0.5) !important;
}

.card-aoe:hover:not(.card-disabled) {
  background: rgba(249, 115, 22, 0.08);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.15);
}

.hp-bar,
.sp-bar {
  height: 16px;
  background: var(--hp-bg);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  margin-bottom: 4px;
}

.sp-bar {
  background: var(--sp-bg);
  height: 6px;
}

.hp-bar .hp-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.sp-bar .sp-fill {
  height: 100%;
}

.enemy-hp .hp-fill {
  background: linear-gradient(90deg, #e74c3c, #c0392b) !important;
}

.hp-text,
.sp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  z-index: 2;
}

.sp-text {
  font-size: 7px;
}

/* ── Zone Mechanic Stacks ────────────────────────────────── */
.zone-stacks {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 10px;
  background: rgba(20, 20, 35, 0.85);
  border: 1px solid;
  border-radius: var(--border-radius);
  backdrop-filter: blur(4px);
  animation: zone-pulse 2s ease-in-out infinite;
}

@keyframes zone-pulse {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(124, 92, 191, 0.2);
  }

  50% {
    box-shadow: 0 0 16px rgba(124, 92, 191, 0.4);
  }
}

.zone-stack-icon {
  font-size: 1.4rem;
}

.zone-stack-count {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.3rem;
  min-width: 24px;
  text-align: center;
}

.zone-stack-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.zone-stack-desc {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-left: auto;
  font-style: italic;
}

/* ── Equipment UI Polish ─────────────────────────────────── */
.equip-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  margin-bottom: 4px;
}

.equip-slot .item-stats {
  font-size: 0.75rem;
  color: var(--accent-success);
  margin-left: auto;
}

.equip-slot .item-tradeoffs {
  font-size: 0.75rem;
  color: var(--accent-danger);
}

.item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  margin-bottom: 3px;
}

.item-row .item-stats {
  font-size: 0.72rem;
  color: var(--text-secondary);
  flex: 1;
}

.item-row .stat-bonus {
  color: var(--accent-success);
}

.item-row .stat-penalty {
  color: var(--accent-danger);
}

.combat-log {
  background: var(--bg-main);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 12px 16px;
  height: 220px;
  overflow-y: auto;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  scrollbar-width: thin;
}

.log-entry {
  margin-bottom: 2px;
}

.log-encounter {
  color: var(--accent-warning);
  font-weight: 600;
}

.log-damage {
  color: var(--accent-info);
}

.log-crit {
  color: var(--accent-gold);
  font-weight: 700;
}

.log-enemyDamage {
  color: var(--accent-danger);
}

.log-miss {
  color: var(--text-muted);
  font-style: italic;
}

.log-dodge {
  color: var(--accent-success);
}

.log-heal {
  color: var(--accent-success);
}

.log-enemyHeal {
  color: #e8a87c;
}

.log-buff {
  color: var(--accent-primary-glow);
}

.log-debuff {
  color: var(--accent-info);
}

.log-status {
  color: var(--accent-warning);
}

.log-playerStatus {
  color: var(--accent-danger);
}

.log-dot {
  color: #e8a87c;
}

.log-item {
  color: var(--accent-success);
}

.log-defend {
  color: var(--accent-info);
}

.log-flee {
  color: var(--text-secondary);
}

.log-warning {
  color: var(--accent-warning);
}

.log-error {
  color: var(--accent-danger);
}

/* ── Companion Death Scene ──────────────────────────────── */
.log-companionDeath {
  color: #ff4444;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 0;
}

.log-shadowNarration {
  color: var(--accent-primary-glow);
  font-style: italic;
  font-size: 13px;
  padding: 2px 0;
  animation: shadow-narration-pulse 3s ease-in-out infinite;
}

@keyframes shadow-narration-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.log-companionLastWords {
  color: var(--text-secondary);
  font-style: italic;
  padding: 2px 0 4px;
}

.log-companionDeathInfo {
  color: var(--text-muted);
  font-size: 11px;
}

.log-companionDeathDivider {
  color: rgba(231, 76, 60, 0.4);
  font-size: 10px;
  letter-spacing: 2px;
}

.log-companionDeathSpacer {
  height: 8px;
}

.log-companionHit {
  color: #ff8888;
}

.log-companionDamage {
  color: #88ccff;
}

.log-victory {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 14px;
}

.log-xp {
  color: var(--xp-color);
}

.log-gold {
  color: var(--accent-gold);
}

.log-loot {
  color: var(--rarity-uncommon);
  font-weight: 600;
}

.log-boss_victory {
  color: var(--accent-gold);
  font-weight: 700;
}

.log-levelup {
  color: var(--accent-primary-glow);
  font-weight: 700;
  font-size: 14px;
}

.log-death {
  color: var(--accent-danger);
  font-weight: 700;
  font-size: 16px;
}

.log-regen {
  color: #88cc88;
}

.log-corruption {
  color: #c084fc;
  font-weight: 600;
}

.log-corruption_tax {
  color: #ef4444;
  font-style: italic;
  opacity: 0.85;
}

.log-seduction {
  color: #ec4899;
  font-weight: 600;
  font-style: italic;
}

.log-seduction_phase {
  color: #f472b6;
  font-style: italic;
  font-weight: 600;
  padding: 2px 0;
  text-shadow: 0 0 6px rgba(236, 72, 153, 0.3);
}

.log-seduction_climax {
  color: #ec4899;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 0;
  text-shadow: 0 0 12px rgba(236, 72, 153, 0.5);
  line-height: 1.4;
}

.log-debuff {
  color: #f59e0b;
  font-size: 11px;
  opacity: 0.85;
}

.log-seduction_dialogue {
  color: #fda4af;
  font-weight: 600;
  font-style: italic;
  font-size: 12px;
  padding: 3px 8px;
  margin: 2px 0;
  border-left: 3px solid rgba(236, 72, 153, 0.5);
  background: rgba(236, 72, 153, 0.06);
  border-radius: 0 6px 6px 0;
  line-height: 1.4;
}

.log-shield {
  color: var(--accent-info);
}

.log-enemyBuff {
  color: #e8a87c;
}

.log-shadow {
  color: #d4a5ff;
  font-style: italic;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(157, 125, 232, 0.4);
}

.combat-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0 0;
  justify-content: center;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 90px;
  min-height: 100px;
  padding: 10px 6px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px 10px 0 0;
}

.skill-card:hover:not(.card-disabled) {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.card-icon {
  font-size: 24px;
  line-height: 1;
}

.card-name {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.2;
}

.card-cost {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--sp-color);
  padding: 2px 6px;
  background: var(--sp-bg);
  border-radius: 4px;
}

.card-type {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Card variants */
.card-attack {
  border-color: rgba(231, 76, 60, 0.2);
}

.card-attack::before {
  background: rgba(231, 76, 60, 0.5);
}

.card-attack:hover {
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.4);
  box-shadow: 0 8px 24px rgba(231, 76, 60, 0.15);
}

.card-attack .card-cost {
  background: rgba(231, 76, 60, 0.15);
  color: #ff6b6b;
}

.card-defend {
  border-color: rgba(52, 152, 219, 0.2);
}

.card-defend::before {
  background: rgba(52, 152, 219, 0.5);
}

.card-defend:hover {
  background: rgba(52, 152, 219, 0.1);
  border-color: rgba(52, 152, 219, 0.4);
  box-shadow: 0 8px 24px rgba(52, 152, 219, 0.15);
}

.card-defend .card-cost {
  background: rgba(52, 152, 219, 0.15);
  color: #5dade2;
}

.card-skill {
  border-color: rgba(157, 125, 232, 0.2);
}

.card-skill::before {
  background: rgba(157, 125, 232, 0.5);
}

.card-skill:hover:not(.card-disabled) {
  background: rgba(157, 125, 232, 0.1);
  border-color: rgba(157, 125, 232, 0.4);
  box-shadow: 0 8px 24px rgba(157, 125, 232, 0.15);
}

.card-item {
  border-color: rgba(46, 204, 113, 0.2);
}

.card-item::before {
  background: rgba(46, 204, 113, 0.5);
}

.card-item:hover {
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.4);
  box-shadow: 0 8px 24px rgba(46, 204, 113, 0.15);
}

.card-item .card-cost {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.card-flee {
  border-color: rgba(255, 255, 255, 0.05);
  opacity: 0.7;
}

.card-flee:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.15);
}

.card-flee .card-cost {
  background: transparent;
  color: var(--text-muted);
}

.card-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

.card-disabled .card-cost {
  color: var(--accent-danger);
  background: rgba(231, 76, 60, 0.15);
}

/* ── Combat Items Section ──────────────────────────────── */
.combat-items {
  margin-top: 8px;
  padding: 8px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.combat-items-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  padding-left: 2px;
}

.combat-items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.combat-item-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.2);
  border-radius: 20px;
  color: #2ecc71;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.combat-item-btn:hover {
  background: rgba(46, 204, 113, 0.18);
  border-color: rgba(46, 204, 113, 0.4);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.15);
  transform: translateY(-1px);
}

.combat-item-name {
  color: var(--text-primary);
}

.combat-item-qty {
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.7;
}

/* Status effect icons */
.status-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  min-height: 20px;
}

.status-icon {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: var(--text-secondary);
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

/* Enemy intent */
.enemy-intent {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 10px;
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.15);
  border-radius: 6px;
  font-size: 12px;
}

.intent-icon {
  font-size: 16px;
}

.intent-label {
  color: var(--accent-danger);
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 10px;
}

/* Combat log animation */
.log-new {
  animation: logFadeIn 0.4s ease-out;
}

@keyframes logFadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}


/* ── EVENTS ─────────────────────────────────────────────── */
.event-screen {
  max-width: 600px;
  margin: 0 auto;
}

.event-title {
  font-size: 20px;
  color: var(--accent-primary-glow);
  margin-bottom: 12px;
}

.event-text {
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 24px;
  font-size: 15px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--accent-primary);
}

.event-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-event-choice {
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-event-choice:hover:not(:disabled) {
  border-color: var(--accent-primary);
  background: rgba(124, 92, 191, 0.1);
}

.btn-event-choice.unavailable {
  opacity: 0.3;
  text-decoration: line-through;
}

/* ── SHOP ───────────────────────────────────────────────── */
.shop-screen {
  max-width: 700px;
}

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

.btn-back-subtle {
  font-size: 12px;
  padding: 4px 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-ui);
}

.btn-back-subtle:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.gold-display {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent-gold);
  margin-bottom: 16px;
}

.discount {
  font-size: 12px;
  color: var(--accent-success);
  margin-left: 8px;
}

.shop-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.shop-buy h3,
.shop-sell h3 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.item-list {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition);
  gap: 8px;
}

.item-row:hover {
  background: var(--bg-hover);
}

.item-row.cant-afford {
  opacity: 0.4;
  cursor: not-allowed;
}

.item-name {
  font-size: 13px;
  font-weight: 500;
}

.item-price {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-gold);
  white-space: nowrap;
}

.item-stats {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  flex: 1;
  text-align: right;
}

.empty {
  color: var(--text-muted);
  font-style: italic;
  font-size: 12px;
  padding: 12px;
  text-align: center;
}

/* ── ITEM DETAIL PANEL (Shop) ──────────────────────────── */
.item-row.selected {
  background: rgba(124, 92, 191, 0.15);
  border-left: 3px solid var(--accent-primary);
  padding-left: 7px;
}

.item-detail-panel {
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  animation: detailSlideIn 0.3s ease-out;
}

.item-detail-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.item-detail-panel[data-rarity="common"]::before {
  background: var(--rarity-common);
}

.item-detail-panel[data-rarity="uncommon"]::before {
  background: var(--rarity-uncommon);
}

.item-detail-panel[data-rarity="rare"]::before {
  background: var(--rarity-rare);
}

.item-detail-panel[data-rarity="epic"]::before {
  background: var(--rarity-epic);
}

.item-detail-panel[data-rarity="uncommon"] {
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.06);
}

.item-detail-panel[data-rarity="rare"] {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.08);
}

.item-detail-panel[data-rarity="epic"] {
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.1);
}

@keyframes detailSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.detail-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.detail-rarity-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.detail-slot-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.detail-description {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border-left: 2px solid rgba(255, 255, 255, 0.06);
}

.detail-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-section {
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-section-title.stats-title {
  color: var(--accent-success);
}

.detail-section-title.tradeoff-title {
  color: var(--accent-danger);
}

.detail-section-title.effect-title {
  color: var(--accent-warning);
}

.detail-section-title.use-title {
  color: var(--accent-info);
}

/* ── Scroll Skill Detail Card ──────────────────────────── */
.scroll-skill-card {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
}

.scroll-skill-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.scroll-skill-icon {
  font-size: 16px;
}

.scroll-skill-name {
  font-weight: 700;
  color: #c084fc;
  font-size: 13px;
}

.scroll-skill-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 6px;
  font-style: italic;
}

.scroll-skill-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.scroll-stat-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.scroll-skill-effect {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #fbbf24;
  padding: 2px 6px;
  background: rgba(251, 191, 36, 0.06);
  border-left: 2px solid #f59e0b;
  border-radius: 0 4px 4px 0;
}

/* ── Companion Learned Skills ──────────────────────────── */
.comp-skills-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.comp-skills-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.comp-skill-tag {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 6px;
  font-size: 12px;
  color: #c084fc;
  margin-bottom: 4px;
}

.comp-skill-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ── Bag Item Actions ──────────────────────────────────── */
.bag-item-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.btn-accent {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  color: #c084fc;
}

.btn-accent:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.detail-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-family: var(--font-mono);
  font-size: 12px;
}

.detail-stat-label {
  color: var(--text-secondary);
  text-transform: uppercase;
}

.detail-stat-value {
  font-weight: 700;
}

.detail-stat-value.positive {
  color: var(--accent-success);
}

.detail-stat-value.negative {
  color: var(--accent-danger);
}

.detail-effect-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.detail-effect-icon {
  font-size: 14px;
}

.detail-effect-text {
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ── AFFIX DISPLAY ──────────────────────────────────────── */
.affix-title {
  color: #f59e0b !important;
  border-bottom-color: rgba(245, 158, 11, 0.2) !important;
}

.detail-affix-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 12px;
}

.affix-tier-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 6px;
  border: 1px solid;
  border-radius: 3px;
  min-width: 60px;
  text-align: center;
}

.affix-positive .affix-stat {
  color: #22c55e;
}

.affix-negative .affix-stat {
  color: #ef4444;
}

.affix-inline {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  margin-left: 2px;
}

.item-affixes,
.consumable-affixes {
  display: inline;
  margin-left: 4px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.detail-grid-size {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

.detail-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-price {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-gold);
}

.detail-price .price-label {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-right: 4px;
}

.btn-confirm-buy {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(46, 204, 113, 0.1));
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: var(--accent-success);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-confirm-buy:hover {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.3), rgba(46, 204, 113, 0.15));
  border-color: rgba(46, 204, 113, 0.5);
  box-shadow: 0 4px 16px rgba(46, 204, 113, 0.15);
  transform: translateY(-1px);
}

.btn-confirm-buy:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-confirm-sell {
  background: linear-gradient(135deg, rgba(241, 196, 15, 0.2), rgba(241, 196, 15, 0.1));
  border: 1px solid rgba(241, 196, 15, 0.3);
  color: var(--accent-gold);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-confirm-sell:hover {
  background: linear-gradient(135deg, rgba(241, 196, 15, 0.3), rgba(241, 196, 15, 0.15));
  border-color: rgba(241, 196, 15, 0.5);
  box-shadow: 0 4px 16px rgba(241, 196, 15, 0.15);
  transform: translateY(-1px);
}

.detail-compare {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── INVENTORY ──────────────────────────────────────────── */
.inventory-screen {
  max-width: 700px;
}

.equipment-section {
  margin-bottom: 20px;
}

.equipment-section h3,
.bag-section h3 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.equip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.equip-slot {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slot-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.empty-slot {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.bag-section {
  margin-bottom: 16px;
}

/* ── STATS ──────────────────────────────────────────────── */
.stats-screen {
  max-width: 700px;
}

.profile-card {
  background: linear-gradient(135deg, rgba(30, 15, 50, 0.9), rgba(20, 10, 35, 0.95));
  border: 1px solid rgba(157, 125, 232, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  text-align: center;
}

.profile-portrait {
  font-size: 48px;
  margin-bottom: 6px;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-sub {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: capitalize;
  margin-bottom: 10px;
}

.profile-quirk {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 16px;
  font-size: 11px;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.profile-race-passive {
  font-size: 11px;
  color: #67e8f9;
  margin-bottom: 8px;
}

.profile-flavor {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-block {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 14px;
}

.stat-block h3 {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-points {
  color: var(--accent-primary-glow);
  font-size: 10px;
  font-weight: 700;
  animation: pulse 2s infinite;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 13px;
}

.stat-row .stat-name {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.stat-row .stat-value {
  font-family: var(--font-mono);
  color: var(--accent-primary-glow);
}

.corruption-val {
  color: var(--accent-danger) !important;
}

.skills-section,
.passive-section {
  margin-bottom: 16px;
}

.skills-section h3,
.passive-section h3 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.skill-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.skill-card {
  background: var(--bg-card);
  padding: 10px 12px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-card strong {
  color: var(--accent-primary-glow);
}

.skill-card .skill-cost {
  float: right;
}

.skill-card p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── GAME OVER ──────────────────────────────────────────── */
/* ── BOSS LOADING: SHADOW THOUGHT BOX ──────────────────── */
.boss-loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 32px;
}

.shadow-analyzing {
  text-align: center;
  max-width: 420px;
  animation: shadowFadeIn 0.6s ease;
}

@keyframes shadowFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.shadow-eye-container {
  margin-bottom: 16px;
}

.shadow-eye {
  font-size: 3rem;
  display: inline-block;
}

.shadow-eye-pulse {
  animation: eyePulse 2s ease-in-out infinite;
}

@keyframes eyePulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.3));
  }

  50% {
    transform: scale(1.15);
    filter: drop-shadow(0 0 24px rgba(139, 92, 246, 0.8));
  }
}

.shadow-title {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: #c084fc;
  letter-spacing: 8px;
  margin-bottom: 4px;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.shadow-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.shadow-subtitle strong {
  color: #f87171;
}

.shadow-thinking-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  min-height: 44px;
}

.shadow-prompt {
  color: #c084fc;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
}

.shadow-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a78bfa;
  transition: opacity 0.3s ease;
  flex: 1;
  text-align: left;
}

.shadow-dots {
  color: #7c3aed;
  font-family: var(--font-mono);
  font-weight: 700;
  animation: dotPulse 1s ease infinite;
}

@keyframes dotPulse {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 1;
  }
}

.shadow-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shadow-progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.shadow-progress-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #7c3aed, #c084fc, #7c3aed);
  border-radius: 3px;
  animation: shadowScan 2s ease infinite;
}

@keyframes shadowScan {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(300%);
  }
}

.shadow-timer {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  min-width: 24px;
  text-align: right;
}

/* ── Tactical Reveal (ready state) ─────────────────────── */
.shadow-reveal {
  max-width: 480px;
  animation: revealSlide 0.5s ease;
}

@keyframes revealSlide {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.shadow-reveal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 16px;
  color: #c084fc;
  font-family: var(--font-mono);
}

.shadow-reveal-header strong {
  color: #f87171;
}

.shadow-flavor {
  font-style: italic;
  color: #a78bfa;
  font-size: 14px;
  padding: 10px 14px;
  background: rgba(139, 92, 246, 0.08);
  border-left: 3px solid #7c3aed;
  border-radius: 0 8px 8px 0;
  margin-bottom: 12px;
  line-height: 1.5;
}

.shadow-mutations {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.shadow-mutation {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fbbf24;
  padding: 4px 10px;
  background: rgba(251, 191, 36, 0.08);
  border-radius: 4px;
  border-left: 2px solid #f59e0b;
}

.shadow-tactics {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.shadow-entering {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #f87171;
  animation: enterPulse 1s ease infinite;
}

@keyframes enterPulse {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* ── Stat Hint ─────────────────────────────────────────── */
.stat-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 6px;
  opacity: 0.7;
}

/* ── SHADOW Intel Panel (Boss Combat) ──────────────────── */
.shadow-intel-panel {
  margin-top: 12px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--border-radius);
  overflow: hidden;
  animation: shadowFadeIn 0.5s ease;
}

.shadow-intel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  cursor: pointer;
  background: rgba(139, 92, 246, 0.08);
  transition: background 0.2s ease;
  user-select: none;
}

.shadow-intel-header:hover {
  background: rgba(139, 92, 246, 0.14);
}

.shadow-intel-eye {
  font-size: 16px;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.5));
}

.shadow-intel-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #c084fc;
  letter-spacing: 3px;
  text-transform: uppercase;
  flex: 1;
}

.shadow-intel-toggle {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.shadow-intel-panel.collapsed .shadow-intel-toggle {
  transform: rotate(-90deg);
}

.shadow-intel-body {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 500px;
  opacity: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.3) transparent;
}

.shadow-intel-panel.collapsed .shadow-intel-body {
  max-height: 0;
  opacity: 0;
  padding: 0 14px;
}

.shadow-intel-flavor {
  font-style: italic;
  color: #a78bfa;
  font-size: 12px;
  padding: 6px 10px;
  background: rgba(139, 92, 246, 0.06);
  border-left: 2px solid #7c3aed;
  border-radius: 0 6px 6px 0;
  margin: 0;
  line-height: 1.5;
}

.shadow-intel-tactics {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin: 0;
}

.shadow-intel-mutation {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fbbf24;
  padding: 3px 8px;
  background: rgba(251, 191, 36, 0.06);
  border-radius: 4px;
  border-left: 2px solid #f59e0b;
}

/* ── Enemy Stats Row (ATK/DEF/Iteration) ───────────────── */
.enemy-stats-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  justify-content: flex-end;
}

.enemy-stat {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.iteration-tag {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.2);
}

/* ── Boss Evolution History ────────────────────────────── */
.boss-evo-history {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.boss-evo-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.boss-evo-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.boss-evo-entry:last-child {
  border-bottom: none;
}

.boss-evo-iter {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  min-width: 30px;
  text-align: center;
}

.boss-evo-name {
  color: var(--text-primary);
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.boss-evo-stats {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── COMBAT RESULT / VICTORY SCREEN ─────────────────────── */
.victory-screen {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  animation: victoryFadeIn 0.5s ease-out;
}

@keyframes victoryFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.victory-header {
  margin-bottom: 24px;
}

.victory-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-gold);
  text-shadow: 0 0 20px rgba(241, 196, 15, 0.3);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.victory-enemy {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 14px;
}

.reward-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.reward-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.reward-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.reward-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
}

.reward-xp .reward-value {
  color: var(--accent-primary-glow);
}

.reward-gold .reward-value {
  color: var(--accent-gold);
}

.xp-progress {
  position: relative;
  height: 22px;
  background: var(--xp-bg);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(155, 89, 182, 0.2);
}

.xp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--xp-color), var(--accent-primary-glow));
  border-radius: 6px;
  transition: width 1s ease-out;
  animation: xpBarGlow 2s infinite;
}

@keyframes xpBarGlow {

  0%,
  100% {
    box-shadow: 0 0 6px rgba(155, 89, 182, 0.3);
  }

  50% {
    box-shadow: 0 0 14px rgba(155, 89, 182, 0.6);
  }
}

.xp-progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-primary);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.reward-loot {
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

.reward-loot .reward-label {
  display: block;
  margin-bottom: 8px;
}

.loot-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.loot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: var(--bg-elevated);
  border-radius: 6px;
  border-left: 3px solid;
}

.loot-name {
  font-weight: 600;
  font-size: 13px;
}

.loot-rarity {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.level-up-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.15), rgba(241, 196, 15, 0.1));
  border: 1px solid rgba(155, 89, 182, 0.3);
  border-radius: var(--border-radius);
  animation: levelUpPulse 1.5s ease-in-out infinite;
}

@keyframes levelUpPulse {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(155, 89, 182, 0.2);
  }

  50% {
    box-shadow: 0 0 24px rgba(155, 89, 182, 0.5);
  }
}

.level-up-icon {
  font-size: 24px;
}

.level-up-text {
  font-weight: 800;
  font-size: 16px;
  color: var(--accent-primary-glow);
  letter-spacing: 0.5px;
}

.level-up-detail {
  font-size: 12px;
  color: var(--accent-success);
}

.boss-banner {
  padding: 12px;
  background: rgba(241, 196, 15, 0.08);
  border: 1px solid rgba(241, 196, 15, 0.2);
  border-radius: var(--border-radius);
  color: var(--accent-gold);
  font-weight: 600;
}

.victory-continue {
  width: 100%;
  margin-top: 8px;
  font-size: 16px;
  padding: 14px;
}

.gameover-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 16px;
}

.gameover-title {
  font-family: var(--font-mono);
  font-size: 48px;
  color: var(--accent-danger);
  text-shadow: 0 0 40px rgba(231, 76, 60, 0.5);
}

.gameover-screen p {
  color: var(--text-secondary);
  font-size: 16px;
}

.penalty {
  color: var(--accent-warning);
  font-weight: 600;
}

.gameover-screen .combat-log {
  width: 100%;
  max-width: 500px;
  height: 160px;
}

.gameover-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  #game-container {
    flex-direction: column;
  }

  #game-sidebar {
    width: 100%;
    min-width: unset;
    border-right: none;
    border-bottom: 1px solid rgba(124, 92, 191, 0.15);
    max-height: 140px;
    overflow-y: auto;
  }

  .sidebar-content {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
  }

  .sidebar-bars {
    flex-direction: row;
    gap: 12px;
    flex: 1;
  }

  .bar-group {
    grid-template-columns: 24px 1fr;
  }

  .bar-value {
    display: none;
  }

  #game-main {
    padding: 16px;
    overflow-y: auto;
    height: auto;
    flex: 1;
  }

  .job-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .shop-columns {
    grid-template-columns: 1fr;
  }

  .equip-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skill-list {
    grid-template-columns: 1fr;
  }

  .title-menu {
    flex-direction: column;
    gap: 10px;
  }

  .tree-map {
    gap: 12px;
  }

  .tier-nodes {
    grid-template-columns: 1fr;
  }
}

/* ── SKILL TREE ────────────────────────────────────────── */
.btn-tree {
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.25);
  color: #2ecc71;
}

.btn-tree:hover:not(:disabled) {
  background: rgba(46, 204, 113, 0.22);
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.2);
}

.tree-alert {
  background: rgba(46, 204, 113, 0.12) !important;
  border-color: rgba(46, 204, 113, 0.25) !important;
  color: #2ecc71 !important;
}

.tree-screen {
  max-width: 800px;
}

.tree-header {
  margin-bottom: 20px;
}

.tree-desc {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.tree-info {
  display: flex;
  gap: 20px;
  align-items: center;
}

.tree-points {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-primary-glow);
}

.tree-spent {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.tree-map {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.tree-tier {
  position: relative;
}

.tier-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  padding-left: 4px;
}

.tier-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

/* Node base */
.tree-node {
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius);
  padding: 10px 12px;
  transition: all 0.2s ease;
  position: relative;
}

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

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

.node-name {
  font-weight: 700;
  font-size: 13px;
  flex: 1;
}

.node-cost {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  background: rgba(157, 125, 232, 0.2);
  border-radius: 3px;
  color: var(--accent-primary-glow);
}

.node-desc {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 6px;
  line-height: 1.4;
}

.node-mods {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.node-mods .bonus {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  background: rgba(46, 204, 113, 0.15);
  border-radius: 3px;
  color: #2ecc71;
  font-weight: 600;
}

.node-mods .tradeoff {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  background: rgba(231, 76, 60, 0.15);
  border-radius: 3px;
  color: #e74c3c;
  font-weight: 600;
}

.node-skill {
  font-size: 10px;
  color: var(--accent-primary-glow);
  font-weight: 600;
}

.node-connects {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Node states */
.node-unlocked {
  border-color: rgba(46, 204, 113, 0.5);
  background: rgba(46, 204, 113, 0.08);
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.1);
}

.node-unlocked .node-name {
  color: #2ecc71;
}

.node-available {
  border-color: rgba(241, 196, 15, 0.5);
  background: rgba(241, 196, 15, 0.06);
  cursor: pointer;
  animation: nodeGlow 2s infinite;
}

.node-available:hover {
  border-color: rgba(241, 196, 15, 0.8);
  background: rgba(241, 196, 15, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(241, 196, 15, 0.15);
}

.node-available .node-name {
  color: var(--accent-gold);
}

@keyframes nodeGlow {

  0%,
  100% {
    box-shadow: 0 0 4px rgba(241, 196, 15, 0.1);
  }

  50% {
    box-shadow: 0 0 12px rgba(241, 196, 15, 0.2);
  }
}

@keyframes pulse-aff {

  0%,
  100% {
    box-shadow: 0 0 8px var(--pulse-color, #a855f7);
  }

  50% {
    box-shadow: 0 0 20px var(--pulse-color, #a855f7);
  }
}

@keyframes thoughtPulse {

  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }
}

.node-locked {
  opacity: 0.4;
  border-color: rgba(255, 255, 255, 0.03);
}

.node-locked .node-name {
  color: var(--text-muted);
}

/* Keystone */
.node-keystone {
  border-width: 2px;
  padding: 14px;
}

.node-keystone.node-locked {
  border-color: rgba(168, 85, 247, 0.15);
  border-style: dashed;
}

.node-keystone.node-available {
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.08);
  animation: keystoneGlow 2.5s infinite;
}

.node-keystone.node-unlocked {
  border-color: rgba(168, 85, 247, 0.8);
  background: rgba(168, 85, 247, 0.12);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

@keyframes keystoneGlow {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.1);
  }

  50% {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
  }
}

.tree-actions {
  display: flex;
  gap: 8px;
}

/* ── NPC SYSTEM ──────────────────────────────────────────── */

/* Exploration NPC section */
.npc-section {
  margin-top: 1rem;
}

.npc-section h3 {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.npc-grid {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-npc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 90px;
}

.btn-npc:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(244, 114, 182, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244, 114, 182, 0.15);
}

.npc-portrait {
  font-size: 1.5rem;
}

.npc-portrait-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(244, 114, 182, 0.3);
}

.npc-portrait-large-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(244, 114, 182, 0.4);
  box-shadow: 0 4px 15px rgba(244, 114, 182, 0.2);
  flex-shrink: 0;
}

.npc-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.npc-title {
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-style: italic;
}

.npc-bond {
  font-size: 0.75rem;
  color: #f472b6;
  margin-top: 2px;
}

/* NPC Talk Screen */
.npc-screen {
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.npc-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.npc-portrait-large {
  font-size: 3rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(244, 114, 182, 0.3);
  flex-shrink: 0;
}

.npc-info {
  flex: 1;
}

.npc-info h2 {
  margin: 0 0 0.3rem;
  color: var(--text-primary);
  font-size: 1.3rem;
}

.npc-title-text {
  color: var(--text-secondary);
  font-weight: 400;
  font-style: italic;
  font-size: 0.9rem;
}

.npc-personality {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 0.4rem 0 0;
  font-style: italic;
}

/* Bond meter */
.bond-meter {
  position: relative;
  height: 22px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bond-fill {
  height: 100%;
  background: linear-gradient(90deg, #ec4899, #f43f5e, #a855f7);
  border-radius: 11px;
  transition: width 0.5s ease;
}

.bond-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Dialogue box */
.npc-dialogue-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
}

.npc-greeting {
  color: #fbbf24;
  font-size: 1rem;
  margin-bottom: 0.8rem;
  font-style: italic;
  line-height: 1.5;
}

.npc-dialogue {
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Gift section */
.npc-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gift-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.75rem;
}

.gift-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.gift-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn-gift {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.2);
  color: #4ade80;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-gift:hover {
  background: rgba(74, 222, 128, 0.2);
  border-color: rgba(74, 222, 128, 0.4);
}

.gift-cooldown {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-style: italic;
}

/* Encounter button */
.btn-encounter {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  border: none;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  animation: encounterPulse 2s ease-in-out infinite;
}

.btn-encounter:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.4);
}

@keyframes encounterPulse {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.2);
  }

  50% {
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
  }
}

/* Encounter Screen */
.encounter-screen {
  padding: 2rem;
  max-width: 700px;
  margin: 0 auto;
  animation: fadeIn 0.5s ease;
}

.encounter-header {
  text-align: center;
  margin-bottom: 2rem;
}

.encounter-portrait {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

.encounter-title {
  color: #f472b6;
  font-size: 1.5rem;
  margin: 0.3rem 0;
  font-style: italic;
}

.encounter-npc {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.encounter-text {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid rgba(236, 72, 153, 0.4);
  padding: 1.5rem;
  border-radius: 0 12px 12px 0;
  margin-bottom: 2rem;
}

.encounter-text p {
  color: var(--text-primary);
  line-height: 1.8;
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
}

.encounter-text p:last-child {
  margin-bottom: 0;
}

.btn-encounter-finish {
  display: block;
  margin: 0 auto;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border: none;
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-encounter-finish:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.4);
}

/* ── QUEST PANELS ──────────────────────────────────────────── */
.quest-panel {
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.3s ease;
}

.quest-pending {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.quest-active {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.quest-completed {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.3);
  text-align: center;
}

.quest-header {
  font-weight: 700;
  font-size: 1rem;
  color: #fbbf24;
  margin-bottom: 0.5rem;
}

.quest-active .quest-header {
  color: #60a5fa;
}

.quest-completed .quest-header {
  color: #4ade80;
  font-size: 1.1rem;
}

.quest-desc {
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.quest-progress-bar {
  position: relative;
  height: 20px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.75rem;
}

.quest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.quest-progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.quest-hint {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-style: italic;
}

.quest-reward-text {
  color: #4ade80;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-quest-accept {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.btn-quest-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-quest-complete {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  animation: encounterPulse 2s ease-in-out infinite;
}

.btn-quest-complete:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

/* ── QUEST COMPLETION SCENE ─────────────────────────────── */

.quest-scene-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.5s ease;
  backdrop-filter: blur(6px);
  padding: 1.5rem;
}

.quest-scene-card {
  background: linear-gradient(160deg, #0f0a1a 0%, #1a0d2e 100%);
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-radius: 20px;
  max-width: 660px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.15), 0 0 120px rgba(236, 72, 153, 0.08);
  animation: sceneReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.3) transparent;
}

@keyframes sceneReveal {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.scene-image-wrap {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.scene-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scene-image-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to bottom, transparent, #0f0a1a);
}

.scene-npc-label {
  padding: 1.2rem 1.5rem 0.4rem;
  color: #f472b6;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.scene-npc-label em {
  color: var(--text-secondary);
  font-weight: 400;
}

.scene-prose {
  padding: 0.4rem 1.5rem 1rem;
  border-left: 3px solid rgba(168, 85, 247, 0.35);
  margin: 0 1.5rem 1.2rem;
  border-radius: 0 8px 8px 0;
  background: rgba(168, 85, 247, 0.03);
}

.scene-paragraph {
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 0.93rem;
  margin: 0 0 1em;
}

.scene-paragraph:last-child {
  margin-bottom: 0;
}

.scene-rewards {
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem 1.5rem;
  margin-bottom: 0.8rem;
}

.reward-bond {
  padding: 0.3rem 0.7rem;
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.3);
  border-radius: 20px;
  color: #f472b6;
  font-size: 0.8rem;
  font-weight: 600;
}

.reward-gold {
  padding: 0.3rem 0.7rem;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 20px;
  color: #fbbf24;
  font-size: 0.8rem;
  font-weight: 600;
}

.companion-comments {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0 1.5rem 1.2rem;
}

.companion-bubble {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  animation: fadeIn 0.4s ease;
}

.companion-name {
  font-weight: 700;
  font-size: 0.78rem;
  color: #a78bfa;
  white-space: nowrap;
  min-width: 60px;
}

.companion-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  font-style: italic;
}

.scene-actions {
  padding: 0.8rem 1.5rem 1.5rem;
  display: flex;
  justify-content: center;
}

.btn-scene-continue {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border: none;
  color: white;
  padding: 0.8rem 2.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.btn-scene-continue:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.45);
}

/* ── SEDUCTION SCENE ──────────────────────────────────────── */
.seduction-scene-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.5s ease;
  backdrop-filter: blur(8px);
  padding: 1.5rem;
}

.seduction-scene-card {
  background: linear-gradient(160deg, #1a0a1a 0%, #2a0825 50%, #1a0d2e 100%);
  border: 1px solid rgba(236, 72, 153, 0.3);
  border-radius: 20px;
  max-width: 660px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 0 80px rgba(236, 72, 153, 0.15), 0 0 160px rgba(147, 51, 234, 0.08);
  animation: sceneReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(236, 72, 153, 0.3) transparent;
  text-align: center;
}

.seduction-portrait {
  font-size: 3.5rem;
  padding-top: 2rem;
  filter: drop-shadow(0 0 20px rgba(236, 72, 153, 0.5));
}

.seduction-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, #c084fc, #ec4899, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0.5rem 1.5rem 0.2rem;
  letter-spacing: 0.03em;
}

.seduction-enemy-name {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-bottom: 0.8rem;
  font-style: italic;
}

.seduction-repeat {
  font-size: 0.82rem;
  color: #ec4899;
  padding: 0.4rem 1.5rem 0.8rem;
  font-style: italic;
  opacity: 0.9;
}

.seduction-prose {
  text-align: left;
  padding: 0.6rem 1.5rem 1rem;
  border-left: 3px solid rgba(236, 72, 153, 0.35);
  margin: 0 1.5rem 1.2rem;
  border-radius: 0 8px 8px 0;
  background: rgba(236, 72, 153, 0.03);
}

.seduction-prose .scene-paragraph {
  color: var(--text-primary);
  line-height: 1.9;
  font-size: 0.93rem;
  margin: 0 0 1em;
}

.seduction-prose .scene-paragraph:last-child {
  margin-bottom: 0;
}

.seduction-aftermath {
  margin: 0 1.5rem 1rem;
  padding: 0.8rem 1rem;
  background: rgba(147, 51, 234, 0.06);
  border: 1px solid rgba(147, 51, 234, 0.15);
  border-radius: 12px;
  text-align: left;
}

.aftermath-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #c084fc;
  margin-bottom: 0.4rem;
}

.aftermath-effects {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.aftermath-message {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-top: 0.5rem;
  font-style: italic;
  line-height: 1.5;
}

.btn-seduction-continue {
  background: linear-gradient(135deg, #ec4899, #a855f7);
  border: none;
  color: white;
  padding: 0.8rem 2.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.25);
}

.btn-seduction-continue:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 0 35px rgba(236, 72, 153, 0.45);
}

/* ── VISUAL NOVEL MODE ────────────────────────────────────── */
.vn-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  cursor: pointer;
}

.vn-scene {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.vn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.2rem;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(236, 72, 153, 0.15);
  z-index: 2;
}

.vn-title {
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(90deg, #c084fc, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vn-visit-count {
  font-size: 0.75rem;
  color: #ec4899;
  font-style: italic;
}

.vn-beat-counter {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  opacity: 0.6;
}

.vn-image-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0010 0%, #1a0825 50%, #0a0010 100%);
}

.vn-image-area::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.95));
  pointer-events: none;
}

.vn-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: vnImageFade 0.6s ease;
}

.vn-image-empty {
  background: radial-gradient(ellipse at center, rgba(147, 51, 234, 0.08) 0%, transparent 70%),
    linear-gradient(180deg, #0a0010 0%, #1a0825 50%, #0a0010 100%);
}

.vn-portrait-large {
  font-size: 6rem;
  filter: drop-shadow(0 0 40px rgba(236, 72, 153, 0.3));
  animation: vnPortraitFloat 4s ease-in-out infinite;
}

@keyframes vnPortraitFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes vnImageFade {
  from {
    opacity: 0;
    transform: scale(1.05);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.vn-textbox {
  background: linear-gradient(180deg, rgba(10, 0, 16, 0.95), rgba(26, 8, 37, 0.98));
  border-top: 2px solid rgba(236, 72, 153, 0.3);
  padding: 1rem 1.5rem;
  min-height: 120px;
  position: relative;
  z-index: 2;
}

.vn-speaker {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ec4899;
  margin-bottom: 0.4rem;
  padding: 0.15rem 0.6rem;
  background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.2);
  border-radius: 6px;
  display: inline-block;
}

.vn-speaker.vn-narrator {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  font-style: italic;
}

.vn-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-primary);
  animation: vnTextFade 0.4s ease;
}

@keyframes vnTextFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vn-controls {
  background: rgba(10, 0, 16, 0.98);
  padding: 0.6rem 1.5rem 1rem;
  text-align: center;
  z-index: 2;
}

.vn-advance-hint {
  font-size: 0.78rem;
  color: var(--text-secondary);
  opacity: 0.5;
  animation: vnHintPulse 2s ease-in-out infinite;
}

@keyframes vnHintPulse {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.7;
  }
}

.vn-aftermath {
  margin: 0 0 0.8rem;
  text-align: left;
}

.ai-settings {
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
}

.ai-settings h3 {
  color: #a78bfa;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.ai-status {
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.ai-key-masked {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: monospace;
  margin-bottom: 0.4rem;
}

.ai-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.ai-key-input {
  display: flex;
  gap: 0.5rem;
}

.input-field {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  color: var(--text-primary);
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-field:focus {
  border-color: #a78bfa;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.ai-loading {
  animation: aiShimmer 1s ease-in-out infinite;
}

@keyframes aiShimmer {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.ai-generated {
  color: #c4b5fd;
  border-left: 2px solid rgba(139, 92, 246, 0.3);
  padding-left: 0.6rem;
  display: block;
  animation: fadeIn 0.5s ease;
}

/* ── AUTO-HUNT ─────────────────────────────────────────── */
.hunt-screen {
  max-width: 700px;
}

.hunt-header {
  margin-bottom: 16px;
}

.hunt-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-primary-glow);
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(157, 125, 232, 0.3);
}

.hunt-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 16px;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hunt-stat {
  font-size: 13px;
  color: var(--text-secondary);
}

.hunt-stat strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* Hunt button in exploration */
.btn-hunt {
  background: linear-gradient(135deg, rgba(124, 92, 191, 0.25), rgba(168, 85, 247, 0.25));
  border-color: rgba(168, 85, 247, 0.4);
  color: #c4b5fd;
  font-weight: 600;
}

.btn-hunt:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(124, 92, 191, 0.4), rgba(168, 85, 247, 0.4));
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.6);
}

/* Combatant bars */
.hunt-combatants {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hunt-combatant {
  flex: 1;
}

.hunt-vs {
  font-size: 24px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.elite-name {
  color: #f59e0b !important;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* Speed/action progress bars */
.speed-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  margin-top: 4px;
}

.speed-bar .speed-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-glow));
  border-radius: 3px;
}

/* Smooth 60fps animation for attack speed bars */
@keyframes speedFill {
  from {
    width: 0%;
  }

  to {
    width: 100%;
  }
}

.speed-anim {
  animation: speedFill var(--speed-duration, 3s) linear infinite;
}

.enemy-speed .speed-fill {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.speed-text {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 7px;
  color: rgba(255, 255, 255, 0.5);
}

/* Hunt combat log */
.hunt-log {
  background: var(--bg-main);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 10px 14px;
  height: 200px;
  overflow-y: auto;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-elevated) var(--bg-main);
}

/* Hunt-specific log types */
.log-player_dmg {
  color: var(--accent-info);
}

.log-enemy_dmg {
  color: var(--accent-danger);
}

.log-elite {
  color: #f59e0b;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.log-victory {
  color: var(--accent-success);
  font-weight: 600;
}

.log-level_up {
  color: var(--accent-gold);
  font-weight: 700;
  animation: pulse 1s;
}

.log-milestone {
  color: #f97316;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(249, 115, 22, 0.4);
}

.log-death {
  color: var(--accent-danger);
  font-weight: 700;
}

.log-system {
  color: var(--accent-primary-glow);
  font-weight: 600;
}

/* Controls */
.hunt-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hunt-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hunt-control-group label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.hunt-strategy-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.btn-active {
  background: rgba(124, 92, 191, 0.25) !important;
  border-color: var(--accent-primary) !important;
  color: var(--accent-primary-glow) !important;
  box-shadow: 0 0 8px rgba(124, 92, 191, 0.2);
}

.hunt-slider {
  width: 100%;
  height: 6px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-elevated);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.hunt-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--accent-primary-glow);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(124, 92, 191, 0.3);
}

.hunt-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--accent-primary-glow);
  cursor: pointer;
}

.hunt-stop {
  align-self: center;
  margin-top: 4px;
}

/* ── HUNT SUMMARY ──────────────────────────────────────── */
.hunt-summary {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
}

.hunt-summary-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-primary-glow);
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(157, 125, 232, 0.3);
}

.hunt-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.summary-stat {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.hunt-loot-section {
  margin-bottom: 24px;
  text-align: left;
}

.hunt-loot-section h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hunt-loot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.loot-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.hunt-no-loot {
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 20px;
}

/* ── MAP BUTTON ────────────────────────────────────────── */
.btn-map {
  background: rgba(196, 181, 253, 0.12);
  border-color: rgba(196, 181, 253, 0.25);
  color: #c4b5fd;
}

.btn-map:hover:not(:disabled) {
  background: rgba(196, 181, 253, 0.22);
  box-shadow: 0 0 12px rgba(196, 181, 253, 0.2);
}

/* ── MAP SCREEN — Stacked Banner System ──────────────────── */
.map-screen {
  max-width: 700px;
}

.map-banner-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Zone Banner Card ──────────────────────────────────────── */
.zone-banner {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-card);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.zone-banner-unlocked {
  cursor: pointer;
}

.zone-banner-unlocked:hover {
  border-color: var(--zone-color, rgba(255, 255, 255, 0.2));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.zone-banner-current {
  border-color: var(--zone-glow);
  box-shadow: 0 0 20px color-mix(in srgb, var(--zone-glow) 30%, transparent),
    0 0 40px color-mix(in srgb, var(--zone-glow) 10%, transparent);
}

.zone-banner-locked {
  opacity: 0.45;
  filter: grayscale(0.6);
  pointer-events: none;
}

/* ── Banner Image ──────────────────────────────────────────── */
.zone-banner-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 15, 25, 0.9), rgba(25, 20, 40, 0.8));
}

.zone-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.zone-banner-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(30, 20, 50, 0.9));
}

.zone-fallback-icon {
  font-size: 48px;
  opacity: 0.5;
}

/* Lock overlay */
.zone-banner-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  backdrop-filter: blur(2px);
}

.zone-lock-icon {
  font-size: 28px;
}

.zone-lock-text {
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #888;
}

/* Current zone indicator */
.zone-banner-current-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(139, 92, 246, 0.85);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
  animation: current-zone-pulse 2s ease-in-out infinite;
}

@keyframes current-zone-pulse {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
  }

  50% {
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.7);
  }
}

/* ── Banner Info Section ───────────────────────────────────── */
.zone-banner-info {
  padding: 14px 16px;
}

.zone-banner-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.zone-banner-icon {
  font-size: 18px;
}

.zone-banner-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.3px;
}

.zone-tier-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 1px;
}

.zone-boss-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
}

.zone-boss-tag.boss-alive {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.zone-boss-tag.boss-cleared {
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.zone-banner-desc {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  opacity: 0.8;
}

.zone-banner-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-tertiary, #6b7280);
}

.zone-meta-travel {
  color: var(--zone-color, #a855f7);
  font-weight: 600;
  margin-left: auto;
}

.zone-banner-unlocked:hover .zone-meta-travel {
  text-decoration: underline;
}

/* ── Travel Line Connector ─────────────────────────────────── */
.zone-connector {
  display: none;
}

.travel-line {
  width: 2px;
  height: 100%;
  border-radius: 1px;
}

.travel-line-active {
  background: linear-gradient(180deg,
      rgba(168, 85, 247, 0.6),
      rgba(168, 85, 247, 0.3));
}

.travel-line-locked {
  background: rgba(255, 255, 255, 0.08);
  border: none;
}

/* ================================================================
   ANIMATIONS — Combat-Focused Visual Juice
   ================================================================ */

/* ── FLOATING DAMAGE NUMBERS ───────────────────────────── */
#float-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.float-number {
  position: absolute;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 1.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 4px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(0) scale(0.5);
  pointer-events: none;
  white-space: nowrap;
  z-index: 10001;
}

.float-number.float-active {
  animation: floatUp 1.2s ease-out forwards;
}

.float-damage {
  color: #f87171;
  font-size: 1.6rem;
}

.float-crit {
  color: #fbbf24;
  font-size: 2.2rem;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.8), 0 0 40px rgba(251, 191, 36, 0.4), 0 2px 8px rgba(0, 0, 0, 0.9);
}

.float-heal {
  color: #4ade80;
  text-shadow: 0 0 12px rgba(74, 222, 128, 0.5), 0 2px 8px rgba(0, 0, 0, 0.8);
}

.float-miss {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 600;
}

.float-poison {
  color: #a855f7;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.float-block {
  color: #60a5fa;
  text-shadow: 0 0 12px rgba(96, 165, 250, 0.5);
  font-size: 1.8rem;
}

.float-stun {
  color: #fbbf24;
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
  font-size: 1.6rem;
}

.float-xp {
  color: #60a5fa;
}

.float-gold {
  color: #fbbf24;
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(var(--float-x, 0)) scale(0.3);
  }

  12% {
    opacity: 1;
    transform: translateY(-15px) translateX(var(--float-x, 0)) scale(1.3);
  }

  25% {
    transform: translateY(-25px) translateX(var(--float-x, 0)) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(var(--float-y, -80px)) translateX(var(--float-x, 0)) scale(0.7);
  }
}

/* ── COMBAT SPLASH TEXT ────────────────────────────────── */
.combat-splash {
  position: fixed;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 2.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 10002;
  opacity: 0;
}

.combat-splash.splash-active {
  animation: splashIn 1s ease-out forwards;
}

.splash-crit {
  color: #fbbf24;
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.8), 0 0 60px rgba(251, 191, 36, 0.4), 0 4px 12px rgba(0, 0, 0, 0.9);
}

.splash-block {
  color: #60a5fa;
  text-shadow: 0 0 25px rgba(96, 165, 250, 0.6), 0 4px 12px rgba(0, 0, 0, 0.9);
  font-size: 2rem;
}

.splash-stun {
  color: #fbbf24;
  text-shadow: 0 0 25px rgba(251, 191, 36, 0.6), 0 4px 12px rgba(0, 0, 0, 0.9);
}

.splash-flee {
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.9);
  font-size: 2rem;
}

@keyframes splashIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.5);
  }

  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9) translateY(-20px);
  }
}

/* ── SCREEN SHAKE ──────────────────────────────────────── */
.shake-active {
  animation: screenShake var(--shake-duration, 150ms) ease-in-out;
}

@keyframes screenShake {

  0%,
  100% {
    transform: translate(0, 0);
  }

  10% {
    transform: translate(calc(var(--shake-intensity, 4px) * -1), calc(var(--shake-intensity, 4px) * 0.5));
  }

  20% {
    transform: translate(var(--shake-intensity, 4px), calc(var(--shake-intensity, 4px) * -0.5));
  }

  30% {
    transform: translate(calc(var(--shake-intensity, 4px) * -0.5), var(--shake-intensity, 4px));
  }

  40% {
    transform: translate(var(--shake-intensity, 4px), calc(var(--shake-intensity, 4px) * -1));
  }

  50% {
    transform: translate(calc(var(--shake-intensity, 4px) * -1), calc(var(--shake-intensity, 4px) * 0.3));
  }

  60% {
    transform: translate(calc(var(--shake-intensity, 4px) * 0.7), var(--shake-intensity, 4px));
  }

  70% {
    transform: translate(calc(var(--shake-intensity, 4px) * -0.3), calc(var(--shake-intensity, 4px) * -0.7));
  }

  80% {
    transform: translate(calc(var(--shake-intensity, 4px) * 0.5), calc(var(--shake-intensity, 4px) * 0.3));
  }

  90% {
    transform: translate(calc(var(--shake-intensity, 4px) * -0.2), calc(var(--shake-intensity, 4px) * -0.2));
  }
}

/* ── FLASH EFFECTS ─────────────────────────────────────── */
.combatant {
  position: relative;
}

.flash-active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--flash-color, rgba(239, 68, 68, 0.3));
  border-radius: inherit;
  animation: flashPulse 300ms ease-out forwards;
  pointer-events: none;
}

@keyframes flashPulse {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* Full-screen flash for massive impacts */
#screen-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
}

#screen-flash.screen-flash-active {
  animation: screenFlashAnim 400ms ease-out forwards;
}

@keyframes screenFlashAnim {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* ── SLASH EFFECT ──────────────────────────────────────── */
.slash-effect {
  position: absolute;
  pointer-events: none;
  overflow: hidden;
  z-index: 10000;
  opacity: 0;
}

.slash-effect.slash-active {
  animation: slashAnim 400ms ease-out forwards;
}

.slash-slash::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  transform: rotate(-35deg);
  transform-origin: center;
  filter: blur(1px);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5), 0 0 30px rgba(255, 255, 255, 0.2);
}

.slash-thrust::before {
  content: '';
  position: absolute;
  top: 45%;
  left: -20%;
  width: 140%;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.9), transparent);
  filter: blur(1px);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.slash-magic::before {
  content: '';
  position: absolute;
  inset: 10%;
  border: 2px solid rgba(168, 85, 247, 0.6);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4), inset 0 0 15px rgba(168, 85, 247, 0.2);
}

@keyframes slashAnim {
  0% {
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* ── HP GHOST BAR ──────────────────────────────────────── */
.hp-bar {
  position: relative;
}

.hp-ghost {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(251, 146, 60, 0.5);
  border-radius: inherit;
  transition: width 0.8s ease-out 0.3s;
  z-index: 0;
}

.hp-fill {
  position: relative;
  z-index: 1;
}

/* ── COMBAT LOG SLIDE-IN ───────────────────────────────── */
.log-slide-in {
  animation: logSlideIn 0.35s ease-out both;
}

@keyframes logSlideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Glow effects for special log entries */
.log-crit {
  color: #fbbf24 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
  font-weight: 700;
}

.log-level_up,
.log-levelup {
  color: var(--accent-gold) !important;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
  font-weight: 700;
}

/* ── SMOOTH BAR TRANSITIONS ────────────────────────────── */
.bar-smooth,
.hp-fill,
.sp-fill {
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.xp-fill {
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Level up XP bar gold sweep */
@keyframes xpSweep {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.xp-levelup {
  background: linear-gradient(90deg, #3b82f6 0%, #fbbf24 40%, #f59e0b 50%, #fbbf24 60%, #3b82f6 100%);
  background-size: 200% 100%;
  animation: xpSweep 1s ease-in-out;
}

/* ── BURST PARTICLES ───────────────────────────────────── */
.burst-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
}

.burst-particle.burst-active {
  animation: burstOut 0.6s ease-out forwards;
}

@keyframes burstOut {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translate(0, 0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) translate(var(--burst-x, 30px), var(--burst-y, -30px));
  }
}

/* ── COMBAT CARD HOVER + PRESS ─────────────────────────── */
.skill-card {
  transition: all 0.15s ease, transform 0.1s ease;
  cursor: pointer;
}

.skill-card:hover:not(.card-disabled) {
  transform: translateY(-6px) scale(1.04);
}

.skill-card:active:not(.card-disabled) {
  transform: translateY(-1px) scale(0.96);
  transition: transform 0.05s ease;
}

.card-attack:hover:not(.card-disabled) {
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3), 0 0 15px rgba(239, 68, 68, 0.15);
}

.card-defend:hover:not(.card-disabled) {
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3), 0 0 15px rgba(59, 130, 246, 0.15);
}

.card-skill:hover:not(.card-disabled) {
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.3), 0 0 15px rgba(168, 85, 247, 0.15);
}

.card-item:hover:not(.card-disabled) {
  box-shadow: 0 8px 25px rgba(74, 222, 128, 0.3), 0 0 15px rgba(74, 222, 128, 0.15);
}

.card-flee:hover:not(.card-disabled) {
  box-shadow: 0 8px 25px rgba(251, 191, 36, 0.3), 0 0 15px rgba(251, 191, 36, 0.15);
}

/* ── STATUS EFFECT PULSING ICONS ───────────────────────── */
.status-icon {
  animation: statusPulse 2s ease-in-out infinite;
  display: inline-block;
}

@keyframes statusPulse {

  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.2);
    filter: brightness(1.4);
  }
}

/* ── ITEM RARITY GLOW ──────────────────────────────────── */
.item-row[data-rarity="legendary"],
.item-name[style*="rgb(251, 191, 36)"] {
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
  animation: legendaryPulse 3s ease-in-out infinite;
}

@keyframes legendaryPulse {

  0%,
  100% {
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
  }

  50% {
    text-shadow: 0 0 16px rgba(251, 191, 36, 0.7), 0 0 30px rgba(251, 191, 36, 0.2);
  }
}

/* ── QUICK ACTION CLICKER BUTTON ───────────────────────── */
#quick-action {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  min-width: 100px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  color: rgba(226, 216, 245, 0.7);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.25s ease;
  opacity: 0.45;
  user-select: none;
  -webkit-user-select: none;
}

#quick-action:hover {
  opacity: 0.9;
  transform: translateY(-2px) scale(1.04);
  border-color: rgba(157, 125, 232, 0.5);
  box-shadow: 0 4px 20px rgba(124, 92, 191, 0.25), 0 0 30px rgba(157, 125, 232, 0.1);
  background: rgba(124, 92, 191, 0.1);
  color: #e2d8f5;
}

#quick-action:active {
  opacity: 1;
  transform: translateY(0) scale(0.95);
  transition: all 0.05s ease;
}

/* ── GLOBAL SHOP BUTTON ───────────────────────────────────── */
#global-shop-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.25s ease;
  opacity: 0.45;
  user-select: none;
  -webkit-user-select: none;
  padding: 0;
  line-height: 1;
}

#global-shop-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px) scale(1.08);
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.2), 0 0 30px rgba(251, 191, 36, 0.08);
  background: rgba(251, 191, 36, 0.1);
}

#global-shop-btn:active {
  opacity: 1;
  transform: translateY(0) scale(0.92);
  transition: all 0.05s ease;
}

/* ── EVENT PORTRAIT ────────────────────────────────────── */
.event-portrait {
  display: flex;
  justify-content: center;
  margin: 0.8rem auto 1rem;
  animation: portraitFadeIn 0.6s ease-out;
}

.event-portrait img {
  max-width: 320px;
  max-height: 320px;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid rgba(157, 125, 232, 0.4);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(157, 125, 232, 0.15);
}

@keyframes portraitFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── SAVE SLOT MODAL ───────────────────────────────────── */
.save-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.save-modal {
  background: var(--bg-main);
  border: 1px solid rgba(124, 92, 191, 0.3);
  border-radius: 16px;
  padding: 28px 32px;
  min-width: 380px;
  max-width: 440px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(124, 92, 191, 0.1);
}

.save-modal h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-primary-glow);
  margin-bottom: 6px;
  text-align: center;
}

.save-auto-label {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
}

.save-slot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.save-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius);
  transition: all var(--transition);
}

.save-slot:hover {
  border-color: rgba(124, 92, 191, 0.3);
  background: var(--bg-elevated);
}

.save-slot-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.save-slot-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-primary-glow);
}

.save-slot-detail {
  font-size: 12px;
  color: var(--text-secondary);
}

.save-slot-meta {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.save-slot-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.save-slot-empty {
  justify-content: center;
  gap: 12px;
  opacity: 0.6;
}

.save-slot-empty-label {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.btn-sm {
  font-size: 12px;
  padding: 5px 12px;
}

/* ── WANDERING NPC ENCOUNTER CARD ──────────────────────── */
.wanderer-card {
  margin-top: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(124, 92, 191, 0.08), rgba(20, 20, 35, 0.9));
  border: 1px solid rgba(124, 92, 191, 0.4);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(124, 92, 191, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: cardSlideIn 0.3s ease;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wanderer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.wanderer-portrait {
  font-size: 2.2rem;
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 92, 191, 0.15);
  border-radius: 50%;
  border: 2px solid rgba(124, 92, 191, 0.3);
  overflow: hidden;
  flex-shrink: 0;
}

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

.wanderer-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--accent-primary-glow);
}

.wanderer-title {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
}

.wanderer-race {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.wanderer-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.wanderer-appear {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
}

.wanderer-flirt {
  font-size: 13px;
  color: var(--accent-primary-glow);
  padding: 8px 12px;
  background: rgba(124, 92, 191, 0.1);
  border-radius: 8px;
  border-left: 3px solid var(--accent-primary);
  margin-bottom: 10px;
  font-style: italic;
}

.wanderer-stats {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.wanderer-quirk {
  font-size: 12px;
  color: #c4b5fd;
  margin-bottom: 8px;
  padding: 4px 0;
}

.wanderer-quirks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.quirk-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid;
  background: rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.quirk-badge.quirk-positive {
  background: rgba(74, 222, 128, 0.08);
}

.quirk-badge.quirk-negative {
  background: rgba(239, 68, 68, 0.08);
}

.wanderer-ai-badge {
  display: inline-block;
  font-size: 10px;
  color: #22d3ee;
  padding: 2px 8px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 4px;
  margin-top: 8px;
  background: rgba(34, 211, 238, 0.05);
}

/* ── PARTY SECTION ─────────────────────────────────────── */
.party-section {
  margin-top: 14px;
}

.party-section h3 {
  font-size: 14px;
  color: #e74c9b;
  margin-bottom: 8px;
}

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

.party-member {
  padding: 10px 12px;
  background: rgba(231, 76, 155, 0.04);
  border: 1px solid rgba(231, 76, 155, 0.15);
  border-radius: var(--border-radius);
  transition: all var(--transition);
}

.party-member.party-active {
  border-color: rgba(231, 76, 155, 0.35);
  background: rgba(231, 76, 155, 0.08);
  box-shadow: 0 0 12px rgba(231, 76, 155, 0.1);
}

.party-member-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.party-member-portrait {
  font-size: 1.5rem;
}

.party-member-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.party-member-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
}

.party-member-title {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
}

.party-member-tier {
  font-size: 11px;
  font-weight: 600;
}

.affection-bar {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.affection-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease, background 0.3s ease;
}

.affection-label {
  position: absolute;
  right: 4px;
  top: -14px;
  font-size: 9px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.party-member-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* ── COMPANION HP & EQUIPMENT ────────────────────────────── */
.party-member-hp {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
}

.hp-label {
  color: #ef4444;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 10px;
}

.mini-hp-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.mini-hp-fill {
  height: 100%;
  background: #ef4444;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.party-member .hp-text {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  min-width: 50px;
  text-align: right;
  position: static;
  transform: none;
}

.comp-stats {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
}

.party-equip {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.equip-slot {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.equip-filled {
  background: rgba(124, 92, 191, 0.15);
  border: 1px solid rgba(124, 92, 191, 0.3);
  color: var(--accent-primary-glow);
  cursor: pointer;
}

.equip-filled:hover {
  background: rgba(124, 92, 191, 0.3);
}

.equip-empty {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* ── COMPANION IN COMBAT ─────────────────────────────────── */
.combat-companion {
  padding: 6px 10px;
  background: rgba(231, 76, 155, 0.06);
  border: 1px solid rgba(231, 76, 155, 0.2);
  border-radius: 8px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.combat-companion .cc-portrait {
  font-size: 1.3rem;
}

.combat-companion .cc-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.combat-companion .cc-hp {
  margin-left: auto;
  font-size: 10px;
  font-family: var(--font-mono);
  color: #ef4444;
}

/* ══════════════════════════════════════════════════════════════
   PARTY MANAGEMENT SCREEN
   ══════════════════════════════════════════════════════════════ */

.party-screen {
  max-width: 900px;
}

/* ── CHARACTER SELECTOR TABS ─────────────────────────────── */
.party-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.party-tab {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px 8px 0 0;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-primary);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.party-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.party-tab-active {
  background: rgba(124, 92, 191, 0.12);
  border-color: var(--accent-primary);
  color: var(--accent-primary-glow);
  font-weight: 700;
}

.tab-aff {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 4px;
}

/* ── TWO-PANEL LAYOUT ────────────────────────────────────── */
.party-panels {
  display: flex;
  gap: 16px;
  min-height: 400px;
}

/* ── LEFT: PAPERDOLL ─────────────────────────────────────── */
.party-paperdoll {
  flex: 0 0 320px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
}

.paperdoll-header {
  text-align: center;
  margin-bottom: 12px;
}

.paperdoll-name {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-primary);
}

.paperdoll-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: capitalize;
}

/* ── COMPANION BARS ──────────────────────────────────────── */
.paperdoll-bars {
  margin-bottom: 12px;
}

.pd-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.pd-bar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  width: 24px;
  text-align: center;
}

.pd-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.pd-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.pd-hp {
  background: #ef4444;
}

.pd-aff {
  background: linear-gradient(90deg, #f97316, #ef4444, #a855f7);
}

.pd-bar-val {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 55px;
  text-align: right;
}

.pd-stats-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── PAPERDOLL EQUIPMENT GRID ────────────────────────────── */
.paperdoll-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.paperdoll-grid .pd-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  position: relative;
}

.pd-slot-filled {
  background: rgba(124, 92, 191, 0.08);
  border: 1px solid rgba(124, 92, 191, 0.2);
}

.pd-slot-empty {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.paperdoll-grid .slot-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
  min-width: 65px;
}

.paperdoll-grid .item-name {
  font-size: 12px;
  font-weight: 600;
}

.paperdoll-grid .item-stats,
.paperdoll-grid .item-tradeoffs,
.paperdoll-grid .item-affixes {
  font-size: 10px;
}

.pd-unequip {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
}

.pd-slot:hover .pd-unequip {
  opacity: 1;
}

.paperdoll-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

/* ── RIGHT: SHARED BAG ───────────────────────────────────── */
.party-bag {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  max-height: 500px;
  overflow-y: auto;
}

.bag-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  font-family: var(--font-primary);
}

.bag-empty {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 40px 0;
}

.bag-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  transition: background 0.15s ease;
}

.bag-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.bag-item .item-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.bag-item-slot {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  white-space: nowrap;
}

.bag-item .item-stats {
  flex: 1;
  font-size: 10px;
  color: var(--text-secondary);
}

.bag-item .btn {
  flex-shrink: 0;
}

/* ============================================================
   MANSION — HOME Phase
   ============================================================ */
.mansion-wrapper {
  max-width: 700px;
}

.mansion-header {
  margin-bottom: 24px;
}

.mansion-tier-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-gold);
  opacity: 0.8;
}

.mansion-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px 0;
}

.mansion-subtitle {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 13px;
}

.mansion-stats {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Ambient events */
.mansion-ambient {
  margin-bottom: 20px;
  padding: 12px 16px;
  background: rgba(124, 92, 191, 0.06);
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.mansion-ambient-event {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 13px;
  padding: 4px 0;
  line-height: 1.5;
}

/* Room grid */
.mansion-rooms {
  margin-bottom: 20px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.mansion-room-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mansion-room-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition);
}

.mansion-room-card:hover {
  background: var(--bg-elevated);
  border-color: rgba(124, 92, 191, 0.3);
  transform: translateX(4px);
}

.mansion-room-icon {
  font-size: 24px;
  min-width: 32px;
  text-align: center;
}

.mansion-room-info {
  flex: 1;
}

.mansion-room-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.mansion-room-desc {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
}

.mansion-room-occupants {
  font-size: 11px;
  color: var(--accent-primary-glow);
  margin-top: 4px;
}

.mansion-room-yield {
  font-size: 11px;
  color: var(--accent-gold);
  margin-top: 2px;
}

/* Build section */
.mansion-build {
  margin-bottom: 20px;
}

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

.mansion-build-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid rgba(46, 204, 113, 0.2);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition);
}

.mansion-build-card:hover:not(.mansion-build-locked) {
  background: rgba(46, 204, 113, 0.08);
  border-color: rgba(46, 204, 113, 0.4);
}

.mansion-build-locked {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.05);
}

.mansion-build-icon {
  font-size: 18px;
}

.mansion-build-name {
  flex: 1;
  font-weight: 500;
  font-size: 13px;
}

.mansion-build-cost {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-gold);
}

/* Tier upgrade */
.mansion-upgrade {
  margin-bottom: 20px;
}

.mansion-upgrade-card {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(241, 196, 15, 0.2);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition);
}

.mansion-upgrade-card:hover:not(.mansion-build-locked) {
  background: rgba(241, 196, 15, 0.06);
  border-color: rgba(241, 196, 15, 0.4);
}

.mansion-upgrade-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.mansion-upgrade-desc {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 6px;
}

.mansion-upgrade-cost {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-gold);
}

/* Actions bar */
.mansion-actions {
  margin-top: 24px;
  display: flex;
  gap: 8px;
}

/* Room detail view */
.mansion-room-view {
  max-width: 700px;
}

.mansion-room-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.mansion-room-icon-large {
  font-size: 36px;
}

.mansion-room-header h2 {
  font-size: 22px;
}

.mansion-room-description {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Occupants */
.mansion-occupants {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.mansion-occupant-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius);
}

.mansion-occupant-name {
  font-weight: 600;
}

.mansion-occupant-title {
  font-size: 11px;
  color: var(--text-muted);
  margin-right: auto;
}

/* Corruption bar */
.mansion-corruption-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  margin: 4px 0;
  min-width: 80px;
}

.mansion-corruption-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #1a1a2e);
  border-radius: 3px;
  transition: width 0.3s;
}

.mansion-corruption-bar span {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  font-size: 8px;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.6);
}

/* Assign list */
.mansion-assign-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mansion-assign-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid rgba(124, 92, 191, 0.15);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition);
}

.mansion-assign-card:hover {
  background: rgba(124, 92, 191, 0.1);
  border-color: rgba(124, 92, 191, 0.35);
}

.mansion-assign-race {
  font-size: 11px;
  color: var(--text-muted);
}

.mansion-room-yield-info {
  padding: 8px 14px;
  background: rgba(241, 196, 15, 0.06);
  border-radius: var(--border-radius);
  font-size: 13px;
  color: var(--accent-gold);
  margin: 12px 0;
}

.mansion-room-upgrade {
  margin-top: 16px;
}

/* Mansion button in explore bar */
.btn-mansion {
  background: rgba(241, 196, 15, 0.1);
  border-color: rgba(241, 196, 15, 0.25);
  color: var(--accent-gold);
}

.btn-mansion:hover:not(:disabled) {
  background: rgba(241, 196, 15, 0.2);
  box-shadow: 0 0 12px rgba(241, 196, 15, 0.15);
}

/* ── Night Event Modal ──────────────────────────────────── */
.night-event-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: nightFadeIn 0.5s ease;
}

@keyframes nightFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.night-event-modal {
  max-width: 560px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #1a1028 0%, #0f0a1a 60%, #150d22 100%);
  border: 1px solid rgba(124, 92, 191, 0.3);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 0 60px rgba(124, 92, 191, 0.15), 0 0 120px rgba(0, 0, 0, 0.5);
  animation: nightModalSlide 0.5s ease;
}

@keyframes nightModalSlide {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.night-event-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(124, 92, 191, 0.15);
}

.night-event-icon {
  font-size: 24px;
}

.night-event-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  flex: 1;
}

.night-event-category {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(124, 92, 191, 0.6);
  background: rgba(124, 92, 191, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
}

.night-event-body {
  margin-bottom: 18px;
}

.night-event-body p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
  margin: 0 0 10px;
}

.night-event-body p:last-child {
  margin-bottom: 0;
}

.night-event-companions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.night-comp-tag {
  font-size: 12px;
  padding: 4px 10px;
  background: rgba(124, 92, 191, 0.1);
  border: 1px solid rgba(124, 92, 191, 0.2);
  border-radius: 20px;
  color: var(--text-primary);
}

.night-event-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.night-choice-btn {
  width: 100%;
  padding: 12px 16px;
  background: rgba(124, 92, 191, 0.08);
  border: 1px solid rgba(124, 92, 191, 0.2);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.5;
}

.night-choice-btn:hover {
  background: rgba(124, 92, 191, 0.18);
  border-color: rgba(124, 92, 191, 0.45);
  box-shadow: 0 0 16px rgba(124, 92, 191, 0.12);
  transform: translateX(4px);
}

.night-dismiss-btn {
  display: block;
  width: 100%;
  padding: 8px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.night-dismiss-btn:hover {
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ── Dispatch Board ─────────────────────────────────────── */
.dispatch-board {
  margin-top: 20px;
  border-top: 1px solid rgba(124, 92, 191, 0.15);
  padding-top: 16px;
}

.dispatch-section {
  margin-bottom: 16px;
}

.dispatch-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.dispatch-mission-card {
  background: var(--bg-card);
  border: 1px solid rgba(124, 92, 191, 0.15);
  border-radius: var(--border-radius);
  padding: 12px 16px;
  margin-bottom: 8px;
}

.dispatch-mission-card.dispatch-active {
  border-left: 3px solid var(--accent-gold);
}

.dispatch-mission-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.dispatch-type-icon {
  font-size: 18px;
}

.dispatch-mission-name {
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.dispatch-days-left {
  font-size: 11px;
  color: var(--accent-gold);
  font-family: var(--font-mono);
}

.dispatch-risk {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 3px;
}

.dispatch-risk-low {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.dispatch-risk-high {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.dispatch-risk-none {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
}

.dispatch-mission-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.dispatch-mission-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.dispatch-mission-crew {
  font-size: 12px;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.dispatch-companion-select {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.dispatch-comp-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  background: rgba(124, 92, 191, 0.06);
  border: 1px solid rgba(124, 92, 191, 0.12);
  border-radius: 4px;
  transition: all 0.2s;
}

.dispatch-comp-label:hover {
  background: rgba(124, 92, 191, 0.12);
  border-color: rgba(124, 92, 191, 0.3);
}

.dispatch-comp-label input[type="checkbox"] {
  accent-color: var(--accent-main);
}

.dispatch-start-btn {
  margin-top: 4px;
}

.dispatch-cancel-btn {
  margin-top: 4px;
  font-size: 11px;
}

.dispatch-no-companions {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin: 6px 0;
}

.dispatch-empty {
  text-align: center;
  padding: 16px;
}

.dispatch-report-card {
  padding: 10px 14px;
  border-radius: var(--border-radius);
  margin-bottom: 6px;
  border-left: 3px solid transparent;
}

.dispatch-great {
  border-left-color: #fbbf24;
  background: rgba(251, 191, 36, 0.06);
}

.dispatch-success {
  border-left-color: #4ade80;
  background: rgba(74, 222, 128, 0.06);
}

.dispatch-partial {
  border-left-color: #fb923c;
  background: rgba(251, 146, 60, 0.06);
}

.dispatch-failure {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}

.dispatch-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.dispatch-outcome-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.dispatch-report-narrative {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 6px;
}

.dispatch-report-rewards {
  font-size: 12px;
  color: var(--accent-gold);
}

/* ── Room Action Button ──────────────────────────────────── */
.room-action-section {
  margin: 14px 0;
  padding: 10px 14px;
  background: rgba(124, 92, 191, 0.08);
  border-radius: var(--border-radius);
  border: 1px solid rgba(124, 92, 191, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}

.room-action-btn {
  min-width: 140px;
  white-space: nowrap;
  background: rgba(124, 92, 191, 0.15);
  border: 1px solid rgba(124, 92, 191, 0.3);
  color: var(--accent-main);
  font-weight: 600;
}

.room-action-btn:hover:not(:disabled) {
  background: rgba(124, 92, 191, 0.25);
  box-shadow: 0 0 12px rgba(124, 92, 191, 0.2);
}

.room-action-cooldown {
  opacity: 0.4;
  cursor: not-allowed;
}

.room-action-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Mansion Night Mode ──────────────────────────────────── */
.mansion-night {
  background: linear-gradient(180deg, rgba(20, 15, 40, 0.8) 0%, rgba(10, 8, 25, 0.4) 100%);
  border-radius: var(--border-radius);
  padding: 2px;
}

.mansion-night-header {
  background: linear-gradient(135deg, rgba(80, 40, 160, 0.25), rgba(30, 15, 80, 0.3));
  border: 1px solid rgba(124, 92, 191, 0.2);
  border-radius: var(--border-radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  text-align: center;
}

.night-sky-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.night-moon {
  font-size: 24px;
  animation: moonPulse 3s ease-in-out infinite;
}

@keyframes moonPulse {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.4);
  }
}

.night-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.night-actions-badge {
  background: rgba(124, 92, 191, 0.3);
  border: 1px solid rgba(124, 92, 191, 0.5);
  color: var(--accent-main);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.night-flavor {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
  margin: 0;
}

/* ── Companion Carousel ──────────────────────────────────── */
.mansion-comp-carousel {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 92, 191, 0.3) transparent;
}

.comp-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  padding: 8px 6px;
  background: var(--bg-card);
  border: 1px solid rgba(124, 92, 191, 0.12);
  border-radius: var(--border-radius);
  transition: all 0.2s;
  cursor: default;
}

.comp-badge:hover {
  border-color: rgba(124, 92, 191, 0.35);
  transform: translateY(-2px);
}

.comp-unhoused {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.04);
}

.comp-badge-portrait {
  font-size: 22px;
  margin-bottom: 2px;
}

.comp-badge-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}

.comp-badge-indicators {
  display: flex;
  align-items: center;
  gap: 3px;
}

.comp-badge-heart {
  font-size: 10px;
}

.comp-room-icon {
  font-size: 10px;
}

.comp-unhoused-tag {
  font-size: 10px;
  color: #ef4444;
}

.comp-corr-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.corr-low {
  background: #4ade80;
}

.corr-med {
  background: #fb923c;
}

.corr-high {
  background: #ef4444;
}

.corr-critical {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
  animation: corrPulse 1s ease-in-out infinite;
}

@keyframes corrPulse {

  0%,
  100% {
    box-shadow: 0 0 4px #ef4444;
  }

  50% {
    box-shadow: 0 0 10px #ef4444;
  }
}

/* ── Corruption Pressure Bar ─────────────────────────────── */
.corruption-pressure-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--border-radius);
  margin-bottom: 12px;
}

.corr-bar-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.corr-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.corr-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease, background 0.5s ease;
}

.corr-bar-value {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  min-width: 30px;
  text-align: right;
}

/* ── Mission Ticker ──────────────────────────────────────── */
.mission-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.12);
  border-radius: var(--border-radius);
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--accent-gold);
}

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

.ticker-dot {
  background: rgba(251, 191, 36, 0.15);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ── Activity Feed ───────────────────────────────────────── */
.mansion-activity-feed {
  margin-bottom: 14px;
}

.activity-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(124, 92, 191, 0.04);
  border-left: 2px solid rgba(124, 92, 191, 0.2);
  margin-bottom: 4px;
  border-radius: 0 4px 4px 0;
}

.activity-icon {
  font-size: 14px;
  flex-shrink: 0;
  padding-top: 1px;
}

.activity-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  font-style: italic;
}

/* ── Room Card Quick Actions ─────────────────────────────── */
.mansion-room-card {
  position: relative;
}

.room-action-ready {
  box-shadow: inset 0 0 0 1px rgba(124, 92, 191, 0.25);
}

.room-quick-action {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(124, 92, 191, 0.15);
  border: 1px solid rgba(124, 92, 191, 0.3);
  color: var(--accent-main);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.room-quick-action:hover {
  background: rgba(124, 92, 191, 0.3);
  box-shadow: 0 0 12px rgba(124, 92, 191, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.room-qa-cooldown {
  opacity: 0.25;
  pointer-events: none;
}

.room-comp-mini {
  font-size: 14px;
  margin-right: 2px;
}

.room-empty-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── End Night Button ────────────────────────────────────── */
.mansion-end-night-btn {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 146, 60, 0.15));
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--accent-gold);
  font-weight: 600;
}

.mansion-end-night-btn:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(251, 146, 60, 0.25));
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.15);
}

/* ── Production System ───────────────────────────────────── */
.production-stash-badge {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(22, 163, 74, 0.04));
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--border-radius);
  padding: 12px 16px;
  margin-bottom: 12px;
}

.stash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.stash-count {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-family: var(--font-mono);
}

.stash-preview {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.stash-collect-btn {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.stash-collect-btn:hover {
  background: rgba(34, 197, 94, 0.25);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.15);
}

.room-production {
  border-left: 2px solid rgba(34, 197, 94, 0.3);
}

.production-tag {
  font-size: 10px;
  color: #4ade80;
  font-weight: 500;
  margin-left: 4px;
}

.prod-active-tag {
  font-size: 10px;
  color: #4ade80;
  margin-left: 6px;
  animation: prodSpin 2s linear infinite;
}

@keyframes prodSpin {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.5;
  }
}

/* ── Production Room Interior ────────────────────────────── */
.prod-info-panel {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.06), rgba(22, 163, 74, 0.03));
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: var(--border-radius);
  padding: 16px;
  margin: 12px 0;
}

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

.prod-info-icon {
  font-size: 18px;
}

.prod-info-title {
  font-size: 14px;
  font-weight: 600;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.prod-info-stat {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.prod-info-stat strong {
  color: var(--accent-main);
}

.prod-recipe-tiers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prod-recipe-tier {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 10px 12px;
}

.prod-tier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.prod-tier-name {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.prod-tier-range {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.prod-tier-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.prod-item-tag {
  background: rgba(124, 92, 191, 0.1);
  border: 1px solid rgba(124, 92, 191, 0.15);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.prod-item-tag small {
  color: var(--text-muted);
  margin-left: 2px;
}

.prod-stash-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: var(--border-radius);
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 13px;
  color: #4ade80;
}

.prod-worker-stat {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 4px 0;
}

.prod-worker-stat strong {
  color: var(--accent-main);
}

.prod-worker-tier {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(124, 92, 191, 0.15);
  color: var(--accent-main);
}

.prod-assign-stat {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent-main);
  background: rgba(124, 92, 191, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
}

.prod-no-workers {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 0;
}

/* ── Risk Legend ───────────────────── */
.prod-risk-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0;
  font-size: 12px;
}

.risk-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.risk-row small {
  color: var(--text-muted);
}

.risk-disaster {
  color: #ef4444;
}

.risk-basic {
  color: #60a5fa;
}

.risk-great {
  color: #a855f7;
}

/* ── Item Pools ───────────────────── */
.prod-item-pools {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-secondary);
}

.pool-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 4px;
}

.pool-mw {
  color: #fbbf24;
}

/* ── Odds Tags ──────────────────── */
.prod-odds-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0;
}

.odds-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
}

.odds-disaster {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.odds-junk {
  background: rgba(156, 163, 175, 0.12);
  color: #9ca3af;
}

.odds-basic {
  background: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
}

.odds-good {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.odds-great {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
}

.odds-mw {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

/* ── XP Bar ─────────────────────── */
.comp-xp-bar {
  position: relative;
  height: 14px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 7px;
  margin: 6px 0;
  overflow: hidden;
}

.comp-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: 7px;
  transition: width 0.3s ease;
}

.comp-xp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  font-family: var(--font-mono);
}

/* ── Produce Button ─────────────── */
.prod-btn {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.prod-btn:hover {
  box-shadow: 0 0 12px rgba(5, 150, 105, 0.4);
  transform: translateY(-1px);
}

.prod-btn-disabled {
  background: rgba(75, 85, 99, 0.3);
  color: var(--text-muted);
  cursor: not-allowed;
}

.prod-btn-disabled:hover {
  box-shadow: none;
  transform: none;
}

/* ── Worker Card Layout ─────────── */
.worker-card {
  border-left: 3px solid #059669;
}

.worker-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.specialty-match {
  font-size: 10px;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
}

/* Save export row */
.save-export-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

/* Mansion error */
.mansion-error {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
  font-style: italic;
}

/* ============================================================
   AWAKENING — Cinematic Sequence
   ============================================================ */
.awakening-screen {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  gap: 32px;
}

.awakening-progress {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.awakening-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-gold));
  transition: width 0.4s ease;
}

/* SHADOW speech */
.awakening-shadow {
  padding: 32px;
  background: radial-gradient(ellipse at center, rgba(26, 26, 46, 0.9) 0%, rgba(10, 10, 15, 0.95) 100%);
  border: 1px solid rgba(124, 92, 191, 0.3);
  border-radius: 12px;
  box-shadow:
    0 0 40px rgba(124, 92, 191, 0.15),
    inset 0 0 30px rgba(0, 0, 0, 0.4);
  animation: shadow-entrance 0.6s ease-out;
}

.awakening-shadow-eye {
  font-size: 48px;
  margin-bottom: 8px;
  animation: eye-pulse 2s ease-in-out infinite;
}

.awakening-shadow-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 6px;
  color: var(--accent-primary-glow);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.awakening-shadow-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--accent-primary-glow);
  font-style: italic;
  text-shadow: 0 0 20px rgba(157, 125, 232, 0.3);
}

/* Narration */
.awakening-narration {
  padding: 32px;
  animation: narration-fade 0.8s ease-out;
}

.awakening-narration-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 500px;
}

/* Continue button */
.awakening-continue {
  background: rgba(124, 92, 191, 0.15);
  border: 1px solid rgba(124, 92, 191, 0.3);
  color: var(--accent-primary-glow);
  padding: 14px 36px;
  font-size: 15px;
}

.awakening-continue:hover {
  background: rgba(124, 92, 191, 0.25);
  box-shadow: 0 0 20px rgba(124, 92, 191, 0.2);
}

@keyframes shadow-entrance {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes eye-pulse {

  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.1);
    filter: brightness(1.3);
  }
}

@keyframes narration-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   CHARACTER CREATION — Forge / Trial / Reveal
   ============================================================ */

/* ── FORGE SCREEN ────────────────────────────────────────── */
.forge-screen {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  animation: narration-fade 0.5s ease;
}

.forge-content {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.forge-form {
  flex: 1;
  min-width: 0;
}

.forge-preview {
  position: sticky;
  top: 20px;
  flex: 0 0 240px;
}

.forge-header {
  text-align: center;
  margin-bottom: 28px;
}

.forge-eye {
  font-size: 36px;
  margin-bottom: 4px;
  animation: eye-pulse 2s ease-in-out infinite;
}

.forge-title {
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 8px;
  color: var(--accent-primary-glow);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.forge-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.forge-subtitle em {
  color: var(--accent-primary-glow);
  font-style: italic;
}

.forge-section {
  margin-bottom: 18px;
}

.forge-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.forge-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid rgba(124, 92, 191, 0.2);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-ui);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.forge-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(124, 92, 191, 0.2);
}

.forge-input::placeholder {
  color: var(--text-muted);
}

/* Pill Selectors */
.forge-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.forge-pills-race {
  gap: 8px;
}

.forge-pill {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid rgba(124, 92, 191, 0.12);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.forge-pill:hover {
  border-color: rgba(124, 92, 191, 0.4);
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.forge-pill.selected {
  background: rgba(124, 92, 191, 0.2);
  border-color: var(--accent-primary);
  color: var(--accent-primary-glow);
  box-shadow: 0 0 10px rgba(124, 92, 191, 0.15);
  font-weight: 600;
}

.forge-pill-race {
  padding: 8px 16px;
  font-size: 13px;
}

.forge-pill-emoji {
  margin-right: 4px;
}

.forge-race-flavor {
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent-primary-glow);
  font-style: italic;
  padding-left: 4px;
  animation: narration-fade 0.3s ease;
}

.forge-next-btn {
  margin-top: 24px;
  width: 100%;
  background: linear-gradient(135deg, rgba(124, 92, 191, 0.2), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(124, 92, 191, 0.35);
  color: var(--accent-primary-glow);
  font-size: 15px;
  font-weight: 600;
  padding: 14px;
  transition: all 0.3s;
}

.forge-next-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(124, 92, 191, 0.35), rgba(168, 85, 247, 0.25));
  box-shadow: 0 0 20px rgba(124, 92, 191, 0.2);
  transform: translateY(-1px);
}

.forge-next-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Preview Card */
.char-preview-card {
  background: linear-gradient(160deg, #0f0a1a 0%, #1a0d2e 100%);
  border: 1px solid rgba(124, 92, 191, 0.25);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  box-shadow:
    0 0 40px rgba(124, 92, 191, 0.1),
    inset 0 0 20px rgba(0, 0, 0, 0.3);
  animation: sceneReveal 0.4s ease;
}

.preview-portrait {
  font-size: 48px;
  margin-bottom: 8px;
}

.preview-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.preview-subtitle {
  font-size: 12px;
  color: var(--accent-primary-glow);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.preview-flavor {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 14px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border-left: 2px solid rgba(124, 92, 191, 0.3);
}

.preview-badge {
  font-size: 11px;
  color: var(--text-muted);
}

.preview-class-tbd {
  color: var(--accent-primary-glow);
  font-style: italic;
}

/* ── TRIAL SCREEN ────────────────────────────────────────── */
.trial-screen {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 70vh;
  justify-content: center;
  gap: 24px;
  padding: 20px;
}

.trial-progress {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.trial-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), #ec4899);
  transition: width 0.4s ease;
}

.trial-step-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 2px;
}

/* SHADOW question box */
.trial-shadow-box {
  padding: 32px;
  background: radial-gradient(ellipse at center, rgba(26, 26, 46, 0.9) 0%, rgba(10, 10, 15, 0.95) 100%);
  border: 1px solid rgba(124, 92, 191, 0.3);
  border-radius: 12px;
  box-shadow:
    0 0 40px rgba(124, 92, 191, 0.15),
    inset 0 0 30px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: shadow-entrance 0.6s ease-out;
  width: 100%;
}

.trial-shadow-eye {
  font-size: 42px;
  margin-bottom: 6px;
  animation: eye-pulse 2s ease-in-out infinite;
}

.trial-shadow-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 6px;
  color: var(--accent-primary-glow);
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* Normal question box */
.trial-question-box {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid rgba(124, 92, 191, 0.15);
  border-radius: 12px;
  text-align: center;
  animation: shadow-entrance 0.5s ease-out;
  width: 100%;
}

.trial-q-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.trial-prompt {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  font-style: italic;
}

/* Choice buttons */
.trial-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.trial-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(124, 92, 191, 0.12);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 14px;
}

.trial-choice:hover {
  border-color: rgba(124, 92, 191, 0.4);
  background: var(--bg-hover);
  transform: translateX(4px);
  box-shadow: 0 0 16px rgba(124, 92, 191, 0.1);
}

/* D option — the degenerate choice */
.trial-choice-d {
  border-color: rgba(239, 68, 68, 0.15);
  background: rgba(239, 68, 68, 0.03);
}

.trial-choice-d:hover {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

/* Cursed question box — helicopter exclusive */
.trial-cursed-box {
  padding: 32px;
  background: radial-gradient(ellipse at center, rgba(60, 10, 10, 0.9) 0%, rgba(15, 5, 5, 0.95) 100%);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 12px;
  box-shadow:
    0 0 40px rgba(239, 68, 68, 0.2),
    0 0 80px rgba(245, 158, 11, 0.08),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: cursed-entrance 0.6s ease-out;
  width: 100%;
}

.trial-cursed-icon {
  font-size: 42px;
  margin-bottom: 6px;
  animation: cursed-spin 3s linear infinite;
}

.trial-cursed-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 8px;
  color: #ef4444;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
  animation: cursed-flicker 2s ease-in-out infinite;
}

.trial-cursed-box .trial-prompt {
  color: #fca5a5;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

/* Cursed choice buttons */
.trial-choice-cursed {
  border-color: rgba(245, 158, 11, 0.15);
  background: rgba(245, 158, 11, 0.02);
}

.trial-choice-cursed:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.06);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
}

.trial-choice-cursed.trial-choice-d {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.05);
}

.trial-choice-cursed.trial-choice-d:hover {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.12);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.15);
}

@keyframes cursed-entrance {
  from {
    opacity: 0;
    transform: scale(0.85) rotate(-1deg);
    filter: hue-rotate(20deg);
  }

  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: hue-rotate(0deg);
  }
}

@keyframes cursed-spin {
  0% {
    transform: rotate(0deg) scale(1);
  }

  25% {
    transform: rotate(5deg) scale(1.05);
  }

  50% {
    transform: rotate(0deg) scale(1);
  }

  75% {
    transform: rotate(-5deg) scale(1.05);
  }

  100% {
    transform: rotate(0deg) scale(1);
  }
}

@keyframes cursed-flicker {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }

  75% {
    opacity: 1;
  }

  85% {
    opacity: 0.4;
  }

  90% {
    opacity: 1;
  }
}

/* Gender-themed question box — uses CSS custom props set per gender */
.trial-themed-box {
  padding: 32px;
  background: radial-gradient(ellipse at center, rgba(var(--theme-rgb, 124, 92, 191), 0.08) 0%, rgba(10, 10, 15, 0.95) 100%);
  border: 1px solid rgba(var(--theme-rgb, 124, 92, 191), 0.35);
  border-radius: 12px;
  box-shadow:
    0 0 40px rgba(var(--theme-rgb, 124, 92, 191), 0.12),
    inset 0 0 30px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: themed-entrance 0.6s ease-out;
  width: 100%;
}

.trial-themed-icon {
  font-size: 42px;
  margin-bottom: 6px;
  animation: themed-pulse 2s ease-in-out infinite;
}

.trial-themed-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.trial-themed-box .trial-prompt {
  text-shadow: 0 0 10px rgba(var(--theme-rgb, 124, 92, 191), 0.1);
}

/* Themed choice hover */
.trial-choice-themed {
  border-color: rgba(var(--theme-rgb, 124, 92, 191), 0.12);
}

.trial-choice-themed:hover {
  border-color: rgba(var(--theme-rgb, 124, 92, 191), 0.4);
  background: rgba(var(--theme-rgb, 124, 92, 191), 0.06);
  box-shadow: 0 0 16px rgba(var(--theme-rgb, 124, 92, 191), 0.1);
}

.trial-choice-themed.trial-choice-d {
  border-color: rgba(var(--theme-rgb, 124, 92, 191), 0.2);
  background: rgba(var(--theme-rgb, 124, 92, 191), 0.04);
}

.trial-choice-themed.trial-choice-d:hover {
  border-color: rgba(var(--theme-rgb, 124, 92, 191), 0.5);
  background: rgba(var(--theme-rgb, 124, 92, 191), 0.1);
  box-shadow: 0 0 24px rgba(var(--theme-rgb, 124, 92, 191), 0.15);
}

@keyframes themed-entrance {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes themed-pulse {

  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.08);
    filter: brightness(1.2);
  }
}

.trial-letter {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 92, 191, 0.15);
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--accent-primary-glow);
}

.trial-choice-d .trial-letter {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.trial-text {
  flex: 1;
  line-height: 1.5;
}

.trial-flavor {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  align-self: center;
}

/* ── REVEAL SCREEN ───────────────────────────────────────── */
.reveal-screen {
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 20px;
  min-height: 70vh;
  justify-content: center;
}

.reveal-shadow-intro {
  text-align: center;
  animation: narration-fade 0.8s ease;
}

.reveal-eye {
  font-size: 48px;
  margin-bottom: 8px;
  animation: eye-pulse 2s ease-in-out infinite;
}

.reveal-shadow-text {
  font-size: 16px;
  color: var(--accent-primary-glow);
  font-style: italic;
  text-shadow: 0 0 20px rgba(157, 125, 232, 0.3);
  line-height: 1.6;
}

/* Character card */
.reveal-card {
  background: linear-gradient(160deg, #0f0a1a 0%, #1a0d2e 100%);
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-radius: 20px;
  padding: 32px 28px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 0 60px rgba(168, 85, 247, 0.15),
    0 0 120px rgba(236, 72, 153, 0.08);
  animation: sceneReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation-delay: 0.3s;
  animation-fill-mode: both;
}

.reveal-portrait {
  font-size: 56px;
  margin-bottom: 6px;
}

.reveal-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.reveal-subtitle {
  font-size: 12px;
  color: var(--accent-primary-glow);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.reveal-class {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #f472b6;
  background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.2);
  padding: 6px 20px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
}

.reveal-passive {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 20px;
  padding: 0 10px;
}

/* Stat bars */
.reveal-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  text-align: left;
}

.reveal-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reveal-stat-name {
  flex: 0 0 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.reveal-stat-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.reveal-stat-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
  animation: statGrow 0.8s ease forwards;
}

@keyframes statGrow {
  from {
    width: 0;
  }
}

.reveal-stat-val {
  flex: 0 0 60px;
  font-size: 11px;
  font-family: var(--font-mono);
  text-align: right;
}

/* Quirk badge */
.reveal-quirk {
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.15);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 14px;
  text-align: left;
}

.reveal-quirk-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-right: 6px;
}

.reveal-quirk-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-right: 8px;
}

.reveal-quirk-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Corruption badge */
.reveal-corruption {
  font-size: 12px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 14px;
}

.reveal-flavor {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.7;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border-left: 2px solid rgba(168, 85, 247, 0.3);
}

/* Trial-Born Companion card on reveal screen */
.reveal-companion-card {
  margin-top: 16px;
  padding: 20px;
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.06) 0%, rgba(10, 10, 15, 0.95) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  text-align: center;
  animation: themed-entrance 0.8s ease-out;
  width: 100%;
}

.reveal-companion-shadow {
  border-color: rgba(245, 158, 11, 0.4);
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.06) 0%, rgba(10, 10, 15, 0.95) 100%);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.1);
}

.reveal-companion-header {
  margin-bottom: 8px;
}

.reveal-companion-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #a855f7;
  padding: 3px 10px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
}

.reveal-companion-shadow .reveal-companion-badge {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.reveal-companion-name {
  font-size: 22px;
  font-weight: 700;
  margin-top: 10px;
  color: #e2e8f0;
}

.reveal-companion-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a855f7;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.reveal-companion-shadow .reveal-companion-title {
  color: #f59e0b;
}

.reveal-companion-personality {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
  padding: 0 8px;
}

.reveal-companion-accept {
  font-size: 13px;
  color: var(--text-primary);
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border-left: 2px solid rgba(168, 85, 247, 0.4);
  margin-bottom: 12px;
}

.reveal-companion-shadow .reveal-companion-accept {
  border-left-color: rgba(245, 158, 11, 0.4);
}

.reveal-companion-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reveal-companion-stat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

/* ── Cursed Skills Reveal Card ─────────────────────────── */
.reveal-cursed-skills {
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.15), rgba(0, 0, 0, 0.3));
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.1);
  animation: narration-fade 0.5s ease;
  animation-delay: 0.6s;
  animation-fill-mode: both;
}

.reveal-cursed-header {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ef4444;
  margin-bottom: 4px;
}

.reveal-cursed-subtitle {
  text-align: center;
  font-style: italic;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

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

.reveal-cursed-skill {
  padding: 10px 12px;
  border-left: 3px solid #dc2626;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 6px 6px 0;
}

.reveal-cursed-skill-name {
  font-weight: 600;
  font-size: 14px;
  color: #fca5a5;
  margin-bottom: 3px;
}

.reveal-cursed-skill-desc {
  font-size: 12px;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.reveal-cursed-skill-curse {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #f87171;
  opacity: 0.85;
}

/* Action buttons */
.reveal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  animation: narration-fade 0.6s ease;
  animation-delay: 0.8s;
  animation-fill-mode: both;
}

.reveal-begin {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(236, 72, 153, 0.35);
  color: #f472b6;
  font-size: 16px;
  font-weight: 700;
  padding: 16px;
  transition: all 0.3s;
}

.reveal-begin:hover {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.35), rgba(168, 85, 247, 0.25));
  box-shadow: 0 0 30px rgba(236, 72, 153, 0.2);
  transform: translateY(-2px);
}

.reveal-challenge {
  background: transparent;
  border: 1px solid rgba(124, 92, 191, 0.15);
  color: var(--text-muted);
  font-size: 12px;
  padding: 10px;
}

.reveal-challenge:hover {
  border-color: rgba(124, 92, 191, 0.3);
  color: var(--text-secondary);
}

/* ── Responsive: stack preview below on narrow screens ──── */
@media (max-width: 700px) {
  .forge-content {
    flex-direction: column-reverse;
  }

  .forge-preview {
    position: relative;
    top: 0;
    flex: none;
    width: 100%;
  }
}

/* ── COMPANION PROFILE PROTOTYPE ── */
.comp-profile-card {
  width: 100%;
  /* Take full width of paperdoll area */
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.comp-profile-card:hover {
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.7), 0 0 20px rgba(168, 85, 247, 0.15);
}

.comp-profile-card .card-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.comp-profile-card .header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.comp-profile-card .portrait-wrap {
  display: flex;
  gap: 16px;
  align-items: center;
}

.comp-profile-card .portrait {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #1e1b4b, #2e1065);
  border: 2px solid var(--accent-primary);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 36px;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.15), inset 0 0 10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.comp-profile-card .portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comp-profile-card .name-block h1 {
  margin: 0;
  font-family: var(--font-display, serif);
  font-size: 26px;
  color: var(--text-primary);
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.comp-profile-card .name-block .title {
  margin: 4px 0 0 0;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 14px;
}

.comp-profile-card .name-block .tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.comp-profile-card .tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-weight: 500;
}

.comp-profile-card .affection-badge {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.comp-profile-card .affection-badge .icon {
  font-size: 24px;
  filter: drop-shadow(0 0 5px var(--accent-primary));
  animation: pulse-aff 2s infinite ease-in-out;
}

@keyframes pulse-aff {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 5px var(--accent-primary));
  }

  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px var(--accent-primary));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 5px var(--accent-primary));
  }
}

.comp-profile-card .affection-badge .label {
  font-size: 12px;
  color: #d8b4fe;
  font-weight: 600;
  margin-top: 8px;
}

.comp-profile-card .affection-badge .sub-label {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.comp-profile-card .stats-row-prof {
  display: flex;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 24px;
}

.comp-profile-card .stat-bar-container {
  flex: 1;
}

.comp-profile-card .stat-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
}

.comp-profile-card .stat-label span:last-child {
  font-family: monospace;
  font-size: 12px;
}

.comp-profile-card .bar-bg {
  height: 6px;
  background: #000;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.comp-profile-card .bar-fill {
  height: 100%;
  border-radius: 3px;
  position: relative;
}

.comp-profile-card .bar-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer-bar 2s infinite linear;
}

@keyframes shimmer-bar {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.comp-profile-card .prof-bar-hp {
  background: var(--hp-color);
  box-shadow: 0 0 8px var(--hp-color);
}

.comp-profile-card .prof-bar-xp {
  background: var(--xp-color);
  box-shadow: 0 0 8px var(--xp-color);
}

.comp-profile-card .nav-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.1);
}

.comp-profile-card .tab {
  padding: 16px 20px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-weight: 500;
}

.comp-profile-card .tab:hover {
  color: var(--text-primary);
}

.comp-profile-card .tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.comp-profile-card .card-body {
  padding: 24px;
}

.comp-profile-card .section-prof-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-primary);
  margin: 0 0 12px 0;
  font-weight: 600;
}

.comp-profile-card .flavor-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.comp-profile-card .flavor-text strong {
  color: #e4e4e7;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 4px;
}

.comp-profile-card .quirk-text {
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(168, 85, 247, 0.15);
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 2px solid var(--accent-primary);
  font-size: 13px;
  margin-bottom: 24px;
}

.comp-profile-card .details-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

.comp-profile-card .attributes {
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.comp-profile-card .attr-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  padding-bottom: 4px;
}

.comp-profile-card .attr-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.comp-profile-card .attr-row .lbl {
  color: #9ca3af;
}

.comp-profile-card .attr-row .val {
  color: #e8e6f0;
  font-family: monospace;
  font-size: 14px;
}

.comp-profile-card .equip-slot-prof {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.2s;
  position: relative;
}

.comp-profile-card .equip-slot-prof:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.comp-profile-card .equip-icon-prof {
  width: 36px;
  height: 36px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
}

.comp-profile-card .equip-info-prof {
  display: flex;
  flex-direction: column;
}

.comp-profile-card .equip-type-prof {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.comp-profile-card .equip-name-prof {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.comp-profile-card .card-footer {
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 12px;
}

.comp-profile-card .btn-prof {
  flex: 1;
  padding: 12px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.comp-profile-card .btn-prof:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.comp-profile-card .unequip-btn-prof {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--accent-danger);
  font-size: 16px;
  cursor: pointer;
  opacity: 0.7;
}

.comp-profile-card .unequip-btn-prof:hover {
  opacity: 1;
  transform: scale(1.1) translateY(-50%);
}

/* ── FORGE REVEAL ANIMATION ─────────────────────────────── */
@keyframes forgeReveal {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }

  50% {
    opacity: 1;
    transform: scale(1.03);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hot-item-card {
  animation: hotItemGlow 3s ease-in-out infinite;
}

@keyframes hotItemGlow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.1), inset 0 0 30px rgba(251, 191, 36, 0.03);
  }

  50% {
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.2), inset 0 0 40px rgba(251, 191, 36, 0.06);
  }
}

/* ── GACHA SLOT MACHINE ─────────────────────────────────── */
@keyframes gachaCardSpin {
  0% {
    transform: rotateY(0deg) scale(1);
  }

  25% {
    transform: rotateY(90deg) scale(0.95);
  }

  50% {
    transform: rotateY(180deg) scale(1);
  }

  75% {
    transform: rotateY(270deg) scale(0.95);
  }

  100% {
    transform: rotateY(360deg) scale(1);
  }
}

@keyframes gachaCardReveal {
  0% {
    opacity: 0;
    transform: rotateY(90deg) scale(0.8);
  }

  50% {
    opacity: 1;
    transform: rotateY(-10deg) scale(1.05);
  }

  100% {
    opacity: 1;
    transform: rotateY(0deg) scale(1);
  }
}

@keyframes legendaryPulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3), inset 0 0 20px rgba(251, 191, 36, 0.05);
  }

  50% {
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.6), inset 0 0 30px rgba(251, 191, 36, 0.1);
  }
}

.gacha-card {
  perspective: 400px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.gacha-card:hover {
  transform: translateY(-4px) scale(1.04);
  z-index: 2;
}

.gacha-card-hidden {
  perspective: 400px;
}

.screen-shake {
  animation: screenShakeGacha 0.5s ease;
}

@keyframes screenShakeGacha {

  0%,
  100% {
    transform: translateX(0);
  }

  10% {
    transform: translateX(-6px) translateY(2px);
  }

  20% {
    transform: translateX(5px) translateY(-3px);
  }

  30% {
    transform: translateX(-4px) translateY(1px);
  }

  40% {
    transform: translateX(6px) translateY(-2px);
  }

  50% {
    transform: translateX(-3px);
  }

  60% {
    transform: translateX(4px);
  }

  70% {
    transform: translateX(-2px);
  }

  80% {
    transform: translateX(1px);
  }
}