/**
 * STATERA v3 — TACTICAL TERMINAL STYLESHEET
 * 100vh Zero-Scroll Dark Luxury Tactical HUD
 */

:is(#statera-mesa-view, #statera-mesa-portals),
:is(#statera-mesa-view, #statera-mesa-portals) *,
:is(#statera-mesa-view, #statera-mesa-portals) *::before,
:is(#statera-mesa-view, #statera-mesa-portals) *::after {
  box-sizing: border-box;
}

html[data-st-active-view="mesa"] {
  color-scheme: dark !important;
  --bg-void: hsl(32, 12%, 4%);
  --bg-main: var(--bg-void);
  --bg-sidebar: hsl(32, 12%, 5%);
  --bg-card: hsl(32, 12%, 6%);
  --bg-card-surface: hsl(32, 14%, 8%);
  --border-subtle: hsla(40, 40%, 60%, 0.14);
  --border-focus: hsla(40, 85%, 58%, 0.5);
  --text-primary: hsl(40, 25%, 94%);
  --text-muted: hsla(40, 20%, 88%, 0.55);
  --text-dim: hsla(40, 20%, 88%, 0.35);
  
  --gold-primary: hsl(40, 85%, 58%);
  --gold: var(--gold-primary);
  --gold-glow: hsla(40, 85%, 58%, 0.25);
  --emerald-safe: hsl(160, 60%, 55%);
  --emerald: var(--emerald-safe);
  --crimson-alert: hsl(348, 65%, 62%);
  --crimson: var(--crimson-alert);
  --cyan-radar: hsl(188, 80%, 55%);
  --cyan: var(--cyan-radar);
}

/* ========================================================================== 
   APP-THEME SCROLLBARS
   ========================================================================== */
html[data-st-active-view="mesa"],
html[data-st-active-view="mesa"] body,
html[data-st-active-view="mesa"] :is(#statera-mesa-view, #statera-mesa-portals),
html[data-st-active-view="mesa"] :is(#statera-mesa-view, #statera-mesa-portals) *,
html[data-st-active-view="mesa"] :is(#statera-mesa-view, #statera-mesa-portals) *::before,
html[data-st-active-view="mesa"] :is(#statera-mesa-view, #statera-mesa-portals) *::after {
  scrollbar-width: thin !important;
  scrollbar-color: var(--st-border, #59616c) transparent !important;
}

:is(#statera-mesa-view, #statera-mesa-portals, #statera-mesa-view *, #statera-mesa-portals *)::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}

:is(#statera-mesa-view, #statera-mesa-portals, #statera-mesa-view *, #statera-mesa-portals *)::-webkit-scrollbar-track {
  background: transparent !important;
  border-radius: 4px !important;
}

:is(#statera-mesa-view, #statera-mesa-portals, #statera-mesa-view *, #statera-mesa-portals *)::-webkit-scrollbar-thumb {
  background: var(--st-border, #59616c) !important;
  background-clip: padding-box !important;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
}

:is(#statera-mesa-view, #statera-mesa-portals, #statera-mesa-view *, #statera-mesa-portals *)::-webkit-scrollbar-thumb:hover {
  background: var(--st-muted, #808894) !important;
  box-shadow: none !important;
}

:is(#statera-mesa-view, #statera-mesa-portals, #statera-mesa-view *, #statera-mesa-portals *)::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

:is(#statera-mesa-view, #statera-mesa-portals, #statera-mesa-view *, #statera-mesa-portals *)::-webkit-scrollbar-corner {
  background: transparent !important;
}

html[data-st-active-view="mesa"],
html[data-st-active-view="mesa"] body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: Outfit, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

:is(#statera-mesa-view, #statera-mesa-portals) a { color: inherit; text-decoration: none; }
:is(#statera-mesa-view, #statera-mesa-portals) button { font-family: inherit; }

:is(#statera-mesa-view, #statera-mesa-portals) .font-sans { font-family: Archivo, sans-serif; }
:is(#statera-mesa-view, #statera-mesa-portals) .font-mono { font-family: 'JetBrains Mono', monospace; }
:is(#statera-mesa-view, #statera-mesa-portals) .font-serif { font-family: 'Cormorant Garamond', serif; }

:is(#statera-mesa-view, #statera-mesa-portals) .hidden { display: none !important; }

/* 100vh / 100dvh GRID LAYOUT */
.app-container {
  display: grid;
  grid-template-columns: 72px 1fr;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

/* SIDEBAR */
.app-sidebar {
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  z-index: 20;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.sidebar-logo {
  font: 900 18px Archivo, sans-serif;
  letter-spacing: 0.1em;
  color: var(--gold);
}
.sidebar-logo .logo-dot { color: var(--text-primary); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.sidebar-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all .2s;
}
.sidebar-btn:hover {
  color: var(--gold);
  border-color: hsla(40, 85%, 58%, 0.3);
  background: hsla(40, 85%, 58%, 0.06);
}
.sidebar-btn.active {
  border-color: var(--gold);
  background: hsla(40, 85%, 58%, 0.12);
  color: var(--gold);
  box-shadow: 0 0 16px hsla(40, 85%, 58%, 0.2);
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: 100%;
}
.sidebar-divider {
  width: 24px;
  height: 1px;
  background: var(--border-subtle);
}

/* MAIN VIEWPORT (5-ROW GRID: 56px 42px 50px 1.14fr 0.86fr) */
.terminal-main {
  display: grid;
  grid-template-rows: 56px 42px 50px 1.14fr 0.86fr;
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-main);
}

/* The persistent host mounts Mesa as the retained grid item. Keep that root
   flush with its shell column and use a neutral viewport scrollbar. */
#statera-mesa-view {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 0 !important;
  outline: 0;
  box-shadow: none !important;
  scrollbar-color: var(--st-border, #59616c) transparent !important;
}

#statera-mesa-view::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#statera-mesa-view::-webkit-scrollbar-track {
  background: transparent !important;
}

#statera-mesa-view::-webkit-scrollbar-thumb {
  background: var(--st-border, #59616c) !important;
  border: 2px solid transparent !important;
  border-radius: 999px !important;
  background-clip: padding-box !important;
  box-shadow: none !important;
}

/* TOPBAR (ROW 1 - 56px - FIXED GRID TO PREVENT LAYOUT SHIFTS) */
.terminal-topbar {
  display: grid;
  grid-template-columns: minmax(190px, auto) 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-sidebar);
  min-width: 0;
  overflow: visible;
  position: relative;
  z-index: 100;
}

/* LUXURY TOPBAR DROPDOWNS (CURRENCY & FICHA BASE) */
.dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.stat-pill-btn {
  cursor: pointer;
  border: 1px solid hsla(40, 40%, 60%, 0.22);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.stat-pill-btn:hover {
  background: hsla(40, 85%, 58%, 0.08);
  border-color: var(--gold);
}

.chip-dropdown-chevron,
.dropdown-chevron {
  font-size: 9px;
  color: var(--gold);
  margin-left: 6px;
  transition: transform 0.2s ease;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 170px;
  max-height: 280px;
  overflow-y: auto;
  background: hsl(32, 16%, 6%);
  border: 1.5px solid hsla(40, 85%, 58%, 0.45);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9), 0 0 24px hsla(40, 85%, 58%, 0.2);
  z-index: 2500;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar-controls .dropdown-menu {
  left: auto;
  right: 0;
}

.dropdown-menu.hidden {
  display: none !important;
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: hsl(40, 20%, 85%);
  font: 600 13px 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.dropdown-item:hover {
  background: hsla(40, 85%, 58%, 0.14);
  color: var(--gold);
}

.dropdown-item.active {
  background: linear-gradient(90deg, hsla(40, 85%, 58%, 0.25), hsla(40, 85%, 58%, 0.08));
  color: var(--gold);
  font-weight: 800;
}

/* 2. MULTI-TABLE TABS BAR (ROW 2 - 48px) */
.terminal-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 20px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  background: hsl(32, 12%, 4.5%);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.tabs-scroll-container {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  height: 100%;
  flex: 1;
  min-width: 0;
}
.tabs-scroll-container::-webkit-scrollbar {
  display: none;
}

.table-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  height: 36px;
  border-radius: 7px;
  background: hsla(0, 0%, 100%, 0.03);
  border: 1px solid hsla(0, 0%, 100%, 0.08);
  color: var(--text-dim);
  font: 700 13px 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
  position: relative;
  flex: none;
}
.table-tab:hover {
  background: hsla(40, 85%, 58%, 0.08);
  border-color: hsla(40, 85%, 58%, 0.35);
  color: #fff;
}
.table-tab.collapsed {
  padding: 0 9px;
  gap: 6px;
  max-width: 140px;
}
.table-tab.collapsed .tab-name {
  font: 800 12.5px 'JetBrains Mono', monospace !important;
  letter-spacing: 0.04em;
  color: hsla(40, 20%, 90%, 0.85);
  text-transform: uppercase;
}
.table-tab.collapsed:hover .tab-name {
  color: #ffffff;
}
.table-tab.collapsed .tab-close-btn {
  display: none;
}
.table-tab.collapsed:hover .tab-close-btn {
  display: inline-flex;
}
/* R4: Active Tab Complete Contrast Inversion (Pure White Background / Pure Black Text) */
.table-tab.active {
  padding: 0 14px;
  gap: 9px;
  max-width: 240px;
  background: #FFFFFF !important;
  border-color: #FFFFFF !important;
  color: #000000 !important;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.7), 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}
.table-tab.active .tab-name {
  color: #000000 !important;
  font-weight: 800 !important;
  font: 800 13.5px 'Outfit', sans-serif !important;
  letter-spacing: 0.02em;
}
.table-tab.active .tab-close-btn {
  color: #000000 !important;
  opacity: 0.6;
}
.table-tab.active .tab-close-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #d90429 !important;
  opacity: 1;
}
.table-tab.has-attack {
  border-color: hsla(40, 85%, 58%, 0.7);
  animation: tabAttackPulse 2s infinite ease-in-out;
}
.table-tab.has-observation {
  border-color: hsl(188, 95%, 52%);
  background: linear-gradient(180deg, hsla(188, 95%, 50%, 0.16), hsla(188, 95%, 50%, 0.05));
  color: #fff;
  animation: tabObservationPulse 1.8s infinite ease-in-out;
}

@keyframes tabAttackPulse {
  0%, 100% {
    box-shadow: 0 0 8px hsla(40, 85%, 58%, 0.25);
  }
  50% {
    box-shadow: 0 0 16px hsla(40, 85%, 58%, 0.6);
  }
}

@keyframes tabObservationPulse {
  0%, 100% {
    box-shadow: 0 0 8px hsla(188, 95%, 52%, 0.3);
    border-color: hsl(188, 95%, 52%);
  }
  50% {
    box-shadow: 0 0 18px hsla(188, 100%, 58%, 0.7);
    border-color: hsl(188, 100%, 65%);
  }
}

/* Drag & Drop Reordering UI & Fluid Physics */
.table-tab[draggable="true"] {
  cursor: grab;
}
.table-tab[draggable="true"]:active {
  cursor: grabbing;
}
.table-tab.is-dragging {
  opacity: 0.35 !important;
  transform: scale(0.95) translateY(-2px);
  border-style: dashed !important;
  border-color: var(--gold) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 18px hsla(40, 85%, 58%, 0.4) !important;
  pointer-events: none;
}

/* Insertion Line Indicators with Gold Glow */
.table-tab.drag-over-left::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 10%;
  bottom: 10%;
  width: 3px;
  border-radius: 3px;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold), 0 0 5px #ffffff;
  z-index: 30;
  pointer-events: none;
  animation: dragIndicatorPulse 0.6s infinite ease-in-out;
}

.table-tab.drag-over-right::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 10%;
  bottom: 10%;
  width: 3px;
  border-radius: 3px;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold), 0 0 5px #ffffff;
  z-index: 30;
  pointer-events: none;
  animation: dragIndicatorPulse 0.6s infinite ease-in-out;
}

@keyframes dragIndicatorPulse {
  0%, 100% {
    opacity: 0.8;
    transform: scaleY(0.95);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.1);
  }
}

.tab-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
  flex: none;
}
.tab-status-dot.dot-attack {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: tabBeacon 1.2s infinite ease-in-out;
}
.tab-status-dot.dot-observation {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: tabBeacon 1.4s infinite ease-in-out;
}
.tab-status-dot.dot-queued {
  background: hsl(40, 40%, 60%);
  box-shadow: 0 0 4px hsl(40, 40%, 60%);
}
.tab-status-dot.dot-idle {
  background: hsl(215, 15%, 50%);
  box-shadow: none;
}

@keyframes tabBeacon {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.6;
  }
}

.tab-name {
  font: 700 13.5px 'Outfit', sans-serif;
  letter-spacing: 0.02em;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-rename-input {
  font: 700 13.5px 'Outfit', sans-serif;
  background: hsl(32, 15%, 10%);
  border: 1px solid var(--gold);
  border-radius: 4px;
  color: #fff;
  padding: 2px 6px;
  width: 120px;
  outline: none;
  box-shadow: 0 0 8px hsla(40, 85%, 58%, 0.4);
}

/* R4: Table State Badges (Drought Gold & Wait Blue) */
.tab-state-badge {
  font: 800 11.5px 'JetBrains Mono', monospace;
  padding: 2px 6px;
  border-radius: 5px;
  line-height: 1;
  flex: none;
  transition: all 0.2s ease;
  text-align: center;
  min-width: 18px;
}

.tab-badge-drought {
  background: hsla(40, 85%, 58%, 0.16);
  border: 1px solid hsla(40, 85%, 58%, 0.35);
  color: var(--gold);
}

.table-tab.active .tab-badge-drought {
  background: hsla(40, 85%, 45%, 0.18);
  border-color: hsla(40, 85%, 40%, 0.5);
  color: hsl(35, 95%, 28%);
}

.tab-badge-wait {
  background: hsla(188, 95%, 50%, 0.16);
  border: 1px solid hsla(188, 95%, 50%, 0.4);
  color: hsl(188, 95%, 50%);
}

.table-tab.active .tab-badge-wait {
  background: hsla(188, 95%, 40%, 0.18);
  border-color: hsla(188, 95%, 40%, 0.5);
  color: hsl(188, 95%, 28%);
}

.tab-badge-attack {
  background: hsla(40, 85%, 58%, 0.22);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 900;
}

.table-tab.active .tab-badge-attack {
  background: hsla(40, 85%, 45%, 0.25);
  border-color: hsla(40, 85%, 35%, 0.6);
  color: hsl(35, 95%, 28%);
}

/* Visual Proximity Alert: Animated pulse-glow when wait countdown <= 5 */
@keyframes tabBadgeProximityPulse {
  0%, 100% {
    box-shadow: 0 0 6px hsla(188, 100%, 55%, 0.6);
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 16px hsla(188, 100%, 65%, 1), inset 0 0 6px hsla(188, 100%, 75%, 0.8);
    transform: scale(1.14);
    filter: brightness(1.35);
    background: hsl(188, 100%, 50%);
    color: #000000;
    border-color: #ffffff;
  }
}

.tab-badge-proximity-alert,
.pulse-glow {
  animation: tabBadgeProximityPulse 0.75s infinite ease-in-out !important;
}

/* Modal Table Context Badges */
.settings-table-badge,
.special-table-badge {
  display: inline-block;
  font: 900 11px 'JetBrains Mono', monospace;
  padding: 2px 7px;
  border-radius: 4px;
  background: hsla(40, 85%, 58%, 0.15);
  border: 1px solid hsla(40, 85%, 58%, 0.45);
  color: var(--gold);
  letter-spacing: 0.06em;
}

/* Apply to All Tables Action Buttons */
.btn-popover-apply-all,
.btn-special-apply-all {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid hsla(188, 95%, 50%, 0.35);
  background: hsla(188, 95%, 50%, 0.08);
  color: hsl(188, 95%, 65%);
  font: 800 12px 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  box-sizing: border-box;
}
.btn-popover-apply-all:hover,
.btn-special-apply-all:hover {
  background: hsla(188, 95%, 50%, 0.18);
  border-color: hsl(188, 95%, 50%);
  box-shadow: 0 0 14px hsla(188, 95%, 50%, 0.25);
  color: #fff;
}
.btn-popover-apply-all.btn-saved,
.btn-special-apply-all.btn-saved {
  background: hsla(160, 85%, 45%, 0.25) !important;
  border-color: var(--emerald) !important;
  color: #fff !important;
}

/* Save as User Default Preset Buttons */
.btn-popover-save-default,
.btn-special-save-default {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid hsla(40, 85%, 58%, 0.45);
  background: linear-gradient(180deg, hsla(40, 85%, 50%, 0.15), hsla(40, 85%, 50%, 0.05));
  color: var(--gold);
  font: 800 12px 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  box-sizing: border-box;
}
.btn-popover-save-default:hover,
.btn-special-save-default:hover {
  background: linear-gradient(180deg, hsla(40, 85%, 50%, 0.28), hsla(40, 85%, 50%, 0.14));
  border-color: var(--gold);
  box-shadow: 0 0 16px hsla(40, 85%, 58%, 0.3);
  color: #fff;
}
.btn-popover-save-default.btn-saved,
.btn-special-save-default.btn-saved {
  background: hsla(160, 85%, 45%, 0.3) !important;
  border-color: var(--emerald) !important;
  color: #fff !important;
  box-shadow: 0 0 16px hsla(160, 85%, 45%, 0.4) !important;
}

.tab-spins-badge {
  font: 700 11px 'JetBrains Mono', monospace;
  padding: 2px 6px;
  border-radius: 4px;
  background: hsla(0, 0%, 100%, 0.07);
  color: var(--text-dim);
  flex: none;
}

.tab-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: 2px;
  padding: 0;
  line-height: 1;
}
.tab-close-btn:hover {
  background: hsla(348, 75%, 48%, 0.25);
  color: #ff6b6b;
}
.tab-close-btn.disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

.tabs-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.btn-add-table {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 11px;
  height: 36px;
  border-radius: 7px;
  background: hsla(40, 85%, 58%, 0.08);
  border: 1px solid hsla(40, 85%, 58%, 0.25);
  color: var(--gold);
  font: 800 14px 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  flex: none;
}
.btn-add-table:hover {
  background: hsla(40, 85%, 58%, 0.2);
  border-color: var(--gold);
  box-shadow: 0 0 14px hsla(40, 85%, 58%, 0.35);
  color: #ffffff;
  transform: scale(1.04);
}
.btn-add-table:active {
  transform: scale(0.96);
}
.btn-add-table .btn-add-symbol {
  font: 900 15px 'JetBrains Mono', monospace;
  line-height: 1;
}
.btn-add-table .roulette-wheel-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-add-table:hover .roulette-wheel-icon {
  transform: rotate(45deg);
}

.global-pnl-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  height: 38px;
  line-height: 1;
  border-radius: 8px;
  background: hsl(32, 14%, 7%);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  box-sizing: border-box;
  flex: none;
  transition: all 0.2s ease;
}
.global-pnl-pill:hover {
  border-color: hsla(40, 85%, 58%, 0.35);
  box-shadow: 0 0 10px hsla(40, 85%, 58%, 0.15);
}
.global-pnl-label {
  font: 800 11.5px 'JetBrains Mono', monospace;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.global-pnl-val {
  font: 900 15px 'JetBrains Mono', monospace;
  color: var(--emerald);
  letter-spacing: -0.01em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.global-pnl-val.text-crimson {
  color: var(--crimson) !important;
}
.global-tables-count {
  font: 700 11.5px 'JetBrains Mono', monospace;
  color: var(--text-dim);
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.topbar-title-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex: none;
}
.topbar-heading {
  font: 800 20px Archivo, sans-serif;
  letter-spacing: 0.02em;
  margin: 0;
}
.topbar-beacon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 11px 'JetBrains Mono', monospace;
  letter-spacing: 0.16em;
  color: var(--emerald);
}
.beacon-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  animation: beacon 2.2s infinite;
}

.topbar-stats {
  display: grid;
  grid-template-columns: minmax(185px, auto) minmax(155px, auto) minmax(215px, auto) minmax(85px, auto);
  justify-content: center;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}
.stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.stat-pill-label {
  font: 700 clamp(11px, 1.1vw, 12.5px) 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  color: hsl(40, 18%, 78%);
  flex-shrink: 0;
}
.stat-pill-val {
  font: 800 clamp(16px, 1.6vw, 20px) 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  display: inline-block;
}

#headerBankroll {
  min-width: 105px;
  text-align: left;
}

#headerPnl {
  min-width: 88px;
  text-align: left;
}

#headerBaseChip {
  min-width: 72px;
  text-align: left;
}

#headerSpinsCount {
  min-width: 28px;
  text-align: left;
}

.text-gold { color: var(--gold) !important; }
.text-emerald { color: var(--emerald) !important; }
.text-crimson { color: var(--crimson) !important; }
.text-cyan { color: var(--cyan) !important; }

/* Interactive Ficha Dropdown Button in Header */
.stat-pill-btn {
  background: hsla(40, 40%, 40%, 0.12);
  border: 1px solid hsla(40, 45%, 55%, 0.35);
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all .2s;
  color: inherit;
  display: inline-flex;
  align-items: baseline;
}
.stat-pill-btn:hover {
  background: hsla(40, 40%, 40%, 0.22);
  border-color: var(--gold);
  box-shadow: 0 0 12px hsla(40, 85%, 58%, 0.2);
}
.chip-dropdown-chevron {
  font-size: 9px;
  color: var(--gold);
  margin-left: 5px;
  opacity: 0.85;
}

.topbar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: none;
  white-space: nowrap;
}

.topbar-btn-pill {
  font: 600 12px 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 7px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
}
.topbar-btn-pill:hover {
  border-color: var(--gold);
  color: var(--text-primary);
}

.topbar-btn-gold {
  background: hsla(40, 85%, 58%, 0.12);
  border-color: hsla(40, 85%, 58%, 0.4);
  color: var(--gold);
}
.topbar-btn-gold:hover {
  background: hsla(40, 85%, 58%, 0.25);
}

.topbar-btn-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 15px;
}
.btn-gold-cog {
  color: var(--gold);
  background: hsla(40, 85%, 58%, 0.12);
  border-color: hsla(40, 85%, 58%, 0.35);
}
.btn-gold-cog:hover {
  background: hsla(40, 85%, 58%, 0.25);
  border-color: var(--gold);
  box-shadow: 0 0 14px hsla(40, 85%, 58%, 0.3);
}
.btn-orange {
  color: hsl(28, 90%, 60%);
  border-color: hsla(28, 90%, 60%, 0.3);
  background: hsla(28, 90%, 60%, 0.08);
}
.btn-orange:hover {
  background: hsla(28, 90%, 60%, 0.22);
}
.btn-red {
  color: var(--crimson);
  border-color: hsla(348, 65%, 55%, 0.35);
  background: hsla(348, 65%, 50%, 0.08);
}
.btn-red:hover {
  background: hsla(348, 65%, 50%, 0.22);
}

/* DROPDOWN */
.dropdown-wrapper { position: relative; }
.dropdown-chevron { font-size: 8px; opacity: 0.6; }
.dropdown-menu {
  position: absolute;
  top: 42px;
  right: 0;
  z-index: 100;
  background: hsl(32, 12%, 8%);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 5px;
  display: grid;
  gap: 2px;
  min-width: 160px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}
.dropdown-item {
  font: 500 11.5px 'JetBrains Mono', monospace;
  color: hsl(40, 25%, 90%);
  background: none;
  border: none;
  text-align: left;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
}
.dropdown-item:hover {
  background: hsla(40, 85%, 58%, 0.12);
  color: var(--gold);
}

/* TOOLBAR & TICKER (ROW 3 - 54px) */
.terminal-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  border-bottom: 1px solid hsla(40, 40%, 60%, 0.12);
  background: var(--bg-main);
  overflow: hidden;
  min-width: 0;
}
.toolbar-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 700 13.5px Outfit, sans-serif;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  background: hsl(32, 14%, 7%);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0 18px;
  height: 38px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  flex: none;
}
.toolbar-pill-btn:hover {
  border-color: var(--gold);
}
.toolbar-pill-btn.active {
  background: hsla(40, 85%, 58%, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

.toolbar-ticker-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  overflow: hidden;
  min-width: 0;
}
.ticker-label {
  font: 900 12.5px 'JetBrains Mono', monospace;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  white-space: nowrap;
  flex: none;
}
.ticker-track {
  display: flex;
  gap: 8px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  align-items: center;
}
.ticker-chip {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  font: 900 18px 'JetBrains Mono', monospace;
  color: #fff;
  border-radius: 8px;
  border: 1.5px solid transparent;
  transition: border-color .15s, box-shadow .15s;
}
.chip-green { background: hsl(160, 65%, 38%); }
.chip-red { background: linear-gradient(170deg, hsl(348, 72%, 47%), hsl(348, 78%, 36%)); }
.chip-black { background: hsl(32, 10%, 12%); border: 1px solid hsla(40, 40%, 60%, 0.25); }

/* OUTCOME HIGHLIGHTS ON HIT TICKER (DURING ACTIVE BETTING) */
.ticker-chip.chip-outcome-loss {
  border: 2px solid hsl(348, 85%, 55%) !important;
  box-shadow: 0 0 8px hsla(348, 85%, 55%, 0.65);
}
.ticker-chip.chip-outcome-win {
  border: 2.5px solid hsl(160, 85%, 45%) !important;
  box-shadow: 0 0 12px hsla(160, 85%, 45%, 0.85);
}

/* 3 TACTICAL SLOTS / TELEMETRY CARDS (EXACT UPPER 1.15fr ROW) */
.telemetry-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
  gap: 14px;
  padding: 8px 24px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.tactical-slot-card {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: hsl(32, 12%, 6%);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: all .25s ease-out;
}
/* ETAPA UNIFICADA: SEQUÍA (Drought Monitoring) - Tono Oro Táctico / Ámbar */
.tactical-slot-card.card-sequia,
.tactical-slot-card.stage-drought,
.tactical-slot-card.card-stage1,
.tactical-slot-card.card-stage2,
.tactical-slot-card.card-searching {
  border: 1.5px solid hsla(40, 75%, 52%, 0.45);
  background: radial-gradient(ellipse at 50% 0%, hsla(40, 85%, 50%, 0.12), hsl(32, 14%, 5.5%));
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), inset 0 0 16px hsla(40, 80%, 50%, 0.05);
}

/* ETAPA 3: ESPERA / OBSERVACIÓN BUFFER - Tono Cyan Neón Eléctrico */
.tactical-slot-card.card-stage3,
.tactical-slot-card.card-waiting,
.tactical-slot-card.stage-wait {
  border: 2px solid hsl(188, 95%, 52%);
  background: radial-gradient(ellipse at 50% 0%, hsla(188, 95%, 50%, 0.18), hsl(32, 14%, 5.5%));
  box-shadow: 0 0 35px hsla(188, 95%, 50%, 0.35), inset 0 0 24px hsla(188, 95%, 50%, 0.1);
  animation: observationBeaconPulse 2s infinite ease-in-out;
}

@keyframes observationBeaconPulse {
  0%, 100% {
    box-shadow: 0 0 25px hsla(188, 95%, 50%, 0.28), inset 0 0 16px hsla(188, 95%, 50%, 0.08);
    border-color: hsl(188, 90%, 50%);
  }
  50% {
    box-shadow: 0 0 45px hsla(188, 100%, 58%, 0.55), inset 0 0 30px hsla(188, 95%, 50%, 0.18);
    border-color: hsl(188, 100%, 65%);
  }
}

.tactical-slot-card.card-queued {
  border: 1.5px dashed hsla(188, 80%, 55%, 0.6);
  background: radial-gradient(ellipse at 50% 0%, hsla(188, 80%, 55%, 0.1), hsl(32, 12%, 6%));
  box-shadow: 0 0 20px hsla(188, 80%, 55%, 0.15);
}

/* 3-PHASE STEPPER GAUGE (1-15 -> 16-30 -> 31-45) */
.three-phase-gauge {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  width: 100%;
  padding: 2px 0 0;
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  box-sizing: border-box;
}

.phase-segment {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
}

.phase-segment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 800 clamp(9.5px, 0.9vw, 11px) 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.phase-segment.active-stage .phase-segment-header {
  color: var(--phase-color, var(--gold));
  font-weight: 900;
}

.phase-segment.completed .phase-segment-header {
  color: hsl(40, 20%, 82%);
}

.phase-track {
  height: 5px;
  background: hsla(0, 0%, 100%, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.phase-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease-out;
}

.phase-1 .phase-fill {
  background: linear-gradient(90deg, hsl(215, 20%, 50%), hsl(215, 30%, 65%));
}

.phase-2 .phase-fill {
  background: linear-gradient(90deg, hsl(14, 100%, 48%), hsl(24, 100%, 58%));
  box-shadow: 0 0 10px hsla(18, 100%, 54%, 0.7);
}

.phase-3 .phase-fill {
  background: linear-gradient(90deg, hsl(188, 85%, 45%), hsl(188, 95%, 60%));
  box-shadow: 0 0 8px hsla(188, 90%, 52%, 0.6);
}
@keyframes luxuryAttackPulse {
  0% {
    border-color: hsla(40, 85%, 55%, 0.7);
    box-shadow: 0 0 24px hsla(40, 85%, 55%, 0.25), inset 0 0 20px hsla(40, 85%, 55%, 0.08);
  }
  50% {
    border-color: hsla(40, 100%, 65%, 1);
    box-shadow: 0 0 45px hsla(40, 95%, 58%, 0.65), inset 0 0 35px hsla(40, 85%, 55%, 0.2);
  }
  100% {
    border-color: hsla(40, 85%, 55%, 0.7);
    box-shadow: 0 0 24px hsla(40, 85%, 55%, 0.25), inset 0 0 20px hsla(40, 85%, 55%, 0.08);
  }
}

.tactical-slot-card.card-betting {
  border: 1.5px solid var(--gold);
  background: radial-gradient(circle at 50% 10%, hsla(40, 85%, 55%, 0.16), hsl(32, 16%, 5%) 85%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 30px hsla(40, 85%, 55%, 0.35);
  animation: luxuryAttackPulse 2.4s infinite ease-in-out;
  padding: 10px 14px;
}

.luxury-betting-card-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 6px;
}

/* 1. Header Ornament & Top Group */
.luxury-top-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding-bottom: 0;
}
.luxury-header-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.ornament-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, hsla(40, 80%, 58%, 0.6), transparent);
  max-width: 70px;
}
.ornament-diamond {
  color: var(--gold);
  font-size: 8px;
  opacity: 0.85;
}
.luxury-jugar-title {
  font: 900 clamp(13px, 1.25vw, 15.5px) Outfit, sans-serif;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-shadow: 0 0 12px hsla(40, 85%, 58%, 0.65);
  text-transform: uppercase;
}

