/* Living Library – barrierefreie Listen-Ansicht
   Ziel: BITV 2.0 / EN 301 549 / WCAG 2.1 Stufe AA (inkl. Zielgröße aus WCAG 2.2).
   Geprüfte Kontraste (Text auf Hintergrund):
   - Aubergine #4d2156 auf Weiß 12,6:1 · auf Creme 11,8:1
   - Dunkelorange #a6461b auf Weiß 6,0:1 · auf Creme 5,6:1
   - Grau #5c5260 auf Weiß 7,4:1 · auf #f1eef2 6,5:1
   - Fehlerrot #a4161a auf Weiß 7,8:1 · Grün #1b6b34 auf #eef8f1 6,0:1
   Das helle Orange #ef7c49 wird nur dekorativ (Linien) genutzt, nie für Text.
   Alle Größen in rem → skaliert mit Browser-Zoom und Schriftgröße. */

.llb2 {
	--p: #4d2156;          /* Aubergine */
	--p-soft: #f4eef5;
	--o: #ef7c49;          /* Orange – nur dekorativ */
	--o-text: #a6461b;     /* Orange für Text */
	--ink: #1f1a21;
	--muted: #5c5260;
	--line: #8a7f8d;       /* Rahmen ≥ 3:1 gegen Weiß (WCAG 1.4.11) */
	--cream: #fdf6f1;
	--taken-bg: #f1eef2;
	--err: #a4161a;
	--err-bg: #fff4f2;
	--ok: #1b6b34;
	--ok-bg: #eef8f1;
	--focus: #1f1a21;
	--type: "Courier Prime", "American Typewriter", "Courier New", Courier, monospace;
	--sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

	color: var(--ink);
	background: #fff;
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.6;
	max-width: 52rem;
	margin: 0 auto;
	padding: 0 1rem 3rem;
	box-sizing: border-box;
	overflow-wrap: break-word;
}
.llb2 *, .llb2 *::before, .llb2 *::after { box-sizing: inherit; }
.llb2 [hidden] { display: none !important; }
.llb2 p { margin: 0 0 .75rem; }

.llb2 a { color: var(--p); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: .08em; }
.llb2 a:hover { text-decoration-thickness: .15em; }

/* Gut sichtbarer Tastaturfokus (WCAG 2.4.7) */
.llb2 a:focus-visible,
.llb2 button:focus-visible,
.llb2 input:focus-visible,
.llb2 textarea:focus-visible,
.llb2 [tabindex="-1"]:focus {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
	box-shadow: 0 0 0 6px #fff;
}
.llb2 [tabindex="-1"]:focus:not(:focus-visible) { outline-style: dotted; }

.llb2-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Überschriften ---------- */
.llb2 .llb2-h, .llb2 .llb2-title, .llb2 .llb2-item__h {
	font-family: var(--type);
	color: var(--p);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0;
	text-transform: none;
}
.llb2 .llb2-title { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 0 0 .75rem; }
.llb2 .llb2-h { font-size: 1.45rem; margin: 0 0 .75rem; }
.llb2-kicker { font-family: var(--type); color: var(--o-text); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; margin: 2rem 0 .5rem !important; }
.llb2-lead { font-size: 1.15rem; }

/* ---------- Eckdaten ---------- */
.llb2-facts { margin: 1.25rem 0 2rem; padding: 0; display: grid; gap: .25rem; border-left: 6px solid var(--o); padding-left: 1rem; }
.llb2-facts div { display: grid; grid-template-columns: 7rem 1fr; gap: .5rem; }
.llb2-facts dt { font-weight: 700; color: var(--o-text); font-family: var(--type); }
.llb2-facts dd { margin: 0; }

