/* css/style.css — Veilbreaker: Arcane Deckbuilder (inked_parchment_roguelite · 100% Offline) */
/* Zero external Google Fonts, zero backdrop-filter: blur(), strict flex-scroll modals, overflow: visible on badged buttons */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #12100F;
  color: #EFE5CE;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* ======================== TITLE SCREEN (HEROIC NO-BOX LAW) ======================== */
#title-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background-image: url('../assets/art/title_bg.jpg');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.title-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 44%, rgba(18, 16, 15, 0.14) 0%, rgba(18, 16, 15, 0.62) 72%, rgba(10, 9, 12, 0.88) 100%);
  pointer-events: none;
  z-index: 1;
}

.title-top-dock {
  position: relative;
  z-index: 6;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
}

.title-stage-hero {
  position: relative;
  z-index: 5;
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vw, 64px);
  padding: 0 32px;
}

.title-portrait-wrap {
  position: relative;
  width: clamp(220px, 23vw, 340px);
  height: clamp(290px, 46vh, 460px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

#title-hero-portrait {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.72));
}

/* Unboxed Heroic Emblem — NO background, NO border, NO popup card! */
.title-crest-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  max-width: 620px;
}

.game-main-title {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(46px, 5.4vw, 82px);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.02;
  color: #FDE68A;
  text-shadow: 0 4px 0 #1C130C, 0 8px 22px rgba(0, 0, 0, 0.85);
}

.game-subtitle {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 700;
  letter-spacing: 0.24em;
  color: #EFE5CE;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.hero-picker-row {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: center;
  margin-top: 6px;
}

.hero-picker-row.has-4-heroes {
  display: grid;
  grid-template-columns: repeat(2, minmax(156px, 240px));
  gap: 8px;
}

.hero-pick-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 142px;
  padding: 6px 12px;
  color: #EFE5CE;
  font-size: 13px;
  line-height: 1.2;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
  transition: transform 0.14s ease;
}

.hero-pick-btn:hover {
  transform: translateY(-2px);
}

.hero-pick-btn.is-selected {
  filter: drop-shadow(0 0 10px rgba(201, 138, 50, 0.72));
}

.hero-pick-name {
  font-weight: 800;
  font-size: 13px;
  color: #FDE68A;
  white-space: nowrap;
}

.hero-pick-role {
  font-size: 12px;
  color: #EFE5CE;
  opacity: 0.9;
  white-space: nowrap;
}

/* Real 0-100% Boot Loading Bar */
#boot-loader {
  width: min(380px, 76vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.boot-bar-track {
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 2px;
}

#boot-bar-fill {
  height: 14px;
  width: 6%;
  transition: width 0.14s ease-out;
}

#boot-load-text {
  font-size: 13px;
  font-weight: 700;
  color: #EFE5CE;
  text-shadow: 0 2px 4px #000;
}

#btn-title-play {
  display: none;
  min-width: 268px;
  min-height: 64px;
  font-size: 20px;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.78);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.62));
  align-items: center;
  justify-content: center;
  overflow: visible;
}

#btn-title-play:hover {
  filter: brightness(1.08) drop-shadow(0 8px 14px rgba(201, 138, 50, 0.45));
}

.title-footer-bar {
  position: relative;
  z-index: 5;
  padding: 10px 20px 14px;
  font-size: 13px;
  color: rgba(239, 229, 206, 0.78);
  text-shadow: 0 1px 4px #000;
}

/* ======================== LIVE GAME SCREEN (100vw x 100vh FULL-BLEED) ======================== */
#game-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  overflow: hidden;
  background-color: #181B2B;
}

#battle-canvas {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
}

#vfx3d-canvas {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  pointer-events: none;
  z-index: 4;
}

#cutin-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  pointer-events: none;
  z-index: 90;
}

/* ======================== TOP FLOATING TACTICAL HUD ======================== */
#top-hud {
  position: fixed;
  top: 8px;
  left: 10px;
  right: 10px;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  pointer-events: none;
}

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

.hud-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 40px;
  padding: 0 4px;
  border-width: 7px 13px !important;
  border-image-width: 7px 13px !important;
  font-size: 13px;
  font-weight: 800;
  color: #EFE5CE;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hud-stat-pill .cur-ic {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.hud-divider {
  opacity: 0.45;
  margin: 0 2px;
}

