.room-scene { position:fixed; inset:0; z-index:0; overflow:hidden; pointer-events:none; }
.room-art {
  position:absolute; top:50%; left:50%;
  width:max(100vw, 177.87234vh); height:max(100vh, 56.2201vw);
  transform:translate(-50%, -50%);
  background:#211a13 url("assets/faellesrummet-santa.png") center / 100% 100% no-repeat;
  image-rendering:pixelated;
}
.room-fire { position:absolute; left:42.1%; top:51%; width:15.8%; height:20.8%; }
.flame { transform-box:fill-box; transform-origin:center bottom; animation:flame-dance 1.2s steps(3, end) infinite; }
.flame-left { animation-delay:-.4s; }
.flame-right { animation-delay:-.8s; }
@keyframes flame-dance {
  0%,100% { transform:translateY(0) scaleY(.92); }
  50% { transform:translateY(-2px) scaleY(1.05); }
}
@media (prefers-reduced-motion:reduce) { .flame { animation:none; } }

.home-content { display:grid; justify-items:center; gap:.85rem; width:min(100%, 30rem); }
.home-welcome { display:grid; gap:.85rem; }
.account-jump { display:none; }
body:not(.barbara-theme) .top { z-index:2; }
body:not(.barbara-theme) .home-christmas-decor { z-index:3; }
body:not(.barbara-theme) .home-christmas-decor .christmas-left,
body:not(.barbara-theme) .christmas-home { display:none; }
body:not(.barbara-theme) .math-home {
  position:relative; z-index:1; flex:1; display:flex; justify-content:flex-start;
  padding:2rem clamp(1rem, 3vw, 3rem); text-align:left;
}
body:not(.barbara-theme) .home-content {
  justify-items:start; width:min(30rem, calc(50vw - 9rem)); padding:clamp(1rem, 2.5vw, 2rem);
  border:1px solid #d5b66b; border-radius:1rem;
  background:#10251eea; color:#fff9e8; box-shadow:0 .6rem 2rem #0008;
}
body:not(.barbara-theme) .home-content h1 { max-width:100%; font-size:clamp(2rem, 3.2vw, 3.2rem); line-height:.98; overflow-wrap:anywhere; }
body:not(.barbara-theme) .home-content h1 em { color:#f6d884; }
body:not(.barbara-theme) .home-content h1::after { margin:1rem 0 0; background:#f6d884; }
body:not(.barbara-theme) .home-welcome p { line-height:1.5; }
body:not(.barbara-theme) .home-content .account {
  --white:#fffdf6; --ink:#172e28; --muted:#4e6258; --line:#d6dace; --lilac:#dfebdf;
  color:#172e28; color-scheme:light;
}
body:not(.barbara-theme) .home-content .account input { background:#fff; color:#172e28; }
body.barbara-theme .room-scene { display:none; }

@media (max-aspect-ratio:3/2) {
  .room-art {
    width:max(100vw, 56.2799vh); height:max(100vh, 177.6834vw);
    background-image:url("assets/faellesrummet-santa-mobile.png");
  }
  .room-fire { left:38.8%; top:50.2%; width:22.3%; height:14%; }
}
@media (max-width:900px) {
  body:not(.barbara-theme) .math-home { align-items:flex-start; padding:1rem; }
  body:not(.barbara-theme) .home-content { width:100%; padding:0; border:0; background:none; box-shadow:none; }
  body:not(.barbara-theme) :is(.home-welcome,.gift-field) { width:100%; padding:1rem; border:1px solid #d5b66b; border-radius:1rem; background:#10251eea; }
  body:not(.barbara-theme):has(#account-panel:not([hidden])) .account-jump { display:block; color:#f6d884; font-weight:700; }
  body:not(.barbara-theme) .home-content .account { width:100%; margin-top:max(18rem, calc(90vh - 17rem)); }
}
@media (max-width:900px) and (max-height:650px) and (max-aspect-ratio:3/2) {
  .room-art { top:0; width:max(100vw, 75.4151vh); height:max(134vh, 177.6834vw); transform:translateX(-55%); }
}