/* 2. Luxury 3D Casino Tokens (+70% Ampliado) */
.luxury-tokens-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.2vw, 16px);
  width: 100%;
  margin: 2px 0;
}
.luxury-token-orb {
  width: clamp(44px, 4.2vw, 54px);
  height: clamp(44px, 4.2vw, 54px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, hsl(35, 22%, 22%), hsl(30, 25%, 7%) 80%);
  border: 2px solid var(--gold);
  outline: 2px solid hsla(40, 85%, 58%, 0.35);
  outline-offset: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.9), 0 0 20px hsla(40, 85%, 58%, 0.55), inset 0 2px 3px rgba(255, 255, 255, 0.45);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease-out;
}
.luxury-token-orb:hover {
  transform: translateY(-2px) scale(1.04);
}
.token-inner-ring {
  width: 84%;
  height: 84%;
  border-radius: 50%;
  border: 1px dashed hsla(40, 85%, 58%, 0.6);
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 50%, hsla(40, 85%, 58%, 0.18), transparent 70%);
}
.token-num {
  font-size: clamp(20px, 1.85vw, 25px);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 14px var(--gold);
}

/* 3. Section Superior: 2 Large Highlight Boxes (Apuesta/Nro & Total Apostado - Grandes y Legibles) */
.jugar-primary-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin: 3px 0;
}

