/* ==========================================================================
   THE SNOWBOUND INN: 24 DAYS AT THE NORTHERN HEARTH
   Progressive Cozy Alpine Theme & Comprehensive Component System
   ========================================================================== */

/* --- 1. CSS Custom Properties / Design Tokens --- */
:root {
  /* Core Cozy Alpine Color Palette */
  --bg-midnight-pine: #0F1A1C;
  --bg-timber-hearth: #1F1612;
  --bg-walnut-card: rgba(31, 22, 18, 0.92);
  --bg-walnut-card-solid: #231813;
  --bg-parchment-sheet: #F4ECE1;
  --bg-parchment-light: #FAF6EE;
  
  --paper-parchment: #F6EFE2;
  --paper-ink: #2B1E17;
  --paper-ink-soft: #4F382E;
  --paper-ink-muted: #7A5B4C;
  
  --accent-hearth-amber: #E89B48;
  --accent-amber-glow: #FFD28A;
  --accent-amber-burn: #D27623;
  --accent-berry-velvet: #8F2432;
  --accent-berry-bright: #B52F42;
  --accent-spruce-bough: #244A3D;
  --accent-spruce-deep: #162E26;
  --accent-spruce-bright: #356D5A;
  --accent-frost-silver: #D4E2EA;
  --accent-frost-ice: #B8D5E5;
  --accent-candle-gold: #F7C668;
  
  /* Borders & Shadows */
  --border-gold-subtle: rgba(232, 155, 72, 0.28);
  --border-gold-strong: rgba(232, 155, 72, 0.65);
  --border-frost-subtle: rgba(212, 226, 234, 0.24);
  --border-timber-carved: rgba(10, 8, 7, 0.65);
  
  --shadow-hearth: 0 12px 36px rgba(0, 0, 0, 0.6);
  --shadow-amber-glow: 0 0 28px rgba(232, 155, 72, 0.38);
  --shadow-candle-soft: 0 0 16px rgba(247, 198, 104, 0.45);
  --shadow-card-inner: inset 0 1px 0 rgba(255, 230, 200, 0.12);
  
  /* Typography Scale (Strict rule: zero text below 13px! Prose 16-17.5px, Handwritten 21-23px) */
  --font-display: 'Cormorant Garamond', Garamond, 'Palatino Linotype', 'Times New Roman', serif;
  --font-prose: 'Lora', Georgia, 'Times New Roman', serif;
  --font-handwritten: 'Caveat', 'Segoe Script', cursive, sans-serif;
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --text-xs: 13px;
  --text-sm: 14.5px;
  --text-base: 16.5px;
  --text-lg: 18.5px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-4xl: 46px;
  
  /* Transitions & Radii */
  --ease-snappy: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-hearth: cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  /* HUD & Layout Z-Indexes */
  --z-canvas-snow: 5;
  --z-stage-content: 10;
  --z-hud-fixed: 100;
  --z-popover: 200;
  --z-modal-backdrop: 300;
  --z-tour: 400;
  --z-toast: 500;
}

/* --- 2. CSS Reset & Base Rules --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-midnight-pine);
  color: var(--paper-parchment);
  font-family: var(--font-prose);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video, canvas {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent-amber-glow);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover, a:focus-visible {
  color: #FFFFFF;
}

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

.is-hidden {
  display: none !important;
}

/* --- 3. Ambient Canvas Snowfall Layer --- */
.snow-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: var(--z-canvas-snow);
  opacity: 0.95;
}

/* --- 4. Innkeeper Hearth HUD (Top Navigation & Stat Pill) --- */
.hearth-hud {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-hud-fixed);
  background: linear-gradient(180deg, rgba(15, 26, 28, 0.96) 0%, rgba(31, 22, 18, 0.92) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-gold-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  gap: 12px;
  transition: all 0.3s ease;
}

/* Brand Cluster */
.hud-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.hud-inn-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--accent-amber-glow);
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

.hud-mode-badge {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-frost-silver);
  opacity: 0.85;
}

