/* ============================================================
   Belegungsplan – Gestaltung nach dem Vorbild eines Emailleschilds:
   tiefes Petrol, weisse Keyline, DIN-Schrift, gesetzte Plaketten.
   Die Plakette ist das wiederkehrende Element: Objektname, Reiter,
   Buchungen im Kalender – immer dasselbe Objekt.
   ============================================================ */

:root {
  color-scheme: light;

  /* Abgestimmt auf das Foto: Dachbraun, Lärchenholz, Wiese, Bergwald.
     Die Tinte ist die Schattenseite des Dachs, nicht mehr kaltes Petrol. */
  --tinte: #17322f;
  --email: #235a52;
  --papier: #eef0ea;
  --flaeche: #ffffff;
  --linie: #d8dbd2;
  --kies: #6a7269;
  --signal: #b4472a;

  /* Wochenendspalten und Vergangenheit – warme, sehr leise Tönung. */
  --wochenende: #faf8f3;
  --vorbei: #f5f6f2;

  --plakette-1: #235a52;
  --plakette-2: #4a5f2c;
  --plakette-3: #6d3a4c;
  --plakette-4: #8a5619;
  --plakette-5: #3d4f6b;
  --plakette-6: #96432a;
  --plakette-7: #1f5f66;
  --plakette-8: #55407a;

  --schrift-schild: Bahnschrift, "DIN Alternate", "Avenir Next Condensed",
    "Arial Narrow", "Liberation Sans Narrow", sans-serif;
  --schrift-text: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --rand: 3px;
  --keyline: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  --spur: 200ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--schrift-text);
  font-size: 16px;
  line-height: 1.5;
}

h1,
h2,
h3 {
  font-family: var(--schrift-schild);
  font-stretch: semi-condensed;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.nur-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Plakette: das Signaturelement ------------------------------------- */

.plakette {
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #fff;
  background: var(--email);
  border: 0;
  border-radius: var(--rand);
  box-shadow: var(--keyline);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.2;
  text-align: left;
}

/* --- Kopfzeile --------------------------------------------------------- */

.kopf {
  background: var(--tinte);
  color: #fff;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.kopf__marke {
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8125rem;
  margin-right: auto;
  opacity: 0.85;
}

.kopf__aktion {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--rand);
  color: #fff;
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: background var(--spur), border-color var(--spur);
}

.kopf__aktion:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
}

/* Aktive Adminrechte – muss nach .kopf__aktion stehen, sonst gewinnt bei
   gleicher Spezifität die frühere Regel. */
.kopf__aktion--aktiv,
.kopf__aktion--aktiv:hover {
  background: var(--signal);
  border-color: var(--signal);
}

/* Das Admin-Feld sitzt direkt neben seinem Knopf. Vorher stand es am
   Seitenfuss – der Fokussprung riss die Seite ans Ende. */
.kopf__admin {
  display: flex;
  gap: 0.375rem;
  align-items: center;
}

.kopf__admin input {
  font: inherit;
  font-size: 0.875rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--rand);
  padding: 0.35rem 0.6rem;
  width: 11rem;
}

.kopf__admin input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.kopf__admin input:focus {
  outline: none;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

/* Fehlermeldung direkt am Feld statt am Seitenfuss. */
.kopf__fehler {
  background: var(--signal);
  color: #fff;
  border-radius: var(--rand);
  padding: 0.3rem 0.6rem;
  font-size: 0.8125rem;
}

/* --- Anmeldung --------------------------------------------------------- */

.tor {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--tinte);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.tor__karte {
  width: min(30rem, 100%);
  background: var(--flaeche);
  border-radius: var(--rand);
  overflow: hidden;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.35);
}

.tor__bild {
  display: block;
  width: 100%;
  height: 11rem;
  object-fit: cover;
  background: var(--papier);
}

.tor__inhalt {
  padding: 1.75rem;
}

.tor__titel {
  font-size: 1.75rem;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tor__text {
  color: var(--kies);
  margin: 0.5rem 0 1.5rem;
  font-size: 0.9375rem;
}

/* --- Bild und Objektname ---------------------------------------------- */

.buehne {
  position: relative;
  margin: 0 auto;
  max-width: 78rem;
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem) 0;
}

/* Bandhöhe – hier drehen, wenn das Foto grösser oder kleiner sein soll.
   Das Band bleibt immer über die ganze Breite; die Zahl bestimmt nur, wie
   hoch es ist und damit, wie gross das Foto darin erscheint.
     8/3   ausgewogen                          (aktuell)
     12/5  flacher, Foto kleiner, Kalender höher
     2/1   höher, Foto grösser, Kalender tiefer */
