/* Gemeinsames Grundgerüst aller begehbaren Räume (Wohnzimmer, Adventsstube …).
   Was sich im jeweiligen Raum bewegt und wo die Punkte sitzen, steht in <raum>/zimmer.css. */
@font-face { font-family: "DM Serif Display"; src: url("../fonts/DMSerifDisplay-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Oswald"; font-weight: 200 700; src: url("../fonts/Oswald.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Atkinson"; font-weight: 700; src: url("../fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype"); font-display: swap; }

:root {
  --creme: #f6ecd8;
  --papier: #fffaf0;
  --senf: #e9a92b;
  --rot: #b31a1a;
  --tinte: #1d1412;
  --nacht: #2a1d14;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--nacht); color: var(--creme); font-family: "Atkinson", Verdana, sans-serif; font-size: 1.15rem; line-height: 1.55; }
img { display: block; max-width: 100%; height: auto; }
a:focus-visible { outline: 3px solid var(--senf); outline-offset: 3px; }

/* Kopfleiste */
.leiste { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; background: var(--rot) url("../img/tex-rot.png"); border-bottom: 4px solid var(--creme); box-shadow: 0 4px 0 var(--rot); margin-bottom: 4px; flex-wrap: wrap; position: relative; z-index: 4; }
.zurueck { display: flex; align-items: center; gap: 10px; color: var(--creme); font-family: "Oswald", sans-serif; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; font-size: 1rem; text-decoration: none; }
.zurueck img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 2px var(--creme); }
.zurueck:hover { text-decoration: underline; }
.raumtitel { margin: 0; font-family: "DM Serif Display", Georgia, serif; font-size: 1.8rem; line-height: 1.1; color: var(--creme); text-shadow: .06em .05em 0 var(--tinte); }
.raumtitel span { font-family: "Oswald", sans-serif; font-size: .95rem; letter-spacing: .25em; text-transform: uppercase; text-shadow: none; margin-left: .4em; }
.knopf { display: inline-block; background: var(--papier); color: var(--rot); font-family: "Oswald", sans-serif; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 7px 18px; border-radius: 6px; border: 3px solid var(--tinte); box-shadow: 3px 3px 0 var(--tinte); }
.knopf:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--tinte); }

/* Der Raum: auf breiten Schirmen ganz sichtbar, auf dem Handy zum Herumschauen (wischen) */
.schaufenster { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; background: var(--nacht); }
.szene { position: relative; width: max(100%, 860px); max-width: calc(78vh * 1.5); margin: 0 auto; aspect-ratio: 3 / 2; overflow: hidden; container-type: inline-size; }
@media (max-width: 860px) { .szene { max-width: none; } }
.kamera { position: absolute; inset: 0; transform-origin: 55% 60%; animation: kamera 46s ease-in-out infinite alternate; }
.raumbild { width: 100%; height: 100%; }
@keyframes kamera {
  0%   { transform: scale(1.0) translate(0, 0); }
  50%  { transform: scale(1.07) translate(-1.2%, 0.6%); }
  100% { transform: scale(1.04) translate(1.4%, -0.4%); }
}

/* Dampf (Tee, Punsch …) – Position je Raum */
.dampf { position: absolute; width: 5%; height: 21%; pointer-events: none; }
.dampf i { position: absolute; bottom: 0; left: 35%; width: 1.6cqw; height: 4.5cqw; border-radius: 50%; background: rgba(255,255,255,.55); filter: blur(.7cqw); opacity: 0; animation: dampf 4.5s ease-in infinite; }
.dampf i:nth-child(2) { left: 10%; animation-delay: 1.5s; }
.dampf i:nth-child(3) { left: 55%; animation-delay: 3s; }
@keyframes dampf {
  0%   { transform: translate(0, 0) scale(.6); opacity: 0; }
  20%  { opacity: .7; }
  60%  { transform: translate(.8cqw, -7cqw) scale(1.1) rotate(10deg); opacity: .35; }
  100% { transform: translate(-.6cqw, -13cqw) scale(1.5) rotate(-6deg); opacity: 0; }
}

/* Sprechblasen – erscheinen abwechselnd (b1 … b4) */
.blase { position: absolute; margin: 0; max-width: 22cqw; padding: 1cqw 1.4cqw; background: var(--papier); color: var(--tinte); border: .25cqw solid var(--tinte); border-radius: 1.6cqw;
  font-family: "DM Serif Display", Georgia, serif; font-size: clamp(14px, 1.7cqw, 30px); line-height: 1.2; box-shadow: .4cqw .4cqw 0 rgba(43,36,32,.35);
  opacity: 0; transform: scale(.6) translateY(1cqw); animation: blase 24s ease-in-out infinite; pointer-events: none; }
