/* Vergessene Welten e.V. – Grundstil. Farben/Schriften überschreibt /theme.css (Admin → Design).
   Keine externen Ressourcen (DSGVO). */
:root {
  --bg: #f7f3ec;
  --bg-alt: #efe8dc;
  --surface: #fffdf9;
  --ink: #2b2420;
  --ink-soft: #5d534b;
  --line: #ddd2c2;
  --accent: #8e2f25;
  --accent-ink: #fff;
  --accent-soft: #f4e1dc;
  --gold: #a7792b;
  --gold-ink: #1b140a;
  --font-size: 17px;
  --heading-scale: 1;
  --header: #1f2a24;
  --header-ink: #f2ece1;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(40, 30, 20, .06), 0 6px 20px rgba(40, 30, 20, .06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
  --max-header: 1560px;   /* Kopfzeile breiter als der Inhalt: Vereinsname, Menüzeile und Konto passen nebeneinander */
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: var(--font-size); }
body {
  margin: 0;
  font: 1rem/1.65 var(--sans);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
h1, h2, h3, .h2, .h3 { font-family: var(--serif); line-height: 1.2; font-weight: 700; margin: 0 0 .6em; }
h1 { font-size: calc(clamp(2rem, 4.5vw, 3.1rem) * var(--heading-scale)); letter-spacing: -.01em; }
h2, .h2 { font-size: calc(clamp(1.45rem, 2.6vw, 1.9rem) * var(--heading-scale)); margin-top: 1.4em; }
h3, .h3 { font-size: calc(1.2rem * var(--heading-scale)); }
.section > .container > h2:first-child, .card h2, .card h3, .split h2:first-child { margin-top: 0; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.narrow { max-width: 460px; }
.prose > * { max-width: 760px; }
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.small { font-size: .9rem; color: var(--ink-soft); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--gold); margin-bottom: .8em; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--surface); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; }

/* Header */
.site-header { background: var(--header); color: var(--header-ink); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.container.header-inner { width: min(100% - 2.5rem, var(--max-header)); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; min-width: 0; }
.brand-crest { width: auto; height: 46px; flex: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.brand-text { white-space: nowrap; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; line-height: 1.1; }
.brand-text small { display: block; font-family: var(--sans); font-weight: 400; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.25); color: inherit; border-radius: 10px; padding: .45rem .7rem; font: inherit; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 4px 0; transition: transform .2s, opacity .2s; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; align-items: center; }
.site-nav a { color: var(--header-ink); text-decoration: none; white-space: nowrap; padding: .5rem .65rem; border-radius: 10px; font-size: .96rem; display: block; }
.site-nav a:hover { background: rgba(255,255,255,.08); }
.site-nav a[aria-current="page"] { background: rgba(255,255,255,.12); box-shadow: inset 0 -2px 0 var(--gold); }

@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--header); max-height: 0; overflow: hidden; transition: max-height .25s ease; }
  .site-nav.is-open { max-height: calc(100vh - 102px); overflow-y: auto; box-shadow: 0 12px 24px rgba(0,0,0,.3); }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: .5rem 1.25rem 1.25rem; gap: 0; }
  .site-nav a { padding: .85rem .5rem; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; font-size: 1.05rem; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}
/* ausgeschriebene Navigation: der Vereinsname darf nicht schrumpfen, sonst schiebt sich die Navigation darüber,
   statt dass site.js auf das Menü umschaltet */
@media (min-width: 1181px) { html:not(.nav-compact) .brand { flex-shrink: 0; } }
html.nav-compact .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--header); max-height: 0; overflow: hidden; transition: max-height .25s ease; }
html.nav-compact .site-nav.is-open { max-height: calc(100vh - 102px); overflow-y: auto; box-shadow: 0 12px 24px rgba(0,0,0,.3); }
html.nav-compact .site-nav ul { flex-direction: column; align-items: stretch; padding: .5rem 1.25rem 1.25rem; gap: 0; }
html.nav-compact .site-nav a { padding: .85rem .5rem; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; font-size: 1.05rem; }
html.nav-compact .nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
html.nav-compact .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
html.nav-compact .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }


/* Hero */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(167,121,43,.35), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(142,47,37,.45), transparent 60%),
    var(--header);
  color: var(--header-ink);
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 6rem);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 4l6 20h20l-16 12 6 20-16-12-16 12 6-20L4 24h20z' fill='none' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E");
}
.hero-inner { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; position: relative; z-index: 1; }
.hero .lead { color: rgba(242,236,225,.85); }
.hero h1 { max-width: 22ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }
.hero .btn-ghost { color: var(--header-ink); border-color: rgba(255,255,255,.35); }

.page-head { background: var(--bg-alt); padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.5rem, 4vw, 2.5rem); border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: .3em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1.3rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 600; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn-sm { padding: .5rem 1rem; font-size: .92rem; }
.btn-block { width: 100%; margin-top: 1.2rem; }

/* Cards */
.cards { display: grid; gap: 1.1rem; margin-bottom: 1rem; }
.cards-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cards-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.card-link { color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; display: block; }
.card-link:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-link h3 { color: var(--accent); }
.card-icon { display: block; width: auto; height: 3.6rem; max-width: 5rem; object-fit: contain; object-position: left center; margin-bottom: .7rem; }
.cards:has(.person) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.person { display: flex; flex-direction: column; gap: .2rem; }
.person .role { overflow-wrap: anywhere; hyphens: auto; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 600; }
.person strong { font-family: var(--serif); font-size: 1.15rem; }
.person a { font-size: .92rem; overflow-wrap: anywhere; }

/* Layout */
.split { display: grid; gap: 2rem 3rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 820px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-wide { grid-template-columns: 3fr 2fr; }
}
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }
.more { font-weight: 600; text-decoration: none; }

.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; text-align: center; }
.facts strong { display: block; font-family: var(--serif); font-size: 2.2rem; color: var(--accent); line-height: 1.1; }
.facts span { color: var(--ink-soft); font-size: .92rem; }

/* Featured event */
.featured { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--radius); padding: clamp(1.3rem, 3vw, 2rem); box-shadow: var(--shadow); }
.featured h2 { margin: .1em 0 .3em; }
.featured p { margin-bottom: .8rem; color: var(--ink-soft); }
@media (max-width: 560px) { .featured { grid-template-columns: 1fr; } }

/* Dates */
.datebox { width: 78px; text-align: center; border-radius: 12px; background: var(--accent); color: var(--accent-ink); padding: .5rem 0 .6rem; line-height: 1.1; flex: none; }
.datebox .d { display: block; font-family: var(--serif); font-size: 1.9rem; font-weight: 700; }
.datebox .m { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }
.datebox .y { display: block; font-size: .7rem; opacity: .8; }

