/* 🎄 Santa's Stash — Festive Christmas Styling */

:root {
  --pine-dark: #072219;
  --pine: #0f3d2e;
  --pine-mid: #16523e;
  --pine-light: #1f6f54;
  --cranberry: #c8102e;
  --cranberry-dark: #960b21;
  --cranberry-light: #e63950;
  --gold: #f4c430;
  --gold-light: #ffe066;
  --gold-dark: #c99700;
  --cream: #fffaf0;
  --cream-2: #fdf3dc;
  --cream-border: #ebd7b2;
  --ink: #1e2822;
  --ink-muted: #58695f;
  --snow: #ffffff;
  --coal: #2b2b2f;
  --green-ok: #1f8a4c;
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.28);
  --shadow-sm: 0 3px 8px rgba(0, 0, 0, 0.18);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-display: "Mountains of Christmas", Georgia, serif;
  --font-body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--pine);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(244, 196, 48, 0.16) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(200, 16, 46, 0.14) 0%, transparent 55%),
    linear-gradient(180deg, var(--pine-dark) 0%, var(--pine) 35%, #0a2b20 100%);
  color: var(--snow);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

@media (min-width: 768px) {
  html, body {
    background-attachment: fixed;
  }
}

button,
a,
input,
select,
textarea,
.present-card,
.playmode-btn,
.emoji-choice,
.suggestion-chip,
.room-pill,
.icon-btn {
  touch-action: manipulation;
}

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

.hidden { display: none !important; }

/* ---------------- Header & Twinkling Christmas Lights ---------------- */

.site-header {
  flex-shrink: 0;
  position: relative;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(180deg, rgba(7, 34, 25, 0.96) 0%, rgba(15, 61, 46, 0.92) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(244, 196, 48, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.lights-wire {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 0 6px;
  height: 10px;
  border-top: 2px solid #163026;
  overflow: hidden;
}

.bulb {
  position: relative;
  width: 7px;
  height: 9px;
  border-radius: 50% 50% 55% 55%;
  margin-top: 2px;
  animation: twinkle 2.2s infinite ease-in-out alternate;
}
.bulb::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 2px;
  width: 5px;
  height: 4px;
  background: #254236;
  border-radius: 2px;
}
.b-red {
  background: #ff3855;
  box-shadow: 0 0 10px #ff3855, 0 0 20px rgba(255, 56, 85, 0.6);
  animation-delay: 0s;
}
.b-gold {
  background: #ffe047;
  box-shadow: 0 0 10px #ffe047, 0 0 20px rgba(255, 224, 71, 0.6);
  animation-delay: 0.55s;
}
.b-green {
  background: #35e075;
  box-shadow: 0 0 10px #35e075, 0 0 20px rgba(53, 224, 117, 0.6);
  animation-delay: 1.1s;
}
.b-blue {
  background: #48b8ff;
  box-shadow: 0 0 10px #48b8ff, 0 0 20px rgba(72, 184, 255, 0.6);
  animation-delay: 1.65s;
}

@keyframes twinkle {
  0% { opacity: 0.45; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1.06); }
}

.header-bar {
  max-width: 780px;
  margin: 0 auto;
  padding: 3px 8px 4px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
}

.brand-btn {
  background: none;
  border: none;
  color: var(--snow);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px;
  min-height: 34px;
  min-width: 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease;
  flex-shrink: 1;
}
.brand-btn:active { transform: scale(0.96); }
.brand-icon {
  font-size: 1.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  flex-shrink: 0;
}
.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.08rem, 4.2vw, 1.35rem);
  letter-spacing: 0.3px;
  color: var(--gold-light);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.room-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(244, 196, 48, 0.18);
  border: 1.5px solid var(--gold);
  color: var(--gold-light);
  font-weight: 900;
  font-size: 0.74rem;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 28px;
  white-space: nowrap;
}
.room-pill .phase-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35e075;
  box-shadow: 0 0 6px #35e075;
  flex-shrink: 0;
}

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

.icon-btn {
  min-width: 34px;
  min-height: 34px;
  border-radius: 9px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: var(--snow);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
  padding: 0;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.18); }
.icon-btn:active { transform: scale(0.93); }
.icon-btn.is-off {
  opacity: 0.55;
  background: rgba(0, 0, 0, 0.18);
  position: relative;
}
.icon-btn.is-off::after {
  content: "";
  position: absolute;
  width: 62%;
  height: 2.5px;
  background: rgba(255, 235, 235, 0.92);
  border-radius: 2px;
  transform: rotate(-38deg);
  pointer-events: none;
}

@media (min-width: 400px) {
  .icon-btn {
    min-width: 48px;
    min-height: 48px;
    font-size: 1.25rem;
    border-radius: 12px;
  }
}

@media (min-width: 480px) {
  .lights-wire { height: 16px; }
  .bulb { width: 10px; height: 13px; }
  .bulb::before { width: 6px; }
  .header-bar {
    padding: 6px 12px 8px;
    gap: 8px;
  }
  .brand-btn {
    gap: 8px;
    padding: 6px 8px;
    min-height: 48px;
  }
  .brand-icon { font-size: 1.75rem; }
  .brand-title { letter-spacing: 0.5px; }
  .header-actions { gap: 6px; }
  .room-pill {
    gap: 6px;
    font-size: 0.9rem;
    letter-spacing: 1.2px;
    padding: 6px 12px;
    min-height: 38px;
  }
  .room-pill .phase-dot { width: 8px; height: 8px; }
}

.conn-banner {
  background: var(--gold);
  color: #2c1e00;
  text-align: center;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 5px 12px;
}

/* ---------------- Compact Phone Layout Helper Classes & Tightened Components ---------------- */

.phone-screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.screen-top {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.screen-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.screen-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.screen-footer {
  flex-shrink: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 5.5vw, 2rem);
  color: var(--gold-light);
  text-shadow: 0 3px 0 var(--cranberry-dark), 0 6px 18px rgba(0, 0, 0, 0.55);
  text-align: center;
  margin: 0;
  line-height: 1.05;
}

.hero-sub {
  text-align: center;
  color: rgba(255, 250, 240, 0.9);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 auto 2px;
  line-height: 1.25;
  max-width: 460px;
}

.card {
  background: var(--cream);
  color: var(--ink);
  border-radius: 15px;
  padding: 10px;
  margin-bottom: 0;
  box-shadow: var(--shadow-md);
  border: 2.5px solid var(--cream-border);
  position: relative;
}

.card.flex-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-dark {
  background: rgba(10, 40, 30, 0.78);
  color: var(--snow);
  border: 2.5px solid rgba(244, 196, 48, 0.35);
  border-radius: 15px;
  padding: 10px;
  margin-bottom: 0;
  box-shadow: var(--shadow-md);
}

.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4vw, 1.3rem);
  color: var(--cranberry);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.card-dark .card-title {
  color: var(--gold-light);
}

.section-sub {
  color: var(--ink-muted);
  font-size: 0.78rem;
  margin: -2px 0 6px;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 12px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.btn-lg {
  min-height: 44px;
  font-size: 0.98rem;
  padding: 8px 14px;
  border-radius: 13px;
}

.btn-sm {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 9px;
}

.input, .select {
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  background: #ffffff;
  border: 2.5px solid #d5c19c;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.elf-guide-banner {
  padding: 5px 9px;
  gap: 7px;
  margin-bottom: 0;
  border-radius: 12px;
  border-width: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #fffdf7 0%, #fff2cc 100%);
  color: var(--ink);
  border: 2px solid var(--gold);
}

.elf-avatar-bob {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 196, 48, 0.25);
  flex-shrink: 0;
}

.elf-name-tag {
  display: none;
}

.elf-message {
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--pine-dark);
  flex: 1;
  min-width: 0;
}

.elf-arrow-pulse {
  font-size: 1rem;
  color: var(--cranberry);
  flex-shrink: 0;
}

