/* ==========================================================================
   Brixgate Studio: Color Slide — UI Vault #9 `indigo_arcade_gloss` Edition
   Royal Indigo Velvet (#18153B / #242053) + High-Gloss Candy Arcade 9-Slice
   Zero backdrop-filter: blur() | Zero shadowBlur | 9-Lang Overflow-Safe
   ========================================================================== */

:root {
  --indigo-deep: #141132;
  --indigo-velvet: #18153B;
  --indigo-surface: #242053;
  --indigo-panel: #261462;
  --indigo-sub: #221B6E;
  --indigo-pill: #191364;
  --indigo-border: #3B5BDB;
  --cyan-glow: #38BDF8;
  --gold-accent: #FACC15;
  --emerald-cta: #22C55E;
  --ruby-danger: #EF4444;
  --text-light: #FFFFFF;
  --text-soft: #DBEAFE;
  --text-gold: #FEF08A;

  --brick-red: #EF4444;
  --brick-blue: #2563EB;
  --brick-green: #22C55E;
  --brick-amber: #F59E0B;
  --brick-purple: #A855F7;
  --brick-cyan: #06B6D4;

  --font-display: 'Lilita One', 'Fredoka', 'Segoe UI', sans-serif;
  --font-heading: 'Fredoka', 'Outfit', 'Nunito', 'Segoe UI', sans-serif;
  --font-body: 'Outfit', 'Nunito', 'Segoe UI', system-ui, sans-serif;

  /* UI Vault Contract v2.2 — Style #9 indigo_arcade_gloss */
  --tb-slot-style: indigo_arcade_gloss;
  --tb-slot-shape: rect;
  --tb-slot-radius: 18px;
  --tb-slot-chamfer: 0px;
  --tb-slot-inset: 3px 3px 5px 3px;
  --tb-slot-palette: cyan;
  --tb-slot-mode: chaser_slot;
  --tb-slot-daylight: 0;
  --tb-slot-z: 3;
}

*, *::before, *::after {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-drag: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--indigo-velvet);
  font-family: var(--font-body);
  color: var(--text-light);
  -webkit-font-smoothing: antialiased;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--indigo-velvet);
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Genuine 9-Slice Chrome (`assets/ui/vault_indigo_arcade_gloss/`)
   ========================================================================== */

.vault-subpanel,
.studio-subcard {
  box-sizing: border-box;
  background-color: var(--indigo-sub);
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 13px 15px 14px 15px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/frame_subpanel.png') 67 80 72 81 fill / 13px 15px 14px 15px / 0 stretch;
  color: #FFFFFF;
}

.modal-ribbon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 18px;
  min-width: 0;
  max-width: calc(100% - 54px);
  background-color: #D98A12;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 14px 20px 14px 20px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/ribbon_header.png') 95 98 96 100 fill / 14px 20px 14px 20px / 0 stretch;
}

button {
  font-family: var(--font-heading);
  cursor: pointer;
  position: relative;
  overflow: visible !important;
  touch-action: manipulation;
}

/* 4 Glossy 9-Slice Button States */
.btn-jelly {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 14px;
  background-color: #1CA83B;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 12px 15px 13px 15px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/btn_primary.png') 61 63 64 63 fill / 12px 15px 13px 15px / 0 stretch;
  border-radius: 16px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(13px, 0.98vw, 15px);
  line-height: 1.15;
  color: #FFFFFF;
  -webkit-text-stroke: 1.2px #0B3B18;
  text-shadow: 0 2px 0 #0B3B18, 0 3px 6px rgba(10, 12, 34, 0.45);
  transition: transform 0.1s ease, filter 0.12s ease;
  min-width: 0;
  max-width: 100%;
  overflow: visible !important;
}

.btn-jelly:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-jelly:active:not(:disabled) {
  transform: translateY(2px);
}

.btn-jelly-blue {
  background-color: #147CE0;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/btn_secondary.png') 66 67 66 68 fill / 12px 15px 12px 15px / 0 stretch;
  -webkit-text-stroke: 1.2px #0C2D6B;
  text-shadow: 0 2px 0 #0C2D6B, 0 3px 6px rgba(10, 12, 34, 0.45);
}

