/* ==========================================================================
 * Coppertrack: Rail Merge Tycoon — Commercial Steampunk Brass Rail Stylesheet
 * UI Vault Style: steampunk_brass_rail
 * STRICT LAWS:
 *   1. ZERO cyan neon glow anywhere! Hammered brass, antique copper, warm amber,
 *      parchment cream, and dark cast-iron plaques ONLY.
 *   2. Full-bleed 100vw x 100vh #game-canvas; NO opaque top navbar or sidebars!
 *   3. >= 18 real border-image 9-slice regions with solid padding-box contrast plates.
 *   4. ZERO backdrop-filter: blur() over canvas; ZERO nested drop-shadow inside modals.
 *   5. Outer-corner .notify-badge (overflow: visible !important) + 0 text clipping across 9 langs.
 * ========================================================================== */

:root,
[data-ui-vault-style="steampunk_brass_rail"] {
  --brass-gold: #E69B24;
  --brass-bright: #FDD23C;
  --copper-warm: #B87333;
  --copper-deep: #7C4118;
  --iron-dark: #1E1713;
  --iron-plaque: #2E2520;
  --iron-capsule: #30302E;
  --parchment-cream: #DFCDA9;
  --parchment-card: #CFBB97;
  --crimson-wax: #B92315;
  --patina-sage: #27A693;
  --emerald-rate: #82E05A;
  --ink-dark: #181411;
  --text-cream: #FAF0D7;

  --font-display: 'Bahnschrift SemiCondensed', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --font-body: 'Segoe UI', system-ui, sans-serif;

  /* TrackBUIMotion v2.7 <-> UI Vault Slot VFX Contract */
  --tb-slot-style: 'steampunk_brass_rail';
  --tb-slot-shape: rect;
  --tb-slot-radius: 8px;
  --tb-slot-chamfer: 0px;
  --tb-slot-inset: 3px 3px 4px 3px;
  --tb-slot-palette: bronze_gold;
  --tb-slot-mode: flame_slot;
  --tb-slot-daylight: 1;
  --tb-slot-z: 3;
}

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

html,
body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #1A1614;
  color: var(--text-cream);
  font-family: var(--font-body);
  user-select: none;
  -webkit-user-select: none;
}

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

#game-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
  touch-action: none;
}

.idle-overlay-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none !important;
}

#ui-motion-canvas {
  z-index: 85;
}

#cutin-canvas {
  z-index: 95;
}

.hidden {
  display: none !important;
}

button {
  font-family: var(--font-display);
  cursor: pointer;
  overflow: visible !important;
  position: relative;
  transition: transform 0.12s ease, brightness 0.12s ease;
}

button:active:not(:disabled) {
  transform: translateY(2px) scale(0.98);
}

kbd {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(24, 20, 17, 0.78);
  color: #FFE799;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  border: 1px solid rgba(230, 155, 36, 0.55);
  vertical-align: middle;
}

/* ==================== 22 REAL 9-SLICE UI VAULT REGIONS ==================== */

/* 1. Title Showcase Panel */
.title-panel-9s {
  background-color: #DFCDA9;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 26px 28px 26px 26px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/frame_modal.png') 82 91 83 83 fill / 26px 28px 26px 26px / 0 stretch;
  color: #181411;
}

/* 2. Modal Main Frame */
.modal-card-9s {
  background-color: #DFCDA9;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 24px 26px 24px 24px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/frame_modal.png') 82 91 83 83 fill / 24px 26px 24px 24px / 0 stretch;
  color: #181411;
}

/* 3. Cast-Iron Subpanel Plaque */
.modal-subpanel-9s {
  background-color: #353534;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 6px 26px 8px 26px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/frame_subpanel.png') 18 149 25 149 fill / 6px 26px 8px 26px / 0 stretch;
  color: #FFFFFF;
}

/* 4. Crimson & Brass Header Ribbon */
.modal-ribbon-9s {
  background-color: #A81F13;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 8px 34px 13px 34px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/ribbon_header.png') 26 157 50 156 fill / 8px 34px 13px 34px / 0 stretch;
  color: #FFFFFF;
}

/* 5. Top HUD Currency Capsule */
.hud-pill-9s {
  background-color: #30302E;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 7px 22px 7px 11px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/hud_pill.png') 26 118 25 39 fill / 7px 22px 7px 11px / 0 stretch;
  color: #FFFFFF;
}

/* 6. Brass Riveted Dock / Slot Tile */
.dock-slot-9s {
  background-color: #46290E;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 11px 13px 13px 13px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/slot_tile.png') 48 60 57 61 fill / 11px 13px 13px 13px / 0 stretch;
  color: #FFFFFF;
}

/* 7. Primary Hammered Brass CTA Button */
.btn-brass-primary {
  background-color: #E2A834;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 24px 11px 24px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/btn_primary.png') 50 240 51 239 fill / 10px 24px 11px 24px / 0 stretch;
  color: #181411;
  font-weight: 800;
}

