/* ── Hidden Room — scoped to overlay root ── */

.hidden-room-root {
  --hr-espresso: #1a1410;
  --hr-walnut: #2c2118;
  --hr-cream: #f5efe6;
  --hr-beige: #d4c4a8;
  --hr-amber: #c4a574;
  --hr-burgundy: #6b3a3a;
  --hr-gold-glow: rgba(196, 165, 116, 0.45);
  --hr-chrome-inset: 1.1rem;
  --hr-close-size: 44px;
  position: fixed;
  inset: 0;
  z-index: 200;
  font-family: var(--font-serif, "Cormorant Garamond", Georgia, serif);
  color: var(--hr-cream);
  overflow: hidden;
  pointer-events: auto;
}

.hidden-room-root.hidden,
.hidden-room-root[hidden] {
  display: none !important;
}

body.hidden-room-active {
  overflow: hidden;
}

body.hidden-room-active .hero,
body.hidden-room-active .player-wrap,
body.hidden-room-active .birthday-btn,
body.hidden-room-active .signature,
body.hidden-room-active .queue-panel {
  visibility: hidden;
}

.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;
}

.hidden {
  display: none !important;
}

/* Entry transition */
.hr-entry-veil {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
  z-index: 5;
}

.hidden-room-root.is-entering .hr-entry-veil {
  opacity: 0.85;
}

.hidden-room-root.is-entering-active .hr-entry-veil {
  opacity: 1;
}

.hidden-room-root.is-entering-active::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  background: radial-gradient(
    ellipse 50% 40% at 50% 45%,
    rgba(196, 165, 116, 0.35) 0%,
    transparent 65%
  );
  animation: hr-warm-bloom 1.1s ease forwards;
  pointer-events: none;
}

@keyframes hr-warm-bloom {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hr-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.07;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hr-ambient {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hr-lamp-glow {
  position: absolute;
  top: 18%;
  left: 50%;
  width: min(90vw, 520px);
  height: 40vh;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(196, 165, 116, 0.22) 0%,
    transparent 70%
  );
  animation: hr-lamp-flicker 6s ease-in-out infinite;
}

@keyframes hr-lamp-flicker {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
  73% {
    opacity: 0.78;
  }
}

.hr-dust {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(245, 239, 230, 0.15) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.25;
  animation: hr-dust-drift 28s linear infinite;
}

@keyframes hr-dust-drift {
  to {
    background-position: 120px 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hr-lamp-glow,
  .hr-dust,
  .hr-radio-glow {
    animation: none !important;
  }

  .hidden-room-root.is-entering-active::after {
    animation: none;
    opacity: 1;
  }
}

/* Heart secret taps (main site) */
.heart-btn.is-secret-tap {
  transform: scale(1.12);
  box-shadow: 0 0 12px rgba(232, 160, 191, 0.5);
}

.heart-btn.is-secret-unlock {
  animation: hr-heart-unlock 0.65s ease forwards;
  box-shadow: 0 0 28px rgba(232, 160, 191, 0.85), 0 0 48px rgba(196, 165, 116, 0.4);
}

@keyframes hr-heart-unlock {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1.08);
  }
}

.hr-heart-particle {
  position: fixed;
  z-index: 250;
  font-size: 0.75rem;
  color: #e8a0bf;
  pointer-events: none;
  animation: hr-particle-rise 0.85s ease-out forwards;
}

@keyframes hr-particle-rise {
  to {
    transform: translate(var(--dx, 0), var(--dy, -30px));
    opacity: 0;
  }
}