.btn-jelly-amber {
  background-color: #D98A12;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/ribbon_header.png') 95 98 96 100 fill / 12px 15px 12px 15px / 0 stretch;
  -webkit-text-stroke: 1.3px #421E06;
  text-shadow: 0 2px 0 #421E06, 0 3px 6px rgba(10, 12, 34, 0.45);
}

.btn-jelly-purple {
  background-color: #5B21B6;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/card_epic.png') 50 50 50 50 fill / 11px 13px 11px 13px / 0 stretch;
  -webkit-text-stroke: 1.1px #1E0B4B;
  text-shadow: 0 2px 0 #1E0B4B, 0 3px 6px rgba(10, 12, 34, 0.45);
}

.btn-jelly-red {
  background-color: #DC2626;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/btn_danger.png') 62 64 62 63 fill / 12px 15px 12px 15px / 0 stretch;
  -webkit-text-stroke: 1.2px #5C0E0E;
  text-shadow: 0 2px 0 #5C0E0E, 0 3px 6px rgba(10, 12, 34, 0.45);
}

.btn-jelly-cream,
.btn-jelly:disabled {
  background-color: #363C63;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/btn_disabled.png') 68 69 68 69 fill / 12px 15px 12px 15px / 0 stretch;
  color: #E2E8F0;
  -webkit-text-stroke: 1px #14172E;
  text-shadow: 0 2px 0 #14172E;
}

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

.btn-label {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
  paint-order: stroke fill;
}

.btn-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.38));
}

.hotkey-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(16, 13, 44, 0.85);
  border: 1px solid rgba(147, 197, 253, 0.45);
  color: #FEF08A;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

/* Red-Dot Notification Badge — Unclipped Above Top-Right */
.notify-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FF5A5F 0%, #DC2626 100%);
  border: 2px solid #FFFFFF;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.48);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  z-index: 30;
  pointer-events: none;
  -webkit-text-stroke: 0;
  text-shadow: none;
  animation: notifyPulse 1.6s ease-in-out infinite;
}

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

/* ==========================================================================
   PILLAR 1: HEROIC NO-BOX FULL-BLEED TITLE SCREEN (`0 BOXED_LOGIN_TITLE_SCREEN`)
   ========================================================================== */

#screen-title {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(14px, 2vh, 24px) clamp(18px, 2.8vw, 40px);
  background: url('../assets/art/title_bg.jpg') center center / cover no-repeat;
  z-index: 10;
}

#screen-title::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 68% 54% at 52% 40%, rgba(20, 17, 52, 0.62) 0%, rgba(24, 21, 59, 0.34) 62%, rgba(16, 13, 44, 0.72) 100%),
    linear-gradient(180deg, rgba(16, 13, 44, 0.58) 0%, rgba(24, 21, 59, 0.14) 48%, rgba(16, 13, 44, 0.74) 100%);
  pointer-events: none;
}

.title-top-bar {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.game-logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 16px;
  background-color: #191364;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 14px 10px 14px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/hud_pill.png') 65 46 47 46 fill / 10px 14px 10px 14px / 0 stretch;
  color: #FEF08A;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.badge-mini-ico {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.title-Utility-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.lang-select-pill {
  height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  border: 2.5px solid #60A5FA;
  background: #1A146C;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13.5px;
  box-shadow: 0 4px 10px rgba(10, 10, 32, 0.45);
  cursor: pointer;
}

.lang-select-pill option {
  background: #18153B;
  color: #FFFFFF;
}

/* Strictly NO white/cream rectangle box around title! */
.title-center-stage {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 3.6vw, 52px);
  width: min(94vw, 1260px);
  margin: auto 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.title-mascot-showcase {
  position: relative;
  width: clamp(190px, 18.5vw, 268px);
  height: clamp(190px, 18.5vw, 268px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
}

.title-mascot-showcase::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16%;
  right: 16%;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(12, 10, 36, 0.65) 0%, rgba(12, 10, 36, 0) 72%);
  pointer-events: none;
}

#title-mascot-img {
  position: relative;
  z-index: 2;
  width: 92%;
  height: 92%;
  object-fit: contain;
  transform-origin: 50% 94%;
}