/* ---------- Boxen ---------- */
.llb2-box, .llb2-howto, .llb2-errors {
	border-radius: 1rem;
	padding: 1.25rem 1.5rem;
	margin: 0 0 2rem;
}
.llb2-box, .llb2-howto { background: var(--cream); border: 2px solid transparent; }
.llb2-box--ok { background: var(--ok-bg); border-color: var(--ok); }
.llb2-box--ok .llb2-h { color: var(--ok); }
.llb2-ok { color: var(--ok); font-weight: 700; }
.llb2-bad { color: var(--err); font-weight: 700; }
.llb2-steps { margin: 0 0 1rem; padding-left: 1.5rem; }
.llb2-steps li { margin: 0 0 .35rem; padding-left: .25rem; }
.llb2-steps li::marker { font-family: var(--type); font-weight: 700; color: var(--o-text); }
.llb2-alt { margin: 0 !important; }
.llb2-summary-list { margin: 0 0 1rem; padding-left: 1.25rem; }
.llb2-summary-list li { margin-bottom: .5rem; }

/* ---------- Fehlerübersicht ---------- */
.llb2-errors { background: var(--err-bg); border: 3px solid var(--err); }
.llb2 .llb2-errors .llb2-h { color: var(--err); font-size: 1.3rem; }
.llb2-errors ul { margin: 0; padding-left: 1.25rem; }
.llb2-errors li { margin-bottom: .35rem; }
.llb2 .llb2-errors a { color: var(--err); font-weight: 700; }
.llb2-field-error { color: var(--err); font-weight: 700; margin: .25rem 0 .4rem !important; padding-left: .75rem; border-left: 4px solid var(--err); }

/* ---------- Schritte ---------- */
.llb2-step { margin: 0 0 2.5rem; }
.llb2 .llb2-step__h { padding-bottom: .5rem; border-bottom: 3px solid var(--o); }
.llb2-step__n { display: block; font-size: 1rem; color: var(--o-text); }
.llb2-hint { color: var(--muted); font-size: 1rem; }

/* ---------- Bücherkatalog (geordnete Liste) ---------- */
.llb2-list { list-style: none; margin: 1.25rem 0 0; padding: 0; counter-reset: none; }
.llb2-item {
	margin: 0;
	padding: 1.25rem 0 1.25rem 1rem;
	border-top: 1px solid var(--line);
	border-left: 6px solid transparent;
}
.llb2-item:last-child { border-bottom: 1px solid var(--line); }
.llb2-item.is-chosen { border-left-color: var(--p); background: var(--p-soft); padding-right: 1rem; }
.llb2 .llb2-item__h { font-size: 1.25rem; margin: 0 0 .35rem; max-width: 40ch; }
.llb2-item__who { margin: 0 0 .5rem !important; color: var(--o-text); }
.llb2-item__who strong { font-family: var(--type); }
.llb2-item__text { margin: 0 0 .6rem !important; max-width: 65ch; }
ul.llb2-item__text { padding-left: 1.25rem; }
ul.llb2-item__text li { margin: 0 0 .2rem; }
.llb2-item__where { margin: 0 0 .35rem !important; }
.llb2-item__label { font-weight: 700; }
.llb2-item__avail { color: var(--muted); font-size: .95rem; margin: 0 0 .5rem !important; }
.llb2-item.is-full .llb2-item__avail { font-weight: 700; color: var(--ink); }

/* Foto unter dem Buchtitel, Text daneben (mobil: untereinander) */
.llb2-item__body { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.25rem; align-items: start; margin: .5rem 0 .75rem; }
.llb2-item__body.no-photo { grid-template-columns: minmax(0, 1fr); }
.llb2 .llb2-item__photo { margin: 0; padding: 0; }
.llb2 .llb2-item__photo img { display: block; width: 100%; height: auto; border-radius: .5rem; background: var(--cream); box-shadow: 0 2px 10px rgba(31, 26, 33, .12); }
.llb2-item.is-full .llb2-item__photo img { filter: grayscale(1); opacity: .7; }

