/**
 * ============================================================================
 * MAIN STYLESHEET (`css/style.css`)
 * ============================================================================
 * Clear engagement photo background, translucent glass board, custom wedding
 * logo badges, Wedding Power-Ups bar, and zero emojis.
 */

/* ==========================================================================
   1. RESET & BASE DOCUMENT
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background-color: var(--color-primary-deep);
  color: var(--color-text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
  -webkit-user-select: none;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2.5px solid var(--color-secondary-light);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   2. HERO BACKGROUND PHOTO (Crisp & Visible Behind the Translucent Board)
   ========================================================================== */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(160deg, #420919 0%, #24040d 55%, #140207 100%);
}

.bg-backdrop-fill {
  position: absolute;
  inset: -24px;
  background-image: var(--bg-image-fallback);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.65);
  transform: scale(1.08);
}

.bg-photo {
  position: absolute;
  inset: 0;
  background-image: var(--bg-image-fallback);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: var(--bg-position-mobile);
  background-repeat: no-repeat;
  filter: blur(var(--bg-blur-playing));
  transition:
    filter 0.9s var(--ease-out-soft),
    transform 1.1s var(--ease-out-soft);
}

.bg-scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  opacity: 1;
  transition: opacity 0.9s var(--ease-out-soft);
}

@media (min-width: 900px) {
  .bg-photo {
    background-position: var(--bg-position-desktop);
    background-size: contain;
  }
}

body.is-photo-clear .bg-photo {
  filter: blur(0px);
}

body.is-photo-clear .bg-scrim {
  opacity: 0.08;
}

/* ==========================================================================
   3. WEDDING LOGO EMBLEMS
   ========================================================================== */
.wedding-logo-header {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #fffdf9;
  border: 1.5px solid var(--color-secondary-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.wedding-logo-hero {
  width: 138px;
  height: 138px;
  border-radius: 50%;
  object-fit: cover;
  background: #fffdf9;
  border: 3px solid var(--color-secondary-light);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 24px rgba(245, 166, 35, 0.35);
  flex-shrink: 0;
}

.wedding-logo-modal {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  background: #fffdf9;
  border: 2px solid var(--color-secondary-light);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

/* ==========================================================================
   4. APP SHELL & MOBILE-FIRST VERTICAL STACK
   ========================================================================== */
.app-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 540px;
  height: 100dvh;
  margin: 0 auto;
  padding:
    max(8px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  transition: opacity 0.45s var(--ease-out-soft);
}

body.state-revealing .hud-top,
body.state-revealing .powers-bar,
body.state-revealing .bottom-bar,
body.state-revealed .app-shell {
  opacity: 0;
  pointer-events: none;
}

.hud-top {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* ==========================================================================
   5. HEADER DATE (Wedding Logo + Progressive 150-Point Date Reveal)
   ========================================================================== */
.header-card {
  width: 100%;
  padding: 8px 12px;
  background: var(--color-surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--color-gold-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.header-couple-small {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-secondary-light);
  letter-spacing: 0.02em;
}

.hindi-blessing {
  font-family: var(--font-hindi);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

/* Header Date Wrap & Eyebrow */
.header-date-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
}

.date-header-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-secondary);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 8px rgba(245, 166, 35, 0.4);
  line-height: 1;
}

.header-date-slots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, 0.8vw, 4px);
  padding: 3px 6px;
  background: rgba(18, 3, 11, 0.55);
  border: 1px solid rgba(245, 166, 35, 0.38);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.header-date-slots.is-highlighted {
  border-color: #fff3b0;
  box-shadow: 0 0 18px rgba(245, 166, 35, 0.85), inset 0 1px 6px rgba(255, 243, 176, 0.5);
}

.header-date-slots.is-complete {
  border-color: #ffd166;
  box-shadow: 0 0 24px rgba(245, 166, 35, 0.9), inset 0 0 10px rgba(255, 243, 176, 0.6);
  animation: complete-date-pulse 2.2s infinite ease-in-out;
}

@keyframes complete-date-pulse {
  0%, 100% {
    box-shadow: 0 0 14px rgba(245, 166, 35, 0.75);
  }
  50% {
    box-shadow: 0 0 28px rgba(255, 243, 176, 0.95), 0 0 45px rgba(245, 166, 35, 0.7);
  }
}

.date-sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display), "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.15rem, 3.4vw, 1.45rem);
  font-weight: 800;
  color: var(--color-secondary);
  text-shadow: 0 0 8px rgba(245, 166, 35, 0.7), 0 1px 2px rgba(0, 0, 0, 0.8);
  padding: 0 clamp(1px, 0.4vw, 2px);
  user-select: none;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Date Slot: 3D Flip Card Architecture
   -------------------------------------------------------------------------- */
.date-slot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(23px, 5.8vw, 30px);
  height: clamp(32px, 7.8vw, 40px);
  perspective: 700px;
  -webkit-perspective: 700px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.date-slot-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.22, 1.35, 0.36, 1);
  border-radius: var(--radius-xs);
}

