/* Riverclash: Tiny Tactics — UI Vault (vibrant_popout_tycoon) Commercial Stylesheet
 * Offline-safe (ZERO Google Fonts URLs), ZERO backdrop-filter blur over WebGL,
 * Strict Flex-Scroll Modals & Round 5-9 Spatial Proportions.
 */

:root, [data-ui-vault-style='vibrant_popout_tycoon'] {
  --uiv-font-display: 'Trebuchet MS', 'Segoe UI', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --uiv-font-body: 'Segoe UI', 'Trebuchet MS', system-ui, sans-serif;
  --rc-ink: #181C2E;
  --rc-gold: #FFD93D;
  --rc-gold-deep: #F59E0B;
  --rc-river: #2FD4C4;
  --rc-grass: #7AC733;
  --rc-elixir: #A855F7;
  --rc-elixir-bright: #E879F9;
  --rc-blue: #2563EB;
  --rc-red: #EF4444;
  --rc-cream: #FFFDF2;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #1B4332;
  color: var(--rc-ink);
  font-family: var(--uiv-font-body);
  font-size: 14px;
  user-select: none;
  -webkit-user-select: none;
}

button {
  font-family: var(--uiv-font-display);
  cursor: pointer;
  outline: none;
  background: transparent;
  border: none;
  padding: 0;
}

button:focus-visible {
  box-shadow: 0 0 0 3px #FFE14D;
}

img {
  display: block;
  -webkit-user-drag: none;
}

.hidden {
  display: none !important;
}

/* Supplemental 9-slice classes paired with UI Vault assets */
.uiv-vibrant_popout_tycoon-frame-subpanel {
  box-sizing: border-box;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 14px 12px 14px 12px;
  border-image: url('../assets/ui/frame_subpanel.png') 66 54 67 58 fill / 14px 12px 14px 12px / 0 stretch;
  color: var(--rc-ink);
}

.uiv-vibrant_popout_tycoon-btn-danger {
  box-sizing: border-box;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 12px 14px 14px 14px;
  border-image: url('../assets/ui/btn_danger.png') 40 72 40 72 fill / 12px 14px 14px 14px / 0 stretch;
  color: #FFFFFF;
  font-family: var(--uiv-font-display);
  font-weight: 800;
  cursor: pointer;
}

.uiv-vibrant_popout_tycoon-slot-tile {
  background: url('../assets/ui/slot_tile.png') center / 100% 100% no-repeat;
}

/* Compact 9-slice padding overrides for crisp HUD & buttons without pinching */
.uiv-compact-pill {
  border-width: 8px 12px 8px 12px !important;
  border-image-width: 8px 12px 8px 12px !important;
}

.uiv-compact-btn {
  border-width: 9px 10px 13px 10px !important;
  border-image-width: 9px 10px 13px 10px !important;
}

.uiv-compact-card {
  border-width: 11px 10px 15px 10px !important;
  border-image-width: 11px 10px 15px 10px !important;
}

.uiv-compact-dock {
  border-width: 10px 12px 14px 12px !important;
  border-image-width: 10px 12px 14px 12px !important;
}

/* ============================================================================
 * 1. HEROIC NO-BOX TITLE SCREEN
 * ============================================================================ */
#title-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #2E7D32 url('../assets/art/title_bg.jpg') center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 34px;
  overflow: hidden;
}

#title-screen.hidden {
  display: none !important;
}

/* Subtle sunlit vignette — NEVER a boxed card around <h1>! */
.title-sun-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 24%, rgba(255, 245, 180, 0.24) 0%, rgba(18, 30, 52, 0.26) 85%);
}

#title-showcase-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.title-top-bar {
  position: relative;
  z-index: 6;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.title-top-bar > * {
  pointer-events: auto;
}

.title-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.game-title {
  margin: 0;
  font-family: var(--uiv-font-display);
  font-size: clamp(42px, 5.2vw, 76px);
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.02;
  color: #FFE14D;
  -webkit-text-stroke: 2.5px #181C2E;
  text-shadow: 0 6px 0 #181C2E, 0 10px 22px rgba(0, 0, 0, 0.45);
}