.title-hero-floating {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  max-width: 720px;
  background: transparent !important;
  border: 0 !important;
  border-image: none !important;
  box-shadow: none !important;
  padding: 0;
}

.game-main-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(54px, 4.9vw, 72px);
  line-height: 0.98;
  letter-spacing: 0.6px;
  color: #FFFDF5;
  paint-order: stroke fill;
  -webkit-text-stroke: 4px #120E34;
  text-shadow:
    0 4px 0 #1E1B5E,
    0 8px 0 #0F0C29,
    0 16px 32px rgba(8, 6, 26, 0.85);
}

.game-subtitle-copy {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(16px, 1.3vw, 21px);
  font-weight: 700;
  color: #FEF08A;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.5px #120E34;
  text-shadow: 0 3px 10px rgba(8, 6, 26, 0.85);
}

/* Real 0-100% Boot Loader (9-Slice Bar) */
#boot-loader {
  width: min(84vw, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.boot-bar-shell {
  width: 100%;
  height: 28px;
  background-color: #171D6A;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 8px 12px 8px 12px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/bar_track.png') 66 68 68 68 fill / 8px 12px 8px 12px / 0 stretch;
  overflow: hidden;
}

#boot-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22C55E 0%, #38BDF8 55%, #FACC15 100%);
  transition: width 0.14s ease-out;
}

#boot-bar-label {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 2px 6px rgba(8, 6, 26, 0.85);
  font-variant-numeric: tabular-nums;
}

/* Heroic Title CTA Cluster */
#title-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.title-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  background-color: #191364;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 14px 10px 14px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/hud_pill.png') 65 46 47 46 fill / 10px 14px 10px 14px / 0 stretch;
}

.mode-chip {
  min-height: 36px;
  padding: 5px 18px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #CBD5E1;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
}

.mode-chip.active {
  background: linear-gradient(180deg, #38BDF8 0%, #2563EB 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.55);
}

#btn-title-play {
  min-width: 268px;
  min-height: 66px;
  padding: 8px 38px;
  font-size: clamp(22px, 1.9vw, 28px);
  border-width: 16px 20px 17px 20px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/btn_primary.png') 61 63 64 63 fill / 16px 20px 17px 20px / 0 stretch;
  box-shadow: 0 10px 24px rgba(10, 12, 36, 0.55);
}

.title-bottom-bar {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.title-footer-note {
  padding-left: 82px;
  font-size: 13.5px;
  font-weight: 700;
  color: #E2E8F0;
  text-shadow: 0 2px 6px rgba(10, 8, 30, 0.9);
  white-space: nowrap;
}

.title-secondary-grid {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}

.btn-corner-pill {
  min-height: 44px;
  padding: 4px 14px;
  font-size: 14px;
}

.btn-corner-icon {
  min-height: 42px;
  padding: 4px 12px;
}

/* ==========================================================================
   PILLAR 2: ROYAL INDIGO VELVET FULL-BLEED GAMEPLAY + FLOATING HUD DOCKS
   ========================================================================== */

#screen-game {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  gap: 6px;
  background:
    radial-gradient(circle at 50% 52%, rgba(36, 32, 83, 0.62) 0%, rgba(24, 21, 59, 0.88) 65%, #141132 100%),
    url('../assets/art/arena_bg.jpg') center center / cover no-repeat;
  background-color: var(--indigo-velvet);
  z-index: 5;
}

/* Floating Top Command Clusters (Zero Full-Width Header Bar, flex-wrap: nowrap!) */
.hud-top-strip {
  position: relative;
  z-index: 20;
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap !important;
  pointer-events: none;
}

.hud-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap !important;
  pointer-events: auto;
}

.hud-cluster {
  padding: 3px 8px;
  background-color: rgba(24, 21, 59, 0.72);
  border: 2px solid rgba(96, 165, 250, 0.38);
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(10, 8, 30, 0.45);
}

.btn-hud-compact {
  min-height: 38px;
  padding: 3px 11px;
  border-width: 9px 11px 10px 11px;
  font-size: 13.5px;
  flex-shrink: 0;
}