.jugar-primary-box {
  background: hsla(32, 20%, 5%, 0.95);
  border: 1.5px solid hsla(40, 35%, 55%, 0.38);
  border-radius: 9px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6), 0 3px 10px rgba(0, 0, 0, 0.4);
  gap: 3px;
}

.jugar-primary-box.highlight-gold {
  border-color: hsla(40, 85%, 58%, 0.65);
  background: hsla(40, 85%, 58%, 0.12);
  box-shadow: 0 0 16px hsla(40, 85%, 58%, 0.3), inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

.jugar-primary-label {
  font: 800 clamp(11.5px, 1.1vw, 13px) 'JetBrains Mono', monospace;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.jugar-primary-val {
  font: 900 clamp(20px, 2.1vw, 27px) 'JetBrains Mono', monospace;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* 4. Section Inferior: 4 Compact Quadrants (Nivel, Apostado, Retorno, Ganancia - Ampliados) */
.jugar-secondary-quad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
  width: 100%;
}

.jugar-sub-metric {
  background: hsla(32, 15%, 7%, 0.9);
  border: 1px solid hsla(40, 30%, 50%, 0.25);
  border-radius: 7px;
  padding: 6px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
}

.jugar-sub-label {
  font: 800 clamp(10px, 0.95vw, 11.5px) 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.jugar-sub-val {
  font: 900 clamp(14px, 1.35vw, 17px) 'JetBrains Mono', monospace;
  line-height: 1.1;
  white-space: nowrap;
}

/* 5. Progress Footer */
.luxury-progress-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding-top: 2px;
}
.progress-left-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.progress-footer-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font: 800 clamp(11px, 1vw, 12.5px) 'JetBrains Mono', monospace;
  color: var(--gold);
  letter-spacing: 0.08em;
}
.luxury-progress-track {
  height: 6px;
  background: hsla(40, 40%, 60%, 0.16);
  border-radius: 3px;
  overflow: hidden;
}
.luxury-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, hsl(38, 90%, 48%), hsl(42, 95%, 62%));
  box-shadow: 0 0 10px hsla(40, 85%, 58%, 0.6);
  transition: width 0.3s ease-out;
}
.level-indicator-box {
  width: clamp(34px, 3vw, 40px);
  height: clamp(26px, 2.3vw, 32px);
  border-radius: 6px;
  border: 1.5px solid hsla(40, 85%, 58%, 0.5);
  background: hsla(32, 20%, 7%, 0.9);
  box-shadow: 0 0 12px hsla(40, 85%, 58%, 0.3), inset 0 1px 2px rgba(255,255,255,0.15);
  display: grid;
  place-items: center;
  font-size: clamp(14px, 1.25vw, 17px);
  font-weight: 900;
  color: var(--gold);
  flex: none;
}

/* Card Sub-layouts */
.slot-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid hsla(40, 40%, 60%, 0.12);
  padding-bottom: 6px;
}
.slot-badge-title {
  font: 800 clamp(11.5px, 1.1vw, 13.5px) 'JetBrains Mono', monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.btn-release-x {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  transition: color .15s;
}
.btn-release-x:hover {
  color: var(--crimson);
}

/* Non-Betting Tactical Monitor & Radar Cards (Waiting / Queued / Scanning) */
.luxury-searching-card-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 6px 8px;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.luxury-searching-card-inner .luxury-top-group {
  height: 22px;
  min-height: 22px;
  max-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: none;
}

.luxury-searching-title {
  font: 800 clamp(12.5px, 1.2vw, 14.5px) 'JetBrains Mono', monospace;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  text-align: center;
}

.standby-center-display {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
}

.standby-radar-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 100px;
  background: hsla(32, 12%, 8%, 0.75);
  border: 1px solid hsla(40, 30%, 50%, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 hsla(0, 0%, 100%, 0.08);
}

.standby-icon {
  font-size: 16px;
  color: var(--gold);
  animation: beacon 2.5s infinite ease-in-out;
}

.standby-text {
  font: 800 clamp(13px, 1.2vw, 15px) 'JetBrains Mono', monospace;
  letter-spacing: 0.16em;
  color: hsl(40, 20%, 82%);
}

.radar-center-tokens-group {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: none;
  margin: 4px 0;
}

.radar-tokens-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.1vw, 14px);
  width: 100%;
}

