/* StartWecker – gemeinsames Aussehen aller Seiten */
/* Hell: Pfirsich mit oranger Kopfzeile; Dunkel: Nachtblau mit orangem Schimmer. „Wecker“ im Namen wie die Countdown-Kacheln */
:root {
  --bg: #fbeadb; --surface: #ffffff; --text: #1a1d21; --muted: #5a6067; --border: #efc9a8;
  --accent: #e8590c; --accent-hover: #c94b06; --accent-soft: #ffe3cc;
  --glow: linear-gradient(#ffd9b8, rgba(255,217,184,0) 380px);
  --top-bg: var(--accent); --top-edge: 0; --top-text: #ffffff; --top-muted: #ffe6d5; --top-line: rgba(255,255,255,.55);
  --top-hover: rgba(255,255,255,.2); --top-active: #ffffff; --top-switch: #ffffff; --top-switch-line: transparent; --top-load: #ffb84d; --top-solid: var(--accent);
  --menu-text: #1a1d21; --menu-muted: #5a6067; --menu-border: #efc9a8;
  --ok: #2b8a3e; --ok-soft: #e6f6ea; --bad: #c92a2a; --bad-soft: #ffeaea; --info-soft: #eef4ff; --info: #1c5fd1;
  --radius: 12px; --shadow: 0 1px 3px rgba(0,0,0,.1), 0 6px 18px rgba(0,0,0,.06);
}
/* Dunkel: automatisch nach Systemeinstellung, außer man hat oben „Hell“ gewählt; oder ausdrücklich „Dunkel“ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121821; --surface: #1c2430; --text: #f7f8f9; --muted: #b9c3d1; --border: #33405a;
    --accent: #ff7a2e; --accent-hover: #ff9152; --accent-soft: #3a2614;
    --ok: #69db7c; --ok-soft: #1d3324; --bad: #ff8787; --bad-soft: #3b1f1f; --info-soft: #1a2740; --info: #8ab4ff;
    --glow: radial-gradient(120% 420px at 50% 0, rgba(255,122,46,.2), rgba(255,122,46,0) 70%);
    --top-bg: rgba(28,36,48,.88); --top-edge: 3px solid var(--accent); --top-text: var(--text); --top-muted: var(--muted); --top-line: var(--border);
    --top-hover: var(--accent-soft); --top-active: var(--accent); --top-switch: #121821; --top-switch-line: var(--border); --top-load: var(--accent); --top-solid: #1c2430;
    --menu-text: var(--text); --menu-muted: var(--muted); --menu-border: var(--border);
    --shadow: 0 1px 3px rgba(0,0,0,.7), 0 6px 18px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #121821; --surface: #1c2430; --text: #f7f8f9; --muted: #b9c3d1; --border: #33405a;
    --accent: #ff7a2e; --accent-hover: #ff9152; --accent-soft: #3a2614;
    --ok: #69db7c; --ok-soft: #1d3324; --bad: #ff8787; --bad-soft: #3b1f1f; --info-soft: #1a2740; --info: #8ab4ff;
    --glow: radial-gradient(120% 420px at 50% 0, rgba(255,122,46,.2), rgba(255,122,46,0) 70%);
    --top-bg: rgba(28,36,48,.88); --top-edge: 3px solid var(--accent); --top-text: var(--text); --top-muted: var(--muted); --top-line: var(--border);
    --top-hover: var(--accent-soft); --top-active: var(--accent); --top-switch: #121821; --top-switch-line: var(--border); --top-load: var(--accent); --top-solid: #1c2430;
    --menu-text: var(--text); --menu-muted: var(--muted); --menu-border: var(--border);
    --shadow: 0 1px 3px rgba(0,0,0,.7), 0 6px 18px rgba(0,0,0,.45);
    color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--glow) no-repeat, var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Überschriften in Barlow Condensed (SIL Open Font License, liegt in static/fonts, nichts von Google) */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
h1, h2, h3, .brand { font-family: "Barlow Condensed", system-ui, sans-serif; font-weight: 700; letter-spacing: 0; }
h1 { font-size: 1.9rem; line-height: 1.1; margin: 0 0 .25rem; }
h2 { font-size: 1.45rem; line-height: 1.15; margin: 2rem 0 .75rem; text-transform: uppercase; letter-spacing: .02em; }
h3 { font-size: 1.3rem; line-height: 1.2; margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { background: var(--accent-soft); padding: .1rem .35rem; border-radius: 6px; font-size: .95em; }

/* Kopfzeile */
.topbar { background: var(--top-bg); border-bottom: var(--top-edge); position: sticky; top: 0; z-index: 10;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  --text: var(--top-text); --muted: var(--top-muted); --border: var(--top-line); }
.topbar .user-menu-list { --text: var(--menu-text); --muted: var(--menu-muted); --border: var(--menu-border); }
.topbar .nav a:hover, .topbar .nav a.active { background: var(--top-hover); color: var(--top-active); }
.topbar .theme-toggle:hover, .topbar .user-menu > summary:hover, .topbar .user-menu[open] > summary {
  color: var(--top-active); border-color: var(--top-active); background: var(--top-hover); }
.topbar-inner { max-width: 60rem; margin: 0 auto; padding: .6rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; color: var(--text); font-size: 1.45rem; }
.brand:hover { text-decoration: none; }
/* Schriftzug: „START“ als Ticket-Abriss mit Lochreihe, „WECKER“ als Fallblatt-Kacheln wie die Tage-Anzeige */
.abriss { display: inline-flex; align-items: stretch; position: relative; font-size: 1.3rem; line-height: 1; }
.abriss .t1 { background: #fff; color: #1a1d21; padding: .14em .3em .08em; border-radius: .16em 0 0 .16em; display: flex;
  align-items: center; position: relative; letter-spacing: .03em; }
.abriss .uhr { width: .95em; height: .95em; margin: -.04em .18em 0 -.04em; flex-shrink: 0; transform-origin: 50% 60%; }
.abriss .t1::after { content: ""; position: absolute; right: -.07em; top: .17em; bottom: .17em; width: .14em; z-index: 2;
  background: radial-gradient(circle at 50% 50%, var(--top-solid) .045em, transparent .052em) 50% 0 / .14em .17em repeat-y; }
.abriss .t2 { background: #0b0d10; border-radius: 0 .16em .16em 0; padding: .08em .1em .08em .14em; display: flex;
  align-items: center; gap: .05em; position: relative; }
.abriss .t2::before, .abriss .t2::after { content: ""; position: absolute; left: -.1em; width: .2em; height: .2em; border-radius: 50%;
  background: var(--top-solid); z-index: 3; }
.abriss .t2::before { top: -.1em; }
.abriss .t2::after { bottom: -.1em; }
.abriss .flap { position: relative; color: #ffb84d; background: linear-gradient(#23282f 50%, #16191d 50%); border-radius: .12em;
  padding: .1em .07em .06em; min-width: .62em; text-align: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.abriss .flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.7); }
.nav { display: flex; gap: .25rem; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: .35rem .7rem; border-radius: 8px; font-weight: 500; }
/* Konto- und Darstellungs-Knopf: gleich groß und auf einer Höhe */
.theme-toggle, .user-menu > summary { box-sizing: border-box; width: 40px; height: 40px; padding: 0; justify-content: center; }
.theme-toggle { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 8px; cursor: pointer; line-height: 1; display: inline-flex; align-items: center; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.user-menu { position: relative; display: flex; margin: 0; }
.user-menu > summary { list-style: none; display: inline-flex; align-items: center; border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; line-height: 1; font-size: 1rem; cursor: pointer; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover, .user-menu[open] > summary { color: var(--accent); border-color: var(--accent); }
.user-menu > summary svg { width: 18px; height: 18px; }
.user-menu-list { position: absolute; right: 0; top: calc(100% + .4rem); min-width: 14rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .35rem; z-index: 20;
  display: flex; flex-direction: column; }
.user-menu-email { color: var(--muted); font-size: .85rem; padding: .4rem .6rem .5rem; border-bottom: 1px solid var(--border);
  margin-bottom: .25rem; overflow-wrap: anywhere; }
.user-menu-list a, .user-menu-list button.link { color: var(--text); padding: .5rem .6rem; border-radius: 8px; text-align: left;
  font-weight: 500; width: 100%; font-size: .95rem; }
.user-menu-list a:hover, .user-menu-list a.active, .user-menu-list button.link:hover { background: var(--accent-soft); color: var(--accent);
  text-decoration: none; }
.user-menu-list form { margin: 0; }
fieldset.choices { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
fieldset.choices legend { font-weight: 600; margin-bottom: .4rem; }
fieldset.choices label { font-weight: 500; margin-top: 0; }
.nav a:hover, .nav a.active { background: var(--accent-soft); color: var(--accent); text-decoration: none; }

/* Burgermenü: auf schmalen Bildschirmen klappt die Navigation unter der Kopfzeile auf */
.menu-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px;
  padding: .3rem .45rem; cursor: pointer; line-height: 1; align-items: center; }
.menu-toggle svg { width: 22px; height: 22px; }
[id] { scroll-margin-top: 4.5rem; }  /* Sprungziele nicht unter der festen Kopfzeile verstecken */
@media (max-width: 48rem) {
  .topbar-inner { flex-wrap: wrap; gap: .5rem; }
  .menu-toggle { display: inline-flex; order: 3; }
  .theme-toggle { margin-left: auto; order: 2; }
  .user-menu { order: 2; margin-left: auto; }
  .user-menu + .theme-toggle { margin-left: 0; }
  .nav { display: none; order: 4; width: 100%; margin: 0; flex-direction: column; gap: 0; padding: .25rem 0 .5rem;
    border-top: 1px solid var(--border); }
  .topbar.menu-open .nav { display: flex; }
  .nav.nav-flach { display: flex; width: auto; order: 2; flex-direction: row; padding: 0; border: 0; margin-left: auto; }
  .nav a, .nav button.link { padding: .75rem .5rem; border-radius: 8px; font-size: 1.05rem; text-align: left; }
  .nav form.inline { display: block; }
  .nav button.link { width: 100%; }
}

main { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.lead { color: var(--muted); margin: 0; }
.muted, small { color: var(--muted); }
small { font-size: .85rem; }

/* Meldungen */
/* Meldungen wie ein Beleg mit Perforation, ohne farbigen Balken links (Daniel 12.11.2026: weniger Kästen von der Stange) */
.msg { background: var(--surface); color: var(--text); border: 1px dashed var(--border); padding: .7rem 1rem; border-radius: 8px; margin: 0 0 1.25rem; }
/* Nach einem Formular bleibt die Seite an ihrer Stelle; die Meldung schwebt dann kurz unten ein */
.msg.msg-schwebend { position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 50; width: min(36rem, calc(100% - 2rem)); margin: 0; box-shadow: var(--shadow); background: var(--surface); }
.msg.warn { background: var(--accent-soft); border-color: var(--accent); }
.gast-hinweis { color: var(--muted); margin: -.25rem 0 1rem; }

/* Karten */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.25rem; margin-bottom: 1rem; }
/* Gleiche Innenabstände in jeder Karte: erstes und letztes Element ohne zusätzlichen Außenabstand */
.card > :first-child, form.stack > :first-child { margin-top: 0; }
.card > :last-child, form.stack > :last-child { margin-bottom: 0; }
h2 + .muted, h2 + p { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.card-head .edit { margin-left: auto; font-size: .9rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin-bottom: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.1rem; }
.stat .label { color: var(--muted); font-size: .85rem; }
.stat .value { font-weight: 650; font-size: 1.05rem; word-break: break-all; }

/* Stand und Terminarten */
.badge { display: inline-block; font-size: .8rem; font-weight: 650; padding: .15rem .6rem; border-radius: 999px; white-space: nowrap; }
.badge.open { background: var(--ok-soft); color: var(--ok); }
.badge.sold, .badge.cancelled { background: var(--bad-soft); color: var(--bad); }
.badge.closed { background: var(--bg); color: var(--muted); }
.badge.soon { background: var(--accent-soft); color: var(--accent); }
.badge.unknown { background: transparent; color: var(--muted); border: 1px solid var(--border); }
/* Warndreieck: Website des Events seit Tagen nicht erreichbar; Hinweis beim Darüberfahren oder Antippen */
.alert-tri { position: relative; display: inline-flex; flex: none; width: 1.25rem; height: 1.25rem; cursor: help; outline-offset: 2px; }
.alert-tri svg { width: 100%; height: 100%; }
.alert-tri svg path { fill: #f5b301; stroke: #f5b301; stroke-width: 1.5; stroke-linejoin: round; }
.alert-tri svg path.mark { fill: none; stroke: #1a1d21; stroke-width: 2.2; stroke-linecap: round; }
.alert-tri::after { content: attr(data-tip); position: absolute; z-index: 20; top: calc(100% + .4rem); right: -.5rem;
  width: max-content; max-width: 16rem; padding: .45rem .6rem; border-radius: 8px; font-size: .8rem; font-weight: 500;
  line-height: 1.35; white-space: normal; background: var(--text); color: var(--bg); box-shadow: 0 4px 14px rgba(0,0,0,.25);
  opacity: 0; visibility: hidden; transition: opacity .12s; pointer-events: none; }
.alert-tri:hover::after, .alert-tri:focus::after { opacity: 1; visibility: visible; }
.termine { list-style: none; padding: 0; margin: .75rem 0 0; }
.termine li { display: grid; grid-template-columns: 9.5rem 1fr auto; gap: .25rem .75rem; align-items: start; padding: .55rem 0; border-top: 1px solid var(--border); }
.termine .kind { font-weight: 600; }
.termine .when { font-variant-numeric: tabular-nums; }
.termine li.later { color: var(--muted); }
.termine li.later .kind { font-weight: 500; font-style: italic; }
.termine li.later .soon { color: var(--muted); font-weight: 400; }
.termine .source { grid-column: 2 / 3; color: var(--muted); font-size: .85rem; }
.offiziell-muster { color: var(--ok); font-weight: 600; white-space: nowrap; }
pre { overflow-x: auto; background: var(--accent-soft); padding: .75rem; border-radius: 8px; font-size: .85rem; }
pre code { background: none; padding: 0; }
.termine .termin-aendern { grid-column: 1 / -1; margin: 0; }
.termine .termin-aendern summary { font-size: .85rem; color: var(--muted); }
.termine .termin-aendern form { margin-top: .5rem; }
.termine .termin-aendern label { flex: 1 1 11rem; }
.termine .offiziell { grid-column: 2 / -1; color: var(--ok); font-size: .85rem; font-weight: 600; }
.empty { color: var(--muted); margin: .75rem 0 0; }
.guess { color: var(--muted); font-style: italic; font-size: .9rem; margin: .4rem 0 0; }  /* Schätzung nach dem Vorjahr */
.konflikt { color: var(--accent); font-size: .9rem; margin: .4rem 0 0; }  /* zwei gefolgte Events am selben Wochenende */
.ausverkauft { font-weight: 600; font-size: .95rem; margin: .5rem 0 0; }  /* „Letztes Mal nach … ausverkauft“ */

details { margin-top: .75rem; }
summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.pages { margin: .5rem 0 0; padding: 0; list-style: none; }
.pages li { padding: .4rem 0; border-top: 1px dashed var(--border); font-size: .9rem; }
.pages a { word-break: break-all; }
.err { color: var(--bad); }

/* Formulare und Knöpfe */
form.stack { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
label { display: block; margin-top: 1rem; font-weight: 600; }
label:first-of-type { margin-top: 0; }
input, select, textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .55rem .7rem; font: inherit; font-weight: 400; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[type=checkbox], input[type=radio] { display: inline; width: auto; margin: 0 .4rem 0 0; }
/* Kästchen und Auswahlknöpfe: Beschriftung etwas leichter als normale Feldnamen */
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { font-weight: 500; }
.wahl-liste label, label.leicht { font-weight: 400; }
.wahl-liste label { flex: 0 1 auto; display: flex; align-items: center; gap: .3rem; }
textarea.code { font-family: ui-monospace, monospace; font-size: .9rem; }
label.schmal { max-width: 8rem; }
.hint { display: block; margin-top: .3rem; font-weight: 400; }
.websuche-selbst { display: none; }
.websuche:has(#wahl-selbst:checked) .websuche-selbst { display: block; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.25rem; }
.inline { display: inline; }
.btn, button {
  display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; font: inherit; font-weight: 600;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
}
.btn:hover, button:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover, button.primary:hover { background: var(--accent-hover); }
button.danger { color: var(--bad); }
button.icon { padding: .1rem .45rem; font-size: .8rem; font-weight: 500; color: var(--muted); }
button.icon:hover { color: var(--bad); border-color: var(--bad); }

button.link { border: 0; background: none; color: var(--muted); padding: .35rem .7rem; font-weight: 500; }
button.link:hover { color: var(--accent); background: var(--accent-soft); }
.code-input { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; max-width: 14rem; }
.code-stand { margin: 0; font-weight: 600; color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.narrow { max-width: 30rem; }
.similar { list-style: none; padding: 0; margin: .5rem 0 0; }
.similar li { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-top: 1px solid var(--border); }
.similar li form { margin-left: auto; }
.add-row { display: flex; gap: .6rem; align-items: flex-end; }
.add-row label { flex: 1; margin: 0; }
.add-row.wrap { flex-wrap: wrap; }
.page-head .actions { margin: 0; }
.abstand { margin-top: 1rem; }
.abstand-klein { margin-top: .5rem; }
.ohne-abstand { margin: 0; }
.eng p { margin: .25rem 0; }

.facts { display: grid; grid-template-columns: 11rem 1fr; gap: .5rem 1rem; margin: 0 0 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; word-break: break-word; }
@media (max-width: 34rem) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: .5rem; } }

.runs { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.runs li { padding: .35rem 0; border-top: 1px solid var(--border); }
.alert-list { list-style: none; padding: 0; margin: 0; }
.alert-list li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .5rem 0; border-top: 1px solid var(--border); }
.alert-list li:first-child { border-top: 0; }
.alert-list li > span { flex: 1; min-width: 12rem; }
footer { max-width: 60rem; margin: 0 auto; padding: 0 1rem 2rem; color: var(--muted); font-size: .8rem; }

@media (max-width: 34rem) {
  h1 { font-size: 1.35rem; }
  .theme-toggle { margin-left: auto; }
  .termine li { grid-template-columns: 1fr auto; }
  .termine .source { grid-column: 1 / -1; }
  .termine .offiziell { grid-column: 1 / -1; }
  .termine .when { grid-column: 1 / 2; }
}

/* Startseite */
.hero { display: flex; align-items: center; gap: 2rem; padding: 2rem 0 1.5rem; }
.hero h1 { font-size: 2.3rem; line-height: 1.15; letter-spacing: -.02em; margin-bottom: .75rem; }
.hero .lead { font-size: 1.1rem; max-width: 36rem; }
.hero > .slideshow { width: 25rem; flex-shrink: 0; }
.hero > .slideshow .slides { grid-auto-columns: 100%; }
.hero .annual { margin: .4rem 0 0; max-width: 36rem; font-size: .9rem; color: var(--muted); }
.hero .start-suche { margin: 1.25rem 0 .4rem; max-width: 36rem; }
.hero .start-suche input { font-size: 1.05rem; }
.hero-weiter { margin: 0; font-size: .9rem; color: var(--muted); }
/* Drei kurze Schritte ohne Rahmen, damit die Seite ruhig bleibt */
.steps { display: grid; gap: 1rem 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 1.5rem 0 1rem; }
.step p { color: var(--muted); margin: .25rem 0 0; }
.step .num { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: .4rem; }
@media (max-width: 56rem) {  /* Tickets unter den Text, auf dem Handy schaut die nächste Karte am Rand hervor */
  .hero { flex-direction: column; align-items: stretch; gap: 1.25rem; }
  .hero > .slideshow { width: auto; }
  .hero > .slideshow .slides { grid-auto-columns: min(86%, 25rem); }
}
@media (max-width: 40rem) {
  .hero { padding-top: .5rem; }
  .hero h1 { font-size: 1.8rem; }
}

/* Meine Events: Fußzeile der Karte, Problem melden */
.card-foot { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-top: .75rem; }
.card-foot details { margin: 0; margin-left: auto; }
.card-foot details[open] { flex-basis: 100%; margin-left: 0; }
.card-foot details.teilen { margin-left: 0; }

/* Teilen: Knopf, aufgeklappt Link kopieren und WhatsApp */
details.teilen > summary { list-style: none; }
/* Teilen-Knopf als Symbol (Pfeil aus der Box), so hoch wie die anderen kleinen Knöpfe */
.teilen-knopf { padding: .3rem .55rem; color: var(--text); font-size: .9rem; }
.teilen-knopf svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
  stroke-linejoin: round; }
.teilen-knopf:hover, details.teilen[open] > .teilen-knopf { color: var(--accent); }
details.teilen > summary::-webkit-details-marker { display: none; }
.teilen-wahl { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.vorbei-hinweis { margin: .5rem 0 0; font-size: .92rem; }

/* Verwaltung: Problemfälle */
.problem { padding: .45rem 0; border-top: 1px solid var(--border); font-size: .95rem; }
.problem:first-child { border-top: 0; padding-top: 0; }

/* Statistik */
.bars { width: 100%; border-collapse: collapse; font-size: .92rem; }
.bars th { text-align: left; color: var(--muted); font-weight: 500; padding: 0 .5rem .4rem 0; }
.bars td { padding: .3rem .5rem .3rem 0; border-top: 1px solid var(--border); white-space: nowrap; }
.bars .num { text-align: right; font-variant-numeric: tabular-nums; }
.bars .bar-cell { width: 55%; }
/* Namen (erste Spalte) dürfen umbrechen, sonst ragen lange Event-Namen aus dem Block. */
.bars td:first-child { white-space: normal; overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 40rem) { .bars .bar-cell { width: 35%; } }
/* Statistik: Claude-Anfragen (kosten.py) */
.stat-h { margin: 1.5rem 0 .6rem; text-transform: uppercase; letter-spacing: .02em; font-size: 1.1rem; }
.tabelle-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ki-verlauf { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ki-verlauf th { text-align: left; color: var(--muted); font-weight: 500; padding: 0 .6rem .4rem 0; white-space: nowrap; }
.ki-verlauf td { padding: .3rem .6rem .3rem 0; border-top: 1px solid var(--border); white-space: nowrap; }
.ki-verlauf td:nth-child(3) { white-space: normal; min-width: 9rem; }
.ki-verlauf .num { text-align: right; font-variant-numeric: tabular-nums; }
.bar { display: inline-block; height: .7rem; min-width: 2px; background: var(--accent); border-radius: 4px; vertical-align: middle; }

/* Kategorien, Event-Karten, öffentliche Event-Seite */
.chip { display: inline-block; font-size: .8rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin: -.25rem 0 1rem; }
.filters .chip { line-height: 1.4; }
.filters .chip { background: var(--surface); color: var(--muted); border: 1px solid var(--border); padding: .3rem .8rem; font-size: .9rem; }
.filters .chip.empty { opacity: .5; cursor: default; margin: 0; }
.filters .chip small { font-weight: 500; opacity: .7; margin-left: .2rem; }
.filters .chip:hover, .filters .chip.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); text-decoration: none; }
.filters .chip.empty:hover { background: var(--surface); color: var(--muted); border-color: var(--border); }
.meta { display: flex; gap: .4rem .9rem; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .9rem; margin: .5rem 0 0; }
.event-card { display: block; color: var(--text); }
.slideshow { position: relative; }
.slides { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 1rem; overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain;  /* nur seitlich wischen, senkrecht scrollt die Seite */
  scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 2px 4px; }
.slides::-webkit-scrollbar { display: none; }
.slides .slide { scroll-snap-align: start; }
@media (min-width: 48rem) { .slides { grid-auto-columns: calc((100% - 2rem) / 3); } }
.alle-link { text-align: center; margin: 1rem 0 0; }
.event-card:hover { border-color: var(--accent); text-decoration: none; }
.soon { font-weight: 500; font-size: .85rem; color: var(--accent); white-space: nowrap; }
.event-ticket h1 { font-size: 1.6rem; margin: 0; line-height: 1.15; }
.event-page .folgen { margin: 0; }
.event-page .folgen .badge { white-space: normal; text-align: left; }
.event-page h2 { margin: 1.25rem 0 0; font-size: 1.15rem; }
.event-page .adresse { margin: .4rem 0 0; }
.event-page .adresse a { overflow-wrap: anywhere; }
.event-page .beschreibung { margin: 0 0 1rem; line-height: 1.55; }
/* Karte des Veranstaltungsorts: Kacheln um den Punkt in der Mitte (karte.py) */
.karte { display: block; position: relative; height: 240px; margin: .6rem 0 0; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: #e8e4dc; }
.karte-lage { position: absolute; left: 50%; top: 50%; }
.karte-lage img { position: absolute; width: 256px; height: 256px; max-width: none; }
.karte-pin { position: absolute; left: 50%; top: 50%; width: 30px; height: 40px; transform: translate(-50%, -100%);
  fill: var(--accent); stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.karte-pin circle { fill: #fff; stroke: none; }
.karte-kreis { position: absolute; left: 50%; top: 50%; width: 90px; height: 90px; transform: translate(-50%, -50%); border-radius: 50%;
  border: 3px solid var(--accent); background: rgba(232, 89, 12, .15); }
.karte-quelle { margin: .3rem 0 0; color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .karte-lage { filter: brightness(.8) contrast(1.05); } }
:root[data-theme="dark"] .karte-lage { filter: brightness(.8) contrast(1.05); }
/* Vergangene Termine: ganzes Datum, leicht durchgestrichen */
s.vorbei { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--muted); color: var(--muted); }
.termine li.past .kind, .termine li.past .soon { color: var(--muted); font-weight: 500; }
.t-vorbei .t-tag :is(b, span, small) { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--muted); color: var(--muted); }
a.plain { color: inherit; }
.legal h2 { font-size: 1.05rem; }
.legal p, .legal li { max-width: 46rem; }
footer nav { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
footer nav a { color: var(--muted); }

fieldset.kategorien { border: 1px solid var(--border); border-radius: 10px; padding: .75rem 1rem; margin: 1rem 0 0; }
fieldset.kategorien legend { font-weight: 600; padding: 0 .3rem; }

/* Katalog unter „Meine Events“ */
.btn.small, button.small { padding: .3rem .8rem; font-size: .9rem; }

/* Verwaltung: Suche, Buchstabenleiste und kompakte Zeilen für viele Events */
.admin-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.admin-filter input[type=search] { flex: 1 1 16rem; min-width: 0; }
.admin-filter select { flex: 0 1 auto; width: auto; }
.alphabet { display: flex; flex-wrap: wrap; gap: .2rem; margin-bottom: 1rem; }
.alphabet a, .alphabet span { min-width: 2rem; text-align: center; padding: .25rem .4rem; border-radius: 6px; font-weight: 600; font-size: .9rem; }
.alphabet a { border: 1px solid var(--border); background: var(--surface); text-decoration: none; }
.alphabet a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.alphabet span { color: var(--muted); opacity: .45; border: 1px solid transparent; }
.admin-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1rem; }
.admin-list > .card { margin: 0; border: 0; box-shadow: none; }
.admin-row + .admin-row { border-top: 1px solid var(--border); }
/* feste Spalten, damit alle Zeilen untereinander stehen, egal wie lang Name oder Status sind */
.admin-cols { display: grid; grid-template-columns: 1.2rem minmax(0, 1fr) 7.5rem 10rem 11.5rem 6.5rem; gap: .6rem; align-items: center;
  padding: .55rem 1rem; }
.admin-head { font-size: .75rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  border-bottom: 1px solid var(--border); padding-top: .5rem; padding-bottom: .5rem; }
.admin-row > summary { cursor: pointer; list-style: none; color: inherit; font-size: .9rem; }
.admin-row .ort { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.admin-row .state .badge { white-space: normal; }
.admin-row > summary::-webkit-details-marker { display: none; }
.admin-row > summary:hover { background: var(--accent-soft); }
.admin-row[open] > summary { background: var(--accent-soft); }
.admin-row .name { font-weight: 650; overflow-wrap: anywhere; }
.admin-row .chips { display: flex; flex-wrap: wrap; gap: .25rem; }
.admin-row .next { font-size: .85rem; }
.admin-row .flags { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.admin-detail { padding: .25rem 1rem 1rem; }
.admin-cols input[type=checkbox] { width: 1.05rem; height: 1.05rem; margin: 0; cursor: pointer; }
.sammel { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .6rem; }
.sammel select { width: auto; max-width: 100%; }
/* Haken für Sammelaktionen in Freigabe und Gegenprüfung */
.haken { width: 1.15rem; height: 1.15rem; margin: 0 .5rem 0 0; vertical-align: -.15em; flex: none; accent-color: var(--accent); }
.haken-leiste { padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.haken-leiste .alle { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 600; }
.haken-leiste .alle input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--accent); }
.problems .haken-leiste { margin: .2rem 0 .6rem; }
.card-head .haken { align-self: center; }
.pager { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: center; margin-bottom: 1.5rem; }
.pager a, .pager span { min-width: 2.2rem; text-align: center; padding: .3rem .5rem; border-radius: 6px; border: 1px solid var(--border); }
.pager span.on { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 760px) {
  .admin-cols { grid-template-columns: 1.2rem minmax(0, 1fr) auto; }
  .admin-head > span:not(:first-child), .admin-row .chips { display: none; }
  .admin-row .pick { grid-column: 1; grid-row: 1; }
  .admin-row .kats { grid-column: 2; grid-row: 3; }
  .admin-row .next { grid-column: 2; grid-row: 2; }
  .admin-row .state { grid-column: 3; grid-row: 1; justify-self: end; }
  .admin-row .flags { grid-column: 3; grid-row: 2; }
}

/* Anmeldelink aus der Mail: die Adresse groß zeigen */
.login-as { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.25rem; border-radius: var(--radius);
  background: var(--accent-soft); margin: 0 0 .5rem; }
.login-as strong { font-size: 1.35rem; overflow-wrap: anywhere; }
button.big { font-size: 1.05rem; padding: .75rem 1.5rem; }

/* Meine Events: Suche als Filter und Herz zum Folgen */
[hidden] { display: none !important; }
/* Suche und Filter: Suchfeld und Knopf „Filter“ in einer Zeile, die Filter klappen darunter auf.
   Zugeklappt bleibt die Zeile beim Scrollen oben stehen; der Filter-Knopf sitzt rechts in der Suchzeile. */
.katalog-suche { --filter-w: 6.6rem; --zeile-h: 2.75rem; position: sticky; top: 3.6rem; z-index: 5; background: var(--bg);
  padding: .5rem 0; margin-bottom: .75rem; }
.katalog-suche:has(> details[open]) { position: relative; top: 0; }
/* Startseite: nur das Suchfeld, ohne Filter-Knopf daneben; führt zu „Alle Events“ */
.start-suche { position: static; background: none; }
.start-suche .such-zeile { margin-right: 0; }
.such-zeile { display: flex; gap: .5rem; margin-right: calc(var(--filter-w) + .5rem); }
.such-zeile input[type=search] { flex: 1; min-width: 0; margin: 0; height: var(--zeile-h); font-size: 1.05rem; }
.such-zeile button { height: var(--zeile-h); flex: none; }
.leeren-feld { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.leeren-feld > input { flex: 1; width: 100%; min-width: 0; padding-right: 2.4rem; }
.leeren-feld > button.leeren { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); width: 2rem; height: 2rem;
  padding: 0; margin: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; }
.leeren-feld > button.leeren[hidden] { display: none; }
.leeren-feld > button.leeren:hover { color: var(--text); background: var(--border); }
.leeren-feld > button.leeren svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.katalog-suche details.filter-box { margin: 0; }
.sortier-zeile { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; overflow-x: auto; white-space: nowrap;
  scrollbar-width: none; font-size: .9rem; }
.sortier-zeile::-webkit-scrollbar { display: none; }
/* Sortieren als Reiter wie der Kopf eines Fahrplans: eine Leiste, Trenner wie die Perforation am Ticket */
.sortier-reiter { display: inline-flex; flex: none; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.sortier-zeile .chip { flex: none; margin: 0; background: none; color: var(--muted); border: 0; border-left: 1px dashed var(--border);
  border-radius: 0; padding: .3rem .75rem; font: 600 .9rem/1.2 "Barlow Condensed", system-ui, sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.sortier-reiter .chip:first-child { border-left: 0; }
.sortier-zeile .chip:hover { color: var(--accent); text-decoration: none; }
.sortier-zeile .chip.active { background: var(--text); color: var(--surface); }
.filter-knopf { position: absolute; top: .5rem; right: 0; width: var(--filter-w); height: var(--zeile-h); justify-content: center;
  list-style: none; color: var(--text); font-size: 1rem; }
.filter-knopf::-webkit-details-marker { display: none; }
.filter-knopf svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
details.filter-box[open] > .filter-knopf { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.filter-zahl { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding: 0 .3rem; border-radius: 999px;
  background: var(--surface); color: var(--accent); font-size: .75rem; font-weight: 700; font-weight: 700; line-height: 1; }
.filter-panel { margin-top: .75rem; padding: .9rem 1rem .25rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); }
.filter-panel .catalog-tools select, .filter-panel .catalog-tools input { background: var(--bg); box-shadow: none; }
.filter-panel .filters { margin: .25rem 0 .75rem; }
.such-knopf svg { display: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
/* Filterfelder: alle gleich hoch, damit Beschriftungen und Felder auf einer Linie stehen */
.filter-panel .catalog-tools select, .filter-panel .catalog-tools input { height: 2.4rem; margin-top: .15rem; padding-top: 0; padding-bottom: 0; }
@media (max-width: 34rem) {
  /* Handy: „Suchen“ nur als Lupe, damit das Suchfeld breit genug bleibt */
  .such-knopf { width: var(--zeile-h); padding: 0; justify-content: center; }
  .such-knopf svg { display: block; }
  .such-knopf span:not(.spinner) { display: none; }
  .filter-knopf { padding: 0 .5rem; }
}

/* Umschalter „Meine Events | Alle Events | Neues Event“ */
.umschalter { display: inline-flex; padding: .2rem; margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow); }
.umschalter a { padding: .45rem 1rem; border-radius: 8px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.umschalter a:hover { color: var(--accent); text-decoration: none; }
.umschalter a[aria-current="page"] { background: var(--accent); color: #fff; }
.topbar .umschalter { margin: 0; box-shadow: none; background: var(--top-switch); border-color: var(--top-switch-line); --muted: var(--menu-muted); }
.topbar .umschalter a { padding: .35rem .8rem; }
.events-kopf { align-items: center; margin-bottom: .5rem; }
.events-kopf h1 { margin: 0; }
@media (max-width: 48rem) {
  .topbar .umschalter { order: 5; width: 100%; }
}
@media (max-width: 34rem) {
  .umschalter { display: flex; }
  .umschalter a { flex: 1 1 0; min-width: 0; padding: .45rem .3rem; text-align: center; }
}
@media (max-width: 26rem) {
  .umschalter .lang { display: none; }  /* „Meine | Alle | Neu“ auf schmalen Handys */
}

/* Suche in „Meine Events“: Treffer aus allen Events, denen man noch nicht folgt */
.such-hilfe > * { margin: 0; }
.such-hilfe > * + * { margin-top: .75rem; }
.such-hilfe h3 { font-size: 1rem; }
.such-hilfe h3 .muted { font-weight: 400; font-size: .9rem; }
.treffer-liste { list-style: none; padding: 0; margin: .4rem 0 0; }
.treffer-liste li { display: flex; align-items: center; gap: .3rem .6rem; flex-wrap: wrap; padding: .35rem 0;
  border-top: 1px solid var(--border); }
.treffer-liste li a.plain { font-weight: 600; }
.mehr-link { margin: .5rem 0 0; }
.such-hilfe form.inline { display: block; margin-top: .5rem; }
.no-result { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.no-result p { margin: 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.heart-form { margin-left: auto; }
.heart { background: none; border: 0; padding: .25rem; cursor: pointer; line-height: 0; color: var(--muted); border-radius: 50%; }
.heart svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .12s; }
.heart:hover { color: var(--accent); background: var(--accent-soft); }
.heart:hover svg { transform: scale(1.1); }
.heart.on { color: var(--accent); }
.heart.on svg { fill: currentColor; }
/* Antippen: das Herz klingelt kurz wie ein Wecker (base.html schickt das Formular danach ab) */
.heart.klingelt svg { animation: klingeln .45s ease-in-out; transform-origin: 50% 20%; }
@keyframes klingeln {
  0% { transform: scale(1) rotate(0); } 15% { transform: scale(1.25) rotate(-16deg); } 30% { transform: scale(1.25) rotate(14deg); }
  45% { transform: scale(1.2) rotate(-10deg); } 60% { transform: scale(1.15) rotate(7deg); } 80% { transform: scale(1.05) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) { .heart.klingelt svg { animation: none; } }
.ticket .card-head { flex-wrap: nowrap; align-items: flex-start; }
.ticket .card-head h3 { flex: 1; min-width: 0; }
.heart-form, .heart { flex-shrink: 0; }
.ticket .heart { margin: -.3rem -.3rem 0 0; }

/* Filter über den Events */
.catalog-tools { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: flex-end; margin: 0 0 .75rem; }
.catalog-tools label { display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; color: var(--muted); }
.catalog-tools select { width: auto; max-width: 14rem; }
/* Filter- und Suchleisten stehen auf dem Seitenhintergrund: Felder darin so hell (dunkel) wie die Event-Kacheln */
.catalog-tools select, .catalog-tools input, .admin-filter select, .admin-filter input, .such-zeile input[type=search] {
  background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow); }
.catalog-tools label { color: var(--text); font-weight: 600; }
@media (max-width: 40rem) {
  .catalog-tools label { flex: 1 1 45%; }
  .catalog-tools select { max-width: none; width: 100%; }
}

/* Gegenprüfung durch Claude: gezeigt gegen gelesen */
.review-diff { display: grid; grid-template-columns: 9rem 1fr; gap: .25rem .75rem; margin: .6rem 0 0; }
.review-diff dt { color: var(--muted); font-size: .9rem; }
.review-diff dd { margin: 0; }
@media (max-width: 560px) { .review-diff { grid-template-columns: 1fr; } .review-diff dd { margin-bottom: .4rem; } }

/* Häufige Fragen */
.faq-hint { margin: 0 0 1.5rem; color: var(--muted); }
.faq-item { border-top: 1px solid var(--border); padding: .75rem 0; margin: 0; }
.faq-item:last-of-type { border-bottom: 1px solid var(--border); }
.faq-item > summary { color: var(--text); font-size: 1rem; font-weight: 600; }
.faq-item p { margin: .5rem 0 0; }

/* Meine Events: Knöpfe im Kopf, eigene Wecker */
.head-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.wecker-list { list-style: none; padding: 0; margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.wecker-list li { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600;
  padding: .15rem .25rem .15rem .6rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.wecker-list button.icon { border: 0; background: none; padding: .1rem .35rem; }
.wecker-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.wecker-form select { width: auto; margin: 0; flex: 0 1 auto; max-width: 100%; }
.event-page .wecker-add { margin-top: 1rem; }
.event-fragen h3 { font-size: 1rem; margin: .9rem 0 .2rem; }
.event-fragen p { margin: 0; }
.mitnehmen { margin-top: .9rem; padding: .75rem 1rem; border-radius: var(--radius); background: var(--accent-soft, var(--bg)); border: 1px solid var(--border); }
.mitnehmen p { margin: 0 0 .5rem; }
.mitnehmen .teilen-knopf.primary, .mitnehmen details.teilen[open] > .teilen-knopf.primary { display: inline-flex; align-items: center; gap: .4rem; color: #fff; }

/* Mein Eventjahr: Zeitleiste nach Monaten */
.tl-month { margin: 1.5rem 0 .6rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 3.6rem 1fr auto; gap: .25rem .9rem; align-items: center; padding: .6rem 0;
  border-top: 1px solid var(--border); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline li:last-child { padding-bottom: 0; }
/* Datum wie der Abriss der Tickets: große Zahl, Wochentag in Farbe, gestrichelte Linie */
.tl-date { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; padding: .2rem 0;
  border-right: 2px dashed var(--border); color: var(--accent); font-variant-numeric: tabular-nums; }
.tl-date strong { font: 700 1.9rem/1 "Barlow Condensed", system-ui, sans-serif; color: var(--text); }
.tl-date small { color: inherit; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-top: .15rem; }
.tl-start .tl-date { color: var(--ok); }
.tl-schluss .tl-date { color: var(--bad); }
.tl-body { min-width: 0; }
.tl-event { display: block; font-weight: 650; color: var(--text); overflow-wrap: anywhere; }
.tl-kind { font-weight: 600; font-size: .9rem; }
.tl-when { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.tl-body .konflikt { display: block; margin: .15rem 0 0; }
.timeline .soon { color: var(--muted); font-size: .85rem; white-space: nowrap; }
@media (max-width: 34rem) {
  .timeline li { grid-template-columns: 2.8rem 1fr; }
  .timeline .soon { grid-column: 2 / 3; }
}

/* Unterevents: aufklappbare Liste in der Karte ihres Events (Kölner Karneval → Rosenmontagszug) */
details.unterevents { margin: .75rem 0 0; padding-top: .5rem; border-top: 1px solid var(--border); }
details.unterevents > summary { font-weight: 600; color: var(--accent); }
.unterevents ul { list-style: none; margin: .4rem 0 0; padding: 0; }
.unterevents li { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; padding: .35rem 0;
  border-top: 1px dashed var(--border); font-size: .92rem; }
.unterevents li:first-child { border-top: 0; }
.unterevents .name { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.unterevents .when { color: var(--muted); font-variant-numeric: tabular-nums; }
.unterevents .heart svg { width: 20px; height: 20px; }
/* Stand wie auf den Tickets: Punkt und Text, keine farbige Pille */
.stand { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.stand.open { color: var(--ok); } .stand.sold, .stand.cancelled { color: var(--bad); }
.unterevents .via { margin-left: auto; color: var(--muted); font-size: .82rem; }
.teil-von { margin: .3rem 0 0; font-size: .9rem; color: var(--muted); }
/* Verwaltung: Unterevents eines Events, Vorschläge aus dem Prüflauf */
.unterevent-list, .kandidaten { list-style: none; padding: 0; margin: .5rem 0 0; }
.unterevent-list li, .kandidaten li { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; padding: .35rem 0;
  border-top: 1px solid var(--border); font-size: .92rem; }
.unterevent-list li:first-child, .kandidaten li:first-child { border-top: 0; }
.kandidaten li > span { flex: 1; min-width: 12rem; }

/* Öffentliche Übersichten (nach Kategorie und Jahr) */
.ueb-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin: -.25rem 0 1rem; }
.ueb-nav .chip { background: var(--surface); color: var(--muted); border: 1px solid var(--border); padding: .3rem .8rem; font-size: .9rem; text-decoration: none; }
.ueb-nav .chip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.ueb-list { list-style: none; padding: 0; margin: 0; }
.ueb-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .75rem; padding: .6rem 0; border-top: 1px solid var(--border); }
.ueb-list li:first-child { border-top: 0; }
.ueb-name { font-weight: 650; overflow-wrap: anywhere; }
.ueb-when { color: var(--muted); font-size: .9rem; flex: 1 1 12rem; font-variant-numeric: tabular-nums; }
/* A–Z-Leiste über den Events: auf dem Handy eine Zeile zum Wischen statt drei Zeilen */
.katalog-az { margin: .25rem 0 1rem; }
@media (max-width: 640px) {
  .katalog-az { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: .2rem; }
  .katalog-az::-webkit-scrollbar { display: none; }
  .katalog-az a, .katalog-az span { flex: 0 0 auto; }
}

/* Knopf nach dem Abschicken: gesperrt, mit drehendem Kreis („Wird gesendet …“) */
button.laeuft { cursor: progress; opacity: .85; }
.hinweis-laeuft { margin: .6rem 0 0; font-size: .9rem; color: var(--muted); }
.spinner { display: inline-block; width: .9em; height: .9em; margin-right: .45em; vertical-align: -.12em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: dreht .7s linear infinite; }
@keyframes dreht { to { transform: rotate(360deg); } }
button.laeuft .spinner:only-child { margin-right: 0; }
/* Balken oben, solange eine neue Seite lädt */
.ladebalken { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; overflow: hidden; pointer-events: none; }
.ladebalken::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: var(--top-load);
  border-radius: 0 3px 3px 0; animation: laedt 1.1s ease-in-out infinite; }
@keyframes laedt { to { left: 100%; } }
html.laedt, html.laedt * { cursor: progress; }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } .ladebalken::before { animation-duration: 3s; } }

/* Handy und Tablet: Knöpfe groß genug für den Daumen (etwa 44 Pixel) */
@media (pointer: coarse) {
  .theme-toggle, .user-menu > summary, .menu-toggle { width: 44px; height: 44px; }
  .menu-toggle { justify-content: center; padding: 0; }
  .heart { padding: .55rem; }
  .ticket .heart { margin: -.55rem -.55rem 0 0; }
}

/* Events als Ticket („Meine Events“, „Alle Events“, Startseite): links Name, Countdown und Stufen, rechts der Abriss
   mit dem Datum, unten immer dieselben drei Knöpfe. Ansicht über :root[data-ansicht]: liste, kacheln (nur am PC), groß. */
.kat-blau { --kat: #1c7ed6; --kat-soft: #e7f1fd; }
.kat-tuerkis { --kat: #0c8599; --kat-soft: #e3f6f8; }
.kat-lila { --kat: #7048e8; --kat-soft: #f0ebff; }
.kat-pink { --kat: #c2255c; --kat-soft: #ffe8f0; }
.kat-gruen { --kat: #2b8a3e; --kat-soft: #e6f6ea; }
.kat-gelb { --kat: #a06e00; --kat-soft: #fff6dc; }
.kat-braun { --kat: #9c5b2e; --kat-soft: #f8ece3; }
.kat-grau { --kat: var(--muted); --kat-soft: var(--bg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kat-blau { --kat: #74c0fc; --kat-soft: #1b2a3c; }
  :root:not([data-theme="light"]) .kat-tuerkis { --kat: #66d9e8; --kat-soft: #16313a; }
  :root:not([data-theme="light"]) .kat-lila { --kat: #b197fc; --kat-soft: #2a2140; }
  :root:not([data-theme="light"]) .kat-pink { --kat: #f783ac; --kat-soft: #3a1e2a; }
  :root:not([data-theme="light"]) .kat-gruen { --kat: #69db7c; --kat-soft: #1d3324; }
  :root:not([data-theme="light"]) .kat-gelb { --kat: #ffd43b; --kat-soft: #3a3115; }
  :root:not([data-theme="light"]) .kat-braun { --kat: #e8a87c; --kat-soft: #3a281c; }
}
:root[data-theme="dark"] .kat-blau { --kat: #74c0fc; --kat-soft: #1b2a3c; }
:root[data-theme="dark"] .kat-tuerkis { --kat: #66d9e8; --kat-soft: #16313a; }
:root[data-theme="dark"] .kat-lila { --kat: #b197fc; --kat-soft: #2a2140; }
:root[data-theme="dark"] .kat-pink { --kat: #f783ac; --kat-soft: #3a1e2a; }
:root[data-theme="dark"] .kat-gruen { --kat: #69db7c; --kat-soft: #1d3324; }
:root[data-theme="dark"] .kat-gelb { --kat: #ffd43b; --kat-soft: #3a3115; }
:root[data-theme="dark"] .kat-braun { --kat: #e8a87c; --kat-soft: #3a281c; }
/* Kategorie wie die Klasse auf einem Ticket: gedruckt statt bunter Pille, das kleine Symbol in der Farbe der Kategorie
   (Daniel 12.11.2026). Der Streifen oben am Ticket trägt dieselbe Farbe. */
.chip.kat { display: inline-flex; align-items: center; gap: .3rem; background: none; color: var(--text); border-radius: 0;
  padding: 0; font: 600 .82rem/1.25 "Barlow Condensed", system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.chip.kat svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--kat); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ticket { display: grid; grid-template-columns: minmax(0, 1fr) 4.6rem; grid-template-rows: 1fr auto; padding: 0;
  margin: 0 0 1rem; color: var(--text); position: relative; }
/* Fahrkarte (Daniel 18.11.2026): eckig mit abgeschrägten Ecken und einem dünnen Rahmen innen in der Farbe der Kategorie,
   damit Tickets nach Tickets aussehen und sich von den runden Karten (Hinweise, Event-Infos) abheben */
.ticket { --fase: 14px; border: 0; border-radius: 0; box-shadow: none; outline: 1.5px solid var(--kat, var(--border)); outline-offset: -6px;
  clip-path: polygon(var(--fase) 0, calc(100% - var(--fase)) 0, 100% var(--fase), 100% calc(100% - var(--fase)),
    calc(100% - var(--fase)) 100%, var(--fase) 100%, 0 calc(100% - var(--fase)), 0 var(--fase)); }
.ticket .t-foot > .btn, .ticket .t-foot .teilen-knopf { border-radius: 2px; }
a.ticket:hover { text-decoration: none; outline-color: var(--accent); }
.t-main { min-width: 0; padding: 1rem 1.1rem 1rem 1.25rem; }
.ticket .meta { flex-wrap: wrap; }
.t-details { overflow-wrap: anywhere; }
/* Beliebtheit (beliebt.py): nur „★ Top 5“ oder „▲ Im Trend“, ohne Anzahl, ruhig wie der Stand (Punkt + Text statt Plakette) */
.t-beliebt { font-weight: 700; font-size: .9rem; color: var(--ok); white-space: nowrap; }
.t-beliebt.top { color: var(--accent); }
.t-count { display: flex; align-items: center; gap: .7rem; margin: .8rem 0 .2rem; min-height: 2.6rem; }
.t-tafel { display: flex; gap: 3px; }
.t-tafel span { font: 700 2.1rem/1 "Barlow Condensed", system-ui, sans-serif; color: #ffb84d; background: #16191d;
  border-radius: 2px; padding: .3rem .45rem .25rem; min-width: 1.75rem; text-align: center; position: relative;
  box-shadow: inset 0 -1.05rem 0 rgba(255,255,255,.04), inset 0 0 0 1px rgba(255,255,255,.06); font-variant-numeric: tabular-nums; }
.t-tafel span::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.55); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .t-tafel span { background: #050607; box-shadow: inset 0 0 0 1px #3a414a; } }
:root[data-theme="dark"] .t-tafel span { background: #050607; box-shadow: inset 0 0 0 1px #3a414a; }
.t-count-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.t-count-text b { font: 700 1.2rem/1 "Barlow Condensed", system-ui, sans-serif; text-transform: uppercase; }
.t-count-text span { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.t-zeit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; list-style: none; padding: 0; margin: .8rem 0 0; }
.t-zeit li { font: 600 .8rem/1.2 "Barlow Condensed", system-ui, sans-serif; color: var(--muted); padding-top: .35rem;
  border-top: 4px solid var(--border); white-space: nowrap; overflow: hidden; }
.t-zeit li.fertig { border-top-color: var(--accent); color: var(--text); }
.t-zeit li.jetzt { border-top-color: var(--accent); color: var(--accent); }
.t-zeit li.jetzt.aus { border-top-color: var(--bad); color: var(--bad); }
/* Schmale Handys: Stufen etwas kleiner, damit „Angekündigt“ und „Ausgebucht“ ganz passen */
@media (max-width: 24rem) { .t-zeit { gap: 4px; } .t-zeit li { font-size: .7rem; letter-spacing: -.01em; } }
.t-frei { margin: .8rem 0 0; font-size: .85rem; color: var(--ok); font-weight: 600; }
.t-main > .konflikt, .t-main > details.unterevents { margin: .6rem 0 0; }

/* Abriss: gestrichelte Linie mit zwei Halbkreisen, Datum in Kategoriefarbe */
.t-stub { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: .9rem 0; text-align: center; line-height: 1;
  background: repeating-linear-gradient(to bottom, var(--border) 0 6px, transparent 6px 11px) left top / 2px 100% no-repeat; }
.t-stub::before, .t-stub::after { content: ""; position: absolute; left: -.7rem; width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border); }
.t-stub::before { top: -.75rem; clip-path: inset(50% 0 0 0); }
.t-stub::after { bottom: -.75rem; clip-path: inset(0 0 50% 0); }
.t-tag { display: flex; flex-direction: column; align-items: center; }
.t-tag b { font: 700 2.1rem/1 "Barlow Condensed", system-ui, sans-serif; }
.t-tag span { text-transform: uppercase; font-weight: 700; color: var(--kat, var(--accent)); margin-top: .2rem; letter-spacing: .06em; }
.t-tag small { color: var(--muted); margin-top: .25rem; font-size: .75rem; }
.t-offen b, .t-offen span { color: var(--muted); }
.t-bis { font-style: normal; font-size: .75rem; color: var(--muted); margin: .45rem 0 .35rem; }
.t-stub > .t-bis:first-child { margin-top: 0; }

/* Knöpfe: für jeden Stand gleich, nur Punkt und Text zeigen ihn */
.card-foot.t-foot { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 2.75rem;
  gap: .5rem; align-items: start; margin: 0; padding: .7rem 1.25rem .8rem; border-top: 2px dashed var(--border); }
.t-foot > .btn, .t-foot .teilen-knopf { display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  height: 2.75rem; margin: 0; padding: 0 .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: none; font-weight: 600; }
.t-foot > .btn.zu { color: var(--muted); cursor: default; }
.t-foot > .btn.zu:hover { border-color: var(--border); background: var(--surface); }
.t-foot .t-web svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.t-foot details.teilen { margin: 0; }
.t-foot details.teilen .teilen-knopf { width: 2.75rem; padding: 0; }
.t-foot details.teilen[open] { grid-column: 1 / -1; grid-row: 2; }
.t-foot details.teilen[open] > .teilen-knopf { position: absolute; visibility: hidden; }
.t-punkt { width: .55rem; height: .55rem; border-radius: 50%; background: var(--border); flex: none; }
.t-punkt.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.t-punkt.aus { background: var(--bad); }
@media (min-width: 700px) { .card-foot.t-foot { grid-template-columns: 13rem 10rem 2.75rem 1fr; } }

/* Startseite: Tickets im Karussell ohne Knöpfe */
.slides .ticket { margin: 0; }

/* Kopf: Umschalter Liste / kleine Kacheln / große Tickets */
.ansicht-wahl { display: inline-flex; height: 2.5rem; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.ansicht-wahl button { width: 2.75rem; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.ansicht-wahl button + button { border-left: 1px solid var(--border); }
.ansicht-wahl button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.ansicht-wahl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.events-kopf { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem 1rem; }
.events-kopf .head-links { grid-column: 2; grid-row: 1; justify-self: end; }
.events-kopf .ansicht-wahl { grid-column: 3; grid-row: 1; }
@media (max-width: 699px) {
  .events-kopf { grid-template-columns: 1fr auto; }
  .events-kopf .ansicht-wahl { grid-column: 2; }
  .events-kopf .head-links { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  .events-kopf .head-links .btn { height: 2.75rem; margin: 0; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
  .ansicht-wahl [data-ansicht="kacheln"] { display: none; }
  :root[data-ansicht="kacheln"] .ansicht-wahl [data-ansicht="gross"] { background: var(--accent); color: #fff; }
}

/* Kleine Kacheln (nur am PC, am Handy wie groß) */
:is(#meine-liste, .catalog) > :not(.ticket) { grid-column: 1 / -1; }
@media (min-width: 700px) {
  :root[data-ansicht="kacheln"] :is(#meine-liste, .catalog) { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
  :root[data-ansicht="kacheln"] .ticket { margin: 0; grid-template-columns: minmax(0, 1fr) 3.4rem; }
  :root[data-ansicht="kacheln"] .t-main { padding: .9rem .85rem .85rem; }
  :root[data-ansicht="kacheln"] .ticket h3 { font-size: 1.15rem; }
  :root[data-ansicht="kacheln"] .t-tafel span { font-size: 1.6rem; min-width: 1.4rem; padding: .25rem .35rem .2rem; }
  :root[data-ansicht="kacheln"] .t-tag b { font-size: 1.7rem; }
  :root[data-ansicht="kacheln"] .t-tag small { font-size: .7rem; }
  :root[data-ansicht="kacheln"] .t-zeit { gap: 3px; }
  :root[data-ansicht="kacheln"] .t-zeit li { font-size: .72rem; overflow: visible; }
  :root[data-ansicht="kacheln"] .t-zeit li:last-child { text-align: right; }
  :root[data-ansicht="kacheln"] .t-details { display: none; }
  :root[data-ansicht="kacheln"] .card-foot.t-foot { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 2.75rem; padding: .6rem .85rem .7rem; }
  :root[data-ansicht="kacheln"] .t-foot > .btn { font-size: .85rem; padding: 0 .4rem; }
}

/* Liste: eine Zeile je Event */
:root[data-ansicht="liste"] .ticket { margin-bottom: .5rem; align-items: center; }
:root[data-ansicht="liste"] .t-stub { background: none; padding: 0; flex-direction: row; align-items: baseline; gap: .3rem; justify-content: flex-start; }
:root[data-ansicht="liste"] .t-stub::before, :root[data-ansicht="liste"] .t-stub::after { display: none; }
:root[data-ansicht="liste"] .t-tag { flex-direction: row; align-items: baseline; gap: .25rem; }
:root[data-ansicht="liste"] .t-tag b { font-size: 1.2rem; }
:root[data-ansicht="liste"] .t-tag span { font-size: .8rem; }
:root[data-ansicht="liste"] .t-tag small, :root[data-ansicht="liste"] .t-stub > .t-bis:first-child { display: none; }
:root[data-ansicht="liste"] .t-bis { margin: 0; }
:root[data-ansicht="liste"] .t-count { margin: 0; min-height: 0; gap: .45rem; }
:root[data-ansicht="liste"] .t-count-text span { display: none; }
:root[data-ansicht="liste"] .t-count-text b { font-size: .8rem; }
:root[data-ansicht="liste"] .t-tafel { gap: 2px; }
:root[data-ansicht="liste"] .t-tafel span { font-size: 1.05rem; min-width: 1.1rem; padding: .2rem .25rem .15rem; border-radius: 2px; }
:root[data-ansicht="liste"] .card-foot.t-foot { border: 0; }
:root[data-ansicht="liste"] .ticket .meta { margin-top: .15rem; }
:root[data-ansicht="liste"] .ticket h3 { font-size: 1.1rem; }
:root[data-ansicht="liste"] .t-details { display: none; }
@media (min-width: 700px) {
  :root[data-ansicht="liste"] .ticket { grid-template-columns: minmax(0, 1fr) 5.4rem 12.5rem; grid-template-rows: auto; padding: .7rem 1rem; gap: 1rem; }
  :root[data-ansicht="liste"] .t-main { display: grid; grid-template-columns: minmax(0, 1fr) 6.3rem 15.5rem; column-gap: 1.25rem; align-items: center; padding: 0;
    grid-template-areas: "head count zeit" "meta count zeit" "extra extra extra"; }
  :root[data-ansicht="liste"] .t-main > .card-head { grid-area: head; flex-wrap: nowrap; }
  :root[data-ansicht="liste"] .t-main > .card-head h3 { flex: 1; }
  :root[data-ansicht="liste"] .t-main > .meta { grid-area: meta; }
  :root[data-ansicht="liste"] .t-stub { flex-direction: column; align-items: flex-start; gap: .15rem; }
  :root[data-ansicht="liste"] .t-stub .t-bis { display: none; }
  :root[data-ansicht="liste"] .t-main > .t-count { grid-area: count; }
  :root[data-ansicht="liste"] .t-main > .t-zeit, :root[data-ansicht="liste"] .t-main > .t-frei { grid-area: zeit; margin: 0; }
  :root[data-ansicht="liste"] .t-main > .teil-von, :root[data-ansicht="liste"] .t-main > .konflikt,
  :root[data-ansicht="liste"] .t-main > details.unterevents { grid-column: 1 / -1; }
  :root[data-ansicht="liste"] .card-foot.t-foot { grid-column: auto; grid-row: auto; padding: 0; grid-template-columns: minmax(0, 1fr) 2.5rem 2.5rem; gap: .4rem; }
  :root[data-ansicht="liste"] .t-foot > .btn, :root[data-ansicht="liste"] .t-foot .teilen-knopf { height: 2.5rem; font-size: .82rem; padding: 0 .4rem; }
  :root[data-ansicht="liste"] .t-foot .t-web { width: 2.5rem; padding: 0; }
  :root[data-ansicht="liste"] .t-foot .t-web span { display: none; }
  :root[data-ansicht="liste"] .t-foot details.teilen .teilen-knopf { width: 2.5rem; }
  :root[data-ansicht="liste"] .t-foot details.teilen[open] { grid-column: auto; grid-row: auto; }
}
/* Liste am Handy: festes Raster in den Spalten der Knöpfe darunter, damit alles in jeder Karte an derselben Stelle steht.
   Zeile 1 Name mit Herz ganz rechts; darunter links Kategorie und Stand (über dem ersten Knopf), in der Mitte Ort und
   Countdown (bündig mit „Website“), rechts das Datum rechtsbündig untereinander. */
@media (max-width: 699px) {
  :root[data-ansicht="liste"] .ticket { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 2.75rem; grid-template-rows: none;
    padding: .75rem .9rem .8rem; column-gap: .5rem; align-items: center; }
  :root[data-ansicht="liste"] .t-main { display: contents; }
  :root[data-ansicht="liste"] .t-main > * { grid-column: 1 / -1; }
  :root[data-ansicht="liste"] .t-main > .card-head { grid-row: 1; margin: 0; align-items: center; }
  :root[data-ansicht="liste"] .t-main > .teil-von { grid-row: 2; margin: .1rem 0 0; }
  :root[data-ansicht="liste"] .t-main > .meta { display: contents; }
  :root[data-ansicht="liste"] .meta > .chip { grid-column: 1; grid-row: 3; justify-self: start; max-width: 100%; margin-top: .45rem; }
  :root[data-ansicht="liste"] .meta > .chip ~ .chip, :root[data-ansicht="liste"] .meta > .t-details { display: none; }
  :root[data-ansicht="liste"] .meta > .t-beliebt { grid-column: 1 / -1; grid-row: 2; justify-self: end; font-size: .8rem; margin-top: .1rem; }
  :root[data-ansicht="liste"] .meta > .t-ort { grid-column: 2 / -1; grid-row: 3; justify-self: start; margin-top: .45rem; max-width: calc(100% - 4rem);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: .9rem; }
  :root[data-ansicht="liste"] .t-main > .t-zeit { grid-column: 1; grid-row: 4; display: block; margin: .45rem 0 0; }
  :root[data-ansicht="liste"] .t-zeit li { display: none; border: 0; padding: 0; font-size: .9rem; font-weight: 700; }
  :root[data-ansicht="liste"] .t-zeit li.jetzt { display: block; }
  :root[data-ansicht="liste"] .t-main > .t-frei { display: none; }  /* steht schon im Knopf „Eintritt frei“ */
  :root[data-ansicht="liste"] .t-main > .t-count { grid-column: 2; grid-row: 4; margin: .45rem 0 0; }
  :root[data-ansicht="liste"] .t-main > .konflikt, :root[data-ansicht="liste"] .t-main > details.unterevents { grid-row: 5; }
  :root[data-ansicht="liste"] .t-tafel span { font-size: .95rem; min-width: 1rem; }
  :root[data-ansicht="liste"] .t-stub { grid-column: 2 / -1; grid-row: 3 / 5; justify-self: end; flex-direction: column; align-items: flex-end;
    justify-content: center; gap: .15rem; align-self: stretch; margin: .45rem 0 0; }
  :root[data-ansicht="liste"] .t-stub .t-bis { display: none; }
  :root[data-ansicht="liste"] .t-tag b { font-variant-numeric: tabular-nums; }
  :root[data-ansicht="liste"] .t-tag span { width: 2.1em; text-align: left; }
  :root[data-ansicht="liste"] .card-foot.t-foot { grid-column: 1 / -1; grid-row: 6; padding: .65rem 0 0; }
  :root[data-ansicht="liste"] .t-foot > .btn, :root[data-ansicht="liste"] .t-foot .teilen-knopf { height: 2.4rem; font-size: .85rem; }
}

/* Große Tickets am PC: rechts neben Kategorie/Ort stehen Countdown und Stufen, damit keine leere Fläche bleibt */
@media (min-width: 700px) {
  :root:not([data-ansicht="liste"]):not([data-ansicht="kacheln"]) .ticket:not(.slides .ticket) .t-main {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 22rem); column-gap: 2rem; align-items: center; }
  :root:not([data-ansicht="liste"]):not([data-ansicht="kacheln"]) .ticket:not(.slides .ticket) .t-main > * { grid-column: 1 / -1; }
  :root:not([data-ansicht="liste"]):not([data-ansicht="kacheln"]) .ticket:not(.slides .ticket) .t-main > .card-head { grid-row: 1; }
  :root:not([data-ansicht="liste"]):not([data-ansicht="kacheln"]) .ticket:not(.slides .ticket) .t-main > .teil-von { grid-row: 2; }
  :root:not([data-ansicht="liste"]):not([data-ansicht="kacheln"]) .ticket:not(.slides .ticket) .t-main > .meta { grid-column: 1; grid-row: 3 / 5; align-self: center; margin: .6rem 0 0; }
  :root:not([data-ansicht="liste"]):not([data-ansicht="kacheln"]) .ticket:not(.slides .ticket) .t-main > .t-count { grid-column: 2; grid-row: 3; margin: .6rem 0 0; }
  :root:not([data-ansicht="liste"]):not([data-ansicht="kacheln"]) .ticket:not(.slides .ticket) .t-main > :is(.t-zeit, .t-frei) { grid-column: 2; grid-row: 4; margin: .6rem 0 0; }
  :root:not([data-ansicht="liste"]):not([data-ansicht="kacheln"]) .ticket:not(.slides .ticket) .t-main > .konflikt { grid-row: 5; }
  :root:not([data-ansicht="liste"]):not([data-ansicht="kacheln"]) .ticket:not(.slides .ticket) .t-main > details.unterevents { grid-row: 6; }
}

/* Lange Namen: immer ganz zu lesen (Daniel), das Ticket wird dann höher. Trennung nur bei sehr langen Wörtern. */
.ticket .card-head h3 { white-space: normal; line-height: 1.15; overflow-wrap: break-word; hyphens: auto; }

/* Event-Seite: „Stimmt hier etwas nicht?“ klein und grau ganz unten */
details.melden { margin: 1rem 0 0; }
.unterevent-wahl { margin: .8rem 0 0; }
.unterevent-wahl .wahl-stand { margin: 0; font-size: .9rem; }
.unterevent-wahl .gespeichert { color: var(--accent); font-weight: 600; }
details.unterevents input.wahl { width: 1.1rem; height: 1.1rem; margin: 0 .5rem 0 0; vertical-align: middle; cursor: pointer; }
details.melden > summary { color: var(--muted); font-size: .85rem; font-weight: 500; }

/* Startseite: Tickets im Karussell so kompakt wie die kleinen Kacheln */
.slides .ticket { grid-template-columns: minmax(0, 1fr) 3.4rem; }
.slides .t-main { padding: .9rem .85rem .85rem; }
.slides .ticket h3 { font-size: 1.15rem; }
.slides .t-tafel span { font-size: 1.6rem; min-width: 1.4rem; padding: .25rem .35rem .2rem; }
.slides .t-tag b { font-size: 1.7rem; }
.slides .t-tag small { font-size: .7rem; }
.slides .t-zeit { gap: 3px; }
.slides .t-zeit li { font-size: .72rem; overflow: visible; }
.slides .t-zeit li:last-child { text-align: right; }
.slides .t-details { display: none; }

/* Nach oben: runder Knopf unten rechts, nur in langen Listen nach dem Scrollen sichtbar */
.nach-oben { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 40; width: 3rem; height: 3rem;
  margin: 0; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border: 1px solid var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.nach-oben[hidden] { display: none; }
.nach-oben svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nach-oben:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* Leere Seiten: schlafender Wecker statt nur Text */
.card.leer { display: flex; align-items: center; gap: 1.1rem; grid-column: 1 / -1; }
.card.leer::before { content: ""; flex: none; width: 3.6rem; height: 3.6rem; background: var(--accent); opacity: .75;
  -webkit-mask: url(/static/leer-wecker.svg) center / contain no-repeat; mask: url(/static/leer-wecker.svg) center / contain no-repeat; }
.card.leer .empty { margin: 0; }

/* Startseite: die Uhr im Logo klingelt kurz beim Öffnen und vor jedem Weiterschalten des Karussells */
.seite-start .brand .uhr { animation: klingeln .9s ease-in-out .35s 2; }
.brand .uhr.klingelt { animation: klingeln .9s ease-in-out; }
@media (prefers-reduced-motion: reduce) { .brand .uhr, .brand .uhr.klingelt { animation: none !important; } }

/* Kennzahlen (Verwaltung, Statistik) groß wie der Tagezähler */
.stat .value { font: 700 1.9rem/1.1 "Barlow Condensed", system-ui, sans-serif; margin-top: .2rem; }
.stat .value a { font: 600 1rem/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.admin-cols .kats { color: var(--muted); font-size: .9rem; }
.letztes-mal { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px dashed var(--border); }
.letztes-mal h3 { margin: 0 0 .3rem; font-size: 1.05rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.letztes-mal .termine li { color: var(--muted); }
/* Verwaltung: eigene Zeile unter der Kopfzeile, damit Konto und Hell/Dunkel oben rechts bleiben */
@media (min-width: 48.01rem) {
  .nav:not(.nav-flach) { order: 10; flex-basis: 100%; justify-content: flex-end; margin-top: -.3rem; }
  .nav:not(.nav-flach) + .user-menu { margin-left: auto; }
}
/* Am PC: Logo und Schriftzug größer, damit die Marke in der breiten Kopfzeile nicht verloren geht */
@media (min-width: 48.01rem) {
  .brand .abriss { font-size: 1.8rem; }
}

/* Mitmachen: der einzige grüne Knopf, damit Eintragen auffällt (Startseite, Meine Events, „Neu“ oben) */
.btn.gruen, button.btn.gruen { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 650; }
.btn.gruen:hover { filter: brightness(1.08); text-decoration: none; }
/* „Hier fehlt ein Event?“ als leeres Ticket zum Ausfüllen: gestrichelter Rand, kein Kasten */
.mitmachen { display: flex; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  border: 2px dashed var(--accent); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1rem; }
.mitmachen h2 { margin: 0; font-size: 1.3rem; }
.mitmachen p { margin: .15rem 0 0; color: var(--muted); }
.schnell-eintragen { border-style: dashed; border-color: var(--accent); box-shadow: none; }
.schnell-eintragen label { display: block; font: 700 1.15rem/1.2 "Barlow Condensed", system-ui, sans-serif; margin: 0 0 .55rem; }
.schnell-zeile { display: flex; gap: .5rem; }
.schnell-zeile input { flex: 1; min-width: 0; }
.umschalter a.neu:not([aria-current="page"]) { color: var(--ok); }
.community { color: var(--muted); font-size: .85rem; margin: .6rem 0 0; }

/* Für Veranstalter: am PC volle Breite, Vorteile als Kacheln, Schritte als Karten */
.veranstalter .lead { max-width: 46rem; }
.vorteile { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.legal .vorteile li { max-width: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.vorteile li strong { display: block; margin-bottom: .3rem; }
.veranstalter .schritt { margin-top: 1rem; }
.veranstalter .schritt h3 { margin-top: 0; }
.veranstalter h2 { font-size: 1.3rem; margin-top: 2rem; }

/* „Mehr zeigen“ in langen Event-Listen (_mehr.html) */
.mehr-weg { display: none !important; }
.mehr-zeigen-zeile { text-align: center; margin: 1rem 0 0; }
.mehr-zeigen-zeile .btn[hidden] { display: none; }
.anreise-wahl button { background: none; border: 0; padding: 0 0 0 .5rem; color: var(--accent); font-size: .85rem; cursor: pointer; text-decoration: underline; }

/* Verwaltung: Freigabe als Tabelle, eine Auswahl je Zeile, alles mit einem Knopf übernehmen */
.freigabe { width: 100%; border-collapse: collapse; font-size: .9rem; margin: .4rem 0 1rem; }
.freigabe th { text-align: left; color: var(--muted); font-weight: 500; padding: 0 .6rem .4rem 0; white-space: nowrap; }
.freigabe td { padding: .45rem .6rem .45rem 0; border-top: 1px solid var(--border); vertical-align: top; }
/* Erste Spalte ist der Haken, die Event-Spalte danach bekommt die Mindestbreite (sonst wird die Tabelle am PC zu breit) */
.freigabe td.pick + td { min-width: 8rem; font-weight: 600; }
.freigabe .wann { min-width: 6.5rem; }
.freigabe .beleg { color: var(--muted); font-size: .85rem; min-width: 10rem; max-width: 22rem; overflow-wrap: anywhere; }
.freigabe select { min-width: 9rem; max-width: 12rem; }
.freigabe tr.gewaehlt td { background: var(--accent-soft); }
.freigabe-form h3 { margin: 1rem 0 .2rem; }
.freigabe-knopf { position: sticky; bottom: 0; background: var(--surface); padding: .6rem 0; border-top: 1px solid var(--border); }

/* „Als Nächstes“ oben auf „Meine Events“: die nächsten Anmelde- und Ticketstarts */
.als-naechstes h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.naechste-liste { list-style: none; margin: 0; padding: 0; }
.naechste-liste li { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--border); }
.naechste-liste li:first-child { border-top: 0; padding-top: 0; }
.naechste-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.naechste-text strong { overflow-wrap: anywhere; }
.naechste-liste .btn { flex-shrink: 0; white-space: nowrap; }

/* Statistik: Entwicklung der Nutzerzahlen (verlauf.py), je Kennzahl eine kleine Grafik */
.verlauf-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-bottom: 1.5rem; }
.verlauf { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem .7rem; }
.verlauf figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; margin-bottom: .4rem; }
.verlauf-name { color: var(--muted); font-size: .85rem; flex-basis: 100%; }
.verlauf-zahl { font-weight: 650; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.verlauf-veraenderung { font-size: .85rem; font-weight: 600; color: var(--muted); }
.verlauf-veraenderung.hoch { color: var(--text); }
.verlauf small { display: block; }
.verlauf figcaption small { flex-basis: 100%; }
.verlauf svg { width: 100%; height: auto; display: block; overflow: visible; }
.verlauf .v-achse { stroke: var(--border); stroke-width: 1; }
.verlauf .v-gitter { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 3; }
.verlauf .v-text { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.verlauf .v-linie { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.verlauf .v-davor { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 3; opacity: .7; }
.verlauf .v-punkt { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.verlauf .v-hover { fill: transparent; }
.verlauf .v-hover:hover { fill: var(--accent-soft); opacity: .5; }
.verlauf .v-achse, .verlauf .v-gitter, .verlauf .v-text, .verlauf .v-linie, .verlauf .v-davor, .verlauf .v-punkt { pointer-events: none; }
.verlauf-legende { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .9rem; color: var(--muted); margin: -.3rem 0 .8rem; }
.verlauf-legende span::before { content: ""; display: inline-block; width: 1.4rem; vertical-align: middle; margin-right: .4rem; }
.verlauf-legende .jetzt::before { border-top: 2px solid var(--accent); }
.verlauf-legende .davor::before { border-top: 2px dashed var(--muted); }

/* Seite „Prüfen“ */
.pruef-sprung { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.pruef-sprung .chip { background: var(--surface); color: var(--text); border: 1px solid var(--border); padding: .3rem .8rem; font-size: .9rem; text-decoration: none; }
table.freigabe td.pick, table.freigabe th.pick { width: 1.5rem; }
/* Text der Seite unter einer Erkennung („Zu entscheiden“): ohne die Seite zu öffnen */
table.freigabe tr.kontext-zeile td { border-top: 0; padding-top: 0; }
.kontext { font-size: .82rem; color: var(--muted); border-left: 3px solid var(--border); padding: .15rem 0 .15rem .6rem; overflow-wrap: anywhere; }
.kontext .treffer { color: var(--text); font-weight: 600; }
.tabelle-sammel { display: inline-flex; flex-wrap: wrap; gap: .3rem; align-items: center; color: var(--muted); }
.zu-pruefen p { margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* Reiter über zusammengehörigen Verwaltungsseiten (_reiter.html) */
.reiter { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0 0 1rem; border-bottom: 1px solid var(--border); }
.reiter a { padding: .45rem .8rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.reiter a:hover { color: var(--text); }
.reiter a.on { color: var(--accent); border-bottom-color: var(--accent); }
.reiter-teil > h2:first-child { margin-top: 0; }
.nav-zahl { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; margin-left: .2rem; border-radius: 999px; background: var(--surface); color: var(--accent); font-size: .75rem; font-weight: 700; line-height: 1.3rem; text-align: center; }

/* Prüfen: vorausgewählte Empfehlung (Schiedsrichter oder deine bisherigen Entscheidungen) */
select.vorgeschlagen { border-style: dashed; }
.vorschlag-grund { display: inline-block; max-width: 22rem; }

/* Eigene Symbole statt Emoji (symbole.py): Linien wie die Uhr im Logo, in der Farbe des Texts */
.sym { width: 1.05em; height: 1.05em; flex: none; vertical-align: -.16em; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.btn .sym, button .sym, summary .sym { margin-right: .1rem; }

/* „Ich bin dabei“ auf der Event-Seite (dabei.py) */
.dabei { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.dabei .dabei-frage { margin: 0; flex-basis: 100%; }
.dabei .dabei-zahl { margin: 0; flex-basis: 100%; }
.dabei-zeile { margin: .3rem 0 0; }
