/* =========================================================
   Weihnachtsmarkt Lippoldsberg – Ausstelleranmeldung
   Fir green, Santa red and candle gold on snow white.
   ========================================================= */

@font-face { font-family: "Alegreya"; font-weight: 700; font-display: swap; src: url("../fonts/alegreya-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Alegreya"; font-weight: 800; font-display: swap; src: url("../fonts/alegreya-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; font-display: swap; src: url("../fonts/alegreya-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/alegreya-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 700; font-display: swap; src: url("../fonts/alegreya-sans-latin-700-normal.woff2") format("woff2"); }

:root {
    --tanne: #1E3D2F;
    --tanne-2: #2C5641;
    --nacht: #14261D;
    --rot: #B8282E;
    --rot-dunkel: #8E1D22;
    --gold: #E2B04A;
    --gold-hell: #F6E7BF;
    --schnee: #F6F4EE;
    --papier: #FFFFFF;
    --tinte: #1F2A24;
    --grau: #5B6660;
    --linie: #E1DCCF;
    --ok: #2E7D4F;
    --ok-bg: #E4F2E8;
    --warn-bg: #FBF0D6;
    --err-bg: #FBE6E6;
    --radius: 10px;
    --serif: "Alegreya", Georgia, serif;
    --sans: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 1.125rem; line-height: 1.55; color: var(--tinte); background: var(--schnee); }
img { max-width: 100%; height: auto; }
a { color: var(--tanne); text-underline-offset: 0.18em; }
a:hover { color: var(--rot); }
h1, h2, h3 { font-family: var(--serif); font-weight: 800; line-height: 1.15; color: var(--nacht); }
h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin: 0 0 0.4em; }
h2 { font-size: 1.5rem; margin: 1.4em 0 0.5em; }
h3 { font-size: 1.2rem; margin: 1.2em 0 0.4em; }
p { margin: 0 0 0.9em; }
small, .small { font-size: 0.85em; }
code { font-size: 0.9em; background: var(--gold-hell); padding: 0 0.25em; border-radius: 3px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--nacht); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.container { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.container--narrow { width: min(100% - 2rem, 44rem); }
.lead { font-size: 1.2rem; color: var(--grau); }
.hint { font-size: 0.95rem; color: var(--grau); }
.optional { font-weight: 400; color: var(--grau); font-size: 0.9em; }
.inline { display: inline; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
    font: 700 1rem/1.2 var(--sans); padding: 0.7em 1.3em; border-radius: 999px; border: 2px solid var(--tanne);
    background: var(--tanne); color: #fff; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--nacht); border-color: var(--nacht); color: #fff; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--nacht); }
.btn--gold:hover { background: #F0C463; border-color: #F0C463; color: var(--nacht); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,0.6); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn--outline { background: transparent; color: var(--tanne); }
.btn--outline:hover { background: var(--tanne); color: #fff; }
.btn--danger { background: var(--rot); border-color: var(--rot); }
.btn--danger:hover { background: var(--rot-dunkel); border-color: var(--rot-dunkel); }
.btn--small { padding: 0.45em 1em; font-size: 0.95rem; }
.btn--tiny { padding: 0.25em 0.75em; font-size: 0.85rem; }
.btn--large { padding: 0.9em 1.8em; font-size: 1.15rem; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.link-button:hover { color: var(--rot); }

/* ---------- Public header / footer ---------- */
.topbar { background: var(--nacht); color: #fff; border-bottom: 3px solid var(--rot); }
.topbar__inner { width: min(100% - 2rem, 72rem); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; font-family: var(--serif); font-weight: 800; font-size: 1.15rem; line-height: 1.1; }
.brand:hover { color: var(--gold-hell); }
.topnav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; justify-content: flex-end; }
.topnav a, .topnav .link-button { color: #fff; text-decoration: none; font-weight: 700; }
.topnav a:hover, .topnav .link-button:hover { color: var(--gold); }
.topnav .btn--gold { color: var(--nacht); }
.main { min-height: 60vh; padding-bottom: 3rem; }
.site .main > .flash { width: min(100% - 2rem, 72rem); margin: 1rem auto 0; }
.footer { background: var(--nacht); color: #d9e2dc; font-size: 0.95rem; }
.footer__inner { width: min(100% - 2rem, 72rem); margin-inline: auto; padding: 1.75rem 0; }
.footer a { color: #fff; }
.footer p { margin: 0.2em 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer .footer__credit { margin: 0 0 0 auto; }
.footer__credit img { display: block; width: 120px; height: auto; opacity: 0.92; }
.footer__credit a { display: block; border-radius: 12px; }
.footer__credit a:hover img, .footer__credit a:focus-visible img { opacity: 1; }
@media (max-width: 40rem) {
    .footer__inner { flex-direction: column; align-items: flex-start; }
    .footer .footer__credit { margin: 0.25rem 0 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 85% 30%, var(--tanne-2) 0%, var(--tanne) 45%, var(--nacht) 100%); color: #fff; }
.hero__inner { position: relative; z-index: 1; width: min(100% - 2rem, 72rem); margin-inline: auto; display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 2rem; padding: 3.5rem 0 3rem; }
.hero__kicker { color: var(--gold); font-weight: 700; margin-bottom: 0.4rem; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 0.3em; }
.hero__year { color: var(--gold); white-space: nowrap; }
.hero__dates { font-size: 1.25rem; font-weight: 700; color: var(--gold-hell); }
.hero__lead { font-size: 1.15rem; max-width: 34rem; color: #e6ede8; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero__note { margin-top: 1rem; color: var(--gold-hell); }
.hero__art { width: 100%; max-width: 30rem; justify-self: end; filter: drop-shadow(0 18px 30px rgba(0,0,0,0.35)); }
/* Gentle snowfall – the one ambient motion on the site. */
.hero__snow {
    position: absolute; inset: -100% 0 0 0; z-index: 0; pointer-events: none; opacity: 0.55;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 80px 120px, #fff 50%, transparent 51%),
        radial-gradient(2.5px 2.5px at 150px 60px, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 210px 170px, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 260px 90px, #fff 50%, transparent 51%);
    background-size: 300px 220px;
    animation: snow 24s linear infinite;
}
@keyframes snow { to { transform: translateY(50%); } }
@media (prefers-reduced-motion: reduce) { .hero__snow { animation: none; } }

.band { background: var(--papier); border-bottom: 1px solid var(--linie); padding: 2.5rem 0; }
.band h2 { margin-top: 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 3rem; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--rot); color: #fff; font: 800 1.25rem/2.3rem var(--serif); text-align: center; }
.steps strong { display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--nacht); }
.howto-video { margin: 2.25rem auto 0; max-width: 52rem; }
.howto-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--nacht); box-shadow: 0 10px 30px rgba(17, 36, 27, 0.18); }
.howto-video figcaption { margin-top: 0.6rem; text-align: center; font-size: 0.95rem; color: var(--grau); }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; align-items: start; }
.info-grid--2 { grid-template-columns: 1fr 1fr; }
.card { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.5rem; }
.card h2 { margin-top: 0; }
.card--feature { border-top: 5px solid var(--rot); margin: 1.5rem 0; }
.card--map { padding: 0.75rem; margin: 0; }
.card--map figcaption { font-size: 0.9rem; color: var(--grau); padding: 0.5rem 0.25rem 0; }
.dates { margin: 0; display: grid; gap: 0.5rem; }
.dates div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.5rem; }
.dates dt { color: var(--grau); }
.dates dd { margin: 0; font-weight: 700; }
.dates--compact div { grid-template-columns: 9rem 1fr; }
.prices { width: 100%; border-collapse: collapse; }
.prices th, .prices td { padding: 0.35rem 0; border-bottom: 1px solid var(--linie); text-align: left; font-weight: 400; }
.prices td { text-align: right; font-weight: 700; white-space: nowrap; }
.prices small { color: var(--grau); }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 2rem; }
.page-head__art { width: 10rem; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { padding: 0.5rem 0; border-bottom: 1px solid var(--linie); }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
address { font-style: normal; margin-bottom: 1rem; }
.prose { max-width: 46rem; padding-top: 2rem; }
.prose p { text-align: left; }

/* ---------- Auth ---------- */
.auth { display: flex; justify-content: center; padding: 3rem 1rem; }
.auth__card { width: min(100%, 30rem); background: var(--papier); border: 1px solid var(--linie); border-top: 5px solid var(--rot); border-radius: var(--radius); padding: 2rem; }
.auth__card--wide { width: min(100%, 38rem); }
.auth__card h1 { font-size: 2rem; }
.auth__links { margin-top: 1.5rem; font-size: 0.98rem; }
.debug { white-space: pre-wrap; font-size: 0.8rem; background: #f4f4f4; padding: 1rem; overflow: auto; max-height: 20rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.3rem; min-width: 0; align-content: start; }
.field label { font-weight: 700; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"], input[type="date"], input:not([type]), select, textarea {
    font: inherit; font-size: 1.05rem; color: var(--tinte); width: 100%;
    background: #fff; border: 1.5px solid #B9B3A3; border-radius: 8px; padding: 0.6rem 0.75rem;
}
input[readonly] { background: var(--schnee); color: var(--grau); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--gold-hell); border-color: var(--tanne); }
[aria-invalid="true"] { border-color: var(--rot) !important; }
.field-error { color: var(--rot); font-weight: 700; font-size: 0.95rem; margin: 0; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; font-weight: 400; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; accent-color: var(--tanne); }
.check--small { font-size: 0.95rem; gap: 0.45rem; }
.check--small input { width: 1rem; height: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--street { grid-template-columns: 1fr 9rem; }
.grid--city { grid-template-columns: 9rem 1fr; }
.grid--dims { grid-template-columns: 9rem 9rem 1fr; align-items: end; }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 0.5rem; }
.form-actions--submit { padding: 1.5rem 0; }
.unit { display: flex; align-items: center; gap: 0.4rem; }
.unit span { color: var(--grau); font-weight: 700; }
.dims-result { margin: 0 0 0.7rem; color: var(--grau); }
fieldset.section { border: 1px solid var(--linie); background: var(--papier); border-radius: var(--radius); padding: 1.25rem 1.5rem 1.5rem; margin: 0; display: grid; gap: 1rem; min-width: 0; }
fieldset.section legend { font-family: var(--serif); font-weight: 800; font-size: 1.35rem; color: var(--nacht); padding: 0 0.4rem; }

.register-layout { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.5rem; align-items: start; }
.register-fields { display: grid; gap: 1.25rem; min-width: 0; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.6rem; }
.choice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.6rem; padding: 0.75rem 0.9rem; border: 1.5px solid var(--linie); border-radius: 8px; cursor: pointer; background: #fff; }
.choice:hover { border-color: var(--tanne-2); }
.choice:has(input:checked) { border-color: var(--tanne); background: #EEF4F0; }
.choice input { width: 1.15rem; height: 1.15rem; accent-color: var(--tanne); margin: 0; }
.choice__name { font-weight: 700; }
.choice__price { color: var(--grau); font-variant-numeric: tabular-nums; }
.choice--inactive { opacity: 0.6; }
.power { display: grid; gap: 0.6rem; }
.power__row { display: grid; grid-template-columns: 1fr 11rem; gap: 1rem; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--linie); }
.power__row label { font-weight: 700; }
.power__price { display: block; font-weight: 400; color: var(--grau); font-size: 0.95rem; }
.terms { padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--gold-hell); }
.terms--error { outline: 2px solid var(--rot); }

.summary { position: sticky; top: 1rem; background: var(--nacht); color: #fff; border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.summary h2 { color: var(--gold); margin: 0 0 0.75rem; font-size: 1.35rem; }
.summary__lines { list-style: none; margin: 0; padding: 0; font-size: 0.98rem; }
.summary__lines li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
.summary__lines .summary__empty { display: block; color: #c9d4cd; border: 0; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; margin: 0.9rem 0 0.4rem; font-size: 1.1rem; }
.summary__total strong { font-family: var(--serif); font-size: 1.9rem; color: var(--gold); }
.summary .hint { color: #c9d4cd; margin: 0; }

/* ---------- Flash & badges ---------- */
.flash { padding: 0.8rem 1rem; border-radius: 8px; margin: 0 0 1rem; border-left: 5px solid; }
.flash--success { background: var(--ok-bg); border-color: var(--ok); }
.flash--error { background: var(--err-bg); border-color: var(--rot); }
.flash--info { background: var(--warn-bg); border-color: var(--gold); }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0.1em 0.6em; border-radius: 999px; background: #ECE8DE; color: var(--grau); white-space: nowrap; }
.badge--submitted { background: var(--warn-bg); color: #7A5A12; }
.badge--confirmed { background: #E3ECF7; color: #24477A; }
.badge--paid { background: var(--ok-bg); color: var(--ok); }
.badge--cancelled { background: var(--err-bg); color: var(--rot-dunkel); }
.badge--large { font-size: 0.95rem; padding: 0.3em 0.9em; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
.lightbox::backdrop { background: rgba(10, 20, 15, 0.85); }
.lightbox img { display: block; max-width: 96vw; max-height: 88vh; background: #fff; border-radius: 6px; }
.lightbox button { margin-top: 0.5rem; }

/* =========================================================
   Admin
   ========================================================= */
.admin { display: grid; grid-template-columns: 15.5rem 1fr; min-height: 100vh; font-size: 1.05rem; }
.sidebar { background: var(--nacht); color: #dfe7e2; display: flex; flex-direction: column; padding: 1rem 0.75rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar__brand { display: flex; gap: 0.6rem; align-items: center; color: #fff; text-decoration: none; font: 800 1.2rem/1.1 var(--serif); padding: 0.25rem 0.5rem 1rem; border-bottom: 2px solid var(--rot); margin-bottom: 0.5rem; }
.sidebar__brand small { display: block; font: 400 0.85rem var(--sans); color: var(--gold); }
.sidebar__group { margin: 1rem 0.5rem 0.25rem; font-size: 0.85rem; color: #9fb2a7; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar a { display: block; color: #e8efea; text-decoration: none; padding: 0.4rem 0.6rem; border-radius: 6px; }
.sidebar a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar a[aria-current="page"] { background: var(--tanne-2); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.sidebar__foot { margin-top: auto; padding: 1rem 0.5rem 0; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.95rem; }
.sidebar__foot a { padding: 0; margin-bottom: 0.3rem; }
.sidebar__foot .link-button { color: #9fb2a7; }
.sidebar .sidebar__credit { display: inline-block; padding: 0; margin: 1.25rem 0 0.25rem; border-radius: 10px; }
.sidebar .sidebar__credit:hover { background: none; }
.sidebar__credit img { display: block; width: 100px; height: auto; opacity: 0.8; }
.sidebar__credit:hover img, .sidebar__credit:focus-visible img { opacity: 1; }
.admin-main { min-width: 0; }
.admin-top { display: flex; align-items: center; gap: 1rem; padding: 1rem 2rem; background: var(--papier); border-bottom: 1px solid var(--linie); }
.admin-top h1 { font-size: 1.7rem; margin: 0; }
.admin-top__site { margin-left: auto; font-size: 0.95rem; }
.menu-toggle { display: none; }
.admin-content { padding: 1.5rem 2rem 3rem; max-width: 90rem; }
.admin-content h2 { margin-top: 0; font-size: 1.3rem; }
.admin-content .panel h2 + * { margin-top: 0; }
.admin-content .panel h2:not(:first-child) { margin-top: 1.5rem; }
.panel { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; min-width: 0; }
.panel--form { max-width: 52rem; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.75rem; }
.panel__head h2 { margin: 0; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.admin-grid--wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.kpi { background: var(--papier); border: 1px solid var(--linie); border-top: 4px solid var(--tanne); border-radius: var(--radius); padding: 1rem 1.25rem; text-decoration: none; color: inherit; display: grid; }
a.kpi:hover { border-top-color: var(--rot); }
.kpi__value { font: 800 2rem/1.1 var(--serif); color: var(--nacht); }
.kpi__label { color: var(--grau); font-size: 0.95rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin-bottom: 1rem; }
.filters .field { min-width: 11rem; }
.filters input, .filters select { padding: 0.45rem 0.6rem; font-size: 1rem; }
.push { margin-left: auto; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 1rem; }
.table-wrap { overflow-x: auto; background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.table th, .table td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.table thead th { background: #F1EEE6; font-size: 0.9rem; color: var(--grau); position: sticky; top: 0; }
.table tbody tr:hover { background: #FBFAF6; }
.table td small { color: var(--grau); }
.table .num { text-align: right; }
.table tr.muted { color: var(--grau); }
.panel .table th, .panel .table td { padding-inline: 0.25rem; }
.table--invoice tfoot th { font-size: 1.1rem; border-top: 2px solid var(--tinte); border-bottom: 0; }
.table--edit input { padding: 0.35rem 0.5rem; }
.input--short { max-width: 7rem; }
.clip { display: inline-block; max-width: 18rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.actions-cell { white-space: nowrap; }
.actions-cell form + form { margin-left: 0.75rem; }
.details { margin: 0; display: grid; gap: 0.4rem; }
.details div { display: grid; grid-template-columns: 9rem 1fr; gap: 0.75rem; }
.details dt { color: var(--grau); }
.details dd { margin: 0; }
.plain { list-style: none; padding: 0; margin: 0 0 1rem; }
.plain li { padding: 0.25rem 0; }
.note { background: var(--warn-bg); padding: 0.6rem 0.8rem; border-radius: 6px; font-size: 0.95rem; }
.danger-zone { margin-top: 1rem; background: var(--papier); border: 1px solid #E7C3C3; border-radius: var(--radius); padding: 1rem 1.5rem; }
.danger-zone summary { cursor: pointer; color: var(--rot-dunkel); font-weight: 700; }
.danger-zone .form { max-width: 34rem; margin-top: 1rem; }
.recipients { list-style: none; margin: 0 0 1rem; padding: 0.5rem 0.75rem; max-height: 28rem; overflow-y: auto; border: 1px solid var(--linie); border-radius: 8px; }
.recipients li { padding: 0.2rem 0; }
.recipients small { color: var(--grau); }
.mail-preview-box { margin-top: 1.5rem; }
.mail-preview-box__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.mail-preview-box__head h3 { margin: 0; }
.mail-preview__subject { margin: 0.75rem 0 0.4rem; }
.mail-preview__subject span { color: var(--grau); }
.mail-preview { white-space: pre-wrap; font-family: var(--sans); font-size: 0.98rem; background: var(--schnee); padding: 1rem; border-radius: 8px; border: 1px dashed var(--linie); }
.placeholders { margin: 0; font-size: 0.92rem; display: grid; gap: 0.25rem; }
.placeholders div { display: grid; grid-template-columns: 11rem 1fr; gap: 0.5rem; }
.placeholders dd { margin: 0; color: var(--grau); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.92rem; line-height: 1.5; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .register-layout { grid-template-columns: 1fr; }
    .summary { position: static; order: -1; }
    .kpis { grid-template-columns: repeat(2, 1fr); }
    .admin-grid, .admin-grid--wide-left { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .admin { grid-template-columns: 1fr; }
    .sidebar { position: fixed; inset: 0 auto 0 0; width: 16rem; z-index: 50; transform: translateX(-100%); transition: transform 0.2s ease; }
    .sidebar.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,0.4); }
    .menu-toggle { display: inline-flex; font: 700 0.95rem var(--sans); padding: 0.4rem 0.8rem; border-radius: 6px; border: 1.5px solid var(--tanne); background: #fff; color: var(--tanne); }
    .admin-top { padding: 0.75rem 1rem; }
    .admin-top h1 { font-size: 1.3rem; }
    .admin-content { padding: 1rem; }
    .hero__inner { grid-template-columns: 1fr; padding-top: 2rem; }
    .hero__art { justify-self: center; max-width: 20rem; order: -1; }
    .steps, .info-grid, .info-grid--2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    body { font-size: 1.05rem; }
    .grid--2, .grid--3, .grid--street, .grid--city { grid-template-columns: 1fr; }
    .grid--dims { grid-template-columns: 1fr 1fr; }
    .dims-result { grid-column: span 2; }
    .span-2 { grid-column: auto; }
    .power__row { grid-template-columns: 1fr; gap: 0.3rem; }
    .topbar__inner { flex-direction: column; align-items: flex-start; }
    .brand span { font-size: 1rem; }
    .page-head__art { display: none; }
    .kpis { grid-template-columns: 1fr 1fr; }
    .details div, .dates div, .dates--compact div { grid-template-columns: 1fr; gap: 0; }
    fieldset.section { padding: 1rem; }
    .auth__card { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* Lining, tabular figures wherever numbers are compared (Alegreya defaults to old-style). */
.kpi__value, .num, .table, .dates dd, .details dd, .prices, .summary, .choice__price, .power__price, .badge, input, select { font-variant-numeric: lining-nums tabular-nums; }

/* Bulk send */
.bulk-progress { width: 100%; height: 1.25rem; accent-color: var(--tanne); }

/* FAQ on the landing page */
.faq { margin-top: 3rem; margin-bottom: 3rem; max-width: 52rem; }
.faq h2 { margin-bottom: 1rem; }
.faq__item { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); margin-bottom: 0.6rem; }
.faq__item summary { cursor: pointer; list-style: none; padding: 0.9rem 3rem 0.9rem 1.25rem; position: relative; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--nacht); border-radius: var(--radius); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--rot); color: #fff; font: 800 1.1rem/1.6rem var(--sans); text-align: center; }
.faq__item[open] summary::after { content: "–"; }
.faq__item summary:hover { color: var(--rot); }
.faq__item summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.faq__answer { padding: 0 1.25rem 1rem; }
.faq__answer p { margin: 0 0 0.6rem; }
.faq__answer p:last-child { margin-bottom: 0; }
.faq__contact { margin-top: 1.25rem; }

/* Optional notes for business types / locations / power in the stand form */
.hint--note { border-left: 3px solid var(--gold); background: #fbf6e9; padding: 0.45rem 0.75rem; border-radius: 0 6px 6px 0; color: var(--text, #2b2b2b); }

/* ---------- Two-factor login (code by e-mail) ---------- */
.otp-input { font-size: 1.5rem; letter-spacing: 0.25em; font-variant-numeric: tabular-nums; max-width: 14rem; text-align: center; }
.auth__help { margin-top: 1.25rem; font-size: 0.98rem; }
.auth__help summary { cursor: pointer; }
.auth__help form { margin-top: 0.5rem; }

/* =========================================================
   Standplan (Verwaltung und Besucherseite)
   ========================================================= */
.sp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-bottom: 0.8rem; }
.sp-toolbar select { padding: 0.35rem 0.5rem; }
.sp-group { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.sp-inline { display: flex; align-items: center; gap: 0.4rem; font-size: 0.95rem; font-weight: 700; }
.sp-status { font-size: 0.9rem; color: var(--ok); margin-left: 0.3rem; }
.sp-status.is-dirty { color: var(--rot-dunkel); }
.sp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1rem; align-items: start; }
.sp-canvas { position: relative; background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.sp-canvas svg { display: block; width: 100%; height: min(72vh, 46rem); touch-action: none; cursor: grab; user-select: none; background: #EEF0EC; }
.sp-canvas svg.is-panning { cursor: grabbing; }
.sp-canvas svg.is-calibrating { cursor: crosshair; }
.sp-help { margin: 0; padding: 0.4rem 0.8rem; font-size: 0.82rem; color: var(--grau); border-top: 1px solid var(--linie); }
.sp-ground { fill: #FBFAF6; }
.sp-gridrect { opacity: 0.6; }
.sp-gridline { fill: none; stroke: #CDD1C8; stroke-width: 1; vector-effect: non-scaling-stroke; }
.sp-stand { cursor: move; outline: none; }
.sp-stand rect { stroke: var(--nacht); stroke-width: 1.5; vector-effect: non-scaling-stroke; fill-opacity: 0.88; }
.sp-stand text { text-anchor: middle; fill: #fff; font-family: var(--sans); font-weight: 700; pointer-events: none; paint-order: stroke; stroke: rgba(0,0,0,0.25); stroke-width: 2px; }
.sp-stand .sp-name { font-weight: 400; }
.sp-stand.is-selected rect, .sp-stand:focus-visible rect { stroke: var(--gold); stroke-width: 4; }
.sp-stand.is-overlap rect { stroke: #D11; stroke-width: 3.5; stroke-dasharray: 6 3; }
.sp-st-submitted rect, .sp-swatch.sp-st-submitted { fill: #C98A12; background: #C98A12; }
.sp-st-confirmed rect, .sp-swatch.sp-st-confirmed { fill: #2F6EA8; background: #2F6EA8; }
.sp-st-paid rect, .sp-swatch.sp-st-paid { fill: #2E7D4F; background: #2E7D4F; }
.sp-c0 rect, .sp-swatch.sp-c0 { fill: #2F6EA8; background: #2F6EA8; }
.sp-c1 rect, .sp-swatch.sp-c1 { fill: #C8553D; background: #C8553D; }
.sp-c2 rect, .sp-swatch.sp-c2 { fill: #2E7D4F; background: #2E7D4F; }
.sp-c3 rect, .sp-swatch.sp-c3 { fill: #8E5BB5; background: #8E5BB5; }
.sp-c4 rect, .sp-swatch.sp-c4 { fill: #C98A12; background: #C98A12; }
.sp-c5 rect, .sp-swatch.sp-c5 { fill: #1D8A8A; background: #1D8A8A; }
.sp-c6 rect, .sp-swatch.sp-c6 { fill: #B03A6B; background: #B03A6B; }
.sp-c7 rect, .sp-swatch.sp-c7 { fill: #5B6660; background: #5B6660; }
.sp-scalebar__bar { fill: var(--nacht); }
.sp-scalebar text { fill: var(--nacht); font-family: var(--sans); font-weight: 700; }
.sp-calib-point { fill: #D11; }
.sp-calib-line { stroke: #D11; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-dasharray: 8 4; }
.sp-side { display: grid; gap: 1rem; }
.sp-panel { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); padding: 0.9rem 1rem; }
.sp-panel h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.sp-panel .field { margin-bottom: 0.5rem; }
.sp-buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.4rem 0; }
.sp-count { color: var(--grau); font-weight: 400; }
.sp-list { list-style: none; margin: 0; padding: 0; max-height: 22rem; overflow-y: auto; display: grid; gap: 0.35rem; }
.sp-item { display: flex; gap: 0.6rem; align-items: flex-start; width: 100%; text-align: left; font: inherit; font-size: 0.9rem; line-height: 1.3; background: var(--schnee); border: 1px solid var(--linie); border-radius: 6px; padding: 0.45rem 0.6rem; cursor: pointer; }
.sp-item:hover, .sp-item:focus-visible { border-color: var(--tanne); }
.sp-swatch { display: inline-block; flex: 0 0 auto; width: 0.9rem; height: 0.9rem; border-radius: 3px; margin-top: 0.15rem; vertical-align: -0.1rem; }
.sp-swatch--overlap { border: 2px dashed #D11; background: transparent; }
.sp-legend { list-style: none; margin: 0 0 0.4rem; padding: 0; display: grid; gap: 0.25rem; font-size: 0.9rem; }
.sp-legend li { display: flex; gap: 0.5rem; align-items: center; }
.sp-legend .sp-swatch { margin-top: 0; }
.sp-settings { margin-top: 1.5rem; }
.sp-settings h3 { margin-top: 0; }
@media (max-width: 1100px) { .sp-layout { grid-template-columns: 1fr; } }

/* öffentlicher Standplan */
.sp-public { margin: 2rem auto 3rem; }
.sp-public svg { display: block; width: 100%; height: auto; background: #EEF0EC; border: 1px solid var(--linie); border-radius: var(--radius); }
.sp-public .sp-stand { cursor: default; }
.sp-public .sp-stand rect { fill: var(--tanne); }
.sp-public .sp-stand:target rect, .sp-public .sp-stand:hover rect { fill: var(--rot); }
.sp-table td:first-child { font-weight: 700; white-space: nowrap; }

@media print {
    .admin .sidebar, .admin-top, .sp-toolbar, .sp-side, .sp-settings, .sp-help, .flash, .skip { display: none !important; }
    .admin-main { margin: 0 !important; padding: 0 !important; }
    .admin-content { padding: 0 !important; }
    .sp-layout { display: block; }
    .sp-canvas { border: 0; }
    .sp-canvas svg { height: 95vh; background: #fff; }
}

/* ---------- Residents (free of charge) ---------- */
.badge--resident { background: #F0E8F6; color: #5B3A7A; }