.radar-token-badge {
  width: clamp(42px, 4vw, 50px);
  height: clamp(42px, 4vw, 50px);
  border-radius: 10px;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 0 hsla(0, 0%, 100%, 0.15);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
}
.radar-token-badge:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), inset 0 1px 0 hsla(0, 0%, 100%, 0.25);
}

.radar-token-badge.badge-red {
  background: linear-gradient(145deg, hsl(348, 75%, 48%), hsl(348, 80%, 32%));
  border: 1.5px solid hsla(348, 85%, 65%, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 12px hsla(348, 75%, 48%, 0.25);
}
.radar-token-badge.badge-black {
  background: linear-gradient(145deg, hsl(32, 12%, 18%), hsl(32, 12%, 8%));
  border: 1.5px solid hsla(40, 40%, 60%, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 10px hsla(40, 40%, 60%, 0.15);
}
.radar-token-badge.badge-green {
  background: linear-gradient(145deg, hsl(160, 68%, 40%), hsl(160, 72%, 24%));
  border: 1.5px solid hsla(160, 80%, 55%, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 12px hsla(160, 80%, 50%, 0.3);
}

.radar-token-num {
  font: 900 clamp(18px, 1.8vw, 23px) 'JetBrains Mono', monospace;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}

/* Card Header Bar & Badges */
.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 22px;
  min-height: 22px;
  padding: 0 4px;
}

.card-eyebrow {
  font: 900 clamp(11px, 1.05vw, 13px) 'Outfit', sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.stage-wait .card-eyebrow {
  color: var(--cyan);
}

.card-stage-pill {
  font: 900 clamp(9.5px, 0.85vw, 11px) 'JetBrains Mono', monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  background: hsla(40, 85%, 58%, 0.15);
  color: var(--gold);
  border: 1px solid hsla(40, 85%, 58%, 0.35);
}

.stage-wait .card-stage-pill {
  background: hsla(188, 95%, 52%, 0.15);
  color: var(--cyan);
  border-color: hsla(188, 95%, 52%, 0.35);
}

.card-tokens-matrix {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.1vw, 14px);
  width: 100%;
}

.badge-number {
  /* Inherits full styling from .radar-token-badge */
}

/* Card Metric Center: Clean Numbers & Sublabels (+70% Ampliado) */
.card-metric-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  gap: 4px;
  text-align: center;
  margin: 6px 0;
}

.drought-count-clean {
  font: 900 clamp(48px, 4.8vw, 64px) 'JetBrains Mono', monospace;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 24px hsla(40, 85%, 58%, 0.55), 0 2px 6px rgba(0, 0, 0, 0.9);
}

.drought-label {
  font: 800 clamp(11.5px, 1.1vw, 13px) 'Archivo', sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.wait-progress-counter {
  font: 900 clamp(48px, 4.8vw, 64px) 'JetBrains Mono', monospace;
  line-height: 1;
  color: var(--cyan);
  text-shadow: 0 0 24px hsla(188, 95%, 52%, 0.65), 0 2px 6px rgba(0, 0, 0, 0.9);
}

.wait-label {
  font: 800 clamp(11.5px, 1.1vw, 13px) 'Archivo', sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: hsla(188, 70%, 80%, 0.85);
}

.searching-center-radar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
}

.radar-scan-circle {
  width: clamp(80px, 7.5vw, 104px);
  height: clamp(80px, 7.5vw, 104px);
  border-radius: 50%;
  border: 1.5px solid hsla(40, 40%, 60%, 0.3);
  position: relative;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 50%, hsla(40, 40%, 60%, 0.08), transparent 70%);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.6);
}

.radar-crosshair {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.radar-crosshair::before,
.radar-crosshair::after {
  content: '';
  position: absolute;
  background: hsla(40, 40%, 60%, 0.15);
}
.radar-crosshair::before {
  top: 0; bottom: 0; left: 50%; width: 1px; transform: translateX(-50%);
}
.radar-crosshair::after {
  left: 0; right: 0; top: 50%; height: 1px; transform: translateY(-50%);
}

.radar-beam {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(45deg, transparent 50%, hsla(40, 85%, 58%, 0.18) 100%);
  animation: radarSpin 4s linear infinite;
}

@keyframes radarSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.radar-drought-val {
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  z-index: 2;
}

.searching-status-box {
  background: hsla(32, 20%, 4.5%, 0.95);
  border: 1px solid hsla(40, 35%, 55%, 0.25);
  border-radius: 8px;
  padding: 4px 12px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.status-box-title {
  font: 800 clamp(11px, 1vw, 12.5px) 'JetBrains Mono', monospace;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.status-box-desc {
  font: 700 clamp(12px, 1.1vw, 13.5px) 'JetBrains Mono', monospace;
  color: hsl(40, 15%, 85%);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.status-box-desc strong {
  color: var(--gold);
  font-weight: 900;
}

/* Card Progress Bar */
.slot-progress-wrapper {
  width: 100%;
}
.slot-progress-labels {
  display: flex;
  justify-content: space-between;
  font: 700 clamp(11.5px, 1.1vw, 13.5px) 'JetBrains Mono', monospace;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.slot-progress-track {
  height: 6px;
  background: hsla(40, 40%, 60%, 0.16);
  border-radius: 3px;
  overflow: hidden;
}
.slot-progress-fill {
  height: 100%;
  background: var(--cyan);
  transition: width .3s ease-out;
}
.fill-gold { background: var(--gold) !important; }
.fill-emerald { background: var(--emerald) !important; }

/* 4. BOTTOM SECTION: 0-36 ROULETTE BOARD (15% REDUCED PROPORTIONAL ROW) */
.roulette-board-section {
  display: flex;
  gap: 8px;
  padding: 6px 24px 12px;
  background: hsl(32, 12%, 3.5%);
  border-top: 1px solid var(--border-subtle);
  height: 100%;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}

.roulette-zero-col {
  width: clamp(65px, 5.5vw, 85px);
  height: 100%;
  display: flex;
  flex: none;
}
.num-zero {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(180deg, hsl(160, 68%, 44%), hsl(160, 75%, 26%));
  border: 1.5px solid hsla(160, 70%, 55%, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  color: #fff;
  font: 900 clamp(32px, 3.4vw, 46px) 'JetBrains Mono', monospace;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: filter .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.num-zero:hover {
  background: linear-gradient(180deg, hsl(160, 72%, 48%), hsl(160, 78%, 30%));
  box-shadow: 0 6px 20px hsla(160, 70%, 45%, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}
.num-zero:active,
.num-zero.pointer-active {
  transform: scale(0.96) !important;
  transition: transform 0ms !important;
}

.roulette-numbers-grid {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
  flex: 1;
  height: 100%;
}
.board-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  height: 100%;
}

.board-num-btn {
  height: 100%;
  min-height: 0;
  width: 100%;
  border-radius: 8px;
  border: none;
  color: #fff;
  font: 900 clamp(22px, 2.45vw, 34px) 'JetBrains Mono', monospace;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: filter .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.board-num-btn:active,
.board-num-btn.pointer-active {
  transform: scale(0.96) !important;
  transition: transform 0ms !important;
}

/* TOP-TIER LUXURY TACTILE FX (EXPANDING GOLD RADIAL SHOCKWAVE RIPPLE & SURFACE ENERGY FLASH) */
.luxury-tactile-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, hsla(40, 100%, 75%, 0.7) 0%, hsla(40, 85%, 58%, 0.35) 45%, hsla(40, 85%, 58%, 0) 70%);
  animation: luxuryRipple 0.5s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
  z-index: 15;
}

@keyframes luxuryRipple {
  0% {
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 1;
  }
  60% {
    opacity: 0.85;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.8);
    opacity: 0;
  }
}

.board-num-btn.tactile-flash-active,
.num-zero.tactile-flash-active {
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.9), inset 0 0 15px rgba(255, 255, 255, 0.7) !important;
  filter: brightness(1.35) !important;
  transition: filter 0ms, box-shadow 0ms !important;
}

.board-num-text {
  font: 900 clamp(22px, 2.45vw, 34px) 'JetBrains Mono', monospace;
  line-height: 1;
  letter-spacing: -0.02em;
  user-select: none;
  pointer-events: none;
}
.num-zero .board-num-text {
  font: 900 clamp(32px, 3.4vw, 46px) 'JetBrains Mono', monospace;
}

.num-red {
  background: linear-gradient(180deg, hsl(348, 75%, 48%), hsl(348, 80%, 32%));
  border: 1px solid hsla(348, 75%, 65%, 0.3);
}
.num-red:hover {
  background: linear-gradient(180deg, hsl(348, 80%, 53%), hsl(348, 82%, 36%));
  box-shadow: 0 4px 16px hsla(348, 75%, 45%, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.num-black {
  background: linear-gradient(180deg, hsl(32, 10%, 16%), hsl(32, 10%, 7%));
  border: 1px solid hsla(40, 40%, 60%, 0.18);
}
.num-black:hover {
  background: linear-gradient(180deg, hsl(32, 10%, 22%), hsl(32, 10%, 10%));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Pulsing Pleno Glow for Target Numbers */
.target-pleno-active {
  border: 2px solid var(--gold) !important;
  box-shadow: 0 0 24px hsla(40, 85%, 58%, 0.85), inset 0 0 12px hsla(40, 85%, 58%, 0.45) !important;
  animation: targetPlenoPulse 1.4s infinite ease-in-out;
  z-index: 10;
}

@keyframes targetPlenoPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1.05);
    box-shadow: 0 0 24px hsla(40, 85%, 58%, 0.85), inset 0 0 12px hsla(40, 85%, 58%, 0.45);
  }
  50% {
    transform: scale(1.03);
    filter: brightness(1.25);
    box-shadow: 0 0 32px hsla(40, 85%, 58%, 1), inset 0 0 16px hsla(40, 85%, 58%, 0.6);
  }
}

/* R5: Clean & Enlarged Monetary Bet Overlay on Roulette Cloth */
.board-chip-overlay {
  position: absolute;
  top: 3px;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  background: linear-gradient(135deg, hsl(42, 95%, 52%), hsl(30, 95%, 40%));
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.8), 0 0 14px hsla(42, 100%, 55%, 0.65);
  pointer-events: none;
  z-index: 20;
  animation: chipDropIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  user-select: none;
}

@keyframes chipDropIn {
  0% {
    transform: translateY(-6px) scale(0.7);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.board-chip-val {
  font: 900 clamp(13.5px, 1.35vw, 17px) 'JetBrains Mono', monospace;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 6px rgba(0, 0, 0, 0.85);
}

@keyframes pulse-dynamic {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1.05);
    box-shadow: 0 0 24px hsla(40, 85%, 58%, 0.85), inset 0 0 12px hsla(40, 85%, 58%, 0.45);
  }
  50% {
    transform: scale(1.03);
    filter: brightness(1.25);
    box-shadow: 0 0 32px hsla(40, 85%, 58%, 1), inset 0 0 16px hsla(40, 85%, 58%, 0.6);
  }
}

@keyframes signalPulseGlow {
  0%, 100% {
    box-shadow: 0 0 16px hsla(40, 85%, 58%, 0.4);
    opacity: 0.9;
  }
  50% {
    box-shadow: 0 0 28px hsla(40, 85%, 58%, 0.85);
    opacity: 1;
  }
}

/* ==========================================================================
   MOBILE CASINO TOUCH KEYPAD 0-9 & TELEMETRY CAROUSEL DOTS (< 768px ONLY)
   ========================================================================== */

.telemetry-dots-container {
  display: none !important; /* STRICTLY HIDDEN ON DESKTOP */
}

.mobile-keypad-section {
  display: none !important; /* STRICTLY HIDDEN ON DESKTOP */
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px 14px;
  background: hsl(32, 12%, 3.5%);
  border-top: 1px solid var(--border-subtle);
  width: 100%;
  box-sizing: border-box;
  z-index: 20;
}

/* 1. Status / Input Display Screen (44px OLED Display) */
.keypad-screen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: hsl(32, 18%, 4%);
  border: 1.5px solid hsla(40, 40%, 60%, 0.22);
  border-radius: 10px;
  padding: 6px 12px;
  height: 44px;
  min-height: 44px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.75), 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.keypad-screen-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.keypad-screen-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.keypad-screen-display {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold-glow);
  letter-spacing: -0.02em;
  min-width: 32px;
}

.keypad-placeholder {
  color: hsla(40, 20%, 80%, 0.2);
  font-weight: 700;
}

.keypad-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: hsla(0, 0%, 100%, 0.06);
  border: 1px solid hsla(40, 40%, 60%, 0.2);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  animation: fadeIn 0.15s ease-out;
}

