/* ==========================================================================
   Wichtelomat – Stylesheet (Neo-Bauhaus × Geometric Christmas)
   Mobile First. Aufbau: 1 Schriften · 2 Variablen · 3 Basis · 4 Seitengerüst ·
   5 Bausteine (Knöpfe, Karten, Formulare …) · 6 Seiten · 7 Bewegung · 8 Druck

   Gestaltungsregeln: flache Farbflächen statt Verläufe, Grundformen (Kreis, Dreieck,
   Rechteck), Karten mit harter Unterkante statt weichem Schatten, Serifen für
   Überschriften, gesperrte Versalien für Vorzeilen.
   ========================================================================== */

/* -------------------------------------------------------------------------- 1 Schriften (lokal, OFL) */
@font-face {
    font-family: "Playfair Display";
    src: url("../fonts/playfair-display-latin-wght-normal.woff2") format("woff2");
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Playfair Display";
    src: url("../fonts/playfair-display-latin-wght-italic.woff2") format("woff2");
    font-weight: 400 900;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* -------------------------------------------------------------------------- 2 Variablen */
:root {
    /* Tannengrün */
    --pine-deep: #082c27;
    --pine: #0b382f;
    --pine-700: #0f443b;
    --pine-600: #145246;
    --teal: #1f6b58;
    --mint: #e7f3e8;
    --mint-line: #afc9b7;
    /* Creme und Papier */
    --cream: #f8f0e0;
    --paper: #fff9ed;
    --sand: #f1e4cc;
    --border: #e8dac8;
    --border-strong: #d7c4a4;
    --edge: #eadcc9;
    /* Rot */
    --red-deep: #8a1730;
    --red: #ac1f3b;
    --red-bright: #ca3144;
    --tomato: #d8403f;
    --red-50: #fbecea;
    --red-line: #ecc4c2;
    /* Gold und Rosé */
    --gold-ink: #8f5b1d;
    --gold: #d4a358;
    --gold-soft: #ecd0a1;
    --gold-50: #f9edd3;
    --pink: #e8b6a6;
    --pink-soft: #f3cfc2;
    /* Text */
    --ink: #102f2c;
    --muted: #4e625d;
    --faint: #64736e;

    --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-sans: "Inter", "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

    --radius-s: 9px;
    --radius: 15px;
    --radius-l: 20px;
    --shadow-s: 0 4px 0 var(--edge);
    --shadow: 0 5px 0 var(--edge);
    --shadow-l: 0 24px 70px rgba(6, 28, 22, .28);
    --ring: 0 0 0 3px rgba(212, 163, 88, .55);

    --width: 1320px;
    --header-h: 64px;
    --tabbar-h: 66px;
    --pad: 20px;
    /* Seitenrand: auf breiten Bildschirmen wächst er mit, damit Flächen randlos laufen und Inhalte in der Spalte bleiben. */
    --gutter: max(var(--pad), calc((100vw - var(--width)) / 2));
}
@media (min-width: 760px) {
    :root { --pad: 36px; --header-h: 78px; }
}

/* -------------------------------------------------------------------------- 3 Basis */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; line-height: 1.12; color: var(--pine); margin: 0; letter-spacing: -.028em; }
p { margin: 0; }
p + p { margin-top: .7em; }
a { color: inherit; }
img, svg { max-width: 100%; }
img { height: auto; }
ul, ol { margin: 0; padding: 0; }
code { font-size: .9em; background: var(--sand); padding: 1px 6px; border-radius: 5px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: #f0c872; color: var(--pine); }

.icon { flex: none; width: 1.25em; height: 1.25em; vertical-align: -.24em; }
.art-icon { width: 100%; height: 100%; object-fit: contain; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 16px; top: -90px; z-index: 100;
    background: var(--paper); color: var(--pine); padding: 10px 18px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 14px; }

/* Hilfsklassen */
.stack { display: grid; gap: 16px; align-content: start; }
.stack-lg { display: grid; gap: 28px; align-content: start; }
.stack > *, .stack-lg > * { min-width: 0; }
.cluster { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cluster--center { justify-content: center; }
.spread { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; gap: 22px; align-items: start; }
.grid-2 > * { min-width: 0; }
@media (min-width: 900px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
}
.grid-2--tight { gap: 12px; margin-top: 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.script { font-family: var(--font-serif); font-style: italic; }
.eyebrow { font-size: .72rem; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-ink); }
.eyebrow--light { color: var(--gold-soft); }
.lead { font-size: 1.06rem; color: var(--muted); max-width: 70ch; }
.link-red { color: var(--red); font-weight: 650; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.link-red:hover { color: var(--red-deep); text-decoration-thickness: 2px; }
.optional { font-weight: 400; font-size: .8rem; color: var(--faint); }

/* Achtzackiger Stern als reine CSS-Form (statt eines Schriftzeichens) */
.geo-star {
    display: inline-block; width: 1em; height: 1em; background: currentColor; flex: none;
    clip-path: polygon(50% 0, 54% 40%, 85% 15%, 60% 46%, 100% 50%, 60% 54%, 85% 85%, 54% 60%, 50% 100%, 46% 60%, 15% 85%, 40% 54%, 0 50%, 40% 46%, 15% 15%, 46% 40%);
}

/* -------------------------------------------------------------------------- 4 Seitengerüst */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: #0b3d33; color: var(--paper);
    border-bottom: 1px solid #41675b;
}
.site-header__inner {
    max-width: calc(var(--width) + 2 * var(--pad)); margin: 0 auto; min-height: var(--header-h);
    padding: 8px var(--pad); display: flex; align-items: center; gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; margin-right: auto; white-space: nowrap; }
.brand span { font-family: var(--font-serif); font-weight: 700; font-size: 1.4rem; line-height: 1; letter-spacing: -.045em; }
.brand .brand__dot { color: var(--gold); letter-spacing: 0; }
.brand img { flex: none; width: 36px; height: 36px; }

/* Angemeldeter Bereich: heller Kopf wie im Entwurf */
.layout-app .site-header { background: var(--cream); color: var(--ink); border-bottom-color: var(--border); }
.layout-app .brand span { font-size: 1.5rem; }
@media (min-width: 760px) {
    .layout-app .brand img { width: 44px; height: 44px; }
    .layout-app .brand span { font-size: 1.75rem; }
}

/* Hauptnavigation: auf dem Handy als Leiste am unteren Rand, ab Tablet im Kopf (Symbol über Text) */
.main-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: flex; justify-content: space-around;
    background: var(--paper);
    border-top: 1px solid var(--border-strong);
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
}
.main-nav__link {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative;
    padding: 8px 4px 6px; min-height: 54px; justify-content: center;
    color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 650;
}
.main-nav__link .icon { width: 23px; height: 23px; }
.main-nav__link.is-active { color: var(--ink); }
.main-nav__link.is-active .icon { color: var(--red); }
.main-nav__link.is-active::after { content: ""; position: absolute; left: 22%; right: 22%; top: -5px; height: 3px; background: var(--red); }
body:has(.main-nav) { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

@media (min-width: 760px) {
    .layout-app .brand { margin-right: 26px; }
    .main-nav { position: static; flex: 1; justify-content: flex-start; gap: 2px; background: none; border: 0; padding: 0; align-self: stretch; }
    .main-nav__link { flex: none; min-height: 0; padding: 6px 18px 8px; font-size: .8rem; transition: color .15s; }
    .main-nav__link .icon { width: 24px; height: 24px; }
    .main-nav__link:hover { color: var(--ink); }
    .main-nav__link.is-active::after { left: 8px; right: 8px; top: auto; bottom: -9px; height: 3px; }
    .main-nav__link--konto { display: none; }
    body:has(.main-nav) { padding-bottom: 0; }
}

.user-menu { position: relative; }
.user-menu summary {
    list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer;
    color: inherit; padding: 4px 8px 4px 4px; border-radius: 999px; font-weight: 600; font-size: .9rem;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--sand); }
.user-menu__name { display: none; }
.user-menu__chevron { transform: rotate(90deg); width: 16px; height: 16px; opacity: .7; transition: transform .2s; }
.user-menu[open] .user-menu__chevron { transform: rotate(-90deg); }
.user-menu__panel {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; z-index: 50;
    background: var(--paper); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow), 0 16px 40px rgba(6, 28, 22, .16); padding: 8px;
}
.user-menu__mail { font-size: .8rem; color: var(--muted); padding: 8px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; overflow-wrap: anywhere; }
.user-menu__panel a, .user-menu__panel button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none;
    border-radius: 8px; text-decoration: none; cursor: pointer; text-align: left; color: var(--ink); font-weight: 600;
}
.user-menu__panel a:hover, .user-menu__panel button:hover { background: var(--sand); }
@media (min-width: 900px) {
    .user-menu__name { display: inline; }
}

