/* Elldus Gästemappe — Gastoberfläche
   Die Kacheln füllen die Fläche zwischen den beiden Leisten. Im Querformat
   soll möglichst nichts gescrollt werden müssen. Ohne Framework, damit es
   auch auf älteren Android-Tablets flüssig läuft. */

:root {
  --ground: #f2f4f1;
  --flaeche: #ffffff;
  --flaeche-2: #e9ede8;
  --linie: #dbe1d9;
  --ink: #1c2622;
  --ink-leise: #61706a;
  --akzent: #1f6b57;
  --akzent-hell: #e2efe9;
  --warm: #a66a24;
  --schatten: 0 1px 3px rgba(28, 38, 34, .09), 0 6px 16px rgba(28, 38, 34, .07);
  --schatten-tief: 0 2px 6px rgba(28, 38, 34, .14), 0 10px 26px rgba(28, 38, 34, .1);

  --kopf: 3rem;
  --leiste: 4.5rem;
  --radius: 10px;
  --luft: clamp(.5rem, 1.1vw, .9rem);
  --schrift: "Segoe UI", "Roboto", "Helvetica Neue", system-ui, sans-serif;

  /* Zwölfer-Raster wie im Altsystem: jede Kachel belegt Spalten und Reihen. */
  --spalten: 12;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  user-select: none;
}

svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Kopfzeile: schmal, nur das Nötige ---------- */

.kopf {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--kopf);
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: 0 .55rem;
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
  z-index: 20;
}
.kopf-mitte {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: .55rem;
}
.kopf-titel {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kopf-zimmer {
  flex: none;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--akzent);
  white-space: nowrap;
}
.kopf-zimmer[hidden] { display: none; }
.kopf-zimmer.ist-warnung { color: var(--warm); }