/* 8. Secondary Patina Copper-Sage Button */
.btn-brass-secondary {
  background-color: #27A693;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 22px 12px 14px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/btn_secondary.png') 53 241 62 76 fill / 10px 22px 12px 14px / 0 stretch;
  color: #14181C;
  font-weight: 800;
}

/* 9. Danger / Boiler Crimson Button */
.btn-brass-danger {
  background-color: #B51D15;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 22px 11px 22px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/btn_danger.png') 50 172 56 172 fill / 10px 22px 11px 22px / 0 stretch;
  color: #FFFFFF;
  font-weight: 800;
}

/* 10. Disabled / Locked Iron Button */
.btn-brass-disabled,
button:disabled {
  background-color: #484949 !important;
  background-clip: padding-box !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 10px 16px 10px 16px !important;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/btn_disabled.png') 55 72 54 72 fill / 10px 16px 10px 16px / 0 stretch !important;
  color: #FFFFFF !important;
  cursor: not-allowed;
  opacity: 0.9;
}

/* 11. Common Brass-Parchment Card */
.card-tier-common {
  background-color: #CFBB97;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 14px 14px 14px 14px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/card_common.png') 83 75 82 73 fill / 14px 14px 14px 14px / 0 stretch;
  color: #181411;
}

/* 12. Rare Patina-Rimmed Card */
.card-tier-rare {
  background-color: #CEBA96;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 12px 14px 13px 12px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/card_rare.png') 55 71 61 53 fill / 12px 14px 13px 12px / 0 stretch;
  color: #181411;
}

/* 13. Epic Copper-Gilded Card */
.card-tier-epic {
  background-color: #CFBB97;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 14px 15px 15px 14px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/card_epic.png') 75 78 78 77 fill / 14px 15px 15px 14px / 0 stretch;
  color: #181411;
}

/* 14. Legendary Ornate Brass Gear Card */
.card-tier-legendary {
  background-color: #CFBB97;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 22px 14px 24px 14px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/card_legendary.png') 184 82 200 80 fill / 22px 14px 24px 14px / 0 stretch;
  color: #181411;
}

/* 15. Steam Pressure Gauge Track */
.pressure-track-9s {
  background-color: #312222;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 6px 10px 7px 10px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/bar_track.png') 48 61 57 61 fill / 6px 10px 7px 10px / 0 stretch;
  height: 20px;
  position: relative;
  overflow: hidden;
}

/* 16. Steam Pressure Golden Fill */
.pressure-fill-9s {
  background-color: #FDD23C;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 4px 10px 4px 10px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/bar_fill_primary.png') 54 115 53 101 fill / 4px 10px 4px 10px / 0 stretch;
  height: 100%;
  min-width: 16px;
  transition: width 0.18s ease-out;
}

/* 17. Boot Loading Track */
.loading-track-9s {
  background-color: #312222;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 7px 12px 8px 12px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/bar_track.png') 48 61 57 61 fill / 7px 12px 8px 12px / 0 stretch;
  height: 24px;
  overflow: hidden;
}

/* 18. Boot Loading Fill */
.loading-fill-9s {
  background-color: #FDD23C;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 5px 12px 5px 12px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/bar_fill_primary.png') 54 115 53 101 fill / 5px 12px 5px 12px / 0 stretch;
  height: 100%;
  min-width: 18px;
  transition: width 0.16s ease-out;
}

/* 19. Active Brass Tab Plate */
.tab-brass-active {
  background-color: #964B24;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 7px 8px 8px 8px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/tab_active.png') 26 28 31 27 fill / 7px 8px 8px 8px / 0 stretch;
  color: #FFFFFF;
}

/* 20. Compact Upgrade Chip (9-Slice Slot Tile) — 0 vertical clipping (#3977) */
.upgrade-chip-9s {
  background-color: #46290E;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 7px 8px 9px 8px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/slot_tile.png') 48 60 57 61 fill / 7px 8px 9px 8px / 0 stretch;
  color: #FFFFFF;
}

/* 21. Offline Earnings Highlight Banner */
.offline-banner-9s {
  background-color: #CEBA96;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 14px 16px 15px 16px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/card_epic.png') 75 78 78 77 fill / 14px 16px 15px 16px / 0 stretch;
  color: #181411;
}

/* 22. FTUE Coach Callout Plaque */
.tutorial-callout-9s {
  background-color: #353534;
  background-clip: padding-box;
  border-style: solid;
  border-color: transparent;
  border-width: 7px 26px 9px 26px;
  border-image: url('../assets/ui/vault_steampunk_brass_rail/frame_subpanel.png') 18 149 25 149 fill / 7px 26px 9px 26px / 0 stretch;
  color: #FFFFFF;
}

/* ==================== HEROIC FULL-BLEED NO-BOX TITLE SCREEN ==================== */