.btn-hud-icon {
  padding: 3px 9px;
  min-width: 40px;
}

.btn-hud-compact.active-toggle {
  background-color: #1CA83B;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/btn_primary.png') 61 63 64 63 fill / 9px 11px 10px 11px / 0 stretch;
}

.level-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 3px 11px;
  background-color: var(--indigo-pill);
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 9px 12px 9px 12px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/hud_pill.png') 65 46 47 46 fill / 9px 12px 9px 12px / 0 stretch;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.diff-tag {
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  background: #16A34A;
  color: #FFFFFF;
  -webkit-text-stroke: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.diff-tag.hard {
  background: #D97706;
  color: #FFFFFF;
}

.diff-tag.super_hard {
  background: #DC2626;
  color: #FFFFFF;
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 88px;
  min-height: 38px;
  padding: 3px 10px;
  background-color: var(--indigo-pill);
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 9px 12px 9px 12px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/hud_pill.png') 65 46 47 46 fill / 9px 12px 9px 12px / 0 stretch;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timer-pill.frozen {
  border-image: none;
  border: 2px solid #BAE6FD;
  border-radius: 14px;
  background: linear-gradient(180deg, #06B6D4 0%, #0284C7 100%);
}

.timer-pill.danger {
  border-image: none;
  border: 2px solid #FCA5A5;
  border-radius: 14px;
  background: linear-gradient(180deg, #EF4444 0%, #B91C1C 100%);
  animation: timerWarnPulse 0.65s ease-in-out infinite;
}

.timer-pill.relaxed {
  border-image: none;
  border: 2px solid #86EFAC;
  border-radius: 14px;
  background: linear-gradient(180deg, #10B981 0%, #059669 100%);
}

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

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 3px 10px;
  background-color: var(--indigo-pill);
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 8px 11px 8px 11px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/hud_pill.png') 65 46 47 46 fill / 8px 11px 8px 11px / 0 stretch;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #DBEAFE;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat-chip strong {
  color: #FEF08A;
  font-size: 15px;
}

/* Pop-Out Currency Pills (Lesson #3 & #16) */
.currency-pill {
  position: relative;
  overflow: visible !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  margin-left: 8px;
  padding: 2px 11px 2px 6px;
  background-color: var(--indigo-pill);
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 8px 11px 8px 11px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/hud_pill.png') 65 46 47 46 fill / 8px 11px 8px 11px / 0 stretch;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  white-space: nowrap;
}

.currency-pill img {
  width: 28px;
  height: 28px;
  margin: -8px 2px -8px -14px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45));
}

/* Full-Bleed Workspace & Non-Overlapping Floating Docks */
.studio-workspace {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
}

.board-center-column {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 204px;
  right: 270px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

#board-canvas-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

#board-canvas {
  display: block;
  touch-action: none;
  border-radius: 26px;
}

/* Compact Floating Docks (Auto-Height — ZERO Giant Blank Sidebars!) */
.hud-float-dock {
  position: absolute;
  top: 4px;
  z-index: 16;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: auto;
  pointer-events: none;
}

.hud-float-dock > * {
  pointer-events: auto;
}

.hud-float-left {
  left: 0;
  width: 196px;
}

.hud-float-right {
  right: 0;
  width: 262px;
}

.compact-goal-card {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.goal-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

#hud-mascot-canvas {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  background: #141132;
  border: 2px solid #60A5FA;
}

.goal-head-title {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.15;
  color: #FEF08A;
  min-width: 0;
}

.objective-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.obj-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #F8FAFC;
  padding: 4px 8px;
  border-radius: 9px;
  background: rgba(16, 13, 46, 0.72);
  border: 1px solid rgba(96, 165, 250, 0.28);
}

.obj-row strong {
  color: #FEF08A;
  white-space: nowrap;
  flex-shrink: 0;
}

.obj-row.done {
  background: rgba(22, 163, 74, 0.38);
  border-color: #4ADE80;
  color: #DCFCE7;
}

.queue-preview-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.queue-preview-list:empty,
.mechanics-mini-wrap:empty {
  display: none;
}

.queue-item-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 10px;
  background: rgba(16, 13, 46, 0.78);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
}