.kopf-taste {
  flex: none;
  width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center;
  background: transparent;
  border: 0; border-radius: 6px;
  color: var(--ink);
  font: inherit; font-weight: 700; font-size: .74rem; letter-spacing: .05em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.kopf-taste svg { width: 1.3rem; height: 1.3rem; }
.kopf-taste:active { background: var(--flaeche-2); }
.kopf-taste:focus-visible { outline: 2px solid var(--akzent); outline-offset: -2px; }
.kopf-taste[hidden] { display: none; }

/* ---------- Bühne: genau der Platz zwischen den Leisten ---------- */

.buehne {
  position: fixed;
  inset: var(--kopf) 0 var(--leiste) 0;
  display: flex;
  overflow: hidden;
}
.buehne:focus { outline: none; }

/* Seitenmenü, sobald man eine Ebene tiefer ist */
.seitenmenue {
  flex: none;
  width: clamp(150px, 17vw, 230px);
  border-right: 1px solid var(--linie);
  background: var(--flaeche);
  overflow-y: auto;
  padding: .35rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.seitenmenue[hidden] { display: none; }

.seitenmenue button {
  display: block;
  width: 100%;
  text-align: left;
  padding: .5rem .65rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .9rem;
  line-height: 1.3;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.seitenmenue button:active { background: var(--flaeche-2); }
.seitenmenue button.ist-aktiv {
  background: var(--akzent-hell);
  color: var(--akzent);
  font-weight: 600;
}
.seitenmenue button:focus-visible { outline: 2px solid var(--akzent); outline-offset: -2px; }
.seitenmenue .zurueck-eintrag {
  color: var(--ink-leise);
  font-size: .83rem;
  border-bottom: 1px solid var(--linie);
  border-radius: 0;
  margin-bottom: .25rem;
  padding-bottom: .5rem;
}

/* Inhaltsbereich */
.inhalt {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: var(--luft);
  -webkit-overflow-scrolling: touch;
}

.laden {
  display: grid; place-items: center; gap: 1rem;
  height: 100%;
  color: var(--ink-leise);
  text-align: center;
}
.laden-punkt {
  width: 2rem; height: 2rem;
  border: 3px solid var(--linie);
  border-top-color: var(--akzent);
  border-radius: 50%;
  animation: dreh 900ms linear infinite;
}
@keyframes dreh { to { transform: rotate(360deg); } }

/* ---------- Kachelraster im Zwölfer-Gitter ---------- */

.raster {
  display: grid;
  grid-template-columns: repeat(var(--spalten), 1fr);
  gap: var(--luft);
  align-content: start;
  /* dense: kleine Kacheln rutschen in Lücken, die hohe Kacheln lassen —
     so entsteht das Mosaik ohne Löcher. */
  grid-auto-flow: row dense;
}

/* Passt genau in die Fläche: die Reihen teilen sich die Höhe. */
.raster.fuellt {
  height: 100%;
  grid-template-rows: repeat(var(--reihen, 3), 1fr);
  align-content: stretch;
}
/* Zu viele Kacheln für eine Bildschirmhöhe — feste Reihenhöhe, dann rollt es.
   Wichtig: keine Automatik, sonst wachsen Kacheln mit Bild ins Unendliche. */
.raster.rollt {
  grid-auto-rows: clamp(104px, 17vh, 165px);
}

.kachel {
  position: relative;
  grid-column: span var(--breite, 4);
  grid-row: span var(--hoch, 1);
  display: block;
  border: 0; padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--flaeche);
  cursor: pointer;
  text-align: left;
  color: inherit; font: inherit;
  box-shadow: var(--schatten);
  transition: transform 130ms ease, box-shadow 130ms ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 88px;
}
.kachel:active { transform: scale(.982); box-shadow: var(--schatten-tief); }
.kachel:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }

.kachel:not(.geladen) {
  background: linear-gradient(100deg, var(--flaeche-2) 30%, #dfe5dd 50%, var(--flaeche-2) 70%);
  background-size: 220% 100%;
  animation: warten 1.6s ease-in-out infinite;
}
@keyframes warten { to { background-position: -120% 0; } }

.kachel img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 300ms ease;
}
.kachel.geladen img { opacity: 1; }

.kachel-leer {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--flaeche-2), var(--flaeche));
  color: #c3ccc4;
}
.kachel-leer svg { width: 2.2rem; height: 2.2rem; stroke-width: 1.5; }