#title-screen {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 20px 24px 48px;
}

.title-bg-layer {
  position: absolute;
  inset: 0;
  background: url('../assets/art/title_bg.png') center center / cover no-repeat;
  z-index: 0;
}

.title-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 12, 8, 0.34) 0%, rgba(18, 12, 8, 0.06) 38%, rgba(18, 12, 8, 0.62) 76%, rgba(14, 9, 6, 0.86) 100%),
    radial-gradient(circle at 50% 72%, rgba(230, 155, 36, 0.16) 0%, rgba(18, 12, 8, 0.28) 65%);
  z-index: 1;
  pointer-events: none;
}

.title-corner-utils {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-util-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 8px;
  font-size: 14px;
  white-space: nowrap;
}

.title-util-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.title-hero-stage {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  max-width: min(1040px, 94vw);
  background: transparent !important;
  border: none !important;
  border-image: none !important;
}

.title-hero-portrait {
  width: 214px;
  height: 228px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  background: radial-gradient(circle at 50% 56%, rgba(253, 210, 60, 0.32) 0%, rgba(184, 115, 51, 0.14) 48%, rgba(0, 0, 0, 0) 72%);
  border: none;
  overflow: visible;
}

.title-hero-portrait img {
  width: 96%;
  height: 96%;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 10px 18px rgba(12, 8, 5, 0.78));
}

.title-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  background: transparent !important;
  border: none !important;
  border-image: none !important;
}

.title-ribbon {
  display: inline-block;
  margin: 0;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #1A120D;
}

.game-logo-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(48px, 4.3vw, 66px);
  line-height: 1.03;
  font-weight: 800;
  color: #FFE27A;
  -webkit-text-stroke: 2.5px #221107;
  paint-order: stroke fill;
  text-shadow:
    0 4px 0 #3B1C09,
    0 7px 0 #1B0C04,
    0 12px 24px rgba(0, 0, 0, 0.85);
}

.game-logo-subtitle {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
  color: #FFF4D4;
  text-shadow: 0 2px 6px rgba(12, 8, 5, 0.92), 0 1px 0 #1E120A;
}

.boot-progress-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(420px, 78vw);
  margin-top: 4px;
}

.boot-progress-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: #FFE799;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}

.title-cta-group {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.title-play-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 256px;
  min-height: 64px;
  padding: 0 18px;
  font-size: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  filter: drop-shadow(0 8px 18px rgba(14, 9, 5, 0.72));
}

.title-play-cta img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ==================== FLOATING HUD CLUSTERS ==================== */

.hud-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

#top-hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  display: flex;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
  z-index: 50;
}

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

.hud-pill-9s {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 6px 0 2px;
  white-space: nowrap;
  overflow: visible !important;
}

.hud-pill-9s .uiv-icon-pop {
  width: 34px;
  height: 34px;
  margin: -8px 2px -8px -12px;
  object-fit: contain;
  flex-shrink: 0;
}

.hud-metric-col {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.hud-val {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1.5px 0 #120E0B;
}

.hud-rate {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  color: var(--emerald-rate);
  font-variant-numeric: tabular-nums;
}

.hud-pill-clickable {
  cursor: pointer;
}

.hud-plus-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #E69B24;
  color: #181411;
  font-size: 13px;
  font-weight: 900;
  margin-left: 3px;
}

.hud-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 0 8px;
  font-size: 13px;
  line-height: 1.12;
  white-space: nowrap;
}

.hud-top-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.btn-dev-pill {
  background: #2E2520;
  border: 2px solid #E69B24;
  color: #FDD23C;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}

/* Upper-Right Corner Notification Badge — right: 0 keeps scrollWidth === clientWidth (0px horizontal overflow) while straddling top 9-slice bezel above text */
.notify-badge {
  position: absolute !important;
  top: -12px !important;
  right: 0px !important;
  z-index: 8 !important;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #D92318;
  border: 2px solid #FAF0D7;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
}

/* ==================== SPOTLIGHT RING + POINTER HAND FTUE ==================== */

.tut-coachmark-layer {
  position: fixed;
  inset: 0;
  pointer-events: none !important;
  z-index: 48;
}

.tut-spotlight {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 96px;
  transform: translate(-50%, -50%);
  border-radius: 16px;
  border: 3.5px solid #FFE14D;
  box-shadow:
    0 0 0 4px rgba(184, 115, 51, 0.55),
    inset 0 0 18px rgba(253, 210, 60, 0.45);
  pointer-events: none !important;
  animation: tutRingPulse 1.2s ease-in-out infinite;
}

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

.tut-pointer-wrap {
  position: fixed;
  left: 50%;
  top: 54%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transform: translate(-50%, 0);
  pointer-events: none !important;
  transition: left 0.28s ease-out, top 0.28s ease-out;
}

.tut-hand {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.72));
  animation: tutHandBob 0.95s ease-in-out infinite;
  pointer-events: none !important;
}

