:root {
  --card-width: clamp(52px, 11.2vw, 108px);
  --card-height: calc(var(--card-width) * 1.44);
  --card-radius: calc(var(--card-width) * 0.09);
  --card-font-size: calc(var(--card-width) * 0.24);
  --card-suit-size: calc(var(--card-width) * 0.22);
  --center-pip-size: calc(var(--card-width) * 0.46);

  --gold-primary: #ffd700;
  --gold-accent: #ffb703;
  --gold-metallic: linear-gradient(135deg, #ffe082 0%, #b78103 40%, #ffecb3 70%, #d4af37 100%);
  --neon-pink: #ff1361;
  --neon-red: #ff0055;
  --neon-crimson: #e11d48;
  --neon-glow: 0 0 12px rgba(255, 0, 85, 0.7), 0 0 25px rgba(255, 19, 97, 0.4);

  --font-serif: 'Cinzel', serif;
  --font-display: 'Playfair Display', serif;
  --font-sans: 'Outfit', sans-serif;
  --font-quote: 'Cormorant Garamond', 'Playfair Display', serif;
}

/* === THEMES === */
/* 1. Amsterdam Red Light / Boudoir Velvet */
body.theme-redlight {
  --bg-gradient: radial-gradient(circle at 50% 15%, #420613 0%, #22020a 50%, #0b0103 100%);
  --felt-overlay: radial-gradient(ellipse at center, rgba(255, 0, 85, 0.08) 0%, rgba(0, 0, 0, 0.6) 100%);
  --slot-bg: rgba(18, 2, 6, 0.75);
  --slot-border: rgba(255, 215, 0, 0.35);
  --header-bg: rgba(16, 2, 5, 0.94);
  --header-border: rgba(255, 0, 85, 0.35);
  --accent-neon: #ff0055;
  --card-red: #ff1744;
  --card-red-glow: 0 0 10px rgba(255, 23, 68, 0.65);
  --card-black: #181822;
}

/* 2. Bourbon Noir & Gilded Velvet */
body.theme-bourbon {
  --bg-gradient: radial-gradient(circle at 50% 20%, #45220c 0%, #241005 55%, #0d0501 100%);
  --felt-overlay: radial-gradient(ellipse at center, rgba(255, 183, 3, 0.08) 0%, rgba(0, 0, 0, 0.65) 100%);
  --slot-bg: rgba(18, 8, 3, 0.75);
  --slot-border: rgba(255, 215, 0, 0.35);
  --header-bg: rgba(22, 10, 4, 0.94);
  --header-border: rgba(255, 183, 3, 0.3);
  --accent-neon: #fbbf24;
  --card-red: #ea580c;
  --card-red-glow: 0 0 8px rgba(234, 88, 12, 0.5);
  --card-black: #18181b;
}

/* 3. Moulin Rouge Violette */
body.theme-purple {
  --bg-gradient: radial-gradient(circle at 50% 20%, #2c0836 0%, #17031d 55%, #08000a 100%);
  --felt-overlay: radial-gradient(ellipse at center, rgba(236, 72, 153, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
  --slot-bg: rgba(18, 2, 24, 0.75);
  --slot-border: rgba(244, 114, 182, 0.3);
  --header-bg: rgba(19, 3, 25, 0.94);
  --header-border: rgba(236, 72, 153, 0.3);
  --accent-neon: #ec4899;
  --card-red: #f43f5e;
  --card-red-glow: 0 0 8px rgba(244, 63, 94, 0.6);
  --card-black: #0f172a;
}

/* 4. Monte Carlo High Roller Felt */
body.theme-green {
  --bg-gradient: radial-gradient(circle at 50% 20%, #0d381e 0%, #062111 55%, #020c06 100%);
  --felt-overlay: radial-gradient(ellipse at center, rgba(52, 211, 153, 0.06) 0%, rgba(0, 0, 0, 0.65) 100%);
  --slot-bg: rgba(2, 18, 9, 0.75);
  --slot-border: rgba(255, 215, 0, 0.3);
  --header-bg: rgba(4, 24, 12, 0.94);
  --header-border: rgba(255, 215, 0, 0.25);
  --accent-neon: #34d399;
  --card-red: #ef4444;
  --card-red-glow: 0 0 8px rgba(239, 68, 68, 0.5);
  --card-black: #111827;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #0e0205;
  background: #0e0205;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  min-height: -webkit-fill-available;
  min-height: 100dvh;
  overflow: hidden;
  font-family: var(--font-sans);
  background-color: #0e0205;
  background: var(--bg-gradient);
  color: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

/* Universal Visibility Utility */
.hidden {
  display: none !important;
}

/* Exclusive Game Mode Partitioning (Strict Single Game at a Time) */
body.mode-breaker #game-board,
body.mode-breaker .felt-watermark,
body.mode-breaker .stock-deals-badge,
body.mode-breaker #autocomplete-banner {
  display: none !important;
}

body:not(.mode-breaker) #breaker-container {
  display: none !important;
}

/* Smoke & Fog Particle Canvas */
.smoke-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.75;
  mix-blend-mode: screen;
}

/* Ambient Mouse Felt Spotlight Glow - High FPS GPU Transform */
.cursor-felt-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 680px;
  height: 680px;
  margin-top: -340px;
  margin-left: -340px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.95;
  background: radial-gradient(
    circle closest-side,
    rgba(255, 0, 85, 0.22) 0%,
    rgba(255, 215, 0, 0.11) 35%,
    rgba(255, 0, 85, 0.04) 70%,
    transparent 100%
  );
  mix-blend-mode: screen;
  will-change: transform;
  transform: translate3d(-9999px, -9999px, 0);
  transition: opacity 0.2s ease;
}

/* Subliminal Flash Screen */
.subliminal-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 900;
  letter-spacing: 0.28em;
  color: rgba(255, 0, 85, 0.28);
  text-shadow: 0 0 35px rgba(255, 0, 85, 0.9), 0 0 70px rgba(255, 215, 0, 0.5);
  opacity: 0;
  transition: opacity 0.08s ease;
}

.subliminal-flash.active {
  opacity: 1;
}

/* Top App Header & HUD */
.app-header {
  height: 66px;
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--header-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.6rem;
  z-index: 100;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), inset 0 -1px 0 rgba(255, 215, 0, 0.18);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.neon-sign {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.neon-flicker {
  font-family: var(--font-serif);
  font-size: 1.42rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #ffffff;
  text-shadow: 
    0 0 4px #fff,
    0 0 10px #ff0055,
    0 0 20px #ff0055,
    0 0 40px #ff0055,
    0 0 80px #ff0055;
  animation: neonHum 4.5s infinite alternate;
}

@keyframes neonHum {
  0%, 100% { opacity: 1; }
  82% { opacity: 1; }
  83% { opacity: 0.82; }
  84% { opacity: 1; }
  94% { opacity: 0.92; }
  95% { opacity: 1; }
}

.neon-sub {
  font-size: 0.58rem;
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: 0.28em;
  color: var(--gold-primary);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  margin-top: 3px;
}

.lipstick-stamp {
  font-size: 1.45rem;
  transform: rotate(-12deg);
  filter: drop-shadow(0 0 8px rgba(255, 0, 85, 0.75));
  animation: kissPulse 2s infinite alternate ease-in-out;
  cursor: pointer;
}

@keyframes kissPulse {
  from { transform: rotate(-12deg) scale(1); }
  to { transform: rotate(-8deg) scale(1.15); }
}

/* Whisper Ticker */
.whisper-ticker {
  flex: 1;
  max-width: 340px;
  margin: 0 1.2rem;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}

.whisper-quote {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: #ff99bb;
  text-shadow: 0 0 12px rgba(255, 0, 85, 0.55);
  animation: quoteFade 0.3s ease;
  display: inline-block;
}

/* Stats HUD */
.stats-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.3rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
  min-width: 74px;
}

.stat-label {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
}

.stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.stat-value.gold-text {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.55);
}

/* Controls */
.controls-area {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0.48rem 0.9rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  letter-spacing: 0.03em;
}

/* PANIC BUTTON (Boss Key) */
.btn-panic {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: panicStrobe 1.5s infinite alternate ease-in-out;
}

.btn-panic:hover {
  filter: brightness(1.2);
  transform: scale(1.04);
  box-shadow: 0 0 25px rgba(220, 38, 38, 0.9);
}

@keyframes panicStrobe {
  0% { box-shadow: 0 0 10px rgba(220, 38, 38, 0.4); }
  100% { box-shadow: 0 0 22px rgba(220, 38, 38, 0.9), 0 0 35px rgba(255, 0, 85, 0.65); }
}

.btn-action {
  background: rgba(255, 215, 0, 0.08);
  color: #f3f4f6;
  border: 1px solid rgba(255, 215, 0, 0.25);
}

.btn-action:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.3);
  transform: translateY(-1px);
}

