/* Teilnahmelisten – öffentliche Ansicht. Schriftart und Grundfarben kommen vom Theme,
   die Schriftgröße setzen wir selbst (viele Themes sind am Handy zu klein).
   Alle Regeln mit .tl-wrap davor, damit Theme-Regeln für h2/p/li sie nicht überschreiben. */
.tl-wrap {
	--tl-accent: #2e6b3a;
	--tl-accent-soft: #e8f2ea;
	--tl-border: rgba(0, 0, 0, .14);
	--tl-muted: rgba(0, 0, 0, .68);
	--tl-card: #fff;
	--tl-scale: 1; /* wird über die Knöpfe A− / A+ verändert */
	font-size: calc(17px * var(--tl-scale));
	line-height: 1.5;
	max-width: 860px;
	margin: 0 auto;
}
.tl-wrap *, .tl-wrap *::before, .tl-wrap *::after { box-sizing: border-box; }
.tl-wrap p, .tl-wrap li, .tl-wrap label, .tl-wrap span, .tl-wrap a, .tl-wrap summary, .tl-wrap small { line-height: inherit; }

/* Schriftgröße-Leiste */
.tl-wrap .tl-zoom { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin: 0 0 12px; }
.tl-wrap .tl-zoom-label { font-size: .8em; color: var(--tl-muted); margin-right: 2px; }
.tl-wrap .tl-zoom button { min-width: 44px; min-height: 40px; padding: 4px 10px; border: 1px solid var(--tl-border); border-radius: 6px; background: #fff; color: inherit; font: inherit; font-weight: 700; line-height: 1; cursor: pointer; }
.tl-wrap .tl-zoom button:hover, .tl-wrap .tl-zoom button:focus-visible { border-color: var(--tl-accent); color: var(--tl-accent); }
.tl-wrap .tl-zoom button[data-zoom="-1"] { font-size: .85em; }
.tl-wrap .tl-zoom button[data-zoom="1"] { font-size: 1.1em; }

.tl-wrap .tl-notice { padding: 12px 16px; border-radius: 8px; margin: 0 0 20px; border-left: 4px solid; font-size: 1em; }
.tl-wrap .tl-card > .tl-notice { margin: 0 0 14px; }
.tl-wrap .tl-notice--success { background: #e8f5e9; border-color: #2e7d32; color: #1b4d1f; }
.tl-wrap .tl-notice--warning { background: #fff4e5; border-color: #e08a00; color: #6b4300; }
.tl-wrap .tl-notice--info { background: #eef3f8; border-color: #4a7bab; color: #23405e; }

/* Das A4-Blatt (wie der Aushang) */
.tl-wrap .tl-sheet {
	position: relative; display: flex; flex-direction: column; max-width: 794px; margin: 0 auto 24px; padding: 36px 48px 28px;
	aspect-ratio: 210 / 297; /* mindestens A4-Format, wächst mit dem Inhalt */
	background: #fff; color: #1d2327;
	border: 1px solid rgba(0, 0, 0, .08); border-radius: 2px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 10px 30px rgba(0, 0, 0, .10);
}
.tl-wrap .tl-sheet > * { flex: 0 0 auto; }
.tl-wrap .tl-letterhead { display: block; width: 100%; height: auto; margin: 0 0 28px; }
.tl-wrap .tl-footer { display: block; width: 100%; height: auto; margin: auto 0 0; padding-top: 28px; } /* unten auf dem Blatt */

/* Kopf mit Einladungstext */
.tl-wrap .tl-head { margin-bottom: 24px; }
.tl-wrap .tl-title { margin: 0 0 16px; font-size: 1.9em; line-height: 1.2; text-align: center; color: var(--tl-accent); }
.tl-wrap .tl-facts { display: table; margin: 0 auto 20px; padding: 10px 22px; border: 2px solid var(--tl-accent); border-radius: 8px; font-size: 1.05em; }
.tl-wrap .tl-facts > div { display: table-row; }
.tl-wrap .tl-facts dt, .tl-wrap .tl-facts dd { display: table-cell; margin: 0; padding: 2px 0; }
.tl-wrap .tl-facts dt { padding-right: 14px; font-weight: 700; color: var(--tl-accent); }
.tl-wrap .tl-facts dd { font-weight: 600; }
.tl-wrap .tl-desc { font-size: 1em; }
.tl-wrap .tl-desc p { margin: 0 0 10px; font-size: 1em; }
.tl-wrap .tl-desc ul, .tl-wrap .tl-desc ol { margin: 0 0 10px 1.2em; padding: 0; }
.tl-wrap .tl-desc img { max-width: 100%; height: auto; border-radius: 4px; }
.tl-wrap .tl-desc table { border-collapse: collapse; margin: 0 0 10px; }
.tl-wrap .tl-desc td, .tl-wrap .tl-desc th { padding: 2px 12px 2px 0; border: 0; }

/* Anmelde-Kasten */
.tl-wrap .tl-card { background: var(--tl-card); border: 1px solid var(--tl-border); border-radius: 10px; padding: 16px; margin: 0 0 24px; scroll-margin-top: 100px; }
.tl-wrap .tl-summary { font-size: 1em; }
.tl-wrap .tl-summary .tl-bar { margin-top: 6px; height: 10px; }
.tl-wrap .tl-bar { height: 8px; background: rgba(0, 0, 0, .08); border-radius: 99px; overflow: hidden; }
.tl-wrap .tl-bar span { display: block; height: 100%; background: var(--tl-accent); border-radius: 99px; transition: width .3s; }
.tl-wrap .tl-until { margin: 8px 0 0; font-size: .95em; color: var(--tl-muted); }
.tl-wrap .tl-closed { margin: 10px 0 0; font-weight: 600; color: var(--tl-muted); }

.tl-wrap .tl-signup { margin-top: 14px; }
.tl-wrap .tl-signup > summary { list-style: none; }
.tl-wrap .tl-signup > summary::-webkit-details-marker { display: none; }
.tl-wrap .tl-signup[open] > summary { display: none; }
.tl-wrap .tl-btn { display: inline-block; cursor: pointer; min-height: 44px; padding: 10px 18px; border-radius: 6px; border: 1px solid var(--tl-accent); color: var(--tl-accent); background: transparent; font: inherit; font-size: 1em; font-weight: 600; line-height: 1.3; text-align: center; }
.tl-wrap .tl-btn:hover, .tl-wrap .tl-btn:focus-visible { background: var(--tl-accent-soft); }
.tl-wrap .tl-btn--primary { background: var(--tl-accent); color: #fff; width: 100%; font-size: 1.05em; }
.tl-wrap .tl-btn--primary:hover, .tl-wrap .tl-btn--primary:focus-visible { background: var(--tl-accent); filter: brightness(1.1); }
.tl-wrap .tl-btn[disabled] { opacity: .6; cursor: wait; }

.tl-wrap .tl-form p { margin: 0 0 12px; }
.tl-wrap .tl-form label { display: block; font-size: .95em; font-weight: 600; margin-bottom: 4px; }
.tl-wrap .tl-form label small { font-size: .9em; font-weight: 400; color: var(--tl-muted); }
.tl-wrap .tl-form .tl-hint { display: block; margin-top: 4px; font-size: .85em; color: var(--tl-muted); }
.tl-wrap .tl-form input[type="text"], .tl-wrap .tl-form input[type="tel"], .tl-wrap .tl-form input[type="email"] {
	width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--tl-border); border-radius: 6px; background: #fff; color: inherit;
	font: inherit; font-size: max(16px, 1em); /* mind. 16px, sonst zoomt iPhone beim Antippen */
}
.tl-wrap .tl-form .tl-privacy { font-size: .85em; color: var(--tl-muted); margin: 8px 0 0; }
.tl-wrap .tl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Nummerierte Teilnehmerliste – liniert und zweispaltig wie auf dem Papier (1, 2, 3 … links, dann rechts weiter) */
.tl-wrap .tl-people-wrap { scroll-margin-top: 100px; }
.tl-wrap .tl-people-title { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--tl-accent); font-size: 1.2em; line-height: 1.3; color: var(--tl-accent); }
.tl-wrap .tl-people { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.tl-wrap .tl-people li { list-style: none; margin: 0; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 2px 6px 2px 0; border-bottom: 1px solid rgba(0, 0, 0, .28); break-inside: avoid; scroll-margin-top: 120px; }
.tl-wrap .tl-people li::before, .tl-wrap .tl-people li::marker { content: none; display: none; }
.tl-wrap .tl-nr { flex: 0 0 2.4em; align-self: stretch; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; border-right: 1px solid rgba(0, 0, 0, .28); font-size: .8em; font-variant-numeric: tabular-nums; color: var(--tl-muted); }
.tl-wrap .tl-name { flex: 1; min-width: 0; font-size: 1.05em; }
.tl-wrap .tl-here { color: var(--tl-accent); font-weight: 600; font-size: .9em; text-decoration: none; }
.tl-wrap .tl-here:hover, .tl-wrap .tl-here:focus-visible { text-decoration: underline; }
.tl-wrap .tl-people li.is-mine { background: var(--tl-accent-soft); }
.tl-wrap .tl-people li.is-mine .tl-name { color: var(--tl-accent); font-weight: 600; }
.tl-wrap .tl-people li.is-mine small { font-weight: 400; opacity: .85; }
.tl-wrap .tl-people li:target { box-shadow: inset 0 0 0 2px var(--tl-accent); }
.tl-wrap .tl-cancel-inline { display: inline; margin: 0; }
.tl-wrap .tl-cancel-inline button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: var(--tl-accent); color: #fff; font: inherit; font-size: .85em; line-height: 1; cursor: pointer; }
.tl-wrap .tl-cancel-inline button:hover, .tl-wrap .tl-cancel-inline button:focus-visible { filter: brightness(1.15); }
.tl-wrap .tl-late { margin: 8px 0 0; font-size: .85em; color: #6b4300; }

/* Abmelden über Link aus der Mail */
.tl-wrap .tl-cancel-box { margin: 0 0 24px; padding: 16px; border: 2px solid #e08a00; border-radius: 10px; background: #fff8ee; scroll-margin-top: 100px; }
.tl-wrap .tl-cancel-box h3 { margin: 0 0 8px; font-size: 1.2em; }
.tl-wrap .tl-cancel-box p { margin: 0 0 12px; }
.tl-wrap .tl-cancel-box form { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.tl-wrap .tl-cancel-box .tl-btn { text-decoration: none; }
.tl-wrap .tl-btn--danger { background: #b3261e; border-color: #b3261e; color: #fff; }
.tl-wrap .tl-btn--danger:hover, .tl-wrap .tl-btn--danger:focus-visible { background: #b3261e; filter: brightness(1.1); }

/* Übersicht */
.tl-wrap .tl-overview { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tl-wrap .tl-overview li { list-style: none; margin: 0; }
.tl-wrap .tl-overview li::before, .tl-wrap .tl-overview li::marker { content: none; display: none; }
.tl-wrap .tl-overview-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; border: 1px solid var(--tl-border); border-radius: 10px; text-decoration: none; color: inherit; }
.tl-wrap .tl-overview-item:hover { border-color: var(--tl-accent); }
.tl-wrap .tl-overview-title { font-size: 1.1em; font-weight: 700; }
.tl-wrap .tl-overview-meta { grid-column: 1; color: var(--tl-muted); font-size: .95em; }
.tl-wrap .tl-overview-state { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: .9em; font-weight: 600; color: var(--tl-accent); white-space: nowrap; }
.tl-wrap .tl-overview-state.is-closed { color: var(--tl-muted); }

@media (max-width: 640px) {
	.tl-wrap .tl-sheet { aspect-ratio: auto; padding: 18px 16px 24px; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
	.tl-wrap .tl-letterhead { margin-bottom: 18px; }
	.tl-wrap .tl-title { font-size: 1.55em; }
	.tl-wrap .tl-card { padding: 14px; }
	.tl-wrap .tl-people { columns: 1; }
}

/* Seite direkt aus dem Browser drucken: nur das Blatt, ohne Formular und Knöpfe */
@media print {
	.tl-wrap .tl-zoom, .tl-wrap .tl-notice, .tl-wrap .tl-signup-card, .tl-wrap .tl-cancel-box, .tl-wrap .tl-cancel-inline, .tl-wrap .tl-here { display: none !important; }
	.tl-wrap .tl-sheet { box-shadow: none; border: 0; padding: 0; aspect-ratio: auto; }
	.tl-wrap .tl-people li { min-height: 30px; }
}
.tl-wrap .tl-sheet--short { aspect-ratio: auto; }