.tut-hand.drag-slide {
  animation: tutHandDrag 1.35s ease-in-out infinite;
}

@keyframes tutHandBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-9px) scale(0.95); }
}

@keyframes tutHandDrag {
  0% { transform: translate(-26px, 0) scale(1); }
  20% { transform: translate(-26px, 4px) scale(0.93); }
  75% { transform: translate(38px, 4px) scale(0.95); }
  100% { transform: translate(38px, -4px) scale(1); }
}

.tut-cue-pill {
  padding: 4px 12px;
  border-radius: 999px;
  background: #FFE14D;
  border: 2.5px solid #241309;
  color: #181411;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.62);
  pointer-events: none !important;
}

.tut-skip-chip {
  position: fixed;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px 3px 12px;
  border-radius: 999px;
  background: rgba(30, 22, 17, 0.88);
  border: 2px solid #B87333;
  pointer-events: auto;
}

.tut-step-counter {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #FFE14D;
}

.tutorial-skip-btn {
  min-height: 32px;
  font-size: 13px;
  padding: 0 8px;
  flex-shrink: 0;
}

/* ==================== BOTTOM-LEFT FLOATING YARD & UPGRADE CONTROLS ==================== */

#hud-bottom-left {
  position: fixed;
  left: 12px;
  bottom: 12px;
  width: 344px;
  display: flex;
  flex-direction: column;
  align-content: start;
  gap: 8px;
  pointer-events: none;
  z-index: 44;
}

.yard-primary-actions {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 8px;
  pointer-events: auto;
}

.yard-cta-buy,
.yard-cta-merge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 52px;
  max-height: 68px;
  padding: 2px 4px;
  min-width: 0;
}

.yard-cta-buy img,
.yard-cta-merge img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.btn-stack-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.12;
  min-width: 0;
}

.btn-main-line {
  font-size: 13.5px;
  font-weight: 800;
  white-space: normal;
  overflow-wrap: break-word;
}

.btn-cost-line {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
}

.core-upgrades-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  align-items: start;
  align-content: start;
  pointer-events: auto;
}

/* Compact Action/Upgrade Buttons: 78-88px tall, icons ~41% height / >=13% area, >=4px bottom cushion (#3977) */
.upgrade-chip-9s {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  height: 88px;
  padding: 2px 3px 4px;
  min-width: 0;
  text-align: center;
}

.upgrade-chip-9s img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.upg-chip-title {
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.05;
  font-weight: 700;
  color: #FAF0D7;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upg-chip-cost {
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.05;
  font-weight: 800;
  color: #FDD23C;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.upg-lv-tag {
  position: absolute;
  top: -9px;
  left: -6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #2A201B;
  border: 1px solid #B87333;
  color: #FAF0D7;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

/* ==================== BOTTOM-CENTER OVERDRIVE & CRUISE BAR ==================== */

#hud-bottom-center {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 44;
}

.overdrive-bar-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  pointer-events: auto;
}

.pressure-gauge-col {
  width: 168px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pressure-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #FAF0D7;
  letter-spacing: 0.02em;
}

#pressure-pct-text {
  color: #FDD23C;
  font-variant-numeric: tabular-nums;
}

.overdrive-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 13.5px;
  padding: 0 6px;
  white-space: nowrap;
}

.overdrive-cta-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.overdrive-cta-btn.ready-pulse {
  filter: brightness(1.08);
}

.cruise-chip-btn {
  min-height: 40px;
  font-size: 13px;
  padding: 0 6px;
  white-space: nowrap;
}

/* ==================== BOTTOM-RIGHT META OPERATIONS DOCK ==================== */

#hud-bottom-right {
  position: fixed;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 7px;
  pointer-events: auto;
  z-index: 44;
}

.meta-dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 82px;
  width: auto;
  height: 80px;
  padding: 1px 5px;
  border-width: 8px 10px 10px 10px;
  text-align: center;
  flex-shrink: 0;
}

.meta-dock-btn img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.dock-btn-label {
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.05;
  font-weight: 700;
  color: #FFFFFF;
  max-width: 100%;
  white-space: nowrap;
}