.btn-action:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, #ff0055 0%, #b8003a 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(255, 0, 85, 0.5);
}

.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 6px 22px rgba(255, 0, 85, 0.7), 0 0 15px rgba(255, 0, 85, 0.45);
  transform: translateY(-1px);
}

.btn-icon {
  background: rgba(255, 215, 0, 0.08);
  color: #ffd700;
  padding: 0.5rem;
  border: 1px solid rgba(255, 215, 0, 0.22);
  border-radius: 8px;
}

.btn-icon:hover {
  background: rgba(255, 215, 0, 0.2);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
}

/* Board Container */
.board-container {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.2rem 1rem 1.8rem;
  position: relative;
  z-index: 10;
  perspective: 1200px;
}

/* Classy Silhouette Felt Watermark Mural */
.felt-watermark {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  width: 88%;
  max-width: 720px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.88;
}

.felt-mural-svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(255, 0, 85, 0.5));
}

.game-board {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

/* Top Row Layout */
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.stock-waste-group {
  display: flex;
  gap: calc(var(--card-width) * 0.2);
}

.foundations-group {
  display: flex;
  gap: calc(var(--card-width) * 0.2);
}

/* Lounge Center Crest */
.lounge-crest {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  opacity: 0.65;
  pointer-events: none;
}

.crest-line {
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
}

.crest-title {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.45);
}

/* Slots & Placeholders */
.pile-slot {
  position: relative;
  width: var(--card-width);
  height: var(--card-height);
  border-radius: var(--card-radius);
  transition: transform 0.2s ease;
}

.slot-placeholder {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  background: var(--slot-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.8);
}

/* Scalloped French Lace Embroidery Border */
.scalloped-lace {
  border: 2px dashed rgba(255, 215, 0, 0.35);
  box-shadow: 
    inset 0 0 14px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 0, 85, 0.25),
    0 0 8px rgba(255, 215, 0, 0.15);
}

.stock-gold-icon {
  font-size: calc(var(--card-width) * 0.32);
  color: var(--gold-primary);
  opacity: 0.8;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.55);
}

.stock-label {
  font-family: var(--font-serif);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #ff99bb;
  opacity: 0.9;
  margin-top: 2px;
}

.foundation-mark {
  font-size: calc(var(--card-width) * 0.45);
  color: rgba(255, 215, 0, 0.4);
  font-weight: bold;
}

.foundation-mark.heart,
.foundation-mark.diamond {
  color: rgba(255, 0, 85, 0.5);
  text-shadow: 0 0 10px rgba(255, 0, 85, 0.45);
}

/* Tableau Grid */
.tableau-group {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: calc(var(--card-width) * 0.2);
  width: 100%;
}

.tableau-col {
  position: relative;
  width: var(--card-width);
  min-height: calc(var(--card-height) * 3.4);
  margin: 0 auto;
  border-radius: var(--card-radius);
  transition: all 0.2s ease;
}

.tableau-col .slot-placeholder {
  height: var(--card-height);
}

.tableau-empty span {
  font-family: var(--font-serif);
  font-size: calc(var(--card-width) * 0.38);
  font-weight: 800;
  color: rgba(255, 215, 0, 0.25);
}