.kachel-marke {
  position: absolute;
  top: .5rem; right: .5rem;
  padding: .14rem .45rem;
  background: rgba(255, 255, 255, .93);
  border-radius: 4px;
  color: var(--akzent);
  font-size: .66rem; font-weight: 700;
  letter-spacing: .05em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.kachel-text {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem .7rem .55rem;
  font-size: clamp(.88rem, 1.4vw, 1.05rem);
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
}
/* Ohne Bild trägt die Kachel dunkle Schrift auf heller Fläche. */
.kachel.ohne-bild .kachel-text {
  color: var(--ink);
  text-shadow: none;
  background: none;
  padding-top: .55rem;
}

/* ---------- Detailansicht ---------- */

.detail { max-width: 72ch; user-select: text; padding-bottom: 1rem; }
.detail-bild {
  width: 100%;
  height: clamp(120px, 24vh, 250px);
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: .85rem;
  box-shadow: var(--schatten);
}
.detail h2 {
  font-size: clamp(1.2rem, 2.3vw, 1.55rem);
  font-weight: 600; letter-spacing: -.015em;
  margin-bottom: .55rem;
  text-wrap: balance;
}
.detail-text { font-size: 1.02rem; }
.detail-text p { margin-bottom: .8rem; }
.detail-text strong, .detail-text b { font-weight: 600; }
.detail-text a { color: var(--akzent); }
.detail-text img { max-width: 100%; height: auto; border-radius: var(--radius); }
.detail-text table { width: 100%; border-collapse: collapse; margin: .9rem 0; }
.detail-text td, .detail-text th { padding: .35rem .55rem; border-bottom: 1px solid var(--linie); text-align: left; }
.detail-text ul, .detail-text ol { margin: 0 0 .8rem 1.2rem; }

.verweise { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.verweis {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .9rem;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 8px;
  color: var(--akzent);
  text-decoration: none;
  font-size: .89rem; font-weight: 600;
  box-shadow: var(--schatten);
}

/* ---------- Untere Leiste ---------- */

.leiste {
  position: fixed;
  inset: auto 0 0 0;
  height: var(--leiste);
  display: flex;
  background: var(--flaeche);
  border-top: 1px solid var(--linie);
  z-index: 25;
}
.leiste-taste {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .2rem;
  background: transparent; border: 0;
  color: var(--ink-leise);
  font: inherit; font-size: .72rem; font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.leiste-taste svg { width: 1.45rem; height: 1.45rem; }
.leiste-taste.ist-aktiv { color: var(--akzent); }
.leiste-taste:active { background: var(--flaeche-2); }
.leiste-taste:focus-visible { outline: 2px solid var(--akzent); outline-offset: -3px; }

.leiste-zahl {
  position: absolute;
  top: .5rem; left: 50%;
  transform: translateX(.6rem);
  min-width: 1.15rem; height: 1.15rem;
  display: grid; place-items: center;
  padding: 0 .26rem;
  background: var(--akzent);
  color: #fff;
  border-radius: 99px;
  font-size: .66rem; font-style: normal; font-weight: 700;
}
.leiste-punkt {
  position: absolute;
  top: .65rem; left: 50%;
  transform: translateX(.55rem);
  width: .5rem; height: .5rem;
  background: var(--warm);
  border-radius: 50%;
}
.leiste-zahl[hidden], .leiste-punkt[hidden] { display: none; }

/* ---------- Schichten (Suche, Wünsche, Chat) ---------- */

.schicht {
  position: fixed;
  inset: 0 0 var(--leiste) 0;
  z-index: 22;
  background: var(--ground);
  display: flex;
  flex-direction: column;
  animation: auf 170ms ease;
}
.schicht[hidden] { display: none; }
@keyframes auf { from { opacity: 0; transform: translateY(.7rem); } }

.schicht-kopf {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--linie);
  background: var(--flaeche);
}
.schicht-titel { flex: 1; font-size: 1rem; font-weight: 600; }
.schicht-kopf input {
  flex: 1;
  padding: .6rem .85rem;
  font: inherit;
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--linie);
  border-radius: 8px;
  user-select: text;
}
.schicht-kopf input:focus { outline: 2px solid var(--akzent); outline-offset: -1px; }
.schicht-zu {
  padding: .6rem .9rem;
  font: inherit; font-weight: 600;
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--linie);
  border-radius: 8px;
  cursor: pointer;
}
.schicht-koerper { flex: 1; overflow-y: auto; padding: var(--luft); -webkit-overflow-scrolling: touch; }

