/* ==========================================================================
   PHASE 4 — The Living Hearth Room
   ========================================================================== */
.stage-interior .interior-backdrop { position: fixed; inset: 0; z-index: 1; }
.stage-interior .interior-backdrop img { filter: blur(18px) brightness(0.32) saturate(1.1); transform: scale(1.08); }
.stage-interior .interior-content { max-width: 1180px; padding: 14px 12px 40px 12px; z-index: 6; }
.stage-interior .interior-topbar { margin-bottom: 12px; padding: 6px 8px 6px 14px; }
.stage-interior .coach-inline { font-family: var(--font-prose); font-size: 15px; color: #F6EFE2; margin: 0; }
@media (max-width: 767px) { .stage-interior .coach-inline { display: none; } }

.room-pan {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 16px;
  border: 2px solid #5C3826;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #8A5A36 transparent;
  background: #1B120D;
}
.room-canvas { position: relative; width: 100%; aspect-ratio: 1376 / 768; overflow: hidden; }
.room-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.rm-dim { position: absolute; inset: 0; background: radial-gradient(ellipse at 40% 60%, rgba(10, 6, 20, 0.2) 0%, rgba(10, 6, 20, 0.9) 100%); pointer-events: none; transition: opacity 1.2s ease; }
.rm-fire {
  position: absolute;
  left: 4%;
  top: 34%;
  width: 34%;
  height: 52%;
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 170, 70, 0.75) 0%, rgba(255, 120, 40, 0.3) 40%, rgba(255, 120, 40, 0) 70%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: rmFire 2.2s ease-in-out infinite alternate;
}
.rm-flame {
  position: absolute;
  width: 1.3%;
  height: 4%;
  margin: -2% 0 0 -0.65%;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #FFFBEA 0%, #FFC94D 55%, rgba(255, 150, 40, 0) 80%);
  box-shadow: 0 0 14px 6px rgba(255, 200, 90, 0.55);
  pointer-events: none;
  animation: rmFlicker 1.3s ease-in-out infinite alternate;
}
.rm-twinkle {
  position: absolute;
  width: 0.9%;
  aspect-ratio: 1 / 1;
  margin: -0.45%;
  border-radius: 50%;
  background: #FFE9A8;
  box-shadow: 0 0 10px 3px rgba(255, 220, 130, 0.85);
  pointer-events: none;
  animation: rmTwinkle 2s ease-in-out infinite;
}
.rm-topstar { position: absolute; left: 85%; top: 5%; transform: translate(-50%, -50%); font-size: clamp(18px, 2.6vw, 34px); color: #FFE29A; text-shadow: 0 0 16px rgba(255, 220, 120, 1); pointer-events: none; animation: rmTwinkle 3s ease-in-out infinite; }

/* Hotspots */
.rm-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  z-index: 4;
}
.rm-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  background: rgba(31, 22, 18, 0.72);
  border: 2px solid #FFD28A;
  box-shadow: 0 0 0 0 rgba(255, 210, 138, 0.7);
  animation: rmPulse 2.4s ease-out infinite;
}
.rm-label {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  color: #FFF4DE;
  background: rgba(20, 12, 8, 0.78);
  padding: 2px 9px;
  border-radius: 9999px;
  white-space: nowrap;
}
.rm-hotspot.is-active .rm-dot { background: #E89B48; border-color: #FFF4DE; animation: none; box-shadow: 0 0 20px rgba(255, 210, 138, 0.9); }
.rm-hotspot:focus-visible .rm-dot { outline: 3px solid #FFF4DE; outline-offset: 2px; }
.rm-badge {
  position: absolute;
  top: 0;
  right: 2px;
  min-width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: #B52F42;
  color: #FFF;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  animation: rmBounce 1.2s ease-in-out infinite;
}
.rm-hotspot.is-wag .rm-dot { animation: rmWag 0.6s ease-in-out 2; }

/* Guests who stayed */
.rm-guest {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 3;
  animation: rmArrive 0.6s ease;
}
.rm-guest img {
  width: clamp(40px, 4.4vw, 62px);
  height: clamp(40px, 4.4vw, 62px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  border: 3px solid #E0A458;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 14px rgba(255, 196, 110, 0.5);
}
.rm-guest-name {
  margin-top: 2px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: #FFF4DE;
  background: rgba(20, 12, 8, 0.75);
  padding: 0 7px;
  border-radius: 9999px;
}

.rm-bubble {
  position: absolute;
  z-index: 6;
  transform: translate(-50%, -100%) scale(0.9);
  max-width: min(320px, 70%);
  padding: 10px 14px;
  border-radius: 14px;
  background: #FFF8EC;
  color: #2B1E17;
  font-family: var(--font-prose);
  font-size: 15px;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.rm-bubble strong { font-family: var(--font-ui); color: #8F2432; margin-right: 4px; }
.rm-bubble.is-shown { opacity: 1; transform: translate(-50%, -100%) scale(1); }
.rm-heart { position: absolute; z-index: 5; color: #E5485E; font-size: 22px; pointer-events: none; animation: rmHeart 1.6s ease-out forwards; }

.room-hint { font-family: var(--font-prose); font-size: 15px; color: #F6EFE2; text-align: center; margin: 8px 0 12px 0; }

/* Panel below the room */
.room-panel {
  background: linear-gradient(180deg, #F6EFE2 0%, #EFE4D2 100%);
  color: #2B1E17;
  border: 2px solid #5C3826;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  scroll-margin-top: 70px;
}
.rp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rp-head h3 { font-family: var(--font-display); font-size: 26px; margin: 0; line-height: 1.1; }
.rp-head p { font-family: var(--font-prose); font-size: 15px; color: #6E5446; margin: 2px 0 0 0; }
.rp-icon { font-size: 30px; flex: 0 0 auto; }
.rp-avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; object-position: center 22%; border: 3px solid #D49B35; }
.rp-close { margin-left: auto; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #C4AC94; background: #FAF6EE; font-size: 18px; color: #7A5B4C; cursor: pointer; }
.rp-sub { font-family: var(--font-ui); font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #7A5B4C; margin: 16px 0 8px 0; }
.rp-text { font-family: var(--font-prose); font-size: 16px; line-height: 1.6; margin: 6px 0; }
.rp-note { font-family: var(--font-ui); font-size: 14px; color: #7A5B4C; }
.rp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.rp-btn {
  border: none;
  border-radius: 9999px;
  padding: 11px 20px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: #FAF6EE;
  background: #244A3D;
  cursor: pointer;
}
.rp-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.rp-btn-gold { background: linear-gradient(135deg, #E89B48 0%, #D27623 100%); color: #1F1612; animation: rpGlow 1.8s ease-in-out infinite; }
@keyframes rpGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(232, 155, 72, 0.6); } 50% { box-shadow: 0 0 18px 4px rgba(232, 155, 72, 0.7); } }
.rp-meter { display: flex; align-items: center; gap: 10px; font-family: var(--font-ui); font-size: 14px; font-weight: 700; }
.rp-bar { flex: 1 1 auto; height: 12px; border-radius: 9999px; background: #E2D3BF; overflow: hidden; }
.rp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #E89B48, #D2502A); border-radius: 9999px; }
.rp-candles { display: flex; justify-content: space-around; gap: 8px; }
.rp-candle { display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--font-ui); font-size: 14px; font-weight: 700; color: #9C8775; }
.rp-taper { position: relative; width: 14px; height: 46px; border-radius: 3px; background: linear-gradient(180deg, #F3E6CF, #D8C4A2); }
.rp-candle:nth-child(3) .rp-taper { background: linear-gradient(180deg, #F2C4CC, #D98C9A); }
.rp-candle.is-lit { color: #8F2432; }
.rp-candle.is-lit .rp-taper i { position: absolute; left: 50%; top: -16px; width: 12px; height: 16px; margin-left: -6px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #FFFBEA 0%, #FFC94D 55%, rgba(255, 150, 40, 0) 80%); box-shadow: 0 0 12px rgba(255, 200, 90, 0.8); animation: rmFlicker 1.3s ease-in-out infinite alternate; }

.rp-gift { display: block; width: 100%; text-align: left; margin: 0 0 12px 0; padding: 12px 14px; border-radius: 12px; border: 2px dashed #C48A3A; background: #FFF7E8; font-family: var(--font-prose); font-size: 16px; color: #2B1E17; cursor: pointer; }
.rp-gift b { color: #8F2432; }
.rp-guests { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.rp-guest-chip { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 9999px; border: 1px solid #D6C2AC; background: #FAF6EE; cursor: pointer; text-align: left; }
.rp-guest-chip img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: center 22%; }
.rp-guest-chip strong { display: block; font-family: var(--font-ui); font-size: 15px; }
.rp-guest-chip em { font-style: normal; font-family: var(--font-ui); font-size: 13px; color: #B52F42; font-weight: 700; }
.rp-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-quick-btn { border: 1px solid #C4AC94; background: #FAF6EE; border-radius: 9999px; padding: 9px 14px; font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: #2B1E17; cursor: pointer; }

.rp-barnaby-line { font-family: var(--font-handwritten); font-size: 24px; color: #6E4933; min-height: 30px; margin: 4px 0 8px 0; }
.rp-treasures { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 520px) { .rp-treasures { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.rp-treasure { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #E9DDCB; color: #A08A76; font-family: var(--font-ui); font-size: 16px; font-weight: 700; }
.rp-treasure.is-found { background: #FFF7E8; border: 1.5px solid #E0A458; font-size: 22px; }
.rp-found { display: flex; gap: 12px; align-items: flex-start; padding: 12px; margin: 0 0 12px 0; border-radius: 12px; background: #FFF7E8; border: 2px solid #E0A458; animation: rmArrive 0.5s ease; }
.rp-found-icon { font-size: 40px; line-height: 1; }
.rp-found strong { font-family: var(--font-ui); font-size: 16px; color: #8F2432; }
.rp-found p { font-family: var(--font-prose); font-size: 16px; margin: 4px 0 0 0; line-height: 1.5; }

.rp-recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rp-recipe { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 12px; background: #FAF6EE; border: 1px solid #D6C2AC; }
.rp-recipe.is-cooked { border: 2px solid #4F8A6E; }
.rp-recipe.is-locked { opacity: 0.6; }
.rp-recipe-dish { font-size: 26px; }
.rp-recipe strong { font-family: var(--font-ui); font-size: 14px; }
.rp-recipe em { font-style: normal; font-family: var(--font-ui); font-size: 13px; color: #7A5B4C; }
.rp-friends { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.rp-friend { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 12px; background: #FAF6EE; border: 1px solid #D6C2AC; }
.rp-friend img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: center 22%; flex: 0 0 auto; }
.rp-friend strong { display: block; font-family: var(--font-ui); font-size: 15px; }
.rp-friend span { display: block; font-family: var(--font-ui); font-size: 13px; color: #B52F42; font-weight: 700; }
.rp-friend em { display: block; font-style: normal; font-family: var(--font-prose); font-size: 14px; color: #4F382E; margin-top: 2px; }
.rp-hearts { font-size: 20px; color: #B52F42; letter-spacing: 2px; }
.rp-hearts span { margin-left: 8px; font-family: var(--font-ui); font-size: 14px; letter-spacing: 0; color: #7A5B4C; }
.rp-whisper { margin: 10px 0 0 0; padding: 8px 14px; border-left: 3px solid #C48A3A; font-family: var(--font-handwritten); font-size: 24px; color: #6E4933; }

/* the tree workshop keeps its dark styling inside the light panel */
.room-panel #tree-workshop-mount { background: #1F1612; border-radius: 12px; padding: 12px 8px; }

@keyframes rmPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 210, 138, 0.7); } 70% { box-shadow: 0 0 0 14px rgba(255, 210, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 210, 138, 0); } }
@keyframes rmFire { from { opacity: 0.75; transform: scale(1); } to { opacity: 1; transform: scale(1.05); } }
@keyframes rmFlicker { from { transform: scale(1, 1); opacity: 0.85; } to { transform: scale(0.9, 1.1); opacity: 1; } }
@keyframes rmTwinkle { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes rmBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes rmWag { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-18deg); } 75% { transform: rotate(18deg); } }
@keyframes rmArrive { from { opacity: 0; transform: translate(-50%, -40%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes rmHeart { 0% { opacity: 0; transform: translateY(0) scale(0.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-70px) scale(1.2); } }
.rp-found { animation-name: rpFound; }
@keyframes rpFound { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .rm-dot, .rm-fire, .rm-flame, .rm-twinkle, .rm-topstar, .rm-badge, .rp-btn-gold, .rm-guest, .rm-heart { animation: none !important; }
}

.rp-recipe-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 9px; }
.rp-recipe.is-locked .rp-recipe-dish { font-size: 22px; }