/* Magnetic Drop Target Highlights: ONLY highlight the exact landing card or placeholder slot, NEVER the whole column! */
.pile-slot.highlight-target .slot-placeholder,
.slot-placeholder.highlight-target {
  background: rgba(255, 0, 85, 0.28) !important;
  box-shadow: 
    0 0 24px rgba(255, 0, 85, 0.95),
    0 0 45px rgba(255, 215, 0, 0.55),
    inset 0 0 16px rgba(255, 0, 85, 0.65) !important;
  border-color: #ffd700 !important;
  transform: scale(1.04);
}

.card.highlight-target {
  border-color: #ffd700 !important;
  box-shadow: 
    0 0 26px rgba(255, 0, 85, 0.95),
    0 0 16px rgba(255, 215, 0, 0.85),
    inset 0 0 0 2px #ffd700 !important;
  transform: translateY(-3px) scale(1.03);
  z-index: 85 !important;
}

/* Pile Card Container */
.pile-cards {
  position: relative;
  width: 100%;
  height: 100%;
}

/* === CARD STYLING === */
.card {
  position: absolute;
  width: var(--card-width);
  height: var(--card-height);
  border-radius: var(--card-radius);
  background-color: #fdfbf7;
  box-shadow: 
    0 5px 14px rgba(0, 0, 0, 0.55),
    0 1px 4px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 215, 0, 0.4);
  border: 1px solid rgba(0, 0, 0, 0.3);
  cursor: pointer;
  touch-action: none;
  transition: transform 0.24s cubic-bezier(0.18, 0.89, 0.32, 1.28), box-shadow 0.22s ease;
  will-change: transform, left, top;
  overflow: hidden;
}

/* === FIX: SILKY CARD HOVER (NO STACK BLOCKING) === */
/* 1. Only the exposed bottom-most card in any pile, waste, or foundation lifts gently */
.pile-cards > .card:last-child:hover:not(.is-facedown):not(.is-dragging),
.waste-slot .card:hover:not(.is-facedown):not(.is-dragging),
.foundation-slot .card:hover:not(.is-facedown):not(.is-dragging) {
  transform: translateY(-4px);
  box-shadow: 
    0 10px 24px rgba(0, 0, 0, 0.6),
    0 0 18px rgba(255, 0, 85, 0.45),
    0 0 10px rgba(255, 215, 0, 0.45);
}

/* 2. Tableau cards that have other cards below them highlight with a glowing border & sheen, NEVER jumping z-index or covering cards beneath */
.tableau-col .card:not(:last-child):hover:not(.is-facedown):not(.is-dragging) {
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.45),
    0 0 14px rgba(255, 215, 0, 0.7),
    0 0 8px rgba(255, 0, 85, 0.45),
    inset 0 0 0 1.5px #ffd700;
  cursor: pointer;
}

/* Running satin sheen wave */
.card:hover:not(.is-facedown):not(.is-dragging)::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 35%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 65%
  );
  transform: rotate(25deg);
  pointer-events: none;
  animation: satinSheen 0.6s ease forwards;
}

@keyframes satinSheen {
  from { transform: translateX(-100%) rotate(25deg); }
  to { transform: translateX(100%) rotate(25deg); }
}

.card.is-red {
  color: var(--card-red);
}

.card.is-black {
  color: var(--card-black);
}

.card.is-dragging {
  opacity: 0.2;
}

/* Hint Pulse Glow */
.card.hint-glow {
  animation: sexyHintPulse 1s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 70 !important;
}

@keyframes sexyHintPulse {
  0% {
    box-shadow: 
      0 0 14px #ff0055, 
      0 0 28px #ffd700;
    transform: translateY(-6px) scale(1.06);
  }
  100% {
    box-shadow: 
      0 0 32px #ff0055, 
      0 0 54px #ff0055,
      0 0 75px #ffd700;
    transform: translateY(-9px) scale(1.1);
  }
}

/* Card Face Interior */
.card-face {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  padding: calc(var(--card-width) * 0.04) calc(var(--card-width) * 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: 
    radial-gradient(circle at 50% 50%, rgba(255, 250, 240, 0.98) 0%, rgba(245, 235, 218, 0.98) 100%);
  border: 1px solid rgba(255, 215, 0, 0.45);
}

.corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.92;
  width: fit-content;
  z-index: 10;
}

.corner.bottom {
  transform: rotate(180deg);
  align-self: flex-end;
}

