/* css/game.css — Aethergrid: Merge Vanguard (UI Vault: ornate_storybook_rpg | Archetype: modern_tactical_bright) */
/* Offline MSIX: ZERO external Google Fonts imports, 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: #1B1522;
  color: #FFF8E7;
  font-family: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

.hidden {
  display: none !important;
}

.btn-ornate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  overflow: visible !important;
  white-space: nowrap;
  font-family: 'Lilita One', 'Trebuchet MS', 'Segoe UI', sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  transition: transform 0.12s ease, filter 0.12s ease;
  filter: drop-shadow(0 3px 0 rgba(16, 10, 20, 0.55));
}

.btn-ornate:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.06) drop-shadow(0 4px 0 rgba(16, 10, 20, 0.6));
}

.btn-ornate:active:not(:disabled) {
  transform: translateY(1px) scale(0.97);
}

.btn-ornate:disabled {
  opacity: 0.68;
  cursor: default;
}

/* =========================================================================
   HEROIC NO-BOX TITLE SCREEN (Full-Bleed Key Art + Live Hero Portraits)
   ========================================================================= */
#title-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 30;
  background: url('../assets/art/title_bg.jpg') center center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px 42px;
}

.title-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 44%, rgba(25, 16, 36, 0.12) 0%, rgba(16, 10, 24, 0.58) 100%);
}

.title-top-bar {
  position: relative;
  z-index: 5;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.title-util-btn {
  height: 44px;
  min-width: 68px;
  padding: 0 11px;
  font-size: 13px;
  border-width: 9px 13px 9px 13px !important;
  color: #FFF8E7;
  text-shadow: 0 2px 0 #1C1B29;
}

.title-util-btn.uiv-ornate_storybook_rpg-btn-primary,
.title-util-btn.uiv-ornate_storybook_rpg-btn-secondary {
  color: #FFF9E6;
  text-shadow: 0 2px 0 #1C1526, 0 -1px 0 #1C1526, 1px 0 0 #1C1526, -1px 0 0 #1C1526;
}

.title-hero-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.title-hero-slot {
  position: absolute;
  bottom: 0;
  width: clamp(240px, 24vw, 400px);
  height: clamp(280px, 44vh, 460px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

#title-hero-left {
  left: 3vw;
}

#title-hero-right {
  right: 3vw;
}

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

.title-center-emblem {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 2vh;
  background: transparent;
  border: none;
}

.game-main-title {
  margin: 0;
  font-family: 'Lilita One', 'Bangers', 'Trebuchet MS', Impact, sans-serif;
  font-size: clamp(44px, 4.8vw, 76px);
  line-height: 1.04;
  letter-spacing: 0.03em;
  color: #FFF6D6;
  paint-order: stroke fill;
  -webkit-text-stroke: 2.5px #1C1526;
  text-shadow: 0 6px 0 #1C1526, 0 12px 24px rgba(12, 8, 22, 0.55);
}

.game-subtitle {
  margin: 10px 0 0;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: clamp(18px, 1.8vw, 26px);
  color: #FFE49E;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.2px #1C1526;
  text-shadow: 0 3px 0 #1C1526;
}

.title-bottom-cta {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

#btn-title-play {
  min-width: 248px;
  height: 70px;
  padding: 0 36px;
  font-size: 30px;
  color: #FFF9E6;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.4px #1C1526;
  text-shadow: 0 3px 0 #1C1526, 0 -1px 0 #1C1526, 1px 0 0 #1C1526, -1px 0 0 #1C1526;
}

.boot-loader {
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.boot-track {
  width: 100%;
  height: 22px;
  border-radius: 11px;
  background: #241A2E;
  border: 2px solid #E5B95C;
  overflow: hidden;
  padding: 2px;
}

.boot-fill {
  height: 100%;
  width: 8%;
  border-radius: 8px;
  background: linear-gradient(90deg, #44B848, #8AE85C);
  transition: width 0.14s ease;
}

.boot-text {
  font-size: 14px;
  font-weight: 800;
  color: #FFF8E7;
  text-shadow: 0 2px 0 #1C1526;
}

/* =========================================================================
   FULL-BLEED 16:9 GAMEPLAY STAGE & FLOATING CORNER HUD
   ========================================================================= */
#game-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

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

#vfx-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10;
  display: none;
}

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

#hud-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

/* TOP FLOATING BAR (flex-wrap: nowrap at 1920x1080 & 1280x720!) */
#hud-top {
  position: absolute;
  top: 8px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

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

.hud-pill-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 44px;
  padding: 0 10px;
  border-width: 8px 14px 10px 14px !important;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #FFF9E6;
  text-shadow: 0 2px 0 #1C1B29;
  cursor: default;
}

.hud-chip-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.hud-center-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  border-width: 8px 16px 10px 16px !important;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #FFF9E6;
  text-shadow: 0 2px 0 #1C1B29;
  pointer-events: auto;
}