/* 3-Stat Hearth Pill: CRITICAL - MUST NEVER BE HIDDEN ON MOBILE (<860px) */
.hud-meters {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 26, 28, 0.75);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  flex-shrink: 1;
  min-width: 0;
}

.hud-meter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
}

.meter-icon {
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 0 4px rgba(255, 210, 138, 0.3));
}

.meter-info {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.meter-label {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--paper-parchment);
  opacity: 0.8;
  display: inline;
}

.meter-info strong {
  font-family: var(--font-ui);
  font-size: 15px; /* Strictly >= 14px as required */
  font-weight: 700;
  color: var(--accent-amber-glow);
  min-width: 18px;
  display: inline-block;
}

.meter-track {
  width: 38px;
  height: 6px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.meter-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s var(--ease-snappy);
}

.fill-spirit {
  background: linear-gradient(90deg, #F7C668, #FFE29F);
  box-shadow: 0 0 8px rgba(247, 198, 104, 0.6);
}

.fill-firewood {
  background: linear-gradient(90deg, #99532B, #D27623);
}

.fill-warmth {
  background: linear-gradient(90deg, #D27623, #E89B48, #F7C668);
  box-shadow: 0 0 8px rgba(232, 155, 72, 0.6);
}

/* Utility Action Buttons */
.hud-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-hud-primary {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: #1A110D;
  background: linear-gradient(135deg, #FFD28A 0%, #E89B48 100%);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 10px rgba(232, 155, 72, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  white-space: nowrap;
}

.btn-hud-primary:hover, .btn-hud-primary:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 4px 16px rgba(232, 155, 72, 0.55);
}

.btn-hud-primary:active {
  transform: translateY(1px);
  filter: brightness(0.95);
}

.btn-hud-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(31, 22, 18, 0.7);
  border: 1px solid var(--border-gold-subtle);
  color: var(--accent-amber-glow);
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.18s ease;
}

.btn-hud-icon:hover, .btn-hud-icon:focus-visible {
  background: rgba(232, 155, 72, 0.22);
  border-color: var(--accent-amber-glow);
  transform: scale(1.06);
}

.btn-hud-icon:active {
  transform: scale(0.95);
}

/* --- 5. Main App & Stage Transitions --- */
.app-main {
  position: relative;
  z-index: var(--z-stage-content);
  width: 100%;
  min-height: calc(100vh - 65px);
  display: flex;
  flex-direction: column;
}

.stage {
  width: 100%;
  animation: stageFadeIn 0.45s ease forwards;
}

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

/* Coach Whispers & Banners */
.coach-banner {
  background: linear-gradient(135deg, rgba(31, 22, 18, 0.88) 0%, rgba(36, 74, 61, 0.8) 100%);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-full);
  padding: 9px 20px;
  color: var(--accent-amber-glow);
  font-family: var(--font-prose);
  font-size: 16.5px;
  font-style: italic;
  text-align: center;
  margin: 0 auto 20px auto;
  max-width: 680px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.coach-inline {
  font-family: var(--font-prose);
  font-size: 16px;
  font-style: italic;
  color: var(--accent-frost-silver);
  margin: 0;
}

/* --- 6. Stage 0: Narrative Cinematic Intro (`SnowboundIntro`) --- */
.stage-intro {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #080D0F;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.intro-curtain {
  position: relative;
  width: 100%;
  max-width: 860px;
  min-height: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  border: 1px solid var(--border-gold-subtle);
  background: #0C1417;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.intro-slides-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.intro-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

.intro-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.intro-slide-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenBurnsDrift 6.5s cubic-bezier(0.25, 1, 0.5, 1) infinite alternate;
}

@keyframes kenBurnsDrift {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.08) translate(-1%, -1%);
  }
}

.intro-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 13, 15, 0.2) 0%, rgba(8, 13, 15, 0.88) 80%, #080D0F 100%);
  pointer-events: none;
}

.intro-content-wrap {
  position: relative;
  z-index: 2;
  padding: 36px 36px 28px 36px;
  text-align: center;
}

.intro-title-card {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--accent-amber-glow);
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.intro-caption {
  font-family: var(--font-prose);
  font-size: 17.5px;
  color: var(--paper-parchment);
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 24px auto;
}