/* Suchtreffer */
.treffer {
  display: flex; gap: .8rem; align-items: center;
  width: 100%;
  padding: .55rem;
  margin-bottom: .4rem;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 9px;
  color: inherit; font: inherit; text-align: left;
  cursor: pointer;
}
.treffer img, .treffer .treffer-leer {
  width: 4.2rem; height: 3.1rem;
  flex: none; object-fit: cover;
  border-radius: 6px;
  background: var(--flaeche-2);
}
.treffer b { display: block; font-weight: 600; margin-bottom: .1rem; }
.treffer span {
  font-size: .85rem; color: var(--ink-leise);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hinweis-leer { text-align: center; color: var(--ink-leise); padding: 2.5rem 1rem; }

/* Gästewünsche */
.gruppe { margin-bottom: 1.4rem; }
.gruppe-kopf { display: flex; align-items: center; gap: .5rem; margin-bottom: .55rem; }
.gruppe-kopf svg { width: 1.15rem; height: 1.15rem; color: var(--akzent); }
.gruppe-kopf h3 { font-size: .97rem; font-weight: 600; }
.gruppe-kopf small { margin-left: auto; font-size: .72rem; color: var(--ink-leise); }

.artikel {
  display: flex; align-items: center; gap: .9rem;
  padding: .6rem .75rem;
  margin-bottom: .3rem;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 9px;
}
.artikel-text { flex: 1; min-width: 0; }
.artikel-text b { display: block; font-weight: 500; }
.artikel-text small { font-size: .79rem; color: var(--ink-leise); }

.menge { display: flex; align-items: center; gap: .3rem; flex: none; }
.menge button {
  width: 2.3rem; height: 2.3rem;
  display: grid; place-items: center;
  background: var(--ground);
  border: 1px solid var(--linie);
  border-radius: 7px;
  color: var(--ink);
  font: inherit; font-size: 1.25rem; line-height: 1;
  cursor: pointer;
}
.menge button:disabled { opacity: .35; cursor: default; }
.menge button:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.menge output { min-width: 1.6rem; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.menge output.ist-null { color: var(--ink-leise); }

.kommentar {
  width: 100%;
  margin-top: .4rem;
  padding: .7rem .9rem;
  min-height: 4.5rem;
  font: inherit;
  color: var(--ink);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 9px;
  resize: vertical;
  user-select: text;
}
.kommentar:focus { outline: 2px solid var(--akzent); outline-offset: -1px; }

.korb {
  display: flex; align-items: center; gap: .9rem;
  padding: .65rem .85rem;
  background: var(--flaeche);
  border-top: 1px solid var(--linie);
}
.korb[hidden] { display: none; }
.korb-info { flex: 1; }
.korb-info strong { display: block; font-weight: 600; }
.korb-info span { font-size: .79rem; color: var(--ink-leise); }

.taste-haupt {
  padding: .7rem 1.3rem;
  background: var(--akzent);
  border: 0; border-radius: 8px;
  color: #fff;
  font: inherit; font-weight: 700;
  cursor: pointer;
}
.taste-haupt:active { filter: brightness(.93); }
.taste-haupt:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.taste-haupt svg { width: 1.2rem; height: 1.2rem; display: block; stroke-width: 2.2; }

.danke { text-align: center; padding: 2.6rem 1.2rem; }
.danke-haken {
  width: 3.5rem; height: 3.5rem;
  margin: 0 auto 1rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--akzent-hell);
  color: var(--akzent);
}
.danke-haken svg { width: 1.8rem; height: 1.8rem; stroke-width: 2.5; }
.danke h3 { font-size: 1.22rem; font-weight: 600; margin-bottom: .4rem; }
.danke p { color: var(--ink-leise); max-width: 40ch; margin: 0 auto 1.2rem; }

.liste-offen { margin-top: 1.5rem; }
.liste-offen h4 {
  font-size: .71rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-leise); margin-bottom: .45rem;
}
.offen-zeile {
  display: flex; align-items: center; gap: .7rem;
  padding: .5rem .7rem;
  margin-bottom: .28rem;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 8px;
  font-size: .88rem;
}
.offen-zeile time { margin-left: auto; color: var(--ink-leise); font-size: .77rem; }
.zustand {
  padding: .1rem .42rem;
  border-radius: 4px;
  font-size: .65rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--akzent-hell); color: var(--akzent);
}