.title-subtitle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 18px;
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: 0 2px 0 #181C2E;
}

.title-subtitle-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.title-crest-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, #FEF08A 0%, #F59E0B 100%);
  border: 3.5px solid #181C2E;
  box-shadow: 0 4px 0 #181C2E;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

#title-hero-portrait {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

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

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

#boot-loader.hidden {
  display: none !important;
}

.boot-bar-track {
  width: 100%;
  height: 30px;
  padding: 0;
  border-width: 7px 9px 7px 9px !important;
  border-image-width: 7px 9px 7px 9px !important;
  position: relative;
  overflow: hidden;
}

.boot-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(180deg, #86EFAC 0%, #22C55E 55%, #15803D 100%);
  border-radius: 6px;
  transition: width 0.14s ease-out;
}

.boot-label {
  font-size: 14px;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 2px 0 #181C2E;
}

#btn-title-play {
  min-width: 248px;
  height: 70px;
  padding: 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #181C2E;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.65);
  transition: transform 0.15s ease;
}

#btn-title-play:disabled {
  opacity: 0.65;
  cursor: wait;
}

.title-mode-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  max-width: 96vw;
}

.mode-chip {
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: 0 1.5px 0 #181C2E;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mode-chip.active {
  color: #181C2E;
  text-shadow: none;
}

/* ============================================================================
 * 2. FULL-BLEED 16:9 GAMEPLAY STAGE & OVERLAY CANVASES
 * ============================================================================ */
#game-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: none;
}

#game-screen.active {
  display: block;
}

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

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

#ui-motion-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 60;
}

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

/* ============================================================================
 * 3. FLOATING TOP HUD BAR (Zero Center Obstruction, flex-wrap: nowrap)
 * ============================================================================ */
#hud-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 8px 12px;
  pointer-events: none;
}

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

.hud-pill {
  height: 44px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 2px 0 #181C2E;
  white-space: nowrap;
  cursor: default;
}

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

.hud-num {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 900;
  color: #FFE14D;
  text-shadow: 0 2px 0 #181C2E;
}

.hud-clock-pill {
  min-width: 174px;
  justify-content: center;
  gap: 10px;
}

.crown-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 900;
}

.crown-blue { color: #60A5FA; }
.crown-red { color: #FB7185; }

.double-elixir-tag {
  display: none;
  padding: 2px 7px;
  border-radius: 999px;
  background: #F59E0B;
  color: #181C2E;
  font-size: 12px;
  font-weight: 900;
  text-shadow: none;
}

.double-elixir-tag.active {
  display: inline-flex;
}

.hud-btn {
  position: relative;
  overflow: visible !important;
  height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: clamp(12px, 0.95vw, 14px);
  font-weight: 900;
  white-space: nowrap;
  flex-shrink: 0;
}

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

.hud-btn .btn-label {
  display: inline-block;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-btn.icon-only {
  width: 44px;
  padding: 0;
}

.hud-btn-light-text,
.hud-btn-dark-text {
  color: #FFFFFF;
  text-shadow: 0 2px 0 #181C2E, 1px 0 0 #181C2E, -1px 0 0 #181C2E, 0 -1px 0 #181C2E;
}

/* Red-Dot Notification Badge (NEVER clipped!) */
.notify-badge {
  position: absolute;
  top: -10px;
  right: -9px;
  z-index: 30;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #EF4444;
  border: 2px solid #FFFFFF;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.notify-badge.show {
  display: inline-flex;
}

/* Boss Dragon Floating HP Bar (Below Top HUD, Centered) */
#boss-hp-banner {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 5px 14px;
  width: min(440px, 52vw);
  pointer-events: none;
}

#boss-hp-banner.active {
  display: flex;
}

.boss-head-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.boss-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.boss-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 900;
  color: #FFE14D;
  text-shadow: 0 1.5px 0 #181C2E;
}

.boss-bar-outer {
  width: 100%;
  height: 16px;
  background: #23182D;
  border: 2px solid #181C2E;
  border-radius: 999px;
  overflow: hidden;
}