.guest-nav { display: flex; align-items: center; gap: 10px; margin-left: auto; }
/* Seiten im hellen Gerüst, die auch Gäste sehen (Datenschutz): der Umrissknopf braucht dort dunkle Farbe. */
.layout-app .guest-nav .btn--outline-light { border-color: var(--pine); color: var(--pine); }
.layout-app .guest-nav .btn--outline-light:hover { background: var(--pine); color: var(--paper); }
.guest-nav__text { display: none; color: inherit; text-decoration: none; font-size: .82rem; font-weight: 650; padding: 10px 14px; white-space: nowrap; transition: color .2s; }
.guest-nav__text:hover { color: #f4c778; }
.menu-toggle {
    display: none; border: 0; background: transparent; color: inherit; width: 44px; height: 44px; margin-right: -8px;
    align-items: center; justify-content: center; flex-direction: column; gap: 5px; cursor: pointer;
}
.menu-toggle span { width: 24px; height: 2px; background: currentColor; border-radius: 2px; }
@media (min-width: 620px) {
    .guest-nav__text { display: inline; }
}
@media (max-width: 619px) {
    /* Mit JavaScript klappt die Gastnavigation hinter den Menüknopf; ohne bleibt sie sichtbar. */
    .has-menu .menu-toggle { display: flex; }
    .has-menu .guest-nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
        flex-direction: column; align-items: stretch; gap: 12px; padding: 18px var(--pad) 24px;
        background: var(--pine); box-shadow: 0 12px 25px rgba(5, 30, 25, .5);
    }
    .has-menu .guest-nav.is-open { display: flex; }
    .has-menu .guest-nav__text { display: block; text-align: center; }
    .has-menu .guest-nav .btn { min-height: 46px; }
}

.main { flex: 1; width: 100%; position: relative; z-index: 2; }
.sheet { min-height: 60vh; }
.content { padding: 24px var(--gutter) 48px; }
@media (min-width: 760px) {
    .content { padding: 30px var(--gutter) 64px; }
}