.date-slot-front,
.date-slot-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-sizing: border-box;
  user-select: none;
}

/* Front Face: Mysterious Royal Dash Tile (Before Reveal) */
.date-slot-front {
  background: linear-gradient(180deg, rgba(38, 7, 20, 0.85) 0%, rgba(18, 3, 10, 0.95) 100%);
  border: 1.5px solid rgba(245, 166, 35, 0.4);
  border-bottom: 2.5px solid rgba(245, 166, 35, 0.9);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.35);
  transform: rotateY(0deg);
  opacity: 1;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}

.date-slot-dash {
  font-family: var(--font-display), "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.1rem, 3.2vw, 1.35rem);
  font-weight: 700;
  color: rgba(255, 232, 166, 0.6);
  line-height: 1;
  text-shadow: 0 0 6px rgba(245, 166, 35, 0.3);
}

/* Back Face: Grand 24K Gold Foil Tile (Revealed Number) */
.date-slot-back {
  background: linear-gradient(135deg, #fff7d1 0%, #f7b733 30%, #e69d1b 65%, #a86205 100%);
  border: 2px solid #ffffff;
  box-shadow:
    0 0 14px rgba(245, 166, 35, 0.95),
    0 0 28px rgba(255, 243, 176, 0.65),
    inset 0 1px 2px rgba(255, 255, 255, 0.9),
    0 3px 8px rgba(0, 0, 0, 0.5);
  transform: rotateY(180deg);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.date-slot-num {
  font-family: var(--font-display), "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.25rem, 3.8vw, 1.55rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #1e040b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 -1px 0 rgba(0, 0, 0, 0.15);
}

/* Revealed State */
.date-slot.is-revealed .date-slot-inner {
  transform: rotateY(180deg);
}

.date-slot.is-revealed .date-slot-front {
  opacity: 0;
  pointer-events: none;
}

.date-slot.is-revealed .date-slot-back {
  opacity: 1;
  pointer-events: auto;
}

/* Pop-in Flip Celebration */
.date-slot.just-flipped {
  z-index: 20;
}

.date-slot.just-flipped .date-slot-inner {
  animation: grand-slot-pop 0.8s cubic-bezier(0.22, 1.35, 0.36, 1) forwards;
}

@keyframes grand-slot-pop {
  0% {
    transform: rotateY(0deg) scale(0.85);
  }
  45% {
    transform: rotateY(180deg) scale(1.36);
  }
  75% {
    transform: rotateY(180deg) scale(0.96);
  }
  100% {
    transform: rotateY(180deg) scale(1);
  }
}

/* Dynamic Gold Shimmer Sweep across the revealed digit */
.date-slot-shimmer {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xs);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.85) 50%,
    transparent 100%
  );
  transform: translateX(-150%);
  pointer-events: none;
  z-index: 5;
}

