/* TerminFinder – Gestaltung. Hell/Dunkel über prefers-color-scheme oder data-theme. */

@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F6F6F4; --surface: #FFFFFF; --sunken: #EEEEEB; --seg: #FFFFFF;
  --border: #E4E4E0; --strong: #C9C9C2; --switch-off: #8E8E96; --knob-off: #6B6B74;
  --text: #111113; --muted: #5A5A63;
  --primary: #111113; --on-primary: #FFFFFF;
  --accent: #4338CA; --on-accent: #FFFFFF; --accent-soft: #EEEEFF; --accent-text: #3730A3;
  --ok: #0D7240; --ok-soft: #E6F4EC;
  --bad: #B42318; --bad-soft: #FCEBE9; --on-bad: #FFFFFF;
  --warn: #8A5300; --warn-soft: #FFF3D6;
  --shadow: 0 1px 2px rgba(17,17,19,.05), 0 12px 32px -18px rgba(17,17,19,.18);
  --radius: 18px;
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090B; --surface: #131316; --sunken: #1C1C21; --seg: #2E2E36;
    --border: #26262C; --strong: #3B3B44; --switch-off: #4A4A54; --knob-off: #A6A6B2;
    --text: #F4F4F6; --muted: #A6A6B2;
    --primary: #F4F4F6; --on-primary: #09090B;
    --accent: #A5A0FF; --on-accent: #09090B; --accent-soft: rgba(165,160,255,.14); --accent-text: #C9C6FF;
    --ok: #4ADE80; --ok-soft: rgba(74,222,128,.12);
    --bad: #FF8E80; --bad-soft: rgba(255,142,128,.12); --on-bad: #09090B;
    --warn: #F7C754; --warn-soft: rgba(247,199,84,.12);
    --shadow: 0 0 0 1px rgba(255,255,255,.02), 0 16px 40px -20px rgba(0,0,0,.9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090B; --surface: #131316; --sunken: #1C1C21; --seg: #2E2E36;
  --border: #26262C; --strong: #3B3B44; --switch-off: #4A4A54; --knob-off: #A6A6B2;
  --text: #F4F4F6; --muted: #A6A6B2;
  --primary: #F4F4F6; --on-primary: #09090B;
  --accent: #A5A0FF; --on-accent: #09090B; --accent-soft: rgba(165,160,255,.14); --accent-text: #C9C6FF;
  --ok: #4ADE80; --ok-soft: rgba(74,222,128,.12);
  --bad: #FF8E80; --bad-soft: rgba(255,142,128,.12); --on-bad: #09090B;
  --warn: #F7C754; --warn-soft: rgba(247,199,84,.12);
  --shadow: 0 0 0 1px rgba(255,255,255,.02), 0 16px 40px -20px rgba(0,0,0,.9);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent-text); }
h1, h2, h3, .h1, .h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.2; }
h1, .h1 { font-size: 34px; font-weight: 650; letter-spacing: -0.03em; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; margin-top: 20px; }
.h3 { font-size: 18px; font-weight: 600; }
hr { border: 0; height: 1px; background: var(--border); margin: 0; }
code { font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--sunken); word-break: break-all; }
small { font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1:focus { outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--primary); color: var(--on-primary); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lg { font-size: 18px; }
.block { display: block; }
.strong { font-weight: 600; }
.ok-text { color: var(--ok); }
.bad-text { color: var(--bad); }
.ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }

/* ---------------- Layout */

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex: none; position: sticky; top: 0; height: 100vh;
  padding: 24px 16px; background: var(--surface); border-right: 1px solid var(--border);
  display: none; flex-direction: column; gap: 4px;
}
body.logged-in .sidebar { display: flex; }
@media (min-width: 861px) { body.logged-in .layout { background: linear-gradient(to right, var(--surface) 247px, var(--border) 247px, var(--border) 248px, transparent 248px); } }
main { flex: 1; min-width: 0; padding: 40px clamp(16px, 4vw, 48px) 80px; }
main:focus { outline: none; }
.page { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.page.narrow { max-width: 860px; }
.page-head { display: flex; flex-direction: column; gap: 6px; }
.page-head p { margin: 0; max-width: 640px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.loading { padding: 64px 0; text-align: center; color: var(--muted); }

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 12px 24px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: -.02em; }
.brand.big { padding: 0 0 8px; font-size: 20px; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; }
.logo .ic { stroke-width: 2.6; }
.nav-item {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500; text-decoration: none;
}
.nav-item:hover { background: var(--sunken); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--sunken); color: var(--text); font-weight: 600; }
.nav-item span:first-of-type { flex: 1; }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.nav-foot { margin-top: auto; padding: 16px 12px 0; display: flex; gap: 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.nav-foot .ic { margin-top: 2px; }

.tabbar { display: none; }

@media (max-width: 860px) {
  body.logged-in .sidebar { display: none; }
  main { padding: 24px 16px calc(100px + env(safe-area-inset-bottom)); }
  body.logged-in .tabbar {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .tabbar a { position: relative; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 500; text-decoration: none; }
  .tabbar a[aria-current="page"] { color: var(--text); font-weight: 600; }
  .tabbar .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }
  h1, .h1 { font-size: 28px; }
}

/* ---------------- Karten und Spalten */

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
@media (max-width: 560px) { .card { padding: 18px; border-radius: 16px; } }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-main { flex: 3 1 520px; gap: 24px; }
.col-side { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 1100px) { .col-side { position: sticky; top: 24px; } }
.block { display: flex; flex-direction: column; gap: 12px; }
.card p, .block p { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.grid4 { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
  .grid3, .grid4 { grid-template-columns: 1fr 1fr; }
  .grid3 > .btn, .grid4 > .btn { grid-column: 1 / -1; }
  .grid4 > .field:first-child { grid-column: 1 / -1; }
}
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row-between.wrap { flex-wrap: wrap; }
.row-between.top { align-items: flex-start; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.summary { margin: 0; font-size: 16px; line-height: 1.55; }
.empty { margin: 0; padding: 16px 20px; border-radius: 14px; border: 1px dashed var(--strong); color: var(--muted); }

/* ---------------- Formularfelder */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
input:not([type="checkbox"]):not([type="file"]), select, textarea {
  height: 48px; width: 100%; padding: 0 14px; border-radius: 12px; border: 1px solid var(--strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 16px; min-width: 0;
}
input[type="date"], input[type="time"] { font-variant-numeric: tabular-nums; }
select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
input::placeholder { color: var(--muted); opacity: .8; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1; height: 44px; }

/* ---------------- Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .06s ease, opacity .15s ease, background-color .15s ease;
}
.btn:active:not([disabled]) { transform: translateY(1px); }
.btn[disabled] { cursor: not-allowed; background: var(--sunken) !important; color: var(--muted) !important; border-color: var(--border) !important; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.primary:hover:not([disabled]) { opacity: .88; }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--strong); }
.btn.secondary:hover { border-color: var(--text); }
.btn.ghost { background: transparent; color: var(--text); }
.btn.ghost:hover { background: var(--sunken); }
.btn.accent { background: var(--accent); color: var(--on-accent); }
.btn.danger { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: var(--on-bad); }
.btn.danger-outline { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn.danger-solid { background: var(--bad); color: var(--on-bad); }
.btn.block { width: 100%; }
.btn.lg { min-height: 52px; font-size: 16px; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.icon-only { width: 44px; padding: 0; flex: none; }
.icon-btn { width: 40px; height: 40px; flex: none; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--sunken); color: var(--text); }
.link-btn { border: 0; background: transparent; color: var(--accent-text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; padding: 8px 4px; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions.tight { gap: 8px; }
.actions > label.btn { position: relative; }
@media (max-width: 560px) { .main-proposal .actions .btn { flex: 1 1 100%; } }

/* ---------------- Segmente, Chips, Schalter */

.seg { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--sunken); }
.seg button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; padding: 0 8px; line-height: 1.2; }
.seg button[aria-pressed="true"] { background: var(--seg); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.14); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.small-gap { gap: 4px; margin-top: -4px; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--text); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.chip.on.dark { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip.dashed { border-style: dashed; background: transparent; min-height: 36px; font-size: 13px; }
.chip .count { opacity: .75; font-variant-numeric: tabular-nums; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { height: 48px; border-radius: 12px; border: 1px solid var(--strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.day.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 400px) { .days { gap: 5px; } .day { height: 44px; border-radius: 10px; font-size: 14px; } }

.switch { flex: none; width: 48px; height: 28px; padding: 3px; border-radius: 999px; border: 1.5px solid var(--switch-off); background: transparent; cursor: pointer; display: flex; justify-content: flex-start; }
.switch span { width: 19px; height: 19px; border-radius: 999px; background: var(--knob-off); transition: transform .15s ease; }
.switch[aria-checked="true"] { background: var(--primary); border-color: var(--primary); }
.switch[aria-checked="true"] span { background: var(--on-primary); transform: translateX(20px); }

/* ---------------- Hinweise */

.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--sunken); color: var(--text); }
.alert > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.alert .ic { margin-top: 1px; }
.alert span { font-size: 14px; }
.alert strong { font-weight: 600; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--sunken); color: var(--text); }
.alert .btn { align-self: flex-start; margin-top: 6px; }
.alert a { color: inherit; font-weight: 600; }
.banner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); }
.banner span { flex: 1 1 260px; font-weight: 500; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--sunken); color: var(--text); white-space: nowrap; }
.pill.st-gefunden, .pill.st-ok, .pill.st-festgelegt { background: var(--ok-soft); color: var(--ok); }
.pill.st-kein { background: var(--sunken); color: var(--muted); }
.pill.st-abgebrochen { background: var(--bad-soft); color: var(--bad); }
.pill.st-offen { background: var(--warn-soft); color: var(--warn); }
.pill.st-new { background: var(--accent); color: var(--on-accent); }
.pill.st-neutral { background: transparent; border: 1px solid var(--strong); }

/* ---------------- Teilnehmer, Listen */