/* ---------- Ausführliche Anleitung ---------- */
.llb2-guide { background: var(--cream); border-radius: 1rem; padding: 1.5rem 1.75rem; margin: 0 0 2.5rem; border-top: 6px solid var(--o); }
.llb2-guide > p, .llb2-guide li { max-width: 68ch; }
.llb2 .llb2-guide__h { font-family: var(--type); color: var(--p); font-size: 1.15rem; line-height: 1.3; margin: 1.25rem 0 .4rem; }
.llb2-guide__steps { list-style: none; margin: 1rem 0 0; padding: 0; counter-reset: llbstep; }
.llb2-guide__steps > li { position: relative; margin: 0 0 .75rem; padding: .35rem 0 0 3.25rem; min-height: 2.25rem; counter-increment: llbstep; }
.llb2-guide__steps > li::before {
	content: counter(llbstep);
	position: absolute; left: 0; top: 0;
	width: 2.25rem; height: 2.25rem; border-radius: .75rem .75rem .75rem .15rem; /* Sprechblase */
	background: var(--p); color: #fff;
	font-family: var(--type); font-weight: 700; font-size: 1.1rem;
	display: grid; place-items: center;
}
.llb2-guide__steps .llb2-guide__h { margin-top: 1.1rem; }
.llb2-guide ul { margin: .25rem 0 .75rem; padding-left: 1.25rem; }
.llb2-guide ul li { margin-bottom: .3rem; }
.llb2-guide__jump { margin: 1rem 0 0 !important; font-weight: 700; }