.corner-rank {
  font-family: var(--font-serif);
  font-size: var(--card-font-size);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.corner-suit {
  font-size: var(--card-suit-size);
  margin-top: 1px;
}

.card.is-red .corner-suit,
.card.is-red .center-suit-symbol {
  text-shadow: var(--card-red-glow);
}

.card.is-black .corner-rank,
.card.is-black .center-suit-symbol {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.card-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  width: 90%;
  height: 82%;
}

.center-suit-symbol {
  font-size: var(--center-pip-size);
}

/* Haute Couture Artwork Containers */
.court-silhouette-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.court-silhouette-svg {
  width: 92%;
  height: 92%;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
}

.ace-silhouette-svg {
  width: 96%;
  height: 96%;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
}

.card.is-red .ace-silhouette-svg {
  filter: drop-shadow(0 4px 10px rgba(217, 27, 92, 0.4));
}

.card.is-black .ace-silhouette-svg {
  filter: drop-shadow(0 4px 10px rgba(107, 33, 168, 0.4));
}

/* === CARD BACKS (French Chantilly Lace & Corset Velvet) === */
.card.is-facedown {
  cursor: default;
}

.card-back {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  border: calc(var(--card-width) * 0.055) solid #ffffff;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.65);
}

/* 1. French Chantilly Black Lace & Silk (Default) */
body.back-chantillylace .card-back {
  background-color: #120206;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(255, 0, 85, 0.25) 0%, transparent 60%),
    radial-gradient(#ffd700 15%, transparent 16%),
    radial-gradient(#ff0055 15%, transparent 16%),
    repeating-linear-gradient(45deg, rgba(255, 215, 0, 0.4) 0, rgba(255, 215, 0, 0.4) 1px, transparent 0, transparent 8px),
    repeating-linear-gradient(-45deg, rgba(255, 0, 85, 0.4) 0, rgba(255, 0, 85, 0.4) 1px, transparent 0, transparent 8px);
  background-size: 100% 100%, 14px 14px, 14px 14px, 14px 14px, 14px 14px;
  background-position: 0 0, 0 0, 7px 7px, 0 0, 0 0;
  border-color: #ffd700;
}

/* 2. Crimson Velvet Corset Lace-Up */
body.back-corsetlace .card-back {
  background-color: #3b030c;
  background-image: 
    repeating-linear-gradient(60deg, #ff0055 0, #ff0055 1.5px, transparent 0, transparent 9px),
    repeating-linear-gradient(-60deg, #ffd700 0, #ffd700 1.5px, #260107 0, #260107 9px);
  border-color: #ffd700;
}

/* 3. Gilded Gold Brocade */
body.back-goldlace .card-back {
  background-color: #190902;
  background-image: 
    repeating-linear-gradient(45deg, #ffd700 0, #ffd700 2px, transparent 0, transparent 9px),
    repeating-linear-gradient(-45deg, #b78103 0, #b78103 2px, #260a04 0, #260a04 9px);
  border-color: #ffd700;
}

/* 4. Obsidian Gold Skull & Rose */
body.back-noirskull .card-back {
  background-color: #0d0d11;
  background-image: 
    radial-gradient(#ffd700 14%, transparent 15%),
    radial-gradient(#ff1361 14%, transparent 15%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  border-color: #ff99bb;
}

/* === DRAG GHOST === */
.drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  display: none;
  will-change: transform;
}

.drag-ghost .card {
  position: absolute;
  box-shadow: 
    0 24px 48px rgba(0, 0, 0, 0.85),
    0 0 30px rgba(255, 0, 85, 0.55),
    0 0 14px rgba(255, 215, 0, 0.45) !important;
  transform: scale(1.06) rotateZ(1.2deg);
  transition: none !important;
}

/* === FLIGHT LAYER === */
.flight-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8000;
}

.flying-card {
  position: fixed;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 
    0 24px 48px rgba(0, 0, 0, 0.8),
    0 0 28px rgba(255, 0, 85, 0.55),
    0 0 14px rgba(255, 215, 0, 0.45);
  z-index: 8500;
  will-change: transform;
}

/* === AUTO COMPLETE BANNER === */
.autocomplete-banner {
  position: fixed;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 2, 8, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid #ffd700;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.8),
    0 0 25px rgba(255, 0, 85, 0.55),
    0 0 15px rgba(255, 215, 0, 0.35);
  z-index: 500;
  animation: bannerSlideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.banner-text {
  display: flex;
  flex-direction: column;
}

.banner-text strong {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: #ffd700;
}

.banner-text span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.btn-autocomplete {
  background: linear-gradient(135deg, #ffd700 0%, #ff8800 100%);
  color: #111;
  border: none;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-autocomplete:hover {
  transform: scale(1.06);
  filter: brightness(1.15);
}

@keyframes bannerSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, 25px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* === MODALS === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.modal-overlay.hidden,
.autocomplete-banner.hidden {
  display: none !important;
}

.modal-card {
  background: #180309;
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 16px;
  width: 90%;
  max-width: 460px;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(255, 0, 85, 0.45);
  overflow: hidden;
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-card.redlight-glow {
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(255, 0, 85, 0.45),
    inset 0 0 1px rgba(255, 215, 0, 0.5);
}

@keyframes modalPop {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  padding: 1.3rem 1.6rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffd700;
}

.btn-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  color: #fff;
}

.modal-body {
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.setting-info {
  display: flex;
  flex-direction: column;
}

.setting-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.setting-desc {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.55);
}

.segmented-control {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.22);
}

.seg-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.seg-btn.active {
  background: #ff0055;
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 0, 85, 0.6);
}

.dropdown-select {
  background: rgba(10, 0, 5, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.32);
  color: #ffd700;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.dropdown-select option {
  background: #180309;
  color: #fff;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 25px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 25px;
  transition: 0.25s;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.slider:before {
  position: absolute;
  content: "";
  height: 17px;
  width: 17px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.25s;
}

input:checked + .slider {
  background-color: #ff0055;
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 0, 85, 0.6);
}

input:checked + .slider:before {
  transform: translateX(21px);
}

.modal-footer {
  padding: 1.1rem 1.6rem;
  border-top: 1px solid rgba(255, 215, 0, 0.15);
  display: flex;
  justify-content: flex-end;
}

/* Jackpot Win Screen */
.win-card {
  text-align: center;
  padding: 2.4rem 2rem;
}

.jackpot-neon {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #ff0055;
  text-shadow: 
    0 0 10px #ff0055,
    0 0 25px #ff0055,
    0 0 50px #ffd700;
  animation: jackpotPulse 1.2s infinite alternate;
}

@keyframes jackpotPulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.04); filter: brightness(1.3); }
}

.gold-shimmer {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: #ffd700;
  margin-top: 0.5rem;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.win-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 1.8rem 0;
}

.win-stat-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 215, 0, 0.25);
  padding: 0.9rem 0.5rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.win-stat-box .label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.win-stat-box .value {
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
}

/* Win Canvas */
.win-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  display: none;
}

/* ==============================================
   HYPER-REALISTIC MICROSOFT EXCEL BOSS KEY DISGUISE 
   ============================================== */
.panic-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #f3f2f1;
  color: #242424;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 11px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  user-select: text;
  -webkit-user-select: text;
}

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

.excel-title-bar {
  height: 32px;
  background: #107c41;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}

.excel-logo {
  font-size: 16px;
  margin-right: 8px;
}

.excel-filename {
  flex: 1;
  text-align: center;
  opacity: 0.95;
}

.excel-window-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.excel-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
}

.excel-close-btn:hover {
  background: #c42b1c;
}

.excel-ribbon-tabs {
  height: 30px;
  background: #f3f2f1;
  border-bottom: 1px solid #e1dfdd;
  display: flex;
  align-items: center;
  padding-left: 12px;
}

.excel-ribbon-tabs .tab {
  padding: 6px 12px;
  color: #323130;
  cursor: default;
}

.excel-ribbon-tabs .tab.file {
  background: #107c41;
  color: #ffffff;
  font-weight: 600;
  border-radius: 2px 2px 0 0;
}

.excel-ribbon-tabs .tab.active {
  border-bottom: 3px solid #107c41;
  font-weight: 600;
}

.excel-formula-bar {
  height: 28px;
  background: #ffffff;
  border-bottom: 1px solid #d2d0ce;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-family: Consolas, monospace;
}

.name-box {
  width: 50px;
  border-right: 1px solid #d2d0ce;
  padding: 2px 6px;
  font-weight: 600;
  color: #323130;
}

.fx-icon {
  width: 28px;
  text-align: center;
  font-style: italic;
  font-weight: bold;
  color: #605e5c;
  font-family: serif;
}

.formula-input {
  flex: 1;
  padding-left: 8px;
  color: #201f1e;
}

.panic-exit-hint {
  font-family: "Segoe UI", sans-serif;
  font-size: 10px;
  color: #a80000;
  font-weight: 700;
  background: #fed9cc;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.excel-sheet-viewport {
  flex: 1;
  overflow: auto;
  background: #ffffff;
}

.excel-grid {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
}

.excel-grid th, .excel-grid td {
  border: 1px solid #e1dfdd;
  padding: 4px 6px;
  white-space: nowrap;
  font-size: 11px;
}

.excel-grid th {
  background: #f8f9fa;
  font-weight: 500;
  color: #605e5c;
  text-align: center;
  height: 22px;
}

.corner-header {
  width: 38px;
}

.row-num {
  background: #f8f9fa;
  text-align: center;
  color: #605e5c;
  font-weight: 500;
  width: 38px;
}

.cell.header-cell {
  background: #107c41;
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  padding: 8px;
}

.cell.col-label {
  background: #e8f5e9;
  font-weight: 700;
  color: #1b5e20;
}

.cell.num {
  text-align: right;
  font-family: Consolas, monospace;
}

.cell.positive {
  color: #0d652d;
  font-weight: 600;
}

.cell.negative {
  color: #c5221f;
  font-weight: 600;
}

.cell.bold {
  font-weight: 700;
  background: #f1f8f5;
}

.cell.status-ok {
  background: #d4edda;
  color: #155724;
  font-weight: 600;
  text-align: center;
}

.cell.status-warn {
  background: #fff3cd;
  color: #856404;
  font-weight: 600;
  text-align: center;
}

.cell.italic {
  font-style: italic;
  color: #6c757d;
}

.excel-bottom-bar {
  height: 28px;
  background: #f3f2f1;
  border-top: 1px solid #d2d0ce;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.sheet-tabs {
  display: flex;
  height: 100%;
}

.sheet-tab {
  padding: 5px 14px;
  background: #edebe9;
  border-right: 1px solid #d2d0ce;
  border-top: 2px solid transparent;
  cursor: default;
}

.sheet-tab.active {
  background: #ffffff;
  border-top: 2px solid #107c41;
  font-weight: 600;
}

.excel-status {
  font-size: 10px;
  color: #605e5c;
  letter-spacing: 0.05em;
}



/* =========================================================
   VIP GAME MODE SWITCHER & THE SIRENS' CIRCLE SALON
   ========================================================= */

/* VIP Mode Bar */
.vip-mode-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 0.45rem 1rem;
  background: rgba(14, 2, 5, 0.88);
  border-bottom: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 15;
}

.mode-label-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.mode-label {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.mode-sublabel {
  font-family: var(--font-quote);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: #ff4d79;
}

.mode-pills {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(0, 0, 0, 0.55);
  padding: 5px;
  border-radius: 26px;
  border: 1px solid rgba(255, 215, 0, 0.32);
}

.mode-pill {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.5rem 1.05rem;
  border-radius: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.mode-pill:hover {
  color: #ffd700;
  background: rgba(255, 0, 85, 0.2);
}

.mode-pill.active {
  color: #fff;
  background: linear-gradient(135deg, #ff0055 0%, #b80d39 60%, #52021c 100%);
  box-shadow: 0 0 16px rgba(255, 0, 85, 0.8), inset 0 0 0 1px #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

/* === THE SIRENS' SALON (7 VEGAS COURTESANS) - BOTTOM VIP LOUNGE === */
.sirens-salon {
  flex-shrink: 0;
  width: 100%;
  background: linear-gradient(0deg, rgba(14, 1, 5, 0.98) 0%, rgba(26, 3, 10, 0.94) 100%);
  border-top: 1px solid rgba(255, 0, 85, 0.35);
  border-bottom: none;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 215, 0, 0.25);
  position: relative;
  z-index: 50;
  padding: 0.4rem 0.8rem 0.55rem;
  overflow: visible;
}

.sirens-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 0.35rem;
}

.sirens-tag-pulse {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  color: #ff0055;
  text-shadow: 0 0 10px rgba(255, 0, 85, 0.8);
  animation: neonFlicker 3s infinite alternate;
}

.sirens-tag-sub {
  font-family: var(--font-quote);
  font-size: 0.78rem;
  font-style: italic;
  color: #ffd700;
  opacity: 0.9;
  letter-spacing: 0.08em;
}

/* Live Courtesan Dialogue Stage: On Desktop hidden so only popup bubble appears; on Mobile shown as wide short bar */
.sirens-speech-stage {
  display: none !important;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(22, 2, 9, 0.94);
  border: 1px solid rgba(255, 215, 0, 0.42);
  border-radius: 20px;
  padding: 0.35rem 0.95rem;
  margin: 0 auto 0.45rem;
  max-width: 960px;
  width: calc(100% - 1.2rem);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(255, 0, 85, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  position: relative;
  z-index: 60;
  touch-action: manipulation;
}

.sirens-speech-stage.speech-pulse {
  animation: stagePulse 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes stagePulse {
  0% { transform: scale(0.98); border-color: #ffd700; box-shadow: 0 0 20px rgba(255, 0, 85, 0.8); }
  50% { transform: scale(1.02); border-color: #ff0055; box-shadow: 0 0 25px rgba(255, 215, 0, 0.9); }
  100% { transform: scale(1); border-color: rgba(255, 215, 0, 0.42); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(255, 0, 85, 0.2); }
}

.speech-stage-speaker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.speech-stage-avatar {
  font-size: 1.1rem;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.6));
  line-height: 1;
}

.speech-stage-name {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  white-space: nowrap;
}

.speech-stage-title {
  font-family: var(--font-quote);
  font-size: 0.8rem;
  font-style: italic;
  color: #ff99bb;
  white-space: nowrap;
  opacity: 0.95;
}

.speech-stage-text {
  font-family: var(--font-quote);
  font-size: 0.98rem;
  font-style: italic;
  font-weight: 600;
  color: #fff5cc;
  text-shadow: 0 0 12px rgba(255, 0, 85, 0.5);
  letter-spacing: 0.03em;
  line-height: 1.25;
  transition: opacity 0.2s ease, text-shadow 0.3s ease;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.speech-stage-text.stage-glow {
  text-shadow: 0 0 16px #ff0055, 0 0 28px #ffd700;
  color: #ffffff;
}

.sirens-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  max-width: 1250px;
  margin: 0 auto;
  overflow: visible;
}

.siren-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(26, 3, 10, 0.78);
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 22px;
  padding: 0.32rem 0.78rem 0.32rem 0.42rem;
  cursor: pointer;
  transition: all 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
  overflow: visible;
}

.siren-card:hover {
  transform: translateY(-2px) scale(1.035);
  border-color: #ffd700;
  box-shadow: 0 4px 16px rgba(255, 0, 85, 0.5), 0 0 10px rgba(255, 215, 0, 0.45);
}

.siren-card.is-active {
  background: linear-gradient(135deg, rgba(85, 4, 28, 0.96), rgba(35, 2, 12, 0.96));
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 0, 85, 0.9), 0 0 12px rgba(255, 215, 0, 0.65);
  transform: scale(1.06);
}

.siren-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle, #52041b 0%, #170107 100%);
}

.siren-avatar-emoji {
  font-size: 16px;
}

.siren-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.siren-name {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.05em;
}

.siren-title {
  font-family: var(--font-quote);
  font-size: 0.76rem;
  font-style: italic;
  color: #ff99bb;
  white-space: nowrap;
}

/* Seductive Floating Courtesan Speech Balloon (Floats UP into open felt space) */
.siren-bubble {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px) scale(0.92);
  background: rgba(16, 1, 6, 0.98);
  border: 1px solid #ffd700;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.94), 0 0 20px rgba(255, 0, 85, 0.75);
  border-radius: 14px;
  padding: 0.75rem 1.15rem;
  min-width: 250px;
  max-width: 360px;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  filter: drop-shadow(0 0 12px rgba(255, 0, 85, 0.45));
}

.siren-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px 7px 0;
  border-style: solid;
  border-color: #ffd700 transparent transparent;
}