.intro-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.intro-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
}

.intro-dot.is-active {
  background: var(--accent-hearth-amber);
  width: 28px;
  box-shadow: 0 0 10px var(--accent-hearth-amber);
}

.intro-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.intro-skip {
  font-family: var(--font-ui);
  font-size: 14.5px;
  color: var(--accent-frost-silver);
  opacity: 0.75;
  padding: 8px 14px;
}

.intro-skip:hover {
  opacity: 1;
  color: #FFFFFF;
}

/* --- 7. Stage 1: Lighting the First Hearth Onboarding --- */
.stage-onboarding {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 24px;
}

.onboarding-card {
  background: var(--bg-walnut-card);
  border: 1px solid var(--border-gold-strong);
  border-radius: var(--radius-lg);
  padding: 38px 32px;
  max-width: 640px;
  width: 100%;
  box-shadow: var(--shadow-hearth);
  text-align: center;
  animation: stageFadeIn 0.5s ease;
}

.onboarding-card h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--accent-amber-glow);
  margin-bottom: 10px;
}

.onboarding-card p {
  font-size: 16.5px;
  color: var(--paper-parchment);
  margin-bottom: 24px;
}

/* Match Strike Zone */
.match-strike-container {
  margin: 28px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.match-strike-zone {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: var(--radius-full);
  border: 2px dashed var(--accent-hearth-amber);
  background: radial-gradient(circle, rgba(232, 155, 72, 0.12) 0%, rgba(31, 22, 18, 0.8) 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--ease-snappy);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.match-strike-zone:hover {
  transform: scale(1.04);
  border-color: var(--accent-amber-glow);
  box-shadow: 0 0 30px rgba(232, 155, 72, 0.4);
}

.match-icon {
  font-size: 38px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.match-label {
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-amber-glow);
  margin-top: 6px;
}

.match-progress-ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.match-progress-ring circle {
  fill: none;
  stroke: var(--accent-amber-glow);
  stroke-width: 4;
  stroke-dasharray: 408;
  stroke-dashoffset: 408;
  transition: stroke-dashoffset 0.15s ease;
}

.match-strike-zone.is-lit {
  border-style: solid;
  border-color: var(--accent-candle-gold);
  background: radial-gradient(circle, rgba(255, 210, 138, 0.45) 0%, rgba(232, 155, 72, 0.25) 50%, rgba(31, 22, 18, 0.9) 100%);
  box-shadow: 0 0 45px rgba(255, 210, 138, 0.6);
  animation: amberPulse 1.8s infinite alternate ease-in-out;
}

@keyframes amberPulse {
  0% {
    box-shadow: 0 0 20px rgba(232, 155, 72, 0.35);
  }
  100% {
    box-shadow: 0 0 42px rgba(255, 210, 138, 0.7);
  }
}

/* Unlock Rhythm Options */
.rhythm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0 28px 0;
}

.rhythm-card {
  background: rgba(15, 26, 28, 0.6);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.rhythm-card:hover {
  background: rgba(36, 74, 61, 0.4);
  border-color: var(--accent-hearth-amber);
}

.rhythm-card.is-selected {
  border-color: var(--accent-amber-glow);
  background: linear-gradient(180deg, rgba(36, 74, 61, 0.65) 0%, rgba(31, 22, 18, 0.9) 100%);
  box-shadow: 0 0 16px rgba(232, 155, 72, 0.3);
}

.rhythm-title {
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent-amber-glow);
  margin-bottom: 4px;
}

.rhythm-desc {
  font-family: var(--font-prose);
  font-size: 13.5px;
  color: var(--accent-frost-silver);
  line-height: 1.4;
}

.innkeeper-input-group {
  margin: 20px 0;
  text-align: left;
}

.innkeeper-input-group label {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-amber-glow);
  margin-bottom: 6px;
}

.innkeeper-input-group input {
  width: 100%;
  background: rgba(15, 26, 28, 0.85);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--paper-parchment);
  font-family: var(--font-prose);
  font-size: 16px;
}