.events { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.event { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 1rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; }
.event .datebox { width: 64px; padding: .35rem 0 .45rem; background: var(--accent-soft); color: var(--accent); }
.event .datebox .d { font-size: 1.5rem; }
.event-title { font-weight: 600; margin: 0; line-height: 1.3; overflow-wrap: anywhere; }
.event-title a { color: inherit; text-decoration: none; }
.event-title a:hover { color: var(--accent); }
.event-meta { font-size: .9rem; color: var(--ink-soft); margin: .15rem 0 0; }
.event.is-highlight { border-color: var(--accent); }
.event.is-highlight .datebox { background: var(--accent); color: var(--accent-ink); }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: var(--bg-alt); color: var(--ink-soft); margin-left: .35rem; vertical-align: middle; border: 1px solid var(--line); }
.tag-warn { background: #fff3d6; color: #7a5300; border-color: #ecd59b; }
.month { font-family: var(--serif); font-size: 1.2rem; margin: 1.8rem 0 .7rem; color: var(--ink-soft); }
.month:first-child { margin-top: 0; }
.month-group + .month-group { margin-top: 1.8rem; }
.empty { color: var(--ink-soft); font-style: italic; }

.filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: .45rem .95rem; border-radius: 999px; font: inherit; font-size: .92rem; cursor: pointer; }
.chip.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Meta / downloads / notices */
.meta { display: grid; gap: .8rem; margin: 0 0 1.5rem; }
.meta div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 1rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.meta dt { font-weight: 600; color: var(--ink-soft); font-size: .92rem; }
.meta dd { margin: 0; overflow-wrap: break-word; }
@media (max-width: 480px) { .meta div { grid-template-columns: 1fr; gap: .1rem; } }
.downloads { list-style: none; margin: 0; padding: 0; }
.downloads li { border-bottom: 1px solid var(--line); }
.downloads li:last-child { border-bottom: 0; }
.downloads a { display: flex; align-items: center; gap: .7rem; padding: .7rem .2rem; text-decoration: none; color: var(--ink); }
.downloads a::before { content: "PDF"; font-size: .66rem; font-weight: 700; letter-spacing: .05em; color: var(--accent-ink); background: var(--accent); border-radius: 5px; padding: .2rem .35rem; flex: none; }
.downloads a:hover { color: var(--accent); }
.notice { background: var(--accent-soft); border: 1px solid var(--line); border-left: 4px solid var(--gold); padding: 1rem 1.2rem; border-radius: 10px; margin: 0 0 1.5rem; font-size: .95rem; }
.signature { font-style: italic; color: var(--ink-soft); }
blockquote { margin: 0 0 2rem; padding: 1.2rem 1.5rem; border-left: 4px solid var(--gold); background: var(--bg-alt); border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--serif); font-size: 1.12rem; }
blockquote footer { font-family: var(--sans); font-size: .88rem; color: var(--ink-soft); margin-top: .6rem; font-style: italic; }
.legal h2 { font-size: 1.35rem; }
.legal h3 { font-size: 1.08rem; margin-top: 1.4em; }