/* ==================== MODALS (ZERO BACKDROP BLUR, ZERO NESTED DROP-SHADOW) ==================== */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop,
.brass-scrim {
  position: fixed;
  inset: 0;
  background: rgba(18, 13, 10, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.modal-dialog {
  width: min(920px, 94vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.modal-dialog.modal-narrow {
  width: min(580px, 94vw);
}

.modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(90, 56, 28, 0.32);
}

.modal-dialog > .modal-grid-2 {
  flex: 0 0 auto;
}

.modal-title-ribbon {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin: 0;
  text-shadow: 0 2px 0 #18100C;
}

.modal-close-x {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border: none;
  background: url('../assets/ui/vault_steampunk_brass_rail/btn_close.png') center / contain no-repeat;
  color: transparent;
  font-size: 0;
  padding: 0;
  flex-shrink: 0;
}

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

/* ==================== VISUAL-FIRST (60/25/15) MODAL & SEASONS SYSTEM ==================== */

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

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

.pass-selector-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.vip-stipend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
}

.pass-tier-track-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pass-reward-pair {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pass-reward-lane {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(24, 18, 14, 0.12);
  border: 1px solid rgba(124, 65, 24, 0.28);
  font-size: 11.5px;
  font-weight: 800;
  color: #24160E;
}

.pass-reward-lane.prem {
  background: rgba(230, 155, 36, 0.22);
  border-color: rgba(184, 115, 51, 0.62);
}

.pass-reward-lane.locked {
  opacity: 0.66;
}

.pass-lane-tag {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  background: #2A201B;
  color: #FFE799;
}

.pass-reward-lane.prem .pass-lane-tag {
  background: #B92315;
  color: #FFFFFF;
}

.seasons-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 800;
  min-width: 0;
  white-space: nowrap;
}

.seasons-tab-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.seasons-pane-wrap,
.vf-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* Compact Non-Card Toolbar / Header Strip */
.vf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 12px;
}

.vf-toolbar-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.vf-toolbar-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: #FFE799;
}

.vf-toolbar-title img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.vf-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 8px;
  font-size: 12.5px;
  white-space: nowrap;
}

.vf-pill-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Modal Containment Grids: ALWAYS minmax(0, 1fr) */
.modal-grid-4,
.vf-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

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

.modal-grid-2,
.vf-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.modal-grid-4 > *,
.modal-grid-3 > *,
.modal-grid-2 > *,
.vf-grid-4 > *,
.vf-grid-3 > *,
.vf-grid-2 > * {
  min-width: 0;
  max-width: 100%;
}

/* 60/25/15 Portrait & Showcase Cards */
.vf-card-portrait,
.vf-medal-tile,
.shop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 6px 7px;
  text-align: center;
  position: relative;
  min-width: 0;
}

.vf-card-portrait.card-tier-legendary,
.vf-medal-tile.card-tier-legendary,
.vf-hero-card.card-tier-legendary,
.shop-card.card-tier-legendary {
  border-width: 14px 13px 15px 13px;
}

.vf-medal-tile.locked .vf-art-img {
  filter: grayscale(0.88) brightness(0.75);
  opacity: 0.7;
}

.vf-top-badges {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.vf-lv-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(24, 18, 14, 0.84);
  color: #FFE799;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
}

.vf-tag-gold {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: #B92315;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

/* Artwork Stage (>= 55% visual prominence inside 60/25/15 cards) */
.vf-art-stage {
  width: 100%;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 52%, rgba(253, 210, 60, 0.28) 0%, rgba(30, 22, 17, 0.14) 76%);
  position: relative;
  overflow: hidden;
}

.vf-art-stage.sm {
  height: 62px;
}

.vf-art-stage.lg {
  height: 92px;
}

.vf-art-img,
.shop-art-thumb {
  width: 68px;
  height: 68px;
  object-fit: contain;
  flex-shrink: 0;
}

.vf-art-stage.sm .vf-art-img {
  width: 54px;
  height: 54px;
}

.vf-art-stage.lg .vf-art-img,
.vf-art-stage.lg .shop-art-thumb {
  width: 82px;
  height: 82px;
}

.vf-zone-banner {
  width: 100%;
  height: 104px;
  object-fit: cover;
  border-radius: 7px;
  border: 2px solid #6E3A14;
  display: block;
}

.vf-theme-banner {
  width: 100%;
  height: 68px;
  object-fit: cover;
  border-radius: 7px;
  border: 2px solid #5A2E10;
  display: block;
}

.vf-card-name,
.shop-item-title {
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.12;
  font-weight: 800;
  color: #181411;
  max-width: 100%;
  overflow-wrap: break-word;
}

.vf-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.vf-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(28, 20, 15, 0.14);
  border: 1px solid rgba(124, 65, 24, 0.35);
  color: #2B1608;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.vf-stat-chip.boost {
  background: rgba(46, 111, 64, 0.16);
  border-color: rgba(46, 111, 64, 0.42);
  color: #174B27;
}

.rwd-ico {
  width: 17px;
  height: 17px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Compact Progress Meter inside Cards (Note: no 'track' or 'row' in class name) */
.vf-meter {
  width: 100%;
  height: 17px;
  border-radius: 999px;
  background: #2B1F19;
  border: 1.5px solid #8A5224;
  position: relative;
  overflow: hidden;
}

.vf-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #D98224 0%, #FFE14D 100%);
  border-radius: 999px;
  transition: width 0.2s ease-out;
}

.vf-meter-txt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  color: #FFF8E7;
  text-shadow: 0 1px 2px #000000;
}