.buehne {
  --bild-format: 8 / 3;
}

.buehne__rahmen {
  position: relative;
  aspect-ratio: var(--bild-format);
  border-radius: var(--rand);
  overflow: hidden;
  background: var(--tinte);
}

.buehne__grund,
.buehne__bild {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* Der Untergrund füllt die Breite, stark weichgezeichnet und abgedunkelt.
   Das leichte Vergrössern verhindert helle Ränder durch die Weichzeichnung. */
.buehne__grund {
  object-fit: cover;
  filter: blur(28px) saturate(0.7) brightness(0.62);
  transform: scale(1.15);
}

/* Das eigentliche Foto: vollständig, nichts abgeschnitten. */
.buehne__bild {
  object-fit: contain;
}

/* Schattenverlauf unter dem Schild, damit der Name auf hellem wie dunklem
   Bild lesbar bleibt. */
.buehne__rahmen::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(23, 50, 47, 0.6), rgba(23, 50, 47, 0));
  pointer-events: none;
}

.buehne__schild {
  position: absolute;
  z-index: 1;
  left: clamp(1.75rem, 5vw, 3.5rem);
  bottom: -1.25rem;
  background: var(--tinte);
  padding: 0.7rem 1.25rem;
  max-width: calc(100% - 6rem);
}

.buehne__name {
  display: block;
  font-size: clamp(1.125rem, 3.2vw, 1.5rem);
  letter-spacing: 0.07em;
}

.buehne__ort {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  opacity: 0.7;
  margin-top: 0.15rem;
}

/* --- Lage: Wetter, Anfahrt, Adresse ----------------------------------- */
/* Schmales Band unter dem Foto. Steht ausserhalb der Reiter, damit die
   Adresse auch beim Eintragen sichtbar bleibt. */

.lage {
  max-width: 78rem;
  margin: 1.75rem auto 0;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--linie);
  border-radius: var(--rand);
  /* Die 1px-Luecken sind die Trennlinien – der Hintergrund scheint durch. */
  background-clip: content-box;
}

.lage__feld {
  background: var(--flaeche);
  padding: 0.55rem 1rem 0.6rem;
  min-width: 0;
}

.lage__feld:first-child {
  border-radius: var(--rand) 0 0 var(--rand);
}

.lage__feld:last-child {
  border-radius: 0 var(--rand) var(--rand) 0;
}

/* Beschriftung inline – als eigene Zeile kostete sie 19 Pixel Bandhöhe. */
.lage__marke {
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.6875rem;
  color: var(--kies);
  margin-right: 0.5rem;
}

/* Wert und Zusatz laufen auf einer Zeile weiter – als eigene Zeilen war das
   Band 92 Pixel hoch und schob den Kalender unter die Falz. */
.lage__wert,
.lage__zusatz {
  display: inline;
  margin: 0;
}

.lage__wert {
  font-family: var(--schrift-schild);
  font-stretch: semi-condensed;
  font-size: 1rem;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--tinte);
}

.lage__wert--adresse {
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
}

.lage__zusatz {
  font-size: 0.8125rem;
  color: var(--kies);
}

.lage__zusatz:not(:empty)::before {
  content: ' · ';
}

.lage__stau {
  color: var(--signal);
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lage__veraltet {
  font-style: italic;
}

.lage__link {
  color: var(--email);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lage__link:hover {
  color: var(--tinte);
}

/* Unter dem Band braucht es weniger Luft als direkt unter dem Bild. */
.lage:not([hidden]) ~ .blatt .reiter {
  margin-top: 1.25rem;
}

/* --- Reiter ----------------------------------------------------------- */

.blatt {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 4rem;
}

.reiter {
  display: flex;
  gap: 0.375rem;
  /* Oben Luft für das Schild, das unter dem Bild hängt. */
  margin: 2rem 0 1rem;
}

/* Flache Notebook-Bildschirme: das Foto zurücknehmen, damit der Kalender –
   die Hauptansicht – nicht komplett unter die Falz rutscht. */
@media (min-width: 40rem) and (max-height: 56rem) {
  .buehne {
    --bild-format: 16 / 5;
    padding-top: 1rem;
  }
}

.reiter__knopf {
  background: transparent;
  color: var(--email);
  box-shadow: inset 0 0 0 1px var(--linie);
  cursor: pointer;
  padding: 0.6rem 1.4rem;
  transition: background var(--spur), color var(--spur), box-shadow var(--spur);
}

.reiter__knopf:hover {
  background: rgba(28, 92, 107, 0.08);
}

.reiter__knopf[aria-selected='true'] {
  background: var(--email);
  color: #fff;
  box-shadow: var(--keyline);
}

/* --- Kalender --------------------------------------------------------- */

.monatskopf {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}

.monatskopf__titel {
  font-size: 1.375rem;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-width: 11ch;
  font-variant-numeric: tabular-nums;
}

.pfeil {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--linie);
  background: var(--flaeche);
  border-radius: var(--rand);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: border-color var(--spur), background var(--spur);
}

.pfeil:hover {
  border-color: var(--email);
  background: #fff;
}

.monatskopf__bilanz {
  margin-left: auto;
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--kies);
  font-variant-numeric: tabular-nums;
}