.date-slot.just-flipped .date-slot-shimmer {
  animation: slot-shimmer 0.75s ease-out 0.2s forwards;
}

@keyframes slot-shimmer {
  0% { transform: translateX(-150%); }
  100% { transform: translateX(150%); }
}

/* Radiant Gold Stars Burst around the newly unlocked digit */
.date-slot-sparkles {
  position: absolute;
  inset: -12px;
  pointer-events: none;
  opacity: 0;
  z-index: 25;
}

.date-slot.just-flipped .date-slot-sparkles {
  animation: sparkles-burst 0.9s ease-out forwards;
}

.date-slot-sparkles .sparkle {
  position: absolute;
  color: #fff3b0;
  text-shadow: 0 0 6px #f5a623, 0 0 12px #fff3b0;
  line-height: 1;
}

.date-slot-sparkles .s1 {
  top: -2px;
  right: -2px;
  font-size: 13px;
}

.date-slot-sparkles .s2 {
  bottom: -2px;
  left: -2px;
  font-size: 11px;
}

.date-slot-sparkles .s3 {
  top: -4px;
  left: 6px;
  font-size: 9px;
  color: #ffffff;
}

@keyframes sparkles-burst {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(0deg);
  }
  35% {
    opacity: 1;
    transform: scale(1.3) rotate(45deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.6) translateY(-14px) rotate(90deg);
  }
}

/* ==========================================================================
   6. SCOREBOARD (Semicircular Speedometer Gauge)
   ========================================================================== */
.scoreboard-card {
  position: relative;
  width: 100%;
  padding: 5px 14px 6px;
  background: var(--color-surface);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--color-gold-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.speedometer-wrap {
  position: relative;
  width: 124px;
  height: 58px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
}

.speedometer-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.speedo-track {
  fill: none;
  stroke: rgba(255, 243, 176, 0.2);
  stroke-width: 9;
  stroke-linecap: round;
}

.speedo-arc {
  fill: none;
  stroke: url(#speedo-gold-grad);
  stroke-width: 9;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(245, 166, 35, 0.6));
}

.score-readout {
  position: relative;
  z-index: 1;
  text-align: center;
  line-height: 1;
  padding-bottom: 1px;
}

.score-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-on-glass);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
  display: inline-block;
}

.scoreboard-card.score-pulse .score-value {
  animation: score-tick-pulse 0.26s var(--ease-spring);
}

.scoreboard-card.kicker-golden-pulse {
  animation: kicker-card-glow 0.85s var(--ease-out-soft);
}

@keyframes score-tick-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.14);
    color: var(--color-secondary-light);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes kicker-card-glow {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.03);
    box-shadow: 0 0 32px rgba(255, 243, 176, 0.95), 0 0 64px rgba(245, 166, 35, 0.8);
  }
  100% {
    transform: scale(1);
  }
}

.score-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  flex: 1;
}

.score-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary-light);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.score-target {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.pace-bonus-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(245, 166, 35, 0.28);
  border: 1px solid var(--color-secondary-light);
  color: var(--color-secondary-light);
}