.innkeeper-input-group input:focus {
  outline: none;
  border-color: var(--accent-amber-glow);
  box-shadow: 0 0 10px rgba(232, 155, 72, 0.4);
}

/* --- 8. Stage 2: The Snowbound Timber Facade (Exterior) --- */
.stage-exterior {
  position: relative;
  min-height: calc(100vh - 65px);
  display: flex;
  flex-direction: column;
}

.exterior-backdrop, .interior-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.exterior-backdrop img, .interior-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.68) saturate(1.05);
}

.svg-scene-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 2;
}

.svg-scene-fallback.is-active {
  display: block;
}

.exterior-content {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 18px 48px 18px;
  display: flex;
  flex-direction: column;
}

/* Responsive Shutter Grid */
.shutter-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* Desktop: 6 columns */
  gap: 16px;
  margin: 12px 0 28px 0;
}

/* Advent Shutter Element */
.advent-shutter {
  position: relative;
  height: 130px;
  min-height: 92px; /* Touch target guaranteed >= 92px */
  border-radius: var(--radius-md);
  background: #18110D;
  border: 2px solid #3A2419;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.8);
  perspective: 900px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.22s var(--ease-snappy), box-shadow 0.22s ease;
}

.advent-shutter:hover, .advent-shutter:focus-visible {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
}

/* Inner Silhouette Glow (Revealed when open) */
.shutter-interior {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #FFE29F 0%, #E89B48 40%, #5B2B12 85%, #18110D 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-align: center;
}

.shutter-interior-art {
  font-size: 28px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.shutter-interior-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #1A110D;
  margin-top: 4px;
  line-height: 1.2;
}

/* Double Hinged Wooden Doors */
.shutter-doors {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 3;
  pointer-events: none;
}

.shutter-door-half {
  flex: 1;
  height: 100%;
  background: linear-gradient(135deg, #3C271C 0%, #291A12 100%);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(232, 155, 72, 0.18);
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.door-left {
  transform-origin: left center;
  border-right: 1px solid rgba(0, 0, 0, 0.8);
}

.door-right {
  transform-origin: right center;
  border-left: 1px solid rgba(0, 0, 0, 0.8);
}

/* Shutter State Badges */
.shutter-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.shutter-day-num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-amber-glow);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.shutter-icon {
  font-size: 15px;
  margin-top: -2px;
}

/* State: Locked (Frost Blue Glaze) */
.advent-shutter.is-locked {
  filter: grayscale(0.25);
  cursor: not-allowed;
}

.advent-shutter.is-locked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(184, 213, 229, 0.2) 0%, rgba(21, 38, 48, 0.4) 100%);
  pointer-events: none;
  z-index: 4;
}

.advent-shutter.is-locked .shutter-day-num {
  color: var(--accent-frost-silver);
}

/* State: Ready (Warm Breathing Amber Glow) */
.advent-shutter.is-ready {
  border-color: var(--accent-hearth-amber);
  animation: amberPulse 2s infinite alternate ease-in-out;
}

.advent-shutter.is-ready .shutter-day-num {
  color: #FFFFFF;
  text-shadow: 0 0 10px var(--accent-candle-gold);
}

/* State: Completed (Swung Open) */
.advent-shutter.is-completed .door-left {
  transform: rotateY(-115deg);
}

.advent-shutter.is-completed .door-right {
  transform: rotateY(115deg);
}

.advent-shutter.is-completed .shutter-badge {
  display: none;
}

.shutter-check-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 6;
  background: var(--accent-spruce-bough);
  border: 1px solid var(--accent-candle-gold);
  color: var(--accent-candle-gold);
  border-radius: var(--radius-full);
  width: 22px;
  height: 22px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* Door 25 Wrap & Great Arch */
.door-25-wrap {
  margin: 12px auto 28px auto;
  max-width: 580px;
  width: 100%;
}