.vf-actions {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
}

.vf-cta-btn,
.shop-buy-btn {
  width: 100%;
  min-height: 36px;
  padding: 0 6px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.vf-cta-btn .btn-label,
.shop-buy-btn .btn-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  line-height: 1.12;
  white-space: normal;
  overflow-wrap: break-word;
}

.modal-narrow .vf-cta-btn {
  border-width: 9px 14px 10px 14px;
  border-image-width: 1;
  padding: 2px 4px;
  font-size: 12.5px;
}

/* Horizontal Hero Showcase Card */
.vf-hero-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  min-width: 0;
}

.vf-hero-art {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 50%, rgba(253, 210, 60, 0.3) 0%, rgba(28, 20, 15, 0.16) 75%);
  padding: 4px;
}

.vf-hero-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

/* Compact Horizontal Prestige Talent Card (3x3 fits cleanly inside 720p & 1080p) */
.vf-talent-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  min-width: 0;
  position: relative;
}

.vf-talent-card.card-tier-legendary {
  border-width: 14px 13px 15px 13px;
  border-image-width: 1;
}

.vf-talent-art {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 52%, rgba(253, 210, 60, 0.28) 0%, rgba(30, 22, 17, 0.14) 76%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.vf-talent-art .vf-art-img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.vf-talent-rank {
  position: absolute;
  top: -5px;
  left: -5px;
  font-size: 11.5px;
  padding: 1px 5px;
}

.vf-talent-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  text-align: left;
}

/* Visual Milestone Track (Lesson #43) */
.vf-milestone-rail {
  position: relative;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(32, 23, 18, 0.12);
  border: 1.5px solid rgba(124, 65, 24, 0.32);
}

.vf-milestone-line {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 38px;
  height: 8px;
  border-radius: 999px;
  background: #2B1F19;
  overflow: hidden;
  z-index: 1;
}

.vf-milestone-line-fill {
  height: 100%;
  background: linear-gradient(90deg, #E69B24, #FFE14D);
}

.vf-milestone-nodes {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.vf-mnode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.vf-mnode img.vf-node-chest {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

.vf-mnode-lbl {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
  color: #2B1608;
}

.shop-badge-pill {
  position: absolute;
  top: -11px;
  right: 2px;
  z-index: 7;
  padding: 2px 8px;
  border-radius: 5px;
  background: #B92315;
  border: 1.5px solid #FAF0D7;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* 3-Icon Visual Coach Strip (`feature_guides.js` — Pillar 3) */
.vf-guide-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
}

.vf-guide-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  text-align: center;
}

.vf-guide-step img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.vf-guide-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #24160E;
  border: 1.5px solid #E69B24;
  color: #FFE14D;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
}

.vf-guide-caption {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: #181411;
  line-height: 1.15;
}

.vf-guide-desc {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  color: #3A2210;
  line-height: 1.32;
  max-width: 24ch;
}

.vf-guide-arrow {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: #8C4716;
  user-select: none;
}

/* Victory 3-Star Celebration Stage (Pillar 6) */
.vf-victory-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  text-align: center;
}

#victory-fx-canvas {
  width: 100%;
  max-width: 400px;
  height: 144px;
  display: block;
}

.vf-loot-tray {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 16px;
}

.vf-loot-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 96px;
  padding: 6px 10px;
}

.vf-loot-box img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.vf-loot-num {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #181411;
  font-variant-numeric: tabular-nums;
}

.vf-victory-next {
  min-width: 228px;
  min-height: 54px;
  font-size: 20px;
  letter-spacing: 0.04em;
}

/* Settings Icon Sliders & Tactile Toggles (Pillar 6) */
.vf-setting-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(30, 23, 19, 0.10);
  border-radius: 8px;
  border: 1px solid rgba(124, 65, 24, 0.25);
}

.vf-setting-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
  color: #181411;
}

.vf-setting-head img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

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

.brass-slider {
  width: 148px;
  height: 8px;
  accent-color: #B87333;
  cursor: pointer;
}

.vf-toggle-switch {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  min-height: 44px;
  font-size: 13px;
}

.vf-toggle-switch img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

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

.lang-btn {
  min-height: 38px;
  font-size: 13px;
}

/* Plinko Mini-Canvas */
.plinko-stage-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#plinko-canvas {
  width: 100%;
  max-width: 520px;
  height: 270px;
  border-radius: 10px;
  background: #231B17;
  border: 3px solid #B87333;
  display: block;
}

/* Toast Stack */
.toast-stack {
  position: fixed;
  top: 66px;
  right: 16px;
  z-index: 130;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast-item {
  background: #2E2520;
  border: 2px solid #E69B24;
  color: #FAF0D7;
  padding: 7px 12px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.48);
}