.blase::after { content: ""; position: absolute; bottom: -1.5cqw; width: 2cqw; height: 2cqw; background: var(--papier); border-right: .25cqw solid var(--tinte); border-bottom: .25cqw solid var(--tinte); transform: rotate(45deg) skew(10deg, 10deg); }
/* Zipfel nach unten rechts / unten links / links */
.zipfel-rechts::after { right: 22%; }
.zipfel-links::after  { left: 14%; }
.zipfel-seite::after  { left: -1cqw; bottom: .6cqw; transform: rotate(135deg) skew(10deg, 10deg); }
.b1 { animation-delay: 1s; }
.b2 { animation-delay: 7s; }
.b3 { animation-delay: 13s; }
.b4 { animation-delay: 19s; }
@keyframes blase {
  0%   { opacity: 0; transform: scale(.6) translateY(1cqw); }
  3%   { opacity: 1; transform: scale(1.06) translateY(0); }
  5%   { transform: scale(1); }
  20%  { opacity: 1; transform: scale(1); }
  23%  { opacity: 0; transform: scale(.9) translateY(-1cqw); }
  100% { opacity: 0; }
}

/* Leuchtende Punkte zum Anklicken – Positionen je Raum */
.punkt { position: absolute; width: 4.4cqw; height: 4.4cqw; min-width: 34px; min-height: 34px; margin: -2.2cqw 0 0 -2.2cqw; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 22%, var(--senf) 24% 46%, rgba(233,169,43,.35) 48%); border: 2px solid #fff; box-shadow: 0 0 0 0 rgba(233,169,43,.7);
  animation: puls 2.4s ease-out infinite; text-decoration: none; z-index: 3; }
.punkt span { position: absolute; left: 50%; bottom: 120%; transform: translateX(-50%); white-space: nowrap; background: var(--rot); color: var(--creme); font-weight: 700; font-size: clamp(13px, 1.25cqw, 20px); padding: .3em .8em; border-radius: 999px; border: 2px solid var(--creme); opacity: 0; transition: opacity .2s; pointer-events: none; }
.punkt:hover span, .punkt:focus-visible span { opacity: 1; }
.punkt:hover { animation-play-state: paused; background: radial-gradient(circle, #fff 0 22%, var(--rot) 24% 46%, rgba(179,26,26,.4) 48%); }
.punkt.links span { left: auto; right: -20%; transform: none; }
@keyframes puls { 0% { box-shadow: 0 0 0 0 rgba(233,169,43,.75); } 70% { box-shadow: 0 0 0 2.2cqw rgba(233,169,43,0); } 100% { box-shadow: 0 0 0 0 rgba(233,169,43,0); } }

/* Unter dem Bild */
.unterm-bild { max-width: 900px; margin: 0 auto; padding: 22px 16px 34px; text-align: center; }
.einladung { margin: 0 0 16px; font-size: 1.2rem; }
.liste { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.liste a { color: var(--tinte); background: var(--creme); text-decoration: none; font-weight: 700; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--rot); }
.liste a:hover { background: var(--rot); color: var(--creme); }

/* Fenster (Popups) über :target – funktionieren auch ohne JavaScript */
.fenster { display: none; position: fixed; inset: 0; z-index: 10; background: rgba(20,14,10,.72); padding: 16px; overflow-y: auto; }
.fenster:target { display: grid; place-items: center; }
.karte { position: relative; width: min(640px, 100%); background: var(--papier); color: var(--tinte); border: 3px solid var(--tinte); border-radius: 14px; box-shadow: 8px 8px 0 var(--rot); padding: 26px 24px 20px; animation: auf .25s ease-out; }
@keyframes auf { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.karte h2 { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; font-size: 2.1rem; color: var(--rot); padding-right: 1.4em; margin: 0 0 10px; line-height: 1.1; }
.karte p { margin: 0 0 12px; }
.karte ul { margin: 0 0 12px; padding-left: 1.3em; }
.karte img { border-radius: 8px; margin: 4px 0 14px; border: 2px solid var(--tinte); }
.zu { position: absolute; top: 8px; right: 12px; font-size: 2rem; line-height: 1; color: var(--tinte); text-decoration: none; font-weight: 700; padding: 4px 10px; border-radius: 8px; }
.zu:hover { background: var(--creme); }
.salat { padding-left: 1.4em; margin: 0 0 14px; }
.salat li { margin-bottom: 10px; }
.salat b { font-size: 1.35rem; letter-spacing: .08em; color: var(--rot); }
.salat details { display: inline-block; margin-left: 12px; }
.salat summary { cursor: pointer; color: var(--tinte); text-decoration: underline; font-weight: 700; }
.kapitel { columns: 2; margin: 0 0 12px; padding-left: 1.4em; }

.fuss { text-align: center; padding: 18px 16px 26px; font-size: 1rem; color: #cdbfa8; }
.fuss a { color: var(--creme); }

/* Wer weniger Bewegung eingestellt hat, bekommt ein ruhiges Bild */
@media (prefers-reduced-motion: reduce) {
  .kamera, .dampf i, .punkt, .karte { animation: none; }
  .dampf { display: none; }
  .blase { animation: none; opacity: 0; }
  .b2 { opacity: 1; transform: none; }
}