.queue-mini-swatch {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13.5px;
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}

.empty-inspector-note {
  font-size: 13px;
  font-weight: 600;
  color: #CBD5E1;
  padding: 2px;
}

.mechanic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mech-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(30, 58, 138, 0.85);
  border: 1.5px solid #60A5FA;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
}

.wing-meta-stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.wing-meta-stack > button {
  width: 100%;
  justify-content: flex-start;
}

/* Right Dock: Quick Tools + 76x78px Glossy Square Boosters (Round 5 Ratio: 58-70% Icon!) */
.quick-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quick-tools-grid > * {
  min-width: 0;
  max-width: 100%;
}

.quick-tools-grid .btn-hud-compact {
  padding: 2px 5px;
  border-width: 8px 8px 8px 8px;
  font-size: 13px;
}

.quick-tools-grid .hotkey-pill {
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  font-size: 12px;
  z-index: 6;
  pointer-events: none;
}

.booster-tiles-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
  align-content: start;
}

.booster-tile {
  position: relative;
  overflow: visible !important;
  width: 78px;
  height: 80px;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background-color: #1D5CE0;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 9px 10px 9px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/slot_tile.png') 36 31 34 35 fill / 10px 9px 10px 9px / 0 stretch;
  border-radius: 18px;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.booster-tile:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.08);
}

.booster-tile.armed {
  outline: 3px solid #FEF08A;
  outline-offset: 2px;
  transform: translateY(-3px) scale(1.05);
}

.booster-tile.locked-feature {
  opacity: 0.58;
  filter: grayscale(0.45);
}

.booster-tile-ico {
  width: 48px;
  height: 48px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(8, 8, 28, 0.52));
}

.booster-key-tag {
  position: absolute;
  top: -6px;
  left: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 7px;
  background: #141132;
  border: 1.5px solid #93C5FD;
  color: #FEF08A;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  z-index: 6;
  pointer-events: none;
}

.booster-count-badge {
  position: absolute;
  bottom: -6px;
  right: -6px;
  min-width: 26px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4ADE80 0%, #16A34A 100%);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.45);
  z-index: 8;
  pointer-events: none;
}

.booster-count-badge.empty {
  background: linear-gradient(180deg, #FACC15 0%, #D97706 100%);
  color: #151136;
}

/* Combo Charge & Star Chest Compact Cards */
.combo-meter-card {
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.section-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #DBEAFE;
}

.section-kicker strong {
  color: #FEF08A;
}

.combo-segments {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.combo-seg {
  height: 11px;
  border-radius: 999px;
  background: #141132;
  border: 1.5px solid #4B63C7;
  transition: background 0.16s ease, transform 0.16s ease;
}

.combo-seg.filled {
  background: linear-gradient(90deg, #38BDF8 0%, #4ADE80 55%, #FACC15 100%);
  transform: scaleY(1.14);
}

.star-chest-card {
  width: 100%;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}

.star-chest-card > img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.star-chest-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.booster-name {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booster-desc {
  font-size: 13px;
  font-weight: 700;
  color: #FEF08A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-track,
.xp-meter {
  width: 100%;
  height: 14px;
  background-color: #141132;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 4px 6px 4px 6px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/bar_track.png') 66 68 68 68 fill / 4px 6px 4px 6px / 0 stretch;
  overflow: hidden;
}

.progress-fill,
.xp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38BDF8 0%, #4ADE80 50%, #FACC15 100%);
  transition: width 0.2s ease;
}

#booster-target-banner {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: 999px;
  background: #1A146C;
  border: 2.5px solid #FACC15;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(10, 8, 30, 0.65);
}

#fever-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #F59E0B 0%, #EC4899 52%, #8B5CF6 100%);
  border: 3px solid #FFFFFF;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.6px;
  text-shadow: 0 2px 0 #151136;
  box-shadow: 0 8px 20px rgba(12, 10, 34, 0.55);
}

/* ==========================================================================
   PILLAR 3: VISUAL SPOTLIGHT RING + ANIMATED POINTER HAND (`tut-hand`)
   ========================================================================== */

#tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none !important;
}

.tut-spotlight {
  position: fixed;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  border: 4px solid #FEF08A;
  box-shadow:
    0 0 0 4px rgba(56, 189, 248, 0.65),
    inset 0 0 18px rgba(254, 240, 138, 0.45);
  pointer-events: none !important;
  transform: translate(-50%, -50%);
  animation: tutRingPulse 1.15s ease-in-out infinite;
}

@keyframes tutRingPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.96); opacity: 0.92; }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