.reopen-date-pill {
  min-height: 32px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--gold-gradient);
  color: #2b0610;
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ==========================================================================
   7. TRANSLUCENT BOARD PANEL (Couple's Photo Visible Right Through the Grid)
   ========================================================================== */
.board-stage {
  position: relative;
  width: min(92vw, 50dvh, 470px);
  height: min(92vw, 50dvh, 470px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.board-panel {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 10px;
  /* Translucent glass so the engagement photo shines right through */
  background: rgba(24, 3, 11, 0.32);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1.5px solid var(--color-gold-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), inset 0 0 20px rgba(245, 166, 35, 0.14);
  touch-action: none;
  overflow: hidden;
}

.corner-ornament {
  position: absolute;
  width: 24px;
  height: 24px;
  pointer-events: none;
  opacity: 0.8;
  z-index: 1;
}
.corner-ornament.tl {
  top: 4px;
  left: 4px;
}
.corner-ornament.tr {
  top: 4px;
  right: 4px;
  transform: scaleX(-1);
}
.corner-ornament.bl {
  bottom: 4px;
  left: 4px;
  transform: scaleY(-1);
}
.corner-ornament.br {
  bottom: 4px;
  right: 4px;
  transform: scale(-1, -1);
}

.board-grid-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.board-cells-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 4px;
}

.board-cell-well {
  background: var(--color-cell-bg);
  border: 1px solid var(--color-cell-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-cell-inset);
}

.board-tiles-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.tile-node {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% / 7);
  height: calc(100% / 7);
  padding: 2.5px;
  will-change: transform, opacity;
  transition:
    transform 200ms var(--ease-spring),
    opacity 190ms ease-out;
  cursor: grab;
  touch-action: none;
}

.tile-node:active {
  cursor: grabbing;
}

.tile-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 180ms var(--ease-spring);
}

.tile-art {
  width: 90%;
  height: 90%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.tile-emoji-fallback {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-secondary-light);
}

.tile-node.is-selected .tile-inner {
  transform: scale(1.1);
  background: radial-gradient(circle, rgba(255, 243, 176, 0.42) 0%, rgba(245, 166, 35, 0.18) 70%);
  box-shadow: var(--shadow-glow);
  border: 1.5px solid var(--color-secondary-light);
}

.tile-node.is-kb-cursor .tile-inner {
  outline: 2.5px dashed var(--color-secondary-light);
  outline-offset: -2px;
}

.tile-node.is-hint .tile-inner {
  animation: tile-hint-pulse 0.65s ease-in-out infinite alternate;
  box-shadow: var(--shadow-glow);
  border: 1.5px solid var(--color-secondary-light);
}

@keyframes tile-hint-pulse {
  0% {
    transform: scale(0.96);
    opacity: 0.88;
  }
  100% {
    transform: scale(1.12);
    opacity: 1;
  }
}

.tile-node.is-shaking .tile-inner {
  animation: tile-invalid-shake 290ms ease-in-out;
}

@keyframes tile-invalid-shake {
  0%, 100% {
    transform: translateX(0);
  }
  20%, 60% {
    transform: translateX(-6px);
  }
  40%, 80% {
    transform: translateX(6px);
  }
}

.tile-node.is-clearing .tile-inner {
  animation: tile-clear-pop 220ms ease-out forwards;
}

@keyframes tile-clear-pop {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  45% {
    transform: scale(1.24);
    opacity: 1;
  }
  100% {
    transform: scale(0.15);
    opacity: 0;
  }
}

/* On-board booster badges (Clean gold typography, zero emojis) */
.tile-node[data-booster="diya"] .tile-inner::after,
.tile-node[data-booster="thali"] .tile-inner::after {
  position: absolute;
  bottom: 1px;
  right: 1px;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #2b0610;
  background: var(--gold-gradient);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.65);
}

.tile-node[data-booster="diya"] .tile-inner {
  box-shadow: inset 0 0 12px rgba(255, 183, 3, 0.85);
  border: 1px solid var(--color-secondary);
}
.tile-node[data-booster="diya"] .tile-inner::after {
  content: "LINE";
}

.tile-node[data-booster="thali"] .tile-inner {
  box-shadow: inset 0 0 14px rgba(255, 243, 176, 0.95);
  border: 1.5px solid var(--color-secondary-light);
}
.tile-node[data-booster="thali"] .tile-inner::after {
  content: "ALL";
}

body.mithai-collapsing .tile-node {
  transition: transform 600ms var(--ease-out-soft), opacity 550ms ease-in !important;
  transform: translate3d(250%, 250%, 0) scale(0.1) !important;
  opacity: 0 !important;
}