.keypad-preview-badge.badge-target-attack {
  background: hsla(40, 85%, 58%, 0.18);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 10px hsla(40, 85%, 58%, 0.35);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.badge-dot.dot-red { background: hsl(348, 75%, 50%); box-shadow: 0 0 6px hsl(348, 75%, 50%); }
.badge-dot.dot-black { background: hsl(32, 10%, 40%); border: 1px solid #fff; }
.badge-dot.dot-green { background: hsl(160, 75%, 45%); box-shadow: 0 0 6px hsl(160, 75%, 45%); }

.keypad-screen-actions {
  display: flex;
  align-items: center;
}

.keypad-quick-clear-btn {
  background: hsla(348, 60%, 45%, 0.12);
  border: 1px solid hsla(348, 60%, 45%, 0.28);
  color: var(--crimson);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.keypad-quick-clear-btn:active,
.keypad-quick-clear-btn.pointer-active {
  background: hsla(348, 60%, 45%, 0.3);
  transform: scale(0.92);
}

/* Error flash on invalid input (> 36) */
.keypad-screen.keypad-screen-error {
  border-color: var(--crimson) !important;
  box-shadow: 0 0 18px hsla(348, 85%, 55%, 0.7), inset 0 0 8px hsla(348, 85%, 55%, 0.4) !important;
  animation: keypadScreenShake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes keypadScreenShake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* 2. Keypad Matrix Grid */
.keypad-matrix {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.keypad-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
}

.keypad-btn {
  height: 48px;
  min-height: 48px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: filter 0.15s, transform 0.1s;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.keypad-btn:active,
.keypad-btn.pointer-active {
  transform: scale(0.95) !important;
  transition: transform 0ms !important;
}

.keypad-btn-text {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.keypad-sublabel {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-top: 2px;
  line-height: 1;
}

/* Key Colors */
.key-red {
  background: linear-gradient(180deg, hsl(348, 75%, 44%), hsl(348, 78%, 28%));
  border-color: hsla(348, 75%, 65%, 0.35);
}
.key-black {
  background: linear-gradient(180deg, hsl(32, 12%, 17%), hsl(32, 12%, 7%));
  border-color: hsla(40, 40%, 60%, 0.2);
}
.key-zero {
  background: linear-gradient(180deg, hsl(160, 68%, 42%), hsl(160, 75%, 25%));
  border-color: hsla(160, 70%, 55%, 0.4);
}
.key-zero .keypad-btn-text {
  font-size: 22px;
}

/* Action Buttons */
.key-backspace {
  background: linear-gradient(180deg, hsla(348, 30%, 18%, 0.9), hsla(348, 30%, 10%, 0.95));
  border-color: hsla(348, 55%, 50%, 0.3);
  color: hsl(348, 80%, 75%);
}
.key-backspace .keypad-btn-text {
  color: hsl(348, 80%, 75%);
  font-size: 18px;
}
.key-backspace .keypad-sublabel {
  color: hsl(348, 70%, 65%);
}

.key-submit {
  background: linear-gradient(180deg, hsl(40, 92%, 58%), hsl(36, 92%, 46%));
  border: 1px solid hsla(40, 90%, 65%, 0.7);
  color: hsl(32, 20%, 6%);
  box-shadow: 0 4px 14px hsla(40, 85%, 58%, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.45);
}
.key-submit .keypad-btn-text {
  color: hsl(32, 20%, 6%);
  font-size: 20px;
  font-weight: 900;
}
.key-submit .keypad-sublabel {
  color: hsl(32, 20%, 6%);
  font-weight: 900;
}

.key-submit.submit-ready {
  animation: submitPulse 1.6s infinite ease-in-out;
}

@keyframes submitPulse {
  0%, 100% {
    box-shadow: 0 4px 14px hsla(40, 85%, 58%, 0.4);
  }
  50% {
    box-shadow: 0 4px 22px hsla(40, 95%, 58%, 0.8), inset 0 0 8px rgba(255, 255, 255, 0.6);
  }
}

/* WIN CELEBRATION MODAL */
.win-premium-card {
  background: linear-gradient(135deg, hsl(32, 14%, 8%) 0%, hsl(32, 12%, 5%) 100%);
  border: 2px solid var(--gold);
  border-radius: 16px;
  padding: 40px 60px;
  text-align: center;
  box-shadow: 0 0 50px hsla(40, 85%, 58%, 0.4), inset 0 0 20px hsla(40, 85%, 58%, 0.15);
  animation: sweepLight 1.8s infinite ease-in-out;
  max-width: 90%;
  width: 440px;
}
.win-title {
  font: 900 36px Archivo, sans-serif;
  letter-spacing: 0.05em;
  margin: 0;
  color: #fff;
  text-shadow: 0 0 16px rgba(255,255,255,0.3);
}
.win-divider {
  height: 2px;
  width: 80px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 18px auto;
}
.win-amount {
  font: 900 44px/1 'JetBrains Mono', monospace;
  color: var(--emerald);
  text-shadow: 0 0 24px hsla(160, 60%, 55%, 0.5);
}

/* MODAL & DRAWER SYSTEM */
.modal-backdrop, .drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .2s;
}

.modal-box {
  background: hsl(32, 12%, 7%);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  width: 90%;
  max-width: 680px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.8);
  overflow: hidden;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-title {
  font: 800 18px Archivo, sans-serif;
  margin: 0;
  letter-spacing: 0.02em;
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}
.modal-close-btn:hover { color: #fff; }
.modal-body {
  padding: 24px 28px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-table-scroll {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}
.progression-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: right;
}
.progression-table th, .progression-table td {
  padding: 9px 14px;
  border-bottom: 1px solid hsla(40, 40%, 60%, 0.08);
}
.progression-table th {
  background: hsl(32, 14%, 9%);
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* QUIEBRA DE SESIÓN MODAL STYLES (STOP-LOSS 30/30) */
.modal-quiebra {
  max-width: 520px;
  border: 1.5px solid hsla(348, 85%, 55%, 0.6);
  background: radial-gradient(ellipse at 50% 0%, hsla(348, 85%, 50%, 0.16), hsl(32, 16%, 6%) 85%);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9), 0 0 32px hsla(348, 85%, 50%, 0.35);
  animation: quiebraModalEntry 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes quiebraModalEntry {
  0% {
    transform: scale(0.92) translateY(12px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.header-quiebra {
  border-bottom: 1px solid hsla(348, 80%, 55%, 0.25);
  padding: 16px 22px;
}

.quiebra-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiebra-badge .modal-title {
  color: #ff6b6b;
  font-size: clamp(14px, 1.3vw, 16.5px);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.quiebra-icon {
  font-size: 20px;
}

.quiebra-desc {
  font-size: 13px;
  color: hsl(40, 15%, 82%);
  line-height: 1.5;
  margin: 0 0 16px;
}

.quiebra-desc strong {
  color: #fff;
  font-weight: 800;
}

.quiebra-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.quiebra-stat-card {
  background: hsla(32, 15%, 4%, 0.85);
  border: 1px solid hsla(40, 30%, 45%, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.quiebra-stat-label {
  font: 700 10px 'JetBrains Mono', monospace;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.quiebra-stat-val {
  font-size: clamp(14px, 1.3vw, 17px);
  font-weight: 900;
  color: #fff;
}

.quiebra-actions-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-quiebra-reset {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1.5px solid hsla(348, 85%, 55%, 0.6);
  background: linear-gradient(180deg, hsl(348, 75%, 42%), hsl(348, 85%, 26%));
  color: #fff;
  font: 800 13.5px 'Outfit', sans-serif;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 4px 16px hsla(348, 75%, 45%, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-quiebra-reset:hover {
  background: linear-gradient(180deg, hsl(348, 80%, 48%), hsl(348, 88%, 32%));
  box-shadow: 0 6px 22px hsla(348, 75%, 45%, 0.55);
  transform: translateY(-1px);
}

.btn-quiebra-review {
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid hsla(40, 40%, 60%, 0.25);
  background: hsla(0, 0%, 100%, 0.04);
  color: hsl(40, 20%, 85%);
  font: 700 12.5px 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-quiebra-review:hover {
  background: hsla(40, 85%, 58%, 0.1);
  border-color: var(--gold);
  color: #fff;
}

/* FLOATING MODERN SETTINGS POPOVER (TOP-RIGHT, NO BACKDROP/NO BLUR) */
.settings-popover-card {
  position: fixed;
  top: 68px;
  right: 20px;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: hsla(32, 22%, 7%, 0.98);
  border: 1.5px solid hsla(40, 60%, 55%, 0.4);
  border-radius: 12px;
  z-index: 1000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 24px hsla(40, 85%, 58%, 0.18), inset 0 1px 2px rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

.settings-popover-card.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  display: none !important;
}

.popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid hsla(40, 35%, 55%, 0.15);
  background: hsla(32, 20%, 9%, 0.6);
  box-sizing: border-box;
}

.popover-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.popover-icon {
  font-size: 14px;
}

.popover-title {
  font: 800 14.5px Archivo, sans-serif;
  margin: 0;
  color: hsl(40, 25%, 92%);
  letter-spacing: 0.02em;
}

.popover-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

.popover-close-btn:hover {
  color: #fff;
  background: hsla(0, 0%, 100%, 0.1);
}

.popover-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
}

.popover-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.popover-field label {
  font: 600 11.5px Outfit, sans-serif;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.popover-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.popover-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.popover-input {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  background: hsl(32, 16%, 10%);
  border: 1px solid hsla(40, 35%, 55%, 0.25);
  border-radius: 7px;
  color: #fff;
  padding: 8px 10px;
  font: 700 13px 'JetBrains Mono', monospace;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.popover-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px hsla(40, 85%, 58%, 0.25);
}

.btn-popover-gold {
  background: linear-gradient(180deg, hsl(40, 88%, 56%), hsl(36, 88%, 46%));
  color: hsl(32, 20%, 6%);
  border: none;
  border-radius: 7px;
  padding: 10px;
  font: 800 12px Archivo, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-popover-gold:hover {
  background: linear-gradient(180deg, hsl(40, 92%, 62%), hsl(36, 92%, 50%));
}

.btn-popover-gold.btn-saved {
  background: linear-gradient(180deg, hsl(160, 75%, 45%), hsl(160, 75%, 35%)) !important;
  color: #fff !important;
}

.popover-divider {
  height: 1px;
  background: hsla(40, 35%, 55%, 0.12);
  margin: 4px 0;
}

.btn-popover-reset {
  background: hsla(348, 65%, 50%, 0.08);
  border: 1px solid hsla(348, 65%, 50%, 0.25);
  color: var(--crimson);
  border-radius: 7px;
  padding: 8px;
  font: 700 11px 'JetBrains Mono', monospace;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s;
}

.btn-popover-reset:hover {
  background: hsla(348, 65%, 50%, 0.18);
  border-color: hsla(348, 65%, 50%, 0.45);
}

/* CHIP LEVEL UP NOTIFICATION TOAST */
.luxury-chip-levelup-toast {
  position: fixed;
  top: 75px;
  left: 50%;
  transform: translateX(-50%) translateY(-25px) scale(0.92);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.luxury-chip-levelup-toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.chip-levelup-card {
  background: radial-gradient(ellipse at 50% 0%, hsla(200, 90%, 50%, 0.3), hsl(32, 20%, 6%) 85%);
  border: 2px solid var(--cyan);
  border-radius: 14px;
  padding: 14px 28px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 35px hsla(200, 85%, 55%, 0.5);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chip-levelup-title {
  font: 900 12px Archivo, sans-serif;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-transform: uppercase;
}

.chip-levelup-desc {
  font: 800 15px 'JetBrains Mono', monospace;
  color: #fff;
}

.chip-levelup-sub {
  font: 600 11px Outfit, sans-serif;
  color: hsl(40, 15%, 82%);
}

/* LUXURY FLUID WIN CELEBRATION TOAST */
.luxury-win-toast {
  position: fixed;
  top: 75px;
  left: 50%;
  transform: translateX(-50%) translateY(-25px) scale(0.92);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.luxury-win-toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.luxury-win-toast-card {
  background: radial-gradient(ellipse at 50% 0%, hsla(40, 90%, 55%, 0.28), hsl(32, 20%, 6%) 85%);
  border: 2px solid var(--gold);
  border-radius: 14px;
  padding: 16px 36px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 40px hsla(40, 85%, 58%, 0.6), inset 0 1px 3px rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.win-toast-crown {
  font-size: 22px;
  letter-spacing: 0.2em;
}

.win-toast-title {
  font: 900 13px Archivo, sans-serif;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  text-shadow: 0 0 10px hsla(40, 85%, 58%, 0.6);
}

.win-toast-amount {
  font: 900 clamp(24px, 2.5vw, 34px) 'JetBrains Mono', monospace;
  color: #10b981;
  text-shadow: 0 0 16px hsla(160, 85%, 45%, 0.8);
  margin: 2px 0;
}

.win-toast-amount.win-toast-amount-negative {
  color: #f59e0b;
  text-shadow: 0 0 18px hsla(38, 92%, 50%, 0.85);
}

.luxury-win-toast-card.toast-negative-recovery {
  background: radial-gradient(ellipse at 50% 0%, hsla(38, 92%, 50%, 0.24), hsl(32, 20%, 6%) 85%);
  border: 2px solid hsl(38, 88%, 52%);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.88), 0 0 42px hsla(38, 85%, 52%, 0.5), inset 0 1px 3px rgba(255, 255, 255, 0.35);
}

.toast-negative-recovery .win-toast-title {
  color: hsl(38, 90%, 60%);
  text-shadow: 0 0 12px hsla(38, 88%, 52%, 0.65);
}

.win-toast-sub {
  font: 700 9.5px 'JetBrains Mono', monospace;
  letter-spacing: 0.16em;
  color: hsl(40, 20%, 80%);
}

@keyframes beacon { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   MOBILE, TABLET & LANDSCAPE RESPONSIVE ENHANCEMENTS (F09–F15)
   ========================================================================== */

/* 1. TABLET SCREENS (769px to 1024px) */
@media (max-width: 1024px) {
  .app-container {
    grid-template-columns: 60px 1fr;
  }

  .terminal-topbar {
    padding: 0 16px;
    gap: 12px;
  }

  .telemetry-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 6px 14px;
  }

  .tactical-slot-card {
    padding: 10px 12px;
  }

  .roulette-board-section {
    padding: 6px 14px 12px;
  }
}

/* 2. MOBILE PORTRAIT & TOUCH VIEWPORTS (max-width: 768px) */
@media (max-width: 768px) {
  html[data-st-active-view="mesa"],
  html[data-st-active-view="mesa"] body {
    overflow-x: hidden;
    overflow-y: hidden;
    height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
  }

  .app-container {
    display: flex;
    flex-direction: column-reverse;
    height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  /* Compact Bottom Navigation Bar */
  .app-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 52px;
    flex-direction: row;
    justify-content: space-around;
    padding: 0 16px;
    border-right: none;
    border-top: 1px solid var(--border-subtle);
    background: hsla(32, 12%, 5%, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 500;
  }

  .sidebar-top {
    flex-direction: row;
    width: auto;
    gap: 12px;
  }

  .sidebar-logo {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    width: auto;
    gap: 8px;
  }

  .sidebar-bottom {
    flex-direction: row;
    width: auto;
    gap: 8px;
  }

  .sidebar-divider {
    display: none;
  }

  .sidebar-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 10px;
  }

  /* Main Terminal Scrollable Workspace */
  .terminal-main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 58px;
    -webkit-overflow-scrolling: touch;
  }

  /* F10: Compact High-Density 2-Row Header */
  .terminal-topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px 8px;
    padding: 6px 10px;
    height: auto;
    min-height: auto;
    max-height: none;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-sidebar);
  }

  .topbar-title-block {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    width: auto;
  }

  .topbar-heading {
    font-size: clamp(12.5px, 3.2vw, 14px);
    font-weight: 800;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-beacon {
    font-size: 8.5px;
    padding: 2px 6px;
    flex-shrink: 0;
  }

  .topbar-controls {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    width: auto;
  }

  .topbar-btn-pill {
    padding: 4px 8px;
    font-size: 10.5px;
    height: 28px;
  }

  .topbar-btn-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    font-size: 12px;
    border-radius: 6px;
    padding: 0;
    display: grid;
    place-items: center;
  }

  .topbar-btn-icon svg {
    width: 15px;
    height: 15px;
  }

  .topbar-stats {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 100%;
  }

  .stat-pill {
    background: hsla(32, 12%, 8%, 0.85);
    padding: 3.5px 4px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    min-width: 0;
    overflow: hidden;
  }

  .stat-pill-label {
    font-size: 7.5px;
    letter-spacing: 0.02em;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    line-height: 1.1;
  }

  .stat-pill-val {
    font-size: clamp(9.5px, 2.65vw, 11.5px);
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    letter-spacing: -0.03em;
    line-height: 1.2;
    min-width: 0;
  }

  #headerBankroll,
  #headerPnl,
  #headerBaseChip,
  #headerSpinsCount {
    min-width: 0;
  }

  .stat-pill-btn {
    padding: 3.5px 4px;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
  }

  .chip-dropdown-chevron {
    font-size: 7px;
    margin-left: 2px;
  }

  /* F11: Multi-Table Touch Tabs Bar */
  .terminal-tabs-bar {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    padding: 0 10px;
    gap: 8px;
    background: hsl(32, 12%, 4.5%);
    border-bottom: 1px solid var(--border-subtle);
  }

  .tabs-scroll-container {
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .table-tab {
    height: 30px;
    min-width: 110px;
    padding: 0 8px 0 10px;
    scroll-snap-align: start;
    border-radius: 6px;
    font-size: 12px;
  }

  .tab-name {
    max-width: 85px;
    font-size: 11.5px;
  }

  .tab-state-badge,
  .tab-spins-badge {
    font-size: 10px;
    padding: 1px 5px;
  }

  .tab-close-btn {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    font-size: 10px;
    margin-left: 2px;
    display: grid;
    place-items: center;
  }

  .btn-add-table span {
    display: none;
  }

  .btn-add-table {
    padding: 0 8px;
    height: 30px;
    min-width: 30px;
    justify-content: center;
  }

  .global-pnl-pill {
    padding: 0 8px;
    height: 30px;
    gap: 4px;
  }

  .global-pnl-label {
    display: none;
  }

  .global-pnl-val {
    font-size: 11.5px;
  }

  .global-tables-count {
    font-size: 9.5px;
  }

  /* Compact Streamlined Toolbar & Ticker (F9) */
  .terminal-toolbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    padding: 4px 10px;
    gap: 6px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    background: hsl(32, 12%, 5%);
    border-bottom: 1px solid var(--border-subtle);
  }

  /* Hide Modo Especial completely on mobile */
  #btnSpecialMode {
    display: none !important;
  }

  /* Icon-Only Undo (↺) */
  .btn-undo-pill {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .btn-undo-pill span {
    display: none !important;
  }

  .btn-undo-pill svg {
    width: 16px;
    height: 16px;
  }

  .toolbar-pill-btn {
    height: 30px;
    padding: 5px 10px;
    font-size: 11.5px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Full Width Ticker Track */
  .toolbar-ticker-container {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 100%;
    margin-top: 0;
  }

  .ticker-label {
    display: none !important;
  }

  .ticker-track {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .ticker-track::-webkit-scrollbar {
    display: none;
  }

  .ticker-chip {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    font-size: 12px;
    font-weight: 800;
    border-radius: 5px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
  }

  /* F12: Telemetry Cards Mobile Swipe Carousel */
  .telemetry-dots-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 6px 0 2px;
    z-index: 10;
  }

  .telemetry-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: hsla(40, 20%, 80%, 0.25);
    border: 1px solid transparent;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .telemetry-dot.dot-active {
    width: 22px;
    border-radius: 4px;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
  }

  .telemetry-dot.dot-type-betting.dot-active {
    background: var(--gold);
    box-shadow: 0 0 12px var(--gold-glow);
  }

  .telemetry-dot.dot-type-waiting.dot-active {
    background: var(--cyan);
    box-shadow: 0 0 12px hsla(188, 80%, 55%, 0.5);
  }

  .telemetry-dot.dot-pulse {
    animation: beacon 1.5s infinite ease-in-out;
  }

  .telemetry-cards-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px;
    padding: 6px 12px 10px;
    height: auto;
    min-height: 230px;
  }

  .telemetry-cards-grid::-webkit-scrollbar {
    display: none;
  }

  .tactical-slot-card {
    flex: 0 0 calc(100% - 16px);
    width: calc(100% - 16px);
    min-width: calc(100% - 16px);
    max-width: calc(100% - 16px);
    scroll-snap-align: center;
    scroll-snap-stop: always;
    min-height: 220px;
    height: auto;
    padding: 12px 14px;
  }

  /* Compact Token Orbs on Mobile */
  .luxury-tokens-strip {
    gap: clamp(6px, 2vw, 12px);
  }

  .luxury-token-orb {
    width: clamp(42px, 11vw, 50px);
    height: clamp(42px, 11vw, 50px);
  }

  .token-num {
    font-size: clamp(17px, 4.5vw, 22px);
  }

  /* F8: Active Betting Card (JUGAR) Zero-Overlap Responsive Specification */
  .luxury-metrics-dual-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
  }

  .luxury-metric-sector {
    padding: 0; /* Clear container padding; dividers span full width */
    background: hsla(32, 20%, 5%, 0.95);
    border: 1px solid hsla(40, 35%, 55%, 0.28);
    border-radius: 8px;
    overflow: hidden;
    min-width: 0;
  }

  .luxury-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3.5px 6px;
    border-bottom: 1px solid hsla(40, 35%, 55%, 0.12);
    min-width: 0;
    white-space: nowrap;
    font-size: clamp(9.5px, 2.6vw, 11px);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: hsl(40, 18%, 84%);
  }

  .luxury-metric-row:last-child {
    border-bottom: none;
  }

  .metric-label-group {
    display: flex;
    align-items: center;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
  }

  .metric-label-group span {
    font-size: inherit;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .luxury-metric-row strong {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(10.5px, 2.9vw, 12.5px);
    font-weight: 700;
    margin-left: 4px;
    flex-shrink: 0;
    white-space: nowrap;
    letter-spacing: -0.02em;
  }

  /* F4/F7: Seamless Responsive Board / Mobile Keypad Toggle (< 768px) */
  .roulette-board-section {
    display: none !important;
  }

  .mobile-keypad-section {
    display: flex !important;
  }

  .roulette-zero-col {
    width: 100%;
    height: 48px;
    min-height: 48px;
  }

  .roulette-zero-col .board-num-btn {
    width: 100%;
    height: 100%;
    min-height: 48px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 800;
    display: grid;
    place-items: center;
  }

  .roulette-numbers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(12, 1fr);
    gap: 6px;
    width: 100%;
  }

  .board-row {
    display: contents;
  }

  .board-num-btn[data-num="1"] { order: 1; }
  .board-num-btn[data-num="2"] { order: 2; }
  .board-num-btn[data-num="3"] { order: 3; }
  .board-num-btn[data-num="4"] { order: 4; }
  .board-num-btn[data-num="5"] { order: 5; }
  .board-num-btn[data-num="6"] { order: 6; }
  .board-num-btn[data-num="7"] { order: 7; }
  .board-num-btn[data-num="8"] { order: 8; }
  .board-num-btn[data-num="9"] { order: 9; }
  .board-num-btn[data-num="10"] { order: 10; }
  .board-num-btn[data-num="11"] { order: 11; }
  .board-num-btn[data-num="12"] { order: 12; }
  .board-num-btn[data-num="13"] { order: 13; }
  .board-num-btn[data-num="14"] { order: 14; }
  .board-num-btn[data-num="15"] { order: 15; }
  .board-num-btn[data-num="16"] { order: 16; }
  .board-num-btn[data-num="17"] { order: 17; }
  .board-num-btn[data-num="18"] { order: 18; }
  .board-num-btn[data-num="19"] { order: 19; }
  .board-num-btn[data-num="20"] { order: 20; }
  .board-num-btn[data-num="21"] { order: 21; }
  .board-num-btn[data-num="22"] { order: 22; }
  .board-num-btn[data-num="23"] { order: 23; }
  .board-num-btn[data-num="24"] { order: 24; }
  .board-num-btn[data-num="25"] { order: 25; }
  .board-num-btn[data-num="26"] { order: 26; }
  .board-num-btn[data-num="27"] { order: 27; }
  .board-num-btn[data-num="28"] { order: 28; }
  .board-num-btn[data-num="29"] { order: 29; }
  .board-num-btn[data-num="30"] { order: 30; }
  .board-num-btn[data-num="31"] { order: 31; }
  .board-num-btn[data-num="32"] { order: 32; }
  .board-num-btn[data-num="33"] { order: 33; }
  .board-num-btn[data-num="34"] { order: 34; }
  .board-num-btn[data-num="35"] { order: 35; }
  .board-num-btn[data-num="36"] { order: 36; }

  .board-num-btn {
    min-height: 48px;
    height: 48px;
    min-width: 44px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    touch-action: manipulation;
  }

  /* F10: Slide-Up Bottom Sheet Modal for Settings */
  .settings-popover-card,
  .settings-drawer {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    border-radius: 20px 20px 0 0;
    border: 1px solid var(--gold-glow);
    border-bottom: none;
    background: hsla(32, 14%, 8%, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.9), 0 0 24px hsla(40, 85%, 58%, 0.15);
    padding: 16px 20px 32px;
    z-index: 1000;
    max-height: 85dvh;
    overflow-y: auto;
    animation: slideUpBottomSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .settings-popover-card::before,
  .settings-drawer::before {
    content: '';
    display: block;
    width: 38px;
    height: 4px;
    background: hsla(40, 30%, 70%, 0.35);
    border-radius: 2px;
    margin: 0 auto 12px;
  }

  /* Dropdowns as Bottom Sheet on Mobile */
  .dropdown-menu {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    border-radius: 18px 18px 0 0;
    border: 1px solid var(--border-subtle);
    border-bottom: none;
    background: hsla(32, 14%, 8%, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9);
    max-height: 60dvh;
    overflow-y: auto;
    padding: 14px 16px 28px;
    z-index: 1100;
    animation: slideUpBottomSheet 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .dropdown-menu::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: hsla(40, 30%, 70%, 0.3);
    border-radius: 2px;
    margin: 0 auto 12px;
  }

  .dropdown-item {
    min-height: 44px;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
  }

  .modal-box {
    width: 94vw;
    margin: 12px;
  }

  .win-premium-card {
    padding: 24px 20px;
    width: 90vw;
  }

  .win-title {
    font-size: 26px;
  }

  .win-amount {
    font-size: 32px;
  }
}

/* 3. MOBILE LANDSCAPE VIEWPORTS (max-height: 500px) */
@media (max-height: 500px) {
  .app-container {
    display: grid;
    grid-template-columns: 48px 1fr;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .app-sidebar {
    position: static;
    width: 48px;
    height: 100%;
    flex-direction: column;
    padding: 8px 0;
  }

  .sidebar-top {
    gap: 8px;
  }

  .sidebar-nav {
    gap: 6px;
  }

  .sidebar-btn {
    width: 36px;
    height: 36px;
  }

  .terminal-main {
    display: grid;
    grid-template-rows: 44px 34px 1fr;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding-bottom: 0;
  }

  .terminal-topbar {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    min-height: 44px;
    padding: 0 12px;
  }

  .terminal-tabs-bar {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    height: 34px;
    min-height: 34px;
  }

  .terminal-toolbar {
    display: none;
  }

  .telemetry-dots-container {
    display: none;
  }

  .telemetry-cards-grid {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 8px;
    gap: 6px;
    height: 100%;
  }

  .tactical-slot-card {
    flex: 0 0 auto;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    min-height: auto;
  }

  .roulette-board-section {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
    display: flex;
    flex-direction: row;
    padding: 6px 8px;
    height: 100%;
    overflow: hidden;
  }

  .roulette-zero-col {
    width: 36px;
    height: 100%;
  }

  .roulette-zero-col .board-num-btn {
    width: 100%;
    height: 100%;
  }

  .roulette-numbers-grid {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    grid-template-columns: repeat(12, 1fr);
    gap: 3px;
    flex: 1;
  }

  .board-row {
    display: contents;
  }

  .board-num-btn {
    min-height: 0;
    height: 100%;
    font-size: 11px;
    padding: 0;
  }
}

@keyframes slideUpBottomSheet {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==========================================================================
   SPECIAL MODE MODAL & TACTICAL ADVANCED OPTIONS
   ========================================================================== */

.special-mode-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  margin-left: 4px;
}

.modal-special-mode {
  max-width: 900px !important;
  width: min(900px, 96vw) !important;
  background: hsl(32, 14%, 6%) !important;
  border: 1.5px solid hsla(40, 85%, 58%, 0.45) !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 40px hsla(40, 85%, 58%, 0.25) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}

.header-special-mode {
  background: linear-gradient(180deg, hsla(40, 85%, 58%, 0.16), hsla(40, 85%, 58%, 0.03)) !important;
  border-bottom: 1px solid hsla(40, 40%, 60%, 0.25) !important;
  padding: 20px 28px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
}

.special-mode-title-group {
  display: flex !important;
  align-items: flex-start !important;
  gap: 16px !important;
}

.special-icon {
  font-size: 32px !important;
  line-height: 1 !important;
}

.modal-special-mode .modal-title {
  font-size: clamp(20px, 2.2vw, 24px) !important;
  font-weight: 900 !important;
  color: #fff !important;
  letter-spacing: -0.01em !important;
}

.modal-special-mode .modal-subtitle {
  font: 500 15px Archivo, sans-serif !important;
  color: var(--text-dim) !important;
  margin-top: 4px !important;
}

.special-mode-modal-body {
  padding: 24px 28px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  max-height: 75vh !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: hsla(40, 85%, 58%, 0.5) hsl(32, 14%, 6%) !important;
}

.special-option-card {
  background: hsla(32, 20%, 4.5%, 0.95) !important;
  border: 1.5px solid hsla(40, 40%, 60%, 0.22) !important;
  border-radius: 14px !important;
  padding: 18px 22px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.special-option-card:hover {
  border-color: hsla(40, 85%, 58%, 0.5) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

.special-option-card.option-card-disabled {
  opacity: 0.55 !important;
  border-style: dashed !important;
  cursor: not-allowed !important;
}

.special-option-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 18px !important;
}

.option-text-block {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.option-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.option-emoji {
  font-size: 24px !important;
}

.option-title {
  font-size: 19px !important;
  font-weight: 800 !important;
  color: #fff !important;
  letter-spacing: -0.01em !important;
}

.option-badge {
  font: 900 12.5px 'JetBrains Mono', monospace !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

.badge-teal { background: hsla(180, 70%, 45%, 0.2) !important; color: hsl(180, 70%, 55%) !important; border: 1px solid hsla(180, 70%, 45%, 0.4) !important; }
.badge-gold { background: hsla(40, 85%, 58%, 0.2) !important; color: var(--gold) !important; border: 1px solid hsla(40, 85%, 58%, 0.4) !important; }
.badge-cyan { background: hsla(188, 95%, 50%, 0.2) !important; color: var(--cyan) !important; border: 1px solid hsla(188, 95%, 50%, 0.4) !important; }
.badge-dim { background: hsla(0, 0%, 100%, 0.08) !important; color: var(--text-dim) !important; border: 1px solid hsla(0, 0%, 100%, 0.14) !important; }

.option-desc {
  font: 500 16px Archivo, sans-serif !important;
  color: hsl(40, 15%, 82%) !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

.option-desc strong {
  color: var(--gold) !important;
  font-weight: 900 !important;
}

/* Tactical Toggle Switch - Large & Tactile */
.tactical-switch {
  position: relative !important;
  display: inline-block !important;
  width: 58px !important;
  height: 32px !important;
  flex-shrink: 0 !important;
}

.tactical-switch input {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

.tactical-slider {
  position: absolute !important;
  cursor: pointer !important;
  inset: 0 !important;
  background-color: hsl(32, 10%, 16%) !important;
  border: 1.5px solid hsla(40, 40%, 60%, 0.35) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border-radius: 32px !important;
}

.tactical-slider:before {
  position: absolute !important;
  content: "" !important;
  height: 24px !important;
  width: 24px !important;
  left: 3px !important;
  bottom: 2.5px !important;
  background-color: hsl(40, 20%, 68%) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6) !important;
}

.tactical-switch input:checked + .tactical-slider {
  background-color: hsla(40, 85%, 58%, 0.35) !important;
  border-color: var(--gold) !important;
}

.tactical-switch input:checked + .tactical-slider:before {
  transform: translateX(26px) !important;
  background-color: var(--gold) !important;
  box-shadow: 0 0 14px hsla(40, 85%, 58%, 0.95) !important;
}

.switch-disabled {
  pointer-events: none !important;
  opacity: 0.4 !important;
}

/* Suboptions box for 1 digit vs 2 digits */
.special-suboption-box {
  background: hsla(32, 15%, 7%, 0.95) !important;
  border: 1.5px solid hsla(40, 40%, 60%, 0.2) !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  transition: opacity 0.2s ease !important;
}

.suboption-title {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--text-dim) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
}

.numpad-mode-selector {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
}

.mode-select-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
  padding: 14px 16px !important;
  background: hsl(32, 10%, 10%) !important;
  border: 1.5px solid hsla(40, 40%, 60%, 0.22) !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-align: left !important;
}

.mode-select-btn:hover {
  border-color: hsla(40, 85%, 58%, 0.45) !important;
  background: hsla(40, 85%, 58%, 0.08) !important;
}

.mode-select-btn.active {
  border-color: var(--gold) !important;
  background: hsla(40, 85%, 58%, 0.18) !important;
  box-shadow: 0 0 16px hsla(40, 85%, 58%, 0.3), inset 0 1px 0 hsla(40, 85%, 58%, 0.4) !important;
}

.mode-btn-title {
  font: 900 16.5px Archivo, sans-serif !important;
  color: #fff !important;
}

.mode-select-btn.active .mode-btn-title {
  color: var(--gold) !important;
}

.mode-btn-desc {
  font: 500 14px Archivo, sans-serif !important;
  color: var(--text-dim) !important;
  line-height: 1.4 !important;
}

.special-modal-footer {
  padding: 18px 28px !important;
  background: hsl(32, 15%, 5%) !important;
  border-top: 1px solid hsla(40, 40%, 60%, 0.2) !important;
  display: flex !important;
  justify-content: flex-end !important;
}

.btn-save-special {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 36px !important;
  height: 52px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, hsl(38, 90%, 50%), hsl(42, 95%, 60%)) !important;
  border: none !important;
  color: #000 !important;
  font: 900 16px 'JetBrains Mono', monospace !important;
  letter-spacing: 0.04em !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 18px hsla(40, 85%, 58%, 0.5) !important;
}

.btn-save-special:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 26px hsla(40, 85%, 58%, 0.7) !important;
}

/* Center Screen Numpad Typing HUD (Desktop 2-Digit Entry) */
.numpad-typing-hud {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 99999 !important;
  pointer-events: none !important;
  animation: hudCenterPop 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes hudCenterPop {
  from { transform: translate(-50%, -50%) scale(0.85); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.numpad-typing-hud .hud-inner {
  background: hsla(32, 16%, 7%, 0.94) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 2px solid var(--gold) !important;
  border-radius: 18px !important;
  padding: 24px 36px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 320px !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.9), 0 0 45px hsla(40, 85%, 58%, 0.45), inset 0 1px 0 rgba(255,255,255,0.15) !important;
  text-align: center !important;
}

.hud-header-label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: var(--gold) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

.hud-display-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 80px !important;
}

.hud-display-row .hud-value {
  font: 900 76px 'JetBrains Mono', monospace !important;
  color: #ffffff !important;
  line-height: 1 !important;
  letter-spacing: 2px !important;
  text-shadow: 0 0 30px hsla(40, 85%, 58%, 0.75), 0 4px 12px rgba(0,0,0,0.8) !important;
  min-width: 100px !important;
  text-align: center !important;
}

.hud-preview-badge-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 32px !important;
}

.hud-badge-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 5px 14px !important;
  border-radius: 20px !important;
  background: hsla(0, 0%, 100%, 0.08) !important;
  border: 1px solid hsla(40, 85%, 58%, 0.35) !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: #fff !important;
}

.hud-badge-pill.badge-pill-red {
  background: hsla(0, 75%, 45%, 0.3) !important;
  border-color: hsl(0, 75%, 55%) !important;
  color: #ff9999 !important;
}

.hud-badge-pill.badge-pill-black {
  background: hsla(240, 10%, 18%, 0.7) !important;
  border-color: hsla(0, 0%, 50%, 0.5) !important;
  color: #e0e0e0 !important;
}

.hud-badge-pill.badge-pill-green {
  background: hsla(145, 70%, 35%, 0.35) !important;
  border-color: hsl(145, 70%, 45%) !important;
  color: #70ffaa !important;
}

.hud-badge-pill.badge-pill-target {
  background: linear-gradient(135deg, hsla(40, 90%, 50%, 0.35), hsla(18, 90%, 50%, 0.25)) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  box-shadow: 0 0 16px hsla(40, 85%, 58%, 0.4) !important;
  animation: hudTargetPulse 1.2s infinite ease-in-out !important;
}

@keyframes hudTargetPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.hud-badge-dot {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  display: inline-block !important;
}

.hud-badge-dot.dot-red { background: #ff4d4d !important; box-shadow: 0 0 8px #ff4d4d !important; }
.hud-badge-dot.dot-black { background: #888888 !important; border: 1px solid #ffffff !important; }
.hud-badge-dot.dot-green { background: #00e676 !important; box-shadow: 0 0 8px #00e676 !important; }

.hud-instructions-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin-top: 6px !important;
  flex-wrap: wrap !important;
}

.hud-key-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 11px !important;
  color: var(--text-dim) !important;
  letter-spacing: 0.04em !important;
}

.hud-key-pill kbd {
  background: hsl(32, 12%, 14%) !important;
  border: 1px solid hsla(40, 40%, 60%, 0.4) !important;
  border-radius: 5px !important;
  padding: 3px 7px !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  color: var(--gold) !important;
  box-shadow: 0 2px 0 rgba(0,0,0,0.6) !important;
}

/* Single Number Drought Config Sub-option in Modal */
.single-number-config-row {
  display: grid !important;
  grid-template-columns: 1fr 1.4fr !important;
  gap: 16px !important;
  align-items: center !important;
}
@media (max-width: 600px) {
  .single-number-config-row {
    grid-template-columns: 1fr !important;
  }
}
.single-number-input-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
.single-number-label {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: var(--text-dim) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}
.single-number-input-wrap {
  display: flex !important;
  align-items: center !important;
  background: hsl(32, 10%, 10%) !important;
  border: 1.5px solid hsla(40, 40%, 60%, 0.35) !important;
  border-radius: 10px !important;
  padding: 0 14px !important;
  gap: 8px !important;
}
.single-number-input {
  width: 100% !important;
  height: 50px !important;
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  outline: none !important;
}
.single-number-suffix {
  color: var(--gold) !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  text-transform: uppercase !important;
}
.single-number-info-card {
  background: hsl(32, 12%, 5%) !important;
  border: 1.5px solid hsla(40, 40%, 60%, 0.25) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}
.sn-info-title {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  color: var(--gold) !important;
  letter-spacing: 0.05em !important;
}
.sn-info-desc {
  font-size: 12px !important;
  color: hsl(40, 15%, 80%) !important;
  line-height: 1.4 !important;
}
.sn-info-desc strong {
  color: #fff !important;
}

/* Menos 7 (-7) Tactical Sizing & Banner */
.menos7-config-grid {
  display: grid !important;
  grid-template-columns: 1fr 1.3fr !important;
  gap: 16px !important;
  align-items: center !important;
}
@media (max-width: 600px) {
  .menos7-config-grid {
    grid-template-columns: 1fr !important;
  }
}
.menos7-input-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
.menos7-input-label {
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: var(--text-dim) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}
.menos7-input-wrap {
  display: flex !important;
  align-items: center !important;
  background: hsl(32, 10%, 10%) !important;
  border: 1.5px solid hsla(40, 40%, 60%, 0.35) !important;
  border-radius: 10px !important;
  padding: 0 14px !important;
}
.menos7-currency-prefix {
  color: var(--gold) !important;
  font-weight: 900 !important;
  font-size: 22px !important;
  margin-right: 6px !important;
}
.menos7-input {
  width: 100% !important;
  height: 50px !important;
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  outline: none !important;
}
.menos7-metrics-preview {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px 14px !important;
  background: hsl(32, 12%, 5%) !important;
  border: 1.5px solid hsla(40, 40%, 60%, 0.2) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
}
.menos7-metric-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}
.m7-label {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--text-dim) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}
.m7-val {
  font-size: 18px !important;
  font-weight: 900 !important;
  color: hsl(40, 15%, 90%) !important;
}

.menos7-activation-banner {
  background: linear-gradient(135deg, hsla(38, 90%, 50%, 0.22), hsla(18, 90%, 50%, 0.15));
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  box-shadow: 0 0 14px hsla(40, 85%, 58%, 0.35);
  animation: menos7Pulse 2s infinite ease-in-out;
  margin-top: 2px;
}
@keyframes menos7Pulse {
  0%, 100% { border-color: var(--gold); box-shadow: 0 0 10px hsla(40, 85%, 58%, 0.35); }
  50% { border-color: hsl(42, 100%, 65%); box-shadow: 0 0 18px hsla(40, 95%, 58%, 0.6); }
}
.menos7-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.menos7-tag {
  font-size: 11px;
  font-weight: 900;
  color: #000;
  background: var(--gold);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.menos7-fichas-val {
  font-size: 13px;
  color: var(--gold);
  font-weight: 900;
}
.menos7-banner-desc {
  font-size: 11px;
  color: hsl(40, 15%, 85%);
}
.menos7-banner-desc strong {
  color: #fff;
}

/* Pre-Attack Chip Badge and Level 7 Notice Banner */
.board-chip-preattack {
  background: linear-gradient(135deg, hsl(188, 95%, 45%), hsl(188, 95%, 60%)) !important;
  color: #000000 !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 14px hsla(188, 95%, 50%, 0.85), inset 0 1px 2px rgba(255, 255, 255, 0.8) !important;
}

.board-chip-preattack .board-chip-val {
  color: #000000 !important;
  text-shadow: none !important;
}

.level7-duplicate-banner {
  background: hsla(40, 85%, 58%, 0.12);
  border: 1px solid hsla(40, 85%, 58%, 0.4);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--gold);
  text-align: center;
  margin-top: 2px;
  animation: bannerPulse 2s infinite ease-in-out;
}

@keyframes bannerPulse {
  0%, 100% { border-color: hsla(40, 85%, 58%, 0.4); }
  50% { border-color: var(--gold); box-shadow: 0 0 8px hsla(40, 85%, 58%, 0.3); }
}

/* ==========================================================================
   PRE-ATAQUE TACTICAL PULSE & ENLARGED GLOWING BANNER (CARD 3)
   ========================================================================== */
@keyframes luxuryPreAttackPulse {
  0% {
    border-color: hsla(188, 95%, 50%, 0.7);
    box-shadow: 0 0 24px hsla(188, 95%, 50%, 0.35), inset 0 0 20px hsla(188, 95%, 50%, 0.12);
  }
  50% {
    border-color: hsl(188, 100%, 65%);
    box-shadow: 0 0 50px hsla(188, 100%, 55%, 0.8), inset 0 0 35px hsla(188, 95%, 50%, 0.28);
  }
  100% {
    border-color: hsla(188, 95%, 50%, 0.7);
    box-shadow: 0 0 24px hsla(188, 95%, 50%, 0.35), inset 0 0 20px hsla(188, 95%, 50%, 0.12);
  }
}

.tactical-slot-card.card-preattack-active {
  border: 2px solid var(--cyan) !important;
  background: radial-gradient(circle at 50% 10%, hsla(188, 95%, 50%, 0.22), hsl(32, 16%, 5%) 85%) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.8), 0 0 40px hsla(188, 95%, 50%, 0.55) !important;
  animation: luxuryPreAttackPulse 2.2s infinite ease-in-out !important;
}

.preattack-banner-box {
  background: linear-gradient(135deg, hsla(188, 95%, 50%, 0.28), hsla(188, 95%, 35%, 0.16)) !important;
  border: 2px solid hsl(188, 100%, 60%) !important;
  border-radius: 10px !important;
  padding: 6px 12px !important;
  width: 100% !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 3px !important;
  height: 56px !important;
  min-height: 56px !important;
  box-sizing: border-box !important;
  box-shadow: 0 0 26px hsla(188, 95%, 50%, 0.55), inset 0 0 16px hsla(188, 95%, 50%, 0.25) !important;
  animation: preAttackBannerGlow 2s infinite ease-in-out !important;
}

@keyframes preAttackBannerGlow {
  0%, 100% {
    border-color: var(--cyan);
    box-shadow: 0 0 20px hsla(188, 95%, 50%, 0.5);
  }
  50% {
    border-color: hsl(188, 100%, 75%);
    box-shadow: 0 0 35px hsla(188, 100%, 60%, 0.85), inset 0 0 20px hsla(188, 95%, 50%, 0.35);
  }
}

.preattack-banner-title {
  font: 900 clamp(12px, 1.1vw, 14px) 'JetBrains Mono', monospace !important;
  letter-spacing: 0.08em !important;
  color: var(--cyan) !important;
  text-transform: uppercase !important;
  text-shadow: 0 0 12px hsla(188, 95%, 50%, 0.85) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

.preattack-banner-desc {
  font: 800 clamp(12.5px, 1.15vw, 14.5px) 'JetBrains Mono', monospace !important;
  color: #fff !important;
  letter-spacing: 0.01em !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

.preattack-banner-desc strong {
  color: var(--gold) !important;
  font-size: clamp(13.5px, 1.25vw, 16px) !important;
  text-shadow: 0 0 12px hsla(40, 85%, 58%, 0.95) !important;
}