/* Gatekeeper */
.hr-gate {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 2rem 1.25rem;
  background: linear-gradient(160deg, #0f0c0a 0%, var(--hr-walnut) 45%, #1a1410 100%);
}

.hr-gate-card {
  width: 100%;
  max-width: 22rem;
  text-align: center;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(196, 165, 116, 0.25);
  border-radius: 0.25rem;
  background: rgba(26, 20, 16, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.hr-gate-lock {
  font-size: 2rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hr-gate-title {
  font-family: var(--font-script, "Dancing Script", cursive);
  font-size: 1.75rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.hr-gate-sub {
  font-size: 1.05rem;
  opacity: 0.88;
  margin-bottom: 1.5rem;
}

.hr-gate-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(196, 165, 116, 0.35);
  border-radius: 0.15rem;
  background: rgba(0, 0, 0, 0.35);
  color: var(--hr-cream);
  font-family: inherit;
  font-size: 1rem;
}

.hr-gate-input:focus {
  outline: 2px solid var(--hr-amber);
  outline-offset: 2px;
}

.hr-gate-input.is-shake {
  animation: hr-shake 0.35s ease;
}

@keyframes hr-shake {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

.hr-gate-hint {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  opacity: 0.65;
  font-style: italic;
}

.hr-gate-error {
  margin-top: 0.75rem;
  color: #e8a0bf;
  font-size: 0.9rem;
}

.hr-gate-submit {
  margin-top: 1.25rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(196, 165, 116, 0.5);
  border-radius: 0.15rem;
  background: rgba(196, 165, 116, 0.2);
  color: var(--hr-cream);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.hr-gate-submit:hover {
  background: rgba(196, 165, 116, 0.35);
}

/* Room — full-viewport scene */
.hr-room {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background: #0a0806;
  transition: filter 0.6s ease;
}

.hr-room.is-dimmed {
  filter: brightness(0.45);
}

.hr-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.hr-scene-frame {
  cursor: pointer;
}

.hr-media-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0806;
}

.hr-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hr-media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  pointer-events: none;
}

.hr-media-overlay > .hr-hotspot,
.hr-media-overlay > .hr-letter-text,
.hr-media-overlay > .hr-letter-pager {
  pointer-events: auto;
}

.hr-media-overlay > .hr-radio-glow {
  pointer-events: none;
}

.hr-scene-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.hr-coupon-hotspot:hover,
.hr-coupon-hotspot:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.hr-coupon-hotspot.is-redeemed {
  box-shadow: inset 0 0 0 2px rgba(196, 165, 116, 0.65);
}

.hr-radio-notice {
  position: absolute;
  left: 50%;
  bottom: 4.5rem;
  transform: translateX(-50%);
  z-index: 6;
  max-width: 90%;
  margin-top: 0;
  font-size: 0.85rem;
  opacity: 0.85;
  text-align: center;
  line-height: 1.4;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.hr-scene-hotspots,
.hr-media-overlay .hr-hotspot {
  /* hotspots live inside hr-media-overlay */
}

.hr-hotspot {
  position: absolute;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  min-width: 44px;
  min-height: 44px;
}

.hr-hotspot:focus-visible {
  outline: 2px solid rgba(196, 165, 116, 0.85);
  outline-offset: 2px;
  box-shadow: 0 0 16px rgba(196, 165, 116, 0.45);
}

.hr-hotspot-seal:hover,
.hr-hotspot-seal:focus-visible {
  box-shadow: 0 0 20px rgba(196, 165, 116, 0.55);
  background: rgba(196, 165, 116, 0.12);
}

.hr-hotspot-box:hover,
.hr-hotspot-box:focus-visible {
  background: rgba(196, 165, 116, 0.1);
}

.hr-radio-glow {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  border-radius: 1rem;
  background: radial-gradient(
    ellipse at center,
    rgba(196, 165, 116, 0.28) 0%,
    transparent 68%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hr-scene-stage.is-radio-playing .hr-radio-glow {
  opacity: 1;
  animation: hr-radio-pulse 2.4s ease-in-out infinite;
}

@keyframes hr-radio-pulse {
  0%,
  100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}

/* Open coupon box — full viewport */
.hr-box-stage {
  position: fixed;
  inset: 0;
  z-index: 45;
  padding: 0;
  background: #0a0806;
}

/* Shared chrome: Back (top-left) and Close (top-right) */
.hr-chrome-back,
.hr-chrome-close {
  position: absolute;
  z-index: 80;
  box-sizing: border-box;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: rgba(245, 239, 230, 0.92);
  background: rgba(10, 8, 6, 0.62);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hr-chrome-back {
  top: var(--hr-chrome-inset);
  left: var(--hr-chrome-inset);
  display: inline-flex;
  align-items: center;
  min-height: var(--hr-close-size);
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hr-chrome-close {
  top: var(--hr-chrome-inset);
  right: var(--hr-chrome-inset);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--hr-close-size);
  height: var(--hr-close-size);
  padding: 0;
  border-radius: 0.4rem;
  font-size: 1.6rem;
  line-height: 1;
}

.hr-chrome-back:hover,
.hr-chrome-close:hover,
.hr-chrome-back:focus-visible,
.hr-chrome-close:focus-visible {
  background: rgba(10, 8, 6, 0.82);
  color: #f5efe6;
  outline: 2px solid rgba(196, 165, 116, 0.85);
  outline-offset: 2px;
}

.hr-chrome-round {
  flex-shrink: 0;
  width: var(--hr-close-size);
  height: var(--hr-close-size);
  border: none;
  border-radius: 50%;
  background: rgba(28, 18, 14, 0.72);
  color: #f5efe6;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.hr-chrome-round:hover,
.hr-chrome-round:focus-visible {
  background: rgba(28, 18, 14, 0.9);
  outline: 2px solid rgba(196, 165, 116, 0.85);
  outline-offset: 2px;
}

.hr-chrome-round:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Letter fullscreen — open letter artwork + text on paper */
.hr-letter-stage {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 0;
  background: #0a0806;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.hr-letter-stage.is-open {
  opacity: 1;
}

.hr-letter-text {
  position: absolute;
  z-index: 3;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
  color: #2c2118;
  line-height: 1.55;
  text-align: left;
  pointer-events: auto;
}

.hr-letter-body p {
  margin-bottom: 0.75rem;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  line-height: 1.65;
}

.hr-letter-signature {
  margin-top: 1rem;
  font-family: var(--font-script, "Dancing Script", cursive);
  font-size: clamp(1rem, 2vw, 1.25rem);
  text-align: right;
}

.hr-letter-pager {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--hr-cream);
  line-height: normal;
}

.hr-yt-host {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 320px;
  height: 180px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.hr-yt-host iframe {
  width: 320px;
  height: 180px;
}

/* Coupon viewer — parchment card over the open box */
.hr-coupon-viewer {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.25rem);
  padding: 5.5rem 1rem 2rem;
  pointer-events: none;
}

.hr-coupon-viewer .hr-chrome-round {
  pointer-events: auto;
}

.hr-coupon-sheet {
  pointer-events: auto;
  position: relative;
  width: min(22.5rem, calc(100vw - 8rem));
  max-height: min(78vh, 36rem);
  overflow: auto;
  padding: 1.6rem 1.55rem 1.45rem;
  text-align: center;
  color: #4a2a32;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.45), transparent 42%),
    linear-gradient(180deg, #f7efe4 0%, #efe2d0 55%, #e8d4c0 100%);
  border-radius: 0.35rem;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  animation: hr-coupon-rise 0.45s ease;
}

.hr-coupon-sheet-icon {
  width: 4.2rem;
  height: 3.4rem;
  margin: 0 auto 0.35rem;
}

.hr-coupon-sheet-icon svg {
  width: 100%;
  height: 100%;
}

.hr-coupon-sheet h3 {
  margin: 0 0 0.85rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #7a3142;
}

.hr-coupon-sheet-body p {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #4c3530;
}

.hr-coupon-sheet-flourish {
  margin: 0.7rem 0 0.9rem;
  color: #8b3a4a;
  opacity: 0.75;
  letter-spacing: 0.35em;
}

.hr-coupon-redeem {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 0.7rem;
  background: #7a3142;
  color: #f5efe6;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(74, 24, 32, 0.28);
}

.hr-coupon-redeem:hover,
.hr-coupon-redeem:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid rgba(122, 49, 66, 0.45);
  outline-offset: 2px;
}

.hr-coupon-redeemed {
  margin-top: 0.5rem;
}

@keyframes hr-coupon-rise {
  from {
    transform: scale(0.92) translateY(12px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.hr-redeemed-badge {
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.hr-redeem-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 1rem 1.25rem;
  text-align: center;
  background: rgba(26, 20, 16, 0.95);
  border: 1px solid rgba(196, 165, 116, 0.35);
  border-radius: 0.2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.hr-redeem-toast p + p {
  margin-top: 0.25rem;
  opacity: 0.85;
}

@media (max-width: 640px) {
  .hr-hotspot {
    min-width: 48px;
    min-height: 48px;
  }
}