/* Forms */
label { display: block; font-weight: 600; margin: 1rem 0 .35rem; font-size: .95rem; }
input { width: 100%; font: inherit; padding: .75rem .9rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
input:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.login { margin-top: 1rem; }
.form-status { min-height: 1.4em; margin: .8rem 0 0; font-size: .92rem; color: var(--accent); }

/* Footer */
.site-footer { background: var(--header); color: rgba(242,236,225,.8); padding: 3rem 0 2rem; margin-top: 0; font-size: .95rem; }
.site-footer a { color: var(--header-ink); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h2 { font-size: 1.05rem; color: var(--header-ink); margin: 0 0 .7rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .3rem 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* Prototyp-Hinweis */
.proto-bar { background: var(--gold); color: var(--gold-ink); text-align: center; font-size: .85rem; padding: .35rem 1rem; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(150%); background: var(--header); color: var(--header-ink); padding: .8rem 1.2rem; border-radius: 12px; box-shadow: var(--shadow); transition: transform .25s, visibility .25s; visibility: hidden; z-index: 200; max-width: calc(100% - 2rem); font-size: .95rem; }
.toast.is-visible { transform: translateX(-50%) translateY(0); visibility: visible; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Kopf: Anmelden & Benutzermenü ---------- */
.site-nav { margin-left: auto; }
.header-actions { display: flex; align-items: center; gap: .6rem; flex: none; }
.btn-login { display: inline-flex; align-items: center; padding: .5rem 1rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; font-size: .95rem; white-space: nowrap; border: 1px solid transparent; }
.btn-login:hover { filter: brightness(1.08); }
.btn-register { display: inline-flex; align-items: center; padding: .5rem 1rem; border-radius: 999px; background: transparent; color: var(--header-ink); font-weight: 600; text-decoration: none; font-size: .95rem; white-space: nowrap; border: 1px solid rgba(255,255,255,.45); }
.btn-register:hover, .btn-register[aria-current="page"] { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.7); }
.nav-register { display: none; }
@media (max-width: 560px) { .btn-register { display: none; } .nav-register { display: block; } }
.lock { font-size: .7em; margin-left: .3em; opacity: .75; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer; padding: .3rem .7rem .3rem .3rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); color: var(--header-ink); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary::after { content: "▾"; font-size: .75rem; opacity: .8; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; font-weight: 700; }
.user-name { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 240px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .4rem; z-index: 60; }
.user-menu-head { margin: 0; padding: .6rem .8rem .7rem; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.user-menu-head span { font-size: .85rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.user-menu-panel a, .user-menu-panel button { display: block; width: 100%; text-align: left; padding: .6rem .8rem; border-radius: 8px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.user-menu-panel a:hover, .user-menu-panel button:hover { background: var(--bg-alt); }
.user-menu-panel form { margin: 0; border-top: 1px solid var(--line); padding-top: .3rem; margin-top: .3rem; }
@media (max-width: 1180px) {
  .site-nav { margin-left: 0; }
  .user-name { display: none; }
  .user-menu summary { padding: .25rem .5rem .25rem .25rem; }
}
html.nav-compact .user-name { display: none; }
html.nav-compact .user-menu summary { padding: .25rem .5rem .25rem .25rem; }

@media (max-width: 380px) { .brand-text small { display: none; } .btn-login { padding: .45rem .8rem; } }
/* schmale Handys / große Schrift: Vereinsname darf umbrechen statt die Knöpfe aus dem Bild zu schieben */
@media (max-width: 480px) { .header-inner { gap: .6rem; } .brand { gap: .5rem; } .brand-crest { height: 38px; }
  .brand-text { white-space: normal; font-size: 1.05rem; overflow-wrap: anywhere; } }

/* ---------- Hinweise ---------- */
.flash { padding: .8rem 0; font-weight: 600; border-bottom: 1px solid var(--line); }
.flash-ok { background: var(--accent-soft); color: var(--ink); }
.flash-error { background: #fbe3df; color: #7a1d12; }
.form-error { background: #fbe3df; color: #7a1d12; border: 1px solid #efb9af; border-radius: 10px; padding: .8rem 1rem; margin: 0 0 1rem; }
.form-error ul { margin: 0; padding-left: 1.2rem; }
.help { font-size: .85rem; color: var(--ink-soft); margin: .35rem 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.admin-hint { margin-top: 2rem; font-size: .92rem; color: var(--ink-soft); }
.crumb { margin: 0 0 .5rem; font-size: .92rem; }
.crumb a { text-decoration: none; }
.form-foot { margin: 1rem 0 .3rem; }
.nowrap { white-space: nowrap; }

/* ---------- Formulare ---------- */
.form-card { margin-bottom: 1.5rem; }
select, textarea { width: 100%; font: inherit; padding: .7rem .9rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
textarea { resize: vertical; line-height: 1.5; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; }
select:focus, textarea:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem 1rem; margin: 1.2rem 0; min-width: 0; }
legend { font-weight: 600; padding: 0 .4rem; font-size: .95rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; margin: .6rem 0; cursor: pointer; }
.check input { width: auto; margin-top: .3rem; flex: none; accent-color: var(--accent); }
.check-inline { display: inline-flex; margin: .3rem 1.2rem .3rem 0; align-items: center; }
.check-inline input { margin-top: 0; }
.check-grid { display: grid; gap: .2rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.form-grid { display: grid; gap: 0 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.form-grid > div > label:first-child, .form-grid .field > label:first-child { margin-top: 1rem; }
.form-card > .btn, .form-card form > .btn { margin-top: 1.2rem; }
.inline-form { display: inline-block; margin: .8rem .4rem 0 0; }
.btn-danger { background: #a3261a; color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.danger-zone { border-color: #e3b4ab; margin-bottom: 1.5rem; }
.danger-zone input:not([type=checkbox]) { margin-bottom: .8rem; }
.color-input { display: flex; gap: .5rem; align-items: center; }
.color-input input[type=color] { width: 3.2rem; height: 2.8rem; padding: .2rem; flex: none; cursor: pointer; }
.color-input input[type=text] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.field-bool { align-self: end; }
.cards-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.meta.compact { margin-top: 1rem; }
.meta.compact div { grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr); }

/* ---------- Pills ---------- */
.pill { display: inline-block; font-size: .75rem; font-weight: 600; padding: .12rem .55rem; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap; vertical-align: middle; }
.pill-admin { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.pill-off { background: #fbe3df; color: #7a1d12; border-color: #efb9af; }
.pill-warn, .tag-warn { background: #fff3d6; color: #7a5300; border-color: #ecd59b; }
.pill-list { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- Administration ---------- */
.admin { padding: clamp(1.5rem, 4vw, 2.5rem) 0 3rem; }
.admin-grid { display: grid; gap: 2rem; grid-template-columns: 220px 1fr; align-items: start; }
.admin-nav { position: sticky; top: 90px; display: flex; flex-direction: column; gap: .15rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; }
.admin-nav-head { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 700; margin: .3rem .6rem .5rem; }
.admin-nav a { padding: .55rem .7rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.admin-nav a:hover { background: var(--bg-alt); }
.admin-nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.admin-main { min-width: 0; }
.admin-main > h1, .admin-head h1 { margin-top: 0; }
.admin-main h1, .admin-main .check span { overflow-wrap: anywhere; }   /* lange E-Mail-Adressen */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-head h1 { margin: 0; }
@media (max-width: 860px) {
  .admin-grid { grid-template-columns: 1fr; gap: 1rem; }
  .admin-nav { position: static; flex-direction: row; overflow-x: auto; padding: .4rem; scrollbar-width: thin; }
  .admin-nav-head { display: none; }
  .admin-nav a { white-space: nowrap; }
}
.stat-row { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.stat-row li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.stat-row strong { display: block; font-family: var(--serif); font-size: 2rem; color: var(--accent); line-height: 1.1; }
.stat-row span { font-size: .9rem; color: var(--ink-soft); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.5rem; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); background: var(--bg-alt); }
.table tr:last-child td { border-bottom: 0; }
.filter-form { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-form input, .filter-form select { width: auto; min-width: 0; flex: 1 1 200px; }
.area-list { display: grid; gap: .8rem; margin-bottom: 2rem; }
.area-row { padding: 1rem 1.2rem; display: grid; gap: .6rem 1.5rem; grid-template-columns: minmax(180px, 1fr) 2.2fr; align-items: start; }
.area-title { display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; }
.area-controls { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.area-controls > label:first-child { margin: 0; }
.area-controls select { width: auto; flex: 1 1 220px; }
.area-groups { width: 100%; margin: .2rem 0; padding: .4rem .8rem .6rem; }
.area-locked { margin: 0; align-self: center; }
@media (max-width: 700px) { .area-row { grid-template-columns: 1fr; } }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; }
.design-preview { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.dp-header { background: var(--header); color: var(--header-ink); padding: .8rem 1rem; display: flex; justify-content: space-between; align-items: center; font-family: var(--serif); font-weight: 700; }
.dp-body { background: var(--bg); padding: 1rem; }
.dp-body .card { margin-top: .5rem; }
.contrast-list { list-style: none; padding: 0; margin: 0; }
.contrast-list li { padding: .4rem 0 .4rem 1.6rem; position: relative; }
.contrast-list li::before { position: absolute; left: 0; font-weight: 700; }
.contrast-list .ok::before { content: "✓"; color: #2e7d32; }
.contrast-list .warn::before { content: "!"; color: #b3261e; }
.markdown h1, .markdown h2, .markdown h3 { margin-top: 1.4em; }
.markdown table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; }
.markdown code { background: var(--bg-alt); padding: .1rem .35rem; border-radius: 5px; }

/* ---------- Termine ---------- */
:root { --cat-spieletreff: #2e7d32; --cat-tabletop: #1565c0; --cat-veranstaltung: #8e24aa; --cat-histotainment: #8d5524; --cat-larp: var(--accent); --cat-sonstiges: #757575;
        --staff-bg: #fff3d6; --staff-ink: #7a5300; --staff-line: #e0b43c; }
a.chip { text-decoration: none; display: inline-block; }
.tag-staff { background: var(--staff-bg); color: var(--staff-ink); border-color: var(--staff-line); }
.notice-guardian { border-left-color: #c0392b; background: #fff3d6; color: #4a3200; }
.side-guardian { display: block; font-size: .8rem; font-weight: 600; color: #9a2b1f; }
.notice-guardian p { margin: 0 0 .5rem; }
.notice-guardian .check { margin: .6rem 0 0; }
.notice-staff { border-left-color: var(--staff-line); background: var(--staff-bg); color: var(--staff-ink); }
.event.needs-staff { border-color: var(--staff-line); box-shadow: inset 4px 0 0 var(--staff-line); background: linear-gradient(90deg, var(--staff-bg), var(--surface) 45%); }
.action-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.list-title { margin-top: 2.5rem; }

.cal { padding: 1rem; }
.cal-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.cal-title { margin: 0; font-size: 1.35rem; min-width: 10ch; text-align: center; }
.cal-today { margin-left: auto; font-weight: 600; font-size: .92rem; }
.cal-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.cal-weekdays span { background: var(--bg-alt); text-align: center; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); padding: .4rem 0; }
.cal-day { background: var(--surface); min-height: 6.2rem; padding: .3rem .3rem .4rem; display: flex; flex-direction: column; gap: .2rem; position: relative; min-width: 0; }
.cal-day.is-out { background: var(--bg-alt); }
.cal-day.is-out .cal-num { opacity: .45; }
.cal-num { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.cal-day.is-today .cal-num { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 .45rem; align-self: flex-start; }
.cal-ev { display: block; font-size: .76rem; line-height: 1.25; padding: .15rem .3rem; border-radius: 5px; background: var(--bg-alt); color: var(--ink); text-decoration: none; border-left: 3px solid var(--cat-sonstiges); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev:hover { text-decoration: none; filter: brightness(.96); }
.cal-ev.is-tentative { font-style: italic; opacity: .85; }
.cal-ev.needs-staff { background: var(--staff-bg); color: var(--staff-ink); outline: 1px solid var(--staff-line); font-weight: 600; }
.cal-ev.needs-staff::after { content: " ●"; color: var(--staff-line); }
.cal-time { font-variant-numeric: tabular-nums; opacity: .8; }
.cal-add { position: absolute; top: .2rem; right: .3rem; width: 1.4rem; height: 1.4rem; line-height: 1.35rem; text-align: center; border-radius: 999px; color: var(--ink-soft); text-decoration: none; font-weight: 700; opacity: 0; }
.cal-day:hover .cal-add, .cal-add:focus { opacity: 1; background: var(--accent-soft); color: var(--accent); }
.cat-spieletreff { border-left-color: var(--cat-spieletreff); } .cat-tabletop { border-left-color: var(--cat-tabletop); }
.cat-veranstaltung { border-left-color: var(--cat-veranstaltung); } .cat-larp { border-left-color: var(--cat-larp); }
.cat-sonstiges { border-left-color: var(--cat-sonstiges); } .cat-histotainment { border-left-color: var(--cat-histotainment); }
.cal-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .8rem 0 0; }
.legend-dot { display: inline-flex; align-items: center; gap: .35rem; }
.legend-dot::before { content: ""; width: .7rem; height: .7rem; border-radius: 3px; background: var(--cat-sonstiges); }
.legend-dot.cat-spieletreff::before { background: var(--cat-spieletreff); } .legend-dot.cat-tabletop::before { background: var(--cat-tabletop); }
.legend-dot.cat-veranstaltung::before { background: var(--cat-veranstaltung); } .legend-dot.cat-histotainment::before { background: var(--cat-histotainment); } .legend-dot.cat-larp::before { background: var(--cat-larp); }
.legend-dot.needs-staff::before { background: var(--staff-bg); outline: 2px solid var(--staff-line); }
@media (max-width: 700px) {
  .cal { padding: .6rem; }
  .cal-day { min-height: 3.4rem; padding: .2rem; flex-direction: row; flex-wrap: wrap; align-content: flex-start; gap: 3px; }
  .cal-num { width: 100%; }
  .cal-ev { width: .7rem; height: .7rem; padding: 0; border-radius: 999px; border-left: 0; font-size: 0; background: var(--cat-sonstiges); }
  .cal-ev.cat-spieletreff { background: var(--cat-spieletreff); } .cal-ev.cat-tabletop { background: var(--cat-tabletop); }
  .cal-ev.cat-veranstaltung { background: var(--cat-veranstaltung); } .cal-ev.cat-histotainment { background: var(--cat-histotainment); } .cal-ev.cat-larp { background: var(--cat-larp); }
  .cal-ev.needs-staff { outline: 2px solid var(--staff-line); outline-offset: 1px; }
  .cal-ev.needs-staff::after { content: none; }
  .cal-add { display: none; }
}

/* Termin-Detail */
/* Seitenleiste: wandert unter den Inhalt, sobald neben ihm weniger als ~30 Zeichen Platz bleiben (auch bei großer Schrift) */
.event-layout { display: flex; flex-wrap: wrap; gap: 2rem; align-items: flex-start; }
.event-main { flex: 999 1 30rem; min-width: 0; }
.event-side { flex: 1 1 20rem; min-width: 0; }
.event-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.event-side .meta { margin: 0; }
.event-side .meta div { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
.event-side .meta div:last-child { border-bottom: 0; padding-bottom: 0; }
.task { margin-bottom: 1.2rem; }
.task-name { margin: 0 0 .3rem; }
.slots { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.slot { border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; scroll-margin-top: 90px; }
.slot.is-open { border-color: var(--staff-line); box-shadow: inset 4px 0 0 var(--staff-line); }
.slot.is-past { opacity: .65; }
.slot-head { display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: space-between; align-items: center; }
.staff-meter { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; max-width: 100%; }
.staff-meter meter { width: min(7rem, 100%); height: .8rem; }
.staff-count { font-size: .88rem; font-weight: 600; color: var(--staff-ink); white-space: nowrap; }
.staff-meter.is-full .staff-count { color: #2e7d32; }
.slot-people { margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.person-chip { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: .05rem .55rem; }
.person-chip.is-me { background: var(--accent-soft); border-color: var(--accent); }
.signup { margin-top: .6rem; }
.signup > summary { list-style: none; }
.signup > summary::-webkit-details-marker { display: none; }
.signup[open] > summary { margin-bottom: .4rem; }
.signup-form label { margin-top: .6rem; }
.signup-form .btn { margin-top: .8rem; }
.when-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
/* Datum (TT.MM.JJJJ) + Kalender-Knopf + Uhrzeit (HH:MM). Breiten in ch, damit sie mit der Schriftgröße mitwachsen;
   reicht der Platz nicht, rutscht die Uhrzeit in die nächste Zeile statt gequetscht zu werden. */
.dt-pair { display: flex; flex-wrap: wrap; gap: .4rem; align-items: stretch; }
.time-field { padding-left: .55rem; padding-right: .55rem; width: calc(6ch + 1.1rem + 2px); flex: none; text-align: center; font-variant-numeric: tabular-nums; }
.time-field:invalid:not(:placeholder-shown) { border-color: #b3261e; }
.date-field { display: flex; flex: 1 0 auto; position: relative; }
.date-field input[type=text] { padding-left: .55rem; padding-right: .55rem; flex: 1 0 auto; width: calc(11ch + 1.1rem + 2px); min-width: calc(11ch + 1.1rem + 2px); font-variant-numeric: tabular-nums; }
.date-field .date-picker { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; padding: 0; border: 0; }
.date-btn { flex: none; margin-left: .3rem; width: calc(1.2rem + 1.4em); border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.date-btn:hover { background: var(--accent-soft); }
.date-btn svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.date-field input:invalid:not(:placeholder-shown) { border-color: #b3261e; }

/* Termin-Formular */
.staffing-box > legend { padding: 0 .4rem; }
.staffing-box[disabled] > :not(legend):not(.staffing-off) { display: none; }
.staffing-off { display: none; }
.staffing-box[disabled] .staffing-off { display: block; }
.task-edit { margin: 1rem 0; padding: 1rem; background: var(--bg-alt); box-shadow: none; }
.task-edit .form-grid .field > label:first-child { margin-top: 0; }
.slot-list { display: grid; gap: .6rem; margin-top: .8rem; }
.slot-row { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; }
.slot-row.is-removed { opacity: .5; }
.slot-fields { display: flex; flex-wrap: wrap; gap: 0 1rem; align-items: flex-end; }
.slot-fields .field { flex: 1 1 22rem; min-width: 0; }
.slot-fields .field-num { flex: 0 0 calc(5ch + 3rem); }
.slot-fields label { margin-top: .3rem; }
.field-num input { width: 100%; }
@media (max-width: 640px) {
  .task.card { padding: 1rem .7rem; }
  .slot { padding: .6rem .55rem; }
  .staffing-box { padding: .7rem .6rem .8rem; }
  .task-edit { padding: .7rem .6rem; }
  .slot-row { padding: .5rem .55rem; }
}
.form-grid-dt { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.slot-actions { display: flex; gap: 1rem; justify-content: flex-end; align-items: center; margin-top: .4rem; }
.slot-warning { color: #7a1d12; margin: .3rem 0 0; }
.task-actions { display: flex; gap: 1rem; align-items: center; margin: .8rem 0 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; color: var(--accent); cursor: pointer; text-decoration: underline; }
.link-btn.danger { color: #a3261a; }
.resp { margin-top: 1.2rem; }
.resp > summary { cursor: pointer; font-weight: 600; }

/* Besetzungsübersicht */
.row-open td:first-child { box-shadow: inset 4px 0 0 var(--staff-line); }
.signup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.inline-remove { display: inline; margin-left: .3rem; }
.table tfoot th { background: var(--bg-alt); }
.task-edit.is-removed { opacity: .55; }

/* Lange, unteilbare Angaben (E-Mail-Adressen) dürfen umbrechen; Rasterspalten dürfen schmaler als ihr längstes Wort werden */
a[href^="mailto:"] { overflow-wrap: anywhere; }
.cards > *, .split > *, .footer-grid > *, .form-grid > *, .when-grid > * { min-width: 0; }

/* ---------- Stundenplan (Besetzungsübersicht) ---------- */
/* Tabelle mit festen Zeitspalten; Balken über colspan (CSP erlaubt keine Inline-Positionen). Mit table-layout:fixed
   und Breite 1px ergibt sich die Tabellenbreite aus der Summe der Spaltenbreiten. */
:root { --tt-hour: 4.6rem; --tt-label: 11rem; --tt-full-bg: #dcefdc; --tt-full-ink: #1f5a22; --tt-part-bg: #fff0c7; --tt-part-ink: #6e4b00;
        --tt-gap-bg: #fbe0db; --tt-gap-ink: #8a1f12; --tt-person-bg: #e2ecf8; --tt-person-ink: #1d3d66; --tt-person-line: #8fb0d6; }
.tt-wrap { container-type: inline-size; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 1.5rem; }
.tt-wrap:focus { outline: 3px solid var(--gold); outline-offset: 2px; }
.tt { table-layout: fixed; width: 1px; border-collapse: separate; border-spacing: 0; font-size: .85rem; }
.tt-col-label { width: var(--tt-label); }
.tt-s5 .tt-col { width: calc(var(--tt-hour) / 12); }
.tt-s6 .tt-col { width: calc(var(--tt-hour) / 10); }
.tt-s10 .tt-col { width: calc(var(--tt-hour) / 6); }
.tt-s12 .tt-col { width: calc(var(--tt-hour) / 5); }
.tt-s15 .tt-col { width: calc(var(--tt-hour) / 4); }
.tt-s20 .tt-col { width: calc(var(--tt-hour) / 3); }
.tt-s30 .tt-col { width: calc(var(--tt-hour) / 2); }
.tt-s60 .tt-col { width: calc(var(--tt-hour) / 1); }
.tt th, .tt td { padding: 0; height: 2.4rem; border-bottom: 1px solid var(--line); }
.tt thead th { height: 2rem; position: sticky; top: 0; }
.tt-hour { font-weight: 600; color: var(--ink-soft); text-align: left; padding-left: .3rem !important; border-left: 1px solid var(--line); background: var(--bg-alt); font-variant-numeric: tabular-nums; }
.tt-label { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: .3rem .6rem !important; border-right: 1px solid var(--line); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt thead .tt-label { background: var(--bg-alt); z-index: 2; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.tt-sub { display: block; font-size: .72rem; color: var(--ink-soft); }
.tt-cover .tt-label strong { font-family: var(--serif); font-size: .95rem; }
.tt-flag { font-size: .68rem; font-weight: 700; color: var(--tt-gap-ink); background: var(--tt-gap-bg); border-radius: 999px; padding: 0 .4rem; }
.tt-task + .tt-task tr:first-child > * { border-top: 2px solid var(--line); }
.tt td.tt-full, .tt td.tt-part, .tt td.tt-gap, .tt td.tt-person { position: relative; }
.tt td.tt-full::before, .tt td.tt-part::before, .tt td.tt-gap::before, .tt td.tt-person::before {
  content: ""; position: absolute; inset: .3rem 1px; border-radius: 6px; }
.tt td.tt-full::before { background: var(--tt-full-bg); border: 1px solid #9ccf9e; }
.tt td.tt-part::before { background: var(--tt-part-bg); border: 1px solid #e0b43c; }
.tt td.tt-gap::before { background: var(--tt-gap-bg); border: 1px dashed #d9786a; }
.tt td.tt-person::before { background: var(--tt-person-bg); border: 1px solid var(--tt-person-line); }
.tt-text { position: relative; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 .45rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tt-full .tt-text { color: var(--tt-full-ink); } .tt-part .tt-text { color: var(--tt-part-ink); }
.tt-gap .tt-text { color: var(--tt-gap-ink); } .tt-person .tt-text { color: var(--tt-person-ink); font-weight: 500; }
.tt-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }
.tt-key { display: inline-flex; align-items: center; gap: .35rem; }
.tt-key::before { content: ""; width: 1.4rem; height: .8rem; border-radius: 4px; }
.tt-key.tt-full::before { background: var(--tt-full-bg); border: 1px solid #9ccf9e; }
.tt-key.tt-part::before { background: var(--tt-part-bg); border: 1px solid #e0b43c; }
.tt-key.tt-gap::before { background: var(--tt-gap-bg); border: 1px dashed #d9786a; }
.tt-key.tt-person::before { background: var(--tt-person-bg); border: 1px solid var(--tt-person-line); }
.tt-day { margin: 1.5rem 0 .5rem; }
@media (max-width: 640px) { :root { --tt-hour: 3.6rem; --tt-label: 7.5rem; } }
/* Der ganze Tag passt in die verfügbare Breite (Stundenzahl als Klasse tt-h<N>); mindestens 2rem je Stunde, sonst seitlich scrollen */
.tt-h1 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 1)); }
.tt-h2 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 2)); }
.tt-h3 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 3)); }
.tt-h4 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 4)); }
.tt-h5 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 5)); }
.tt-h6 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 6)); }
.tt-h7 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 7)); }
.tt-h8 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 8)); }
.tt-h9 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 9)); }
.tt-h10 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 10)); }
.tt-h11 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 11)); }
.tt-h12 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 12)); }
.tt-h13 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 13)); }
.tt-h14 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 14)); }
.tt-h15 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 15)); }
.tt-h16 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 16)); }
.tt-h17 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 17)); }
.tt-h18 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 18)); }
.tt-h19 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 19)); }
.tt-h20 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 20)); }
.tt-h21 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 21)); }
.tt-h22 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 22)); }
.tt-h23 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 23)); }
.tt-h24 { --tt-hour: max(2rem, calc((100cqw - var(--tt-label) - 2px) / 24)); }