.hud-incoming-ok {
  color: #67E8F9;
}

.hud-incoming-warn {
  color: #FCA5A5;
}

.hud-center-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 6px;
  border-width: 8px 24px !important;
  border-image-width: 8px 24px !important;
  font-size: 13px;
  font-weight: 800;
  color: #FDE68A;
  white-space: nowrap;
}

.hud-timeline-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tl-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid #EFE5CE;
}

.tl-dot.is-ally { background: #38BDF8; }
.tl-dot.is-enemy { background: #E11D48; }

.hud-nav-btn {
  position: relative;
  overflow: visible !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 40px;
  padding: 0 6px;
  border-width: 8px 11px !important;
  border-image-width: 8px 11px !important;
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
}

.hud-nav-btn > img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
}

.hud-nav-btn > span {
  white-space: nowrap;
  pointer-events: none;
}

.hud-icon-btn {
  position: relative;
  overflow: visible !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 4px;
  border-width: 4px 7px !important;
  border-image-width: 4px 7px !important;
  font-size: 13px;
  font-weight: 800;
  color: #FDE68A;
  white-space: nowrap;
}

.hud-icon-btn > img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  pointer-events: none;
}

/* Red-Dot Notification Badge (strictly overflow: visible parent, z-index: 30, pointer-events: none) */
.notify-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 30;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border-radius: 10px;
  background: #DC2626;
  border: 2px solid #FDE68A;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ======================== BOTTOM DOCK & FANNED PARCHMENT HAND ======================== */
#bottom-dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 22;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.dock-side {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
  flex-shrink: 0;
}

.mana-orb-box {
  width: 74px;
  height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #FDE68A;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
}

.mana-orb-val {
  font-size: 20px;
  font-weight: 900;
  color: #7DD3FC;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.mana-orb-lbl {
  font-size: 12px;
  font-weight: 800;
  color: #EFE5CE;
}

/* Round 5 Compact Tool/Booster Buttons: 74x74px with 44px icon (60% fill, overflow: visible) */
.compact-action-btn {
  position: relative;
  overflow: visible !important;
  width: 76px;
  height: 76px;
  padding: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #EFE5CE;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
}

.compact-action-btn > img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  pointer-events: none;
}

.compact-action-btn .act-sub {
  font-size: 12px;
  font-weight: 800;
  color: #FDE68A;
  line-height: 1;
  pointer-events: none;
}

.compact-action-btn.is-ready {
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.72));
}

.hotkey-chip {
  position: absolute;
  top: -7px;
  left: -6px;
  z-index: 8;
  padding: 1px 5px;
  background: #1C1917;
  border: 1.5px solid #C98A32;
  color: #FDE68A;
  font-size: 12px;
  font-weight: 800;
  border-radius: 3px;
  pointer-events: none;
}

.pile-btn {
  position: relative;
  overflow: visible !important;
  min-width: 68px;
  height: 52px;
  padding: 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #EFE5CE;
  font-size: 12px;
  font-weight: 800;
}

.pile-count {
  font-size: 16px;
  font-weight: 900;
  color: #FDE68A;
  line-height: 1;
}

#btn-end-turn {
  min-width: 146px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.6));
  overflow: visible !important;
}

/* Fanned Inked-Parchment Card Hand (Zero Sibling Overlap, Zero Text Clip!) */
#hand-cards {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 8px 4px 2px;
  pointer-events: auto;
  min-width: 0;
}

.hand-card {
  position: relative;
  overflow: visible !important;
  width: clamp(134px, 11.2vw, 160px);
  height: clamp(166px, 21vh, 198px);
  padding: 4px 4px 6px;
  border-width: 10px 11px !important;
  border-image-width: 10px 11px !important;
  background-color: #EBD5AC !important;
  background-clip: padding-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  color: #1C1714;
  text-align: center;
  transition: transform 0.16s ease;
  flex-shrink: 0;
}

.hand-card:hover:not(:disabled) {
  transform: translateY(-16px) scale(1.04);
  z-index: 15;
  filter: drop-shadow(0 12px 16px rgba(201, 138, 50, 0.45));
}

.hand-card:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.hand-card.monster-border {
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.72));
}