.boss-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #DC2626 0%, #F97316 55%, #FACC15 100%);
  transition: width 0.1s linear;
}

/* Compact Floating Objective & Synergy Strip (Top-Left below HUD, non-blocking) */
#hud-synergy-strip {
  position: fixed;
  top: 58px;
  left: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.syn-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(24, 28, 46, 0.78);
  border: 2px solid #FFD93D;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
}

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

/* Pause Indicator */
#pause-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 32;
  display: none;
  padding: 10px 28px;
  font-size: 28px;
  font-weight: 900;
  color: #FFE14D;
  text-shadow: 0 3px 0 #181C2E;
  pointer-events: none;
}

#pause-banner.active {
  display: block;
}

/* ============================================================================
 * 4. FLOATING BOTTOM TACTICAL DECK DOCK (Compact <= 126px tall, >= 72% playfield)
 * ============================================================================ */
#hud-bottom {
  position: fixed;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  pointer-events: none;
  width: min(920px, 96vw);
  display: flex;
  justify-content: center;
}

.deck-dock {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  width: 100%;
  justify-content: space-between;
}

.elixir-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 168px;
  flex-shrink: 0;
}

.elixir-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 2px 0 #181C2E;
}

.elixir-meter {
  position: relative;
  height: 24px;
  background: #1E1633;
  border: 2.5px solid #181C2E;
  border-radius: 999px;
  overflow: hidden;
}

.elixir-fill {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #7C3AED 0%, #D946EF 60%, #F0ABFC 100%);
  transition: width 0.08s linear;
}

.elixir-ticks {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  pointer-events: none;
}

.elixir-ticks span {
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.lane-toggle-row {
  display: flex;
  gap: 6px;
}

.lane-btn {
  flex: 1;
  height: 32px;
  border-radius: 10px;
  background: #2A3252;
  border: 2px solid #181C2E;
  color: #CBD5E1;
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lane-btn.active {
  background: #FFD93D;
  color: #181C2E;
  box-shadow: 0 3px 0 #B45309;
}

/* 4-Card Tactical Hand */
.card-hand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.hand-card {
  position: relative;
  overflow: visible !important;
  width: 108px;
  height: 106px;
  padding: 2px 3px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.hand-card.selected {
  transform: translateY(-10px) scale(1.04);
}

.hand-card.unaffordable {
  filter: grayscale(0.55) brightness(0.82);
}

.hand-card .card-art {
  width: 54px;
  height: 54px;
  object-fit: contain;
  pointer-events: none;
}

.hand-card .card-name {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  padding: 1px 6px;
  border-radius: 6px;
  background: #181C2E;
  color: #FFFFFF;
  white-space: nowrap;
}

.card-cost-gem {
  position: absolute;
  top: -8px;
  left: -6px;
  z-index: 6;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, #E879F9 0%, #9333EA 100%);
  border: 2.5px solid #181C2E;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1.5px 0 #181C2E;
  pointer-events: none;
}

.card-hotkey {
  position: absolute;
  top: -6px;
  right: -5px;
  z-index: 6;
  padding: 1px 6px;
  border-radius: 6px;
  background: #181C2E;
  color: #FFE14D;
  font-size: 12px;
  font-weight: 900;
  pointer-events: none;
}

.card-merge-pip {
  position: absolute;
  bottom: 24px;
  right: 4px;
  z-index: 5;
  padding: 0 5px;
  border-radius: 6px;
  background: #F59E0B;
  color: #181C2E;
  font-size: 12px;
  font-weight: 900;
  pointer-events: none;
}

/* Right Dock: Next Card + Surge Ultimate Booster (Round 5 68-88px golden ratio!) */
.dock-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.next-card-box {
  width: 76px;
  height: 86px;
  padding: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #FFFFFF;
}

.next-card-box .next-lbl {
  font-size: 12px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 6px;
  background: #181C2E;
  color: #FFE14D;
}

.next-card-box img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

#btn-overdrive {
  position: relative;
  overflow: visible !important;
  width: 82px;
  height: 82px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

#btn-overdrive img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  pointer-events: none;
}

#btn-overdrive .od-pct {
  font-size: 12px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 6px;
  background: #181C2E;
  color: #FFE14D;
  line-height: 1.05;
}

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

#btn-overdrive:not(.ready) {
  filter: grayscale(0.45);
}