.hud-paused-pill, .modal-paused-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: #D97706;
  border: 1.5px solid #FFE484;
  color: #FFFDF0;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #1C1220;
  line-height: 1.2;
}

.hud-nav-btn {
  height: 44px;
  padding: 0 10px;
  border-width: 8px 12px 9px 12px !important;
  font-size: 13px;
  color: #FFF8E7;
  text-shadow: 0 2px 0 #1C1B29;
  flex-shrink: 0;
}

.hud-nav-btn.uiv-ornate_storybook_rpg-btn-primary,
.hud-nav-btn.uiv-ornate_storybook_rpg-btn-secondary {
  color: #FFF9E6;
  text-shadow: 0 2px 0 #1C1526, 0 -1px 0 #1C1526, 1px 0 0 #1C1526, -1px 0 0 #1C1526;
}

.hud-nav-ico {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.notify-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FF3B4E;
  border: 2px solid #FFF8E7;
  z-index: 30;
  pointer-events: none;
  display: none;
}

/* LEFT COMPACT FLOATING SYNERGY STRIP (<= 160px wide so < 13% at 720p!) */
#hud-synergy-rail {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-54%);
  width: 152px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}

.synergy-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(34, 24, 42, 0.86);
  border: 2px solid #7C5332;
  font-size: 13px;
  font-weight: 800;
  color: #EBD8B7;
  white-space: nowrap;
}

.synergy-pill.is-active {
  background: rgba(54, 40, 26, 0.94);
  border-color: #F2B029;
  color: #FFF6D6;
}

.synergy-ico {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.synergy-name {
  flex: 1 1 auto;
  min-width: 0;
}

.synergy-cnt {
  font-variant-numeric: tabular-nums;
  color: #FFE066;
}

/* BOTTOM FLOATING DRAFT & COMMAND DOCK (Round 5 compact 72-86px height!) */
#hud-bottom {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 16px;
  background: rgba(34, 23, 38, 0.88);
  border: 2.5px solid #C99A4E;
  pointer-events: auto;
  max-width: calc(100vw - 24px);
}

.cmd-orb-btn {
  width: 82px;
  height: 80px;
  padding: 4px;
  border-width: 8px 10px 8px 10px !important;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: #FFF9E6;
  text-shadow: 0 2px 0 #1C1B29;
  flex-shrink: 0;
}

.cmd-orb-btn.is-ready {
  filter: brightness(1.16) drop-shadow(0 0 8px rgba(94, 175, 240, 0.85));
}

.cmd-orb-ico {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.draft-cards-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
}

.draft-card {
  position: relative;
  overflow: visible !important;
  width: 142px;
  height: 80px;
  padding: 4px 8px;
  border-width: 8px 8px 8px 8px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #FFF9E6;
  text-shadow: 0 2px 0 #1C1526, 1px 0 0 #1C1526, -1px 0 0 #1C1526;
  cursor: pointer;
  flex-shrink: 0;
}

.draft-card.uiv-ornate_storybook_rpg-card-legendary {
  color: #FFF9E6;
  text-shadow: 0 2px 0 #1C1526, 1px 0 0 #1C1526, -1px 0 0 #1C1526;
}

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

.draft-key {
  position: absolute;
  top: -8px;
  left: -6px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #2B2033;
  border: 2px solid #F2B029;
  color: #FFE066;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.draft-art {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.draft-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
}

.draft-name {
  white-space: nowrap;
}

.draft-cost {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  color: #FFE066;
  text-shadow: 0 1px 0 #1C1526;
}

.draft-cost-ico {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.dock-action-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}