/* ==========================================================================
   8. WEDDING POWERS BAR (3x3 Bomb, Line Destroyer, Royal Thali)
   ========================================================================== */
.powers-bar {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  flex-shrink: 0;
}

.power-btn {
  position: relative;
  min-height: 46px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  background: rgba(36, 5, 17, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.2px solid var(--color-gold-border);
  color: var(--color-text-on-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease-spring), border-color 0.2s ease, box-shadow 0.2s ease;
}

.power-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--color-secondary-light);
}

.power-btn.is-armed {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.42), rgba(90, 14, 35, 0.85));
  border-color: #ffffff;
  box-shadow: var(--shadow-glow);
  transform: scale(1.03);
}

.power-btn:disabled,
.power-btn.is-used {
  filter: grayscale(100%);
  opacity: 0.42;
  background: rgba(32, 32, 38, 0.55);
  border-color: rgba(160, 160, 170, 0.3);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.power-btn.is-used .power-count-badge {
  background: rgba(140, 140, 150, 0.5);
  color: #e0e0e0;
}

.power-btn-left {
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}

.power-svg-icon {
  width: 20px;
  height: 20px;
  color: var(--color-secondary-light);
  flex-shrink: 0;
}

.power-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.18;
}

.power-name {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-on-glass);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.power-desc {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.power-count-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--gold-gradient);
  color: #2b0610;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   9. BOTTOM ACTION BAR (3 Pill Buttons >=46px Tall, SVG Icons Only)
   ========================================================================== */
.bottom-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-shrink: 0;
}

.pill-btn {
  min-height: 46px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--color-gold-border);
  color: var(--color-text-on-glass);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease-spring), background-color 0.2s ease;
  flex: 1;
  white-space: nowrap;
}

.pill-btn:hover {
  background: var(--color-surface-elevated);
  transform: translateY(-1px);
}

.pill-btn-skip {
  border-color: rgba(255, 243, 176, 0.8);
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.3), rgba(74, 14, 30, 0.78));
}

.btn-svg-icon {
  width: 16px;
  height: 16px;
  color: var(--color-secondary-light);
  flex-shrink: 0;
}

/* ==========================================================================
   10. LANDSCAPE PHONE LAYOUT
   ========================================================================== */
@media (orientation: landscape) and (max-height: 560px) {
  .app-shell {
    max-width: 98vw;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .hud-top {
    width: 240px;
  }

  .board-stage {
    width: min(74dvh, 42vw);
    height: min(74dvh, 42vw);
  }

  .powers-bar,
  .bottom-bar {
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   11. TOAST NOTIFICATIONS
   ========================================================================== */
.toast-banner {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  transform: translate(-50%, -24px);
  z-index: 40;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-elevated);
  border: 1.5px solid var(--color-secondary-light);
  color: var(--color-text-on-glass);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--ease-spring), opacity 0.25s ease;
  text-align: center;
  max-width: 92vw;
}

.toast-banner.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ==========================================================================
   12. OVERLAYS & MODALS (SPLASH, EXIT-INTENT, 3D MITHAI BOX, REVEAL MODAL)
   ========================================================================== */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(18, 2, 8, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out-soft);
}

.overlay-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.glass-modal-card {
  width: 100%;
  max-width: 420px;
  padding: 24px 22px 20px;
  background: var(--color-surface-elevated);
  border: 1.5px solid var(--color-gold-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(245, 166, 35, 0.22);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: translateY(18px) scale(0.96);
  transition: transform 0.45s var(--ease-spring), opacity 0.4s var(--ease-out-soft);
}

.overlay-backdrop.is-active .glass-modal-card {
  transform: translateY(0) scale(1);
}

.modal-eyebrow {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-secondary-light);
}

.modal-display-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.08;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Happy Deepawali & Save the Date Splash Screen */
.splash-festive-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 22px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, rgba(245, 166, 35, 0.12), rgba(245, 166, 35, 0.28), rgba(245, 166, 35, 0.12));
  border: 1px solid rgba(255, 209, 102, 0.45);
  box-shadow: 0 0 16px rgba(245, 166, 35, 0.25);
  margin-bottom: 4px;
}