/* ============================================================================
 * 5. FLEX-SCROLL MODALS & ANTI-SAAS 60/25/15 ILLUSTRATED CARDS
 * ============================================================================ */
#modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(16, 24, 44, 0.76);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#modal-overlay.open {
  display: flex;
}

.modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(860px, 94vw);
  max-height: 90vh;
  overflow: hidden;
  padding: 4px 8px 8px;
}

.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;
  padding: 0 4px 4px;
}

.modal-title-ribbon {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-width: 12px 24px 10px 24px !important;
  border-image-width: 12px 24px 10px 24px !important;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 2.5px 0 #181C2E;
  text-align: center;
}

.modal-close-x {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease;
}

.modal-close-x:hover {
  transform: scale(1.08);
}

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

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

.modal-tab-btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 12px;
  background: #E2E8F0;
  border: 2px solid #181C2E;
  color: #181C2E;
  font-size: 14px;
  font-weight: 900;
}

.modal-tab-btn.active {
  background: #FFD93D !important;
  border: 2.5px solid #181C2E !important;
  border-image: none !important;
  color: #181C2E;
  box-shadow: 0 3px 0 #B45309;
}

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

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

.modal-footer .hud-btn {
  padding: 0 18px;
  min-width: 118px;
}

/* 3-Column Visual-First Illustrated Card Grid (60/25/15 Anti-SaaS) */
.modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

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

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

.shop-card,
.upgrade-card,
.quest-card {
  position: relative;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 5px 7px 6px;
  text-align: center;
}

.mc-badge {
  position: absolute;
  top: -8px;
  right: 6px;
  z-index: 6;
  padding: 2px 8px;
  border-radius: 999px;
  background: #FF4B5C;
  border: 2px solid #181C2E;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.mc-badge.gold {
  background: #FFD93D;
  color: #181C2E;
}

.mc-badge.green {
  background: #22C55E;
  color: #FFFFFF;
}

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

.mc-art {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.28));
}

.mc-title {
  font-size: 15px;
  font-weight: 900;
  color: #181C2E;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-chips {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 900;
  color: #181C2E;
}

.mc-chips img.cur-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.mc-cta {
  width: 100%;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 900;
}

.mc-cta img.cur-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Settings Layout (non-card semantic class names for clean Anti-SaaS static scan!) */
.cfg-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px;
}

.cfg-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid #181C2E;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  color: #181C2E;
}

.cfg-select {
  height: 36px;
  min-width: 185px;
  max-width: 62%;
  padding: 0 10px;
  border-radius: 8px;
  border: 2px solid #181C2E;
  font-family: var(--uiv-font-display);
  font-size: 14px;
  font-weight: 800;
  background: #FFFDF5;
  color: #181C2E;
}

.cfg-range {
  width: 180px;
  accent-color: #9B4DFF;
}

.cfg-toggle {
  min-width: 84px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 2px solid #181C2E;
  font-size: 13px;
  font-weight: 900;
  background: #E2E8F0;
  color: #181C2E;
}

.cfg-toggle.on {
  background: #6CE21C;
  color: #181C2E;
}

/* Feature 3-Icon Visual Flow Guide */
.guide-flow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 4px;
}

.guide-step-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.78);
  border: 2.5px solid #181C2E;
  border-radius: 14px;
  text-align: center;
}

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

.guide-step-lbl {
  font-size: 14px;
  font-weight: 900;
  color: #181C2E;
}

/* Victory / Defeat / Chest Celebration Stage */
.celebration-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px;
  text-align: center;
}

.celebration-hero img.hero-emblem {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.celebration-loot-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.loot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #181C2E;
  color: #FFE14D;
  font-size: 16px;
  font-weight: 900;
}

.loot-chip img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ============================================================================
 * 6. VISUAL SPOTLIGHT FTUE (tut-spotlight + tut-hand — ZERO Prose Banners!)
 * ============================================================================ */