.dock-tool-btn {
  min-width: 68px;
  height: 76px;
  padding: 4px 8px;
  border-width: 8px 10px 8px 10px !important;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: #FFF9E6;
  text-shadow: 0 2px 0 #1C1526, 0 -1px 0 #1C1526, 1px 0 0 #1C1526, -1px 0 0 #1C1526;
  flex-shrink: 0;
}

.dock-tool-ico {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

#btn-ready {
  min-width: 112px;
  height: 76px;
  padding: 0 14px;
  border-width: 10px 14px 10px 14px !important;
  font-size: 18px;
  color: #FFF9E6;
  text-shadow: 0 2px 0 #1C1526, 0 -1px 0 #1C1526, 1px 0 0 #1C1526, -1px 0 0 #1C1526;
  flex-shrink: 0;
}

.ready-ico {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

/* =========================================================================
   MODALS — FLEX SCROLL LAW + ANTI-SAAS 60/25/15 VISUAL-FIRST CARDS
   ========================================================================= */
#modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(14, 10, 22, 0.74);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-card {
  display: flex;
  flex-direction: column;
  width: min(940px, 92vw);
  max-height: 90vh;
  overflow: hidden;
  border-width: 24px 28px 24px 28px !important;
  color: #FFF8E7;
  cursor: default !important;
}

.modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  margin-bottom: 4px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(24, 15, 34, 0.94), rgba(34, 22, 46, 0.84));
  border-bottom: 2px solid rgba(242, 176, 41, 0.55);
}

.modal-title-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.modal-title {
  margin: 0;
  font-family: 'Lilita One', 'Trebuchet MS', 'Segoe UI', sans-serif;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #FFF8DC !important;
  -webkit-text-stroke: 0 transparent;
  text-shadow: 0 2px 0 #140D1F, 0 0 12px rgba(255, 224, 128, 0.34);
}

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

.modal-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px 6px 6px;
}

.modal-tab-btn {
  height: 42px;
  padding: 0 18px;
  border-width: 8px 16px 8px 16px !important;
  font-size: 14px;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  color: #1D141F;
}

.modal-tab-btn.is-active {
  color: #FFF8E7;
  text-shadow: 0 2px 0 #1C1526;
}

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

.modal-icon-close img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.modal-help-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #F2B029;
  background: #362544;
  color: #FFE066;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

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

.vf-grid {
  display: grid;
  gap: 12px;
  width: 100%;
}

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

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

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

.daily-grid-7 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.daily-day-7 {
  grid-column: span 2;
}

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

.vf-card-portrait {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 6px;
  min-height: 210px;
  border-width: 16px 14px 14px 14px !important;
  text-align: center;
  color: #FFF9E6 !important;
  text-shadow: 0 2px 0 #1C1526, 1px 0 0 #1C1526, -1px 0 0 #1C1526;
}

.vf-art-stage {
  width: 100%;
  height: 142px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 52%, rgba(255, 224, 130, 0.16), rgba(20, 14, 28, 0.22) 74%);
}

.vf-art-img {
  width: 96%;
  height: 138px;
  min-height: 88px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(10, 6, 16, 0.45));
}

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

.vf-title {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 16px;
  line-height: 1.15;
  color: #FFF9E6;
  white-space: nowrap;
}

.vf-chip-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.vf-chip-ico, .vf-btn-ico {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.vf-cta {
  width: 100%;
  min-height: 44px;
  padding: 4px 10px;
  border-width: 10px 14px 10px 14px !important;
  font-size: 15px;
  color: #FFF9E6 !important;
  text-shadow: 0 2px 0 #1C1526, 1px 0 0 #1C1526, -1px 0 0 #1C1526;
}

.vf-ribbon-tag, .vf-lvl-badge {
  position: absolute;
  top: -10px;
  right: 6px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  background: #2C1D3A;
  color: #FFE066;
  border: 2px solid #F2B029;
  z-index: 4;
}

.vf-ribbon-tag.tag-best {
  background: #D94E28;
  color: #FFF8E7;
}

.vf-ribbon-tag.tag-starter {
  background: #2D8A3E;
  color: #FFF8E7;
}

/* Compact SYS-01/02/03 Toolbars inside Pass, Forge & Shop Modals (NOT cards -> preserves 6-card 60/25/15 layout) */
.cycle-toolbar, .forge-sink-bar, .vip-daily-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(34, 24, 42, 0.88);
  border: 2px solid rgba(242, 176, 41, 0.55);
}

.cycle-btn-group, .cycle-meta-right, .forge-sink-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}