.zimmerfrage {
  max-width: 34rem;
  margin: 2rem auto;
  padding: 1.4rem;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
}
.zimmerfrage p { margin-bottom: .9rem; }
.zimmerfrage-zeile { display: flex; gap: .5rem; }
.zimmerfrage-zeile input {
  flex: 1;
  padding: .7rem .9rem;
  font: inherit;
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--linie);
  border-radius: 8px;
  user-select: text;
}
.zimmerfrage-zeile input:focus { outline: 2px solid var(--akzent); outline-offset: -1px; }
.zimmerfrage-fehler {
  margin: .8rem 0 0;
  color: var(--warn, #9e3627);
  font-size: .92rem;
}
.zimmerfrage-hinweis {
  margin: .8rem 0 0;
  color: var(--ink-leise);
  font-size: .88rem;
}
/* Schmale Handys: Zimmer und Code untereinander, sonst wird es gedrängt. */
@media (max-width: 460px) {
  .zimmerfrage-zeile { flex-wrap: wrap; }
  .zimmerfrage-zeile input { flex: 1 1 100%; }
  .zimmerfrage-zeile input:first-child { flex: 1 1 100% !important; }
  .zimmerfrage-zeile button { flex: 1 1 100%; }
}

/* Der Tagescode am Tablet — groß genug, um ihn quer durchs Zimmer abzulesen. */
.zugang-titel {
  margin: 1.4rem 0 .2rem;
  font-size: .88rem;
  color: var(--ink-leise);
}
.zugang-code {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--ink);
  user-select: text;
}

/* Chat */
.chat-verlauf { display: flex; flex-direction: column; gap: .5rem; }
.blase {
  max-width: min(78%, 46ch);
  padding: .6rem .85rem;
  border-radius: 14px;
  font-size: .95rem;
  user-select: text;
  animation: auf 150ms ease;
}
.blase.gast {
  align-self: flex-end;
  background: var(--akzent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.blase.haus {
  align-self: flex-start;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-bottom-left-radius: 4px;
}
.blase time { display: block; margin-top: .2rem; font-size: .69rem; opacity: .65; }
.blase.tippt { display: flex; gap: .25rem; align-items: center; padding: .75rem .95rem; }
.blase.tippt i {
  width: .38rem; height: .38rem;
  background: var(--ink-leise);
  border-radius: 50%;
  animation: huepf 1.2s infinite;
}
.blase.tippt i:nth-child(2) { animation-delay: .18s; }
.blase.tippt i:nth-child(3) { animation-delay: .36s; }
@keyframes huepf { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.chat-eingabe {
  display: flex; gap: .5rem;
  padding: .65rem .85rem;
  background: var(--flaeche);
  border-top: 1px solid var(--linie);
}
.chat-eingabe input {
  flex: 1;
  padding: .65rem .9rem;
  font: inherit;
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--linie);
  border-radius: 8px;
  user-select: text;
}
.chat-eingabe input:focus { outline: 2px solid var(--akzent); outline-offset: -1px; }

/* ---------- Fenster für externe Inhalte ---------- */

.fenster {
  position: fixed;
  inset: 0 0 var(--leiste) 0;
  z-index: 30;
  background: var(--ground);
  display: flex;
  flex-direction: column;
  animation: auf 170ms ease;
}
.fenster[hidden] { display: none; }

.fenster-kopf {
  display: flex;
  align-items: center;
  gap: .6rem;
  height: var(--kopf);
  padding: 0 .5rem;
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
}
.fenster-titel {
  flex: 1;
  min-width: 0;
  font-size: .98rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fenster-zu {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .4rem .7rem .4rem .45rem;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}
.fenster-zu svg { width: 1.2rem; height: 1.2rem; }
.fenster-zu:active { background: var(--flaeche-2); }

.fenster-blaettern {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .85rem;
  color: var(--ink-leise);
}
.fenster-blaettern[hidden] { display: none; }
.fenster-blaettern button {
  width: 2rem; height: 2rem;
  border: 1px solid var(--linie);
  border-radius: 6px;
  background: var(--flaeche);
  color: var(--ink);
  font: inherit; font-size: 1.2rem; line-height: 1;
  cursor: pointer;
}
.fenster-blaettern button:disabled { opacity: .35; cursor: default; }
.fenster-blaettern output { min-width: 4.5rem; text-align: center; font-variant-numeric: tabular-nums; }

.fenster-koerper {
  flex: 1;
  overflow: auto;
  background: var(--flaeche-2);
  -webkit-overflow-scrolling: touch;
}
.fenster-koerper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}
.fenster-koerper .pdf-seiten {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  padding: .6rem;
}
.fenster-koerper .pdf-seiten canvas {
  max-width: 100%;
  height: auto;
  background: #fff;
  box-shadow: var(--schatten);
  border-radius: 4px;
}
.fenster-fehler {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--ink-leise);
}

/* Während geprüft wird, ob eine fremde Seite sich zeigen lässt. */
.fenster-laedt {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
}
.fenster-laedt span {
  width: 34px;
  height: 34px;
  border: 3px solid var(--linie);
  border-top-color: var(--akzent);
  border-radius: 50%;
  animation: kreisel 800ms linear infinite;
}
@keyframes kreisel { to { transform: rotate(360deg); } }
.fenster-mitnehmen { margin-top: .4rem; font-size: .92rem; }
.fenster-qr {
  width: min(230px, 55vw);
  margin: 1.2rem auto 0;
  padding: .7rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--schatten);
}
.fenster-qr svg { width: 100%; height: auto; display: block; }