.gitter {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--rand);
  overflow: hidden;
}

.gitter__kopf {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--linie);
  background: #f7f9f7;
}

.gitter__kopf span {
  padding: 0.5rem 0.625rem;
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.6875rem;
  color: var(--kies);
}

.woche {
  position: relative;
}

.woche + .woche {
  border-top: 1px solid var(--linie);
}

.woche__tage {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.tag {
  min-height: 5.25rem;
  padding: 0.375rem 0.5rem;
  background: none;
  border: 0;
  border-left: 1px solid var(--linie);
  text-align: left;
  font: inherit;
  cursor: default;
}

.tag:first-child {
  border-left: 0;
}

.tag__zahl {
  font-family: var(--schrift-schild);
  font-stretch: semi-condensed;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--tinte);
}

/* Sa/So leicht getönt – Anreisen häufen sich am Wochenende, das Raster
   liest sich damit ohne Kopfrechnen. */
.tag--wochenende {
  background: var(--wochenende);
}

.tag--fremd {
  background: #fbfcfa;
}

.tag--fremd .tag__zahl,
.tag--vorbei .tag__zahl {
  color: var(--kies);
  opacity: 0.5;
}

.tag--vorbei {
  background: var(--vorbei);
}

.tag--frei {
  cursor: pointer;
}

.tag--frei:hover {
  background: rgba(35, 90, 82, 0.09);
}

/* Heute: nicht nur die Zahl markieren, sondern die ganze Zelle rahmen –
   sonst geht der Tag zwischen den Plaketten verloren. */
.tag--heute {
  box-shadow: inset 0 0 0 2px var(--signal);
}

.tag--heute .tag__zahl {
  display: inline-block;
  background: var(--signal);
  color: #fff;
  border-radius: 2px;
  padding: 0 0.3rem;
  opacity: 1;
}

/* Spur: die Plaketten liegen als eigene Ebene über der Woche,
   damit ein Aufenthalt als ein durchgehendes Schild lesbar bleibt. */
.woche__spur {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.5rem;
  display: grid;
  /* Zwei Halbspalten pro Tag: eine Plakette laeuft von Mittag zu Mittag, damit
     sich am Wechseltag zwei Buchungen beruehren statt ueberdecken. */
  grid-template-columns: repeat(14, 1fr);
  pointer-events: none;
}

.belegung {
  grid-row: 1;
  height: 1.75rem;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  pointer-events: auto;
  cursor: pointer;
  border: 0;
  border-radius: 0;
  box-shadow: var(--keyline);
  color: #fff;
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  gap: 0.5rem;
  transition: filter var(--spur);
}