.siren-card.is-active .siren-bubble {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* Screen edge safety: Left cards align bubble to left, Right cards align bubble to right */
.siren-card:nth-child(1) .siren-bubble,
.siren-card:nth-child(2) .siren-bubble {
  left: 0;
  transform: translateX(0) translateY(8px) scale(0.92);
}
.siren-card:nth-child(1).is-active .siren-bubble,
.siren-card:nth-child(2).is-active .siren-bubble {
  transform: translateX(0) translateY(0) scale(1);
}
.siren-card:nth-child(1) .siren-bubble::after,
.siren-card:nth-child(2) .siren-bubble::after {
  left: 32px;
}

.siren-card:nth-child(6) .siren-bubble,
.siren-card:nth-child(7) .siren-bubble {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(8px) scale(0.92);
}
.siren-card:nth-child(6).is-active .siren-bubble,
.siren-card:nth-child(7).is-active .siren-bubble {
  transform: translateX(0) translateY(0) scale(1);
}
.siren-card:nth-child(6) .siren-bubble::after,
.siren-card:nth-child(7) .siren-bubble::after {
  left: auto;
  right: 32px;
}

.siren-bubble-text {
  font-family: var(--font-quote);
  font-size: 1.04rem;
  font-style: italic;
  font-weight: 600;
  color: #fff5cc;
  line-height: 1.34;
  text-align: center;
  display: block;
}

.siren-bubble-author {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #ff0055;
  text-align: center;
  margin-top: 4px;
  text-transform: uppercase;
}

/* === SPIDER SOLITAIRE LAYOUT === */
body.spider-mode {
  --card-width: clamp(48px, 8.4vw, 92px);
}

body.spider-mode .game-board {
  max-width: 1140px;
}

body.spider-mode .tableau-group {
  grid-template-columns: repeat(10, 1fr);
  gap: calc(var(--card-width) * 0.1);
}

body.spider-mode .tableau-col {
  min-height: calc(var(--card-height) * 3.8);
}

body.spider-mode .waste-slot {
  display: none !important;
}

body.spider-mode .stock-deals-badge {
  display: flex;
}

body:not(.spider-mode) .spider-only-col {
  display: none !important;
}

body:not(.spider-mode) .spider-only-foundation {
  display: none !important;
}

/* Stock Deals Badge for Spider Mode */
.stock-deals-badge {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 0, 85, 0.85);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 1px 7px;
  border-radius: 10px;
  border: 1px solid #ffd700;
  box-shadow: 0 0 8px rgba(255, 0, 85, 0.8);
  white-space: nowrap;
  pointer-events: none;
}