.splash-festive-badge .modal-eyebrow {
  margin: 0;
  color: #fff3b0;
  font-size: 1.15rem;
  letter-spacing: 0.22em;
}

.splash-festive-badge .festive-sparkle-left,
.splash-festive-badge .festive-sparkle-right {
  color: #ffd166;
  font-size: 1.1rem;
  line-height: 1;
  animation: diya-flicker 2.2s infinite ease-in-out alternate;
}

.splash-festive-badge .festive-sparkle-right {
  animation-delay: 1.1s;
}

@keyframes diya-flicker {
  0% { transform: scale(0.85); opacity: 0.65; }
  100% { transform: scale(1.25); opacity: 1; text-shadow: 0 0 10px #ffd166; }
}

.splash-blessing-title {
  font-family: var(--font-hindi);
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fffdf6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 24px rgba(245, 166, 35, 0.55);
  margin: 0;
}

.splash-couple-display {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 6.2vw, 2.45rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.12;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: -4px 0 2px;
}

.splash-save-date-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 2px 0 4px;
}

.splash-save-date-tag .tag-gold-line {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-secondary-light));
}

.splash-save-date-tag .tag-gold-line:last-child {
  background: linear-gradient(90deg, var(--color-secondary-light), transparent);
}

.splash-save-date-tag .tag-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-secondary-light);
}

.modal-body-text {
  font-size: 0.9rem;
  line-height: 1.48;
  color: var(--color-text-muted);
  max-width: 36ch;
}

.returning-visitor-pill {
  font-size: 0.76rem;
  color: var(--color-secondary-light);
  background: rgba(245, 166, 35, 0.18);
  border: 1px solid rgba(255, 243, 176, 0.45);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.cta-gold-btn {
  width: 100%;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--gold-gradient);
  color: #2b0610;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
}

.cta-gold-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 26px rgba(245, 166, 35, 0.65);
}

.text-skip-link {
  min-height: 42px;
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-secondary-light);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-skip-link.is-prominent {
  background: rgba(245, 166, 35, 0.2);
  border: 1px solid var(--color-secondary-light);
  border-radius: var(--radius-pill);
  text-decoration: none;
  width: 100%;
}

/* ==========================================================================
   13. 3D MITHAI BOX REVEAL STAGE & CONFETTI CANVAS
   ========================================================================== */
.mithai-box-stage {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  perspective: 900px;
  transition: opacity 0.35s ease;
}

.mithai-box-stage.is-active {
  opacity: 1;
}

.mithai-3d-box {
  position: relative;
  width: 210px;
  height: 210px;
  transform-style: preserve-3d;
}

.mithai-light-burst {
  position: absolute;
  inset: -90px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 251, 214, 0.95) 0%,
    rgba(245, 166, 35, 0.65) 38%,
    rgba(224, 90, 122, 0.2) 65%,
    transparent 78%
  );
  opacity: 0;
  transform: scale(0.2);
  transition: transform 0.7s var(--ease-spring), opacity 0.65s ease;
}

.mithai-box-base {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #5e1127, #360714);
  border: 3px solid var(--color-secondary);
  box-shadow: var(--shadow-lg), inset 0 0 30px rgba(245, 166, 35, 0.35);
}

