/* Katerloch – Ausgabe der Eingaben-Formulare (Gästebuch, Folder-Anfrage).
   Gästebuch: Farben und Schrift der Seite, dazu ein warmer Ockerton aus dem Höhlenlicht
   (Entwurf „Katerloch Gästebuch“, Oktober 2026). Kontraste auf --kl-bg: Ocker 4,8:1, Grau 5,2:1.
   Formulare (Entwurf „Katerloch Eingabeformulare“): auf der Formularfläche Grau 6,0:1, Ocker 5,5:1,
   Fehlertext 6,9:1; Feldtext auf dem hellen Feld 14:1. */
.kl-gaestebuch, .kl-anfrage {
	--kl-gb-akzent: #e6b273;
	--kl-gb-akzent-hell: #f3cf9f;
	--kl-gb-grau: #b9c4cd;
	--kl-gb-linie: #5a6773;
	--kl-gb-tief: #2f3842;
	--kl-form-flaeche: #35404a;
	--kl-form-feld: #f4f6f8;
	--kl-form-text: #1f262c;
	--kl-form-fehler: #ffc2b8;
	--kl-form-fehler-rand: #ff9c8f;
}
.kl-gaestebuch { max-width: 1040px; }

/* Kopfleiste: Zahl der Einträge und der Knopf zum Formular */
.kl-gb-anzahl { font-size: 17px; color: var(--kl-gb-grau); margin: 0 0 12px; }
.kl-gb-formular > summary.kl-button {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; margin-bottom: 1em;
	border: 0; border-radius: 999px; box-shadow: none; background: var(--kl-gb-akzent); color: #1f262c; font-size: 17px; cursor: pointer;
}
.kl-gb-formular > summary.kl-button:hover, .kl-gb-formular > summary.kl-button:focus-visible { background: var(--kl-gb-akzent-hell); color: #1f262c; }

/* Jahre */
.kl-gb-jahr { font-size: 52px; line-height: 1; color: var(--kl-gb-akzent); margin: 36px 0 0; font-variant-numeric: tabular-nums; }

/* Ein Eintrag: links wer und wann, rechts der Text in lesbarer Zeilenlänge */
.kl-gb-eintrag {
	display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px 52px;
	padding: 34px 0; border-top: 1px solid var(--kl-gb-linie);
}
.kl-gb-jahr + .kl-gb-eintrag { margin-top: 18px; }
.kl-gb-kopf { min-width: 0; }
.kl-gb-wer { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kl-gb-name { font-size: 23px; line-height: 1.2; margin: 0; overflow-wrap: anywhere; }
.kl-gb-meta { margin: 0; font-size: 15px; color: var(--kl-gb-grau); display: flex; flex-direction: column; gap: 2px; }
.kl-gb-inhalt { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 66ch; }
.kl-gb-text { font-size: 18px; line-height: 1.7; overflow-wrap: anywhere; }

/* Langer Eintrag: der Rest hinter „Ganzen Eintrag lesen“ */
.kl-gb-mehr > summary {
	display: inline-block; list-style: none; cursor: pointer; margin-top: 10px; padding: 10px 0; min-height: 44px; box-sizing: border-box;
	color: var(--kl-gb-akzent); text-decoration: underline; text-underline-offset: 4px;
}
.kl-gb-mehr > summary::-webkit-details-marker { display: none; }
.kl-gb-mehr > summary:hover { color: var(--kl-gb-akzent-hell); }
.kl-gb-mehr[open] > summary { display: none; }
.kl-gb-mehr[open]::before { content: ""; display: block; height: 1.7em; }

/* Antwort des Betreibers */
.kl-gb-antwort { background: var(--kl-gb-tief); border-radius: 14px; padding: 20px 24px; font-size: 17px; line-height: 1.65; }
.kl-gb-antwort > strong {
	display: inline-block; margin-bottom: 4px; font-weight: normal; font-size: 14px;
	letter-spacing: .14em; text-transform: uppercase; color: var(--kl-gb-akzent);
}

.kl-gaestebuch summary:focus-visible, .kl-seitenzahlen a:focus-visible { outline: 3px solid var(--kl-gb-akzent); outline-offset: 3px; }

@media (max-width: 767px) {
	.kl-gb-jahr { font-size: 40px; }
	.kl-gb-eintrag { grid-template-columns: minmax(0, 1fr); padding: 24px 0; }
	.kl-gb-name { font-size: 21px; }
	.kl-gb-meta { flex-direction: row; flex-wrap: wrap; gap: 0; font-size: 14px; }
	.kl-gb-ort::after { content: "\00a0·\00a0"; }
	.kl-gb-text { font-size: 17px; line-height: 1.65; }
	.kl-gb-antwort { padding: 16px 18px; }
}

/* Formulare (Gästebuch und Folder-Anfrage): Beschriftung über dem Feld, alle Felder gleich breit */
.kl-gb-formular form, .kl-anfrage-formular {
	display: flex; flex-direction: column; gap: 24px; box-sizing: border-box; max-width: 640px;
	background: var(--kl-form-flaeche); border-radius: 18px; padding: 36px 40px 40px;
}
.kl-gb-formular form { max-width: 760px; }
.kl-form-titel { margin: 0; font-size: 30px; font-weight: normal; color: #fff; }

/* Kopf der Folder-Seite (Seiteninhalt, tools/katerloch/formularseiten.py): Kennzeile über der Überschrift */
.kl-kennzeile { margin: 0 0 10px; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: #e6b273; }
.kl-kennzeile + h1 { font-size: 44px; font-weight: normal; margin: 0 0 14px; }
.kl-kennzeile + h1 + p { font-size: 19px; line-height: 1.6; max-width: 640px; margin: 0 0 28px; }
.kl-feld { display: flex; flex-direction: column; gap: 8px; margin: 0; min-width: 0; }
.kl-feld > label { font-size: 17px; color: #fff; }
.kl-pflicht { color: var(--kl-gb-akzent); }
.kl-freiwillig { font-size: 15px; color: var(--kl-gb-grau); }
.kl-feld > input[type], .kl-feld > textarea {
	box-sizing: border-box; width: 100%; max-width: none; height: 52px; margin: 0; padding: 0 14px;
	font: inherit; font-size: 18px; color: var(--kl-form-text); background: var(--kl-form-feld);
	border: 2px solid var(--kl-form-feld); border-radius: 10px;
}
.kl-feld > textarea { height: auto; min-height: 150px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.kl-gb-formular .kl-feld > textarea { min-height: 260px; }
.kl-feld > input[type]:focus, .kl-feld > textarea:focus { outline: 3px solid var(--kl-gb-akzent); outline-offset: 2px; }
.kl-feld > input[aria-invalid="true"], .kl-feld > textarea[aria-invalid="true"] { border-color: var(--kl-form-fehler-rand); background: #fff4f2; }
.kl-feldgruppe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
.kl-hinweis { margin: 0; font-size: 15px; color: var(--kl-gb-grau); }
.kl-feldfehler { margin: 0; font-size: 15px; color: var(--kl-form-fehler); }
.kl-zustimmung { margin: 0; }
.kl-zustimmung > label { display: block; position: relative; padding-left: 38px; font-size: 16px; line-height: 1.55; }
.kl-zustimmung > label > input { position: absolute; left: 0; top: 1px; width: 24px; height: 24px; margin: 0; accent-color: var(--kl-gb-akzent); }
.kl-zustimmung > .kl-feldfehler { margin-top: 6px; padding-left: 38px; }
.kl-zustimmung input:focus-visible { outline: 3px solid var(--kl-gb-akzent); outline-offset: 3px; }
.kl-absenden { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 4px; }
.kl-absenden > .kl-button {
	min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px; box-shadow: none;
	background: var(--kl-gb-akzent); color: #1f262c; font-size: 18px; cursor: pointer;
}
.kl-absenden > .kl-button:hover, .kl-absenden > .kl-button:focus-visible { background: var(--kl-gb-akzent-hell); color: #1f262c; }
.kl-absenden > .kl-button:focus-visible { outline: 3px solid var(--kl-gb-akzent); outline-offset: 3px; }
.kl-pflicht-hinweis { margin: 0; font-size: 15px; color: var(--kl-gb-grau); }
.kl-fehlerliste { background: #4a3236; border-radius: 12px; padding: 16px 20px; }
.kl-fehlerliste-titel { margin: 0 0 8px; font-size: 17px; color: #fff; }
.kl-fehlerliste ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.kl-fehlerliste a { color: #ffd2cb; }

@media (max-width: 767px) {
	.kl-gb-formular form, .kl-anfrage-formular { padding: 24px 18px 26px; gap: 20px; border-radius: 16px; }
	.kl-feldgruppe { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.kl-feld > input[type], .kl-feld > textarea { font-size: 17px; }
	.kl-absenden > .kl-button { width: 100%; }
}

/* Gemeinsam mit der Folder-Anfrage */
.kl-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.kl-seitenzahlen { border-top: 1px solid var(--kl-gb-linie, #969696); padding-top: 24px; }
.kl-seitenzahlen ul { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 0; }
.kl-seitenzahlen a, .kl-seitenzahlen [aria-current] { display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; text-align: center; padding: 0 6px; box-sizing: border-box; }
.kl-seitenzahlen [aria-current] { border-radius: 999px; background: var(--kl-gb-akzent, #fff); color: #1f262c; }