/* Preview-Only F2 Debug Panel */
.debug-panel {
  position: fixed;
  top: 58px;
  left: 14px;
  z-index: 140;
  width: 300px;
  background: #231C18;
  border: 2px solid #E69B24;
  border-radius: 10px;
  padding: 10px;
  color: #FAF0D7;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65);
}

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

.debug-grid button {
  background: #3A2E27;
  border: 1px solid #B87333;
  color: #FAF0D7;
  border-radius: 6px;
  padding: 5px 6px;
  font-size: 12px;
}

/* ==================== 1280x720 COMPACT LAPTOP VIEWPORT RULES ==================== */

@media (max-width: 1460px) {
  #title-screen {
    padding: 16px 20px 30px;
  }

  .title-hero-portrait {
    width: 172px;
    height: 184px;
  }

  .game-logo-title {
    font-size: clamp(44px, 4.2vw, 54px);
  }

  .title-play-cta {
    min-width: 236px;
    min-height: 58px;
    font-size: 21px;
  }

  .title-play-cta img {
    width: 40px;
    height: 40px;
  }

  #top-hud {
    padding: 5px 8px;
    gap: 5px;
  }

  .hud-cluster {
    gap: 4px;
  }

  .hud-pill-9s {
    border-width: 6px 13px 6px 9px;
    min-height: 34px;
    padding: 0 3px 0 0;
  }

  .hud-pill-9s .uiv-icon-pop {
    width: 26px;
    height: 26px;
    margin: -6px 2px -6px -8px;
  }

  .hud-val {
    font-size: 13px;
  }

  .hud-rate {
    font-size: 11.8px;
  }

  .hud-top-btn {
    min-height: 34px;
    font-size: 12px;
    border-width: 7px 12px 8px 12px;
    padding: 0 6px;
  }

  .hud-top-btn img {
    width: 20px;
    height: 20px;
  }

  .hud-icon-only .sr-compact {
    display: none;
  }

  #hud-bottom-left {
    left: 8px;
    bottom: 8px;
    width: 296px;
    gap: 6px;
  }

  .yard-cta-buy,
  .yard-cta-merge {
    min-height: 46px;
    border-width: 8px 13px 9px 13px;
  }

  .yard-cta-buy img,
  .yard-cta-merge img {
    width: 28px;
    height: 28px;
  }

  .btn-main-line {
    font-size: 12px;
  }

  .btn-cost-line {
    font-size: 11.8px;
  }

  .upgrade-chip-9s {
    height: 78px;
    border-width: 6px 7px 8px 7px;
    padding: 2px 2px 4px;
    gap: 1px;
  }

  .upgrade-chip-9s img {
    width: 32px;
    height: 32px;
  }

  .upg-chip-title {
    font-size: 11px;
    line-height: 1.04;
  }

  .upg-chip-cost {
    font-size: 11.5px;
    line-height: 1.04;
  }

  .upg-lv-tag {
    font-size: 11.5px;
  }

  #hud-bottom-center {
    bottom: 8px;
  }

  .overdrive-bar-panel {
    gap: 5px;
    padding: 3px 6px;
    border-width: 5px 15px 6px 15px;
  }

  .pressure-gauge-col {
    width: 128px;
  }

  .pressure-label-row {
    font-size: 11.8px;
  }

  .pressure-track-9s {
    height: 16px;
  }

  .overdrive-cta-btn {
    min-height: 38px;
    font-size: 12px;
    border-width: 7px 12px 8px 12px;
  }

  .overdrive-cta-btn img {
    width: 22px;
    height: 22px;
  }

  .cruise-chip-btn {
    min-height: 36px;
    font-size: 11.8px;
    border-width: 7px 11px 8px 11px;
  }

  #hud-bottom-right {
    right: 8px;
    bottom: 8px;
    gap: 5px;
  }

  .meta-dock-btn {
    min-width: 72px;
    width: auto;
    height: 70px;
    padding: 1px 4px;
    border-width: 6px 6px 7px 6px;
  }

  .meta-dock-btn img {
    width: 40px;
    height: 40px;
  }

  .dock-btn-label {
    font-size: 11.5px;
    letter-spacing: -0.01em;
  }

  .seasons-tab-btn {
    min-height: 33px;
    font-size: 11.8px;
  }

  .notify-badge {
    top: -10px !important;
    right: 0px !important;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 13px;
  }

  .modal-root,
  .modal-backdrop,
  .brass-scrim {
    padding: 8px;
  }

  .modal-dialog {
    width: min(920px, 96vw);
    max-height: 95vh;
    border-width: 14px 16px 14px 16px;
    border-image-width: 1;
    gap: 5px;
    overflow: hidden;
  }

  .modal-dialog.modal-narrow {
    width: min(580px, 95vw);
  }

  .modal-header {
    padding-bottom: 4px;
  }

  .modal-title-ribbon {
    font-size: 17px;
    border-width: 6px 26px 9px 26px;
    border-image-width: 1;
  }

  .modal-close-x {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .modal-body-scroll,
  .brass-scroll-body {
    padding: 3px 4px 16px;
    gap: 6px;
  }

  .seasons-tabs-bar {
    gap: 5px;
  }

  .seasons-tab-btn {
    min-height: 32px;
    font-size: 11.8px;
    border-width: 6px 8px 7px 8px;
    border-image-width: 1;
  }

  .seasons-pane-wrap,
  .vf-stack {
    gap: 6px;
  }

  .vf-toolbar {
    padding: 2px 10px;
    gap: 6px;
    border-width: 5px 20px 6px 20px;
    border-image-width: 1;
  }

  .vf-toolbar-title {
    font-size: 13px;
  }

  .vf-toolbar-title img {
    width: 22px;
    height: 22px;
  }

  .vf-pill-btn {
    min-height: 28px;
    padding: 0 7px;
    font-size: 12px;
  }

  .modal-grid-4,
  .vf-grid-4,
  .modal-grid-3,
  .vf-grid-3,
  .modal-grid-2,
  .vf-grid-2 {
    gap: 6px;
  }

  .vf-card-portrait,
  .vf-medal-tile,
  .shop-card {
    padding: 4px 5px;
    gap: 4px;
  }

  .vf-card-portrait.card-tier-common,
  .vf-card-portrait.card-tier-rare,
  .vf-card-portrait.card-tier-epic,
  .vf-card-portrait.card-tier-legendary,
  .vf-medal-tile.card-tier-common,
  .vf-medal-tile.card-tier-rare,
  .vf-medal-tile.card-tier-epic,
  .vf-medal-tile.card-tier-legendary,
  .shop-card.card-tier-common,
  .shop-card.card-tier-rare,
  .shop-card.card-tier-epic,
  .shop-card.card-tier-legendary,
  .vf-hero-card.card-tier-common,
  .vf-hero-card.card-tier-rare,
  .vf-hero-card.card-tier-epic,
  .vf-hero-card.card-tier-legendary,
  .vf-talent-card.card-tier-common,
  .vf-talent-card.card-tier-rare,
  .vf-talent-card.card-tier-epic,
  .vf-talent-card.card-tier-legendary {
    border-width: 10px 11px 11px 11px;
    border-image-width: 1;
  }

  .vf-art-stage {
    height: 54px;
  }

  .vf-art-stage.sm {
    height: 44px;
  }

  .vf-art-stage.lg {
    height: 66px;
  }

  .vf-art-img,
  .shop-art-thumb {
    width: 48px;
    height: 48px;
  }

  .vf-art-stage.sm .vf-art-img {
    width: 40px;
    height: 40px;
  }

  .vf-art-stage.lg .vf-art-img,
  .vf-art-stage.lg .shop-art-thumb {
    width: 60px;
    height: 60px;
  }

  .vf-card-name,
  .shop-item-title {
    font-size: 13px;
    line-height: 1.08;
  }

  .vf-chips-wrap {
    gap: 3px;
  }

  .shop-card .vf-chips-wrap {
    flex-wrap: nowrap;
  }

  .vf-stat-chip {
    padding: 1px 5px;
    font-size: 11.5px;
    gap: 3px;
  }

  .rwd-ico {
    width: 14px;
    height: 14px;
  }

  .vf-meter {
    height: 12px;
  }

  .vf-cta-btn,
  .shop-buy-btn {
    min-height: 32px;
    font-size: 12.5px;
    border-width: 7px 14px 8px 14px;
    border-image-width: 1;
  }

  .modal-dialog .vf-cta-btn:disabled,
  .modal-dialog .shop-buy-btn:disabled {
    border-width: 7px 14px 8px 14px !important;
    border-image-width: 1 !important;
  }

  .vf-hero-card {
    padding: 4px 8px;
    gap: 8px;
  }

  .vf-hero-art {
    width: 50px;
    height: 50px;
    padding: 2px;
  }

  .vf-hero-meta {
    gap: 3px;
  }

  .vf-talent-card {
    padding: 4px 6px;
    gap: 7px;
  }

  .vf-talent-art {
    width: 56px;
    height: 56px;
  }

  .vf-talent-art .vf-art-img {
    width: 48px;
    height: 48px;
  }

  .vf-talent-body {
    gap: 3px;
  }

  .shop-badge-pill {
    top: -8px;
    right: 2px;
    padding: 1px 6px;
    font-size: 11.5px;
  }
}

@media (max-width: 900px) {
  .title-hero-stage {
    flex-direction: column;
    text-align: center;
  }

  .title-brand-stack {
    align-items: center;
  }

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

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

  .vf-guide-strip {
    grid-template-columns: 1fr;
  }

  .vf-guide-arrow {
    transform: rotate(90deg);
    text-align: center;
  }

  #hud-bottom-center {
    bottom: 88px;
  }
}