.mithai-box-lid {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #7c1632 0%, #4a0e1e 65%, #2e0611 100%);
  border: 3px solid var(--color-secondary-light);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
  transform-origin: top center;
  transform: rotateX(75deg) translateY(-40px);
  opacity: 0;
  transition:
    transform 0.65s var(--ease-spring),
    opacity 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mithai-box-ribbon-h,
.mithai-box-ribbon-v {
  position: absolute;
  background: var(--gold-gradient);
}
.mithai-box-ribbon-h {
  width: 100%;
  height: 22px;
}
.mithai-box-ribbon-v {
  width: 22px;
  height: 100%;
}

.mithai-box-seal-img {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  background: #fffdf9;
  border: 2.5px solid var(--color-secondary-light);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}

.mithai-box-stage.phase-close .mithai-box-lid {
  transform: rotateX(0deg) translateY(0);
  opacity: 1;
}

.mithai-box-stage.phase-shake .mithai-3d-box {
  animation: mithai-box-shake 0.55s ease-in-out;
}

@keyframes mithai-box-shake {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  20% {
    transform: rotate(-6deg) scale(1.04);
  }
  40% {
    transform: rotate(6deg) scale(1.06);
  }
  60% {
    transform: rotate(-5deg) scale(1.06);
  }
  80% {
    transform: rotate(5deg) scale(1.04);
  }
}

.mithai-box-stage.phase-open .mithai-box-lid {
  transform: rotateX(115deg) translateY(-20px);
  opacity: 0;
}

.mithai-box-stage.phase-open .mithai-light-burst {
  opacity: 1;
  transform: scale(1.65);
}

.mithai-box-stage.phase-open .mithai-box-base {
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 26;
  pointer-events: none;
}

/* ==========================================================================
   14. SAVE THE DATE & 10,000 PRO PLAYER MODAL
   ========================================================================== */
.reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out-soft);
}

.reveal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.reveal-sheet {
  width: 100%;
  max-width: 520px;
  max-height: 52dvh;
  overflow-y: auto;
  padding: 16px 20px max(16px, env(safe-area-inset-bottom));
  background: rgba(32, 4, 14, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 2px solid var(--color-gold-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -12px 44px rgba(10, 1, 5, 0.78);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateY(100%);
  transition: transform 0.6s var(--ease-spring);
}

.reveal-overlay.is-active .reveal-sheet {
  transform: translateY(0);
}

@media (min-width: 900px) {
  .reveal-overlay {
    align-items: center;
    padding: 24px;
    background: rgba(15, 2, 7, 0.22);
  }

  .reveal-sheet {
    max-width: 460px;
    max-height: 85dvh;
    padding: 26px 30px;
    border: 1.5px solid var(--color-gold-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 50px rgba(245, 166, 35, 0.25);
    transform: translateY(24px) scale(0.95);
    gap: 10px;
  }

  .reveal-overlay.is-active .reveal-sheet {
    transform: translateY(0) scale(1);
  }
}

.pro-player-banner {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--gold-gradient);
  color: #2b0610;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: var(--shadow-glow);
}

.reveal-names {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 700;
  line-height: 1.08;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ornamental-divider {
  width: 150px;
  height: 14px;
  opacity: 0.9;
  flex-shrink: 0;
}

.reveal-date-hero {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  font-weight: 700;
  color: var(--color-secondary-light);
  letter-spacing: 0.03em;
}

.reveal-location-hero {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4.8vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fffdf6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 14px rgba(245, 166, 35, 0.7);
  margin: -2px 0 2px;
}

.reveal-followup {
  font-size: 0.84rem;
  color: var(--color-text-muted);
}

.reveal-actions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.reveal-btn-primary {
  flex: 1 1 calc(50% - 6px);
  min-height: 46px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--gold-gradient);
  color: #2b0610;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.reveal-continue-link {
  flex: 1 1 100%;
  font-size: 0.82rem;
  text-align: center;
  margin-top: 2px;
}

.reveal-btn-secondary {
  flex: 1 1 calc(50% - 6px);
  min-height: 42px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 243, 176, 0.14);
  border: 1px solid var(--color-gold-border);
  color: var(--color-text-on-glass);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.calendar-menu {
  width: 100%;
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.calendar-menu[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 120ms !important;
  }

  #confetti-canvas,
  .mithai-box-stage {
    display: none !important;
  }
}