/* Wax-Seal Cost Badge on Card Top-Left (z-index: 8; pointer-events: none; overflow: visible parent) */
.card-cost {
  position: absolute;
  top: -10px;
  left: -10px;
  z-index: 8;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #DC2626 0%, #8B1D1D 78%, #4A0E0E 100%);
  border: 2px solid #FDE68A;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

.card-hotkey {
  position: absolute;
  top: -8px;
  right: -6px;
  z-index: 8;
  padding: 1px 5px;
  background: #1C1917;
  border: 1.5px solid #A38B67;
  color: #FDE68A;
  font-size: 12px;
  font-weight: 800;
  border-radius: 3px;
  pointer-events: none;
}

.hc-art {
  width: 78px;
  height: 78px;
  object-fit: contain;
  margin-top: 2px;
  pointer-events: none;
}

.hc-title {
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 900;
  color: #1C1714;
  line-height: 1.1;
  width: 100%;
  white-space: nowrap;
  pointer-events: none;
}

.hc-stat {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #3A2518;
  line-height: 1.15;
  width: 100%;
  white-space: nowrap;
  pointer-events: none;
}

/* ======================== MODALS (STRICT FLEX-SCROLL + ANTI-SAAS 60/25/15) ======================== */
#modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 9, 12, 0.78);
  padding: 12px 16px;
}

.modal-card {
  display: flex !important;
  flex-direction: column;
  width: min(1020px, 94vw);
  max-height: 92vh;
  overflow: hidden !important;
  color: #EFE5CE;
}

.modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 6px 8px;
  border-bottom: 1px solid rgba(163, 139, 103, 0.32);
}

#modal-title-text {
  font-family: Georgia, serif;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 800;
  color: #FDE68A;
  letter-spacing: 0.06em;
  margin: 0;
}

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

#btn-modal-help {
  display: none;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 16px;
  font-weight: 900;
  color: #FDE68A;
}

.modal-close-x {
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close-x img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

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

.vb-tab-strip {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: center;
}

.vb-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 38px;
  padding: 0 12px;
  border-width: 9px 12px !important;
  border-image-width: 9px 12px !important;
  font-size: 13.5px;
  font-weight: 800;
  color: #EFE5CE;
  white-space: nowrap;
}

.vb-tab-strip-5 .vb-tab-btn {
  min-width: 92px;
  flex: 1 1 0;
  padding: 0 8px;
  font-size: 13px;
}

.vb-preset-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.vb-preset-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 48px;
  height: 36px;
  padding: 0 8px;
  border-width: 8px 10px !important;
  border-image-width: 8px 10px !important;
  font-size: 13px;
  font-weight: 800;
  color: #EFE5CE;
  white-space: nowrap;
}

.vb-preset-pill .cur-ic {
  width: 16px;
  height: 16px;
}

.vb-modal-grid {
  display: grid;
  gap: 10px;
  width: 100%;
}

.vb-modal-grid > * {
  min-width: 0;
  max-width: 100%;
}

.vb-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vb-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vb-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Visual-First 60/25/15 Card (balanced 9-slice border so 6-card modals fit 100% with 0 CTA cutoff!) */
.vf-card-portrait {
  position: relative;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 186px;
  padding: 2px 4px;
  border-width: 14px 16px !important;
  border-image-width: 14px 16px !important;
  background-color: #EBD5AC !important;
  background-clip: padding-box;
  color: #1C1714;
  text-align: center;
}