.door-25-card {
  background: linear-gradient(180deg, #2E1B13 0%, #190E0A 100%);
  border: 2px solid var(--accent-candle-gold);
  border-radius: 40px 40px var(--radius-md) var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 25px rgba(247, 198, 104, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.door-25-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 35px rgba(247, 198, 104, 0.4);
}

.door-25-wreath {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.door-25-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--accent-amber-glow);
}

.door-25-subtitle {
  font-family: var(--font-prose);
  font-size: 16px;
  color: var(--paper-parchment);
  margin-top: 4px;
}

.exterior-footer-cta {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

/* Button Variants */
.btn-amber-lg {
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 700;
  color: #170E09;
  background: linear-gradient(135deg, #FFE29F 0%, #E89B48 50%, #D27623 100%);
  padding: 14px 32px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 20px rgba(232, 155, 72, 0.45);
  transition: all 0.22s var(--ease-snappy);
}

.btn-amber-lg:hover, .btn-amber-lg:focus-visible {
  /* no transform: a lift moved the button out from under the cursor and made it jitter */
  box-shadow: 0 10px 28px rgba(232, 155, 72, 0.6);
  filter: brightness(1.08);
}

.btn-ghost-cream {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: var(--paper-parchment);
  background: rgba(31, 22, 18, 0.7);
  border: 1px solid var(--border-gold-subtle);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  transition: all 0.18s ease;
}

.btn-ghost-cream:hover, .btn-ghost-cream:focus-visible {
  background: rgba(232, 155, 72, 0.22);
  border-color: var(--accent-amber-glow);
  color: #FFFFFF;
}

/* --- 9. Stage 3: The Great Hearth Room (Interior) --- */
.stage-interior {
  position: relative;
  min-height: calc(100vh - 65px);
  display: flex;
  flex-direction: column;
}

.interior-content {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 18px 48px 18px;
}

.interior-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(15, 26, 28, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  margin-bottom: 24px;
}

.hearth-sanctuary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.sanctuary-card {
  background: var(--bg-walnut-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-hearth);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.sanctuary-card:hover {
  border-color: var(--border-gold-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.sanctuary-card.span-wide {
  grid-column: 1 / -1;
}

/* Fireplace Station */
.card-fireplace {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.fireplace-hearth-flame {
  width: 120px;
  height: 90px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  filter: drop-shadow(0 0 20px rgba(247, 198, 104, 0.7));
  animation: flameFlicker 1.4s infinite alternate ease-in-out;
}

@keyframes flameFlicker {
  0% { transform: scale(1) rotate(-1deg); }
  50% { transform: scale(1.05) rotate(1deg); }
  100% { transform: scale(0.98) rotate(0deg); }
}

/* 4-Candle Advent Wreath */
.wreath-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 14px 0;
  padding: 10px 16px;
  background: rgba(36, 74, 61, 0.35);
  border-radius: var(--radius-full);
  border: 1px solid rgba(53, 109, 90, 0.4);
}

.wreath-candle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.wreath-candle-flame {
  width: 10px;
  height: 14px;
  background: #FFE29F;
  border-radius: 50% 50% 35% 35%;
  box-shadow: 0 0 12px #F7C668;
  opacity: 0.2;
  transition: all 0.3s ease;
}

.wreath-candle.is-lit .wreath-candle-flame {
  opacity: 1;
  animation: candleGlow 1.2s infinite alternate;
}

@keyframes candleGlow {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.15); filter: brightness(1.25); }
}

.wreath-candle-body {
  width: 14px;
  height: 32px;
  background: #D9D2C7;
  border-radius: 2px;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
}

.wreath-candle.is-lit .wreath-candle-body {
  background: linear-gradient(180deg, #FDF8F0 0%, #E8DFC8 100%);
}

/* Barnaby Station */
.card-barnaby {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.barnaby-avatar-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 3px solid var(--accent-hearth-amber);
  margin-bottom: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}

.barnaby-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.barnaby-mood-whisper {
  font-family: var(--font-prose);
  font-style: italic;
  font-size: 16px;
  color: var(--accent-frost-silver);
  margin: 8px 0 16px 0;
  min-height: 48px;
}

/* --- 10. Modals & Ceremony Wizard Window --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal-backdrop);
  background: rgba(8, 13, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: stageFadeIn 0.25s ease;
  overflow-y: auto;
}

.ceremony-window {
  background: var(--bg-parchment-sheet);
  color: var(--paper-ink);
  border: 2px solid #5C3826;
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.9);
  padding: 32px 28px;
  position: relative;
}

.ceremony-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 22px;
  color: var(--paper-ink-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.ceremony-close-btn:hover {
  background: rgba(92, 56, 38, 0.15);
  color: var(--paper-ink);
}

/* Ceremony Wizard Beats Indicator */
.ceremony-beats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.ceremony-beat-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--paper-ink-muted);
}

.beat-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: #D9C8B5;
  transition: all 0.2s ease;
}

.ceremony-beat-step.is-active .beat-dot {
  background: var(--accent-berry-velvet);
  box-shadow: 0 0 8px rgba(143, 36, 50, 0.5);
}

.ceremony-beat-step.is-active {
  color: var(--accent-berry-velvet);
}

.ceremony-beat-step.is-done .beat-dot {
  background: var(--accent-spruce-bough);
}

/* Ceremony Header & Vignette */
.ceremony-header {
  text-align: center;
  margin-bottom: 20px;
}

.ceremony-day-tag {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-berry-velvet);
}

.ceremony-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--paper-ink);
  margin: 4px 0 8px 0;
}