/* =========================================================
   BOUDOIR BREAKER (L'AMOUR BRISÉ) - HAUTE COUTURE BRICK BREAKER
   ========================================================= */
.breaker-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  padding: 0.3rem 0.6rem 0.6rem;
  box-sizing: border-box;
}

.breaker-container.hidden {
  display: none !important;
}

.breaker-hud {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
  width: 100%;
  z-index: 20;
}

.breaker-hud-pill {
  background: rgba(18, 2, 7, 0.92);
  border: 1px solid rgba(255, 215, 0, 0.38);
  border-radius: 18px;
  padding: 0.28rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65), inset 0 0 8px rgba(255, 0, 85, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.breaker-hud-label {
  font-family: var(--font-serif);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  color: #ff99bb;
  font-weight: 700;
  text-transform: uppercase;
}

.breaker-hud-value {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.breaker-hud-value.highlight-multiplier {
  color: #ff0055;
  text-shadow: 0 0 10px rgba(255, 0, 85, 0.8);
}

.breaker-pill-btn {
  background: linear-gradient(135deg, rgba(255, 0, 85, 0.85), rgba(139, 0, 43, 0.9));
  border: 1px solid #ffd700;
  border-radius: 18px;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(255, 0, 85, 0.6);
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.breaker-pill-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 0, 85, 0.9), 0 0 10px rgba(255, 215, 0, 0.7);
}

.breaker-stage-wrap {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 380px;
  max-height: calc(100vh - 210px);
  border-radius: 18px;
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.85),
    0 0 30px rgba(255, 0, 85, 0.35),
    inset 0 0 45px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  background: radial-gradient(circle at 50% 25%, #2a030c 0%, #140206 55%, #070002 100%);
  touch-action: none;
  cursor: ew-resize;
}

.breaker-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.breaker-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 0, 4, 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: opacity 0.3s ease;
}