.vf-art-stage {
  width: 100%;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vf-art-img {
  max-width: 80px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.vf-title,
.vf-heading {
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 900;
  color: #1C1714;
  line-height: 1.15;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vf-chip-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 800;
  color: #3A2518;
  white-space: nowrap;
}

.vb-season-banner .vf-chip-line,
.vb-victory-banner .vf-chip-line {
  color: #EFE5CE;
}

.cur-ic {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.vb-corner-badge {
  position: absolute;
  top: -8px;
  right: -4px;
  z-index: 8;
  padding: 2px 7px;
  background: #9E2E2E;
  border: 1.5px solid #FDE68A;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 900;
  border-radius: 3px;
  pointer-events: none;
}

.vb-cta {
  width: 100%;
  min-height: 36px;
  height: 38px;
  border-width: 9px 14px !important;
  border-image-width: 9px 14px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
}

.vb-cta > span {
  white-space: nowrap;
}

/* Season Banner & Victory Banner (compact single-row header so all 6 cards & CTAs fit 100% on first view) */
.vb-season-banner,
.vb-victory-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 2px 12px;
  border-width: 8px 16px !important;
  border-image-width: 8px 16px !important;
  color: #EFE5CE;
}

.vb-banner-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}

.vb-banner-portrait {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.vb-banner-title {
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 800;
  color: #FDE68A;
  white-space: nowrap;
}

/* Settings & Exit */
.vb-settings-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vb-setting-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 8px;
  min-height: 44px;
  border-width: 12px 16px 10px 16px !important;
  border-image-width: 12px 16px 10px 16px !important;
  color: #EFE5CE;
}

.vb-set-lbl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.vb-set-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.vb-select {
  background: #1C1917;
  color: #FDE68A;
  border: 2px solid #A38B67;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 700;
  min-width: 180px;
}

.vb-mini-toggle {
  min-width: 76px;
  height: 36px;
  border-width: 8px 10px !important;
  border-image-width: 8px 10px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
}

.vb-exit-clean {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
}

.vb-clean-ic {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.vb-clean-title {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 800;
  color: #FDE68A;
}

.vb-clean-sub {
  font-size: 14px;
  color: #EFE5CE;
}

.vb-exit-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 6px;
  flex-wrap: nowrap;
}

.vb-exit-actions button {
  min-width: 152px;
  height: 48px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
}

.vb-ver-note {
  font-size: 12px;
  color: rgba(239, 229, 206, 0.72);
  text-align: center;
  padding-top: 2px;
}

/* ======================== VISUAL 3-ICON FEATURE GUIDE STRIP ======================== */
#feature-guide-strip {
  flex: 0 0 auto;
  display: none;
  justify-content: center;
  padding: 2px 0 4px;
}

.fg-flow-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 2px 10px;
  border-width: 8px 14px !important;
  border-image-width: 8px 14px !important;
}

.fg-steps {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fg-step {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fg-step-ic {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.fg-step-lbl {
  font-size: 13px;
  font-weight: 800;
  color: #EFE5CE;
  white-space: nowrap;
}

.fg-arrow {
  color: #FDE68A;
  font-size: 15px;
}

.vb-btn-sm {
  height: 34px;
  min-width: 96px;
  border-width: 8px 12px !important;
  border-image-width: 8px 12px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
}

/* ======================== SPOTLIGHT + POINTER-HAND FTUE ======================== */
#ftue-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  pointer-events: none;
}

#tut-spotlight {
  position: fixed;
  border: 3px solid #FDE68A;
  border-radius: 10px;
  box-shadow: 0 0 0 3px rgba(201, 138, 50, 0.45);
  pointer-events: none;
  animation: tutPulse 1.2s ease-in-out infinite;
}

#tut-hand {
  position: fixed;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #1C1917;
  border: 2px solid #C98A32;
  border-radius: 8px;
  color: #FDE68A;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
  animation: tutBounce 0.9s ease-in-out infinite;
}

#btn-tut-skip {
  position: fixed;
  top: 60px;
  right: 16px;
  z-index: 65;
  pointer-events: auto;
  height: 40px;
  min-width: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #FFFFFF;
}

@keyframes tutPulse {
  0%, 100% { opacity: 0.95; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.03); }
}