.ceremony-lore-quote {
  font-family: var(--font-prose);
  font-style: italic;
  font-size: 17px;
  color: var(--paper-ink-soft);
  max-width: 580px;
  margin: 0 auto;
}

/* Interactive Workbenches */
.frost-canvas-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid #5C3826;
  margin: 18px 0;
  cursor: grab;
  touch-action: none;
}

.frost-canvas-wrap:active {
  cursor: grabbing;
}

.frost-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.frost-reveal-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #231610;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* Cocoa & Lantern & Craft Workbenches */
.workbench-panel {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid #D6C2AC;
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 18px 0;
  text-align: center;
}

.workbench-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.workbench-option-btn {
  background: var(--bg-parchment-light);
  border: 1.5px solid #C4AC94;
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.workbench-option-btn:hover {
  background: #FFFFFF;
  border-color: var(--accent-hearth-amber);
  transform: translateY(-2px);
}

.workbench-option-btn.is-active {
  border-color: var(--accent-berry-velvet);
  background: #FFF7F2;
  box-shadow: 0 0 12px rgba(143, 36, 50, 0.25);
}

/* Parchment Journal Textarea (Strictly 16-17.5px) */
.parchment-journal {
  width: 100%;
  min-height: 140px;
  background: var(--bg-parchment-light);
  border: 1.5px solid #C4AC94;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--paper-ink);
  font-family: var(--font-prose);
  font-size: 17px; /* Crystal clarity as required */
  line-height: 1.6;
  resize: vertical;
  margin: 14px 0;
}

.parchment-journal:focus {
  outline: none;
  border-color: var(--accent-berry-velvet);
  box-shadow: 0 0 10px rgba(143, 36, 50, 0.25);
}

/* Wax Seal Button (Hold-to-Seal Action) */
.wax-seal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 24px 0 12px 0;
}

.wax-seal-btn {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, #A52B3C 0%, #7A1A27 100%);
  border: 2px solid #54111B;
  box-shadow: 0 6px 18px rgba(122, 26, 39, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFE6E9;
  font-size: 32px;
  cursor: pointer;
  user-select: none;
  touch-action: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wax-seal-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(122, 26, 39, 0.6);
}

.wax-seal-btn:active {
  transform: scale(0.96);
}

.seal-ring-svg {
  position: absolute;
  inset: -6px;
  width: 96px;
  height: 96px;
  transform: rotate(-90deg);
  pointer-events: none;
}

.seal-ring-svg circle {
  fill: none;
  stroke: var(--accent-candle-gold);
  stroke-width: 4;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  transition: stroke-dashoffset 0.08s linear;
}

.wax-seal-hint {
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--paper-ink-muted);
  margin-top: 8px;
}

/* Wax Envelope Slide-Out Animation */
.wax-envelope {
  position: relative;
  background: #EFE4D2;
  border: 2px solid #6E4933;
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 16px 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  animation: envelopeSlideOut 0.6s var(--ease-snappy) forwards;
}