.fenster-adresse {
  margin-top: .9rem;
  font-size: .85rem;
  color: var(--ink-leise);
  word-break: break-all;
}

.fenster-fehler a {
  display: inline-block;
  margin-top: .8rem;
  padding: .55rem 1rem;
  background: var(--akzent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

/* ---------- Bildschirmschoner ---------- */

.schoner {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #0d1210;
  animation: einblenden 600ms ease;
}
.schoner[hidden] { display: none; }
@keyframes einblenden { from { opacity: 0; } }
.schoner img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .62;
  transition: opacity 1.2s ease;
}
.schoner-inhalt {
  position: absolute;
  inset: auto 0 0 0;
  padding: 4rem 2rem 3rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78));
}
.schoner-uhr {
  font-size: clamp(3rem, 11vw, 6rem);
  font-weight: 200;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.schoner-haus { font-size: 1.05rem; font-weight: 600; margin-top: .4rem; }
.schoner-tipp {
  margin-top: 1.3rem;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .75;
  animation: pulsen 2.4s ease-in-out infinite;
}
@keyframes pulsen { 50% { opacity: .3; } }

/* ---------- Kurzmeldung ---------- */

.meldung {
  position: fixed;
  left: 50%;
  bottom: calc(var(--leiste) + .8rem);
  transform: translateX(-50%);
  z-index: 50;
  padding: .6rem 1.1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 99px;
  box-shadow: var(--schatten-tief);
  font-size: .88rem; font-weight: 500;
  animation: auf 190ms ease;
}
.meldung[hidden] { display: none; }

/* ---------- Größen und Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Hochformat: schmale Kacheln wären zu klein — halbe Breite als Untergrenze. */
@media (orientation: portrait) {
  .raster .kachel { grid-column: span max(var(--breite, 4), 6); }
  .seitenmenue { width: clamp(120px, 30vw, 180px); }
}

/* Kleine Geräte: Seitenmenü weg, Kacheln über die halbe Breite. */
@media (max-width: 560px) {
  .seitenmenue { display: none; }
  .raster .kachel { grid-column: span 6; }
}

/* ---------- Begrüßung nach dem Check-in ---------- */

/*
 * Legt sich einmal je Aufenthalt über die Startseite. Bewusst als Schicht
 * und nicht als Kachel: Sie soll gesehen und weggetippt werden, nicht
 * dauerhaft Platz belegen.
 */
.gruss {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  animation: einblenden 300ms ease;
}
.gruss-karte {
  max-width: 30rem;
  padding: 2.2rem 2rem;
  text-align: center;
  background: var(--flaeche);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgb(0 0 0 / .22);
  animation: gruss-auf 320ms cubic-bezier(.2, .8, .3, 1);
}
.gruss-text {
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--ink);
}
@keyframes gruss-auf {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
}

/* Verweis auf einen anderen Inhalt der Gästemappe. */
.detail-text .verweis-intern {
  color: var(--akzent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