.cycle-switch-btn, .cycle-claim-all-btn, .forge-sink-btn {
  height: 38px;
  padding: 0 12px;
  border-width: 8px 12px 8px 12px !important;
  font-size: 13px;
  color: #FFF9E6 !important;
  text-shadow: 0 2px 0 #1C1526, 1px 0 0 #1C1526, -1px 0 0 #1C1526;
}

.cycle-xp-chip, .forge-sink-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(20, 14, 28, 0.85);
  border: 1.5px solid #C99A4E;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #FFE066;
  white-space: nowrap;
}

/* Settings, Pause, Help, Result & Exit Modals */
.settings-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 12px;
}

.settings-strip {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-mute-btn {
  min-width: 112px;
  height: 46px;
  border-width: 10px 14px 10px 14px !important;
  font-size: 14px;
}

.settings-slider {
  flex: 1 1 auto;
  accent-color: #F2B029;
  height: 10px;
}

.settings-val, .settings-label {
  min-width: 68px;
  font-size: 15px;
  font-weight: 800;
  color: #FFF6D6;
}

.settings-select {
  flex: 1 1 auto;
  height: 42px;
  border-radius: 10px;
  border: 2px solid #E5B95C;
  background: #24192E;
  color: #FFF8E7;
  font-size: 15px;
  font-weight: 700;
  padding: 0 12px;
}

.settings-toggles, .pause-menu-grid, .exit-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.settings-toggles button, .pause-menu-grid button, .exit-actions button {
  height: 52px;
  border-width: 10px 14px 10px 14px !important;
  font-size: 15px;
}

.exit-retention-wrap, .result-celebration {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 6px;
}

.exit-subtitle {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #FFE49E;
}

.exit-reward-grid, .help-visual-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.exit-reward-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-width: 14px 16px 14px 16px !important;
}

.exit-reward-img, .exit-saved-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.exit-reward-label {
  font-size: 14px;
  font-weight: 800;
  color: #1D141F;
}

.result-emblem-wrap {
  width: 132px;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.result-loot-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: min(440px, 100%);
}

.result-loot-strip.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(640px, 100%);
}

.settings-ver-tag {
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 244, 212, 0.68);
  margin-top: 2px;
}

/* Hub Quick Links inside Setup + Leaderboard & Giftcode Panels (#3807) */
.settings-hub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding-top: 6px;
  border-top: 1.5px solid rgba(242, 176, 41, 0.30);
}

.settings-hub-btn {
  height: 40px;
  padding: 0 12px;
  border-width: 8px 12px 8px 12px !important;
  font-size: 13px;
  color: #FFF9E6;
  text-shadow: 0 2px 0 #1C1526;
}

.lb-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lb-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(46, 30, 62, 0.92), rgba(74, 48, 28, 0.88));
  border: 2px solid #F2B029;
}

.lb-banner-ico {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.lb-banner-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lb-div-name {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 20px;
  color: #FFF8DC;
  text-shadow: 0 2px 0 #140D1F;
}

.lb-div-sub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 800;
  color: #FFE066;
}

.lb-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.lb-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(34, 24, 44, 0.88);
  border: 1.5px solid rgba(201, 154, 78, 0.45);
  color: #FFF8E7;
  font-weight: 800;
  font-size: 15px;
}

.lb-entry.is-me {
  background: rgba(88, 62, 24, 0.92);
  border-color: #FFE066;
  color: #FFFDF0;
}

.lb-rank {
  min-width: 34px;
  font-family: 'Lilita One', 'Nunito', sans-serif;
  color: #FFE066;
}

.lb-avatar {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.lb-name {
  flex: 1 1 auto;
  min-width: 0;
}

.lb-round {
  color: #8AE6FF;
  font-variant-numeric: tabular-nums;
}

.lb-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 68px;
  justify-content: flex-end;
  color: #FFE066;
  font-variant-numeric: tabular-nums;
}

.giftcode-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
}

.giftcode-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.giftcode-chest {
  width: 128px;
  height: 128px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(10, 6, 18, 0.55));
}

.giftcode-title {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 20px;
  color: #FFF8DC;
  text-shadow: 0 2px 0 #140D1F;
}

.giftcode-form {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(500px, 100%);
}

