/* Zarling-CI: Blau #08447E, Türkis #66C1BF, Grau #666564, Schwarz #1D1D1D, Weiß. Schrift Barlow, lokal. */
/* Schrift aus FONT_PFAD (Markenordner), ausgeliefert unter /fonts/; Ersatz: public/assets/fonts */
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/Barlow-Regular.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/Barlow-Medium.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/Barlow-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/Barlow-Bold.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 800; font-style: normal; font-display: swap; src: url("/fonts/Barlow-ExtraBold.ttf") format("truetype"); }

:root {
  --blau: #08447e;
  --tuerkis: #66c1bf;
  --grau: #666564;
  --schwarz: #1d1d1d;
  --weiss: #ffffff;
  --flaeche: #f3f7fa;
  --linie: #c9d4dd;
  --fokus: #08447e;
  --fehler: #9b1c1c;
  --gut: #0b5d3b;
}

* { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Barlow", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--schwarz);
  background: var(--weiss);
}

.sprung {
  position: absolute; left: 0.5rem; top: -4rem;
  background: var(--weiss); color: var(--blau); padding: 0.75rem 1rem; z-index: 10; font-weight: 600;
}
.sprung:focus { top: 0.5rem; }

/* sichtbarer Fokus überall */
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--fokus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--weiss);
}
.kopf a:focus-visible { outline-color: var(--weiss); box-shadow: none; }