@keyframes tutBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ======================== RESPONSIVE 1280x720 & <900px ======================== */
@media (max-width: 1366px) {
  #top-hud { gap: 4px; left: 6px; right: 6px; }
  .hud-cluster { gap: 4px; }
  .hud-stat-pill { font-size: 12px; padding: 0 3px; height: 38px; border-width: 6px 10px !important; border-image-width: 6px 10px !important; }
  .hud-center-pill { font-size: 12px; padding: 0 4px; height: 38px; border-width: 7px 16px !important; border-image-width: 7px 16px !important; }
  .hud-nav-btn { font-size: 12px; padding: 0 4px; height: 38px; border-width: 6px 8px !important; border-image-width: 6px 8px !important; }
  .hud-nav-btn > img { width: 18px; height: 18px; }
  .hud-icon-btn { min-width: 36px; height: 38px; padding: 0 3px; border-width: 4px 6px !important; border-image-width: 4px 6px !important; font-size: 12px; }
  .hud-icon-btn > img { width: 20px; height: 20px; }
  .hand-card { width: 136px; height: 164px; padding: 3px 3px 5px; }
  .hc-art { width: 68px; height: 68px; }
  .hc-title { font-size: 12.5px; }
  .hc-stat { font-size: 12px; }
  .compact-action-btn { width: 68px; height: 68px; }
  .compact-action-btn > img { width: 40px; height: 40px; }
  .mana-orb-box { width: 66px; height: 66px; }
  .pile-btn { min-width: 58px; height: 48px; border-width: 7px 10px !important; border-image-width: 7px 10px !important; }
  #btn-end-turn { min-width: 120px; height: 56px; font-size: 14px; border-width: 14px 12px !important; border-image-width: 14px 12px !important; }
  .vf-card-portrait { min-height: 156px; gap: 3px; border-width: 10px 12px !important; border-image-width: 10px 12px !important; }
  .vf-art-stage { height: 68px; }
  .vf-art-img { max-width: 68px; max-height: 68px; }
  .vb-cta { min-height: 34px; height: 34px; border-width: 8px 10px !important; border-image-width: 8px 10px !important; font-size: 12.5px; }
  .modal-card { max-height: 94vh; border-width: 14px 18px 18px 18px !important; border-image-width: 14px 18px 18px 18px !important; }
  .modal-header { padding: 0 4px 6px; }
  .modal-body { gap: 7px; padding: 6px 2px 2px; }
  .vb-modal-grid { gap: 8px; }
  .vb-tab-btn { height: 34px; font-size: 12.5px; }
  .vb-season-banner, .vb-victory-banner { padding: 1px 10px; border-width: 6px 12px !important; border-image-width: 6px 12px !important; }
  .vb-banner-portrait { width: 32px; height: 32px; }
  .vb-banner-title { font-size: 14.5px; }
}

@media (max-height: 780px) {
  #modal-backdrop { padding: 8px 14px; }
  .modal-card { max-height: 95vh; border-width: 13px 16px 16px 16px !important; border-image-width: 13px 16px 16px 16px !important; }
  .modal-header { padding: 0 4px 5px; }
  .modal-body { gap: 6px; padding: 5px 2px 2px; }
  .vb-modal-grid { gap: 7px; }
  .vf-card-portrait { min-height: 152px; gap: 2px; border-width: 10px 12px !important; border-image-width: 10px 12px !important; }
  .vf-art-stage { height: 64px; }
  .vf-art-img { max-width: 64px; max-height: 64px; }
  .vb-cta { min-height: 32px; height: 33px; border-width: 7px 10px !important; border-image-width: 7px 10px !important; font-size: 12.5px; }
  .vb-tab-btn { height: 33px; border-width: 7px 10px !important; border-image-width: 7px 10px !important; font-size: 12.5px; }
  .vb-season-banner, .vb-victory-banner { padding: 1px 10px; border-width: 6px 12px !important; border-image-width: 6px 12px !important; }
  .vb-banner-portrait { width: 30px; height: 30px; }
  .vb-banner-title { font-size: 14px; }
  .fg-flow-wrap { border-width: 6px 12px !important; border-image-width: 6px 12px !important; padding: 1px 8px; }
  .fg-step-ic { width: 24px; height: 24px; }
  .vb-btn-sm { height: 30px; min-width: 84px; }
}

@media (max-width: 900px) {
  .vb-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vb-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .title-stage-hero { flex-direction: column; }
  .title-portrait-wrap { height: 220px; }
}

/* ======================== TIMED PASS TIERS & SANCTUM COSMETICS (v1.0.1.0-rc3) ======================== */
.vb-pass-tier-grid {
  gap: 8px;
}

.vb-pass-card {
  min-height: 142px;
  gap: 3px;
  border-width: 10px 12px !important;
  border-image-width: 10px 12px !important;
}

.vb-pass-art {
  height: 54px;
}

.vb-pass-art .vf-art-img {
  max-width: 52px;
  max-height: 52px;
}

@media (max-height: 780px), (max-width: 1366px) {
  .vb-pass-card {
    min-height: 128px;
    gap: 2px;
    border-width: 8px 10px !important;
    border-image-width: 8px 10px !important;
  }
  .vb-pass-art {
    height: 46px;
  }
  .vb-pass-art .vf-art-img {
    max-width: 44px;
    max-height: 44px;
  }
}

