/* ==========================================================================
   Satchel Clash: Hero Forge — Commercial 16:9 Strategy UI & 9-Slice Chrome
   Archetype: modern_tactical_bright | Palette: #A5926E #48281D #71432B #A4704A #E1CE9E #98CDB0
   STRICT WEBVIEW2 PERF HYGIENE: ZERO CSS blur or drop-shadow filters over canvases!
   ========================================================================== */

:root {
  --sand-stone: #A5926E;
  --mahogany-dark: #48281D;
  --oak-plank: #71432B;
  --leather-warm: #A4704A;
  --parchment-light: #E1CE9E;
  --parchment-cream: #F7EBD0;
  --mint-synergy: #98CDB0;
  --emerald-bright: #2F9E66;
  --ink-espresso: #14121F;
  --ink-stroke: #1C1B29;
  --gold-bright: #FFD54F;
  --amber-warn: #F59E0B;
  --crimson-danger: #DC2626;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #221712;
  color: var(--ink-espresso);
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  font-weight: 700;
}

#app-root {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.is-hidden {
  display: none !important;
}

/* ==========================================================================
   9-SLICE ANTI-DISTORTION CHROME (EXACT SLICES FROM data/art_manifest.json)
   ========================================================================== */

.btn-9slice-primary {
  box-sizing: border-box;
  background-color: #F2B538;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 16px 14px 26px 14px;
  border-image: url('../assets/ui/btn_primary.png') 91 70 154 69 fill / 16px 14px 26px 14px / 0 stretch;
  border-radius: 10px;
  box-shadow: 0 3px 6px rgba(20, 18, 31, 0.55);
  color: #14121F;
  font-family: 'Lilita One', 'Bangers', 'Nunito', sans-serif;
  letter-spacing: 0.025em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 14px;
  transition: transform 0.1s ease;
  position: relative;
  overflow: visible !important;
}

.btn-9slice-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(20, 18, 31, 0.62);
}

.btn-9slice-primary:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 3px rgba(20, 18, 31, 0.6);
}

.btn-9slice-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.panel-9slice {
  box-sizing: border-box;
  background-color: #E2C693;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 26px 25px 22px 28px;
  border-image: url('../assets/ui/frame_panel.png') 174 168 138 193 fill / 26px 25px 22px 28px / 0 stretch;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(14, 10, 8, 0.52);
  color: #14121F;
}

/* Never clip red-dot notify badges */
button[data-notify-id] {
  overflow: visible !important;
  position: relative;
}

/* ==========================================================================
   SCREENS & TITLE SCREEN (16:9 WIDESCREEN)
   ========================================================================== */

.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
}

.screen.is-active {
  display: flex;
  flex-direction: column;
}

#title-screen {
  justify-content: space-between;
  padding: 18px 36px 28px;
}

.title-bg-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(95deg, rgba(26, 16, 12, 0.80) 0%, rgba(36, 22, 16, 0.52) 52%, rgba(24, 15, 11, 0.72) 100%),
    url('../assets/art/title_bg.jpg') center center / cover no-repeat;
  z-index: 0;
}

.title-topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.lang-picker-wrap select,
.settings-select {
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 2.5px solid var(--ink-stroke);
  background: var(--parchment-cream);
  color: var(--ink-espresso);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink-stroke);
}