/* Uhrzeiten: native Radiobuttons, große Klickflächen (≥ 44 px) */
.llb2-times { border: 0; margin: 0; padding: 0; min-width: 0; }
.llb2-times legend { font-weight: 700; padding: 0; margin: 0 0 .5rem; font-size: 1rem; }
.llb2-times__opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: .5rem; }
.llb2-opt {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	min-height: 2.75rem;
	padding: .45rem .9rem .45rem .7rem;
	border: 2px solid var(--line);
	border-radius: .6rem;
	background: #fff;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1.3;
	margin: 0;
}
.llb2-opt input { width: 1.5rem; height: 1.5rem; margin: 0; flex: none; accent-color: var(--p); cursor: pointer; }
.llb2-opt:hover { border-color: var(--p); }
.llb2-opt:has(input:checked) { border-color: var(--p); background: var(--p); color: #fff; font-weight: 700; }
.llb2-opt:has(input:checked) input { accent-color: #fff; }
.llb2-opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.llb2-opt--none { border-style: dashed; }
.llb2-opt--none:has(input:checked) { background: #fff; color: var(--ink); border-color: var(--line); font-weight: 400; }
.llb2-opt--none:has(input:checked) input { accent-color: var(--p); }
.llb2-opt.is-taken { background: var(--taken-bg); color: var(--muted); border-color: #c9c2cb; border-style: solid; cursor: not-allowed; }
.llb2-opt.is-taken input { cursor: not-allowed; }
.llb2-opt__state { font-weight: 700; }

/* ---------- Formularfelder ---------- */
.llb2-field { margin: 0 0 1.25rem; max-width: 34rem; }
.llb2-field > label { display: block; font-weight: 700; margin: 0 0 .25rem; }
.llb2-field .llb2-hint { margin: 0 0 .35rem; }
.llb2-req, .llb2-opt-text { font-weight: 400; color: var(--muted); }
.llb2-field input[type=text], .llb2-field input[type=email], .llb2-field input[type=tel], .llb2-field textarea {
	display: block;
	width: 100%;
	font: inherit;
	color: var(--ink);
	background: #fff;
	border: 2px solid var(--line);
	border-radius: .5rem;
	padding: .6rem .75rem;
	min-height: 2.9rem;
	margin: 0;
}
.llb2-field [aria-invalid="true"] { border-color: var(--err); border-width: 3px; }
.llb2-check { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; align-items: start; max-width: 40rem; }
.llb2-check .llb2-field-error, .llb2-check__link { grid-column: 1 / -1; }
.llb2-check__link { margin: 0 0 0 2.4rem !important; }
.llb2-check input { width: 1.6rem; height: 1.6rem; margin: .1rem 0 0; accent-color: var(--p); }
.llb2-check > label { font-weight: 400; margin: 0; cursor: pointer; }
.llb2-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Prüfen & Absenden ---------- */
.llb2-review { background: var(--cream); border-radius: 1rem; padding: 1rem 1.25rem; margin: 0 0 1.25rem; }
.llb2-review ul { margin: .25rem 0 .5rem; padding-left: 1.25rem; }
.llb2-review .llb2-warn { color: var(--err); font-weight: 700; }

.llb2 .llb2-btn {
	appearance: none;
	display: inline-block;
	font-family: var(--type);
	font-weight: 700;
	font-size: 1.1rem;
	line-height: 1.3;
	color: #fff;
	background: var(--p);
	border: 3px solid var(--p);
	border-radius: 999px;
	padding: .8rem 1.75rem;
	min-height: 3rem;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
}
.llb2 .llb2-btn:hover { background: #3a1841; border-color: #3a1841; }
.llb2 .llb2-btn--big { font-size: 1.2rem; padding: .95rem 2.25rem; }
.llb2 .llb2-btn[aria-disabled="true"] { opacity: .75; cursor: progress; }

/* ---------- Kontakt ---------- */
.llb2-outro { margin-top: 3rem; padding-top: 1.5rem; border-top: 3px solid var(--o); }

/* ---------- Kleine Bildschirme (Reflow bis 320 px, WCAG 1.4.10) ---------- */
@media (max-width: 36rem) {
	.llb2 { font-size: 1rem; }
	.llb2-facts div { grid-template-columns: 1fr; gap: 0; margin-bottom: .35rem; }
	.llb2-item { padding-left: .6rem; }
	.llb2-times__opts { grid-template-columns: 1fr; }
	.llb2-item__body { grid-template-columns: 1fr; gap: .75rem; }
	.llb2 .llb2-item__photo { max-width: 12rem; }
	.llb2-guide { padding: 1.25rem 1rem; }
	.llb2-guide__steps > li { padding-left: 2.75rem; }
	.llb2-opt { width: 100%; }
	.llb2 .llb2-btn--big { width: 100%; }
	.llb2-box, .llb2-howto, .llb2-errors { padding: 1rem; }
}

/* Windows-Kontrastmodus */
@media (forced-colors: active) {
	.llb2-opt, .llb2-errors, .llb2-box, .llb2-item.is-chosen { border: 2px solid CanvasText; }
	.llb2-opt:has(input:checked) { outline: 3px solid Highlight; }
	.llb2-opt.is-taken { color: GrayText; }
}
@media (prefers-reduced-motion: reduce) {
	.llb2 * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
	.llb2-opt--none, .llb2 .llb2-btn, .llb2-hp { display: none !important; }
}

/* ---------- Seite „Regeln der Veranstaltung“ ---------- */
.llb2-rules { padding-bottom: 2rem; }
.llb2-rules .llb2-intro { margin-bottom: 1.5rem; }
.llb2-rules__list {
	list-style: none;
	margin: 0 0 2rem;
	padding: 1.25rem 1.75rem;
	background: var(--cream);
	border-radius: 1rem;
	border-top: 6px solid var(--o);
}
.llb2-rules__list li {
	position: relative;
	margin: 0;
	padding: .75rem 0 .75rem 2.25rem;
	border-bottom: 1px solid #eadfd8;
	max-width: 68ch;
}
.llb2-rules__list li:last-child { border-bottom: 0; }
.llb2-rules__list li::before {
	/* kleine Sprechblase als Aufzählungszeichen (dekorativ) */
	content: "";
	position: absolute;
	left: 0;
	top: 1.05rem;
	width: 1.1rem;
	height: .85rem;
	background: var(--p);
	border-radius: .35rem .35rem .35rem .05rem;
}
.llb2 a.llb2-btn, .llb2 a.llb2-btn:visited { color: #fff; text-decoration: none; }
.llb2 a.llb2-btn:hover { color: #fff; }
@media (max-width: 36rem) {
	.llb2-rules__list { padding: 1rem; }
	.llb2-rules__list li { padding-left: 1.9rem; }
}
@media (forced-colors: active) {
	.llb2-rules__list li::before { background: CanvasText; }
}