/* Card-Back & Foil Finishes (Forge 150-400 Shards + Starter Kit Runed Parchment) */
.hand-card.card-back-runed_parchment,
.vf-card-portrait.card-back-runed_parchment {
  background-color: #E7CCA0 !important;
  box-shadow: inset 0 0 0 2px rgba(158, 46, 46, 0.45), inset 0 0 12px rgba(201, 138, 50, 0.32);
}

.hand-card.card-back-astral_vellum,
.vf-card-portrait.card-back-astral_vellum {
  background-color: #DCE8F6 !important;
  box-shadow: inset 0 0 0 2px rgba(56, 189, 248, 0.62), inset 0 0 14px rgba(56, 189, 248, 0.25);
}

.hand-card.card-back-crimson_wax,
.vf-card-portrait.card-back-crimson_wax {
  background-color: #F2D3C9 !important;
  box-shadow: inset 0 0 0 2px rgba(185, 28, 28, 0.68), inset 0 0 14px rgba(201, 138, 50, 0.28);
}

.hand-card.card-back-eclipse_foil,
.vf-card-portrait.card-back-eclipse_foil {
  background-color: #E4D7F5 !important;
  box-shadow: inset 0 0 0 2px rgba(168, 85, 247, 0.72), inset 0 0 16px rgba(245, 158, 11, 0.28);
}

.hand-card.card-back-sovereign_gilt,
.vf-card-portrait.card-back-sovereign_gilt {
  background-color: #F6E4B4 !important;
  box-shadow: inset 0 0 0 2.5px rgba(217, 151, 38, 0.88), inset 0 0 16px rgba(253, 224, 71, 0.36);
}

/* Wax-Seal Card Frames (bundle_sanctum_skins) & Gilded VIP Frames */
.hand-card.card-frame-wax_seal,
.vf-card-portrait.card-frame-wax_seal {
  outline: 2px solid #9E2E2E;
  outline-offset: -3px;
}

.hand-card.card-frame-wax_seal .card-cost {
  background: radial-gradient(circle at 35% 35%, #F59E0B 0%, #9E2E2E 68%, #4A0E0E 100%);
  border-color: #FDE68A;
  box-shadow: 0 0 0 2px rgba(158, 46, 46, 0.85), 0 3px 6px rgba(0, 0, 0, 0.7);
}

.hand-card.card-frame-gilded_vip,
.vf-card-portrait.card-frame-gilded_vip {
  outline: 2px solid #F59E0B;
  outline-offset: -3px;
}

.hand-card.card-frame-gilded_vip .card-cost {
  background: radial-gradient(circle at 35% 35%, #FEF08A 0%, #D97706 72%, #78350F 100%);
  border-color: #FFFFFF;
  color: #1C130C;
}

/* Obsidian Sanctum Table Theme (bundle_sanctum_skins) */
html[data-table-theme="obsidian_sanctum"] #game-screen {
  background-color: #0D0B18;
}

html[data-table-theme="obsidian_sanctum"] .hud-stat-pill,
html[data-table-theme="obsidian_sanctum"] .hud-center-pill {
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.45));
}

html[data-table-theme="obsidian_sanctum"] #modal-backdrop {
  background: rgba(10, 7, 22, 0.82);
}

/* Ornate Hero Portraits (bundle_sanctum_skins) & Astral Crown Banner (VIP) */
html[data-portrait-style="ornate_sanctum"] #title-hero-portrait {
  filter: drop-shadow(0 0 18px rgba(217, 151, 38, 0.72)) drop-shadow(0 16px 24px rgba(0, 0, 0, 0.78));
}

html[data-portrait-style="ornate_sanctum"] .vb-banner-portrait {
  border: 2px solid #D99726;
  border-radius: 6px;
  background: rgba(28, 20, 14, 0.75);
}

html[data-portrait-style="astral_crown"] #title-hero-portrait {
  filter: drop-shadow(0 0 22px rgba(253, 224, 71, 0.82)) drop-shadow(0 0 10px rgba(168, 85, 247, 0.55));
}

html[data-portrait-style="astral_crown"] .vb-banner-portrait {
  border: 2px solid #FDE68A;
  border-radius: 6px;
  background: rgba(46, 20, 72, 0.75);
}