.btn-wood-pill,
.btn-wood-action,
.btn-wood-sm {
  height: 42px;
  padding: 0 16px;
  border-radius: 11px;
  border: 2.5px solid var(--ink-stroke);
  background: linear-gradient(180deg, #F3DFB3 0%, #D4B075 100%);
  color: var(--ink-espresso);
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 15px;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 0 var(--ink-stroke);
  position: relative;
  overflow: visible !important;
}

.btn-wood-sm {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-danger-pill {
  background: linear-gradient(180deg, #F87171 0%, #DC2626 100%);
  color: #FFF9E6;
}

.title-main-grid {
  position: relative;
  z-index: 4;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  align-items: center;
  gap: 36px;
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}

.title-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.season-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFD54F 0%, #F59E0B 100%);
  border: 2.5px solid var(--ink-stroke);
  color: var(--ink-espresso);
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 14px;
  box-shadow: 0 3px 0 var(--ink-stroke);
}

.ribbon-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.game-logo-title {
  margin: 0;
  font-family: 'Lilita One', 'Bangers', cursive;
  font-size: clamp(38px, 4.2vw, 66px);
  line-height: 1.04;
  letter-spacing: 0.03em;
  color: #FFF9E6;
  -webkit-text-stroke: 2.2px #1C1B29;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 #1C1B29, 0 8px 18px rgba(12, 8, 6, 0.52);
}

.game-logo-sub {
  margin: 0 0 6px;
  font-size: clamp(16px, 1.4vw, 22px);
  font-weight: 800;
  color: #F7EBD0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}

.preloader-box {
  width: min(460px, 90%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  background: rgba(28, 20, 16, 0.90);
  border: 2.5px solid rgba(28, 27, 41, 0.94);
  border-radius: 14px;
  padding: 14px 18px 16px;
  box-shadow: 0 4px 0 rgba(20, 18, 31, 0.88), 0 8px 20px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 249, 230, 0.12);
}

.preloader-track {
  position: relative;
  z-index: 1;
  flex: 0 0 18px;
  width: 100%;
  height: 18px;
  background: #2C1D16;
  border-radius: 999px;
  border: 2px solid #14121F;
  overflow: hidden;
}

.preloader-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38D98A 0%, #FFD54F 100%);
  transition: width 0.15s ease;
}

.preloader-text {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 2px 4px 0;
  min-height: 22px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 15px;
  color: #FFF9E6;
  text-align: center;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.85);
}

.title-cta-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(560px, 100%);
}

.title-primary-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-cta-xl {
  min-width: 210px;
  min-height: 68px;
  font-size: clamp(20px, 1.7vw, 27px);
}

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

.btn-tavern-card {
  min-height: 56px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 3px solid var(--ink-stroke);
  background: linear-gradient(180deg, #F7EBD0 0%, #DFC38D 100%);
  color: var(--ink-espresso);
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: clamp(12px, 1vw, 15px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink-stroke);
}

.meta-btn-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 24px;
}

.title-hero-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.title-hero-card {
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 12px 10px;
}

.exclusive-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #F59E0B 0%, #FFD54F 100%);
  border: 2px solid var(--ink-stroke);
  color: var(--ink-espresso);
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 12px;
  margin-bottom: 4px;
}

.title-portrait-host {
  position: relative;
  width: 240px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.title-portrait-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.title-portrait-host .tb-portrait-feather {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 90%, transparent 100%), linear-gradient(to right, transparent 0%, #000 2%, #000 98%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 90%, transparent 100%), linear-gradient(to right, transparent 0%, #000 2%, #000 98%, transparent 100%);
}

.title-hero-name {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 24px;
  color: var(--ink-espresso);
}

.title-hero-role {
  font-size: 14px;
  font-weight: 800;
  color: var(--mahogany-dark);
  margin-bottom: 4px;
}

.title-hero-passive {
  font-size: 13px;
  font-weight: 700;
  color: #3A2218;
  line-height: 1.3;
  max-width: 360px;
}

.title-hero-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.hero-dot-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid var(--ink-stroke);
  background: var(--parchment-cream);
  padding: 2px;
  cursor: pointer;
  overflow: hidden;
}

.hero-dot-btn.is-active {
  border-color: #D97706;
  background: #FFD54F;
  transform: scale(1.1);
}

.hero-dot-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ==========================================================================
   SCREEN 2: 16:9 3-ZONE GAMEPLAY WORKSPACE
   ========================================================================== */

#game-screen {
  background: linear-gradient(180deg, #2D1D16 0%, #1F1410 100%);
  padding: 6px 10px 8px;
  gap: 6px;
}

/* ZONE A: TOP 23% LIVE 1v1 DUEL STAGE (expands to 36% during active Battle for grounded hero scale & arena coverage) */
.duel-stage-band {
  position: relative;
  flex: 0 0 23.5%;
  min-height: 178px;
  max-height: 255px;
  width: 100%;
  border-radius: 14px;
  border: 3px solid var(--ink-stroke);
  overflow: hidden;
  background: #2A1D17 url('../assets/art/arena_bg.jpg') center 42% / cover no-repeat;
  box-shadow: 0 4px 0 var(--ink-stroke);
  transition: flex-basis 0.22s ease, min-height 0.22s ease, max-height 0.22s ease;
}

#game-screen.is-battle-phase .duel-stage-band {
  flex: 0 0 36%;
  min-height: 248px;
  max-height: 385px;
}

#duel-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.overtime-flame-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 5px solid #FF5722;
  border-radius: 11px;
  box-shadow: inset 0 0 28px rgba(255, 72, 0, 0.72);
  animation: overtimePulse 0.7s ease-in-out infinite alternate;
  z-index: 3;
}