.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.people li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.people li:first-child { border-top: 0; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.grow strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow small { color: var(--muted); }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 999px; background: var(--sunken); color: var(--text); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.avatar.sq { border-radius: 9px; width: 34px; height: 34px; }
.tag { flex: none; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--sunken); color: var(--text); border: 1px solid transparent; font-family: inherit; min-height: 32px; cursor: default; }
button.tag { cursor: pointer; }
.tag.outline { background: transparent; color: var(--muted); border-color: var(--strong); }
.pstat { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.pstat.ps-beantwortet { color: var(--ok); font-weight: 600; }
.list { display: flex; flex-direction: column; gap: 10px; }
.list-row {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font: inherit; text-align: left; cursor: pointer; width: 100%;
}
.list-row:hover { border-color: var(--strong); }
.list-row.static { cursor: default; }
.list-row.strong { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.list.plain .list-row { background: transparent; border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 10px 0; }
.list.plain .list-row:first-child { border-top: 0; }
.range-row { padding: 6px 0; border-bottom: 1px solid var(--border); }
.progress { height: 8px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

details.more { border-top: 1px solid var(--border); padding-top: 16px; display: flex; flex-direction: column; gap: 16px; }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--accent-text); list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px; }
details.more > summary::before { content: '+'; font-size: 18px; width: 18px; text-align: center; }
details.more[open] > summary::before { content: '–'; }
details.more[open] > :not(summary) { margin-top: 12px; }

/* ---------------- Ergebnis */

.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); font-weight: 500; text-decoration: none; }
.hero { display: flex; align-items: center; gap: 16px; }
.hero-ic { width: 56px; height: 56px; flex: none; border-radius: 999px; background: var(--sunken); display: inline-flex; align-items: center; justify-content: center; }
.hero-ic.ok { background: var(--ok-soft); color: var(--ok); }
.hero .h1 { font-size: 28px; }
.main-proposal { border: 1.5px solid var(--text); padding: 32px; gap: 24px; }
@media (max-width: 560px) { .main-proposal { padding: 20px; } }
.big-date { font-size: 38px; line-height: 1.1; font-weight: 650; letter-spacing: -.035em; margin-top: 6px; }
@media (max-width: 560px) { .big-date { font-size: 26px; } .hero .h1 { font-size: 24px; } }
.alts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.alt { padding: 20px; gap: 6px; box-shadow: none; }
.alt-date { font-size: 18px; letter-spacing: -.02em; }
.alt .actions { margin-top: 8px; gap: 8px; }

.answer { border: 1.5px solid var(--accent); }
.src-list { display: flex; flex-direction: column; }
.report { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.slots { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.slot { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.slot .slot-state { font-weight: 600; color: var(--bad); }
.slot.free .slot-state { color: var(--ok); }

/* ---------------- Anfragen */

.req { gap: 14px; }
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.notes li { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--border); }
.notes li:first-child { border-top: 0; }
.notes li.unread { font-weight: 600; }
.notes a { color: var(--text); text-decoration: none; }
.notes small { color: var(--muted); font-weight: 400; }

/* ---------------- Einstellungen */

.set-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.set-row select { width: auto; min-width: 160px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.tile { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.tile strong { font-size: 14px; line-height: 1.25; white-space: normal; }
.tile small { font-size: 12px; }
.tile.on { border: 2px solid var(--text); padding: 9px 11px; }
.detail { padding: 18px; border-radius: 14px; background: var(--sunken); display: flex; flex-direction: column; gap: 12px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.detail details.more { border-color: var(--strong); }
.matrix { display: flex; flex-direction: column; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px; gap: 8px; align-items: center; min-height: 52px; border-top: 1px solid var(--border); }
.mrow > span:not(:first-child) { display: flex; justify-content: center; }
.mrow.head { font-size: 13px; font-weight: 600; color: var(--muted); border-top: 0; min-height: 32px; }
.danger-zone { border: 1.5px solid var(--bad); box-shadow: none; }
.danger-zone h2 { color: var(--bad); }

/* ---------------- Anmeldung */

.auth { min-height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.auth-card h1 { font-size: 28px; }
.row-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0; }
.row-links a { font-weight: 600; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }

/* ---------------- Dialog und Meldungen */

dialog { border: 0; border-radius: 20px; padding: 28px; max-width: min(480px, calc(100vw - 32px)); width: 100%; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
dialog::backdrop { background: rgba(9,9,11,.55); }
dialog h2 { font-size: 20px; }
dialog p { margin: 0; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100vw - 32px)); pointer-events: none; }
@media (max-width: 860px) { body.logged-in .toasts { bottom: calc(88px + env(safe-area-inset-bottom)); } }
.toast { background: var(--primary); color: var(--on-primary); padding: 14px 16px; border-radius: 14px; font-size: 14px; font-weight: 500; box-shadow: 0 12px 30px -12px rgba(0,0,0,.4); animation: tfin .2s ease; pointer-events: auto; }
.toast.bad { background: var(--bad); color: var(--on-bad); }
.toast.out { opacity: 0; transition: opacity .4s ease; }
@keyframes tfin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.page > p { margin: 0; }