.giftcode-input {
  flex: 1 1 auto;
  height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: 2px solid #E5B95C;
  background: #20162A;
  color: #FFF8E7;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.giftcode-form button {
  height: 48px;
  min-width: 120px;
  border-width: 10px 14px 10px 14px !important;
  color: #FFF9E6 !important;
  text-shadow: 0 2px 0 #1C1526, 1px 0 0 #1C1526, -1px 0 0 #1C1526;
}

.giftcode-status {
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(24, 16, 34, 0.85);
  border: 1.5px solid rgba(242, 176, 41, 0.45);
  font-size: 14px;
  font-weight: 800;
  color: #FFE49E;
}

.giftcode-status.is-ok {
  border-color: #44D654;
  color: #8AE85C;
}

.giftcode-status.is-err {
  border-color: #FF6B6B;
  color: #FFA4A4;
}

/* Non-blocking Feature Guide Toast Banner (pointer-events: none -> 0 HIT_BLOCKED!) */
.fg-toast-banner {
  position: fixed;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-width: 8px 14px 10px 14px !important;
  color: #FFF9E6;
  text-shadow: 0 2px 0 #1C1526;
}

.fg-toast-ico {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.fg-toast-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.fg-toast-title {
  font-family: 'Lilita One', 'Nunito', sans-serif;
  font-size: 15px;
  color: #FFE066;
}

.fg-toast-sub {
  font-size: 13px;
  font-weight: 800;
  color: #FFF9E6;
}

/* =========================================================================
   VISUAL SPOTLIGHT & POINTER-HAND FTUE (pointer-events: none! 0 HIT_BLOCKED)
   ========================================================================= */
#tut-layer {
  position: fixed;
  inset: 0;
  z-index: 65;
  pointer-events: none;
}

#tut-spotlight {
  position: absolute;
  border-radius: 16px;
  border: 4px solid #FFE066;
  pointer-events: none;
  animation: tutPulse 1.2s ease-in-out infinite;
}

#tut-hand {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(28, 20, 38, 0.94);
  border: 2px solid #FFE066;
  color: #FFF8E7;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  animation: tutBob 0.95s ease-in-out infinite;
}

#btn-tut-skip {
  position: absolute;
  top: 64px;
  right: 16px;
  pointer-events: auto;
  height: 38px;
  padding: 0 14px;
  border-width: 8px 12px 8px 12px !important;
  font-size: 13px;
  color: #FFF9E6;
  text-shadow: 0 2px 0 #1C1526, 1px 0 0 #1C1526, -1px 0 0 #1C1526;
}

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

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

/* Preview-Only [DEV F2] Panel */
#dev-f2-wrap {
  position: fixed;
  bottom: 10px;
  left: 12px;
  z-index: 200;
}

.dev-pill {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(20, 14, 30, 0.85);
  border: 1.5px solid #5EAFF0;
  color: #9EE0FF;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.debug-panel {
  position: absolute;
  bottom: 36px;
  left: 0;
  width: 220px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(20, 14, 30, 0.95);
  border: 2px solid #5EAFF0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.debug-title {
  font-size: 12px;
  font-weight: 900;
  color: #FFE066;
}

.debug-panel button {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #5EAFF0;
  background: #2C2240;
  color: #FFF8E7;
  font-size: 12px;
  cursor: pointer;
}

/* 1280x720 Compact Ergonomic Adjustments (ZERO spill/overlap!) */
@media (max-width: 1360px), (max-height: 760px) {
  .hud-pill-chip, .hud-center-badge, .hud-nav-btn {
    height: 38px;
    font-size: 12px;
    padding: 0 7px;
  }
  .hud-nav-ico, .hud-chip-icon {
    width: 18px;
    height: 18px;
  }
  #hud-synergy-rail {
    width: 142px;
  }
  .draft-card {
    width: 132px;
    height: 72px;
  }
  .draft-art {
    width: 38px;
    height: 38px;
  }
  .cmd-orb-btn {
    width: 74px;
    height: 72px;
  }
  .cmd-orb-ico {
    width: 42px;
    height: 42px;
  }
  .dock-tool-btn, #btn-ready {
    height: 70px;
  }
  .dock-tool-ico, .ready-ico {
    width: 38px;
    height: 38px;
  }
  .vf-card-portrait {
    min-height: 196px;
  }
  .vf-art-stage {
    height: 118px;
  }
  .vf-art-img {
    height: 112px;
  }
}
