/* Öffentliche Seiten – mobil zuerst */
:root {
  --text: #f6f0e6;
  --text-leise: #d4c8b6;
  --akzent: #e9ab55;
  --akzent-hover: #f3c27c;
  --karte: rgba(22, 15, 9, 0.82);
  --rand: rgba(255, 255, 255, 0.12);
  --fehler-bg: #5b1f17;
  --fehler-rand: #e0735f;
  --ok-bg: #1f4a1c;
  --ok-rand: #7dc66e;
  --info-bg: #1f3550;
  --info-rand: #7aa7dd;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: #2b1d12;
}

/*
 * Hintergrund als feste Ebene in Bildschirmgröße: Er füllt im Hoch- wie im Querformat
 * immer genau das Display und scrollt nicht mit. (background-attachment: fixed
 * funktioniert auf iPhone/iPad nicht, und "cover" auf dem ganzen body würde das Bild
 * bei langen Seiten stark vergrößern.) lvh = Höhe bei eingeklappter Adressleiste,
 * damit das Bild beim Scrollen am Handy nicht springt.
 */
.hintergrund {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  background: center / cover no-repeat;
}

a { color: var(--akzent); }
a:hover { color: var(--akzent-hover); }
img { max-width: 100%; height: auto; display: block; }

.kopf {
  padding: 14px 16px;
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
}
.kopf a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-style: italic;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
}

.wrap {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
/* Hint: kleines „?“ oben rechts in der Karte, der Text erscheint erst nach dem Klick */
.karte { position: relative; }
.hinweis-knopf { position: absolute; top: 10px; right: 10px; z-index: 1; margin: 0; }
.hinweis-knopf button {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.05rem;
  line-height: 34px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid var(--rand);
}
.hinweis-knopf button:hover, .hinweis-knopf button:focus-visible { color: #22170c; background: var(--akzent); border-color: var(--akzent); }
.hinweis-text {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 10px;
  border-left: 5px solid var(--akzent);
  background: rgba(233, 171, 85, 0.14);
}
.hinweis-text[hidden] { display: none; }
.hinweis-text strong { display: block; margin-bottom: 4px; color: var(--akzent); }
.hinweis-text p { margin: 0; }

.karte.schmal { max-width: 460px; margin-left: auto; margin-right: auto; }
.karte h1 { margin: 0 0 14px; font-size: 1.5rem; line-height: 1.25; }
.karte figure { margin: 0 0 16px; }
.karte figure img { margin: 0 auto; border-radius: 8px; }
.text p { margin: 0 0 14px; }
.einleitung p { margin: 0; }


/* Formulare */
form.antwort { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
form.zugang { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
form.antwort input, form.zugang input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 12px 14px;
  font-size: 1.2rem;
  color: #1d1610;
  background: #fffaf1;
  border: 2px solid #8a7356;
  border-radius: 8px;
}
form.zugang input { flex: none; }
form.antwort input:focus, form.zugang input:focus { outline: 3px solid var(--akzent); outline-offset: 1px; }

button, .knopf {
  display: inline-block;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  color: #22170c;
  background: var(--akzent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
button:hover, .knopf:hover { background: var(--akzent-hover); color: #22170c; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.zweitrangig { background: transparent; color: var(--text); border: 2px solid var(--rand); }
.zweitrangig:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.zusatz { margin: 0 0 14px; }
.neustart { margin-top: 10px; }

/* Meldungen */
.meldung {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 10px;
  border-left: 5px solid;
  font-weight: 600;
}
.meldung.fehler { background: var(--fehler-bg); border-color: var(--fehler-rand); }
.meldung.ok { background: var(--ok-bg); border-color: var(--ok-rand); }
.meldung.info { background: var(--info-bg); border-color: var(--info-rand); }
.meldung a { color: inherit; }

/* Startseite */
.strecken {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.strecke {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.strecke:hover, .strecke:focus-visible { transform: translateY(-3px); border-color: var(--akzent); color: var(--text); }
.strecke img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.strecke-text { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 16px 16px; text-align: center; }
.strecke-text strong { font-size: 1.25rem; }

/* Formatierter Text aus dem Editor (Abschlussseite) */
.inhalt { font-size: 1.1rem; }
.inhalt > :first-child { margin-top: 0; }
.inhalt p { margin: 0 0 12px; }
.inhalt h2 { font-size: 1.4rem; margin: 18px 0 8px; }
.inhalt h3 { font-size: 1.15rem; margin: 14px 0 6px; }
.inhalt ul, .inhalt ol { margin: 0 0 12px; padding-left: 1.4em; }
.inhalt blockquote { margin: 0 0 12px; padding-left: 14px; border-left: 3px solid var(--akzent); color: var(--text-leise); }
.inhalt hr { border: 0; border-top: 1px solid var(--rand); margin: 18px 0; }

.fuss {
  padding: 16px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-leise);
  background: rgba(0, 0, 0, 0.55);
}
.fuss p { margin: 4px 0; }
.fuss a { color: var(--text); }

@media (max-width: 480px) {
  .karte { padding: 16px; }
  .karte h1 { font-size: 1.3rem; }
  form.antwort button { width: 100%; }
}