.breaker-overlay.hidden {
  display: none !important;
}

.breaker-overlay-box {
  background: linear-gradient(135deg, rgba(35, 2, 13, 0.96), rgba(16, 1, 6, 0.96));
  border: 1px solid #ffd700;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.92), 0 0 32px rgba(255, 0, 85, 0.75);
  border-radius: 22px;
  padding: 1.6rem 2.2rem;
  text-align: center;
  max-width: 440px;
  width: 88%;
  box-sizing: border-box;
}

.breaker-overlay-crest {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  color: #ff0055;
  text-shadow: 0 0 10px rgba(255, 0, 85, 0.8);
  margin-bottom: 0.4rem;
}

.breaker-overlay-box h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

.breaker-overlay-box p {
  font-family: var(--font-quote);
  font-size: 0.98rem;
  font-style: italic;
  color: #fff5cc;
  margin-bottom: 1.2rem;
  line-height: 1.35;
}

.breaker-action-btn {
  padding: 0.65rem 1.8rem;
  font-size: 0.95rem;
  border-radius: 24px;
}

/* === INTERACTIVE THEATRICS & SILK ANIMATIONS === */

/* Seductive Table Felt Breathing */
.felt-watermark {
  animation: boudoirBreathe 6s ease-in-out infinite alternate;
}

@keyframes boudoirBreathe {
  0% {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(0.98);
    filter: drop-shadow(0 0 18px rgba(255, 0, 85, 0.35));
  }
  100% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.02);
    filter: drop-shadow(0 0 35px rgba(255, 0, 85, 0.65)) drop-shadow(0 0 12px rgba(255, 215, 0, 0.4));
  }
}

/* Silk Ripple on Click */
.silk-ripple-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  overflow: hidden;
}

.silk-ripple {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 215, 0, 0.6);
  box-shadow: 0 0 16px rgba(255, 0, 85, 0.5), inset 0 0 12px rgba(255, 215, 0, 0.3);
  transform: translate(-50%, -50%) scale(0.1);
  animation: silkRippleAnim 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes silkRippleAnim {
  0% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(0.1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Floating 💋 Kiss Particles */
.kiss-particles-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 120;
  overflow: hidden;
}

.floating-kiss {
  position: absolute;
  font-size: 26px;
  filter: drop-shadow(0 0 8px rgba(255, 0, 85, 0.8)) drop-shadow(0 0 14px rgba(255, 215, 0, 0.6));
  animation: floatKissAnim 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
  user-select: none;
}

@keyframes floatKissAnim {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.4) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -20px) scale(1.2) rotate(-8deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -90px) scale(1.4) rotate(14deg);
  }
}

/* Fast Combo Screen Vignette Pulse */
.combo-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 35;
  box-shadow: inset 0 0 90px rgba(255, 0, 85, 0.5), inset 0 0 45px rgba(255, 215, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.combo-vignette.active {
  opacity: 1;
}

/* Silky Button Edge Sweeps */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -100%;
  width: 60%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 100%
  );
  transform: rotate(25deg);
  transition: none;
}

.btn:hover::after {
  animation: btnSilkSweep 0.65s ease forwards;
}

@keyframes btnSilkSweep {
  from { left: -100%; }
  to { left: 200%; }
}

/* =========================================================
   RESPONSIVE MOBILE ARCHITECTURE (Zero Squish, 100% Usable)
   Placed at end of stylesheet to ensure full cascade priority
   ========================================================= */