.tut-hand {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  z-index: 94;
  pointer-events: none !important;
  filter: drop-shadow(0 6px 12px rgba(8, 6, 26, 0.72));
  transition: left 0.08s linear, top 0.08s linear;
}

.tutorial-card {
  pointer-events: auto;
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  background-color: #191364;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 12px 16px 12px 16px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/hud_pill.png') 65 46 47 46 fill / 12px 16px 12px 16px / 0 stretch;
  box-shadow: 0 10px 26px rgba(8, 6, 28, 0.65);
  max-width: min(72vw, 520px);
}

.tut-card-ico {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.tut-copy-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.tut-short-label {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.5px;
  color: #FEF08A;
  text-shadow: 0 2px 0 #120E34;
  white-space: nowrap;
}

.tut-sub-label {
  font-size: 13px;
  font-weight: 700;
  color: #E2E8F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3-Icon Visual Flow Strip (`#modal-guide`) */
.guide-flow-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0;
}

.guide-step-card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background-color: #160F60;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 12px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/card_common.png') 49 49 50 50 fill / 12px / 0 stretch;
  text-align: center;
}

.guide-step-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.guide-step-label {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.guide-flow-arrow {
  font-family: var(--font-display);
  font-size: 24px;
  color: #FEF08A;
  flex-shrink: 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   MODALS & ANTI-SAAS 60/25/15 VISUAL CARDS (ZERO backdrop-filter: blur)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(12, 10, 34, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.modal-card {
  position: relative;
  width: min(92vw, 880px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  background-color: var(--indigo-panel);
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 20px 18px 22px 18px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/frame_modal.png') 47 38 52 46 fill / 20px 18px 22px 18px / 0 stretch;
  box-shadow: 0 24px 52px rgba(6, 5, 22, 0.75);
  color: #FFFFFF;
  overflow: hidden;
}

.modal-card.wide-modal {
  width: min(94vw, 1040px);
}

.modal-card.compact {
  width: min(92vw, 560px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 27px);
  color: #FFFFFF;
  letter-spacing: 0.4px;
  paint-order: stroke fill;
  -webkit-text-stroke: 2px #3B1A06;
  text-shadow: 0 2px 0 #3B1A06;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid #93C5FD;
  background: #2563EB;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Lesson #15: Genuine Asset `btn_close.png` Retaining All Listeners */
.modal-close-x {
  width: 42px;
  height: 42px;
  background: url('../assets/ui/vault_indigo_arcade_gloss/btn_close.png') center / contain no-repeat !important;
  border: 0 !important;
  border-image: none !important;
  box-shadow: none !important;
  font-size: 0 !important;
  color: transparent !important;
}

.modal-body-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 4px 2px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Balanced 4-Column Shop Grid (ZERO Orphan Row!) */
.shop-tabs-bar,
.quest-tabs-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quest-tabs-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quest-cards-grid,
.qp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.shop-grid > *,
.quest-cards-grid > *,
.qp-grid > *,
.seasons-grid > *,
.themes-grid > *,
.chapters-grid > *,
.levels-grid > *,
.result-actions-grid > * {
  min-width: 0;
  max-width: 100%;
}

/* 9-Slice Shop, Quest & Season Cards (60/25/15 Visual-First Law!) */
.shop-card,
.quest-vcard,
.season-card {
  position: relative;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 8px 8px;
  background-color: #160F60;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 12px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/card_common.png') 49 49 50 50 fill / 12px / 0 stretch;
  border-radius: 18px;
  text-align: center;
  color: #FFFFFF;
}

.shop-card.card-rare-9s,
.quest-vcard.card-rare-9s {
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/card_rare.png') 50 50 50 50 fill / 12px / 0 stretch;
}

.shop-card.card-epic-9s,
.quest-vcard.card-epic-9s {
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/card_epic.png') 50 50 50 50 fill / 12px / 0 stretch;
}

.shop-card.shop-card-featured,
.quest-vcard.card-legendary-9s,
.season-card.s-featured {
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/card_legendary.png') 52 53 52 54 fill / 12px / 0 stretch;
}

.season-card.s-locked,
.quest-vcard.q-locked {
  opacity: 0.76;
}

.shop-badge {
  position: absolute;
  top: -11px;
  left: 10px;
  z-index: 8;
  padding: 2px 9px;
  border-radius: 999px;
  background: #EF4444;
  border: 2px solid #FFFFFF;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}

.shop-badge.best {
  background: #7C3AED;
}

.shop-badge.starter {
  background: #059669;
}

.shop-art-stage,
.s-art-frame,
.q-art-frame {
  width: 100%;
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}

.shop-art,
.q-hero-pic {
  width: 96px;
  height: 96px;
  object-fit: contain;
  display: block;
}

.s-hero-pic {
  width: 92%;
  height: 104px;
  object-fit: contain;
  display: block;
}

.shop-pack-title,
.s-title,
.q-card-title,
.q-heading {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.18;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-pack-desc {
  font-size: 13px;
  font-weight: 700;
  color: #DBEAFE;
  line-height: 1.25;
}

.shop-card > button,
.quest-vcard > button,
.season-card > button {
  width: 100%;
  min-height: 38px;
  padding: 3px 10px;
}

/* Visual Currency / Stat Chips (ZERO ASCII Slop!) */
.s-meta,
.q-chip-row,
.q-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.s-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(12, 10, 38, 0.82);
  border: 1.5px solid rgba(96, 165, 250, 0.48);
  color: #FEF08A;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
}

.s-chip-ico {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Seasons & Quest Pass Sub-Banners */
.s-tabs-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.s-banner,
.quest-pass-banner,
.qp-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 12px;
  background-color: var(--indigo-sub);
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 11px 14px 11px 14px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/frame_subpanel.png') 67 80 72 81 fill / 11px 14px 11px 14px / 0 stretch;
}

.s-banner {
  justify-content: center;
}

.s-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: #141132;
  border: 1.5px solid #60A5FA;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
}

.s-seed-input,
.giftcode-pill-input {
  width: 136px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 2px solid #60A5FA;
  background: #141132;
  color: #FEF08A;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.8px;
}

.giftcode-pill-input {
  width: 100%;
  font-size: 13px;
  letter-spacing: 0.3px;
}

.seasons-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

/* Themes & Chapters Grids */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 10px;
  background-color: #160F60;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 12px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/card_common.png') 49 49 50 50 fill / 12px / 0 stretch;
  text-align: center;
}

.theme-card.equipped {
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/card_legendary.png') 52 53 52 54 fill / 12px / 0 stretch;
}

.theme-swatch-box {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 3px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 14px rgba(8, 6, 28, 0.5);
}

.theme-swatch-box img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.chapters-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.level-node-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 60px;
  padding: 6px;
  background-color: #160F60;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/card_common.png') 49 49 50 50 fill / 10px / 0 stretch;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
}

.level-node-btn.current {
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/slot_tile.png') 36 31 34 35 fill / 10px / 0 stretch;
}

.level-node-btn.cleared {
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/card_legendary.png') 52 53 52 54 fill / 10px / 0 stretch;
}

.level-stars-mini {
  font-size: 13px;
  color: #FEF08A;
}

/* ==========================================================================
   PILLAR 6: VICTORY SUNBURST + 3-STAR SLAM + ICON SETTINGS
   ========================================================================== */

.result-modal-card {
  text-align: center;
  align-items: center;
}

.result-sub-copy {
  font-size: 15px;
  font-weight: 700;
  color: #DBEAFE;
}

.result-stars-stage {
  position: relative;
  width: 100%;
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#victory-star-canvas {
  width: 340px;
  height: 112px;
  max-width: 100%;
  display: block;
  pointer-events: none;
}

.result-rewards-row,
.chest-loot-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background-color: var(--indigo-pill);
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 14px 10px 14px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/hud_pill.png') 65 46 47 46 fill / 10px 14px 10px 14px / 0 stretch;
  color: #FEF08A;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.reward-chip img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.result-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 10px;
  width: 100%;
}

.btn-hero-next {
  min-height: 54px;
  font-size: 18px;
  border-width: 14px 18px 15px 18px;
}

/* Icon Settings Modal */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 12px;
  background-color: var(--indigo-sub);
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 12px 10px 12px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/frame_subpanel.png') 67 80 72 81 fill / 10px 12px 10px 12px / 0 stretch;
  color: #FFFFFF;
}

.settings-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
}