/* Aufgabe: Aufteilungs-Regel */
.mode-switch { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; margin: .9rem 0 .2rem; padding: .5rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.mode-switch .check { margin: .2rem 0; font-weight: 600; }
.auto-fields, .manual-fields { margin-top: .4rem; }
.rule-grid { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.rule-grid .field > label { margin-top: 1rem; }
.num-field { width: calc(5ch + 2.2rem); }
.handover-fields { display: flex; flex-wrap: wrap; gap: 0 1.5rem; align-items: flex-start; margin: -.2rem 0 .4rem 1.7rem; }
.handover-fields .field > label { margin-top: .3rem; }
.handover-mode { flex: 1 1 18rem; min-width: 0; }
.handover-mode .check { margin: .5rem 0 .2rem; }
.rule-preview { background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; padding: .6rem .8rem; margin: .8rem 0 .4rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
.rule-preview:empty { display: none; }
.rule-preview.is-error { border-color: #d9786a; color: var(--tt-gap-ink); }
/* Slot-Verantwortliche */
.lead-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .6rem; }
.lead-form label { margin: 0; font-size: .85rem; }
.lead-form select { width: auto; flex: 1 1 12rem; padding: .45rem .6rem; }
.lead-mark { font-size: .78rem; font-weight: 700; color: var(--gold-ink, #7a5300); white-space: nowrap; }
.tt td.tt-lead::before { border-width: 2px; border-color: var(--gold); }
/* Dauer-Feld mit Vorschlagsliste: Chrome zeigt im Feld einen Auswahlpfeil – Breite dafür einplanen */
.time-field.duration-field { width: calc(6ch + 1.1rem + 2px + 1.6em); text-align: left; }

/* Registrierung, Konto auflösen */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-card h3 .pill { vertical-align: middle; font-size: .75rem; }
.form-card.is-focus { outline: 2px solid var(--accent); outline-offset: 2px; }
#konto-aufloesen .cards { align-items: start; }
.section-tight { padding-top: 1.5rem; padding-bottom: 0; }
.section-tight .notice { margin-bottom: 0; }

/* Tage als aufklappbare Abschnitte (Termin-Seite, Besetzungsübersicht) */
.day-block { border: 1px solid var(--line); border-radius: var(--radius, 14px); background: var(--surface); margin: 0 0 .8rem; }
.day-block > summary { display: flex; flex-wrap: wrap; gap: .2rem 1rem; align-items: baseline; padding: .8rem 1rem; cursor: pointer; list-style: none; }
.day-block > summary::-webkit-details-marker { display: none; }
.day-block > summary::before { content: "▸"; color: var(--accent); width: 1em; flex: 0 0 auto; transition: transform .15s; }
.day-block[open] > summary::before { transform: rotate(90deg); }
.day-block[open] > summary { border-bottom: 1px solid var(--line); }
.day-label { font-weight: 700; flex: 1 1 12rem; }
.day-facts { font-size: .92rem; font-variant-numeric: tabular-nums; }
.day-block.has-open { border-left: 4px solid var(--staff-line, #c0392b); }
.day-block.is-past > summary { opacity: .7; }
.day-block > :not(summary) { margin-left: 1rem; margin-right: 1rem; }
.day-block > :last-child { margin-bottom: 1rem; }
.task-day { margin: .8rem 1rem 1rem; }
.task-day .task-name { margin: .4rem 0 .3rem; }
.pill-me { background: var(--accent); color: var(--accent-ink, #fff); border-color: var(--accent); }
.slot.is-mine { border-left: 4px solid var(--accent); }
.take-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .5rem; }
.take-form input { flex: 1 1 14rem; min-width: 0; margin: 0; padding: .45rem .6rem; }
.slot-actions { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin-top: .5rem; }
.slot-state { font-weight: 600; margin: .4rem 0 0; }

/* Bilder, Teilen, soziale Netzwerke */
.event-image img { display: block; max-width: 100%; height: auto; border-radius: var(--radius, 14px); }
.social-preview { display: block; max-width: min(100%, 18rem); height: auto; border-radius: 10px; border: 1px solid var(--line); }
.image-current { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
.share-links { list-style: none; padding: 0; margin: 0 0 .6rem; display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.social-status { list-style: none; padding: 0; margin: 0; }
.social-status li { margin: 0 0 .6rem; }
.form-error-inline { color: var(--tt-gap-ink, #a3261a); }

/* Ganze Terminkachel anklickbar: der Titel-Link spannt sich über die Kachel, weitere Links liegen darüber */
.event, .featured { position: relative; }
.event-title a::after, .featured .stretch-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.event .event-meta a, .featured .btn { position: relative; z-index: 1; }
.featured .stretch-link { color: inherit; text-decoration: none; }
.featured .stretch-link:hover { color: var(--accent); }
.event:has(.event-title a), .featured { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.event:has(.event-title a:hover), .featured:has(.stretch-link:hover) { border-color: var(--accent); box-shadow: var(--shadow); }
.event-title a:focus-visible, .featured .stretch-link:focus-visible { outline: none; }
.event:has(.event-title a:focus-visible), .featured:has(.stretch-link:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Gesamtübersicht Besetzung */
.overview-table th[scope="row"] { white-space: nowrap; }
.ov-cell { line-height: 1.3; min-width: 7.5rem; }
.ov-cell a { display: block; color: inherit; text-decoration: none; }
.ov-cell a:hover strong { text-decoration: underline; }
.ov-note { display: block; font-size: .85em; }
.ov-open { background: var(--staff-bg); color: var(--staff-ink); box-shadow: inset 4px 0 0 var(--staff-line); }
.ov-open .ov-note { font-weight: 600; }
.ov-full { background: var(--accent-soft); }
.ov-past, .ov-none { color: var(--ink-soft); }
.open-slots { margin: 1.5rem 0 2rem; }
.open-slots.has-open { border-color: var(--staff-line); box-shadow: inset 5px 0 0 var(--staff-line); }
.open-slots .h4 { margin: 1rem 0 .4rem; font-size: 1rem; }
.open-slot-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.open-slot-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; padding: .45rem .7rem; border-radius: 8px; background: var(--staff-bg); color: var(--staff-ink); }
.open-slot-list a { color: inherit; }
.pill-staff { background: var(--staff-bg); color: var(--staff-ink); border-color: var(--staff-line); }

/* Wappen im Startseiten-Kopf */
.hero-crest { display: none; }
@media (min-width: 900px) {
  .hero-with-crest { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 3rem; align-items: center; }
  .hero-with-crest > :not(.hero-crest) { grid-column: 1; }
  .hero-crest { display: block; grid-column: 2; grid-row: 1 / span 4; }
  .hero-crest img { display: block; width: clamp(200px, 22vw, 290px); height: auto; filter: drop-shadow(0 10px 24px rgba(0,0,0,.45)); }
}

/* E-Mail an Mitglieder */
.narrow-wide { max-width: 56rem; }
.mail-form .card { margin-bottom: 1.2rem; }
.mail-form textarea { width: 100%; }
.mail-preview { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--sans); font-size: .95rem; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; margin: 1rem 0 0; }
.recipient-list { columns: 2 16rem; padding-left: 1.2rem; margin: .5rem 0 0; }
.people-filter { margin: .6rem 0; max-width: 20rem; }
.action-row form { display: inline-block; margin: 0 .6rem .6rem 0; }

/* Pflichtstunden */
.target-box { margin: 0 0 1.5rem; }
.target-box p { margin: .4rem 0 0; }
.target-bar { height: .7rem; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); overflow: hidden; max-width: 32rem; }
.target-fill { display: block; height: 100%; background: var(--staff-line); }
.target-box.is-met .target-fill { background: #2e7d32; }
.target-fill.w0 { width: 0%; }
.target-fill.w5 { width: 5%; }
.target-fill.w10 { width: 10%; }
.target-fill.w15 { width: 15%; }
.target-fill.w20 { width: 20%; }
.target-fill.w25 { width: 25%; }
.target-fill.w30 { width: 30%; }
.target-fill.w35 { width: 35%; }
.target-fill.w40 { width: 40%; }
.target-fill.w45 { width: 45%; }
.target-fill.w50 { width: 50%; }
.target-fill.w55 { width: 55%; }
.target-fill.w60 { width: 60%; }
.target-fill.w65 { width: 65%; }
.target-fill.w70 { width: 70%; }
.target-fill.w75 { width: 75%; }
.target-fill.w80 { width: 80%; }
.target-fill.w85 { width: 85%; }
.target-fill.w90 { width: 90%; }
.target-fill.w95 { width: 95%; }
.target-fill.w100 { width: 100%; }
.inline-fields { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.inline-fields input { flex: 0 1 12rem; }
.hours-table .target-bar { min-width: 8rem; margin-bottom: .25rem; }
.overview-table th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--bg-alt); }
.overview-table thead th:first-child { position: sticky; left: 0; z-index: 2; }

/* ---------- Freigaben & Teilnahme ---------- */
.approval-card { border-left: 4px solid var(--staff-line); background: var(--staff-bg); color: var(--ink); margin-top: 1rem; }
.approval-card .action-row { margin: .6rem 0; }
.reject-form { display: grid; gap: .4rem; margin-top: .6rem; }
.reject-form textarea { width: 100%; }
.reject-form .btn { justify-self: start; }
.approval-item { margin-bottom: 1rem; }
.approval-item .approval-card { margin-top: .6rem; }
.participation { margin: 1.2rem 0; }
.participation .action-row { align-items: flex-start; }

/* ---------- Gruppenbaum & Ämter ---------- */
.group-depth-1 { padding-left: 1.6rem; } .group-depth-2 { padding-left: 2.8rem; } .group-depth-3 { padding-left: 4rem; }
.sub-mark { color: var(--ink-soft); }
.pill-office { background: #e8eef9; color: #1d3c78; border-color: #b9c9ea; }
.card.person .vacant { color: var(--ink-soft); font-style: italic; }

/* ---------- Mitgliedsdaten & Lastschriftmandat ---------- */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.card-inset { background: var(--bg-alt); border-radius: calc(var(--radius, 14px) / 2); padding: .8rem 1rem; margin: 1rem 0; }
.mandate-text p { margin: .3rem 0; font-size: .95rem; }
p.mandate-text { white-space: pre-line; font-size: .92rem; }
.mandate-card { margin-bottom: 1.25rem; }
.past-mandates { margin-top: 1rem; }
dd.mono { overflow-wrap: anywhere; }

/* ---------- Hervorhebung auf der Startseite ---------- */
.indent { margin: -.2rem 0 .8rem 2rem; }
.indent label { margin-top: 0; }

/* ---------- Seiten bearbeiten ---------- */
.code-area { width: 100%; min-height: 24rem; font-size: .88rem; line-height: 1.45; tab-size: 2; white-space: pre; overflow: auto; }
.preview-bar { background: var(--staff-bg); color: var(--staff-ink); border-bottom: 2px solid var(--staff-line); padding: .7rem 0; font-size: .95rem; }
.check-tree .check-sub { margin-left: 1.6rem; }
.implied-note { font-size: .75rem; }
/* Administratoren: fremde Eintragungen auf der Terminseite entfernen */
.chip-remove { display: inline; margin: 0 0 0 .3rem; }
.chip-remove button { background: none; border: 0; padding: 0 .15rem; font: inherit; font-weight: 700; line-height: 1; color: #a3261a; cursor: pointer; }
.chip-remove button:hover, .chip-remove button:focus-visible { background: #fbe3df; border-radius: 4px; }
.admin-entries { margin-top: .6rem; }
.admin-entries ul { list-style: none; padding: 0; margin: .4rem 0 0; }
.admin-entries li { display: flex; gap: .6rem; align-items: baseline; padding: .15rem 0; }
.delete-event { margin-top: 1.5rem; }

/* ---------- Mitgliedsantrag ---------- */
.plz-ort { display: grid; grid-template-columns: minmax(5.5rem, 1fr) 3fr; gap: 0 .8rem; }
.label-like { display: block; font-weight: 600; margin: 1rem 0 .35rem; font-size: .95rem; }
.static-value { margin: .2rem 0 0; padding: .55rem 0; overflow-wrap: anywhere; }
.check-row { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
.application-status { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
.consent-list { list-style: none; padding: 0; margin: .4rem 0 1rem; font-size: .92rem; }
.consent-list li { padding: .2rem 0 .2rem 1.4rem; text-indent: -1.4rem; }
.application-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .8rem; }
.application-status > span:first-child { flex: 1 1 18rem; }

/* ---------- Postfach ---------- */
.mail-list { list-style: none; padding: 0; margin: 0 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.mail-row + .mail-row { border-top: 1px solid var(--line); }
.mail-row a { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) auto; gap: .2rem 1rem; padding: .65rem .9rem; color: inherit; text-decoration: none; }
.mail-row a:hover, .mail-row a:focus-visible { background: var(--bg-alt); }
.mail-row.is-unread { font-weight: 700; }
.mail-row.is-unread .mail-from::before { content: "●"; color: var(--accent); margin-right: .35rem; font-size: .7em; vertical-align: .15em; }
.mail-from, .mail-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-date { font-size: .85rem; color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 640px) {
  .mail-row a { grid-template-columns: minmax(0, 1fr) auto; }
  .mail-subject { grid-column: 1 / -1; grid-row: 2; }
}
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .97rem; line-height: 1.55; }
.mail-head { margin-top: .6rem; }
.mail-head dd { overflow-wrap: anywhere; }
.pager { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.plain-cards { list-style: none; padding: 0; }

/* ---------- Einwilligung bei der Anmeldung ---------- */
.consent-dialog { width: min(40rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; background: var(--surface); color: inherit; box-shadow: var(--shadow); }
.consent-dialog::backdrop { background: rgba(20, 16, 10, .55); }
.consent-question { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin: 0 0 1rem; }
.consent-question legend { font-weight: 700; padding: 0 .3rem; }
.consent-question p { margin: .3rem 0 .5rem; }
.consent-choice { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.consent-state .plain-list { margin: .3rem 0 .6rem; }
.consent-no { color: #a3261a; font-weight: 700; }

/* ---------- Auskunft nach Art. 15 DSGVO ---------- */
.auskunft-info div, .auskunft-record div { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: .2rem 1rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.auskunft-info dt, .auskunft-record dt { font-weight: 700; }
.auskunft-info dd, .auskunft-record dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.auskunft-record { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 1rem; margin: 0 0 .8rem; }
.auskunft-record div:last-child { border-bottom: 0; }
.auskunft-toc ul { columns: 2 16rem; padding-left: 1.1rem; }
.auskunft-section h3 { margin-top: 1.6rem; }
@media (max-width: 560px) { .auskunft-info div, .auskunft-record div { grid-template-columns: minmax(0, 1fr); } }
@media print { .site-header, .site-footer, .action-row, .crumb, .proto-bar { display: none !important; } .auskunft-record { break-inside: avoid; } }

/* Stift-Knopf (Bearbeiten) neben einem Tabelleneintrag – in der ersten Spalte, damit er nie aus dem Bild scrollt */
.row-with-action { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; min-width: min(16rem, 70vw); }
.row-with-action > div { min-width: 0; overflow-wrap: break-word; }
.row-with-action .small { overflow-wrap: anywhere; }      /* lange E-Mail-Adressen dürfen umbrechen, Namen nicht */
.row-with-action .icon-btn { flex: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 10px; border: 1px solid var(--line); color: var(--accent); background: var(--surface); }
.icon-btn:hover, .icon-btn:focus-visible { background: var(--bg-alt); border-color: var(--accent); }
.icon-btn .icon { width: 1.1rem; height: 1.1rem; }

/* Termin-Formular: Absender-Hinweis – lange Adressen dürfen umbrechen */
#mail-sender-name { overflow-wrap: anywhere; }

/* Anmeldung mit Bestätigung und Zahlung: drei Spalten Anmeldung · Bestätigt · Zahlung (✓ / ✗ / – mit Text) */
.reg-mark { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; font-size: .9rem; }
.reg-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; font-weight: 700; flex: none; }
.reg-ok .reg-icon { background: var(--tt-full-bg); color: var(--tt-full-ink); }
.reg-no .reg-icon { background: var(--tt-gap-bg); color: var(--tt-gap-ink); }
.reg-no { font-weight: 600; }
.reg-none { color: var(--ink-soft); }
.reg-none .reg-icon { background: var(--bg-alt); color: var(--ink-soft); }
.reg-table-wrap { margin: .5rem 0 1rem; }
.reg-table { min-width: 0; width: auto; }
.payment-box { border: 1px solid var(--line); border-left: 4px solid var(--tt-gap-ink); background: var(--surface); border-radius: 10px; padding: .9rem 1.1rem; margin: .5rem 0 1rem; }
.payment-box p { margin: 0 0 .5rem; }
.payment-box p:last-child { margin-bottom: 0; }
.payment-data { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: .5rem 0 .75rem; }
.payment-data dt { color: var(--ink-soft); font-size: .9rem; }
.payment-data dd { margin: 0; overflow-wrap: anywhere; }
.payment-ref { font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; }
@media (max-width: 420px) { .payment-data { grid-template-columns: 1fr; gap: 0; } .payment-data dd { margin-bottom: .45rem; } }
.reg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-bottom: .35rem; }
.pay-form { display: inline-flex; align-items: center; gap: .4rem; }
.input-money { width: 6.5rem; }
.search-form { margin-bottom: 1.5rem; } .search-form input { max-width: 22rem; }

/* Panel „Meine Anmeldungen“: rechts auf allen Seiten (zugeklappt nur der Reiter) */
.side-panel { position: fixed; right: 0; top: 7rem; z-index: 45; display: flex; flex-direction: column; align-items: flex-end; max-width: 100vw; }
.side-tab { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; background: var(--header); color: var(--header-ink); padding: .5rem .75rem; border-radius: 10px 0 0 10px; box-shadow: var(--shadow); font-weight: 600; font-size: .9rem; max-width: calc(100vw - .5rem); }
.side-tab::-webkit-details-marker { display: none; }
.side-tab::marker { content: ""; }
.side-tab::before { content: "‹"; font-size: 1.1rem; line-height: 1; }
.side-panel[open] .side-tab::before { content: "›"; }
.side-panel[open] .side-tab { border-radius: 10px 0 0 0; }
.side-tab:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.side-tab .pill { font-size: .72rem; }
.side-body { width: min(23rem, calc(100vw - .5rem)); max-height: calc(100vh - 12rem); overflow: auto; overscroll-behavior: contain; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-right: 0; border-radius: 0 0 0 12px; box-shadow: var(--shadow); padding: .6rem .8rem .9rem; }
.side-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.side-table th, .side-table td { padding: .45rem .2rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.side-table thead th { font-size: .66rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); vertical-align: bottom; hyphens: manual; }
.side-table .side-col { width: 3.2rem; text-align: center; }
.side-table tbody th { font-weight: 600; overflow-wrap: anywhere; }
.side-when { display: block; font-weight: 400; font-size: .8rem; color: var(--ink-soft); }
.side-table .reg-icon { width: 1.45rem; height: 1.45rem; }
.side-row-open th, .side-row-open td { border-bottom: 0; }
.side-pay-row td { padding-top: 0; }
.side-pay > summary { cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--tt-gap-ink); }
.side-pay .payment-box { margin: .4rem 0 0; padding: .6rem .7rem; font-size: .88rem; }
.side-pay .payment-data { grid-template-columns: 1fr; gap: 0; }
.side-pay .payment-data dd { margin-bottom: .35rem; }
.side-legend { font-size: .74rem; color: var(--ink-soft); margin: .5rem 0 0; }
.side-head { font-size: 1rem; margin: .9rem 0 .3rem; }
.side-shifts { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.side-shifts li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
@media print { .side-panel { display: none; } }
.side-body > .side-head:first-child { margin-top: .2rem; }
.side-todo { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.side-todo li { border-bottom: 1px solid var(--line); }
.side-todo a { display: block; padding: .4rem .1rem; text-decoration: none; color: var(--ink); }
.side-todo a:hover strong, .side-todo a:focus-visible strong { text-decoration: underline; }
.side-todo .unread-some { color: var(--tt-gap-ink); font-weight: 700; }
/* Besetzungsübersicht: Anmeldung · Bestätigt · Zahlung wie in der Übersicht (nur Zeichen, Text für Bildschirmleser) */
.reg-col { text-align: center; width: 3.6rem; }
th.reg-col { font-size: .7rem; }

/* Seite LARP / Cons: Leiste zum Auswählen eines Cons */
.cons-bar { display: flex; gap: .6rem; overflow-x: auto; padding: .2rem .1rem .6rem; scrollbar-width: thin; }
.con-chip { flex: 0 0 auto; display: flex; flex-direction: column; gap: .1rem; max-width: 18rem; padding: .6rem 1rem; border: 1px solid var(--line); border-radius: var(--radius, 14px); background: var(--surface); color: var(--ink); text-decoration: none; }
.con-chip strong { overflow-wrap: anywhere; }
.con-chip span { font-size: .85rem; color: var(--ink-soft); }
.con-chip:hover, .con-chip:focus-visible { border-color: var(--accent); }
.con-chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.con-chip.is-active span { color: var(--accent-ink); }
.con-detail { padding-top: 1rem; }
.con-image { border-radius: var(--radius, 14px); max-width: 100%; height: auto; }

/* Termin-Formular: Preisstufen (ab Datum → Preis) */
.price-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-bottom: .45rem; }
.price-from { display: inline-flex; align-items: center; gap: .4rem; min-width: 13.5rem; }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li { display: flex; justify-content: space-between; gap: 1rem; }
.price-list .is-current { font-weight: 700; }

/* Rückfrage „Zahlung eingegangen“ (aufklappend) */
.pay-confirm > summary { list-style: none; display: inline-block; cursor: pointer; }
.pay-confirm > summary::-webkit-details-marker { display: none; }
.pay-confirm[open] > summary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.pay-confirm-box { margin-top: .5rem; padding: .7rem .8rem; border: 1px solid var(--accent); border-radius: var(--radius, 14px); background: var(--surface); white-space: normal; max-width: 26rem; }
.pay-confirm-box p { margin: 0 0 .5rem; }
.pay-confirm-box label { display: block; font-size: .9rem; font-weight: 600; }
.pay-confirm-box .action-row { margin: .6rem 0 0; }
/* Kasse: Abgleich */
.entry-purpose { max-width: 22rem; overflow-wrap: anywhere; }

/* Teilnahme-Anmeldung: Anzahl Personen */
.persons-field { display: inline-flex; align-items: center; gap: .4rem; font-size: .92rem; }
.input-persons { width: 4.5rem; }
.companions-cell { color: var(--tt-gap-ink); white-space: nowrap; }
.companions-note { margin: .5rem 0 1rem; }

/* ---------- Unterlagen zu Terminen ---------- */
.documents { margin: 1.5rem 0; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.doc-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.doc-list li > a { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; text-decoration: none; }
.doc-list li > a:hover .doc-title { text-decoration: underline; }
.doc-icon { display: inline-block; min-width: 2.6rem; padding: .15rem .3rem; border-radius: 6px; background: var(--accent-soft); border: 1px solid var(--line); font-size: .7rem; font-weight: 700; text-align: center; letter-spacing: .03em; }
.doc-meta { font-size: .85rem; color: var(--ink-soft); }
.documents-manage { margin-top: 2rem; }
.doc-manage-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; }
.doc-manage { border: 1px solid var(--line); border-radius: 10px; padding: .75rem; }
.doc-edit { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: flex-start; margin: 0; }
.doc-fields { flex: 1 1 18rem; display: grid; gap: .4rem; }
.doc-fields input, .doc-fields select { margin: 0; }
.doc-actions { display: flex; gap: .4rem; align-items: center; }
.doc-delete { margin-top: .4rem; font-size: .9rem; }
.doc-delete summary { cursor: pointer; color: var(--accent); }
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.5rem 1rem; text-align: center; background: var(--surface); transition: border-color .15s, background .15s; }
.dropzone.is-over { border-color: var(--gold); background: var(--accent-soft); }
.dropzone.is-locked { opacity: .6; }
.dropzone-text { margin: 0 0 .6rem; }
.dropzone-status { margin: .6rem 0 0; min-height: 1.2em; }
.dropzone-status.is-error { color: var(--accent); font-weight: 600; }
.dropzone-input { display: block; margin: .6rem auto 0; max-width: 100%; }
.dropzone-form.is-enhanced .dropzone-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; opacity: 0; overflow: hidden; }
.dropzone-form.is-enhanced .dropzone-submit { display: none; }