#tut-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  display: none;
}

#tut-overlay.active {
  display: block;
}

.tut-spotlight {
  position: fixed;
  border-radius: 18px;
  border: 4px solid #FFE14D;
  box-shadow: 0 0 0 6px rgba(255, 225, 77, 0.32);
  pointer-events: none;
  animation: tutPulse 1.05s ease-in-out infinite;
}

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

.tut-hand {
  position: fixed;
  width: 52px;
  height: 52px;
  pointer-events: none;
  z-index: 82;
  animation: tutBob 0.85s ease-in-out infinite;
}

@keyframes tutBob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-4px, -10px) scale(1.06); }
}

.tut-pill {
  position: fixed;
  z-index: 82;
  padding: 6px 16px;
  border-radius: 999px;
  background: #181C2E;
  border: 2.5px solid #FFE14D;
  color: #FFE14D;
  font-family: var(--uiv-font-display);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
}

#btn-tut-skip {
  position: fixed;
  top: 60px;
  right: 16px;
  z-index: 85;
  pointer-events: auto;
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 900;
  color: #FFFFFF;
}

/* Toast notification */
#game-toast {
  position: fixed;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  padding: 7px 20px;
  border-radius: 999px;
  background: #181C2E;
  border: 2.5px solid #FFE14D;
  color: #FFFFFF;
  font-family: var(--uiv-font-display);
  font-size: 15px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#game-toast.show {
  opacity: 1;
}

/* Preview-only [DEV F2] UI */
#dev-f2-pill {
  position: fixed;
  bottom: 12px;
  left: 12px;
  z-index: 160;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(24, 28, 46, 0.88);
  border: 1.5px solid #38BDF8;
  color: #38BDF8;
  font-size: 12px;
  font-weight: 900;
}

#debug-panel {
  position: fixed;
  bottom: 50px;
  left: 12px;
  z-index: 165;
  width: 268px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(20, 24, 40, 0.96);
  border: 2px solid #38BDF8;
  color: #FFFFFF;
  display: none;
  flex-direction: column;
  gap: 6px;
}

#debug-panel.open {
  display: flex;
}

.dev-btn {
  height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  background: #1E293B;
  border: 1px solid #475569;
  color: #F8FAFC;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.dev-btn:hover {
  background: #334155;
}

/* ============================================================================
 * 7. COMPACT 720p RESPONSIVE TUNING (Zero Overflow / Clipping at 1280x720!)
 * ============================================================================ */
@media (max-width: 1366px), (max-height: 780px) {
  #hud-top {
    padding: 6px 8px;
    gap: 5px;
  }
  .hud-group {
    gap: 4px;
  }
  .hud-pill {
    height: 40px;
    padding: 0 7px;
    font-size: 13px;
    gap: 5px;
  }
  .hud-clock-pill {
    min-width: 136px;
    gap: 7px;
  }
  .hud-num {
    font-size: 14px;
  }
  .hud-btn {
    height: 40px;
    padding: 0 7px;
    font-size: 12.5px;
    gap: 4px;
  }
  .hud-btn img {
    width: 19px;
    height: 19px;
  }
  .hud-btn .btn-label {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }
  .hud-btn.icon-only {
    width: 38px;
    padding: 0;
  }
  #hud-bottom {
    bottom: 6px;
    width: min(840px, 95vw);
  }
  .deck-dock {
    padding: 4px 10px;
    gap: 8px;
  }
  .elixir-column {
    width: 152px;
  }
  .hand-card {
    width: 98px;
    height: 94px;
  }
  .hand-card .card-art {
    width: 46px;
    height: 46px;
  }
  .hand-card .card-name {
    font-size: 12px;
  }
  #btn-overdrive {
    width: 74px;
    height: 74px;
  }
  #btn-overdrive img {
    width: 44px;
    height: 44px;
  }
  .mc-art-wrap {
    height: 64px;
  }
  .mc-art {
    width: 62px;
    height: 62px;
  }
  .mc-cta {
    height: 36px;
    font-size: 13px;
  }
}