@keyframes overtimePulse {
  from { opacity: 0.65; }
  to { opacity: 1; }
}

.duel-hud-overlay {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 100%;
  padding: 8px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.duel-hud-overlay button,
.duel-hud-overlay .hud-pill {
  pointer-events: auto;
}

.fighter-hud {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(24, 16, 13, 0.82);
  border: 2.5px solid var(--ink-stroke);
  border-radius: 12px;
  padding: 6px 10px;
  width: min(370px, 31vw);
}

.fighter-avatar {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 2px solid #FFD54F;
  background: #3B241B;
  object-fit: cover;
  flex: 0 0 52px;
}

.fighter-avatar-enemy {
  border-color: #F87171;
}

.fighter-bars {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.fighter-top-right {
  justify-content: flex-end;
}

.fighter-name {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 15px;
  color: #FFF9E6;
  -webkit-text-stroke: 1px #1C1B29;
  text-shadow: 0 2px 0 #1C1B29;
  white-space: nowrap;
}

.gauntlet-counters {
  display: flex;
  gap: 5px;
}

.counter-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #3B241B;
  border: 1.5px solid #14121F;
  color: #FFF9E6;
  font-family: 'Lilita One', sans-serif;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.heart-glyph {
  color: #FF5B5B;
  font-size: 13px;
}

.parity-chip {
  padding: 1px 7px;
  border-radius: 999px;
  background: #2E5041;
  color: #E4FFEF;
  font-size: 11px;
  font-weight: 800;
}

.bar-row,
.bar-sub-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-bar {
  position: relative;
  flex: 1 1 auto;
  height: 17px;
  background: #1B1310;
  border: 1.5px solid #14121F;
  border-radius: 6px;
  overflow: hidden;
}

.bar-sub-row .stat-bar {
  height: 14px;
}

.stat-bar-fill {
  height: 100%;
  transition: width 0.08s linear;
}

.hp-fill {
  background: linear-gradient(90deg, #22C55E 0%, #4ADE80 100%);
}

.hp-enemy-fill {
  background: linear-gradient(90deg, #EF4444 0%, #F87171 100%);
}

.sta-fill {
  background: linear-gradient(90deg, #F59E0B 0%, #FDE047 100%);
}

.od-fill {
  background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%);
}

.stat-bar-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 11px;
  color: #FFFFFF;
  text-shadow: 0 1px 2px #000000;
  font-variant-numeric: tabular-nums;
}

.armor-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  height: 17px;
  border-radius: 6px;
  background: #334155;
  border: 1.5px solid #14121F;
  color: #F8FAFC;
  font-family: 'Lilita One', sans-serif;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.status-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 18px;
}

.status-tray-right {
  justify-content: flex-end;
}

.status-badge {
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  color: #FFF9E6;
  border: 1px solid #14121F;
  font-variant-numeric: tabular-nums;
}

.status-burn { background: #EA580C; }
.status-poison { background: #16A34A; }
.status-bleed { background: #BE123C; }
.status-haste { background: #0284C7; }
.status-regen { background: #059669; }
.status-empower { background: #7C3AED; }
.status-thorns { background: #475569; }

.stage-center-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.stage-round-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.round-pill,
.day-pill,
.overtime-pill {
  padding: 4px 11px;
  border-radius: 999px;
  border: 2px solid var(--ink-stroke);
  background: var(--parchment-cream);
  color: var(--ink-espresso);
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 13px;
  box-shadow: 0 2px 0 var(--ink-stroke);
}

.day-pill {
  background: #FEF3C7;
}

.overtime-pill {
  background: #DC2626;
  color: #FFF9E6;
}

.speed-controls-row {
  display: flex;
  gap: 5px;
}

.btn-speed {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 2px solid var(--ink-stroke);
  background: rgba(247, 235, 208, 0.92);
  color: var(--ink-espresso);
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 12px;
  cursor: pointer;
}

.btn-speed.is-active {
  background: #FFD54F;
}

.stage-right-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.game-utility-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hud-pill {
  height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  border: 2.5px solid var(--ink-stroke);
  background: rgba(34, 22, 17, 0.92);
  color: #FFF9E6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 0 var(--ink-stroke);
}

button.hud-pill {
  cursor: pointer;
}

.hud-icon {
  width: 21px;
  height: 21px;
  object-fit: contain;
}

.mini-icon {
  width: 17px;
  height: 17px;
  object-fit: contain;
  flex: 0 0 17px;
}

.hud-num {
  font-family: 'Lilita One', sans-serif;
  font-size: 15px;
  color: #FFFFFF;
  -webkit-text-stroke: 1px #1C1B29;
  font-variant-numeric: tabular-nums;
}

.btn-icon-pill {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 2.5px solid var(--ink-stroke);
  background: var(--parchment-cream);
  color: var(--ink-espresso);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink-stroke);
  font-size: 16px;
}

/* ==========================================================================
   BOTTOM WORKSPACE: 58% BACKPACK GRID + 42% OAK TAVERN SHOP / BATTLE FLIP
   ========================================================================== */

.workspace-split {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 57.5fr) minmax(0, 42.5fr);
  gap: 8px;
  width: 100%;
}

.backpack-zone,
.right-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 6px 4px;
}

.zone-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

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

.zone-heading {
  margin: 0;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: clamp(16px, 1.3vw, 21px);
  color: var(--ink-espresso);
}

.rotate-hint-chip,
.pity-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(72, 40, 29, 0.16);
  border: 1.5px solid var(--mahogany-dark);
  color: var(--ink-espresso);
  font-size: 12px;
  font-weight: 800;
}

.pity-pill {
  background: #D1FAE5;
  border-color: #065F46;
  color: #064E3B;
}

.grid-mode-toggles {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-toggle-chip {
  height: 33px;
  padding: 0 11px;
  border-radius: 9px;
  border: 2px solid var(--ink-stroke);
  background: var(--parchment-cream);
  color: var(--ink-espresso);
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink-stroke);
}

.btn-toggle-chip.is-active {
  background: #FFD54F;
}

.backpack-canvas-wrap {
  position: relative;
  flex: 1 1 0;
  min-height: 220px;
  width: 100%;
  background: #3A251B;
  border: 3px solid var(--ink-stroke);
  border-radius: 12px;
  overflow: hidden;
}

#backpack-canvas,
#opponent-grid-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.bench-and-relics-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(72, 40, 29, 0.22);
  border: 2px solid var(--mahogany-dark);
  border-radius: 10px;
  padding: 5px 8px;
}

.storage-bench-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.bench-label {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 12px;
  color: var(--ink-espresso);
  white-space: nowrap;
}

.storage-bench-slots {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.bench-slot {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 8px;
  border: 2px solid var(--ink-stroke);
  background: #48281D url('../assets/ui/slot_tile.png') center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.bench-slot img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.active-relics-strip {
  display: flex;
  gap: 5px;
  align-items: center;
}

.relic-mini-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid var(--ink-stroke);
  background: #FFF7E2;
  padding: 3px;
}

.relic-mini-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* RIGHT PANEL: SHOP PHASE & BATTLE FLIP */
.panel-phase-view {
  display: none;
  flex-direction: column;
  gap: 7px;
  flex: 1 1 0;
  min-height: 0;
}

.panel-phase-view.is-active {
  display: flex;
}

.stamina-telemetry-card {
  background: var(--parchment-cream);
  border: 2px solid var(--mahogany-dark);
  border-radius: 10px;
  padding: 6px 10px;
}

.stamina-telemetry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.stamina-title {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 13px;
  color: var(--ink-espresso);
}

.stamina-numbers-text {
  font-size: 12px;
  font-weight: 800;
  color: var(--mahogany-dark);
  font-variant-numeric: tabular-nums;
}

.stamina-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 11px;
  border: 1.5px solid var(--ink-stroke);
}

.stamina-badge.is-ok {
  background: #bbf7d0;
  color: #14532d;
}

.stamina-badge.is-starved {
  background: #FDE68A;
  color: #78350F;
  animation: starvedPulse 0.8s ease-in-out infinite alternate;
}

@keyframes starvedPulse {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.stamina-meter-track {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #3B241B;
  border: 1.5px solid var(--ink-stroke);
  overflow: hidden;
}

.stamina-burn-fill {
  height: 100%;
  background: linear-gradient(90deg, #38D98A 0%, #F59E0B 80%, #EF4444 100%);
  transition: width 0.18s ease;
}

.stamina-regen-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #FFFFFF;
}

/* Recipe Compendium & Build Compare Drawers (#3715) */
.recipe-drawer {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: #FFF9EB;
  border: 2px solid var(--mahogany-dark);
  border-radius: 10px;
  padding: 5px 7px;
}

.recipe-drawer-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 5px;
}

.recipe-row-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 7px;
  background: #F3E5C2;
  border: 1.5px solid #86533E;
  font-size: 12px;
  color: var(--ink-espresso);
}

.recipe-row-chip.is-ready {
  background: #D1FAE5;
  border-color: #059669;
}

.recipe-row-chip img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* 5-Slot Tavern Shop Grid */
.shop-slots-grid {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  align-content: stretch;
}

.shop-slot-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 7px 5px 6px;
  border-radius: 12px;
  border: 2.5px solid var(--mahogany-dark);
  background: linear-gradient(180deg, #FFF9EC 0%, #EAD4A6 100%);
  color: var(--ink-espresso);
  text-align: center;
  box-shadow: 0 3px 0 var(--mahogany-dark);
}

.shop-slot-card.rarity-rare { border-color: #2563EB; }
.shop-slot-card.rarity-epic { border-color: #7C3AED; }
.shop-slot-card.rarity-legendary,
.shop-slot-card.rarity-mythic { border-color: #D97706; }

.shop-slot-card.is-sold {
  opacity: 0.48;
}

.shop-badges-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 18px;
  gap: 3px;
}

.tag-sale,
.tag-pity {
  padding: 1px 5px;
  border-radius: 5px;
  font-family: 'Lilita One', sans-serif;
  font-size: 10px;
  color: #FFF9E6;
}

.tag-sale { background: #DC2626; }
.tag-pity { background: #059669; }

.shop-item-art-wrap {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.shop-item-art-wrap img {
  max-width: 54px;
  max-height: 54px;
  object-fit: contain;
}

.shop-item-title {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 12px;
  line-height: 1.15;
  color: var(--ink-espresso);
  max-width: 100%;
  word-break: break-word;
}

.shop-item-meta {
  font-size: 11px;
  font-weight: 800;
  color: #5C3A23;
}

.shop-card-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-shop-buy {
  width: 100%;
  height: 30px;
  border-radius: 8px;
  border: 2px solid var(--ink-stroke);
  background: linear-gradient(180deg, #FFD54F 0%, #F59E0B 100%);
  color: var(--ink-espresso);
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 13px;
  cursor: pointer;
}

.shop-mini-btns {
  display: flex;
  gap: 3px;
  width: 100%;
}

.btn-shop-sub {
  flex: 1 1 0;
  height: 24px;
  border-radius: 6px;
  border: 1.5px solid var(--ink-stroke);
  background: var(--parchment-cream);
  color: var(--ink-espresso);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  padding: 0 3px;
}

.btn-shop-sub.is-locked {
  background: #FDE047;
}

/* Shop Footer: Reroll + Sell Drop + FIGHT CTA */
.shop-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sell-drop-zone {
  flex: 1 1 auto;
  height: 46px;
  border-radius: 10px;
  border: 2.5px dashed var(--mahogany-dark);
  background: rgba(255, 247, 226, 0.72);
  color: var(--mahogany-dark);
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sell-drop-zone.is-drag-over {
  background: #FEE2E2;
  border-color: #DC2626;
  color: #991B1B;
}

.btn-fight-cta {
  min-width: 175px;
  min-height: 52px;
  font-size: 18px;
}

/* Battle Phase Flip View */
.opponent-canvas-wrap {
  flex: 1 1 0;
  min-height: 165px;
  background: #2C1B15;
  border: 3px solid var(--ink-stroke);
  border-radius: 11px;
  overflow: hidden;
}

.live-metrics-card {
  flex: 0 0 auto;
  background: var(--parchment-cream);
  border: 2px solid var(--mahogany-dark);
  border-radius: 10px;
  padding: 6px 10px;
}

.metrics-heading {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 13px;
  color: var(--ink-espresso);
}

.live-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.metric-cell {
  background: #F2E2BD;
  border: 1.5px solid #86533E;
  border-radius: 7px;
  padding: 3px 6px;
  text-align: center;
}

.metric-cell-label {
  font-size: 10px;
  color: #5C3A23;
}

.metric-cell-val {
  font-family: 'Lilita One', sans-serif;
  font-size: 13px;
  color: var(--ink-espresso);
  font-variant-numeric: tabular-nums;
}

.item-dps-breakdown {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-top: 5px;
}

.item-dps-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #FFFDF7;
  border: 1.5px solid #86533E;
  font-size: 11px;
  white-space: nowrap;
}

.item-dps-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* ==========================================================================
   OVERLAYS & TOOLTIPS
   ========================================================================== */

.fx-overlay-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 8200;
  display: none;
  pointer-events: none !important;
}

.cutin-overlay-canvas {
  z-index: 9200;
  pointer-events: none !important;
}

.item-tooltip {
  position: fixed;
  z-index: 8700;
  max-width: 290px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 3px solid var(--ink-stroke);
  background: #FFF9EC;
  color: var(--ink-espresso);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.48);
  pointer-events: none;
  font-size: 12.5px;
  line-height: 1.35;
}

.tt-title {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 16px;
  margin-bottom: 3px;
}

.tt-tags {
  font-size: 11px;
  font-weight: 800;
  color: #71432B;
  margin-bottom: 5px;
}

.tt-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 5px;
}

.tt-stat-pill {
  padding: 1px 6px;
  border-radius: 5px;
  background: #EAD4A6;
  font-weight: 800;
  font-size: 11px;
}

/* ==========================================================================
   MODALS (OPAQUE DARK SCRIM — ZERO CSS BLUR!)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(16, 12, 22, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-card {
  box-sizing: border-box;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

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

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

.modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(72, 40, 29, 0.35);
}

.modal-title {
  margin: 0;
  font-family: 'Lilita One', 'Bangers', sans-serif;
  font-size: clamp(22px, 2vw, 30px);
  color: #FFF9E6;
  -webkit-text-stroke: 1.6px #1C1B29;
  text-shadow: 0 3px 0 #1C1B29;
}

.modal-subtitle {
  margin: 3px 0 0;
  font-size: 13.5px;
  font-weight: 800;
  color: #3C2217;
}

.btn-modal-close {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 2.5px solid var(--ink-stroke);
  background: #F87171;
  color: #FFF9E6;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink-stroke);
}

.modal-body {
  padding: 12px 6px 14px 4px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
}

.section-subhead {
  margin: 14px 0 8px;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 18px;
  color: var(--ink-espresso);
}

/* Hero Hall Grid & Trophy Road (Trophy Road pinned above fold — #2896) */
.trophy-road-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 6px;
}

.trophy-road-heading {
  margin: 0;
}

.trophy-road-scroll-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hall-scroll-cue {
  font-size: 11px;
  font-weight: 800;
  color: #FFE8B5;
  background: rgba(36, 20, 11, 0.72);
  border: 1.5px solid rgba(255, 213, 79, 0.55);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}

.btn-road-scroll {
  width: 26px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid #24140B;
  background: #F5C35A;
  color: #24140B;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-road-scroll:hover {
  background: #FFE082;
}

.trophy-road-strip {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 8px;
  padding: 2px 2px 8px;
  margin-bottom: 10px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.trophy-node-card {
  flex: 0 0 132px;
  background: #FFF7E2;
  border: 2px solid var(--mahogany-dark);
  border-radius: 10px;
  padding: 6px 5px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.trophy-node-card img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.hero-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 9px;
}

.hero-hall-card {
  background: #FFF9EC;
  border: 3px solid var(--mahogany-dark);
  border-radius: 14px;
  padding: 8px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.hero-hall-card.is-selected {
  border-color: #D97706;
  background: #FFFBEB;
}

.hero-hall-card img.hall-portrait {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.hall-hero-name {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 15px;
  color: var(--ink-espresso);
}

.hall-hero-desc {
  font-size: 11.5px;
  color: #48281D;
  line-height: 1.25;
  flex: 1 1 auto;
}

.hall-bottom-scroll-cue {
  position: sticky;
  bottom: 0;
  margin-top: 8px;
  padding: 4px 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #FFF7D6;
  background: linear-gradient(180deg, rgba(36, 20, 11, 0.72), rgba(24, 12, 6, 0.94));
  border: 1.5px solid rgba(255, 213, 79, 0.55);
  border-radius: 999px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  pointer-events: none;
}

/* Ranked Ladder & Event Passes */
.ladder-summary-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #FFF7E2;
  border: 2.5px solid var(--mahogany-dark);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.ladder-divisions-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 8px;
}

.division-card {
  background: #FFF9EC;
  border: 2.5px solid var(--mahogany-dark);
  border-radius: 11px;
  padding: 8px 6px;
  text-align: center;
}

.division-card.is-current {
  border-color: #059669;
  background: #ECFDF5;
}

.division-card img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

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

.event-pass-card {
  background: #FFF9EC;
  border: 2.5px solid var(--mahogany-dark);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-pass-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-pass-top img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

/* Guild Vault Shop (All 9 SKUs) */
.vault-combo-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.giftcode-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  max-width: 100%;
  min-width: 0;
}

.giftcode-box input {
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 2px solid var(--ink-stroke);
  background: #FFFFFF;
  color: var(--ink-espresso);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  width: 155px;
}

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

.sku-card {
  position: relative;
  background: linear-gradient(180deg, #FFFDF7 0%, #F1DFB6 100%);
  border: 3px solid var(--mahogany-dark);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sku-art {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex: 0 0 72px;
}

.sku-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sku-badge {
  align-self: flex-start;
  padding: 1px 7px;
  border-radius: 999px;
  background: #D97706;
  color: #FFF9E6;
  font-family: 'Lilita One', sans-serif;
  font-size: 10px;
}

.sku-title {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 15px;
  color: var(--ink-espresso);
}

.sku-desc {
  font-size: 12px;
  color: #48281D;
  line-height: 1.25;
}

.btn-sku-buy {
  align-self: flex-start;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 2px solid var(--ink-stroke);
  background: linear-gradient(180deg, #4ADE80 0%, #16A34A 100%);
  color: #14121F;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink-stroke);
}

.btn-sku-buy.is-owned {
  background: #CBD5E1;
  cursor: default;
}

/* Relic Draft & Round Result */
.relic-choices-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.relic-draft-card {
  background: #FFF9EC;
  border: 3px solid var(--mahogany-dark);
  border-radius: 14px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.relic-draft-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.result-banner-wrap {
  flex: 0 0 auto;
  text-align: center;
  padding-bottom: 8px;
}

.result-headline {
  font-size: 34px;
}

.result-merges-box {
  background: linear-gradient(180deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 2.5px solid #059669;
  border-radius: 10px;
  padding: 9px 14px;
  margin-bottom: 10px;
  text-align: center;
  color: #064E3B;
  font-size: 14.5px;
  font-weight: 900;
  line-height: 1.35;
  box-shadow: 0 3px 0 #059669;
}

.result-metrics-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.result-actions-row,
.result-actions-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-cta-lg {
  min-width: 190px;
  min-height: 56px;
  font-size: 20px;
}

/* Settings Rows */
.settings-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-row,
.setting-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #FFF9EC;
  border: 2px solid var(--mahogany-dark);
  border-radius: 10px;
  padding: 8px 12px;
}

.setting-label {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 15px;
  color: var(--ink-espresso);
}

.setting-slider {
  flex: 1 1 auto;
  accent-color: #D97706;
  cursor: pointer;
}

.btn-toggle-switch {
  min-width: 68px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid var(--ink-stroke);
  background: #CBD5E1;
  color: var(--ink-espresso);
  font-family: 'Lilita One', sans-serif;
  font-size: 13px;
  cursor: pointer;
}

.btn-toggle-switch.is-on {
  background: #4ADE80;
}

.setting-footer-row,
.setting-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.setting-footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.autosave-note {
  font-size: 12px;
  color: #48281D;
}

.version-note {
  font-size: 11.5px;
  font-weight: 800;
  color: #6B4128;
  font-variant-numeric: tabular-nums;
}

/* Interactive Tutorial Spotlight */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 8900;
  pointer-events: none;
}

.tutorial-overlay.is-suppressed {
  display: none !important;
}

.tutorial-spotlight {
  position: fixed;
  border: 4px solid #FFD54F;
  outline: 3px solid #14121F;
  border-radius: 14px;
  background: rgba(255, 213, 79, 0.07);
  pointer-events: none;
  transition: left 0.2s ease, top 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.tutorial-card {
  position: fixed;
  left: 30px;
  top: 320px;
  right: auto;
  bottom: auto;
  width: min(370px, 42vw);
  pointer-events: auto;
}

.tutorial-step-text {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-espresso);
  line-height: 1.35;
}

.tutorial-btn-row,
.tutorial-btn-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-tut-cta {
  min-width: 120px;
  min-height: 44px;
  font-size: 16px;
}

/* Toast Notification */
.toast-banner {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9800;
  padding: 10px 20px;
  border-radius: 999px;
  border: 3px solid var(--ink-stroke);
  background: #FFD54F;
  color: var(--ink-espresso);
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 15px;
  box-shadow: 0 5px 0 var(--ink-stroke);
  pointer-events: none;
}

.toast-banner.is-warn {
  background: #FDE68A;
  border-color: #B45309;
  color: #451A03;
}

.giftcode-status {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 10px 0;
  padding: 7px 12px;
  border-radius: 9px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.giftcode-status.is-ok {
  background: #064E3B;
  border: 1.5px solid #34D399;
  color: #ECFDF5;
}
.giftcode-status.is-err {
  background: #7F1D1D;
  border: 1.5px solid #F87171;
  color: #FEF2F2;
}

.menu-confirm-desc {
  margin: 4px 0 16px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.45;
  color: #F3DCAC;
  text-align: center;
}

.bench-inactive-pill {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #92400E;
  border: 1.5px solid #FBBF24;
  color: #FEF3C7;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tag-bench-warn {
  padding: 1px 6px;
  border-radius: 999px;
  background: #92400E;
  border: 1px solid #FBBF24;
  color: #FEF3C7;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 9.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.tt-bench-warn {
  margin-bottom: 6px;
  padding: 4px 7px;
  border-radius: 7px;
  background: #FEF3C7;
  border: 1.5px solid #B45309;
  color: #78350F;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

@keyframes benchWarnPulse {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.9); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.55); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

.bench-and-relics-bar.has-benched-items {
  border-color: #D97706;
}

.bench-and-relics-bar.bench-pulse {
  animation: benchWarnPulse 0.5s ease-in-out 3;
}

.btn-tut-cta.is-locked-step,
.btn-tut-cta:disabled {
  opacity: 0.48;
  filter: grayscale(0.55);
  cursor: not-allowed;
}

.bench-slot-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  z-index: 5;
  padding: 2px 4px;
  border-radius: 5px;
  background: #1c1418;
  color: #ffd54f;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  pointer-events: none;
}

.bench-slot-fallback {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 10px;
  font-weight: 900;
  color: #fff9e6;
  text-align: center;
  line-height: 1.1;
  padding: 2px;
}

.drag-ghost-float {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9700;
  pointer-events: none;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 12px;
  border: 2.5px solid #ffd54f;
  background: rgba(37, 20, 24, 0.86);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.drag-ghost-float img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.drag-ghost-float .ghost-tag {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 10px;
  color: #fff9e6;
  line-height: 1;
  max-width: 62px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-promo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  border: 2.5px solid var(--ink-stroke);
  background: linear-gradient(180deg, #ffd44d 0%, #f0a21c 100%);
  color: #14121f;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 14px;
  box-shadow: 0 3px 0 var(--ink-stroke);
  cursor: pointer;
}

/* Responsive fallback (<1100px / split window) */
@media (max-width: 1100px) {
  .title-main-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .hero-roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .vault-sku-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #game-screen {
    overflow-y: auto;
  }
  .workspace-split {
    grid-template-columns: 1fr;
  }
  .shop-slots-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* ==========================================================================
   SEASONS 2–4 (v2.1 -> v5.0) MODES, CAPSTONE FORGE, BLUEPRINTS & TELEMETRY
   ========================================================================== */

.hud-pill-shards {
  background: rgba(30, 27, 75, 0.92);
}

.metrics-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.compare-drawer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
}

.compare-col-card {
  background: #F7EBD0;
  border: 1.5px solid #86533E;
  border-radius: 8px;
  padding: 6px 8px;
}

.timeline-sparkline-bar {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 24px;
  margin-top: 5px;
  padding: 2px 4px;
  background: rgba(72, 40, 29, 0.14);
  border-radius: 6px;
  overflow: hidden;
}

.spark-col {
  flex: 1 1 0;
  min-width: 2px;
  background: linear-gradient(180deg, #38D98A 0%, #059669 100%);
  border-radius: 2px 2px 0 0;
}

.tt-recipe-tree {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1.5px dashed rgba(72, 40, 29, 0.35);
  font-size: 11px;
}

.tt-recipe-line {
  padding: 1px 0;
  color: #3C2217;
}

.tt-recipe-line.is-owned {
  color: #065F46;
  font-weight: 800;
}

.modes-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 10px;
}

.mode-card,
.puzzle-card,
.forge-item-card {
  background: #FFF9EC;
  border: 2.5px solid var(--mahogany-dark);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.restrictions-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.restriction-chip-card {
  background: #FFF7E2;
  border: 2px solid var(--mahogany-dark);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.restriction-chip-card.is-active {
  border-color: #DC2626;
  background: #FEF2F2;
}

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

.hub-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.forge-tab-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.s2-feature-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.pity-meter-banner {
  background: #FFF7E2;
  border: 2.5px solid var(--mahogany-dark);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.swatch-preview {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 2.5px solid var(--ink-stroke);
  flex: 0 0 38px;
}

.result-actions-row {
  flex-wrap: wrap;
}