@keyframes envelopeSlideOut {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Handwritten Guestbook Letters (Caveat 21-23px) */
.handwritten-letter {
  font-family: var(--font-handwritten);
  font-size: 22px; /* Crystal legibility */
  line-height: 1.5;
  color: var(--paper-ink);
}

/* --- 11. Tree Workshop Component Styles --- */
.tree-stage {
  position: relative;
  width: 100%;
  max-width: 580px;
  aspect-ratio: 3 / 4;
  max-height: 72vh;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #162E26 0%, #0D1C17 70%, #080D0F 100%);
  border: 2px solid var(--accent-spruce-bright);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.tree-bough-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.garland-lights-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tree-ornament {
  position: absolute;
  cursor: grab;
  font-size: 28px;
  transform-origin: top center;
  animation: ornamentSway 3.2s infinite ease-in-out;
  touch-action: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.tree-ornament:active {
  cursor: grabbing;
}

@keyframes ornamentSway {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(3deg); }
  75% { transform: rotate(-3deg); }
  100% { transform: rotate(0deg); }
}

.ornament-tray {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 8px;
  background: rgba(15, 26, 28, 0.9);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-md);
  margin-top: 14px;
}

.ornament-tray-item {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.ornament-tray-item:hover {
  background: rgba(232, 155, 72, 0.25);
  border-color: var(--accent-amber-glow);
  transform: scale(1.08);
}

/* --- 12. Guestbook Modal Spread --- */
.guestbook-spread {
  background: var(--bg-parchment-sheet);
  border: 3px double #5A3521;
  border-radius: var(--radius-lg);
  max-width: 960px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  display: grid;
  grid-template-columns: 1fr 1fr;
  color: var(--paper-ink);
  position: relative;
}

.guestbook-page {
  padding: 32px 28px;
}

.guestbook-page-left {
  border-right: 1px solid #D5C1AA;
}

/* --- 13. Audio Soundscape Popover --- */
.audio-popover {
  position: fixed;
  top: 70px;
  right: 18px;
  z-index: var(--z-popover);
  width: 320px;
  background: rgba(22, 15, 12, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-gold-strong);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  animation: stageFadeIn 0.2s ease;
}

.audio-track-slider {
  margin: 12px 0;
}

.audio-track-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-amber-glow);
  margin-bottom: 4px;
}

.audio-track-slider input[type="range"] {
  width: 100%;
  accent-color: var(--accent-hearth-amber);
}

/* --- 14. Interactive Tour Spotlight --- */
.tour-layer {
  position: fixed;
  inset: 0;
  z-index: var(--z-tour);
  pointer-events: none;
}

.tour-spotlight {
  position: absolute;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 9999px rgba(8, 13, 15, 0.82);
  border: 2px solid var(--accent-candle-gold);
  animation: tourGlow 2s infinite alternate;
  pointer-events: auto;
  transition: all 0.35s var(--ease-snappy);
}

@keyframes tourGlow {
  0% { box-shadow: 0 0 0 9999px rgba(8, 13, 15, 0.82), 0 0 15px rgba(247, 198, 104, 0.4); }
  100% { box-shadow: 0 0 0 9999px rgba(8, 13, 15, 0.82), 0 0 30px rgba(247, 198, 104, 0.8); }
}

.tour-card {
  position: absolute;
  width: 300px;
  background: var(--bg-walnut-card-solid);
  border: 1px solid var(--border-gold-strong);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-hearth);
  color: var(--paper-parchment);
  pointer-events: auto;
  z-index: calc(var(--z-tour) + 5);
}

/* --- 15. Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-message {
  background: linear-gradient(135deg, rgba(31, 22, 18, 0.95) 0%, rgba(53, 31, 22, 0.95) 100%);
  border: 1px solid var(--accent-amber-glow);
  color: var(--accent-amber-glow);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  animation: toastPop 0.3s var(--ease-snappy);
}

@keyframes toastPop {
  from { opacity: 0; transform: translateY(14px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- 16. Responsive Media Queries --- */