.set-row-ico {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.settings-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.settings-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="range"] {
  width: 124px;
  height: 8px;
  border-radius: 999px;
  accent-color: #38BDF8;
  cursor: pointer;
}

.toggle-switch-btn {
  min-width: 72px;
}

.settings-actions-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* Exit Retention Cards */
.exit-rewards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.exit-reward-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background-color: #160F60;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 11px;
  border-image: url('../assets/ui/vault_indigo_arcade_gloss/card_legendary.png') 52 53 52 54 fill / 11px / 0 stretch;
  color: #FFFFFF;
  text-align: center;
  cursor: pointer;
  min-width: 0;
}

.exit-reward-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

/* Toast Notification */
#toast-stack {
  position: fixed;
  bottom: 18px;
  right: 20px;
  z-index: 160;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.studio-toast {
  padding: 10px 16px;
  border-radius: 14px;
  background: #1A146C;
  border: 2.5px solid #FACC15;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(8, 6, 26, 0.65);
}

/* Preview-Only [DEV F2] Pill & Panel */
#dev-f2-pill {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 180;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.88);
  border: 1.5px solid #38BDF8;
  color: #38BDF8;
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
}

#debug-panel {
  position: fixed;
  bottom: 42px;
  left: 10px;
  z-index: 185;
  width: 300px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.96);
  border: 2px solid #38BDF8;
  color: #F9FAFB;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
}