.site-footer { position: relative; z-index: 2; background: var(--pine-deep); color: #f2e5d0; font-size: .78rem; padding: 22px var(--pad); }
.site-footer__inner { max-width: var(--width); margin: 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.site-footer__brand { font-family: var(--font-serif); font-weight: 700; font-size: 1.25rem; letter-spacing: -.04em; text-decoration: none; }
.site-footer__brand span, .site-footer .script { color: var(--gold); }
.site-footer .script { font-family: var(--font-sans); font-size: .8rem; }
.site-footer__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.site-footer a { color: inherit; text-underline-offset: 3px; }
.site-footer a:hover { color: #edc17c; }
.site-footer__sep { opacity: .6; }
@media (min-width: 700px) {
    .site-footer__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
}

/* Meldungen nach Aktionen */
.flashes { display: grid; gap: 10px; padding: 16px var(--gutter) 0; }
.main--scene .flashes { max-width: 520px; width: 100%; padding: 0; margin-bottom: 16px; }
.main--landing .flashes { position: absolute; z-index: 6; top: 16px; left: 50%; transform: translateX(-50%); width: min(510px, calc(100% - 32px)); padding: 0; }
.flash {
    display: flex; gap: 12px; align-items: center; min-height: 50px; padding: 11px 16px; border-radius: 14px;
    font-size: .88rem; font-weight: 650; border: 1px solid transparent; box-shadow: 0 5px 12px rgba(11, 56, 47, .07);
    animation: flash-in .35s ease-out both;
}
.flash .icon { width: 21px; height: 21px; }
.flash p { flex: 1; min-width: 0; }
.flash--success { background: var(--mint); border-color: var(--mint-line); color: #154a3e; }
.flash--error { background: var(--red-50); border-color: var(--red-line); color: var(--red-deep); }
.flash--info { background: var(--gold-50); border-color: var(--gold-soft); color: #5c4310; }
.flash__close { flex: none; margin: -4px -6px -4px 0; width: 34px; height: 34px; border: 0; background: none; color: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.flash__close:hover { background: rgba(11, 56, 47, .08); }
.flash.is-hidden { opacity: 0; transform: translateY(-12px); transition: opacity .25s, transform .25s; }

/* -------------------------------------------------------------------------- 5 Bausteine */

/* Seitenkopf im angemeldeten Bereich: Creme mit geometrischer Komposition am rechten Rand */
.hero {
    position: relative; isolation: isolate;
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px;
    min-height: 176px; padding: 26px var(--gutter) 26px;
    background: var(--cream) var(--img-banner-small) right bottom / auto min(100%, 210px) no-repeat;
    border-bottom: 1px solid var(--border);
    color: var(--ink);
}
.hero__text { max-width: 640px; min-width: 0; width: 62%; }
.hero__back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: .84rem; font-weight: 600; margin-bottom: 10px; }
.hero__back:hover { color: var(--red); }
.hero__back .icon { width: 16px; height: 16px; }
.hero__eyebrow { font-size: .72rem; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 6px; overflow-wrap: anywhere; }
.hero__title { color: var(--pine); font-size: clamp(1.85rem, 6vw, 3.5rem); font-weight: 800; line-height: 1.02; letter-spacing: -.04em; overflow-wrap: anywhere; }
.hero__title .badge { vertical-align: middle; margin-left: 6px; font-family: var(--font-sans); letter-spacing: 0; }
.hero__sub { color: var(--ink); margin-top: 10px; max-width: 46ch; font-size: 1rem; line-height: 1.5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
@media (min-width: 760px) {
    .hero { min-height: 250px; padding-top: 34px; padding-bottom: 34px; background-image: var(--img-banner); background-size: auto min(100%, 300px); background-position: right calc(var(--gutter) - var(--pad)) bottom; }
    .hero__text { width: auto; max-width: min(640px, 52%); }
    .hero__sub { font-size: 1.12rem; }
}

/* Knöpfe */
.btn {
    -webkit-appearance: none; appearance: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 46px; padding: 10px 24px; border-radius: 999px; border: 1.5px solid transparent;
    font-weight: 700; font-size: .92rem; line-height: 1.2; text-decoration: none; text-align: center; cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
    -webkit-tap-highlight-color: transparent;
}
.btn .icon { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn--primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-bright); border-color: var(--red-bright); box-shadow: 0 8px 22px rgba(125, 29, 49, .25); }
.btn--secondary { background: transparent; border-color: var(--pine); color: var(--pine); }
.btn--secondary:hover { background: var(--paper); }
.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--sand); color: var(--ink); }
.btn--danger { background: var(--red-50); border-color: #e3aaa8; color: var(--red-deep); }
.btn--danger:hover { background: #f6dad8; border-color: var(--red); }
.btn--outline-light { background: transparent; border-color: #b5c3b8; color: var(--paper); }
.btn--outline-light:hover { background: #21584e; }
.btn--gold { background: var(--paper); color: var(--pine); }
.btn--gold:hover { background: #f4d0a0; }
.btn--dark { background: var(--pine); border-color: var(--pine); color: var(--paper); }
.btn--dark:hover { background: var(--pine-600); border-color: var(--pine-600); }
.btn--small { min-height: 37px; padding: 7px 18px; font-size: .82rem; }
.btn--large { min-height: 56px; padding: 15px 31px; font-size: .95rem; gap: 16px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none;
    border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none;
    transition: background-color .15s, color .15s;
}
.icon-btn .icon { width: 19px; height: 19px; }
.icon-btn:hover { background: var(--sand); color: var(--ink); }
.icon-btn--danger:hover { background: var(--red-50); color: var(--red); }
.icon-btn[disabled] { opacity: .3; cursor: default; background: none; }

/* Karten: Papierfläche, feine Linie, harte Unterkante */
.card {
    background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px 18px; box-shadow: var(--shadow); min-width: 0;
}
@media (min-width: 760px) {
    .card { padding: 24px 26px; }
}
.card__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; }
.card__head-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.card__title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 1.32rem; }
.card__title > .icon { color: var(--red); width: 24px; height: 24px; }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card__subtitle { font-family: var(--font-sans); font-size: .7rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; color: var(--red); margin: 24px 0 8px; }
.card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.card--green { position: relative; overflow: hidden; background: var(--pine); border-color: var(--pine); color: var(--paper); box-shadow: 0 5px 0 var(--pine-deep); }
.card--green h2, .card--green .card__title { color: var(--paper); }
.card--green .card__title > .icon { color: var(--gold); }
.card--highlight { border-color: var(--gold); background: #fff7e3; box-shadow: 0 5px 0 var(--gold-soft); }
.card--danger { border-color: var(--red-line); box-shadow: 0 5px 0 #f1d6d3; }
.card--admin { border-style: dashed; border-color: var(--border-strong); background: var(--cream); box-shadow: none; }
.card--note { background: var(--gold-50); border-color: var(--gold-soft); box-shadow: 0 5px 0 var(--gold-soft); }
.card--status .card__title { margin-bottom: 8px; }
.card--status form { margin-top: 14px; }

.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.section-head h2 { display: flex; align-items: center; gap: 12px; font-size: 1.6rem; }
.section-head h2 .icon { color: var(--red); width: 30px; height: 30px; }

/* Zeilenlisten (statt Tabellen) */
.rows { list-style: none; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.rows > .row:last-child { border-bottom: 0; padding-bottom: 2px; }
.row__main { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.row__main a { text-decoration: none; }
.row__main a:hover { text-decoration: underline; text-underline-offset: 3px; }
.row__meta { font-size: .84rem; color: var(--muted); }
.row__meta--error { color: var(--red); }
.row__aside { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 8px; margin-left: auto; }
.row__icon {
    flex: none; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--pine); color: var(--gold); overflow: hidden;
}
.row__icon--red { background: var(--red); color: var(--gold-soft); }
.row__edit { flex-basis: 100%; display: grid; gap: 14px; background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 16px; margin-top: 4px; }

.avatar {
    flex: none; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--pine); color: var(--paper); font-weight: 700; font-size: .85rem; letter-spacing: .02em;
}
.site-header .avatar { width: 40px; height: 40px; font-size: .8rem; }
.avatar--lg { width: 68px; height: 68px; font-size: 1.35rem; font-family: var(--font-serif); background: var(--red); color: var(--gold-soft); }
.avatar--xl { width: 108px; height: 108px; font-size: 2.2rem; font-family: var(--font-serif); background: var(--red); color: var(--gold-soft); box-shadow: 10px -6px 0 var(--gold); }
/* Selbst gebauter Charakter statt Initialen (Core/Avatar). Die Farben kommen als CSS-Variablen vom svg oder vom Baukasten. */
.avatar--figure { overflow: hidden; background: var(--sand); }
.av { display: block; width: 100%; height: 100%; }
.av-bg { fill: var(--av-bg, #0b382f); }
.av-skin { fill: var(--av-skin, #efc5a0); }
.av-hair { fill: var(--av-hair, #4a2f20); }
.av-top { fill: var(--av-top, #ac1f3b); }
.av-ink { fill: #241a17; }
.av-shade { fill: #000; opacity: .13; }
.av-line, .av-frame { fill: none; stroke: #241a17; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.av-frame { stroke-width: 1.8; }
.av-frame--big { stroke-width: 2.6; }
.av-lens { fill: #fff; fill-opacity: .22; }

/* Plaketten */
.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px;
    font-size: .74rem; font-weight: 700; line-height: 1.5; white-space: nowrap; border: 1px solid transparent;
}
.badge .icon { width: 13px; height: 13px; }
.badge--green, .badge--prio-low { background: var(--mint); color: #17503f; border-color: var(--mint-line); }
.badge--gold, .badge--prio-normal { background: var(--gold-50); color: #6d4712; border-color: var(--gold-soft); }
.badge--red, .badge--prio-high { background: var(--red-50); color: var(--red); border-color: var(--red-line); }
.badge--muted { background: var(--sand); color: var(--muted); border-color: var(--border-strong); }
.badge--neutral { background: var(--cream); color: var(--muted); border-color: var(--border-strong); }

.count {
    display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px;
    border-radius: 999px; background: var(--red); color: #fff; font-family: var(--font-sans); font-size: .74rem; font-weight: 700; letter-spacing: 0;
}
.count--muted { background: var(--sand); color: var(--ink); }

/* Hinweise */
.notice { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-radius: var(--radius-s); border: 1px solid; font-size: .95rem; }
.notice > .icon { margin-top: 2px; }
.notice p { flex: 1; min-width: 0; }
.notice--gold { background: var(--gold-50); border-color: var(--gold-soft); color: #5c4310; }
.notice--green { background: var(--mint); border-color: var(--mint-line); color: #154a3e; }
.notice--red { background: var(--red-50); border-color: var(--red-line); color: var(--red-deep); }
.notice--muted { background: var(--paper); border-color: var(--border); color: var(--muted); }
.notice--on-green { background: rgba(255, 249, 237, .08); border-color: rgba(236, 208, 161, .45); color: var(--paper); }
.notice--action { align-items: center; flex-wrap: wrap; }
.card .notice { margin-bottom: 14px; }

/* Formulare */
.field { display: grid; gap: 7px; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend { font-weight: 750; font-size: .84rem; padding: 0; }
.field > legend { margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"],
input[type="search"], input[type="datetime-local"], select, textarea {
    width: 100%; min-height: 48px; padding: 10px 13px; background: #fff; color: var(--ink);
    border: 1px solid #cdbba1; border-radius: var(--radius-s); transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234e625d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #9a917f; }
input:hover, select:hover, textarea:hover { border-color: #b39d7c; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pine); box-shadow: var(--ring); }
input[readonly], textarea[readonly] { background: var(--cream); color: var(--muted); }
.field__hint { font-size: .82rem; color: var(--muted); }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 620px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
}
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .95rem; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); }
.check--small { font-size: .82rem; color: var(--muted); align-items: center; }
.check--small input { margin: 0; width: 17px; height: 17px; }
.card--green .check input { accent-color: var(--gold); }

.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.choice-grid--single { grid-template-columns: 1fr; max-height: 280px; overflow: auto; padding: 2px; }
.choice {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer;
    border: 1px solid #cdbba1; border-radius: var(--radius-s); background: #fff; transition: border-color .15s, background-color .15s;
}
.choice input { flex: none; width: 20px; height: 20px; accent-color: var(--pine); }
.choice span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.choice small { color: var(--muted); font-size: .8rem; }
.choice:hover { border-color: #b39d7c; }
.choice:has(input:checked) { border-color: var(--pine); background: var(--mint); }
.choice + .choice { margin-top: 0; }
.choice[hidden] { display: none; }

/* Personenauswahl (z. B. Oberwichtel): Abschnitte mit Ankreuzfeldern, bei langen Listen scrollbar */
.picker { display: grid; gap: 16px; max-height: 420px; overflow: auto; padding: 2px; }
.picker__section { border: 0; margin: 0; padding: 0; min-width: 0; }
.picker__section > legend { font-weight: 750; font-size: .84rem; padding: 0; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.picker__section[hidden] { display: none; }
.picker .choice + .choice { margin-top: 0; }
.picker__filter { max-width: 420px; }
.picker__empty { margin: 0; }
fieldset .choice + .choice { margin-top: 8px; }

.icon-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.icon-choice > span {
    display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%;
    border: 1px solid #cdbba1; background: #fff; color: var(--muted); cursor: pointer; overflow: hidden; transition: all .15s;
}
.icon-choice input:checked + span { background: var(--pine); border-color: var(--pine); color: var(--gold); box-shadow: var(--ring); }
.icon-choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 3px; }

.inline-form, .rule-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 16px; }
.inline-form .field, .rule-form .field { flex: 1 1 220px; }
.rule-form .check { min-height: 48px; align-items: center; }
.rule-form .check input { margin: 0; }
.copy-field { display: flex; flex-wrap: wrap; gap: 8px; }
.copy-field input { flex: 1 1 220px; font-size: .9rem; }
.search-form { display: flex; gap: 8px; flex: 1 1 260px; max-width: 420px; }
.search-form input { min-height: 38px; padding: 6px 16px; border-radius: 999px; }
.password-field { position: relative; }
.password-field input { padding-right: 50px; }
.password-field__toggle {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px;
    border: 0; background: none; border-radius: 50%; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.password-field__toggle:hover, .password-field__toggle[aria-pressed="true"] { background: var(--sand); color: var(--ink); }

/* Aufklappbereiche */
.disclosure > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary:not(.btn) { padding: 10px 0; color: var(--pine); }
.disclosure > summary:not(.btn)::after {
    content: ""; width: 8px; height: 8px; margin-left: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px); transition: transform .2s;
}
.disclosure[open] > summary:not(.btn)::after { transform: rotate(-135deg) translateY(-2px); }
.disclosure > :not(summary) { margin-top: 12px; }
.disclosure--quiet { margin-top: 18px; }
.disclosure--quiet > summary:not(.btn) { font-size: .86rem; font-weight: 500; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
.disclosure--add { margin-top: 18px; }
.disclosure--add[open] > summary { background: var(--sand); border-color: var(--sand); color: var(--ink); box-shadow: none; }
.disclosure--on-green > :not(summary) { background: rgba(255, 249, 237, .07); border: 1px solid rgba(236, 208, 161, .35); border-radius: var(--radius-s); padding: 16px; }
.disclosure--on-green label { color: var(--paper); }
.disclosure--on-green .inline-form { margin-top: 12px; }

/* Reiter */
.tabs { display: flex; gap: 4px; }
.tabs a {
    display: inline-flex; align-items: center; gap: 8px; padding: 13px 14px; text-decoration: none; white-space: nowrap;
    color: var(--muted); font-weight: 650; font-size: .88rem; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs a .icon { width: 18px; height: 18px; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { color: var(--ink); border-bottom-color: var(--red); }
.tabs a.is-active .icon { color: var(--red); }
.tabs--page { padding: 0 calc(var(--gutter) - 14px); border-bottom: 1px solid var(--border); background: var(--paper); overflow-x: auto; scrollbar-width: none; }
.tabs--page::-webkit-scrollbar { display: none; }
.tabs--center { border-bottom: 1px solid var(--border); margin: 18px 0 20px; }
.tabs--center a { flex: 1; justify-content: center; }
.tabs--pills { flex-wrap: wrap; gap: 8px; }
.tabs--pills a { border: 1.5px solid var(--border-strong); border-radius: 999px; padding: 8px 18px; margin: 0; background: var(--paper); }
.tabs--pills a.is-active { background: var(--pine); border-color: var(--pine); color: var(--paper); }
.tabs--pills a.is-active .icon { color: var(--gold-soft); }

/* Kennzahlen */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.stat { display: flex; align-items: center; gap: 16px; padding: 15px 18px; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-s); min-width: 0; }
.stat > div { min-width: 0; display: flex; flex-direction: column; }
.stat__icon { flex: none; width: 50px; height: 50px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--pine); color: var(--gold); }
.stats > .stat:nth-child(4n + 1) .stat__icon { background: var(--red); color: var(--gold-soft); }
.stats > .stat:nth-child(4n + 3) .stat__icon { background: var(--gold); color: var(--pine); }
.stats > .stat:nth-child(4n + 4) .stat__icon { background: var(--pink); color: var(--pine); }
.stat__icon.stat__icon--red { background: var(--red); color: var(--gold-soft); }
.stat__icon.stat__icon--gold { background: var(--gold); color: var(--pine); }
.stat__label { font-size: .8rem; color: var(--muted); }
.stat strong { font-family: var(--font-serif); font-size: 1.16rem; line-height: 1.3; letter-spacing: -.03em; color: var(--pine); overflow-wrap: anywhere; }

.data-list { margin: 0; }
.data-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.data-list > div:last-child { border-bottom: 0; }
.data-list dt { color: var(--muted); font-size: .92rem; }
.data-list dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.data-list + p { margin-top: 14px; }

.empty { text-align: center; padding: 40px 20px; display: grid; gap: 12px; justify-items: center; background: var(--paper); border: 1.5px dashed var(--border-strong); border-radius: var(--radius); }
.empty h3 { font-size: 1.3rem; }
.empty p { color: var(--muted); max-width: 52ch; }
.empty--small { padding: 22px 16px; }

/* Fortschrittsanzeige einer Runde */
.stepper { list-style: none; display: flex; counter-reset: step; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; position: relative; min-width: 0; }
.stepper li::before { content: ""; position: absolute; top: 16px; left: -50%; width: 100%; height: 2px; background: var(--border-strong); }
.stepper li:first-child::before { display: none; }
.stepper li.is-done::before, .stepper li.is-current::before { background: var(--pine); }
.stepper__dot {
    position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--paper); border: 2px solid var(--border-strong); color: var(--faint); font-weight: 700; font-size: .85rem;
}
.stepper__dot .icon { width: 16px; height: 16px; }
.is-done .stepper__dot { background: var(--pine); border-color: var(--pine); color: var(--gold-soft); }
.is-current .stepper__dot { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 5px rgba(172, 31, 59, .16); }
.stepper__label { font-size: .7rem; color: var(--muted); line-height: 1.25; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; padding: 0 2px; }
@media (max-width: 460px) {
    .stepper__label { font-size: .62rem; letter-spacing: -.01em; }
}
.is-current .stepper__label { color: var(--ink); font-weight: 700; }
@media (min-width: 620px) {
    .stepper__label { font-size: .84rem; }
}

/* Loskarte: Papier mit roter und goldener Ecke */
.parchment {
    position: relative; overflow: hidden; padding: 38px 24px 32px; color: var(--ink);
    background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-l);
    box-shadow: 0 6px 0 rgba(8, 44, 39, .5);
}
.parchment::before, .parchment::after { content: ""; position: absolute; pointer-events: none; border-radius: 50%; }
.parchment::before { top: -70px; right: -50px; width: 170px; height: 170px; background: var(--gold-soft); }
.parchment::after { bottom: -60px; left: -44px; width: 130px; height: 130px; background: var(--pink-soft); }
.parchment > * { position: relative; z-index: 1; }
.parchment--center { text-align: center; display: grid; gap: 14px; justify-items: center; max-width: 560px; margin: 0 auto; }
.parchment__eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--red); }

/* -------------------------------------------------------------------------- 6 Seiten */

/* --- Startseite --- */
.main--landing { overflow-x: clip; }
/* Das Winterdorf ist unten rechts verankert und wird über die Höhe skaliert: Dorf, Mond und Boden bleiben in jeder
   Breite ganz im Bild, nach links läuft die Schneelandschaft einfach weiter (siehe tools/make_illustrations.py). */
.landing-hero { --hero-h: clamp(600px, 42vw, 800px); position: relative; overflow: hidden; background: var(--cream); display: flex; flex-direction: column; }
.landing-hero__scene { position: relative; order: 2; flex: none; height: clamp(300px, 60vw, 560px); margin-top: 20px; overflow: hidden; pointer-events: none; }
.landing-hero__village { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: right bottom; }
.landing-hero__trees { display: none; }
.landing-hero__shell { order: 1; position: relative; z-index: 1; width: calc(100% - 40px); max-width: var(--width); margin: 0 auto; }
.landing-hero__copy { padding-top: 92px; padding-bottom: 14px; max-width: 640px; }
.landing-hero h1 { font-size: clamp(2.9rem, 11.5vw, 4.1rem); font-weight: 800; line-height: .98; letter-spacing: -.05em; margin: 0 0 22px; max-width: 660px; }
.landing-hero h1 span { display: block; color: var(--red); }
.landing-hero__lead { margin: 0 0 24px; font-size: .95rem; line-height: 1.62; font-weight: 500; max-width: 622px; }
.landing-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.landing-hero__actions .btn { width: 100%; }
@media (min-width: 581px) {
    .landing-hero__scene { margin-top: 12px; }
    .landing-hero__shell { width: calc(100% - 52px); }
    .landing-hero__copy { padding-top: 98px; padding-bottom: 30px; }
    .landing-hero h1 { font-size: clamp(3.2rem, 9vw, 4.4rem); }
    .landing-hero__lead { font-size: 1rem; }
    .landing-hero__actions { gap: 16px; }
    .landing-hero__actions .btn { width: auto; }
}
@media (min-width: 1100px) {
    /* Ab hier ist neben dem Dorf genug Platz: Die Szene liegt hinter dem Text. */
    .landing-hero { display: block; height: var(--hero-h); }
    .landing-hero__scene { position: absolute; inset: 0; height: auto; margin: 0; }
    .landing-hero__shell { height: 100%; width: calc(100% - 72px); }
    .landing-hero__copy { padding-top: 94px; padding-bottom: 0; max-width: 665px; }
    .landing-hero h1 { font-size: clamp(3.4rem, 5.1vw, 5.1rem); }
    .landing-hero__lead { font-size: 1.06rem; line-height: 1.65; max-width: clamp(430px, 38vw, 622px); }
}
@media (min-width: 1600px) {
    /* Die große Tanne steht am linken Rand und rückt nur so weit ins Bild, wie neben dem Text Platz ist
       (215 von 820 Einheiten der Grafik sind die Tanne selbst, der Rest ist flach und darf unter dem Text liegen). */
    .landing-hero__trees {
        display: block; position: absolute; bottom: 0; height: 100%; width: auto; max-width: none;
        left: min(0px, calc(50vw - 676px - var(--hero-h) * 215 / 820));
    }
}

.landing-shell { width: calc(100% - 40px); max-width: var(--width); margin: 0 auto; }
.landing-how { padding: 80px 0; }
.landing-intro { margin-bottom: 42px; }
.landing-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 17px; font-size: .75rem; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-ink); }
.landing-kicker .geo-star { font-size: 1.1rem; color: var(--gold); }
.landing-intro h2 { font-size: clamp(2.5rem, 10vw, 3.4rem); line-height: 1.06; letter-spacing: -.05em; }
.landing-steps { list-style: none; display: grid; gap: 16px; }
.landing-step {
    background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); padding: 0 23px 28px; transition: transform .2s;
}
.landing-step:hover { transform: translateY(-5px); }
.landing-step__art { height: 155px; position: relative; margin: 0 -23px 25px; overflow: hidden; background: #dca36a; }
.landing-step:nth-child(2) .landing-step__art { background: #153f37; }
.landing-step:nth-child(3) .landing-step__art { background: #e1b7ad; }
.landing-step:nth-child(4) .landing-step__art { background: #c63a40; }
.landing-step__art span { display: block; position: absolute; }
.landing-step__num { display: block; font-size: .68rem; letter-spacing: .17em; font-weight: 800; color: var(--red); margin-bottom: 12px; }
.landing-step h3 { font-size: 1.44rem; line-height: 1.1; letter-spacing: -.035em; margin-bottom: 12px; }
.landing-step p { font-size: .88rem; color: var(--muted); line-height: 1.65; max-width: 440px; }
/* Schritt 1: Haus mit zwei Figuren vor einem goldenen Kreis */
.art-group .a { width: 175px; height: 175px; border-radius: 50%; background: #e9bc72; top: -83px; right: -35px; }
.art-group .b { height: 78px; width: 100px; left: 37px; bottom: 0; background: #0f443b; clip-path: polygon(0 35%, 50% 0, 100% 35%, 100% 100%, 0 100%); }
.art-group .c, .art-group .d { width: 52px; height: 52px; border-radius: 50% 50% 0 0; }
.art-group .c { left: 92px; bottom: 12px; background: #bb283d; }
.art-group .d { left: 156px; bottom: 1px; background: #f7e8d7; }
/* Schritt 2: schräger Zettel mit drei Zeilen */
.art-list .a { width: 116px; height: 138px; left: calc(50% - 58px); bottom: -16px; background: #fff1d9; border-radius: 5px 5px 0 0; transform: rotate(-9deg); box-shadow: 12px -6px 0 #dc4a4a; }
.art-list .b, .art-list .c, .art-list .d { height: 7px; background: #d6ac75; left: calc(50% - 37px); width: 84px; transform: rotate(-9deg); }
.art-list .b { top: 69px; }
.art-list .c { top: 95px; width: 70px; }
.art-list .d { top: 120px; width: 48px; }
.art-list .e { width: 38px; height: 38px; background: #e5b35c; right: 36px; top: 16px; border-radius: 50%; }
/* Schritt 3: Umschlag mit Siegel */
.art-draw .a { width: 170px; height: 170px; border-radius: 50%; background: #a7203b; right: -38px; top: -69px; }
.art-draw .b { width: 146px; height: 99px; left: calc(50% - 73px); top: 44px; background: #faf0dc; }
.art-draw .b::after { content: ""; position: absolute; inset: 0; background: #dcb97c; clip-path: polygon(0 0, 50% 60%, 100% 0, 50% 88%); }
.art-draw .c { width: 25px; height: 25px; background: #bb2442; top: 90px; left: calc(50% - 12px); border-radius: 50%; }
.art-draw .geo-star { color: #e8bf75; font-size: 34px; left: 18px; top: 14px; }
/* Schritt 4: zwei Sprechblasen */
.art-secret .a, .art-secret .b { border-radius: 25px 25px 5px 25px; display: grid; place-items: center; font: 700 54px/1 var(--font-serif); width: 94px; height: 94px; }
.art-secret .a { background: #f5e6d0; color: #bd2e43; left: 39px; top: 24px; transform: rotate(-9deg); }
.art-secret .b { background: #0d4036; color: #e3bc80; right: 40px; top: 52px; transform: rotate(9deg); }
.art-secret .geo-star { top: 8px; right: 78px; font-size: 30px; color: #ffdd9b; }
@media (min-width: 581px) {
    .landing-shell { width: calc(100% - 52px); }
    .landing-how { padding: 94px 0 88px; }
    .landing-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .landing-step__art { height: 169px; }
}
@media (min-width: 861px) {
    .landing-how { padding: 110px 0; }
    .landing-intro h2 { font-size: clamp(2.6rem, 4.25vw, 4.05rem); }
}
@media (min-width: 1000px) {
    .landing-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
    .landing-step { min-height: 410px; padding: 0 20px 24px; }
    .landing-step__art { margin: 0 -20px 25px; }
}
@media (min-width: 1161px) {
    .landing-shell { width: calc(100% - 72px); }
}

.landing-invite { background: var(--pine); color: var(--paper); padding: 53px 0; }
.landing-invite__inner { display: grid; gap: 20px; }
.landing-invite__mark { height: 110px; width: 160px; flex: none; position: relative; }
.landing-invite__mark span { position: absolute; }
.landing-invite__mark .a { width: 92px; height: 92px; border-radius: 50%; background: #dfa75b; top: 4px; left: 35px; }
.landing-invite__mark .b { background: #12604d; clip-path: polygon(50% 0, 100% 90%, 60% 90%, 60% 100%, 40% 100%, 40% 90%, 0 90%); width: 72px; height: 106px; top: 4px; left: 18px; }
.landing-invite__mark .c { background: #c33b42; width: 54px; height: 54px; top: 56px; right: 18px; box-shadow: inset 21px 0 0 #d85b56; }
.landing-invite__mark .c::after { content: ""; position: absolute; left: 24px; top: 0; width: 7px; height: 100%; background: #f0ca82; }
.landing-invite .landing-kicker { color: #e4bc6e; margin-bottom: 8px; }
.landing-invite h2 { color: var(--paper); font-size: clamp(1.95rem, 3vw, 2.95rem); line-height: 1.1; letter-spacing: -.04em; margin-bottom: 12px; }
.landing-invite__copy > p:last-child { color: #d5e6dc; font-size: .95rem; line-height: 1.55; max-width: 580px; }
.landing-invite .btn { justify-self: start; }
@media (min-width: 581px) {
    .landing-invite { padding: 58px 0; }
    .landing-invite__inner { display: flex; align-items: center; gap: 38px; }
    .landing-invite__mark { height: 130px; }
    .landing-invite__mark .a { width: 100px; height: 100px; top: 7px; }
    .landing-invite__mark .b { width: 78px; height: 120px; top: 8px; }
    .landing-invite__mark .c { width: 59px; height: 59px; top: 69px; right: 14px; box-shadow: inset 23px 0 0 #d85b56; }
    .landing-invite__mark .c::after { left: 27px; }
    .landing-invite__copy { flex: 1; }
}

/* --- Karte vor dem Winterdorf (Anmeldung, Einladung, Fehler) --- */
.layout-scene { background: var(--cream); }
.main--scene {
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 14px 48px;
    background: var(--cream) var(--img-scene) right bottom / cover no-repeat;
}
.auth-card {
    width: 100%; max-width: 450px; padding: 28px 22px 26px; position: relative;
    background: var(--paper); border: 1px solid #e4d5bf; border-radius: var(--radius-l); box-shadow: var(--shadow-l);
    display: grid; gap: 4px;
    animation: card-in .5s cubic-bezier(.2, .8, .2, 1) both;
}
@media (min-width: 520px) {
    .auth-card { padding: 32px 34px 30px; }
}
.auth-card--wide { max-width: 540px; }
.auth-card--message { text-align: center; gap: 14px; justify-items: center; }
.auth-card__mascot { justify-self: start; width: 48px; height: 48px; object-fit: contain; margin-bottom: 18px; }
.auth-card--message .auth-card__mascot { justify-self: center; width: 90px; height: 115px; margin-bottom: 0; }
.auth-card__icon {
    justify-self: center; width: 64px; height: 64px; margin-bottom: 4px; border-radius: 16px; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; background: var(--red); color: #fbe8cb;
}
.auth-card__icon .icon { width: 30px; height: 30px; }
.auth-card__icon--gold { background: var(--pine); color: var(--gold); }
.auth-card__kicker { font-size: .68rem; font-weight: 800; letter-spacing: .25em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 8px; }
.auth-card__title { font-size: clamp(1.9rem, 7vw, 2.35rem); line-height: 1.08; letter-spacing: -.045em; overflow-wrap: anywhere; }
.auth-card__sub { color: var(--muted); font-size: .9rem; line-height: 1.5; margin-top: 8px; margin-bottom: 4px; }
.auth-card--message .auth-card__title { text-align: center; }
.auth-card:has(> .auth-card__icon) .auth-card__title, .auth-card:has(> .auth-card__icon) .auth-card__sub { text-align: center; }
.auth-card > .eyebrow { text-align: center; }
.auth-card > form, .auth-card > .notice { margin-top: 14px; }
.auth-card > p.small { margin-top: 16px; }
.auth-card__resend { display: grid; gap: 10px; justify-items: center; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--border); width: 100%; }
.error-detail { text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .78rem; background: var(--sand); padding: 12px; border-radius: var(--radius-s); width: 100%; margin: 0; }

/* --- Dashboard --- */
.round-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); }
.round-card {
    display: grid; gap: 18px; padding: 20px; min-width: 0; align-content: start;
    background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform .2s;
}
.round-card:hover { transform: translateY(-4px); }
.round-card__art { display: none; border-radius: 6px; overflow: hidden; background: var(--pine); }
.round-card__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.round-card__body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.round-card__head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 12px; }
.round-card__head > div { flex: 1 1 140px; min-width: 0; }
.round-card__icon {
    flex: none; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
    background: var(--pine); color: var(--gold);
}
.round-card__icon .icon { width: 23px; height: 23px; }
.round-card__group { font-family: var(--font-serif); font-weight: 700; font-size: 1.36rem; line-height: 1.15; letter-spacing: -.035em; color: var(--pine); overflow-wrap: anywhere; }
.round-card__title { font-family: var(--font-sans); font-weight: 500; font-size: 1rem; letter-spacing: 0; color: var(--ink); margin-top: 2px; overflow-wrap: anywhere; }
.round-card__title a { text-decoration: none; }
.round-card__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.round-card__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.round-card__foot .btn--primary { flex: 1 1 100%; border-radius: 12px; min-height: 50px; }
.round-card__foot .btn--ghost { flex: 1 1 100%; min-height: 38px; margin-bottom: -8px; }
@media (min-width: 520px) {
    .round-card { grid-template-columns: 170px minmax(0, 1fr); }
    .round-card__art { display: block; min-height: 204px; }
    .round-card__icon { display: none; }
}
.facts { margin: 0; display: grid; gap: 0; }
.facts > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 7px 0; }
.facts dt { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: .9rem; }
.facts dt .icon { width: 24px; height: 24px; padding: 5px; border-radius: 50%; background: var(--pine); color: var(--gold-soft); }
.facts dd { margin: 0; font-weight: 600; font-size: .92rem; text-align: right; }

/* Hinweis auf eine abgeschlossene Auslosung, mit Umschlag */
.draw-banner {
    display: grid; gap: 16px; align-items: center; padding: 22px 20px; overflow: hidden;
    background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.draw-banner h2 { font-size: 1.32rem; margin-bottom: 6px; }
.draw-banner p { color: var(--muted); font-size: .92rem; max-width: 46ch; }
.draw-banner .btn { margin-top: 14px; border-radius: 12px; }
.draw-banner img { width: 190px; justify-self: center; }
@media (min-width: 620px) {
    .draw-banner { grid-template-columns: minmax(0, 1fr) 230px; padding: 24px 28px; }
    .draw-banner img { width: 230px; }
}

/* --- Runde: Countdown und Ziehung --- */
.countdown-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.countdown-card::after { content: ""; position: absolute; right: -60px; top: -90px; width: 220px; height: 220px; border-radius: 50%; background: var(--pine-600); pointer-events: none; }
.countdown-card > * { position: relative; z-index: 1; }
.countdown-card > div { display: grid; gap: 10px; min-width: 0; }
.countdown-card h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); }
.countdown-card img { flex: none; width: 104px; margin: -6px 0 -24px; }
@media (max-width: 520px) {
    .countdown-card img { display: none; }
}
.countdown { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.countdown__unit {
    min-width: 70px; padding: 10px 10px 8px; text-align: center; border-radius: var(--radius-s);
    background: var(--pine-700); border: 1px solid rgba(236, 208, 161, .3);
}
.countdown__unit strong { display: block; font-family: var(--font-serif); font-size: 1.9rem; line-height: 1.1; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.countdown__unit span { font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #d5e6dc; }

.reveal {
    position: relative; isolation: isolate; padding: 48px 16px 44px; border-radius: var(--radius); overflow: hidden;
    background: var(--pine);
}
.reveal::before, .reveal::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.reveal::before { left: -70px; bottom: -110px; width: 280px; height: 280px; border-radius: 50%; background: var(--tomato); }
.reveal::after { right: 0; bottom: 0; width: 240px; height: 260px; background: var(--pine-600); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.reveal__mystery {
    width: 108px; height: 108px; border-radius: 28px 28px 6px 28px; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-size: 3.6rem; font-weight: 700; line-height: 1; color: var(--gold-soft);
    background: var(--red); transform: rotate(-6deg);
}
.reveal__label { color: var(--muted); }
.reveal__name { font-size: clamp(2.1rem, 8vw, 3.2rem); font-weight: 800; letter-spacing: -.045em; color: var(--red); overflow-wrap: anywhere; }
.reveal h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
/* Umschlag beim ersten Aufdecken: vier gleich große Flächen um die Plakette, jede per clip-path zugeschnitten. */
.reveal__stage { display: grid; place-items: center; }
.reveal__stage .avatar { position: relative; z-index: 1; }
.reveal__env {
    position: absolute; left: 50%; top: 50%; width: 176px; height: 176px; margin: -118px 0 0 -88px;
    transform-origin: 50% 118px; pointer-events: none;
}
.reveal__env--back { z-index: 0; background: var(--pine-700); clip-path: inset(60px 0 0 0); }
.reveal__env--flap { z-index: 3; background: var(--teal); clip-path: polygon(0 60px, 100% 60px, 50% 122px); }
.reveal__env--front { z-index: 2; background: var(--pine); clip-path: polygon(0 60px, 50% 122px, 100% 60px, 100% 100%, 0 100%); }
.reveal__env--front::after { content: ""; position: absolute; inset: 0; background: var(--pine-600); clip-path: polygon(0 100%, 50% 122px, 100% 100%); }
.reveal__env--seal { z-index: 4; background: var(--tomato); clip-path: circle(15px at 50% 122px); }
.spark { position: absolute; top: -20px; z-index: 3; pointer-events: none; animation: spark-fall linear forwards; }
.spark--circle { border-radius: 50%; }
.spark--triangle { clip-path: polygon(50% 0, 100% 100%, 0 100%); }

.mini-wishes { list-style: none; display: grid; gap: 6px; }
.mini-wishes li { display: flex; align-items: baseline; gap: 9px; overflow-wrap: anywhere; }
.mini-wishes .icon { width: 15px; height: 15px; color: var(--gold); align-self: center; }

/* --- Wunschzettel --- */
.wishlist-layout { display: grid; gap: 26px; align-items: start; }
.wishlist-layout > * { min-width: 0; }
.wishlist-layout > :only-child { grid-column: 1 / -1; }
@media (min-width: 980px) {
    .wishlist-layout { grid-template-columns: minmax(0, 1fr) 300px; }
    .wishlist-layout > aside { position: sticky; top: calc(var(--header-h) + 20px); }
}
.wishes { list-style: none; }
.wish {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 13px 4px;
    border-bottom: 1px solid var(--border); background: var(--paper);
}
.wishes > .wish:last-child { border-bottom: 0; }
.wish__grip { color: var(--border-strong); cursor: grab; display: none; touch-action: none; }
.wish__bullet { flex: none; width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--red); color: var(--gold-soft); }
.wishes > .wish:nth-child(3n + 2) .wish__bullet { background: var(--pine); color: var(--gold); }
.wishes > .wish:nth-child(3n + 3) .wish__bullet { background: var(--gold); color: var(--pine); }
.wish__body { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.wish__title { font-size: 1rem; }
.wish__desc { font-size: .88rem; color: var(--muted); }
.wish__link { display: inline-flex; align-items: center; gap: 5px; font-size: .84rem; color: var(--red); font-weight: 650; text-underline-offset: 3px; width: fit-content; }
.wish__link .icon { width: 14px; height: 14px; }
.wish__meta { display: flex; align-items: center; gap: 8px; }
.wish__price { font-size: .86rem; color: var(--muted); white-space: nowrap; }
.wish__actions { display: flex; align-items: center; margin-left: auto; }
.wish__move { display: inline-flex; }
.wish__form { flex: 1 1 100%; padding: 6px 6px 10px; }
.wish.is-dragging { opacity: .6; background: var(--gold-50); }
.wishes.is-sortable .wish__grip { display: inline-flex; }
.wishes.is-sortable .wish__move { display: none; }
@media (hover: none) {
    /* Auf Touch-Geräten bleiben die Pfeile – Ziehen kollidiert dort mit dem Scrollen. */
    .wishes.is-sortable .wish__grip { display: none; }
    .wishes.is-sortable .wish__move { display: inline-flex; }
}
.person-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.person-head > div { flex: 1 1 220px; min-width: 0; }
.person-head h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); overflow-wrap: anywhere; }
.quote { margin: 0; padding: 16px 22px; font-family: var(--font-serif); font-style: italic; font-size: 1.14rem; color: var(--pine); background: var(--paper); border-left: 5px solid var(--gold); overflow-wrap: anywhere; }

/* --- Anonyme Nachrichten --- */
.chat { list-style: none; display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; padding: 6px 4px 10px; }
.bubble { max-width: min(82%, 520px); padding: 10px 15px 8px; border-radius: 18px; display: grid; gap: 2px; overflow-wrap: anywhere; }
.bubble__who { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.bubble time { font-size: .7rem; opacity: .7; }
.bubble--me { align-self: flex-end; background: var(--pine); color: var(--paper); border-bottom-right-radius: 4px; }
.bubble--them { align-self: flex-start; background: var(--sand); border-bottom-left-radius: 4px; }
.chat-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.chat-form textarea { flex: 1 1 240px; min-height: 52px; }

/* --- Verwaltung --- */
.draw-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-top: 6px; }
.draw-actions > details[open] { flex-basis: 100%; }
.card--green .small { color: #d5e6dc; }
.card--green .btn--secondary { border-color: #b5c3b8; color: var(--paper); }
.card--green .btn--secondary:hover { background: #21584e; }
.card--green .btn--ghost { color: #d5e6dc; }
.card--green .btn--ghost:hover { background: var(--pine-600); color: var(--paper); }
.card--green .link-red { color: var(--gold-soft); }
.logout-row { margin-top: 28px; text-align: center; }
/* Vorführ-Installation: Prüfansicht der Auslosung */
.check-list { list-style: none; display: grid; gap: 8px; margin-bottom: 16px; font-size: .92rem; }
.draw-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.profile-figure { margin-bottom: 18px; gap: 16px; }

/* --- Konto: Charakter-Baukasten --- */
.designer { display: grid; gap: 22px; align-items: start; }
.designer > * { min-width: 0; }
.designer__preview { position: sticky; top: calc(var(--header-h) + 10px); z-index: 2; display: flex; align-items: center; gap: 16px; }
.designer__figure { width: 92px; height: 92px; }
.designer__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.av-options { display: flex; flex-wrap: wrap; gap: 10px; }
.av-swatch input, .av-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.av-swatch > span { display: block; width: 42px; height: 42px; border-radius: 50%; border: 1px solid #cdbba1; cursor: pointer; }
.av-swatch input:checked + span { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--pine); }
.av-swatch input:focus-visible + span, .av-option input:focus-visible + .avatar { outline: 3px solid var(--gold); outline-offset: 3px; }
.av-option { display: grid; justify-items: center; gap: 6px; width: 76px; cursor: pointer; }
.av-option .avatar, .av-preset .avatar { width: 64px; height: 64px; }
.av-option__name { font-size: .78rem; line-height: 1.25; text-align: center; color: var(--muted); }
.av-option input:checked + .avatar { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--pine); }
.av-option input:checked ~ .av-option__name { color: var(--ink); font-weight: 700; }
.av-preset { padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; transition: transform .15s; }
.av-preset:hover { transform: translateY(-3px); }
.av-preset:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (min-width: 900px) {
    .designer { grid-template-columns: 280px minmax(0, 1fr); }
    .designer__preview { flex-direction: column; top: calc(var(--header-h) + 20px); padding: 30px 24px; }
    .designer__figure { width: 190px; height: 190px; }
    .designer__actions { justify-content: center; }
}

/* --- Fließtext (Datenschutz) --- */
.prose { max-width: 76ch; }
.prose h2 { font-size: 1.4rem; margin: 26px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 22px; display: grid; gap: 6px; }
.prose p + p, .prose ul + p { margin-top: 14px; }

/* -------------------------------------------------------------------------- 7 Bewegung */
@keyframes spark-fall {
    0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 1; }
    100% { transform: translate3d(var(--drift, 0), 620px, 0) rotate(540deg); opacity: 0; }
}
@keyframes flash-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}
@keyframes card-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}
@keyframes reveal-pop {
    0% { opacity: 0; transform: scale(.86) rotate(-3deg); }
    60% { opacity: 1; transform: scale(1.03) rotate(.6deg); }
    100% { transform: none; }
}
@keyframes reveal-name {
    0% { opacity: 0; letter-spacing: .3em; filter: blur(8px); }
    100% { opacity: 1; letter-spacing: -.045em; filter: none; }
}
/* Erstes Aufdecken: Umschlag landet und wackelt, Siegel springt ab, Klappe öffnet sich, die Plakette steigt heraus. */
@keyframes env-show {
    0% { opacity: 0; transform: translateY(-26px) scale(.7) rotate(-8deg); }
    14% { opacity: 1; transform: none; }
    26% { transform: rotate(-5deg); }
    32% { transform: rotate(5deg); }
    38% { transform: rotate(-4deg); }
    44% { transform: rotate(3deg); }
    50% { transform: none; }
    78% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(.5, 0, .9, .4); }
    100% { opacity: 0; transform: translateY(150px) rotate(10deg); }
}
@keyframes env-seal {
    0% { clip-path: circle(15px at 50% 122px); }
    55% { clip-path: circle(21px at 50% 122px); }
    100% { clip-path: circle(0 at 50% 122px); }
}
@keyframes env-flap {
    0% { z-index: 3; background: var(--teal); clip-path: polygon(0 60px, 100% 60px, 50% 122px); }
    49% { z-index: 3; background: var(--teal); }
    50% { z-index: 0; background: var(--gold-soft); }
    100% { z-index: 0; background: var(--gold-soft); clip-path: polygon(0 60px, 100% 60px, 50% 4px); }
}
@keyframes reveal-avatar {
    0%, 19% { opacity: 0; transform: scale(.72); }
    20%, 66% { opacity: 1; transform: scale(.72); }
    80% { transform: translateY(-30px) scale(.9); }
    92% { transform: scale(1.08); }
    100% { transform: none; }
}
.reveal--fresh .reveal__env { animation: env-show 2.7s ease-in-out both; }
.reveal--fresh .reveal__env--seal { animation: env-show 2.7s ease-in-out both, env-seal .35s 1.3s ease-in both; }
.reveal--fresh .reveal__env--flap { animation: env-show 2.7s ease-in-out both, env-flap .45s 1.55s ease-in-out both; }
.reveal--fresh .avatar--xl { animation: reveal-avatar 3s ease-in-out both; }
.reveal--fresh .parchment > * { animation: card-in .5s 3.3s ease-out both; }
.reveal--fresh .parchment > .reveal__stage { animation: none; }
.reveal--fresh .parchment__eyebrow, .reveal--fresh .reveal__label { animation-delay: 2.6s; }
.reveal--fresh .reveal__name { animation: reveal-name 1s 2.8s ease-out both; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    /* Ausnahme: Das erste Aufdecken (Umschlag und Konfetti) läuft bewusst immer, siehe AGENTS.md. */
    *:not(.reveal--fresh *), *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .btn:hover, .round-card:hover, .landing-step:hover, .av-preset:hover { transform: none; }
}

/* -------------------------------------------------------------------------- 8 Druck */
@media print {
    .site-header, .site-footer, .main-nav, .hero__actions, .btn, .icon-btn { display: none !important; }
    body { background: #fff; padding: 0 !important; }
    .hero { background-image: none; }
}
