.rain-room {
  --ink: #121d2b;
  --page: #101b2a;
  --card: #19283a;
  --deep: #0a131e;
  --ivory: #f4f2eb;
  --muted: #bccada;
  --quiet: #9aadc0;
  --mint: #c6def1;
  --accent: #b5d2ea;
  --line: #abc7df30;
  --gold: #f4d5a1;
  --room-border: #536b83;
  --room-button: #263c53;
}

.rain-room::before {
  opacity: 1;
  background: radial-gradient(ellipse at 50% 5%, #23394e, transparent 65%);
}

:where(.rain-room) button { background-color: var(--room-button); }
:where(.rain-room) button:hover { background-color: #354f68; }
.rain-room .text-button { background-color: transparent; }
.rain-room .text-button:hover { background-color: #a3c9ed18; }
.rain-room .outline-button { background-color: transparent; border-color: var(--room-border); }
.rain-room .outline-button:hover { background-color: #aac8e61c; border-color: #94b3cc; }
.rain-room .primary-button { background: var(--gold); color: #252017; }
.rain-room .primary-button:hover { background: #ffe6b8; }
.rain-room .plus-button { background: #25394e; color: var(--ivory); border-color: var(--room-border); }
.rain-room .plus-button:hover { background: #35516c; }
.rain-room select, .rain-room input:not([type='range']) { background: #1a2b3d; border-color: var(--room-border); }
.rain-room input[type='range'] { background-color: #5f7c97; }
.rain-room .site-header { padding-block: 14px; }
.rain-room .site-header button { white-space: nowrap; }
.rain-room .container { max-width: 1340px; padding-inline: clamp(16px, 4vw, 56px); }
.rain-room .room-layout { scroll-margin-top: 12px; }

.room-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px 24px;
  margin: 24px 0 16px;
}

.room-intro h1 {
  font-size: clamp(36px, 5vw, 70px);
  line-height: 1.03;
  margin: 0;
}

.room-intro h1 em { color: #bfd8ed; }
.room-intro p { color: var(--muted); font-size: 14px; margin: 0; }

.rain-room .video-player {
  padding: clamp(8px, 1.4vw, 16px);
  border: 1px solid #607a934f;
  border-radius: 18px;
  background: #142131;
  box-shadow: 0 28px 74px #070e17aa;
}

.room-controls, .room-actions, .window-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.room-controls { justify-content: space-between; margin-bottom: 10px; }
.window-modes { padding: 2px; border-radius: 12px; background: #0e1927; }
.window-modes button, .room-actions button { min-height: 44px; padding: 7px 14px; white-space: nowrap; }
.window-modes button { border-radius: 9px; background: transparent; color: var(--muted); }
.window-modes button[aria-pressed='true'] { background: #31495f; color: var(--ivory); border-color: #7994ac; }
.window-modes button:hover { background-color: #334a5e; color: var(--ivory); }
#quietWindowBtn[hidden] { display: none; }

.window-reveal {
  padding: clamp(6px, 1vw, 12px);
  border: 1px solid #71889d;
  border-bottom-width: 3px;
  border-radius: 12px;
  background: linear-gradient(145deg, #687e93, #283b50 28%, #142335 62%, #52697e);
  box-shadow: 0 6px 16px #060e19b3, inset 0 2px #b7d0e14d, inset 0 -3px #122031;
}

.rain-room #videoContainer {
  aspect-ratio: 2.18;
  min-height: 200px;
  border-radius: 5px;
  background: #102537;
}

.rain-room #playerMount { height: 100%; }

.rain-room .window-atmosphere {
  background: #183448 url('/assets/rainy-forest-window.webp') 38% center / cover no-repeat;
  box-shadow: inset 0 0 46px 4px #0c1629d4;
}

.rain-room #videoContainer:has(.video-empty) .window-atmosphere::after {
  background: linear-gradient(130deg, #89b6da22, transparent 40%);
  box-shadow: inset 0 0 25px #0c172655;
}

.rain-room #playerMount .video-empty {
  height: 100%;
  padding: clamp(14px, 2.8vw, 34px);
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  background: linear-gradient(to top, #081423ed, #0a1c2c99 33%, transparent 72%);
}

.rain-room .video-empty p:first-child { font-size: clamp(23px, 2.8vw, 36px); }
.rain-room .video-empty p { color: var(--ivory); max-width: 42ch; }
.rain-room [data-window-mode='forest'] #playerMount .video-empty { background: none; }
.rain-room .video-empty button { background: #172b40; border-color: #809ab1; }
.rain-room .video-empty button:hover { background: #2c4862; }
.rain-room .video-empty-actions { justify-content: flex-start; }

.rain-room .window-toolbar { align-items: center; justify-content: flex-start; gap: 8px 18px; padding: 9px 1px 0; }
.window-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; }
.scene-source { color: #d4e5f5; font-size: 12px; font-weight: 700; }
.scene-source-feed, .room-layout:has(#playerMount iframe) .scene-source-forest { display: none; }
.room-layout:has(#playerMount iframe) .scene-source-feed { display: inline; }
.rain-room .stream-status { color: var(--muted); }
.rain-room .controls button, .rain-room .controls select { min-height: 44px; font-size: 12px; }
.rain-room .service-message { font-size: 12px; }
.rain-room .modal-content, .rain-room .companion-widget { background: #1a2c40; border-color: var(--room-border); }
.rain-room .companion-widget:hover { background: #284057; }
.rain-room .xp-track, .rain-room .pet-progress { background: #0e1928; }

.quiet-window #mainContent { max-width: 1660px; }
.quiet-window #mainContent > :not(.room-layout), .quiet-window .room-intro,
.quiet-window .pet-roamer, .quiet-window .pet-landing { display: none !important; }
.quiet-window .room-layout { padding-top: 12px; }
.quiet-window #videoContainer { aspect-ratio: auto; height: clamp(240px, 72svh, 850px); }

@media (max-width: 700px) {
  .rain-room .container { padding-inline: 14px; }
  .rain-room .site-header { padding-block: 9px; }
  .room-intro { margin: 14px 0 11px; gap: 4px; }
  .room-intro h1 { font-size: clamp(33px, 9.5vw, 54px); }
  .room-intro p { font-size: 12px; }
  .room-controls { gap: 4px 6px; }
  .window-modes button, .room-actions button { padding-inline: 9px; font-size: 12px; }
  .rain-room #videoContainer { aspect-ratio: 4 / 3; }
  .rain-room .window-toolbar { align-items: stretch; }
  .rain-room .controls { gap: 4px; }
  .rain-room .controls button, .rain-room .controls select { font-size: 11px; }
  .rain-room .controls select { margin-left: 0; }
  .quiet-window #videoContainer { aspect-ratio: auto; height: clamp(220px, 60svh, 560px); }
}
