:root {
    color-scheme: light dark;
    --bg: #f6f5f2;
    --karte: #fff;
    --text: #1b1a17;
    --leise: #6d6a63;
    --linie: #e2ded6;
    --akzent: #2f5d3a;
    --voll: #a3312a;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16181a;
        --karte: #1f2225;
        --text: #eceae5;
        --leise: #9b978f;
        --linie: #32363a;
        --akzent: #8dc7a2;
        --voll: #e2776e;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
    max-width: 40rem;
    background: var(--bg);
    color: var(--text);
    line-height: 1.4;
}

header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

h1 { font-size: 1.35rem; margin: 0; letter-spacing: -0.01em; }
header p { margin: 0.15rem 0 0; color: var(--leise); font-size: 0.85rem; }

button {
    font: inherit;
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--linie);
    border-radius: 999px;
    background: var(--karte);
    color: var(--text);
    cursor: pointer;
}
button:hover { border-color: var(--akzent); color: var(--akzent); }
button[disabled] { opacity: 0.5; cursor: progress; }

.termin {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    background: var(--karte);
    border: 1px solid var(--linie);
    border-radius: 0.7rem;
    padding: 0.7rem 1rem;
    margin-bottom: 0.4rem;
}

.wann { font-weight: 600; }
.stueck { color: var(--leise); font-size: 0.85rem; }

.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zahl b { font-size: 1.9rem; line-height: 1.1; display: block; }
.zahl small { color: var(--leise); font-size: 0.75rem; }

.fehler {
    background: color-mix(in srgb, var(--voll) 12%, var(--karte));
    border: 1px solid var(--voll);
    border-radius: 0.6rem;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
}

.leer { color: var(--leise); padding: 2rem 0; text-align: center; }

.kopf-knoepfe { display: flex; align-items: center; gap: 0.75rem; }

/* --- Anmeldung --- */
body.mittig {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anmeldung {
    background: var(--karte);
    border: 1px solid var(--linie);
    border-radius: 0.9rem;
    padding: 1.75rem;
    width: min(22rem, 100%);
    display: grid;
    gap: 0.75rem;
}
.anmeldung h1 { font-size: 1.2rem; margin: 0; }
.anmeldung .hinweis { margin: -0.4rem 0 0.25rem; color: var(--leise); font-size: 0.85rem; }

.anmeldung input {
    font: inherit;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--linie);
    border-radius: 0.5rem;
    background: var(--bg);
    color: var(--text);
}
.anmeldung input:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }

.anmeldung button {
    padding: 0.6rem 0.9rem;
    border-radius: 0.5rem;
    border-color: var(--akzent);
    color: var(--akzent);
    font-weight: 600;
}

.versteckt {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%);
}

.abmelden {
    background: none;
    border: none;
    color: var(--leise);
    font-size: 0.8rem;
    padding: 0;
    text-decoration: underline;
}
.abmelden:hover { color: var(--akzent); }
