/* Cogwheel Keep: Clockwork Defense — Steampunk Brass Rail 16:9 Desktop UI */
/* Offline MSIX: ZERO external Google Fonts, ZERO backdrop-filter blur over WebGL */

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

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #1A1614;
  color: #FAF0D7;
  font-family: var(--uiv-font-body, 'Segoe UI', 'Trebuchet MS', system-ui, sans-serif);
  user-select: none;
  -webkit-user-select: none;
}

.hidden {
  display: none !important;
}

/* ==================== FULL-BLEED CANVASES ==================== */
#game-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
}

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

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

/* ==================== HEROIC NO-BOX TITLE SCREEN ==================== */
#title-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(20, 14, 10, 0.14) 0%, rgba(16, 12, 9, 0.72) 100%),
    url('../assets/art/title_bg.jpg') center center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 36px;
}

.title-top-bar {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.title-corner-btn {
  height: 44px;
  min-width: 44px;
  padding: 4px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #FAF0D7;
  font-size: 14px;
  font-weight: 800;
  overflow: visible;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.48));
}

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

.title-center-stage {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4vw, 64px);
}

.title-hero-showcase {
  width: clamp(170px, 19vw, 290px);
  height: clamp(190px, 32vh, 320px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.title-hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.55));
}

.title-rig-box {
  width: clamp(170px, 19vw, 290px);
  height: clamp(190px, 32vh, 320px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

#title-rig-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Strictly NO box / border / background behind Title H1! */
.title-emblem-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 0;
}

.game-main-title {
  margin: 0;
  font-family: var(--uiv-font-display, 'Bahnschrift', 'Impact', sans-serif);
  font-size: clamp(44px, 5.2vw, 78px);
  line-height: 1.02;
  letter-spacing: 0.04em;
  color: #FFF6D6;
  -webkit-text-stroke: 2.5px #1E1713;
  text-shadow: 0 5px 0 #1E1713, 0 8px 18px rgba(0, 0, 0, 0.65);
}

.game-sub-title {
  margin: 0;
  font-family: var(--uiv-font-display, 'Bahnschrift', sans-serif);
  font-size: clamp(18px, 1.9vw, 28px);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #FFD54F;
  -webkit-text-stroke: 1.3px #1E1713;
  text-shadow: 0 3px 0 #1E1713;
}

#boot-loader {
  width: min(360px, 72vw);
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.boot-bar-track {
  width: 100%;
  height: 28px;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.boot-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #D4A86D, #FFD54F, #FFF3CF);
  transition: width 120ms ease-out;
}

.boot-load-label {
  font-size: 14px;
  font-weight: 800;
  color: #FAF0D7;
  text-shadow: 0 2px 0 #1E1713;
}

/* High-contrast heroic white/cream outlined button text across all 9-slice brass/teal buttons */
.uiv-steampunk_brass_rail-btn-primary,
.uiv-steampunk_brass_rail-btn-secondary {
  color: #FFF9E6 !important;
  text-shadow: 0 2px 0 #1E1713, 0 -1px 0 #1E1713, 1.5px 0 0 #1E1713, -1.5px 0 0 #1E1713;
}

#btn-title-play {
  margin-top: 16px;
  min-width: 240px;
  height: 68px;
  padding: 0 28px;
  font-size: 26px;
  letter-spacing: 0.08em;
  color: #FFF9E6 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.55));
}

#btn-title-play:hover {
  transform: translateY(-2px) scale(1.03);
}

/* ==================== GAMEPLAY TOP COMMAND BAR ==================== */
#hud-root {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

#hud-root button,
#hud-root select,
#hud-root input {
  pointer-events: auto;
}

.top-command-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  background: linear-gradient(180deg, rgba(26, 20, 16, 0.90) 0%, rgba(26, 20, 16, 0.52) 100%);
  border-bottom: 2px solid #B87333;
  pointer-events: auto;
}

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

.hud-pill-box {
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #FAF0D7;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  border-width: 6px 14px 6px 10px !important;
}

.hud-pill-box img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
}

.wall-hp-wrap {
  width: clamp(148px, 14vw, 210px);
  height: 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-width: 6px 10px 6px 10px !important;
  overflow: hidden;
}

.wall-hp-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: linear-gradient(90deg, #16A34A, #4ADE80);
  transition: width 160ms ease-out;
  z-index: 0;
}

.wall-hp-txt {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: 0 1.5px 0 #1E1713;
  white-space: nowrap;
}

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

.hud-top-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.hud-top-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-icon-sq {
  width: 40px;
  height: 38px;
  padding: 2px;
  border-width: 5px 6px 6px 6px !important;
}