/* Tablets & Medium Screens (768px to 1023px) */
@media (max-width: 1023px) {
  .shutter-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 columns on tablet */
    gap: 14px;
  }
  
  .hearth-sanctuary-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Screens (< 768px) */
@media (max-width: 767px) {
  .hearth-hud {
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 6px 8px;
  }

  .hud-brand {
    max-width: 44%;
    overflow: hidden;
  }

  .hud-inn-title {
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .hud-mode-badge {
    display: none; /* Hide badge to preserve 3-Stat Hearth Pill visibility */
  }

  /* 3-Stat Hearth Pill: Full-width dedicated row on mobile — zero overlap! */
  .hud-meters {
    order: 3;
    width: 100%;
    justify-content: space-around;
    gap: 6px;
    padding: 4px 10px;
  }
  
  .hud-meter {
    gap: 3px;
    padding: 1px 2px;
  }
  
  .meter-label {
    display: none; /* Hide textual labels on tight mobile screens, keep icons + bold numbers */
  }
  
  .meter-info strong {
    font-size: 14px; /* Strictly >= 14px */
  }
  
  .meter-track {
    width: 24px;
    height: 5px;
  }

  .btn-hud-primary {
    font-size: 13px;
    padding: 6px 10px;
  }

  .btn-hud-icon {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .shutter-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 columns on mobile */
    gap: 10px;
  }

  .advent-shutter {
    height: 105px; /* Minimum >= 92px tap target maintained */
  }

  .shutter-day-num {
    font-size: 20px;
  }

  .guestbook-spread {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

  .guestbook-page-left {
    border-right: none;
    border-bottom: 1px solid #D5C1AA;
  }
  
  .rhythm-grid {
    grid-template-columns: 1fr;
  }
}

/* Very Small Mobile (< 400px) */
@media (max-width: 399px) {
  .hud-brand {
    max-width: 38%;
  }
  .btn-hud-primary {
    font-size: 12.5px;
    padding: 6px 9px;
  }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .intro-slide-bg {
    animation: none !important;
  }
}

/* --- 17. Complete Print Stylesheet (@media print) --- */
@media print {
  @page {
    size: letter portrait;
    margin: 0.6in;
  }

  /* Hide Interactive Screen-Only Shell */
  #snow-canvas,
  #hearth-hud,
  #app-main,
  .modal-backdrop,
  .audio-popover,
  .toast-container,
  .tour-layer {
    display: none !important;
  }

  /* Present Print Root Clearly in Dark Ink on White Paper */
  body {
    background: #FFFFFF !important;
    color: #1A1A1A !important;
    font-size: 12pt;
    line-height: 1.5;
  }

  #print-chronicle-root {
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  .print-chronicle-header {
    text-align: center;
    border-bottom: 2pt solid #4A2E1B;
    padding-bottom: 14pt;
    margin-bottom: 20pt;
  }

  .print-chronicle-title {
    font-family: Georgia, serif;
    font-size: 24pt;
    font-weight: bold;
    color: #2E1B10;
  }

  .print-chronicle-sub {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 13pt;
    color: #555555;
    margin-top: 4pt;
  }

  .print-entry-card,
  .print-letter-card {
    page-break-inside: avoid;
    break-inside: avoid;
    border: 1pt solid #CCCCCC;
    border-radius: 4pt;
    padding: 12pt;
    margin-bottom: 16pt;
    background: #FAFAFA;
  }

  .print-day-heading {
    font-size: 14pt;
    font-weight: bold;
    color: #3B2113;
    border-bottom: 0.5pt solid #DDD;
    padding-bottom: 4pt;
    margin-bottom: 8pt;
  }

  .print-traveler-name {
    font-style: italic;
    color: #666;
  }

  .print-reflection-body {
    font-size: 11pt;
    color: #222;
    margin-top: 6pt;
  }
}

/* Phase 1: in-game Christmas epilogue */
@keyframes epilogueDrift {
  from { transform: scale(1.02) translate(0, 0); }
  to { transform: scale(1.1) translate(-1.5%, -1%); }
}
@media (prefers-reduced-motion: reduce) {
  .epilogue-window img { animation: none !important; }
}