.frenzy-banner {
  background: linear-gradient(135deg, #ffe066 0%, #f4c430 50%, #e69b00 100%);
  color: #3a2200;
  border: 2px solid #ffffff;
  border-radius: 10px;
  padding: 4px 10px;
  margin-bottom: 0;
  text-align: center;
  font-weight: 900;
  font-size: 0.76rem;
  box-shadow: 0 0 20px rgba(244, 196, 48, 0.55), var(--shadow-sm);
  flex-shrink: 0;
}

/* Segmented Phone Tabs & Horizontal Avatar Ribbon */

.phone-tabs {
  display: flex;
  gap: 4px;
  background: rgba(7, 34, 25, 0.6);
  padding: 3px;
  border-radius: 12px;
  border: 1.5px solid rgba(244, 196, 48, 0.35);
  flex-shrink: 0;
}

.phone-tab-btn {
  flex: 1;
  min-height: 32px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 250, 240, 0.85);
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.phone-tab-btn.active {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #3a2300;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.lobby-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: linear-gradient(135deg, #fffdf7 0%, #fcedce 100%);
  color: var(--ink);
  border: 2.5px solid var(--gold);
  border-radius: 14px;
  padding: 6px 10px;
  flex-shrink: 0;
}

.lobby-code-badge {
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 3px;
  color: var(--pine);
  line-height: 1;
}

.avatar-ribbon {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 3px 1px;
  margin: 4px 0 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.avatar-ribbon::-webkit-scrollbar {
  display: none;
}

.avatar-ribbon .emoji-choice {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  min-height: 38px;
  font-size: 1.25rem;
  border-radius: 10px;
}

/* Compact Single-Screen Present Grid & Pick HUD */

.gifts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.gifts-grid.grid-dense {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.present-card {
  position: relative;
  border-radius: 11px;
  padding: 7px 4px 5px;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 3px 0 rgba(0,0,0,0.25);
  overflow: hidden;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease, filter 0.16s ease;
  user-select: none;
  color: #fff;
}

.present-bow {
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  z-index: 2;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.35));
  pointer-events: none;
}

.present-inner {
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(2px);
  border-radius: 8px;
  padding: 4px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.present-emoji {
  font-size: 1.35rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.present-name {
  font-weight: 900;
  font-size: 0.7rem;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.present-meta {
  position: relative;
  z-index: 2;
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
}

.holder-pill {
  background: var(--cream);
  color: var(--ink);
  font-weight: 900;
  font-size: 0.64px;
  padding: 1px 5px;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.holder-pill { font-size: 0.64rem; }
.steal-pips { font-size: 0.62rem; padding: 1px 5px; }
.action-cta-badge { font-size: 0.62rem; padding: 1px 5px; }
.status-ribbon { font-size: 0.6rem; padding: 1px 5px; top: 3px; right: 3px; }

.pick-hud-card {
  background: linear-gradient(135deg, #fffdf7 0%, #fff2cc 100%);
  color: var(--ink);
  border: 2.5px solid var(--gold);
  border-radius: 14px;
  padding: 7px 10px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pick-hud-card.is-my-turn {
  border-color: var(--cranberry);
  box-shadow: 0 0 16px rgba(200, 16, 46, 0.35);
}

.pick-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.pick-hud-turn {
  font-weight: 900;
  font-size: 0.92rem;
  color: var(--pine-dark);
  display: flex;
  align-items: center;
  gap: 5px;
}

.pick-hud-card.is-my-turn .pick-hud-turn {
  color: var(--cranberry-dark);
}

.pick-hud-hint {
  background: rgba(15, 61, 46, 0.07);
  border-radius: 9px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.pick-hud-quote {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pine-dark);
  line-height: 1.15;
}

.pick-bottom-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(10, 40, 30, 0.85);
  border: 1.5px solid rgba(244, 196, 48, 0.35);
  border-radius: 12px;
  padding: 5px 8px;
}

/* Endgame Swipeable Player Carousel & Compact Podium */

.gameover-podium-compact {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  margin: 0;
  flex-shrink: 0;
}
.gameover-podium-compact .podium-spot {
  max-width: 125px;
}
.gameover-podium-compact .podium-pedestal {
  padding: 5px 4px;
  border-radius: 10px 10px 4px 4px;
  font-size: 0.76rem;
}
.gameover-podium-compact .podium-1 .podium-pedestal { min-height: 52px; }
.gameover-podium-compact .podium-2 .podium-pedestal { min-height: 40px; }
.gameover-podium-compact .podium-3 .podium-pedestal { min-height: 34px; }

.player-pill-strip {
  flex-shrink: 0;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 2px 1px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.player-pill-strip::-webkit-scrollbar { display: none; }

.player-swipe-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid rgba(244, 196, 48, 0.4);
  background: rgba(10, 40, 30, 0.75);
  color: var(--snow);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.76rem;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.player-swipe-tab.active {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #3a2300;
  border-color: #ffffff;
  transform: scale(1.03);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.player-swipe-viewport {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
  user-select: none;
}
.player-swipe-track {
  flex: 1;
  min-height: 0;
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.player-swipe-track.is-dragging {
  transition: none !important;
}
.player-swipe-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0 2px;
  display: flex;
  flex-direction: column;
}

.player-end-card {
  flex: 1;
  min-height: 0;
  background: linear-gradient(145deg, #fffdf7 0%, #fff4d6 100%);
  color: var(--ink);
  border-radius: 16px;
  border: 3px solid var(--cream-border);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.player-end-card.is-winner {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(244, 196, 48, 0.35), var(--shadow-md);
}
.player-end-card.is-me {
  border-color: var(--pine-light);
}

.player-end-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1.5px dashed var(--cream-border);
  flex-shrink: 0;
}
.player-end-ident {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.player-end-avatar {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}
.player-end-name {
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--pine-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-end-rank {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--cranberry);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.player-end-mission {
  background: #ffffff;
  border: 1.5px solid var(--cream-border);
  border-radius: 10px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  flex-shrink: 0;
}
.player-end-mission.is-hit {
  background: #f0fdf4;
  border-color: #2ecc71;
}

.player-end-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  flex-shrink: 0;
}
.mini-stat-tile {
  background: #ffffff;
  border: 1.5px solid var(--cream-border);
  border-radius: 9px;
  padding: 4px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
}
.mini-stat-val {
  font-weight: 900;
  font-size: 0.82rem;
  color: var(--pine-dark);
}
.mini-stat-lbl {
  font-weight: 800;
  font-size: 0.62rem;
  color: var(--ink-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.player-swipe-nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px;
}
.swipe-arrow-btn {
  min-width: 34px;
  min-height: 32px;
  border-radius: 999px;
  border: 1.5px solid rgba(244, 196, 48, 0.45);
  background: rgba(255, 255, 255, 0.14);
  color: var(--snow);
  font-weight: 900;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.swipe-arrow-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.swipe-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}
.swipe-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.15s ease;
}
.swipe-dot.active {
  width: 18px;
  border-radius: 999px;
  background: var(--gold);
}
.swipe-hint-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(255, 250, 240, 0.85);
}

.achievement-pill {
  padding: 3px 8px;
  border-radius: 9px;
  gap: 5px;
}
.achievement-emoji { font-size: 1.1rem; }
.achievement-title { font-size: 0.76rem; }
.achievement-detail { font-size: 0.66rem; }


.sticky-bottom-cta {
  position: sticky;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 25;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

.btn-cranberry {
  background: linear-gradient(180deg, var(--cranberry-light) 0%, var(--cranberry) 100%);
  color: var(--snow);
  box-shadow: 0 4px 0 var(--cranberry-dark), var(--shadow-sm);
}
.btn-cranberry:hover:not(:disabled) { filter: brightness(1.06); }
.sticky-bottom-cta.btn-cranberry {
  box-shadow: 0 4px 0 var(--cranberry-dark), 0 10px 28px rgba(0, 0, 0, 0.55);
}

.btn-gold {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #3a2500;
  box-shadow: 0 4px 0 var(--gold-dark), var(--shadow-sm);
}
.btn-gold:hover:not(:disabled) { filter: brightness(1.05); }

.btn-pine {
  background: linear-gradient(180deg, var(--pine-light) 0%, var(--pine) 100%);
  color: var(--snow);
  box-shadow: 0 4px 0 var(--pine-dark), var(--shadow-sm);
}
.btn-pine:hover:not(:disabled) { filter: brightness(1.08); }

.btn-cream {
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--cream-border);
  box-shadow: var(--shadow-sm);
}
.btn-cream:hover:not(:disabled) { background: var(--cream-2); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--snow);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.2); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--cream-border);
}
.btn-outline:hover:not(:disabled) { background: rgba(0, 0, 0, 0.05); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-row > .btn { flex: 1 1 130px; }

@media (min-width: 600px) {
  .btn-row { gap: 10px; }
  .btn-row > .btn { flex: 1 1 140px; }
}

/* ---------------- Inputs & Forms ---------------- */

.input, .select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: #ffffff;
  border: 2.5px solid #d5c19c;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .select:focus {
  border-color: var(--cranberry);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.2);
}

.code-input {
  text-transform: uppercase;
  text-align: center;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 8px;
  height: 64px;
}

.field-label {
  display: block;
  font-weight: 800;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--ink);
}

/* ---------------- Avatar & Emoji Pickers ---------------- */

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 12px;
}
@media (max-width: 359px) {
  .emoji-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.emoji-choice {
  aspect-ratio: 1 / 1;
  min-height: 44px;
  width: 100%;
  padding: 0;
  font-size: clamp(1.3rem, 5.5vw, 1.55rem);
  border-radius: 12px;
  border: 2px solid var(--cream-border);
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.emoji-choice.selected {
  border-color: var(--cranberry);
  background: #ffe8ec;
  transform: scale(1.07);
  box-shadow: 0 2px 8px rgba(200, 16, 46, 0.25);
}

/* ---------------- Room Code Banner in Lobby ---------------- */

.room-hero {
  text-align: center;
  padding: 16px 12px;
  background: linear-gradient(135deg, #fffdf7 0%, #fcedce 100%);
}
.room-code-label {
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cranberry);
}
.room-code-big {
  font-family: var(--font-body);
  font-size: clamp(2.6rem, 11vw, 4.2rem);
  font-weight: 900;
  letter-spacing: 8px;
  color: var(--pine);
  margin: 2px 0 8px;
  line-height: 1.05;
  user-select: all;
}
.share-url-box {
  display: inline-block;
  max-width: 100%;
  background: rgba(15, 61, 46, 0.08);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--pine);
  margin-bottom: 12px;
  word-break: break-all;
}

/* ---------------- Player Chips & List ---------------- */

.player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
  background: #ffffff;
  border: 2px solid var(--cream-border);
  border-radius: 14px;
  padding: 8px 10px;
  min-height: 54px;
}
.player-row.is-me {
  border-color: var(--pine-light);
  background: #f2fbf6;
}
.player-ident {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-weight: 800;
  font-size: 1.02rem;
  min-width: 0;
  flex: 1 1 180px;
}
.player-ident > span {
  overflow-wrap: anywhere;
}
.player-avatar {
  font-size: 1.65rem;
  line-height: 1;
  flex-shrink: 0;
}
.conn-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2ecc71;
  display: inline-block;
  flex-shrink: 0;
}
.conn-dot.offline {
  background: #bdc3c7;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-you { background: #d6f5e3; color: #0f522d; }
.badge-host { background: var(--gold-light); color: #523b00; }
.badge-done { background: #d4f5df; color: #136b36; }
.badge-wait { background: #fce8c3; color: #7a4f06; }

/* ---------------- Coin & Coal Chips ---------------- */

.coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(180deg, #ffe97d 0%, #f4c430 100%);
  color: #422b00;
  border: 1.5px solid #c99700;
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 900;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.coal-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(180deg, #43434a 0%, #1d1d21 100%);
  color: #f3f3f7;
  border: 1.5px solid #000;
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 900;
  font-size: 0.9rem;
}

.grinch-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(180deg, #35e075 0%, #167a3c 100%);
  color: #072212;
  border: 1.5px solid #0d4d24;
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 900;
  font-size: 0.9rem;
}

.frenzy-banner {
  background: linear-gradient(135deg, #ffe066 0%, #f4c430 50%, #e69b00 100%);
  color: #3a2200;
  border: 3px solid #ffffff;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
  text-align: center;
  font-weight: 900;
  font-size: 0.95rem;
  box-shadow: 0 0 20px rgba(244, 196, 48, 0.55), var(--shadow-sm);
}

.secret-objective-card {
  background: linear-gradient(135deg, #f3fbf6 0%, #e2f7ea 100%);
  border: 2px dashed var(--pine-light);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  text-align: left;
}

.editable-avatar:hover {
  transform: scale(1.15);
  transition: transform 0.12s ease;
}

/* ---------------- Wrapped Present Gift Cards ---------------- */

.gifts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

@media (min-width: 540px) {
  .gifts-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 14px;
  }
}

.present-card {
  position: relative;
  border-radius: 16px;
  padding: 14px 8px 12px;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  cursor: pointer;
  border: 3px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25), var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease, filter 0.16s ease;
  user-select: none;
  color: #fff;
}

@media (min-width: 540px) {
  .present-card {
    padding: 16px 10px 14px;
    min-height: 138px;
  }
}

/* Wrapped box color themes */
.present-theme-0 { background: linear-gradient(145deg, #d61f3c 0%, #9e0d25 100%); --ribbon: #f4c430; }
.present-theme-1 { background: linear-gradient(145deg, #1b7a46 0%, #0f4d2b 100%); --ribbon: #ff4757; }
.present-theme-2 { background: linear-gradient(145deg, #2565ae 0%, #143d73 100%); --ribbon: #ffd166; }
.present-theme-3 { background: linear-gradient(145deg, #7c3f9c 0%, #4d2266 100%); --ribbon: #f4c430; }
.present-theme-4 { background: linear-gradient(145deg, #c97a16 0%, #8c4f04 100%); --ribbon: #fff3b0; }
.present-theme-5 { background: linear-gradient(145deg, #167a80 0%, #0b4a4f 100%); --ribbon: #ffd166; }

/* Vertical & horizontal ribbons */
.present-card::before,
.present-card::after {
  content: "";
  position: absolute;
  background: var(--ribbon, #f4c430);
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
}
.present-card::before {
  top: 0;
  bottom: 0;
  left: calc(50% - 9px);
  width: 18px;
}
.present-card::after {
  left: 0;
  right: 0;
  top: calc(50% - 8px);
  height: 16px;
}

.present-bow {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.25rem;
  z-index: 2;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.35));
  pointer-events: none;
}

.present-inner {
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  padding: 8px 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.present-emoji {
  font-size: 2.3rem;
  line-height: 1.05;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
}

.present-name {
  font-weight: 900;
  font-size: 0.96rem;
  line-height: 1.15;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  word-break: break-word;
}

.present-meta {
  position: relative;
  z-index: 2;
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.holder-pill {
  background: var(--cream);
  color: var(--ink);
  font-weight: 900;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.steal-pips {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 800;
}

.present-card:hover:not(.disabled),
.present-card:focus-visible:not(.disabled) {
  transform: translateY(-4px) scale(1.03);
}
.present-card:active:not(.disabled) {
  transform: translateY(1px) scale(0.97);
}

.present-card.selected {
  outline: 4px solid var(--gold-light);
  box-shadow: 0 0 0 6px rgba(244, 196, 48, 0.4), var(--shadow-md);
  transform: translateY(-3px) scale(1.03);
}

.present-card.locked,
.present-card.no-steal-back,
.present-card.disabled {
  filter: saturate(0.55) brightness(0.86);
  cursor: not-allowed;
}

.status-ribbon {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
}

/* ---------------- 3D Flipping Hint Card ---------------- */

.hint-stage {
  perspective: 900px;
  margin-bottom: 14px;
}

.hint-card-3d {
  background: linear-gradient(135deg, #fffdf7 0%, #fff2cc 100%);
  color: var(--ink);
  border: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transform-origin: center;
  animation: flipInHint 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes flipInHint {
  0% {
    transform: rotateX(-85deg) scale(0.92);
    opacity: 0;
  }
  100% {
    transform: rotateX(0deg) scale(1);
    opacity: 1;
  }
}

.hint-kicker {
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--cranberry);
  margin-bottom: 4px;
}

.hint-quote {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 5vw, 2.1rem);
  color: var(--pine-dark);
  margin: 4px 0;
  line-height: 1.2;
}

.hint-history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.hint-mini {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cream);
}

/* ---------------- Turn Banner ---------------- */

.turn-banner {
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.28);
}
.turn-banner.my-turn {
  background: linear-gradient(135deg, var(--cranberry) 0%, #8f081e 100%);
  border-color: var(--gold);
  box-shadow: 0 0 24px rgba(244, 196, 48, 0.35), var(--shadow-md);
  animation: pulseTurn 2s infinite ease-in-out;
}
@keyframes pulseTurn {
  0%, 100% { box-shadow: 0 0 18px rgba(244, 196, 48, 0.3), var(--shadow-md); }
  50% { box-shadow: 0 0 32px rgba(244, 196, 48, 0.65), var(--shadow-md); }
}
.turn-headline {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--gold-light);
  line-height: 1.15;
}
.chain-pill {
  background: var(--gold);
  color: #3a2500;
  font-weight: 900;
  font-size: 0.86rem;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------------- Suggestion Chips ---------------- */

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}
.suggestion-chip {
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--cream-border);
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
}
.suggestion-chip:hover {
  border-color: var(--cranberry);
  background: #fff0f3;
}

/* ---------------- Handoff Privacy Cover ---------------- */

.cover-root {
  position: fixed;
  inset: 0;
  min-height: 100dvh;
  z-index: 80;
  background:
    radial-gradient(circle at 50% 30%, rgba(244, 196, 48, 0.22) 0%, transparent 60%),
    linear-gradient(165deg, #8f081e 0%, var(--cranberry) 45%, #5c0412 100%);
  color: var(--snow);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 14px calc(16px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  text-align: center;
}

.cover-box {
  max-width: 420px;
  width: 100%;
  background: rgba(0, 0, 0, 0.28);
  border: 3px solid var(--gold);
  border-radius: 24px;
  padding: 24px 18px;
  box-shadow: var(--shadow-lg);
}
.cover-avatar {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 10px;
  display: block;
}
.cover-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 7vw, 2.3rem);
  color: var(--gold-light);
  margin: 0 0 8px;
}
.cover-sub {
  font-size: 1.02rem;
  font-weight: 700;
  opacity: 0.92;
  margin-bottom: 20px;
}

/* ---------------- Modals & Toasts (Mobile Bottom Sheet -> Centered Dialog) ---------------- */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(4, 18, 13, 0.78);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-card {
  position: relative;
  max-width: 100%;
  width: 100%;
  max-height: 88dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--cream);
  color: var(--ink);
  border-radius: 22px 22px 0 0;
  border: 4px solid var(--gold);
  border-bottom: none;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-lg);
  animation: slideUpSheet 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-card::before {
  content: "";
  display: block;
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: rgba(88, 105, 95, 0.32);
  margin: -6px auto 12px;
}

@keyframes slideUpSheet {
  from { transform: translateY(36px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

@media (min-width: 560px) {
  .modal-root {
    align-items: center;
    padding: 16px;
  }
  .modal-card {
    max-width: 460px;
    max-height: 90dvh;
    border-radius: 22px;
    border: 4px solid var(--gold);
    padding: 22px 18px;
    animation: popModal 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .modal-card::before {
    display: none;
  }
}

.toast-root {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 98;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(92vw, 440px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #14281f;
  color: var(--snow);
  border: 2px solid var(--gold);
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 0.96rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: toastIn 0.22s ease-out;
}
.toast.toast-error {
  background: var(--cranberry-dark);
  border-color: #ff9aa8;
}
@keyframes toastIn {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------------- Reveal Unwrap Card ---------------- */

.unwrap-card {
  background: linear-gradient(145deg, #fffdf7 0%, #fcedce 100%);
  color: var(--ink);
  border: 4px solid var(--gold);
  border-radius: 22px;
  padding: 18px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-lg);
  animation: unwrapPop 0.5s cubic-bezier(0.22, 1.35, 0.5, 1);
}
@keyframes unwrapPop {
  0% { transform: scale(0.75) rotate(-3deg); opacity: 0; }
  60% { transform: scale(1.04) rotate(1deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.reveal-contents {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.reveal-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  background: #ffffff;
  border: 1.5px solid var(--cream-border);
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 800;
}

/* ---------------- Scoreboard & Podium ---------------- */

.leader-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 2px solid var(--cream-border);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.leader-rank {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  min-width: 30px;
  color: var(--cranberry);
}
.leader-bar-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.leader-bar {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--cranberry) 100%);
  margin-top: 4px;
  transition: width 0.5s ease;
}

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  margin: 18px 0 20px;
}
@media (min-width: 560px) {
  .podium {
    gap: 10px;
  }
}
.podium-spot {
  flex: 1;
  min-width: 0;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.podium-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.podium-pedestal {
  width: 100%;
  border-radius: 14px 14px 6px 6px;
  padding: 12px 6px;
  font-weight: 900;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  box-shadow: var(--shadow-md);
}
.podium-1 .podium-pedestal {
  min-height: 120px;
  background: linear-gradient(180deg, var(--gold) 0%, #b8860b 100%);
  color: #362300;
  border: 3px solid var(--gold-light);
}
.podium-2 .podium-pedestal {
  min-height: 92px;
  background: linear-gradient(180deg, #cfd6df 0%, #7d8794 100%);
  color: #1c2229;
}
.podium-3 .podium-pedestal {
  min-height: 76px;
  background: linear-gradient(180deg, #d99b66 0%, #8f5629 100%);
}

/* ---------------- Activity Feed ---------------- */

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.feed-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 700;
}

/* ---------------- Settings Grid ---------------- */

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 560px) {
  .settings-grid { grid-template-columns: 1fr 1fr; }
}
.setting-item {
  background: #ffffff;
  border: 1.5px solid var(--cream-border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.setting-item > div,
.setting-item > span {
  flex: 1 1 120px;
  min-width: 0;
}
.setting-item .select {
  max-width: 55%;
  min-width: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* ---------------- Tag Helper List ---------------- */

.tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid var(--cream-border);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-family: monospace;
  font-size: 0.88rem;
  word-break: break-all;
}

.tag-row-info {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tag-row-url {
  font-weight: 700;
  word-break: break-all;
}

.tag-row-status {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.tag-row-status.is-assigned {
  color: var(--pine-dark, #14532d);
}

.tag-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-input-row .input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: monospace;
  font-size: 0.9rem;
}

.tag-preview-hint {
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
  word-break: break-all;
}

.tag-preview-hint.is-ok {
  color: var(--pine-dark, #14532d);
}

.tag-preview-hint.is-warn {
  color: var(--cranberry, #b91c1c);
}

/* ---------------- Under-the-Tree Rollover & Final Swap ---------------- */

.under-tree-banner {
  background: linear-gradient(135deg, #0f3d2e 0%, #1b5e3f 60%, #124833 100%);
  color: #fffdf5;
  border: 2px solid var(--gold-light, #f4c430);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 14px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(15, 61, 46, 0.22);
}

.under-tree-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-light, #f4c430);
  margin-bottom: 3px;
}

.under-tree-body {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

.carried-badge {
  display: inline-block;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #78350f;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.turn-banner.final-swap-banner {
  border: 2px solid var(--gold-light, #f4c430);
  box-shadow: 0 0 0 3px rgba(244, 196, 48, 0.22), 0 8px 22px rgba(0, 0, 0, 0.2);
}

/* ---------------- Game Over Slow Reveal, Achievements & Stats ---------------- */

.drumroll-banner {
  background: linear-gradient(135deg, #fffdf5 0%, #fcedce 100%);
  text-align: center;
  animation: pulseTurn 1.8s infinite ease-in-out;
}

.drumroll-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--cranberry);
}

.reveal-pop-card {
  animation: unwrapPop 0.45s cubic-bezier(0.22, 1.35, 0.5, 1);
}

.mystery-podium .mystery-silhouette {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 196, 48, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%);
  border: 3px dashed var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 6px;
  animation: mysteryPulse 1.2s infinite ease-in-out alternate;
}

.mystery-pedestal {
  background: repeating-linear-gradient(
    -45deg,
    #3a2a05 0,
    #3a2a05 10px,
    #59410a 10px,
    #59410a 20px
  ) !important;
  color: var(--gold-light) !important;
  border: 3px dashed var(--gold-light) !important;
}

@keyframes mysteryPulse {
  0% { transform: scale(0.94); box-shadow: 0 0 10px rgba(244, 196, 48, 0.3); }
  100% { transform: scale(1.06); box-shadow: 0 0 24px rgba(244, 196, 48, 0.85); }
}

.champion-podium {
  animation: unwrapPop 0.55s cubic-bezier(0.22, 1.35, 0.5, 1);
}

.objective-bonus-hit {
  box-shadow: 0 0 14px rgba(46, 204, 113, 0.3);
}

.spotlight-card {
  background: linear-gradient(145deg, #fffdf7 0%, #fff4d6 100%);
}

.local-spotlight-player {
  background: #ffffff;
  border: 2.5px solid var(--gold);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.local-spotlight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 2px dashed var(--cream-border);
}

.spotlight-section-label {
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cranberry);
  margin-bottom: 6px;
}

.achievement-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.achievement-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #fffaf0 0%, #fcecc4 100%);
  border: 1.5px solid var(--gold-dark);
  border-radius: 12px;
  padding: 6px 11px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.achievement-emoji {
  font-size: 1.45rem;
  line-height: 1;
}

.achievement-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.achievement-title {
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--pine-dark);
}

.achievement-detail {
  font-weight: 700;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-box {
  background: var(--cream);
  border: 1.5px solid var(--cream-border);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ink);
}

.stat-val {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--pine);
  white-space: nowrap;
}

.all-stats-player-card {
  background: #ffffff;
  border: 2px solid var(--cream-border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.all-stats-player-card.is-me {
  border-color: var(--pine-light);
  background: #f6fcf8;
}

.all-stats-player-card.is-winner {
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(244, 196, 48, 0.2);
}

.all-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 6px;
  border-top: 1.5px dashed var(--cream-border);
}

.compact-stat-pill {
  background: var(--cream);
  border: 1px solid var(--cream-border);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
}

/* ---------------- Play Mode Switcher ---------------- */

.playmode-card {
  background: linear-gradient(145deg, #fffdf7 0%, #fff4d6 100%);
}

.playmode-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 560px) {
  .playmode-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.playmode-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  border: 2.5px solid var(--cream-border);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.playmode-btn:hover {
  border-color: var(--gold-dark);
  transform: translateY(-2px);
}

.playmode-btn:active {
  transform: scale(0.98);
}

.playmode-btn.selected {
  border-color: var(--cranberry);
  background: linear-gradient(135deg, #fff6f7 0%, #ffe8ec 100%);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.18), var(--shadow-sm);
}

.playmode-btn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  font-weight: 900;
  font-size: 1.02rem;
  color: var(--pine-dark);
}

.playmode-btn.selected .playmode-btn-head {
  color: var(--cranberry-dark);
}

.playmode-btn-desc {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-muted);
  line-height: 1.35;
}

.playmode-nonhost-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 2px solid var(--gold);
  border-radius: 14px;
  padding: 12px 14px;
}

/* ---------------- Guided Christmas Animations & FX ---------------- */

.fx-root {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  overflow: hidden;
}

/* 1. Full-Screen Phase Transition Splash */
.phase-splash {
  position: fixed;
  inset: 0;
  z-index: 92;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 42%, rgba(244, 196, 48, 0.28) 0%, rgba(7, 34, 25, 0.9) 70%);
  backdrop-filter: blur(6px);
  cursor: pointer;
  animation: splashFadeIn 0.25s ease-out both;
}

.phase-splash.is-fading {
  pointer-events: none;
  animation: splashFadeOut 0.35s ease-in forwards;
}

.phase-splash-card {
  position: relative;
  max-width: min(92vw, 480px);
  width: 100%;
  background: linear-gradient(145deg, rgba(16, 65, 48, 0.96) 0%, rgba(9, 36, 27, 0.98) 100%);
  border: 4px solid var(--gold);
  border-radius: 26px;
  padding: 28px 20px 24px;
  text-align: center;
  box-shadow: 0 0 40px rgba(244, 196, 48, 0.35), var(--shadow-lg);
  overflow: hidden;
  animation: splashCardPop 0.4s cubic-bezier(0.22, 1.4, 0.45, 1) both;
}

.phase-splash-card.splash-frenzy {
  border-color: #fff3b0;
  background: linear-gradient(145deg, #8f081e 0%, #4d0410 100%);
  box-shadow: 0 0 50px rgba(255, 224, 102, 0.65), var(--shadow-lg);
}

.phase-splash-stage {
  position: relative;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.phase-splash-hero {
  font-size: clamp(2.6rem, 11vw, 3.8rem);
  line-height: 1.1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  display: inline-block;
}

.phase-splash-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6.5vw, 2.4rem);
  color: var(--gold-light);
  text-shadow: 0 2px 0 var(--cranberry-dark), 0 4px 14px rgba(0, 0, 0, 0.6);
  margin: 0 0 6px;
  line-height: 1.15;
}

.phase-splash-sub {
  font-size: 0.92rem;
  font-weight: 800;
  color: rgba(255, 250, 240, 0.85);
}

.phase-splash-tap {
  margin-top: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 224, 102, 0.72);
}

/* Sleigh fly-across for stash */
.splash-sleigh-track {
  position: relative;
  width: 100%;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.splash-sleigh {
  display: inline-block;
  font-size: clamp(2.3rem, 9vw, 3.2rem);
  white-space: nowrap;
  animation: sleighFly 1.35s cubic-bezier(0.22, 0.8, 0.35, 1) both;
}
.splash-sparkle-trail {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  animation: trailGlow 1.3s ease-out both;
}

/* Bouncing sack & bells for pick */
.splash-bounce-hero {
  animation: bounceFestive 0.85s ease-in-out infinite alternate;
}

/* Shaking presents for reveal */
.splash-shake-hero {
  animation: giftShakeBurst 0.55s ease-in-out infinite;
}

/* Falling coins for scoreboard */
.splash-coins-rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.splash-coin-drop {
  position: absolute;
  top: -24px;
  font-size: 1.5rem;
  animation: coinFall 1.35s ease-in forwards;
}

/* Fireworks crown for gameover */
.splash-crown-hero {
  animation: crownPulse 0.7s ease-in-out infinite alternate;
}

@keyframes splashFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes splashFadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1.03); }
}
@keyframes splashCardPop {
  0% { transform: scale(0.75) translateY(18px); opacity: 0; }
  70% { transform: scale(1.04) translateY(-2px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes sleighFly {
  0% { transform: translateX(110%) translateY(12px) rotate(-6deg) scale(0.85); opacity: 0; }
  20% { opacity: 1; }
  55% { transform: translateX(0%) translateY(-6px) rotate(2deg) scale(1.06); opacity: 1; }
  100% { transform: translateX(-12%) translateY(0) rotate(0deg) scale(1); opacity: 1; }
}
@keyframes trailGlow {
  0% { opacity: 0; transform: translateX(40px) scale(0.7); }
  45% { opacity: 0.95; transform: translateX(0) scale(1.05); }
  100% { opacity: 0.25; transform: translateX(-30px) scale(1.15); }
}
@keyframes bounceFestive {
  0% { transform: translateY(4px) scale(0.96) rotate(-4deg); }
  100% { transform: translateY(-10px) scale(1.08) rotate(4deg); }
}
@keyframes giftShakeBurst {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-10deg) scale(1.06); }
  40% { transform: rotate(10deg) scale(1.1); }
  60% { transform: rotate(-8deg) scale(1.06); }
  80% { transform: rotate(6deg) scale(1.03); }
}
@keyframes coinFall {
  0% { transform: translateY(-10px) rotate(0deg) scale(0.8); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translateY(185px) rotate(360deg) scale(1.05); opacity: 0; }
}
@keyframes crownPulse {
  0% { transform: scale(0.95) rotate(-3deg); }
  100% { transform: scale(1.12) rotate(3deg); }
}

/* 2. Floating Action Cinematics (Take, Steal, Lock, Stash Coin Drop) */
.floating-fx-banner {
  position: fixed;
  top: calc(74px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 94;
  pointer-events: none;
  width: min(92vw, 460px);
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #fffdf7 0%, #fff0c2 100%);
  color: var(--ink);
  border: 3px solid var(--gold);
  border-radius: 18px;
  padding: 12px 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42), 0 0 20px rgba(244, 196, 48, 0.45);
  animation: fxBannerIn 0.36s cubic-bezier(0.22, 1.4, 0.45, 1) both;
}

.floating-fx-banner.fx-steal {
  background: linear-gradient(135deg, #ffe5e9 0%, #fff3d1 100%);
  border-color: var(--cranberry);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 24px rgba(200, 16, 46, 0.45);
}

.floating-fx-banner.fx-lock {
  background: linear-gradient(135deg, #fff6d6 0%, #f4c430 100%);
  border-color: #6b4600;
}

.floating-fx-banner.fx-coin {
  background: linear-gradient(135deg, #f3fbf6 0%, #fff4cc 100%);
  border-color: var(--gold);
}

.floating-fx-banner.is-leaving {
  animation: fxBannerOut 0.28s ease-in forwards;
}

.floating-fx-emoji {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
  animation: bounceFestive 0.45s ease-in-out infinite alternate;
}

.floating-fx-banner.fx-lock .floating-fx-emoji {
  animation: lockSlam 0.42s cubic-bezier(0.22, 1.5, 0.5, 1) both;
}

.floating-fx-body {
  min-width: 0;
  flex: 1;
}
.floating-fx-title {
  font-weight: 900;
  font-size: 1.02rem;
  color: var(--pine-dark);
  line-height: 1.2;
}
.floating-fx-sub {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* Steal swoop graphic inside banner */
.swoop-flight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  border: 1.5px dashed var(--cranberry);
  position: relative;
  overflow: hidden;
}
.swoop-node {
  font-weight: 900;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 1;
}
.swoop-gift-fly {
  font-size: 1.25rem;
  display: inline-block;
  animation: giftSwoopAcross 0.95s cubic-bezier(0.3, 1.2, 0.4, 1) infinite;
}

/* Floating arc coins on stash select */
.coin-arc-pop {
  position: fixed;
  z-index: 93;
  pointer-events: none;
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--gold-light);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
  animation: coinArcUp 0.95s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes fxBannerIn {
  0% { transform: translateX(-50%) translateY(-28px) scale(0.86); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}
@keyframes fxBannerOut {
  from { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
  to { transform: translateX(-50%) translateY(-20px) scale(0.94); opacity: 0; }
}
@keyframes lockSlam {
  0% { transform: scale(2.2) translateY(-18px) rotate(-14deg); opacity: 0; }
  65% { transform: scale(0.92) translateY(2px) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) translateY(0) rotate(0deg); opacity: 1; }
}
@keyframes giftSwoopAcross {
  0% { transform: translateX(-18px) translateY(2px) scale(0.9) rotate(-10deg); opacity: 0.4; }
  50% { transform: translateX(0) translateY(-7px) scale(1.25) rotate(6deg); opacity: 1; }
  100% { transform: translateX(18px) translateY(2px) scale(0.95) rotate(12deg); opacity: 0.4; }
}
@keyframes coinArcUp {
  0% { transform: translate(-50%, 0) scale(0.75); opacity: 0; }
  20% { transform: translate(-50%, -22px) scale(1.22); opacity: 1; }
  70% { transform: translate(-50%, -56px) scale(1.05); opacity: 1; }
  100% { transform: translate(-50%, -84px) scale(0.85); opacity: 0; }
}

/* Reveal Unwrap Drama & Outcome Cinematics */
.unwrap-card {
  position: relative;
  overflow: hidden;
}
.unwrap-card.unwrap-dramatic {
  animation: unwrapShakeThenPop 0.72s cubic-bezier(0.22, 1.35, 0.5, 1) both;
}
.unwrap-card.unwrap-coal {
  animation: coalSootShake 0.65s ease-in-out both;
  border-color: #4b4b54;
}
.unwrap-card.unwrap-grinch {
  animation: grinchCackleBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  border-color: #2ecc71;
  box-shadow: 0 0 24px rgba(46, 204, 113, 0.45), var(--shadow-lg);
}
.unwrap-card.unwrap-jackpot {
  box-shadow: 0 0 28px rgba(244, 196, 48, 0.65), var(--shadow-lg);
}

.unwrap-burst-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.84rem;
  margin-bottom: 8px;
  animation: splashCardPop 0.4s ease-out both;
}
.unwrap-burst-badge.is-jackpot {
  background: linear-gradient(180deg, #ffe97d 0%, #f4c430 100%);
  color: #3a2400;
  border: 1.5px solid #c99700;
}
.unwrap-burst-badge.is-coal {
  background: #2b2b2f;
  color: #f3f3f7;
  border: 1.5px solid #000;
}
.unwrap-burst-badge.is-grinch {
  background: #174224;
  color: #b7ffca;
  border: 1.5px solid #2ecc71;
}

@keyframes unwrapShakeThenPop {
  0% { transform: scale(0.82) rotate(-4deg); opacity: 0; }
  22% { transform: scale(0.95) rotate(5deg); opacity: 1; }
  42% { transform: scale(0.99) rotate(-5deg); }
  62% { transform: scale(1.05) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes coalSootShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-8px) rotate(-2deg); }
  30% { transform: translateX(8px) rotate(2deg); }
  45% { transform: translateX(-6px) rotate(-1deg); }
  60% { transform: translateX(6px) rotate(1deg); }
  75% { transform: translateX(-3px); }
}
@keyframes grinchCackleBounce {
  0% { transform: scale(0.88) rotate(-3deg); }
  40% { transform: scale(1.06) translateY(-6px) rotate(3deg); }
  70% { transform: scale(0.98) translateY(2px) rotate(-2deg); }
  100% { transform: scale(1) translateY(0) rotate(0deg); }
}

/* 3. Twinkle the Elf Guide Speech-Bubble Bar */
.elf-guide-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(255, 250, 240, 0.98) 0%, rgba(252, 237, 206, 0.98) 100%);
  color: var(--ink);
  border: 3px solid var(--gold);
  border-radius: 18px;
  padding: 10px 12px;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), 0 0 14px rgba(244, 196, 48, 0.25);
}

.elf-guide-banner.is-action {
  border-color: var(--cranberry);
  background: linear-gradient(135deg, #fff8eb 0%, #ffe6ea 100%);
  box-shadow: 0 6px 20px rgba(200, 16, 46, 0.3), 0 0 18px rgba(244, 196, 48, 0.45);
}

.elf-avatar-bob {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, #1b7a46 0%, #0f4d2b 100%);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  animation: elfBob 1.7s ease-in-out infinite alternate;
}

.elf-speech {
  flex: 1;
  min-width: 0;
}
.elf-name-tag {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--cranberry);
  margin-bottom: 1px;
}
.elf-message {
  font-weight: 800;
  font-size: 0.94rem;
  color: var(--pine-dark);
  line-height: 1.3;
}

.elf-arrow-pulse {
  font-size: 1.35rem;
  flex-shrink: 0;
  animation: arrowBounceDown 0.9s ease-in-out infinite alternate;
}

@keyframes elfBob {
  0% { transform: translateY(0) rotate(-3deg); }
  100% { transform: translateY(-4px) rotate(3deg); }
}
@keyframes arrowBounceDown {
  0% { transform: translateY(-2px) scale(0.95); }
  100% { transform: translateY(5px) scale(1.12); }
}

/* Stash Wizard 3-Step Visual Stepper Progress Track */
.stash-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 14px;
  padding: 8px;
  background: rgba(15, 61, 46, 0.06);
  border: 1.5px solid var(--cream-border);
  border-radius: 16px;
}

.stepper-node {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 6px;
  border-radius: 12px;
  border: 2px solid var(--cream-border);
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}

.stepper-node.is-active {
  border-color: var(--gold);
  background: linear-gradient(135deg, #fffdf2 0%, #fff0bd 100%);
  color: var(--cranberry-dark);
  animation: stepperHalo 1.6s ease-in-out infinite;
}

.stepper-node.is-done {
  border-color: var(--green-ok);
  background: #edfaf2;
  color: #0e522b;
}

.stepper-node.is-done .stepper-icon {
  animation: checkPop 0.35s cubic-bezier(0.34, 1.7, 0.64, 1);
}

.stepper-connector {
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--gold-dark);
  flex-shrink: 0;
  user-select: none;
}

@keyframes stepperHalo {
  0%, 100% { box-shadow: 0 0 0 2px rgba(244, 196, 48, 0.35); transform: scale(1); }
  50% { box-shadow: 0 0 0 5px rgba(244, 196, 48, 0.65), 0 4px 12px rgba(244, 196, 48, 0.35); transform: scale(1.03); }
}

@keyframes checkPop {
  0% { transform: scale(0.4); }
  70% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Pick Phase Actionable Present Wiggle / Shimmer + Badges */
.present-card.present-actionable {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 2px rgba(244, 196, 48, 0.45), 0 6px 0 rgba(0, 0, 0, 0.25), var(--shadow-sm);
  animation: presentWiggle 2.4s ease-in-out infinite;
}

.present-card.present-actionable::before {
  opacity: 0.45;
}

.action-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  background: linear-gradient(180deg, #ffe97d 0%, #f4c430 100%);
  color: #3a2300;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  animation: badgePulse 1.5s ease-in-out infinite alternate;
}

.action-cta-badge.is-steal {
  background: linear-gradient(180deg, #ff7086 0%, #c8102e 100%);
  color: #ffffff;
}

@keyframes presentWiggle {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  12% { transform: rotate(-1.5deg) translateY(-2px); }
  24% { transform: rotate(1.5deg) translateY(-3px); }
  36% { transform: rotate(-1deg) translateY(-1px); }
  48% { transform: rotate(0deg) translateY(0); }
}

@keyframes badgePulse {
  0% { transform: scale(0.97); }
  100% { transform: scale(1.06); }
}

/* ---------------- Steal Surprise Character Cameo Animation ---------------- */

.steal-cameo-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 44%, rgba(200, 16, 46, 0.36) 0%, rgba(5, 22, 16, 0.86) 72%);
  backdrop-filter: blur(5px);
  cursor: pointer;
  animation: splashFadeIn 0.2s ease-out both;
}

.steal-cameo-overlay.theme-grinch {
  background: radial-gradient(circle at 50% 44%, rgba(46, 204, 113, 0.36) 0%, rgba(5, 22, 16, 0.88) 72%);
}

.steal-cameo-overlay.theme-frosty,
.steal-cameo-overlay.theme-penguin {
  background: radial-gradient(circle at 50% 44%, rgba(72, 184, 255, 0.36) 0%, rgba(5, 22, 16, 0.88) 72%);
}

.steal-cameo-overlay.is-leaving {
  pointer-events: none;
  animation: splashFadeOut 0.32s ease-in forwards;
}

.steal-cameo-stage {
  position: relative;
  width: min(92vw, 440px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: cameoStageSpring 0.48s cubic-bezier(0.22, 1.5, 0.45, 1) both;
}

.steal-shock-burst {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 210px;
  height: 150px;
  pointer-events: none;
}

.shock-ray {
  position: absolute;
  font-size: 1.75rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  animation: shockRayPop 0.55s ease-out infinite alternate;
}
.shock-ray.r1 { top: 6px; left: 4px; animation-delay: 0s; }
.shock-ray.r2 { top: 2px; right: 6px; animation-delay: 0.14s; }
.shock-ray.r3 { bottom: 18px; left: -6px; animation-delay: 0.28s; }
.shock-ray.r4 { bottom: 14px; right: -4px; animation-delay: 0.42s; }

.steal-puppet-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: -14px;
}

.steal-puppet-avatar {
  font-size: clamp(4.6rem, 18vw, 6.2rem);
  line-height: 1;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
  transform-origin: bottom center;
}

.steal-puppet-eyes {
  position: absolute;
  top: -6px;
  right: -18px;
  font-size: 2.15rem;
  background: #ffffff;
  border: 3px solid var(--cranberry);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  animation: eyesBugOut 0.45s cubic-bezier(0.34, 1.8, 0.64, 1) infinite alternate;
}

.steal-comic-badge {
  margin-top: -6px;
  background: linear-gradient(180deg, #ffe047 0%, #f4a900 100%);
  color: #3a1200;
  border: 3px solid #ffffff;
  border-radius: 999px;
  padding: 4px 16px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 4px 0 var(--cranberry-dark), 0 6px 16px rgba(0, 0, 0, 0.45);
  transform: rotate(-2deg);
  animation: comicBadgeSlam 0.45s cubic-bezier(0.22, 1.6, 0.45, 1) both;
}

/* Distinct Character Surprise Motions */
.motion-jump-spin .steal-puppet-avatar {
  animation: charJumpSpin 0.85s cubic-bezier(0.22, 1.4, 0.45, 1) infinite alternate;
}
.motion-gasp-wobble .steal-puppet-avatar {
  animation: charGaspWobble 0.55s ease-in-out infinite alternate;
}
.motion-antler-boing .steal-puppet-avatar {
  animation: charAntlerBoing 0.6s cubic-bezier(0.34, 1.7, 0.64, 1) infinite alternate;
}
.motion-hat-flip .steal-puppet-avatar {
  animation: charHatFlip 0.75s ease-in-out infinite;
}
.motion-sneaky-cackle .steal-puppet-avatar {
  animation: charSneakyCackle 0.5s ease-in-out infinite alternate;
}
.motion-cookie-jitter .steal-puppet-avatar {
  animation: charCookieJitter 0.36s linear infinite;
}
.motion-jaw-drop .steal-puppet-avatar {
  animation: charJawDrop 0.65s cubic-bezier(0.22, 1.5, 0.5, 1) infinite alternate;
}
.motion-flipper-flap .steal-puppet-avatar {
  animation: charFlipperFlap 0.48s ease-in-out infinite alternate;
}

.steal-speech-card {
  position: relative;
  z-index: 1;
  width: 100%;
  background: linear-gradient(145deg, #fffdf7 0%, #fff0c7 100%);
  color: var(--ink);
  border: 4px solid var(--gold);
  border-radius: 24px;
  padding: 22px 16px 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 28px rgba(244, 196, 48, 0.4);
}

.steal-char-title {
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--cranberry);
  margin-bottom: 4px;
}

.steal-speech-quote {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5vw, 1.72rem);
  font-weight: 700;
  color: var(--pine-dark);
  line-height: 1.2;
  margin-bottom: 10px;
}

.steal-heist-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #ffffff;
  border: 2px dashed var(--cranberry);
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 8px;
  overflow: hidden;
}

.heist-victim,
.heist-thief {
  font-weight: 900;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40%;
}

.heist-flying-gift {
  font-size: 1.4rem;
  display: inline-block;
  flex-shrink: 0;
  animation: giftSwoopAcross 0.85s cubic-bezier(0.3, 1.2, 0.4, 1) infinite;
}

.steal-counter-note {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink-muted);
}

@keyframes cameoStageSpring {
  0% { transform: translateY(60px) scale(0.68); opacity: 0; }
  65% { transform: translateY(-8px) scale(1.04); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes shockRayPop {
  0% { transform: scale(0.75) rotate(-12deg); opacity: 0.55; }
  100% { transform: scale(1.25) rotate(12deg); opacity: 1; }
}
@keyframes eyesBugOut {
  0% { transform: scale(0.92) rotate(-6deg); }
  100% { transform: scale(1.18) rotate(8deg); }
}
@keyframes comicBadgeSlam {
  0% { transform: scale(2.1) rotate(-10deg); opacity: 0; }
  70% { transform: scale(0.92) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(-2deg); opacity: 1; }
}
@keyframes charJumpSpin {
  0% { transform: translateY(0) scale(0.96) rotate(-6deg); }
  50% { transform: translateY(-16px) scale(1.12) rotate(8deg); }
  100% { transform: translateY(-6px) scale(1.05) rotate(-4deg); }
}
@keyframes charGaspWobble {
  0% { transform: scale(0.94, 1.06) rotate(-7deg); }
  100% { transform: scale(1.1, 0.94) translateY(-8px) rotate(7deg); }
}
@keyframes charAntlerBoing {
  0% { transform: translateY(4px) scale(1.06, 0.88); }
  100% { transform: translateY(-18px) scale(0.94, 1.14); }
}
@keyframes charHatFlip {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-14px) rotate(-12deg) scale(1.08); }
  55% { transform: translateY(-6px) rotate(12deg) scale(1.05); }
  80% { transform: translateY(-10px) rotate(-5deg); }
}
@keyframes charSneakyCackle {
  0% { transform: translateY(2px) translateX(-5px) rotate(-8deg) scale(0.98); }
  100% { transform: translateY(-10px) translateX(5px) rotate(8deg) scale(1.1); }
}
@keyframes charCookieJitter {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-5px, -4px) rotate(-6deg); }
  50% { transform: translate(5px, -8px) rotate(6deg); }
  75% { transform: translate(-4px, -2px) rotate(-4deg); }
}
@keyframes charJawDrop {
  0% { transform: scale(1, 0.92) translateY(2px); }
  100% { transform: scale(0.95, 1.18) translateY(-12px); }
}
@keyframes charFlipperFlap {
  0% { transform: translateY(0) rotate(-11deg) scale(0.97); }
  100% { transform: translateY(-12px) rotate(11deg) scale(1.09); }
}

.steal-cameo-overlay.theme-lockdown {
  background: radial-gradient(circle at 50% 44%, rgba(244, 196, 48, 0.42) 0%, rgba(16, 18, 28, 0.9) 72%);
}
.steal-cameo-overlay.theme-jackpot {
  background: radial-gradient(circle at 50% 44%, rgba(244, 196, 48, 0.46) 0%, rgba(12, 34, 22, 0.88) 72%);
}
.steal-cameo-overlay.theme-coal {
  background: radial-gradient(circle at 50% 44%, rgba(75, 75, 90, 0.5) 0%, rgba(12, 12, 16, 0.9) 72%);
}
.steal-cameo-overlay.theme-decoy {
  background: radial-gradient(circle at 50% 44%, rgba(135, 168, 200, 0.35) 0%, rgba(12, 24, 34, 0.88) 72%);
}

.cameo-lock-stamp {
  display: inline-block;
  margin-top: 2px;
  margin-bottom: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe97d 0%, #f4c430 100%);
  color: #3a2300;
  border: 2px solid #8a5a00;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.4px;
  animation: lockSlam 0.45s cubic-bezier(0.22, 1.5, 0.5, 1) both;
}

.cameo-chain-pill {
  display: inline-block;
  margin-top: 2px;
  margin-bottom: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff7086 0%, #c8102e 100%);
  color: #ffffff;
  border: 2px solid #ffe066;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  animation: comicBadgeSlam 0.45s cubic-bezier(0.22, 1.6, 0.45, 1) both;
}

/* ---------------- Inline Character Emote Strips (Reveal, Peek, Scoreboard, Objectives) ---------------- */

.unwrap-char-emote,
.poker-face-coach,
.round-emote-callout,
.objective-plottwist-cheer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 16px;
  border: 2.5px solid var(--gold);
  background: linear-gradient(135deg, #fffdf7 0%, #fff2cc 100%);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.unwrap-char-emote {
  margin: 10px 0 4px;
}

.poker-face-coach {
  margin: 10px 0 6px;
  border-style: dashed;
}

.round-callout-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.round-emote-callout {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3), 0 0 16px rgba(244, 196, 48, 0.25);
  animation: splashCardPop 0.4s cubic-bezier(0.22, 1.4, 0.45, 1) both;
}

.objective-plottwist-cheer {
  margin-bottom: 12px;
  border-color: var(--cranberry);
  background: linear-gradient(135deg, #fff8e6 0%, #ffe6ea 100%);
  animation: splashCardPop 0.45s cubic-bezier(0.22, 1.4, 0.45, 1) both;
}

/* Theme variants for inline character strips */
.unwrap-char-emote.theme-jackpot,
.poker-face-coach.theme-jackpot {
  border-color: var(--gold-dark);
  background: linear-gradient(135deg, #fffdf2 0%, #ffe999 100%);
}
.unwrap-char-emote.theme-coal {
  border-color: #4b4b54;
  background: linear-gradient(135deg, #f3f3f6 0%, #e1e1e8 100%);
}
.unwrap-char-emote.theme-grinch,
.poker-face-coach.theme-grinch,
.round-emote-callout.theme-grinch {
  border-color: #2ecc71;
  background: linear-gradient(135deg, #eefcf3 0%, #d4f7e0 100%);
}
.unwrap-char-emote.theme-decoy,
.poker-face-coach.theme-decoy {
  border-color: #7ea3c4;
  background: linear-gradient(135deg, #f5f9fc 0%, #e4eef7 100%);
}
.unwrap-char-emote.theme-own {
  border-color: var(--cranberry-light);
  background: linear-gradient(135deg, #fff7f8 0%, #ffe5ea 100%);
}
.unwrap-char-emote.theme-nice,
.poker-face-coach.theme-nice {
  border-color: var(--green-ok);
  background: linear-gradient(135deg, #f4fcf7 0%, #fff4d2 100%);
}
.round-emote-callout.theme-stealth {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #f3f8ff 0%, #e0edff 100%);
}

/* Mini animated character puppet */
.char-puppet-mini {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #ffffff;
  border: 2px solid rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.14);
}

.char-puppet-avatar {
  font-size: 2.15rem;
  line-height: 1;
  display: inline-block;
  transform-origin: bottom center;
}

.char-puppet-eyes {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--cranberry);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  animation: eyesBugOut 0.6s cubic-bezier(0.34, 1.8, 0.64, 1) infinite alternate;
}

/* Reuse character motion animations on inline mini puppets */
.motion-jump-spin .char-puppet-avatar {
  animation: charJumpSpin 0.95s cubic-bezier(0.22, 1.4, 0.45, 1) infinite alternate;
}
.motion-gasp-wobble .char-puppet-avatar {
  animation: charGaspWobble 0.65s ease-in-out infinite alternate;
}
.motion-antler-boing .char-puppet-avatar {
  animation: charAntlerBoing 0.7s cubic-bezier(0.34, 1.7, 0.64, 1) infinite alternate;
}
.motion-hat-flip .char-puppet-avatar {
  animation: charHatFlip 0.9s ease-in-out infinite;
}
.motion-sneaky-cackle .char-puppet-avatar {
  animation: charSneakyCackle 0.6s ease-in-out infinite alternate;
}
.motion-cookie-jitter .char-puppet-avatar {
  animation: charCookieJitter 0.45s linear infinite;
}
.motion-jaw-drop .char-puppet-avatar {
  animation: charJawDrop 0.75s cubic-bezier(0.22, 1.5, 0.5, 1) infinite alternate;
}
.motion-flipper-flap .char-puppet-avatar {
  animation: charFlipperFlap 0.55s ease-in-out infinite alternate;
}

.char-reaction-body {
  min-width: 0;
  flex: 1;
}

.char-reaction-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 3px;
}

.char-reaction-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe46b 0%, #f4b400 100%);
  color: #3a1a00;
  border: 1.5px solid #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
}

.char-reaction-name {
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--cranberry-dark);
}

.char-reaction-quote {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--pine-dark);
  line-height: 1.3;
}

/* ---------------- Reduced Motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .splash-coin-drop,
  .coin-arc-pop {
    display: none !important;
  }
}

/* ---------------- 6-Scene Intro Story & How-To-Play Cartoon Theater ---------------- */

.cartoon-overlay {
  position: fixed;
  inset: 0;
  height: 100dvh;
  max-height: 100dvh;
  z-index: 96;
  background: radial-gradient(circle at 50% 30%, rgba(244, 196, 48, 0.25) 0%, rgba(5, 22, 16, 0.94) 75%);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 10px calc(8px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  animation: splashFadeIn 0.22s ease-out both;
}

.cartoon-theater {
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 760px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}

.cartoon-progress-bars {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  padding: 0 2px;
}

.cartoon-story-seg {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: none;
  padding: 0;
}

.cartoon-story-seg::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  border-radius: 999px;
}

.cartoon-story-seg.is-done::after {
  width: 100%;
}

.cartoon-story-seg.is-active.is-playing::after {
  animation: storySegFill 5.8s linear forwards;
}

.cartoon-story-seg.is-active:not(.is-playing)::after {
  width: 65%;
}

@keyframes storySegFill {
  from { width: 0%; }
  to { width: 100%; }
}

.cartoon-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
}

.cartoon-chapter-pill {
  background: rgba(244, 196, 48, 0.2);
  border: 1.5px solid var(--gold);
  color: var(--gold-light);
  font-weight: 900;
  font-size: 0.74rem;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cartoon-stage {
  flex: 1 1 0;
  min-height: 155px;
  position: relative;
  border-radius: 20px;
  border: 3px solid var(--gold);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45), inset 0 0 40px rgba(0,0,0,0.35);
  cursor: pointer;
}

.cartoon-stage.scene-vault {
  background: radial-gradient(circle at 30% 40%, rgba(255, 224, 102, 0.32), transparent 65%), linear-gradient(180deg, #103c2c 0%, #092319 100%);
}

.cartoon-stage.scene-stash {
  background: radial-gradient(circle at 70% 35%, rgba(53, 224, 117, 0.25), transparent 65%), linear-gradient(180deg, #12354a 0%, #091d29 100%);
}

.cartoon-stage.scene-hazards {
  background: radial-gradient(circle at 50% 40%, rgba(46, 204, 113, 0.28), transparent 65%), linear-gradient(180deg, #23252c 0%, #111317 100%);
}

.cartoon-stage.scene-heist {
  background: radial-gradient(circle at 50% 45%, rgba(200, 16, 46, 0.35), transparent 65%), linear-gradient(180deg, #4a0e1b 0%, #1f050b 100%);
}

.cartoon-stage.scene-poker {
  background: radial-gradient(circle at 50% 35%, rgba(244, 196, 48, 0.28), transparent 65%), linear-gradient(180deg, #2a1b4e 0%, #130b26 100%);
}

.cartoon-stage.scene-unwrap {
  background: radial-gradient(circle at 50% 40%, rgba(255, 224, 71, 0.45), transparent 70%), linear-gradient(180deg, #7a0b1e 0%, #0f3d2e 100%);
}

.cartoon-stage-inner {
  width: 100%;
  height: 100%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: splashCardPop 0.38s cubic-bezier(0.22, 1.4, 0.45, 1) both;
}

.c-big-emoji {
  font-size: clamp(2.8rem, 11vw, 3.8rem);
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.45));
  display: inline-block;
}

/* Scene 1 (stage-vault) */
.stage-vault {
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

.c-rudolph-sneeze {
  position: relative;
  display: flex;
  align-items: center;
  animation: cartoonSneeze 1.4s ease-in-out infinite;
}

.c-sneeze-blast {
  font-size: 1.5rem;
  margin-left: -4px;
  animation: sneezeGust 1.4s ease-out infinite;
}

.c-flying-coins {
  position: relative;
  width: 70px;
  height: 80px;
}

.c-arc-coin {
  position: absolute;
  left: 0;
  top: 45%;
  font-size: 1.45rem;
  animation: cartoonCoinFly 1.4s cubic-bezier(0.25, 0.8, 0.35, 1) infinite;
}

.c-arc-coin.c2 { animation-delay: 0.25s; }
.c-arc-coin.c3 { animation-delay: 0.5s; }
.c-arc-coin.c4 { animation-delay: 0.75s; }

.c-tree-presents {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.c-tree {
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
}

.c-gift-row {
  display: flex;
  gap: 6px;
}

.c-gift-box {
  font-size: 1.7rem;
  display: inline-block;
  animation: presentWiggle 1.4s ease-in-out infinite;
}

.c-gift-box.g2 { animation-delay: 0.25s; }
.c-gift-box.g3 { animation-delay: 0.5s; }

/* Scene 2 (stage-stash) */
.c-elf-tiptoe {
  display: flex;
  align-items: center;
  gap: 4px;
  animation: cartoonTiptoe 1.8s ease-in-out infinite alternate;
}

.c-shh-bubble {
  background: #fff;
  color: var(--ink);
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 2px solid var(--gold);
  font-weight: 900;
}

.c-stash-boxes {
  display: flex;
  gap: 14px;
  margin: 6px 0;
}

.c-stash-target {
  position: relative;
  background: rgba(255,255,255,0.12);
  border: 2px solid var(--gold);
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.c-box-icon {
  font-size: 1.9rem;
  line-height: 1;
}

.c-box-lbl {
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--cream);
}

.c-drop-badge {
  background: linear-gradient(180deg, #ffe97d, #f4c430);
  color: #3a2300;
  font-weight: 900;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1.5px solid #fff;
  animation: badgeDropBounce 1.4s ease-in-out infinite alternate;
}

.c-drop-badge.b-big {
  background: linear-gradient(180deg, #ff7086, #c8102e);
  color: #fff;
  animation-delay: 0.4s;
}

.c-floating-clue {
  background: var(--cream);
  color: var(--pine-dark);
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 4px 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  animation: clueFloat 1.6s ease-in-out infinite alternate;
}

/* Scene 3 (stage-hazards) */
.c-hazard-duo {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
  align-items: stretch;
}

.c-hazard-card {
  flex: 1;
  max-width: 175px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.28);
  border-radius: 16px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.c-hazard-card.h-coal {
  border-color: #7f8c8d;
}

.c-hazard-card.h-grinch {
  border-color: #2ecc71;
  box-shadow: 0 0 18px rgba(46,204,113,0.25);
}

.c-chimney-drop {
  font-size: 1.6rem;
  animation: chimneyDrop 1.3s ease-in infinite;
}

.c-grinch-creep {
  font-size: 1.7rem;
  animation: charSneakyCackle 0.75s ease-in-out infinite alternate;
}

.c-hazard-pill {
  font-size: 0.72rem !important;
  padding: 2px 8px !important;
}

/* Scene 4 (stage-heist) */
.c-heist-scene {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  gap: 6px;
}

.c-heist-victim, .c-heist-thief {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.c-heist-victim .c-big-emoji {
  animation: charCookieJitter 0.45s linear infinite;
}

.c-heist-thief .c-big-emoji {
  animation: charFlipperFlap 0.55s ease-in-out infinite alternate;
}

.c-gasp-tag, .c-smirk-tag {
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 2px solid var(--cranberry);
}

.c-heist-flight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.c-yoink-gift {
  font-size: 2.1rem;
  display: inline-block;
  animation: giftSwoopAcross 0.9s cubic-bezier(0.3, 1.2, 0.4, 1) infinite;
}

.c-lock-drop {
  background: linear-gradient(180deg, #ffe97d, #f4c430);
  color: #3a2300;
  font-weight: 900;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1.5px solid #fff;
  animation: badgePulse 1.2s ease-in-out infinite alternate;
}

/* Scene 5 (stage-poker) */
.c-poker-split {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.c-poker-card {
  flex: 1;
  max-width: 185px;
  background: rgba(255,255,255,0.12);
  border: 2px solid var(--gold);
  border-radius: 15px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.c-poker-card.p-trap {
  border-color: #2ecc71;
}

.c-thought-bubble {
  background: #fff;
  color: var(--pine-dark);
  font-weight: 900;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1.5px dashed var(--cranberry);
  animation: badgePulse 1.4s ease-in-out infinite alternate;
}

.c-poker-face {
  font-size: 2.3rem;
  line-height: 1.1;
  animation: charGaspWobble 0.9s ease-in-out infinite alternate;
}

.c-poker-caption {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--gold-light);
  font-weight: 700;
}

/* Scene 6 (stage-unwrap) */
.c-unwrap-finale {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.c-burst-gifts {
  display: flex;
  align-items: center;
  gap: 12px;
}

.c-pop-gift {
  font-size: 2.4rem;
  display: inline-block;
  animation: giftShakeBurst 0.65s ease-in-out infinite;
}

.c-squirrel-return {
  background: linear-gradient(180deg, #ffe97d, #f4c430);
  color: #3a2300;
  font-weight: 900;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  animation: bounceFestive 0.8s ease-in-out infinite alternate;
}

.c-mini-podium {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.c-pod {
  font-weight: 900;
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 10px 10px 4px 4px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

.c-pod.p1 {
  background: linear-gradient(180deg, var(--gold), #b8860b);
  color: #362300;
  border: 2px solid #fff;
  min-height: 46px;
  font-size: 0.95rem;
  animation: crownPulse 0.8s ease-in-out infinite alternate;
}

.c-pod.p2 {
  background: linear-gradient(180deg, #cfd6df, #7d8794);
  color: #1c2229;
  min-height: 36px;
}

.c-pod.p3 {
  background: linear-gradient(180deg, #d99b66, #8f5629);
  min-height: 32px;
}

/* Cartoon Dialogue Card & Controls */
.cartoon-dialogue-card {
  background: linear-gradient(145deg, #fffdf7 0%, #fff0c7 100%);
  color: var(--ink);
  border: 3px solid var(--gold);
  border-radius: 18px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.cartoon-narrator-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cartoon-scene-title {
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 4.5vw, 1.4rem);
  font-weight: 700;
  color: var(--cranberry-dark);
  margin: 0;
  line-height: 1.15;
}

.cartoon-story-text {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--pine-dark);
  line-height: 1.32;
  margin: 0;
}

.cartoon-tip-box {
  background: rgba(15, 61, 46, 0.08);
  border-left: 3px solid var(--pine-light);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.cartoon-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  padding: 2px 0;
}

.cartoon-step-indicator {
  font-size: 0.74rem;
  font-weight: 900;
  color: rgba(255, 250, 240, 0.85);
}

.cartoon-overlay.is-closing {
  pointer-events: none;
  animation: splashFadeOut 0.28s ease-in forwards;
}

.cartoon-seg-track {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
}

.cartoon-seg-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  border-radius: 999px;
  transition: width 0.06s linear;
}

.cartoon-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.char-narrator-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.char-puppet-mini .cp-avatar {
  font-size: 1.95rem;
  line-height: 1;
  display: inline-block;
  animation: charGaspWobble 0.8s ease-in-out infinite alternate;
}

.char-puppet-mini .cp-eyes {
  position: absolute;
  tonite alternate;
}

.char-puppet-mini .cp-eyes {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--cranberry);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  animation: eyesBugOut 0.6s cubic-bezier(0.34, 1.8, 0.64, 1) infinite alternate;
}

.char-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.cartoon-counter-dots {
  font-size: 0.74rem;
  font-weight: 900;
  color: rgba(255, 250, 240, 0.88);
  text-align: center;
}

/* Keyframe Animations */
@keyframes cartoonSneeze {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.08) rotate(-3deg); }
}

@keyframes sneezeGust {
  0%, 20% { opacity: 0; transform: scale(0.6) translateX(-5px); }
  50% { opacity: 1; transform: scale(1.1) translateX(4px); }
  100% { opacity: 0; transform: scale(1.3) translateX(12px); }
}

@keyframes cartoonCoinFly {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  30% { opacity: 1; transform: translate(45px, -35px) scale(1.1); }
  100% { opacity: 0; transform: translate(90px, 15px) scale(0.8); }
}

@keyframes cartoonTiptoe {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-6px) rotate(-1.5deg); }
}

@keyframes badgeDropBounce {
  0% { transform: translateY(-4px); }
  100% { transform: translateY(4px); }
}

@keyframes clueFloat {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-5px); }
}

@keyframes chimneyDrop {
  0% { transform: translateY(-10px); opacity: 0.2; }
  50% { transform: translateY(0px); opacity: 1; }
  100% { transform: translateY(10px); opacity: 0.2; }
}

  background: radial-gradient(ellipse at 50% 25%, #fffef9 0%, #fcedc8 62%, #ebd094 100%);
  color: #2b1704;
  border: 2.5px solid #d4a024;
  border-radius: 18px;
  padding: 12px 16px 11px;
  position: relative;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 22px rgba(244, 196, 48, 0.22), inset 0 0 24px rgba(168, 108, 12, 0.16);
  flex-shrink: 0;
  overflow: hidden;
  animation: parchmentUnfurl 0.5s cubic-bezier(0.22, 1.3, 0.36, 1) both;
}
.clue-parchment-hero::before,
.clue-parchment-hero::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(168, 108, 12, 0.28);
  border-radius: 13px;
  pointer-events: none;
}
.clue-wax-seal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #b80d27 0%, #750516 100%);
  color: #ffeba8;
  border: 1.5px solid #f4c430;
  border-radius: 999px;
  padding: 2px 11px;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.32);
  margin-bottom: 3px;
}
.clue-cursive-text {
  font-family: var(--font-cursive);
  font-size: clamp(1.7rem, 6.8vw, 2.4rem);
  font-weight: 700;
  color: #2a1402;
  line-height: 1.16;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  margin: 2px 0;
  word-break: break-word;
}
.clue-author-sig {
  font-family: var(--font-cursive);
  font-size: 1.05rem;
  font-weight: 700;
  color: #7b4814;
  margin-top: 1px;
}
.cursive-input {
  font-family: var(--font-cursive) !important;
  font-size: 1.65rem !important;
  font-weight: 700 !important;
  color: #2a1402 !important;
  background: linear-gradient(180deg, #fffef9 0%, #faecc8 100%) !important;
  border: 2.5px solid #d4a024 !important;
  border-radius: 14px !important;
  text-align: center;
  padding: 8px 12px !important;
  box-shadow: inset 0 2px 8px rgba(168, 108, 12, 0.14);
}
.cursive-clue-inline {
  font-family: var(--font-cursive);
  font-size: 1.38rem;
  font-weight: 700;
  color: #2a1402;
  line-height: 1.15;
}

/* Minimalist Single-Option Turn Stage & Spotlight */
.turn-minimal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 2px 4px;
}
.turn-minimal-kicker {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--gold-light);
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}
.present-card.is-targeted {
  outline: 3.5px solid #ffe066 !important;
  transform: translateY(-3px) scale(1.04) !important;
  box-shadow: 0 0 24px rgba(255, 224, 102, 0.8), 0 8px 18px rgba(0, 0, 0, 0.5) !important;
  z-index: 5;
}
.single-action-dock {
  flex-shrink: 0;
  width: 100%;
  padding-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.btn-single-hero {
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  font-size: 1.04rem;
  font-weight: 900;
  letter-spacing: 0.4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.48), 0 0 20px rgba(244, 196, 48, 0.28);
  animation: splashCardPop 0.25s cubic-bezier(0.22, 1.4, 0.45, 1) both;
}

/* High-Tension Curtain & Suspense Unwrap Stage */
.tension-curtain-stage {
  flex: 1;
  min-height: 0;
  background: radial-gradient(circle at 50% 42%, rgba(244, 196, 48, 0.24) 0%, rgba(11, 38, 28, 0.96) 74%);
  border: 2.5px solid rgba(244, 196, 48, 0.55);
  border-radius: 22px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  box-shadow: inset 0 0 56px rgba(0, 0, 0, 0.65), var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.tension-act-label {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(244, 196, 48, 0.14);
  border: 1px solid rgba(244, 196, 48, 0.45);
  padding: 3px 12px;
  border-radius: 999px;
}
.tension-cursive-sub {
  font-family: var(--font-cursive);
  font-size: clamp(1.45rem, 5.5vw, 1.95rem);
  color: #ffe8a3;
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.suspense-box-shaker {
  font-size: clamp(4.2rem, 16vw, 5.6rem);
  line-height: 1;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.65));
  animation: tensionBoxTremble 0.12s ease-in-out infinite alternate;
  position: relative;
  z-index: 2;
}
.suspense-heartbeat-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 140px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2.5px solid rgba(244, 196, 48, 0.55);
  animation: tensionPulseRing 0.95s ease-out infinite;
  pointer-events: none;
}
.stagger-reveal-item {
  animation: staggerLineIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Keyframes */
@keyframes parchmentUnfurl {
  0% { transform: scaleY(0.75) scaleX(0.94); opacity: 0; }
  100% { transform: scaleY(1) scaleX(1); opacity: 1; }
}

@keyframes tensionBoxTremble {
  0% { transform: translate(-4px, 2px) rotate(-6deg) scale(1.02); }
  50% { transform: translate(4px, -3px) rotate(6deg) scale(1.08); }
  100% { transform: translate(-3px, -2px) rotate(-4deg) scale(1.04); }
}

@keyframes tensionPulseRing {
  0% { transform: translate(-50%, -50%) scale(0.65); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(1.85); opacity: 0; }
}

@keyframes staggerLineIn {
  0% { transform: translateY(12px) scale(0.96); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* NFC Scan-First Prompt & Backup On-Screen Picker */
.nfc-scan-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 14px;
  gap: 10px;
  background: radial-gradient(circle at 50% 38%, rgba(244, 196, 48, 0.18) 0%, rgba(15, 61, 46, 0.08) 72%);
  border: 2px dashed rgba(15, 61, 46, 0.25);
  border-radius: 18px;
  margin: 6px 0;
}
.nfc-pulse-wrap {
  position: relative;
  width: 112px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.nfc-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(200, 16, 46, 0.45);
  animation: nfcWaveOut 1.9s ease-out infinite;
  pointer-events: none;
}
.nfc-pulse-ring-2 {
  animation-delay: 0.95s;
  border-color: rgba(244, 196, 48, 0.65);
}
.nfc-pulse-icon {
  position: relative;
  z-index: 2;
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.22));
}
.nfc-scan-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--pine-dark);
  line-height: 1.15;
}
.nfc-scan-sub {
  margin: 0;
  max-width: 290px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-muted);
  line-height: 1.35;
}
.nfc-current-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 14px;
  background: var(--cream-2);
  border: 2px solid var(--gold);
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--pine-dark);
}

.nfc-scan-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(15, 61, 46, 0.95), rgba(25, 86, 63, 0.95));
  border: 2px solid var(--gold);
  border-radius: 14px;
  color: #fffdf5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}
.nfc-scan-banner-icon {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.nfc-banner-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(244, 196, 48, 0.7);
  animation: nfcWaveOut 1.6s ease-out infinite;
  pointer-events: none;
}
.nfc-scan-banner-copy {
  min-width: 0;
  text-align: left;
}
.nfc-scan-banner-title {
  font-weight: 900;
  font-size: 0.92rem;
  color: var(--gold-light);
  line-height: 1.2;
}
.nfc-scan-banner-sub {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 253, 245, 0.92);
  line-height: 1.3;
  margin-top: 2px;
}

.nfc-manual-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 6px;
  background: var(--cream-2);
  border: 1.5px dashed var(--gold);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--pine-dark);
}
.nfc-backup-btn {
  width: 100%;
  opacity: 0.92;
  font-weight: 800;
  border: 1.5px dashed rgba(15, 61, 46, 0.35);
}
.nfc-required-note {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--gold-light);
  text-align: center;
  padding: 6px 8px;
}

@keyframes nfcWaveOut {
  0% { transform: scale(0.55); opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nfc-pulse-ring,
  .nfc-banner-pulse {
    animation: none;
  }
}

/* ==========================================================================
   TACTILE TABLETOP / WAVELENGTH SCREEN-PRINT DESIGN SYSTEM
   Zero glassmorphism • Zero glowing blurs • Solid matte cardstock • Print ink
   ========================================================================== */

:root {
  --paper: #f5efe2;
  --paper-deep: #eae0cc;
  --spruce: #133a2e;
  --spruce-dark: #0c261e;
  --vermilion: #d2342c;
  --vermilion-dark: #a8241d;
  --ochre: #e6a82e;
  --ochre-dark: #c98c16;
  --ink: #181a19;
  --ink-muted: #5a5d58;
  --slate: #264653;
  --plum: #6b2737;
  --forest: #1f5c47;
  --font-editorial: "Fraunces", Georgia, "Times New Roman", serif;
  --font-ui: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: var(--font-editorial);
  --font-body: var(--font-ui);
}

html, body {
  font-family: var(--font-ui);
  background-image: none !important;
  transition: background-color 0.45s ease, color 0.35s ease;
}

/* Scene-Specific Solid Matte Cardstock Palettes */
body[data-scene="home"]       { background-color: var(--spruce);    color: var(--paper); }
body[data-scene="join"]       { background-color: var(--ochre);     color: var(--ink); }
body[data-scene="lobby"]      { background-color: var(--paper);     color: var(--ink); }
body[data-scene="stash"],
body[data-scene="clue"]       { background-color: var(--paper);     color: var(--ink); }
body[data-scene="pick"]       { background-color: var(--paper);     color: var(--ink); }
body[data-scene="reveal"]     { background-color: var(--vermilion); color: var(--paper); }
body[data-scene="vote"]       { background-color: var(--ochre);     color: var(--ink); }
body[data-scene="hide"]       { background-color: var(--spruce);    color: var(--paper); }
body[data-scene="seek"]       { background-color: var(--ochre);     color: var(--ink); }
body[data-scene="hot_coal"]   { background-color: var(--vermilion); color: var(--paper); }
body[data-scene="duel"]       { background-color: var(--spruce);    color: var(--paper); }
body[data-scene="scoreboard"] { background-color: var(--spruce);    color: var(--paper); }
body[data-scene="gameover"]   { background-color: var(--ink);       color: var(--paper); }

/* Keep snow subtle on dark chapters, hidden on matte paper chapters */
#snow-canvas {
  opacity: 0;
  transition: opacity 0.5s ease;
}
body[data-scene="home"] #snow-canvas,
body[data-scene="reveal"] #snow-canvas,
body[data-scene="gameover"] #snow-canvas {
  opacity: 0.24;
}

/* Tactile Risograph Paper Grain Overlay */
.paper-grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
}

/* ---- Wavelength Full-Screen Christmas Screen-Print Curtain Wipe ---- */
.chapter-wipe {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 24px;
  background-color: var(--vermilion);
  color: var(--paper);
  transform: translateY(106%);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  border-top: 8px solid var(--ink);
  border-bottom: 8px solid var(--ink);
}
.chapter-wipe::before,
.chapter-wipe::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background: repeating-linear-gradient(
    -45deg,
    var(--paper) 0 12px,
    var(--vermilion) 12px 24px,
    var(--ochre) 24px 36px,
    var(--spruce) 36px 48px
  );
  border-bottom: 2.5px solid var(--ink);
}
.chapter-wipe::before { top: 0; }
.chapter-wipe::after {
  bottom: 0;
  border-bottom: none;
  border-top: 2.5px solid var(--ink);
}
.chapter-wipe.is-covering {
  transform: translateY(0%);
  pointer-events: auto;
  cursor: pointer;
}
.chapter-wipe.is-exiting {
  transform: translateY(-106%);
  transition: transform 0.62s cubic-bezier(0.65, 0, 0.35, 1);
}

.chapter-wipe-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cw-star {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.28;
  animation: cwFloatStar 2.4s ease-in-out infinite alternate;
}
.cw-star.s1 { left: 12%; top: 18%; font-size: 1.8rem; animation-delay: 0s; }
.cw-star.s2 { right: 14%; top: 22%; font-size: 1.5rem; animation-delay: 0.2s; }
.cw-star.s3 { left: 18%; bottom: 20%; font-size: 1.3rem; animation-delay: 0.4s; }
.cw-star.s4 { right: 18%; bottom: 24%; font-size: 1.7rem; animation-delay: 0.15s; }
.cw-star.s5 { left: 50%; top: 12%; font-size: 1.2rem; animation-delay: 0.35s; }
.cw-star.s6 { left: 48%; bottom: 13%; font-size: 1.4rem; animation-delay: 0.25s; }

@keyframes cwFloatStar {
  from { transform: translateY(-6px) rotate(-10deg) scale(0.92); }
  to   { transform: translateY(8px) rotate(12deg) scale(1.1); }
}

.chapter-wipe-crest {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3.5px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  background: var(--paper);
  overflow: hidden;
  margin-bottom: 14px;
  transform: scale(0.75) rotate(-6deg);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.14s, opacity 0.42s ease 0.1s;
}
.chapter-wipe.is-covering .chapter-wipe-crest {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}
.chapter-wipe-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chapter-wipe-kicker {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  opacity: 0.88;
}
.chapter-wipe-title {
  font-family: var(--font-editorial);
  font-size: clamp(2.1rem, 9.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.02;
  margin-top: 6px;
}
.chapter-wipe-sub {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 700;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 2px solid currentColor;
  opacity: 0.92;
}
.chapter-wipe-sub:empty {
  display: none;
}

/* Smooth print-scene entrance ONLY when switching to a new scene */
.print-scene.scene-enter {
  animation: printSceneEnter 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes printSceneEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Minimal Crisp SVG Print HUD ---- */
.print-hud {
  flex-shrink: 0;
  position: relative;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  color: inherit;
}

.print-hud-bar {
  max-width: 620px;
  margin: 0 auto;
  padding: 8px 16px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.print-hud-left,
.print-hud-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hud-circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.75px solid currentColor;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  opacity: 0.78;
  transition: opacity 0.14s ease, transform 0.12s ease;
}
.hud-circle-btn:hover { opacity: 1; }
.hud-circle-btn:active { transform: scale(0.9); }
.hud-circle-btn.is-off {
  opacity: 0.38;
  position: relative;
}
.hud-circle-btn.is-off::after {
  content: "";
  position: absolute;
  width: 64%;
  height: 2px;
  background: currentColor;
  transform: rotate(-38deg);
  pointer-events: none;
}

.print-hud .room-pill {
  background: transparent;
  border: 1.75px solid currentColor;
  color: inherit;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 11px;
  min-height: 30px;
  border-radius: 999px;
}
.print-hud .room-pill .phase-dot {
  width: 6px;
  height: 6px;
  background: var(--vermilion);
  box-shadow: none;
}
body[data-scene="reveal"] .print-hud .room-pill .phase-dot {
  background: var(--ochre);
}

/* ---- Main Stage Layout ---- */
.print-stage-root {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 4px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.print-scene {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
}

.print-scene.scene-enter {
  animation: printSlideUp 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---- Editorial Typography ---- */
.print-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.74;
}

.print-title-xl {
  font-family: var(--font-editorial);
  font-size: clamp(2.5rem, 11vw, 3.6rem);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.025em;
  text-align: center;
  margin: 0;
}

.print-title-lg {
  font-family: var(--font-editorial);
  font-size: clamp(1.75rem, 7.2vw, 2.4rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0;
}

.print-sub-italic {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: clamp(1.05rem, 4vw, 1.25rem);
  text-align: center;
  margin: 0;
  opacity: 0.85;
}

/* ---- Tactile Screen-Print Buttons & Cards ---- */
.print-shadow { box-shadow: 4px 4px 0 var(--ink); }
.print-shadow-sm { box-shadow: 2.5px 2.5px 0 var(--ink); }

.print-btn {
  width: 100%;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 2.25px solid var(--ink);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.15s ease;
}
.print-btn:active:not(:disabled) {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}
.print-btn:disabled {
  opacity: 0.44;
  cursor: not-allowed;
  box-shadow: none;
}

.print-btn-ink { background: var(--ink); color: var(--paper); }
.print-btn-ochre { background: var(--ochre); color: var(--ink); }
.print-btn-vermilion { background: var(--vermilion); color: var(--paper); }
.print-btn-spruce { background: var(--spruce); color: var(--paper); }
.print-btn-paper { background: var(--paper); color: var(--ink); }
.print-btn-outline {
  background: transparent;
  color: inherit;
  border-color: currentColor;
  box-shadow: none;
}
.print-btn-outline:active:not(:disabled) {
  transform: scale(0.98);
  box-shadow: none;
}

.print-pill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}

.print-pill {
  background: transparent;
  color: inherit;
  border: 1.75px solid currentColor;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, transform 0.1s ease;
}
.print-pill:active { transform: scale(0.95); }
.print-pill.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
body[data-scene="scoreboard"] .print-pill.active,
body[data-scene="gameover"] .print-pill.active,
body[data-scene="home"] .print-pill.active {
  background: var(--ochre);
  color: var(--ink);
  border-color: var(--ochre);
}

/* ---- Cover & Join Center Stage ---- */
.print-center-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}

.print-cta-stack {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Join 4-Letter Stamped Ticket Slots */
.ticket-slots-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
  cursor: text;
}
.ticket-slots-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  font-size: 2rem;
  text-transform: uppercase;
  cursor: text;
}
.ticket-slot {
  width: 62px;
  height: 76px;
  border-radius: 14px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  box-shadow: 3.5px 3.5px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-editorial);
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--ink);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.ticket-slot.filled {
  background: #ffffff;
  transform: translateY(-2px);
}
.ticket-slot.is-cursor {
  outline: 3px solid var(--vermilion);
  outline-offset: 2px;
}

/* ---- Prologue / Lobby: Ruled Table Code & Guest Coasters ---- */
.ruled-code-block {
  width: 100%;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 8px 0 10px;
  text-align: center;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  flex-shrink: 0;
}
.ruled-code-letters {
  font-family: var(--font-editorial);
  font-size: clamp(2.2rem, 9vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  line-height: 1.05;
}
.ruled-code-sub {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vermilion);
  margin-top: 2px;
}

.coaster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 2px 2px 6px;
}

.guest-coaster {
  background: #ffffff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 9px 10px;
  box-shadow: 3px 3px 0 var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  transition: transform 0.12s ease;
}
.guest-coaster.clickable { cursor: pointer; }
.guest-coaster.clickable:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.guest-coaster.is-sealed {
  background: var(--spruce);
  color: var(--paper);
}

.coaster-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.guest-coaster.is-sealed .coaster-badge {
  background: var(--ochre);
  color: var(--ink);
}

.coaster-name {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coaster-role {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-top: 1px;
}

/* Inline Lobby Add-Guest Strip */
.print-add-bar {
  flex-shrink: 0;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 3px 3px 0 var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.print-add-bar .avatar-ribbon {
  margin: 0;
  padding: 2px 0;
}
.print-add-bar .avatar-ribbon {
  gap: 8px;
  padding: 5px 3px 6px;
}
.print-add-bar .avatar-pill {
  width: 68px;
  min-height: 78px;
  flex: 0 0 68px;
  border-radius: 14px;
  border: 2px solid rgba(24, 26, 25, 0.25);
  background: var(--paper);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 5px 4px;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}
.print-add-bar .avatar-pill.selected {
  border: 2.5px solid var(--ink);
  background: var(--ochre);
  box-shadow: 3px 3px 0 var(--ink);
  transform: translateY(-2px);
}
.avatar-pill-label {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.05;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sticky Player Identity Badge in Persistent Top HUD */
.header-room {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
}
.hud-identity-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px 2px 3px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  max-width: 185px;
  min-width: 0;
  flex-shrink: 1;
}
.hud-identity-name {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hud-identity-score {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--vermilion);
  flex-shrink: 0;
}
.hud-identity-others {
  display: inline-flex;
  align-items: center;
  margin-left: 1px;
  flex-shrink: 0;
}
.hud-identity-others > * + * {
  margin-left: -6px;
}
.print-input {
  width: 100%;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9rem;
  outline: none;
}
.print-input:focus {
  background: #ffffff;
}

/* ---- Stash Coin Tray (+1 / +3 Brass Tokens) ---- */
.coin-tray {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  flex-shrink: 0;
}
.coin-slot-btn {
  background: #ffffff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 13px;
  padding: 7px 10px;
  box-shadow: 2.5px 2.5px 0 var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease;
}
.coin-slot-btn.active-small {
  background: var(--ochre);
}
.coin-slot-btn.active-big {
  background: var(--vermilion);
  color: var(--paper);
}
.coin-disc {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-editorial);
  font-weight: 900;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.coin-slot-btn.is-placed .coin-disc {
  background: var(--spruce);
  color: var(--paper);
}
.coin-slot-kicker {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.72;
}
.coin-slot-label {
  font-family: var(--font-editorial);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Stitched Paper Clue Slip ---- */
.stitched-clue-slip {
  width: 100%;
  background: #ffffff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 3.5px 3.5px 0 var(--ink);
  text-align: center;
  position: relative;
  flex-shrink: 0;
}
.stitched-clue-slip::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(24, 26, 25, 0.22);
  border-radius: 10px;
  pointer-events: none;
}
.stitched-clue-meta {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--vermilion);
}
.stitched-clue-quote {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: clamp(1.25rem, 5.2vw, 1.65rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.18;
  margin-top: 3px;
  word-break: break-word;
}
.stitched-clue-sig {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* ---- 6 Mid-Century Geometric Wrapping Paper Patterns ---- */
.wrap-0 {
  background-color: var(--vermilion);
  background-image: repeating-linear-gradient(-45deg, rgba(245, 239, 226, 0.28) 0 7px, transparent 7px 16px);
}
.wrap-1 {
  background-color: var(--spruce);
  background-image: radial-gradient(var(--ochre) 1.8px, transparent 1.8px);
  background-size: 16px 16px;
}
.wrap-2 {
  background-color: var(--ochre);
  background-image: repeating-linear-gradient(45deg, rgba(24, 26, 25, 0.12) 0 5px, transparent 5px 14px);
}
.wrap-3 {
  background-color: var(--slate);
  background-image:
    linear-gradient(90deg, rgba(245, 239, 226, 0.16) 2px, transparent 2px),
    linear-gradient(rgba(245, 239, 226, 0.16) 2px, transparent 2px);
  background-size: 18px 18px;
}
.wrap-4 {
  background-color: var(--plum);
  background-image: radial-gradient(var(--paper) 1.6px, transparent 1.6px);
  background-size: 14px 14px;
}
.wrap-5 {
  background-color: var(--forest);
  background-image: repeating-linear-gradient(0deg, rgba(230, 168, 46, 0.24) 0 4px, transparent 4px 13px);
}

/* ==========================================================================
   CONCEPT A: FANNED GIFT DECK (Swipeable Tabletop Arc)
   ========================================================================== */
.gift-fan-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  touch-action: pan-y;
}

.gift-fan-stage {
  position: relative;
  width: 100%;
  height: clamp(228px, 37dvh, 290px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.gift-fan-side {
  position: absolute;
  width: clamp(118px, 34vw, 148px);
  height: clamp(178px, 28dvh, 218px);
  border-radius: 18px;
  border: 2.25px solid var(--ink);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  opacity: 0.82;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  box-shadow: 3px 3px 0 var(--ink);
  overflow: hidden;
}
.gift-fan-side:hover { opacity: 0.96; }
.gift-fan-left {
  left: 2px;
  transform: rotate(-11deg) translateX(-10px) translateY(8px);
}
.gift-fan-right {
  right: 2px;
  transform: rotate(11deg) translateX(10px) translateY(8px);
}
.gift-fan-side-tag {
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  padding: 3px 6px;
  font-weight: 700;
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* Center Hero Parcel */
.gift-fan-hero {
  position: relative;
  z-index: 5;
  width: clamp(192px, 56vw, 228px);
  height: clamp(220px, 35dvh, 272px);
  border-radius: 20px;
  border: 2.75px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: visible;
  transition: transform 0.25s cubic-bezier(0.22, 1.25, 0.36, 1);
  animation: fanHeroSettle 0.26s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}
.gift-fan-hero.is-disabled {
  filter: saturate(0.45);
  opacity: 0.86;
}

/* Intersecting screen-printed ribbons */
.fan-ribbon-v {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 22px;
  transform: translateX(-50%);
  background: var(--ochre);
  border-left: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  pointer-events: none;
  z-index: 1;
}
.fan-ribbon-h {
  position: absolute;
  left: 0;
  right: 0;
  top: 46%;
  height: 22px;
  transform: translateY(-50%);
  background: var(--ochre);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  pointer-events: none;
  z-index: 1;
}

/* Popped Lid + Peeking Brass Coin in Stash Mode */
.gift-fan-lid {
  position: absolute;
  top: -12px;
  left: -6px;
  right: -6px;
  height: 22px;
  border-radius: 9px;
  border: 2.5px solid var(--ink);
  background: inherit;
  box-shadow: 0 3px 0 var(--ink);
  z-index: 4;
  transition: transform 0.28s cubic-bezier(0.22, 1.4, 0.36, 1);
}
.gift-fan-hero.lid-open .gift-fan-lid {
  transform: translateY(-10px) rotate(-4deg);
}

.gift-fan-coin-peek {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ochre);
  border: 2.5px solid var(--ink);
  box-shadow: 2.5px 2.5px 0 var(--ink);
  color: var(--ink);
  font-family: var(--font-editorial);
  font-weight: 900;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  animation: coinPeekDrop 0.32s cubic-bezier(0.22, 1.4, 0.36, 1) both;
}

.gift-fan-top-row {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}

.fan-stamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 7px;
  border: 1.75px solid var(--ink);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.fan-stamp.stamp-vermilion { background: var(--vermilion); color: var(--paper); }
.fan-stamp.stamp-spruce { background: var(--spruce); color: var(--paper); }
.fan-stamp.stamp-ochre { background: var(--ochre); color: var(--ink); }
.fan-stamp.stamp-ink { background: var(--ink); color: var(--paper); }

.gift-fan-tag {
  position: relative;
  z-index: 6;
  background: var(--paper);
  color: var(--ink);
  border: 2.25px solid var(--ink);
  border-radius: 13px;
  padding: 9px 10px;
  box-shadow: 3px 3px 0 var(--ink);
  text-align: center;
}
.gift-fan-tag-emoji {
  font-size: 1.45rem;
  line-height: 1;
  margin-bottom: 2px;
}
.gift-fan-tag-name {
  font-family: var(--font-editorial);
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.12;
  color: var(--ink);
}
.gift-fan-tag-sub {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 3px;
}

/* Tactile Deck Scrubber */
.gift-fan-scrubber {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.fan-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  flex-shrink: 0;
}
.fan-arrow-btn:active { transform: translate(1.5px, 1.5px); box-shadow: 0.5px 0.5px 0 var(--ink); }

.fan-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  max-width: 220px;
}
.fan-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: #ffffff;
  padding: 0;
  cursor: pointer;
  transition: width 0.2s ease, background-color 0.2s ease;
}
.fan-dot.is-marked { background: var(--ochre); }
.fan-dot.is-held { background: var(--spruce); }
.fan-dot.is-active {
  width: 24px;
  background: var(--vermilion);
}

/* ---- Act III: Physical Pull-to-Unwrap Ribbon ---- */
.pull-ribbon-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}
.pull-ribbon-track {
  width: 100%;
  max-width: 310px;
  background: rgba(24, 26, 25, 0.28);
  border: 2px solid rgba(245, 239, 226, 0.55);
  border-radius: 999px;
  padding: 8px 14px;
}
.pull-ribbon-range {
  width: 100%;
  height: 30px;
  accent-color: var(--ochre);
  cursor: pointer;
}
.pull-ribbon-hint {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0.88;
  margin-top: 2px;
}

/* ---- Scoreboard & Chronicle Rows (Solid Screen-Print) ---- */
.print-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 8px;
}
.print-list-row.is-leader {
  background: var(--ochre);
}
.print-rank {
  font-family: var(--font-editorial);
  font-size: 1.15rem;
  font-weight: 900;
  min-width: 26px;
  text-align: center;
}
.print-bar-track {
  height: 7px;
  width: 100%;
  border-radius: 999px;
  background: rgba(24, 26, 25, 0.14);
  border: 1px solid rgba(24, 26, 25, 0.25);
  overflow: hidden;
  margin-top: 4px;
}
.print-bar-fill {
  height: 100%;
  background: var(--spruce);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.print-list-row.is-leader .print-bar-fill {
  background: var(--ink);
}

/* ---- Print Sheet Modals ---- */
.modal-root {
  align-items: flex-end;
  padding: 12px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(24, 26, 25, 0.72);
}
@media (min-width: 560px) {
  .modal-root {
    align-items: center;
    padding: 20px;
  }
}
.modal-card {
  background: var(--paper);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--ink);
  animation: printSlideUp 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---- NFC Radar in Print Style ---- */
.print-nfc-box {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  background: #ffffff;
  color: var(--ink);
  border: 2.5px dashed var(--ink);
  border-radius: 18px;
  padding: 18px 14px;
  box-shadow: 4px 4px 0 var(--ink);
}

/* ---- Keyframes ---- */
@keyframes printSlideUp {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes fanHeroSettle {
  0% { transform: scale(0.95) translateY(6px); }
  100% { transform: scale(1) translateY(0); }
}
@keyframes coinPeekDrop {
  0% { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(1.15); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .chapter-wipe,
  .print-scene.scene-enter,
  .gift-fan-hero,
  .gift-fan-coin-peek,
  .modal-card {
    animation: none !important;
    transition: none !important;
  }
}



/* ---------------- SVG Character Medallions & Custom Drawn Avatars ---------------- */
.svg-avatar-medallion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--char-bg, linear-gradient(145deg, #1b7a46, #0b381f));
  border: 2px solid var(--char-accent, var(--gold));
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35), inset 0 1px 3px rgba(255, 255, 255, 0.3);
  overflow: hidden;
  flex-shrink: 0;
  vertical-align: middle;
  position: relative;
}
.svg-avatar-medallion svg,
.svg-avatar-medallion .custom-avatar-img,
.svg-avatar-medallion .illustrated-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.svg-avatar-medallion.is-illustrated {
  background: var(--paper, #f5efe2);
  border: 2px solid var(--ink, #181a19);
  box-shadow: 2px 2px 0 var(--ink, #181a19);
}
.player-end-avatar.svg-avatar-medallion {
  width: 48px;
  height: 48px;
  border-width: 2.5px;
}
.cover-avatar.svg-avatar-medallion {
  width: 78px;
  height: 78px;
  margin: 0 auto 10px;
  border-width: 3px;
}
.ui-svg-icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
  vertical-align: -0.18em;
  flex-shrink: 0;
}

/* ---------------- Game-Like Character Selection Studio (.char-select-studio) ---------------- */
.char-select-studio {
  background: linear-gradient(160deg, #0d3528 0%, #071f17 100%);
  color: var(--snow);
  border: 2px solid rgba(244, 196, 48, 0.45);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45);
}
.char-hero-spotlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(244, 196, 48, 0.35);
  border-radius: 12px;
  padding: 6px 8px;
}
.char-spotlight-avatar.svg-avatar-medallion {
  width: 48px;
  height: 48px;
  border-width: 2.5px;
  box-shadow: 0 0 16px rgba(244, 196, 48, 0.45), 0 4px 10px rgba(0, 0, 0, 0.5);
  animation: badgePulse 1.8s ease-in-out infinite alternate;
}
.char-spotlight-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.char-spotlight-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.char-spotlight-title {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #86efac;
}
.btn-draw-custom {
  background: linear-gradient(135deg, #f4c430 0%, #e67e22 100%);
  color: #2b1400;
  border: 1.5px solid #fff3b0;
  border-radius: 10px;
  padding: 5px 9px;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 0.74rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}
.char-roster-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  max-height: 112px;
  overflow-y: auto;
  padding: 2px;
}
.char-roster-tile {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  padding: 4px 2px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  color: var(--snow);
  font-family: var(--font-body);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.char-roster-tile .svg-avatar-medallion {
  width: 42px;
  height: 42px;
  border-width: 2px;
}
.char-roster-tile-lbl {
  font-size: 0.56rem;
  font-weight: 800;
  color: rgba(255, 250, 240, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.1;
}
.char-roster-tile.selected {
  border-color: var(--gold-light);
  background: rgba(244, 196, 48, 0.24);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 0 12px rgba(244, 196, 48, 0.5);
}
.char-roster-tile.draw-tile {
  border-style: dashed;
  border-color: #f4c430;
  background: rgba(244, 196, 48, 0.14);
}
.char-join-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ---------------- Touch & Mouse Drawing Studio Modal (.draw-studio-modal) ---------------- */
.draw-studio-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.draw-canvas-frame {
  position: relative;
  width: 196px;
  height: 196px;
  border-radius: 24px;
  border: 3.5px solid var(--gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(200, 16, 46, 0.15);
  overflow: hidden;
  background: #0f3d2e;
  touch-action: none;
  user-select: none;
}
.draw-avatar-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}
.draw-palette-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: 100%;
}
.draw-color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.25);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.draw-color-swatch.active {
  transform: scale(1.22);
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--gold), 0 3px 8px rgba(0, 0, 0, 0.3);
}
.draw-tools-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
}
.draw-tool-btn {
  background: #ffffff;
  color: var(--ink);
  border: 1.5px solid var(--cream-border);
  border-radius: 9px;
  padding: 4px 8px;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.draw-tool-btn.active {
  background: var(--pine);
  color: var(--snow);
  border-color: var(--gold);
}

/* ==========================================================================
   LIVE CHRISTMAS REACTION STAMPS & END-OF-GAME SUPERLATIVE TROPHIES
   Mid-Century Screen-Print Tabletop Aesthetic (flat cardstock, ink borders,
   hard offset shadows — zero glassmorphism or neon blurs)
   ========================================================================== */

.reaction-dock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin-top: 6px;
}

.reaction-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 4px 4px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2px solid var(--ink, #181a19);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--ink, #181a19);
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.12s ease;
  min-width: 0;
}

.reaction-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  background: #fff9ec;
}

.reaction-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink, #181a19);
}

.reaction-btn.is-cooldown {
  opacity: 0.6;
}

.reaction-btn-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ink, #181a19);
  display: block;
  background: #f5efe2;
}

.reaction-btn-label {
  font-family: var(--font-body, "Space Grotesk", sans-serif);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Non-blocking rubber-stamp reaction burst in #fx-root */
.reaction-stamp-burst {
  position: fixed;
  left: var(--stamp-left, 50%);
  top: var(--stamp-top, 16%);
  z-index: 120;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px 5px 5px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2.5px solid var(--ink, #181a19);
  border-radius: 11px;
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  max-width: min(176px, 46vw);
  transform: translate(-50%, 0) rotate(var(--stamp-rot, -3deg));
  animation: stampThumpIn 3.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reaction-stamp-burst.tone-vermilion {
  border-color: var(--ink, #181a19);
  background: #fff3eb;
}

.reaction-stamp-burst.tone-ochre {
  background: #fff8df;
}

.reaction-stamp-burst.tone-spruce {
  background: #eef6f0;
}

.reaction-stamp-art {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  object-fit: cover;
  border: 2px solid var(--ink, #181a19);
  flex-shrink: 0;
  background: #f5efe2;
}

.reaction-stamp-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.reaction-stamp-headline {
  font-family: var(--font-editorial, "Fraunces", serif);
  font-weight: 900;
  font-size: 0.84rem;
  line-height: 1.05;
  color: var(--vermilion, #d2342c);
  letter-spacing: -0.01em;
}

.reaction-stamp-sender {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body, "Space Grotesk", sans-serif);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink, #181a19);
}

@keyframes stampThumpIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -18px) scale(1.38) rotate(calc(var(--stamp-rot, -3deg) * 2));
  }
  12% {
    opacity: 1;
    transform: translate(-50%, 0) scale(0.95) rotate(var(--stamp-rot, -3deg));
  }
  20% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1) rotate(var(--stamp-rot, -3deg));
  }
  80% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1) rotate(var(--stamp-rot, -3deg));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -22px) scale(0.94) rotate(var(--stamp-rot, -3deg));
  }
}

/* End-of-Game Superlative Trophy Shelf */
.trophy-shelf {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}

@media (min-width: 520px) {
  .trophy-shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.trophy-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2.5px solid var(--ink, #181a19);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  text-align: left;
}

.trophy-art {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--ink, #181a19);
  flex-shrink: 0;
  background: #f5efe2;
}

.trophy-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.trophy-kicker {
  font-family: var(--font-body, "Space Grotesk", sans-serif);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vermilion, #d2342c);
}

.trophy-title {
  font-family: var(--font-editorial, "Fraunces", serif);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.1;
  color: var(--ink, #181a19);
}

.trophy-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: #464a47;
  line-height: 1.2;
}

.trophy-winner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1.5px dashed rgba(24, 26, 25, 0.2);
}

.trophy-winner-ident {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 900;
  font-size: 0.78rem;
  color: var(--spruce, #133a2e);
  min-width: 0;
}

.trophy-stat-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--ochre, #e6a82e);
  color: var(--ink, #181a19);
  border: 1.5px solid var(--ink, #181a19);
  white-space: nowrap;
}

/* ---------------- Nice / Naughty Clue Badges & Best Clue Ballot (Mid-Century Screen-Print) ---------------- */
.clue-kind-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 2px solid var(--ink, #181a19);
  box-shadow: 2px 2px 0 var(--ink, #181a19);
}
.clue-kind-pill.is-nice {
  background: var(--spruce, #133a2e);
  color: var(--paper, #f5efe2);
}
.clue-kind-pill.is-naughty {
  background: var(--vermilion, #d2342c);
  color: var(--paper, #f5efe2);
}

.assigned-gift-card {
  width: 100%;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2px solid var(--ink, #181a19);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vote-clue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 4px 2px 10px;
}

.vote-clue-card {
  width: 100%;
  text-align: left;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2px solid var(--ink, #181a19);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  position: relative;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}
.vote-clue-card::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(24, 26, 25, 0.22);
  border-radius: 6px;
  pointer-events: none;
}
.vote-clue-card:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink, #181a19);
}
.vote-clue-card.is-selected {
  background: var(--spruce, #133a2e);
  color: var(--paper, #f5efe2);
  border-color: var(--ink, #181a19);
  box-shadow: 4px 4px 0 var(--ink, #181a19);
}
.vote-clue-card.is-selected::after {
  border-color: rgba(245, 239, 226, 0.35);
}
.vote-clue-card.is-selected .vote-clue-meta {
  color: rgba(245, 239, 226, 0.82);
}
.vote-clue-card.is-selected .clue-kind-pill.is-nice {
  background: var(--ochre, #e6a82e);
  color: var(--ink, #181a19);
}
.vote-clue-card:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}
.vote-clue-quote {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
}
.vote-clue-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink-muted, #4a4a4a);
}

/* ---------------- Shake the Present Modal (Mid-Century Screen-Print) ---------------- */
.shake-hint-sub {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-muted, #4a4a4a);
  margin: 2px 0 10px;
}

.shake-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 148px;
  margin: 6px 0 10px;
  padding: 14px 10px;
  background: var(--paper, #f5efe2);
  border: 2px dashed rgba(24, 26, 25, 0.28);
  border-radius: 12px;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.shake-stage:active {
  cursor: grabbing;
}

.shake-present-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.shake-present-emoji {
  position: absolute;
  bottom: -6px;
  right: -8px;
  font-size: 1.9rem;
  background: var(--paper, #f5efe2);
  border: 2px solid var(--ink, #181a19);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0 var(--ink, #181a19);
}

.shake-wave {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--spruce, #133a2e);
  opacity: 0;
  min-width: 28px;
  text-align: center;
  pointer-events: none;
}
.shake-wave.is-pop {
  animation: shake-wave-pop 0.38s ease-out forwards;
}

@keyframes shake-wave-pop {
  0% { opacity: 0; transform: scale(0.7); }
  35% { opacity: 1; transform: scale(1.18); }
  100% { opacity: 0; transform: scale(1.35); }
}

.shake-pips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.shake-pip {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 2px solid var(--ink, #181a19);
  background: transparent;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.shake-pip.is-filled {
  background: var(--ochre, #e6a82e);
  transform: scale(1.15);
}

.shake-impression {
  width: 100%;
  background: var(--paper, #f5efe2);
  border: 2px solid var(--ink, #181a19);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  padding: 10px 12px;
  text-align: center;
  position: relative;
}
.shake-impression::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(24, 26, 25, 0.22);
  border-radius: 6px;
  pointer-events: none;
}
.shake-impression.is-revealed.band-loaded,
.shake-impression.is-revealed.band-lively {
  background: var(--spruce, #133a2e);
  color: var(--paper, #f5efe2);
}
.shake-impression.is-revealed.band-loaded .stitched-clue-meta,
.shake-impression.is-revealed.band-lively .stitched-clue-meta {
  color: var(--ochre, #e6a82e);
}
.shake-impression.is-revealed.band-thud {
  background: var(--vermilion, #d2342c);
  color: var(--paper, #f5efe2);
}
.shake-impression.is-revealed.band-thud .stitched-clue-meta {
  color: var(--paper, #f5efe2);
  opacity: 0.9;
}
.shake-impression-text {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 3px;
}

/* ==========================================================================
   ILLUSTRATED CHRISTMAS ITEM CARDS (Fanned Carousel & Unwrap Stage)
   ========================================================================== */

.gift-fan-item-hero {
  background: var(--paper, #f5efe2) !important;
  color: var(--ink, #181a19);
  border: 3px solid var(--ink, #181a19);
  box-shadow: 5px 5px 0 var(--ink, #181a19);
  justify-content: space-between;
  padding: 10px 12px 12px;
}

.gift-fan-item-side {
  background: #ede4d1 !important;
  color: var(--ink, #181a19);
  border: 2.5px solid var(--ink, #181a19);
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
}

.gift-fan-art-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 4px 0;
}

.fan-item-art {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--ink, #181a19);
  background: #f5efe2;
  display: block;
}

.fan-side-art {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--ink, #181a19);
  background: #f5efe2;
  display: block;
  opacity: 0.92;
}

.gift-fan-item-footer {
  width: 100%;
  background: #fffdf7;
  border: 2px solid var(--ink, #181a19);
  border-radius: 10px;
  padding: 6px 8px;
  box-shadow: 2px 2px 0 var(--ink, #181a19);
}

.unwrap-gift-art {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--ink, #181a19);
  background: #f5efe2;
  flex-shrink: 0;
  display: block;
}

.gift-art-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ==========================================================================
   HIDE & SEEK BONUS ROUND (Cozy Illustrated Room + NFC Hunt)
   ========================================================================== */

.hide-room-frame {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 3;
  border: 3px solid var(--ink, #181a19);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ink, #181a19);
  overflow: hidden;
  background: var(--paper, #f5efe2);
  flex-shrink: 0;
}

.hide-room-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  pointer-events: none;
}

.hide-spot-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2px solid var(--ink, #181a19);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink, #181a19);
  font-family: var(--font-body, "Space Grotesk", sans-serif);
  font-size: 0.66rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, background-color 0.12s ease;
  z-index: 2;
}

.hide-spot-pin:hover:not(:disabled) {
  transform: translate(-50%, -54%) scale(1.06);
  background: #fff9e6;
  z-index: 4;
}

.hide-spot-pin:active:not(:disabled) {
  transform: translate(-50%, -48%) scale(0.97);
}

.hide-spot-pin.is-picked {
  background: var(--ochre, #e6a82e);
  color: var(--ink, #181a19);
  z-index: 3;
}

.hide-spot-pin.is-found {
  background: var(--spruce, #133a2e);
  color: var(--paper, #f5efe2);
  z-index: 3;
}

.hide-spot-pin.is-empty {
  background: rgba(245, 239, 226, 0.78);
  color: #6b6e6c;
  border-style: dashed;
  box-shadow: none;
  cursor: default;
}

.hide-spot-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  border: 1.5px solid var(--ink, #181a19);
  background: #f5efe2;
  flex-shrink: 0;
  display: block;
}

.hide-spot-tag {
  line-height: 1.05;
}

.hide-assignment-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2.5px solid var(--ink, #181a19);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink, #181a19);
}

.hide-assignment-art {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--ink, #181a19);
  background: #f5efe2;
  flex-shrink: 0;
}

.hide-seek-timer {
  font-family: var(--font-body, "Space Grotesk", sans-serif);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  font-size: 0.92rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--vermilion, #d2342c);
  color: var(--paper, #f5efe2);
  border: 2px solid var(--ink, #181a19);
  box-shadow: 2px 2px 0 var(--ink, #181a19);
}

.hide-targets-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.hide-target-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px 5px 5px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2px solid var(--ink, #181a19);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--ink, #181a19);
}

.hide-target-chip.is-found {
  background: #e3f2e8;
  border-color: var(--spruce, #133a2e);
}

.hide-results-card {
  width: 100%;
  padding: 10px 12px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2.5px solid var(--ink, #181a19);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hide-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 1.5px dashed rgba(24, 26, 25, 0.18);
}

.hide-result-row:first-of-type {
  padding-top: 0;
  border-top: none;
}

/* ==========================================================================
   HOT COAL (Passing Panic Round — Mid-Century Screen-Print)
   ========================================================================== */

.hot-coal-heat-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--font-body, "Space Grotesk", sans-serif);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  border: 2px solid var(--ink, #181a19);
  box-shadow: 2px 2px 0 var(--ink, #181a19);
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
}

.hot-coal-heat-pill.heat-hot {
  background: var(--ochre, #e6a82e);
}

.hot-coal-heat-pill.heat-blazing {
  background: var(--ink, #181a19);
  color: var(--ochre, #e6a82e);
  animation: coalTremble 0.28s infinite ease-in-out;
}

.hot-coal-stage {
  width: 100%;
  max-width: 380px;
  padding: 14px 16px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 3px solid var(--ink, #181a19);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--ink, #181a19);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hot-coal-stage.heat-hot {
  animation: coalTremble 1.15s infinite ease-in-out;
}

.hot-coal-stage.heat-blazing {
  background: #fff3e0;
  animation: coalTremble 0.72s infinite ease-in-out;
}

@keyframes coalTremble {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-1px, 0.5px) rotate(-0.55deg); }
  75% { transform: translate(1px, -0.5px) rotate(0.55deg); }
}

.hot-coal-parcel-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hot-coal-parcel-art {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  border: 2.5px solid var(--ink, #181a19);
  background: #f5efe2;
  display: block;
}

.hot-coal-stamp-art {
  position: absolute;
  right: -18px;
  bottom: -10px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--ink, #181a19);
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  transform: rotate(8deg);
  background: #f5efe2;
}

.hot-coal-holder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  width: 100%;
  justify-content: center;
  border-top: 2px dashed rgba(24, 26, 25, 0.2);
}

.hot-coal-pass-wrap {
  width: 100%;
  max-width: 440px;
  text-align: center;
}

.hot-coal-targets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.hot-coal-pass-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2.5px solid var(--ink, #181a19);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.12s ease;
}

.hot-coal-pass-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink, #181a19);
  background: var(--ochre, #e6a82e);
}

.hot-coal-pass-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink, #181a19);
}

/* ==========================================================================
   ANIMATED ROUND "HOW TO PLAY" BRIEFING DIORAMAS (Mid-Century Screen-Print)
   ========================================================================== */

.htp-modal-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.htp-diorama {
  position: relative;
  width: 100%;
  height: 158px;
  border-radius: 14px;
  border: 2.5px solid var(--ink, #181a19);
  box-shadow: 4px 4px 0 var(--ink, #181a19);
  background: var(--paper, #f5efe2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.htp-diorama.is-spruce {
  background: var(--spruce, #133a2e);
}

.htp-diorama.is-vermilion {
  background: var(--vermilion, #d2342c);
}

/* Classic Round Diorama: Clue -> Swap -> Unwrap */
.htp-classic-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.htp-char-left,
.htp-char-right {
  position: absolute;
  bottom: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid var(--ink, #181a19);
  box-shadow: 2px 2px 0 var(--ink, #181a19);
  object-fit: cover;
  background: var(--paper, #f5efe2);
}

.htp-char-left { left: 16px; }
.htp-char-right { right: 16px; }

.htp-classic-gift {
  position: absolute;
  top: 46px;
  left: 50%;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 2.5px solid var(--ink, #181a19);
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  object-fit: cover;
  background: var(--paper, #f5efe2);
  animation: htpClassicGift 4.8s infinite ease-in-out;
}

.htp-classic-clue {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ochre, #e6a82e);
  color: var(--ink, #181a19);
  border: 2px solid var(--ink, #181a19);
  font-family: var(--font-body, "Space Grotesk", sans-serif);
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
  animation: htpClassicClue 4.8s infinite ease-in-out;
}

.htp-classic-coins {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--spruce, #133a2e);
  color: var(--paper, #f5efe2);
  border: 2px solid var(--ink, #181a19);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  animation: htpClassicCoins 4.8s infinite ease-in-out;
}

@keyframes htpClassicGift {
  0%, 15%   { transform: translate(-50%, 0) rotate(-3deg) scale(1); }
  35%, 45%  { transform: translate(-115%, 4px) rotate(-8deg) scale(0.96); }
  62%, 72%  { transform: translate(15%, 4px) rotate(8deg) scale(0.96); }
  85%, 100% { transform: translate(-50%, -4px) rotate(0deg) scale(1.08); }
}

@keyframes htpClassicClue {
  0%, 5%    { opacity: 0; transform: translate(-50%, 6px); }
  12%, 40%  { opacity: 1; transform: translate(-50%, 0); }
  50%, 100% { opacity: 0; transform: translate(-50%, -6px); }
}

@keyframes htpClassicCoins {
  0%, 72%   { opacity: 0; transform: translate(-50%, 8px) scale(0.8); }
  82%, 96%  { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
  100%      { opacity: 0; transform: translate(-50%, -4px) scale(0.95); }
}

/* Hide & Seek Diorama: Room + Tuck + Magnifier Sweep */
.htp-hide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.htp-hide-item {
  position: absolute;
  left: 56%;
  top: 26%;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid var(--ink, #181a19);
  box-shadow: 2px 2px 0 var(--ink, #181a19);
  object-fit: cover;
  background: var(--paper, #f5efe2);
  animation: htpHideTuck 4.6s infinite ease-in-out;
}

.htp-hide-searcher {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ochre, #e6a82e);
  color: var(--ink, #181a19);
  border: 2.5px solid var(--ink, #181a19);
  box-shadow: 2px 2px 0 var(--ink, #181a19);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  animation: htpHideSweep 4.6s infinite ease-in-out;
}

.htp-hide-badge {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2px solid var(--ink, #181a19);
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

@keyframes htpHideTuck {
  0%, 15%   { transform: translate(-50%, -32px) scale(1.1); opacity: 1; }
  30%, 72%  { transform: translate(-50%, 0) scale(0.55); opacity: 0.28; }
  80%, 96%  { transform: translate(-50%, 0) scale(1.12); opacity: 1; }
  100%      { transform: translate(-50%, -18px) scale(1); opacity: 0.8; }
}

@keyframes htpHideSweep {
  0%, 32%   { left: 20%; top: 64%; opacity: 0; }
  40%       { left: 20%; top: 64%; opacity: 1; }
  56%       { left: 80%; top: 62%; opacity: 1; }
  74%, 94%  { left: 56%; top: 26%; opacity: 1; transform: scale(1.15); }
  100%      { left: 56%; top: 26%; opacity: 0; }
}

/* Hot Coal Diorama: Fast Pass -> Sizzle -> Boom */
.htp-coal-avatars {
  position: absolute;
  bottom: 14px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.htp-coal-av {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2.5px solid var(--ink, #181a19);
  box-shadow: 2px 2px 0 var(--ink, #181a19);
  object-fit: cover;
  background: var(--paper, #f5efe2);
}

.htp-coal-hot-item {
  position: absolute;
  top: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2.5px solid var(--ink, #181a19);
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  object-fit: cover;
  background: var(--paper, #f5efe2);
  animation: htpCoalZip 4.2s infinite ease-in-out;
}

.htp-coal-boom {
  position: absolute;
  top: 12px;
  right: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ochre, #e6a82e);
  color: var(--ink, #181a19);
  border: 2px solid var(--ink, #181a19);
  font-size: 0.7rem;
  font-weight: 900;
  animation: htpCoalBoom 4.2s infinite ease-in-out;
}

@keyframes htpCoalZip {
  0%, 15%   { left: 16px; transform: translateY(0) rotate(-6deg); }
  35%, 48%  { left: calc(50% - 28px); transform: translateY(-10px) rotate(6deg); }
  66%, 80%  { left: calc(100% - 72px); transform: translateY(0) rotate(-10deg) scale(1.08); }
  88%, 100% { left: calc(100% - 72px); transform: translateY(-4px) rotate(12deg) scale(1.22); }
}

@keyframes htpCoalBoom {
  0%, 74%   { opacity: 0; transform: scale(0.7); }
  82%, 96%  { opacity: 1; transform: scale(1.08); }
  100%      { opacity: 0; transform: scale(0.9); }
}

/* Step list cards */
.htp-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.htp-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  background: #fffdf7;
  border: 2px solid var(--ink, #181a19);
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--ink, #181a19);
}

.htp-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ochre, #e6a82e);
  color: var(--ink, #181a19);
  border: 2px solid var(--ink, #181a19);
  font-weight: 900;
  font-size: 0.74rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.htp-skip-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-muted, #5a5d58);
  cursor: pointer;
}

/* ---------------- Mobile-First Grand Finale (Game Over) ---------------- */

.gameover-champion-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 18px 16px 16px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 3.5px solid var(--ochre, #e6a82e);
  border-radius: 20px;
  box-shadow: 0 0 0 3px var(--ink, #181a19), 6px 6px 0 rgba(0, 0, 0, 0.45);
  width: 100%;
}

.gameover-champion-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gameover-champion-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--ochre, #e6a82e);
  color: var(--ink, #181a19);
  border: 2px solid var(--ink, #181a19);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gameover-champion-name {
  margin: 0;
  font-family: var(--font-editorial, "Fraunces", serif);
  font-size: clamp(1.75rem, 8.5vw, 2.5rem);
  font-weight: 900;
  line-height: 1.04;
  color: var(--ink, #181a19);
  word-break: break-word;
}

.gameover-champion-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--vermilion, #d2342c);
  color: var(--paper, #f5efe2);
  border: 2px solid var(--ink, #181a19);
  box-shadow: 2px 2px 0 var(--ink, #181a19);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.gameover-your-finish-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.gameover-your-finish {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2.5px solid var(--ink, #181a19);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.gameover-your-finish.is-winner {
  background: #fff7dc;
  border-color: var(--ochre, #e6a82e);
}
.gameover-your-finish:active {
  transform: scale(0.99);
}
.gameover-your-finish-kicker {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--vermilion, #d2342c);
}
.gameover-your-finish-title {
  font-family: var(--font-editorial, "Fraunces", serif);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gameover-your-finish-sub {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-muted, #5a5d58);
  margin-top: 2px;
}

.gameover-podium-mobile {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  width: 100%;
  padding: 6px 2px 2px;
}

.gameover-podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--paper, #f5efe2);
  cursor: pointer;
  min-width: 0;
}

.gameover-podium-name {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 900;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gameover-podium-slot.slot-1 .gameover-podium-name {
  color: var(--ochre, #e6a82e);
  font-size: 0.84rem;
}

.gameover-podium-bar {
  width: 100%;
  border-radius: 12px 12px 6px 6px;
  border: 2.5px solid var(--ink, #181a19);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.38);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  font-size: 0.82rem;
  color: var(--ink, #181a19);
}

.gameover-podium-slot.slot-1 .gameover-podium-bar {
  min-height: 76px;
  background: var(--ochre, #e6a82e);
}
.gameover-podium-slot.slot-2 .gameover-podium-bar {
  min-height: 58px;
  background: var(--paper, #f5efe2);
}
.gameover-podium-slot.slot-3 .gameover-podium-bar {
  min-height: 48px;
  background: #e5d8c0;
}

.gameover-rank-row {
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease;
}
.gameover-rank-row:active {
  transform: scale(0.99);
}

.gameover-player-picker {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 1px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}
.gameover-player-picker::-webkit-scrollbar {
  display: none;
}

.gameover-player-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  margin: 0;
  width: 100%;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 3px solid var(--ink, #181a19);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink, #181a19);
}

.gameover-player-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 2px dashed rgba(24, 26, 25, 0.2);
  padding-bottom: 10px;
}

.gameover-mission-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 10px;
  border: 2px solid var(--ink, #181a19);
  background: #fff4ec;
}
.gameover-mission-strip.is-hit {
  background: #e8f5ec;
}

.gameover-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}
@media (min-width: 520px) {
  .gameover-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.gameover-stat-tile {
  background: #ffffff;
  border: 2px solid var(--ink, #181a19);
  border-radius: 10px;
  padding: 7px 6px;
  text-align: center;
  box-shadow: 2px 2px 0 rgba(24, 26, 25, 0.14);
}
.gameover-stat-val {
  font-family: var(--font-editorial, "Fraunces", serif);
  font-size: 1rem;
  font-weight: 900;
  color: var(--ink, #181a19);
  line-height: 1.1;
}
.gameover-stat-lbl {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink-muted, #5a5d58);
  margin-top: 2px;
}

/* ---------------- Head-to-Head Showdown (Duel Round) ---------------- */

.duel-vs-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  padding: 12px 14px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 3px solid var(--ink, #181a19);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--ink, #181a19);
}

.duel-challenger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.duel-challenger-name {
  font-family: var(--font-editorial, "Fraunces", serif);
  font-size: 0.96rem;
  font-weight: 900;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duel-vs-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--vermilion, #d2342c);
  color: var(--paper, #f5efe2);
  border: 2.5px solid var(--ink, #181a19);
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  font-family: var(--font-editorial, "Fraunces", serif);
  font-weight: 900;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-6deg);
}

.duel-prompt-card {
  width: 100%;
  max-width: 420px;
  padding: 14px 16px;
  background: #fffaf0;
  color: var(--ink, #181a19);
  border: 3px solid var(--ink, #181a19);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink, #181a19);
  text-align: left;
}

.duel-prompt-title {
  font-family: var(--font-editorial, "Fraunces", serif);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--ink, #181a19);
  margin-bottom: 6px;
}

.duel-prompt-body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.38;
  color: #2f3330;
}

.duel-vote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 420px;
}

.duel-vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 10px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 3px solid var(--ink, #181a19);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink, #181a19);
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.14s ease;
}

.duel-vote-btn.is-picked {
  background: #fff3cf;
  border-color: var(--ochre, #e6a82e);
  transform: translateY(-2px);
}

.duel-vote-name {
  font-family: var(--font-editorial, "Fraunces", serif);
  font-size: 0.95rem;
  font-weight: 900;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- Round Mix & Count Picker Sheet ---------------- */

.round-mix-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: var(--paper, #f5efe2);
  border: 2.5px solid var(--ink, #181a19);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink, #181a19);
}

.round-mix-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.round-mix-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--ink, #181a19);
  border: 2px solid rgba(24, 26, 25, 0.25);
  border-radius: 12px;
  cursor: pointer;
  opacity: 0.72;
  transition: transform 0.12s ease, border-color 0.14s ease, background-color 0.14s ease, opacity 0.14s ease;
}

.round-mix-card.is-on {
  opacity: 1;
  background: #fff9ec;
  border: 2.5px solid var(--ink, #181a19);
  box-shadow: 3px 3px 0 var(--ink, #181a19);
}

.round-mix-card:disabled {
  cursor: default;
}

/* ============================================================
   Mid-Century Screen-Print Story / Demo Walkthrough (.cp-*)
   ============================================================ */
.cp-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--spruce, #133a2e);
  color: var(--paper, #f5efe2);
  padding: max(12px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  overflow: hidden;
  transition: opacity 0.24s ease;
}

.cp-overlay.is-closing {
  opacity: 0;
  pointer-events: none;
}

.cp-shell {
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 760px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cp-progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 2px 0;
}

.cp-seg {
  background: none;
  border: none;
  padding: 6px 0;
  cursor: pointer;
}

.cp-seg-track {
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  border: 1.5px solid var(--ink, #181a19);
  overflow: hidden;
}

.cp-seg-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--paper, #f5efe2);
  transition: width 0.08s linear;
}

.cp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cp-kicker {
  font-family: var(--font-body, "Space Grotesk", sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.92;
}

.cp-top-btns {
  display: inline-flex;
  gap: 6px;
}

.cp-pill {
  font-family: var(--font-body, "Space Grotesk", sans-serif);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2px solid var(--ink, #181a19);
  box-shadow: 2px 2px 0 var(--ink, #181a19);
  cursor: pointer;
}

.cp-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
}

.cp-title {
  font-family: var(--font-editorial, "Fraunces", serif);
  font-size: clamp(1.65rem, 6.5vw, 2.3rem);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  margin: 0;
}

.cp-stage {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}

.cp-stage-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.cp-stage-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.cp-art-card {
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 3px solid var(--ink, #181a19);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ink, #181a19);
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: clamp(86px, 26vw, 114px);
}

.cp-art-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--ink, #181a19);
  display: block;
}

.cp-art-hero {
  width: clamp(104px, 31vw, 134px);
  transform: translateY(-6px);
  z-index: 2;
}

.cp-tilt-l {
  transform: rotate(-4deg);
}

.cp-tilt-r {
  transform: rotate(4deg);
}

.cp-mode-tile {
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 3px solid var(--ink, #181a19);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ink, #181a19);
  padding: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: clamp(132px, 42vw, 178px);
}

.cp-mode-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--ink, #181a19);
  display: block;
}

.cp-vs-pill {
  font-family: var(--font-editorial, "Fraunces", serif);
  font-weight: 900;
  font-size: 1.15rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--vermilion, #d2342c);
  color: var(--paper, #f5efe2);
  border: 3px solid var(--ink, #181a19);
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cp-clue-strip {
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2.5px dashed var(--ink, #181a19);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink, #181a19);
  padding: 7px 14px;
  font-family: var(--font-editorial, "Fraunces", serif);
  font-style: italic;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
}

.cp-podium-row {
  align-items: flex-end;
}

.cp-pod-2 {
  transform: translateY(4px) rotate(-3deg);
}

.cp-pod-3 {
  transform: translateY(8px) rotate(3deg);
}

.cp-card {
  width: 100%;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 3px solid var(--ink, #181a19);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--ink, #181a19);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.cp-story {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.4;
}

.cp-tip {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--spruce, #133a2e);
  background: #eef6f0;
  border: 2px solid var(--ink, #181a19);
  border-radius: 10px;
  padding: 6px 10px;
}

.cp-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.cp-nav-btn {
  padding: 10px 12px !important;
  font-size: 0.88rem !important;
}

.cp-count {
  font-family: var(--font-body, "Space Grotesk", sans-serif);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0.9;
}

/* Built-in closing curtain wipe between demo chapters */
.cp-curtain {
  position: absolute;
  inset: 0;
  z-index: 210;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 24px;
  background-color: var(--spruce, #133a2e);
  color: var(--paper, #f5efe2);
  border-top: 8px solid var(--ink, #181a19);
  border-bottom: 8px solid var(--ink, #181a19);
  transform: translateY(106%);
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.cp-curtain::before,
.cp-curtain::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background: repeating-linear-gradient(
    -45deg,
    var(--paper) 0 12px,
    var(--vermilion) 12px 24px,
    var(--ochre) 24px 36px,
    var(--spruce) 36px 48px
  );
  border-bottom: 2.5px solid var(--ink);
}

.cp-curtain::before { top: 0; }
.cp-curtain::after {
  bottom: 0;
  border-bottom: none;
  border-top: 2.5px solid var(--ink);
}

.cp-curtain.is-covering {
  transform: translateY(0%);
}

.cp-curtain.is-exiting {
  transform: translateY(-106%);
  transition: transform 0.38s cubic-bezier(0.65, 0, 0.35, 1);
}

.cp-curtain-crest {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3.5px solid var(--ink, #181a19);
  box-shadow: 5px 5px 0 var(--ink, #181a19);
  background: var(--paper, #f5efe2);
  overflow: hidden;
  margin-bottom: 12px;
}

.cp-curtain-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cp-curtain-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.9;
}

.cp-curtain-title {
  font-family: var(--font-editorial, "Fraunces", serif);
  font-size: clamp(1.9rem, 8.5vw, 3rem);
  font-weight: 900;
  line-height: 1.04;
  margin-top: 6px;
}

/* ============================================================
   Elf Trials (Quick-Fire Phone Challenges)
   ============================================================ */
body[data-scene="trial"] {
  background-color: var(--ochre, #e6a82e);
  color: var(--ink, #181a19);
}

.trial-arena {
  width: 100%;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 3px solid var(--ink, #181a19);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink, #181a19);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

.trial-target-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--spruce, #133a2e);
  color: var(--paper, #f5efe2);
  border: 2px solid var(--ink, #181a19);
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trial-clock-face {
  font-family: var(--font-editorial, "Fraunces", serif);
  font-weight: 900;
  font-size: clamp(2.1rem, 9vw, 3.1rem);
  color: var(--ink, #181a19);
  background: #ffffff;
  border: 3px solid var(--ink, #181a19);
  border-radius: 14px;
  padding: 12px 20px;
  min-width: min(240px, 82%);
  box-shadow: 4px 4px 0 var(--ink, #181a19);
}

.trial-clock-face.is-hidden-clock {
  background: var(--ink, #181a19);
  color: var(--ochre, #e6a82e);
}

.trial-big-btn {
  width: 100%;
  min-height: 64px;
  font-size: 1.1rem !important;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.trial-reflex-pad {
  width: 100%;
  min-height: 170px;
  border-radius: 16px;
  border: 3.5px solid var(--ink, #181a19);
  box-shadow: 5px 5px 0 var(--ink, #181a19);
  background: var(--spruce, #133a2e);
  color: var(--paper, #f5efe2);
  font-family: var(--font-editorial, "Fraunces", serif);
  font-weight: 900;
  font-size: clamp(1.3rem, 5.5vw, 1.75rem);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.trial-reflex-pad.is-go {
  background: var(--vermilion, #d2342c);
  color: var(--paper, #f5efe2);
  transform: scale(1.02);
}

.trial-meter-wrap {
  width: 100%;
  padding: 6px 0;
}

.trial-meter-track {
  position: relative;
  width: 100%;
  height: 44px;
  background: #ffffff;
  border: 3px solid var(--ink, #181a19);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 4px 4px 0 var(--ink, #181a19);
}

.trial-meter-fill {
  height: 100%;
  width: 0%;
  background: var(--ochre, #e6a82e);
  border-right: 2.5px solid var(--ink, #181a19);
}

.trial-meter-target {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--vermilion, #d2342c);
  z-index: 3;
  transform: translateX(-50%);
}

.trial-blind-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: var(--ink, #181a19);
  color: var(--ochre, #e6a82e);
  font-weight: 900;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.trial-blind-cover.is-active {
  opacity: 1;
}

.trial-snowball-track {
  position: relative;
  width: 100%;
  height: 52px;
  background: #ffffff;
  border: 3px solid var(--ink, #181a19);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink, #181a19);
  overflow: hidden;
}

.trial-snowball-bullseye {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 18px;
  transform: translateX(-50%);
  background: rgba(210, 52, 44, 0.28);
  border-left: 2.5px solid var(--vermilion, #d2342c);
  border-right: 2.5px solid var(--vermilion, #d2342c);
}

.trial-snowball-needle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.8rem;
  line-height: 1;
  pointer-events: none;
}

.trial-locked-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: #ffffff;
  border: 2px solid var(--ink, #181a19);
  border-radius: 10px;
}

/* ---- Clue Spark Helper & Simultaneous Unwrap Recap ---- */
.clue-spark-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: #fff8df;
  border: 2px solid var(--ink, #181a19);
  border-radius: 10px;
  text-align: left;
}

.clue-spark-text {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink, #181a19);
  line-height: 1.25;
}

.reveal-recap-banner {
  width: 100%;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 3px solid var(--ink, #181a19);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--ink, #181a19);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reveal-recap-banner.is-winner {
  background: #eef6f0;
}

.reveal-recap-banner.is-loser {
  background: #fff0ea;
}

.reveal-recap-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reveal-recap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.reveal-mini-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  background: var(--paper, #f5efe2);
  color: var(--ink, #181a19);
  border: 2px solid var(--ink, #181a19);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--ink, #181a19);
}

/* ---- Animated Intermission Scoreboard ---- */
.sb-standings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sb-bar-fill {
  transition: width 0.76s cubic-bezier(0.22, 1, 0.36, 1);
}

.sb-delta-pill {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1.5px solid var(--ink, #181a19);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sb-delta-pill.is-pos {
  background: #e6f5ec;
  color: var(--spruce, #133a2e);
}

.sb-delta-pill.is-neg {
  background: #ffece6;
  color: var(--vermilion, #d2342c);
}

.sb-delta-pill.is-popped {
  transform: scale(1.16);
}

.sb-rank-move {
  font-size: 0.68rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 6px;
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sb-rank-move.is-visible {
  opacity: 1;
  transform: scale(1);
}

.sb-rank-move.is-up {
  background: var(--spruce, #133a2e);
  color: var(--paper, #f5efe2);
}

.sb-rank-move.is-down {
  background: var(--vermilion, #d2342c);
  color: var(--paper, #f5efe2);
}