.hud-icon-sq img {
  width: 24px;
  height: 24px;
}

/* Floating PAUSED lockstep badge & top Boss HP bar */
.hud-paused-pill {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 105;
  height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(30, 23, 19, 0.94);
  border: 2px solid #FFD54F;
  color: #FFD54F;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.boss-hp-bar {
  position: fixed;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  width: min(390px, 44vw);
  padding: 3px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-width: 4px 12px 5px 12px !important;
  pointer-events: none;
}

.boss-hp-portrait {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 30px;
  border-radius: 6px;
  background: rgba(127, 29, 29, 0.85);
  border: 2px solid #F59E0B;
}

.boss-hp-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.boss-hp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: #FFD54F;
  text-shadow: 0 1.5px 0 #1E1713;
}

.boss-hp-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.boss-hp-val {
  color: #FFF9E6;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.boss-hp-track {
  width: 100%;
  height: 12px;
  background: #1E1713;
  border: 1.5px solid #B87333;
  border-radius: 6px;
  overflow: hidden;
}

.boss-hp-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #B91C1C, #EF4444, #F59E0B);
  transition: width 100ms ease-out;
}

/* Floating compact telemetry pill top-right below top bar */
#telemetry-pill {
  position: fixed;
  top: 56px;
  right: 12px;
  height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #5CE1FF;
  border-width: 5px 14px 5px 12px !important;
  pointer-events: none;
}

/* ==================== COMPACT FLOATING LEFT DRAFT DOCK ==================== */
#draft-dock {
  position: fixed;
  left: 10px;
  bottom: 12px;
  width: 212px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: auto;
  border-width: 6px 8px 7px 8px !important;
}

.draft-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  color: #FFD54F;
  letter-spacing: 0.04em;
  text-shadow: 0 1.5px 0 #1E1713;
}

#draft-offers {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.draft-card {
  position: relative;
  width: 100%;
  height: 52px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  color: #FAF0D7;
  overflow: visible !important;
  border-width: 5px 6px 6px 6px !important;
  transition: transform 120ms ease;
}

.draft-card:hover:not(:disabled) {
  transform: translateX(3px);
}

.draft-card.is-selected {
  outline: 2.5px solid #5CE1FF;
  outline-offset: 1px;
}

.draft-card.is-sold {
  opacity: 0.42;
}

.draft-ico {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 34px;
}

.draft-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  gap: 1px;
}

.draft-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #FAF0D7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.draft-price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 800;
  color: #FFD54F;
}

.draft-controls-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.draft-controls-row > button {
  min-width: 0;
  height: 36px;
  padding: 0 4px;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-width: 5px 7px 6px 7px !important;
  overflow: visible !important;
}

.draft-controls-row > button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#btn-auto-wave.is-on {
  outline: 2px solid #4ADE80;
}

#btn-start-wave {
  width: 100%;
  height: 44px;
  padding: 0 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: #FFF9E6 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 6px 12px 7px 12px !important;
  overflow: visible !important;
}

#btn-start-wave:disabled {
  opacity: 0.6;
}

/* ==================== COMPACT BOTTOM-RIGHT ACTION & META DOCK ==================== */
#action-dock {
  position: fixed;
  right: 10px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: auto;
}

.dock-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.skill-slot-btn,
.meta-slot-btn {
  position: relative;
  width: 78px;
  height: 74px;
  padding: 3px 2px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #FAF0D7;
  overflow: visible !important;
  border-width: 5px 5px 6px 5px !important;
  transition: transform 120ms ease;
}

.skill-slot-btn:hover,
.meta-slot-btn:hover {
  transform: translateY(-2px);
}

.skill-slot-btn img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.meta-slot-btn img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.slot-lbl {
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.05;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #FAF0D7;
  text-shadow: 0 1.5px 0 #1E1713;
}

.hotkey-tag {
  position: absolute;
  top: -7px;
  left: -6px;
  z-index: 8;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 6px;
  background: #1E1713;
  border: 1.5px solid #D4A86D;
  color: #FFD54F;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.cd-tag {
  position: absolute;
  inset: 0;
  z-index: 7;
  border-radius: 6px;
  background: rgba(16, 12, 10, 0.72);
  color: #FFD54F;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.notify-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 12;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: #DC2626;
  border: 2px solid #FAF0D7;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ==================== MODALS (FLEX SCROLL + ANTI-SAAS 60/25/15) ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(14, 10, 8, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: min(920px, 95vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 4px 10px 10px;
  color: #1E1713;
  cursor: default;
}

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

.modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.modal-title-ribbon {
  flex: 1 1 auto;
  height: 44px;
  padding-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  text-shadow: 0 2px 0 #1E1713;
  border-width: 6px 28px 10px 28px !important;
  cursor: default;
}

.modal-hdr-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-help-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #2E8B8B;
  border: 2px solid #1E1713;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.modal-close-x {
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.modal-close-x img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.modal-tab-btn {
  height: 36px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 6px 12px 7px 12px !important;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 8px 8px;
}

.modal-footer {
  flex: 0 0 auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Live Modal Currency Strip (Workshop / Shop) */
.modal-currency-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(30, 23, 19, 0.12);
  border: 1.5px solid rgba(184, 115, 51, 0.45);
}

/* Anti-SaaS 60/25/15 Visual-First Grids (0px horizontal overflow across 720p & 1080p) */
.vf-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.vf-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.vf-grid-4 > *,
.vf-grid-3 > * {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.vf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 5px 7px;
  min-height: 184px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;
  border-width: 12px 10px 12px 10px !important;
  cursor: default;
}

.vf-lv-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  background: #1E1713;
  color: #FFD54F;
  font-size: 12px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
}

.vf-ribbon-tag {
  position: absolute;
  top: 2px;
  left: 4px;
  background: #C83E37;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
}

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

.vf-art-img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.32));
}

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

.vf-stat-pill {
  font-size: 13px;
  font-weight: 800;
  color: #14532D;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  padding: 1px 8px;
}

.vf-reward-row,
.vf-loot-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.cur-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
  color: #1E1713;
}

.vf-action-btn .cur-chip {
  color: #FFF9E6;
}

.chip-icon,
.cur-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.vf-action-btn {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 36px;
  padding: 0 6px;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  border-width: 6px 10px 7px 10px !important;
}

.vf-action-btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vf-perk-chip {
  font-size: 11.5px;
  font-weight: 800;
  color: #7C2D12;
  background: rgba(255, 243, 207, 0.78);
  border: 1px solid rgba(184, 115, 51, 0.55);
  border-radius: 6px;
  padding: 1px 6px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pass-btn-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pass-royal-btn {
  width: 100%;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 5px 10px 6px 10px !important;
}

.codex-pair-row,
.codex-pair-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 800;
  color: #1E1713;
}

.pair-ico {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.season-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 14px;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 800;
  color: #FAF0D7;
  border-width: 5px 18px 7px 18px !important;
}

.season-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.season-banner-ico {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex: 0 0 26px;
}

.season-banner-pts {
  font-size: 13px;
  font-weight: 800;
  color: #FFD54F;
  background: rgba(20, 14, 10, 0.55);
  padding: 2px 8px;
  border-radius: 6px;
}

.season-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.season-mini-btn {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 5px 10px 6px 10px !important;
}

.settings-ver-note {
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: #5C3A21;
  padding: 2px 4px 0;
}

.lock-tag {
  position: absolute;
  top: -8px;
  left: -6px;
  bottom: auto;
  right: auto;
  z-index: 12;
  padding: 1px 5px;
  border-radius: 6px;
  background: #1E1713;
  border: 1.5px solid #D4A86D;
  color: #FFD54F;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}

.is-locked-slot {
  opacity: 0.72;
}

/* ==================== SETTINGS PANEL ==================== */
.settings-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 6px;
}

.setting-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(42, 34, 30, 0.14);
  border: 2px solid rgba(184, 115, 51, 0.45);
  border-radius: 10px;
  padding: 8px 12px;
}

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

.set-lbl {
  font-size: 14px;
  font-weight: 800;
  color: #1E1713;
  min-width: 110px;
}

.setting-line input[type="range"] {
  flex: 1 1 auto;
  accent-color: #E69B24;
}

.set-toggle {
  min-width: 82px;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 6px 12px 6px 12px !important;
}

.lang-select-box {
  flex: 1 1 auto;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 2px solid #B87333;
  background: #FAF0D7;
  color: #1E1713;
  font-size: 14px;
  font-weight: 700;
}

/* ==================== RESULT / CHEST / EXIT / GUIDE MODALS ==================== */
.result-showcase,
.chest-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.result-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.result-star-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.result-star {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.result-star.dim {
  opacity: 0.25;
  filter: grayscale(0.9);
}

.result-star-lbl {
  font-size: 12.5px;
  font-weight: 800;
  color: #5C3A21;
  background: rgba(255, 243, 207, 0.75);
  border: 1px solid rgba(184, 115, 51, 0.45);
  border-radius: 6px;
  padding: 1px 8px;
  white-space: nowrap;
}

.result-star-lbl.lit {
  color: #1E1713;
  background: #FFD54F;
  border-color: #B87333;
}

/* ==================== PAUSE MENU MODAL ==================== */
.pause-menu-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 12px;
}