@media (max-width: 820px) {
  :root {
    --card-width: clamp(38px, calc((100vw - 28px) / 7.3), 74px);
  }

  body.spider-mode {
    --card-width: clamp(26px, calc((100vw - 28px) / 10.3), 54px);
  }

  /* Header: 3-tier clean luxury mobile HUD with Mobile Safari notch safe-area blending */
  .app-header {
    height: auto;
    min-height: auto;
    padding-top: max(0.35rem, env(safe-area-inset-top));
    padding-left: max(0.5rem, env(safe-area-inset-left));
    padding-right: max(0.5rem, env(safe-area-inset-right));
    padding-bottom: 0.3rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
  }

  /* Row 1: Centered Neon Parisian Cabaret Title & Kiss */
  .logo-area {
    order: 1;
    width: 100%;
    justify-content: center;
    gap: 0.45rem;
  }

  .neon-flicker {
    font-size: 1.15rem;
    letter-spacing: 0.14em;
  }

  .neon-sub, .whisper-ticker, .lounge-crest, .felt-watermark {
    display: none !important;
  }

  .lipstick-stamp {
    font-size: 1.25rem;
  }

  /* Row 2: 3-Pill Full-Width Casino Stats HUD */
  .stats-bar {
    order: 2;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
    margin-top: 0;
  }

  .stat-pill {
    min-width: 0;
    padding: 0.22rem 0.3rem;
    border-radius: 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .stat-label {
    font-size: 0.52rem;
    letter-spacing: 0.08em;
  }

  .stat-value {
    font-size: 0.88rem;
  }

  /* Row 3: Full-Width 6-Column Touch Control Strip (ZERO Squish, 100% Buttons Visible) */
  .controls-area {
    order: 3;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.25rem;
    padding: 0;
    overflow: visible;
  }

  .btn {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.82rem;
    flex-shrink: 0;
    box-sizing: border-box;
  }

  .btn svg {
    width: 17px;
    height: 17px;
  }

  /* Hide button labels on compact mobile screens so icons stay centered and never squish */
  .btn .btn-label {
    display: none !important;
  }

  @media (min-width: 580px) {
    .btn .btn-label {
      display: inline-block !important;
      font-size: 0.72rem;
      margin-left: 3px;
    }
  }

  .panic-icon, .hint-sparkle, .btn-icon-sparkle {
    font-size: 16px;
    display: inline-block !important;
    line-height: 1;
  }

  .btn-panic {
    min-width: 0;
    padding: 0;
  }

  /* VIP Mode Bar: Horizontal touch scroll without squishing */
  .vip-mode-bar {
    padding: 0.28rem 0.4rem;
    gap: 0.35rem;
    justify-content: flex-start;
    overflow: hidden;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .mode-label-wrap {
    display: none;
  }

  .mode-pills {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    padding: 2px 3px;
    gap: 0.35rem;
    justify-content: flex-start;
  }

  .mode-pills::-webkit-scrollbar {
    display: none;
  }

  .mode-pill {
    flex-shrink: 0;
    padding: 0.38rem 0.75rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  /* Table / Board Area: Responsive scaling & touch comfort */
  .board-container {
    flex: 1 1 auto;
    height: auto;
    padding: 0.4rem 0.25rem 0.8rem;
    overflow-x: hidden;
  }

  .game-board {
    padding: 0 4px;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .table-top-row {
    padding: 0 2px;
  }

  .stock-waste-group,
  .foundations-group {
    gap: 3px;
  }

  body.spider-mode .foundations-group {
    gap: 2px;
  }

  .tableau-group {
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    width: 100%;
    justify-content: center;
  }

  .tableau-col {
    width: var(--card-width);
    min-width: 0;
  }

  body.spider-mode {
    --card-width: clamp(24px, calc((100vw - 26px) / 10.4), 54px);
  }

  body.spider-mode .tableau-group {
    grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
    gap: 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  body.spider-mode .tableau-col {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.spider-mode .tableau-col .card,
  body.spider-mode .tableau-col .slot-placeholder {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Modals on Mobile */
  .modal-card {
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-header {
    padding: 1rem 1.2rem;
  }

  .modal-body {
    padding: 1rem 1.2rem;
    gap: 1rem;
  }

  .modal-footer {
    padding: 0.8rem 1.2rem;
  }

  /* Sirens' Salon: Bottom touch scroll & Mobile Safari home bar safe-area blending */
  .sirens-salon {
    padding-top: 0.25rem;
    padding-bottom: max(0.45rem, env(safe-area-inset-bottom));
    padding-left: max(0.4rem, env(safe-area-inset-left));
    padding-right: max(0.4rem, env(safe-area-inset-right));
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .sirens-header {
    margin-bottom: 0.2rem;
  }

  .sirens-tag-pulse {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }

  .sirens-tag-sub {
    display: none;
  }

  /* Live Courtesan Dialogue Stage on Mobile: 100% visible, prominent, elegant wide short bar */
  .sirens-speech-stage {
    display: flex !important;
    width: calc(100% - 0.5rem);
    margin: 0 auto 0.3rem;
    padding: 0.28rem 0.65rem;
    gap: 0.45rem;
    border-radius: 14px;
    background: rgba(18, 2, 7, 0.96);
  }

  .speech-stage-avatar {
    font-size: 1rem;
  }

  .speech-stage-name {
    font-size: 0.82rem;
  }

  .speech-stage-title {
    display: none;
  }

  .speech-stage-text {
    font-size: 0.88rem;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.22;
    text-align: left;
  }

  .sirens-track {
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 0.5rem;
    gap: 0.45rem;
    justify-content: flex-start;
  }

  .sirens-track::-webkit-scrollbar {
    display: none;
  }

  .siren-card {
    flex-shrink: 0;
    padding: 0.25rem 0.55rem 0.25rem 0.3rem;
  }

  .siren-name {
    font-size: 0.78rem;
  }

  .siren-title {
    font-size: 0.65rem;
  }

  /* Completely hide individual floating bubbles on mobile so no duplicate text appears */
  .siren-bubble {
    display: none !important;
  }

  /* Breaker on mobile */
  .breaker-hud {
    gap: 0.35rem;
    margin-bottom: 0.25rem;
  }

  .breaker-hud-pill {
    padding: 0.2rem 0.5rem;
    min-width: 58px;
    border-radius: 12px;
  }

  .breaker-hud-label {
    font-size: 0.5rem;
  }

  .breaker-hud-value {
    font-size: 0.8rem;
  }

  .breaker-pill-btn {
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
  }

  .breaker-stage-wrap {
    min-height: 280px;
    max-height: calc(100dvh - 250px);
    border-radius: 14px;
  }

  .breaker-overlay-box {
    padding: 1.2rem 1.4rem;
  }

  .breaker-overlay-box h2 {
    font-size: 1.15rem;
  }

  .breaker-overlay-box p {
    font-size: 0.85rem;
    margin-bottom: 0.9rem;
  }

  /* Double-tap zoom immunity across interactive elements */
  .card, .pile-slot, .tableau-col, .stock-slot, .waste-slot,
  .btn, .mode-pill, .seg-btn, .siren-card, .sirens-speech-stage, .breaker-pill-btn, .breaker-action-btn {
    touch-action: manipulation;
  }
  .card, .breaker-canvas {
    touch-action: none;
  }
}