.debug-btn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.debug-btn {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #4B5563;
  background: #1F2937;
  color: #F3F4F6;
  font-size: 12px;
  font-weight: 700;
}

/* ==========================================================================
   1280x720 & Compact Viewport Rules (`flex-wrap: nowrap` + Zero Clipping!)
   ========================================================================== */

@media (max-width: 1460px), (max-height: 780px) {
  .hud-top-strip {
    min-height: 46px;
    gap: 5px;
  }
  .hud-cluster {
    padding: 2px 6px;
    gap: 4px;
  }
  .btn-hud-compact {
    min-height: 34px;
    padding: 2px 8px;
    border-width: 7px 9px 8px 9px;
    font-size: 13px;
  }
  .btn-hud-compact .btn-icon {
    width: 19px;
    height: 19px;
  }
  .level-badge-pill,
  .timer-pill,
  .stat-chip,
  .currency-pill {
    min-height: 34px;
    padding: 2px 8px;
    border-width: 7px 9px 7px 9px;
    font-size: 13px;
  }
  .timer-pill {
    min-width: 76px;
  }
  .currency-pill img {
    width: 24px;
    height: 24px;
    margin: -6px 2px -6px -12px;
  }
  .hud-float-left {
    width: 184px;
    gap: 6px;
  }
  .hud-float-right {
    width: 236px;
    gap: 6px;
  }
  .board-center-column {
    left: 192px;
    right: 244px;
  }
  .booster-tile {
    width: 70px;
    height: 72px;
  }
  .booster-tile-ico {
    width: 43px;
    height: 43px;
  }
  .quick-tools-grid .hotkey-pill {
    display: none;
  }
  .title-mascot-showcase {
    width: 175px;
    height: 175px;
  }
  .game-main-title {
    font-size: clamp(46px, 4.4vw, 60px);
  }
  #btn-title-play {
    min-width: 236px;
    min-height: 58px;
  }
  .title-footer-note {
    font-size: 13px;
  }
}

@media (max-width: 1080px) {
  .hud-kpi-cluster {
    display: none;
  }
  .shop-grid,
  .quest-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-grid-2col {
    grid-template-columns: minmax(0, 1fr);
  }
}