.pause-status-pill {
  font-size: 14px;
  font-weight: 800;
  color: #FAF0D7;
  background: #2A221E;
  border: 2px solid #B87333;
  border-radius: 999px;
  padding: 4px 16px;
}

.pause-menu-grid {
  width: 100%;
  max-width: 420px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pause-menu-btn {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 7px 14px 8px 14px !important;
}

.pause-menu-btn.is-primary-wide {
  grid-column: 1 / -1;
  height: 52px;
  font-size: 16px;
}

.result-hero-img,
.chest-big-img {
  width: 124px;
  height: 124px;
  object-fit: contain;
}

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

.result-loot-chip {
  height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: #FAF0D7;
  border-width: 6px 14px 6px 12px !important;
}

.defeat-power-strip {
  width: 100%;
  max-width: 360px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.result-cta {
  min-width: 180px;
  height: 46px;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 8px 20px 9px 20px !important;
}

.guide-flow-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 4px;
}

.guide-step {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  border-width: 12px 10px 12px 10px !important;
}

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

.guide-step-label {
  font-size: 13px;
  font-weight: 800;
  color: #1E1713;
}

.guide-arrow {
  font-size: 22px;
  font-weight: 800;
  color: #B87333;
}

.exit-rewards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.exit-reward-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-width: 10px 10px 10px 10px !important;
}

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

.exit-reward-name {
  font-size: 13px;
  font-weight: 800;
  color: #1E1713;
}

.exit-reward-count {
  position: absolute;
  top: 4px;
  right: 6px;
  background: #DC2626;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
}

.exit-msg-txt {
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: #1E1713;
  margin: 4px 0;
}

.exit-sub-txt {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #5C3A21;
  margin: 0;
}

/* ==================== SPOTLIGHT FTUE TUTORIAL ==================== */
#tut-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

#tut-spotlight {
  position: fixed;
  border-radius: 14px;
  border: 3px solid #FFD54F;
  outline: 4px solid rgba(255, 213, 79, 0.45);
  pointer-events: none;
  will-change: transform;
  animation: tutPulse 1.1s ease-in-out infinite;
}

#tut-hand {
  position: fixed;
  width: 44px;
  height: 44px;
  pointer-events: none;
  z-index: 92;
  animation: tutBounce 0.85s ease-in-out infinite;
}

#tut-pill {
  position: fixed;
  z-index: 93;
  padding: 6px 14px;
  border-radius: 10px;
  background: #2A221E;
  border: 2px solid #FFD54F;
  color: #FAF0D7;
  font-size: 14px;
  font-weight: 800;
  pointer-events: none;
  white-space: nowrap;
}

#btn-tut-skip {
  position: fixed;
  top: 58px;
  left: 14px;
  z-index: 94;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
  pointer-events: auto;
  border-width: 6px 12px 6px 12px !important;
}

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

@keyframes tutBounce {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(8px, 10px); }
}

/* ==================== PREVIEW DEV F2 PANEL ==================== */
.dev-f2-pill {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 75;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(30, 23, 19, 0.86);
  border: 1.5px solid #E69B24;
  color: #FFD54F;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.debug-panel {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  width: 240px;
  padding: 10px;
  background: #1E1713;
  border: 2px solid #E69B24;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.debug-title {
  font-size: 13px;
  font-weight: 800;
  color: #FFD54F;
  text-align: center;
}

.debug-panel button {
  height: 32px;
  background: #2A221E;
  border: 1px solid #B87333;
  border-radius: 6px;
  color: #FAF0D7;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* ==================== 720P COMPACT PRECISION ==================== */
@media (max-width: 1366px), (max-height: 768px) {
  .hud-pill-box {
    padding: 0 8px;
    font-size: 13px;
  }
  .skill-slot-btn,
  .meta-slot-btn {
    width: 74px;
    height: 68px;
  }
  .slot-lbl {
    font-size: 10.5px;
  }
  .skill-slot-btn img {
    width: 38px;
    height: 38px;
  }
  .meta-slot-btn img {
    width: 36px;
    height: 36px;
  }
  .vf-card {
    min-height: 170px;
  }
  .vf-art-wrap {
    height: 68px;
  }
  .vf-art-img {
    width: 66px;
    height: 66px;
  }
}