.belegung__name {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nächtezahl am rechten Rand der Plakette – verschwindet, wenn es eng wird. */
.belegung__naechte {
  margin-left: auto;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

.belegung:hover,
.belegung--gewaehlt {
  filter: brightness(1.15);
}

.belegung--gewaehlt {
  box-shadow: var(--keyline), 0 0 0 2px var(--tinte);
}

.belegung--start {
  border-top-left-radius: var(--rand);
  border-bottom-left-radius: var(--rand);
  margin-left: 0.25rem;
}

.belegung--ende {
  border-top-right-radius: var(--rand);
  border-bottom-right-radius: var(--rand);
  margin-right: 0.25rem;
}

/* Der Aufenthalt geht in der nächsten Zeile weiter. Das Zeichen steht hinter
   der Nächtezahl, deshalb hier kein margin-left:auto (das hat die Zahl). */
.belegung--laeuft-weiter::after {
  content: '›';
  opacity: 0.7;
}

.belegung--laeuft-weiter:not(:has(.belegung__naechte))::after {
  margin-left: auto;
}

/* --- Detailkarte ------------------------------------------------------ */

.detail {
  margin-top: 1rem;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-left: 4px solid var(--email);
  border-radius: var(--rand);
  padding: 1.125rem 1.25rem;
}

.detail__kopf {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.detail__name {
  font-size: 1.125rem;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.detail__zeit {
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  letter-spacing: 0.08em;
  color: var(--kies);
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
}

.detail__liste {
  margin: 0.75rem 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  font-size: 0.9375rem;
}

.detail__liste dt {
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--kies);
  padding-top: 0.15rem;
}

.detail__liste dd {
  margin: 0;
  white-space: pre-wrap;
}

.detail__aktionen {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* --- Liste kommender Aufenthalte -------------------------------------- */

.abschnitt-titel {
  font-size: 0.8125rem;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--kies);
  margin: 2.5rem 0 0.875rem;
}

.aufenthalte {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.375rem;
}

.aufenthalt {
  display: grid;
  grid-template-columns: 0.5rem 1fr auto;
  align-items: center;
  gap: 0.875rem;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--rand);
  padding: 0.625rem 0.875rem 0.625rem 0;
  overflow: hidden;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color var(--spur), transform var(--spur);
}

.aufenthalt:hover {
  border-color: var(--email);
  transform: translateX(2px);
}

.aufenthalt__marke {
  align-self: stretch;
  background: var(--email);
}

.aufenthalt__name {
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.9375rem;
}

.aufenthalt__zeit {
  font-variant-numeric: tabular-nums;
  color: var(--kies);
  font-size: 0.875rem;
}

.leer {
  background: var(--flaeche);
  border: 1px dashed var(--linie);
  border-radius: var(--rand);
  padding: 1.5rem;
  color: var(--kies);
  text-align: center;
  font-size: 0.9375rem;
}

/* --- Formular --------------------------------------------------------- */

.formular {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--rand);
  padding: clamp(1.25rem, 3vw, 2rem);
  max-width: 44rem;
}

.formular__titel {
  font-size: 1.25rem;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.formular__hinweis {
  color: var(--kies);
  font-size: 0.9375rem;
  margin: 0.4rem 0 1.5rem;
}

.reihe {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 34rem) {
  .reihe--zwei {
    grid-template-columns: 1fr 1fr;
  }
}

.feld {
  display: grid;
  gap: 0.35rem;
}

.feld > span {
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--kies);
}

.feld input,
.feld textarea {
  font: inherit;
  color: var(--tinte);
  background: #fdfefd;
  border: 1px solid var(--linie);
  border-radius: var(--rand);
  padding: 0.6rem 0.7rem;
  width: 100%;
  transition: border-color var(--spur), box-shadow var(--spur);
}

.feld input:focus,
.feld textarea:focus {
  border-color: var(--email);
  box-shadow: 0 0 0 3px rgba(28, 92, 107, 0.14);
  outline: none;
}

.feld textarea {
  resize: vertical;
  min-height: 5rem;
}

.ampel {
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8125rem;
  border-radius: var(--rand);
  padding: 0.6rem 0.8rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid currentColor;
  background: #f7f9f7;
}

.ampel--frei {
  color: var(--plakette-7);
  background: rgba(46, 97, 82, 0.09);
}

.ampel--belegt {
  color: var(--signal);
  background: rgba(180, 71, 42, 0.09);
}

/* Wechseltag: erlaubt, aber es fehlt noch die Absprache. */
.ampel--wechsel {
  color: var(--plakette-4);
  background: rgba(138, 86, 25, 0.1);
}

/* Pflichtfeld, solange ein Wechseltag im Spiel ist. */
.feld--pflicht > span {
  color: var(--plakette-4);
}

.feld--pflicht textarea {
  border-color: var(--plakette-4);
}

.knopfreihe {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.knopf {
  cursor: pointer;
  padding: 0.7rem 1.5rem;
  transition: filter var(--spur);
}

.knopf:hover:not(:disabled) {
  filter: brightness(1.12);
}

.knopf:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.knopf--stil {
  background: transparent;
  color: var(--email);
  box-shadow: inset 0 0 0 1px var(--linie);
}

.knopf--stil:hover:not(:disabled) {
  background: rgba(28, 92, 107, 0.08);
  filter: none;
}

.knopf--gefahr {
  background: var(--signal);
}

.meldung {
  margin-top: 1rem;
  border-radius: var(--rand);
  padding: 0.7rem 0.9rem;
  font-size: 0.9375rem;
  border-left: 4px solid currentColor;
}

.meldung--fehler {
  color: var(--signal);
  background: rgba(201, 58, 34, 0.09);
}

.meldung--gut {
  color: var(--plakette-7);
  background: rgba(46, 97, 82, 0.1);
}

/* --- Adminleiste ------------------------------------------------------ */

.adminleiste {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--kies);
  font-size: 0.875rem;
}

.textknopf {
  background: none;
  border: 0;
  padding: 0;
  color: var(--email);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: 0.875rem;
}

/* --- Hinweisstreifen -------------------------------------------------- */

.streifen {
  background: var(--signal);
  color: #fff;
  text-align: center;
  padding: 0.5rem 1rem;
  font-family: var(--schrift-schild);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

/* --- Auftritt --------------------------------------------------------- */

@keyframes einsetzen {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.buehne__schild {
  animation: einsetzen 420ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: 120ms;
}

.gitter {
  animation: einsetzen 260ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

/* --- Klein ------------------------------------------------------------ */

@media (max-width: 40rem) {
  .tag {
    min-height: 4rem;
    padding: 0.25rem 0.3rem;
  }

  .belegung {
    height: 1.625rem;
    font-size: 0.625rem;
    letter-spacing: 0.04em;
    padding: 0 0.3rem;
    gap: 0.25rem;
  }

  /* Auf dem Handy zählt der Name, die Nächte stehen in der Liste darunter. */
  .belegung__naechte {
    display: none;
  }

  .woche__spur {
    bottom: 0.25rem;
  }

  /* Auf dem Handy hat das Band das Format des Fotos – dort füllt es die Breite
     ganz aus, der unscharfe Untergrund ist gar nicht zu sehen. */
  .buehne {
    --bild-format: 4 / 3;
  }

  .buehne__schild {
    left: 1.5rem;
    max-width: calc(100% - 3rem);
  }

  .gitter__kopf span {
    padding: 0.4rem 0.3rem;
    /* Nicht kleiner als 11px – darunter wird die Spaltenbeschriftung raterei. */
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
  }

  /* Drei Felder nebeneinander werden auf dem Handy zu Schnipseln. */
  .lage {
    grid-template-columns: 1fr;
    margin-top: 2rem;
  }

  .lage__feld:first-child {
    border-radius: var(--rand) var(--rand) 0 0;
  }

  .lage__feld:last-child {
    border-radius: 0 0 var(--rand) var(--rand);
  }
}

/* Dazwischen: Wetter und Anfahrt teilen die Zeile, die Adresse darunter. */
@media (min-width: 40rem) and (max-width: 58rem) {
  .lage {
    grid-template-columns: 1fr 1fr;
  }

  .lage__feld:nth-child(2) {
    border-radius: 0 var(--rand) var(--rand) 0;
  }

  .lage__feld:last-child {
    grid-column: 1 / -1;
    border-radius: 0 0 var(--rand) var(--rand);
  }
}

/* --- Querformat am Handy / flache Fenster ------------------------------- */
/* Bei 375 Pixel Hoehe nahm das Bild 61% des Bildschirms ein und der Kalender
   lag komplett darunter. Hier zaehlt das Raster, nicht das Foto. */
@media (max-height: 30rem) {
  .buehne {
    --bild-format: 16 / 3;
    padding-top: 0.5rem;
  }

  .buehne__schild {
    padding: 0.45rem 0.9rem;
    bottom: -1rem;
  }

  .buehne__ort {
    display: none;
  }

  .reiter {
    margin: 1.25rem 0 0.75rem;
  }

  .tag {
    min-height: 3.5rem;
  }

  .abschnitt-titel {
    margin-top: 1.5rem;
  }
}

/* --- Finger statt Maus -------------------------------------------------- */
/* Bedienelemente auf das Mindestmass 44x44 bringen, aber nur dort, wo mit dem
   Finger gezielt wird. Am Desktop bleiben die knapperen Proportionen. */
@media (pointer: coarse) {
  .pfeil {
    width: 2.75rem;
    height: 2.75rem;
  }

  .reiter__knopf,
  .kopf__aktion,
  .knopf {
    min-height: 2.75rem;
  }

  .reiter {
    gap: 0.5rem;
  }

  .kopf {
    gap: 0.5rem;
  }

  .textknopf {
    min-height: 2.75rem;
    padding: 0 0.5rem;
  }

  .kopf__admin input {
    min-height: 2.75rem;
  }

  /* Die Plakette kann in einer Tageszelle keine 44 Pixel hoch werden. Dafuer
     ist die Liste "Naechste Aufenthalte" der bequeme Weg – deren Zeilen sind
     gross genug. Hier nur so viel Hoehe, dass man sicher trifft. */
  .belegung {
    height: 1.75rem;
  }

  .aufenthalt {
    min-height: 2.75rem;
  }

  /* Der Link bleibt im Textfluss, wird aber auf Fingermass gebracht. Das
     negative Aussenmass haelt das Band dabei gleich hoch. */
  .lage__link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding-inline: 0.25rem;
    margin-block: -0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  .aufenthalt:hover {
    transform: none;
  }
}