.kopf {
  background: linear-gradient(135deg, var(--blau) 0%, #0b5a8f 60%, #2f8f9a 100%);
  color: var(--weiss);
}
/* Das Logo steht auf einer einfarbigen Fläche (Blau), nicht auf dem Verlauf */
.kopf .innen { max-width: 56rem; margin: 0 auto; padding: 1rem 1rem 1.25rem; }
.logo-flaeche { background: var(--blau); display: inline-block; padding: 0.5rem 0.75rem; }
.logo { display: block; height: 2.5rem; width: auto; background: var(--blau); padding: 0.4rem 0.6rem; }
.leitsatz { margin: 1rem 0 0; font-size: 1.25rem; font-weight: 600; max-width: 40rem; }

.banner {
  background: #fff4d6; color: var(--schwarz); border-bottom: 2px solid #d9a400;
  padding: 0.6rem 1rem; text-align: center; font-weight: 500;
}
.banner[hidden] { display: none; }

main { max-width: 56rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
main:focus { outline: none; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0.5rem 0 0.75rem; color: var(--blau); font-weight: 700; }
h2 { font-size: 1.4rem; margin: 1.75rem 0 0.5rem; color: var(--blau); font-weight: 600; }
h3 { font-size: 1.15rem; margin: 1rem 0 0.25rem; font-weight: 600; }
.untertitel { font-size: 1.25rem; font-weight: 500; }
.klein { font-size: 0.95rem; color: var(--grau); margin: 0.25rem 0; }
.hinweis { background: var(--flaeche); border-left: 4px solid var(--blau); padding: 0.6rem 0.9rem; }
.schmal { max-width: 40rem; }
a { color: var(--blau); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }

form { margin-top: 1rem; max-width: 36rem; }
.feld { margin: 0 0 1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
input[type="email"], input[type="text"] {
  width: 100%; font: inherit; padding: 0.7rem 0.8rem; min-height: 3rem;
  border: 2px solid var(--grau); border-radius: 4px; background: var(--weiss); color: var(--schwarz);
}
fieldset.optional { border: 1px solid var(--linie); border-radius: 4px; padding: 0.75rem 1rem 0.25rem; margin: 0 0 1rem; }
fieldset.optional legend { font-weight: 600; padding: 0 0.4rem; }
.einwilligung { display: grid; grid-template-columns: 1.75rem 1fr; column-gap: 0.75rem; align-items: start; }
.einwilligung input[type="checkbox"] { width: 1.75rem; height: 1.75rem; margin: 0.15rem 0 0; accent-color: var(--blau); }
.einwilligung label { font-weight: 400; margin: 0; }
.einwilligung .verweise, .einwilligung .feldfehler { grid-column: 2; margin: 0.4rem 0 0; }
.verweise a { margin-right: 1rem; }
.feldfehler { color: var(--fehler); font-weight: 600; margin: 0.3rem 0 0; }
.feldfehler[hidden] { display: none; }

.knopf {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--blau); color: var(--weiss);
  border: 2px solid var(--blau); border-radius: 4px; padding: 0.7rem 1.25rem; min-height: 3rem;
}
.knopf:hover:not([aria-disabled="true"]):not(:disabled) { background: #063560; border-color: #063560; }
.knopf:disabled { opacity: 0.6; cursor: wait; }
.knopf.zweit { background: var(--weiss); color: var(--blau); margin-top: 1.5rem; }
.knopf[aria-disabled="true"] { background: #e8edf1; color: #4a4a49; border-color: var(--grau); cursor: not-allowed; }

.meldung { min-height: 1.5rem; margin: 0.75rem 0 0; font-weight: 500; }
.meldung.gut { color: var(--gut); }
.meldung.schlecht { color: var(--fehler); }

.tagzeile { font-size: 1.5rem; font-weight: 700; margin: 0; }
.buchstaben { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 4px; padding: 0.5rem 1rem 0.75rem; margin: 1rem 0; }
.buchstaben h2 { margin-top: 0.5rem; }
.buchstaben-liste { font-size: 1.6rem; font-weight: 700; letter-spacing: 0.35em; margin: 0.25rem 0; word-break: break-word; }
.buchstabe-gross { font-size: 1.5rem; font-weight: 700; color: var(--blau); }

.raster { list-style: none; padding: 0; margin: 0.75rem 0 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.karte {
  border: 2px solid var(--linie); border-radius: 6px; padding: 0.6rem; background: var(--weiss);
  display: flex; flex-direction: column; gap: 0.15rem;
}
.karte .nr { font-size: 2rem; font-weight: 700; color: var(--blau); line-height: 1; }
.karte .datum { color: var(--grau); }
.karte .zustand { font-weight: 600; min-height: 1.5rem; }
.karte .klein-knopf { margin-top: 0.4rem; width: 100%; padding: 0.5rem 0.5rem; font-size: 1rem; }
.zustand-heute { border-color: var(--blau); border-width: 3px; }
.zustand-nachholbar { border-color: var(--blau); border-style: dashed; }
.zustand-offen { background: var(--flaeche); border-color: var(--tuerkis); border-width: 3px; }
.zustand-gesperrt, .zustand-verpasst { background: #f6f6f6; }

.detail { margin-top: 1.5rem; padding: 1rem 1.25rem; border: 3px solid var(--tuerkis); border-radius: 6px; background: var(--weiss); }
.detail[hidden] { display: none; }
.detail h2 { margin-top: 0; }

.fuss { background: var(--schwarz); color: var(--weiss); padding: 1.25rem 1rem; font-size: 0.95rem; }
.fuss p { max-width: 56rem; margin: 0 auto; }

table.tabelle { border-collapse: collapse; width: 100%; font-size: 1rem; }
table.tabelle th, table.tabelle td { border: 1px solid var(--linie); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
.scroll { overflow-x: auto; }

/* ---------- Aufbau wie die Kalenderseite (vorlage.html) ---------- */
input[type="password"] {
  width: 100%; font: inherit; padding: 0.7rem 0.8rem; min-height: 3rem;
  border: 2px solid var(--grau); border-radius: 4px; background: var(--weiss); color: var(--schwarz);
}
.zwei-spalten { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-top: 1rem; }
.kasten { border: 2px solid var(--linie); border-radius: 10px; padding: 0.5rem 1.1rem 1rem; }
.kasten h2 { margin-top: 0.75rem; }
@media (min-width: 52rem) { .zwei-spalten { grid-template-columns: 1fr 1.3fr; align-items: start; } }

.tuer {
  width: 100%; min-height: 92px; border-radius: 10px; border: 2px solid var(--blau); background: var(--blau); color: var(--weiss);
  font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.15rem; padding: 0.4rem; position: relative;
}
.tuer .nr { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.tuer .zu { font-size: 0.9rem; }
.tuer.offen { background: var(--tuerkis); color: var(--schwarz); border-color: var(--blau); }
.tuer.bereit { border-width: 3px; }
.tuer.gesperrt { background: var(--flaeche); color: #4a4a49; border-color: var(--linie); cursor: not-allowed; }
.tuer .bst { position: absolute; top: 6px; right: 8px; font-weight: 800; font-size: 1rem; }
@media (prefers-reduced-motion: no-preference) {
  .tuer { transition: transform 0.18s ease; }
  .tuer:not(.gesperrt):hover { transform: translateY(-2px); }
}

.wort { margin: 2rem 0 0; padding: 0.5rem 1rem 1rem; border: 2px solid var(--blau); border-radius: 10px; }
.wort h2 { margin-top: 0.5rem; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0.8rem; padding: 0; list-style: none; }
.slot { width: 2.2rem; height: 2.6rem; border: 2px solid var(--blau); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.25rem; }
.slot.leer { border-style: dashed; border-color: var(--grau); color: #4a4a49; }
.lw .einwilligung label { font-weight: 400; }

dialog { border: 0; border-radius: 14px; padding: 0; max-width: min(600px, calc(100vw - 24px)); width: 100%; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); }
dialog::backdrop { background: rgba(8, 68, 126, 0.55); }
.dlg { padding: 1.4rem 1.3rem 1.3rem; }
.dlg h2 { margin: 0 0 0.3rem; font-size: 1.3rem; }
.dlg h2:focus { outline: none; }
.dlg .meta { color: var(--grau); margin: 0 0 0.8rem; font-size: 0.95rem; }
.dlg .mitmach { background: var(--flaeche); border-left: 4px solid var(--tuerkis); padding: 0.6rem 0.8rem; margin: 1rem 0 0; border-radius: 4px; }
.dlg .zu { margin-top: 1.1rem; }
.film { margin: 0 0 1rem; }
.film video { display: block; width: 100%; max-height: 60vh; background: var(--schwarz); border-radius: 8px; object-fit: contain; }
.film figcaption { color: var(--grau); font-size: 0.9rem; margin-top: 0.35rem; }
.film[hidden], .raetsel[hidden], .mitmach[hidden], form[hidden] { display: none; }
.raetsel { margin: 1rem 0 0; padding: 0.8rem; border: 2px solid var(--blau); border-radius: 10px; }
.raetsel h3 { margin: 0 0 0.4rem; color: var(--blau); }
.raetsel p { margin: 0.3rem 0; }
.raetsel .rstelle { color: var(--grau); font-size: 0.95rem; }
.raetsel form { margin-top: 0.5rem; }
.raetsel .knopf { margin-top: 0.6rem; }
.rmeld { font-weight: 600; min-height: 1.4em; }
.rmeld.ok { color: var(--blau); }
.fuss .claim { font-weight: 700; color: var(--tuerkis); font-size: 1.1rem; margin-bottom: 0.6rem; }

@media (min-width: 34rem) { .raster { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 48rem) {
  .raster { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  h1 { font-size: 2.3rem; }
}
@media (min-width: 64rem) { .raster { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .knopf { transition: background-color 0.15s ease; }
}
@media (forced-colors: active) {
  .karte, .knopf, .detail { border: 2px solid CanvasText; }
}
