/* PlanMySaufTrip – mobile-first, ohne Build-Schritt. */

:root {
    --red: #c8102e;
    --red-dark: #a00d25;
    --bg: #f4f1ec;
    --surface: #ffffff;
    --text: #1d1b19;
    --muted: #6d6862;
    --border: #e2ddd5;
    --success-bg: #e3f4e6;
    --success-text: #1e6b2e;
    --error-bg: #fbe4e6;
    --error-text: #9b1426;
    --radius: 14px;
    --shadow: 0 1px 3px rgb(0 0 0 / 0.06), 0 4px 14px rgb(0 0 0 / 0.04);
    --tabbar-height: 64px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #141210;
        --surface: #201d1a;
        --text: #f1ece6;
        --muted: #a39d95;
        --border: #34302b;
        --success-bg: #183a20;
        --success-text: #9fe0ad;
        --error-bg: #46161d;
        --error-text: #ffb3bd;
        --shadow: none;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body.has-nav { padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom)); }

a { color: var(--red); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .75rem; }
h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
code { font-size: .9em; word-break: break-all; }

/* --- Kopfzeile ---------------------------------------------------------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    padding-top: calc(.75rem + env(safe-area-inset-top));
    background: var(--red);
    color: #fff;
}

.brand {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.topbar .badge { background: rgb(255 255 255 / .2); color: #fff; text-decoration: none; }

.container { max-width: 640px; margin: 0 auto; padding: 1rem; }

/* --- Navigation unten ---------------------------------------------------- */

.tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 10;
    display: flex;
    height: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--muted);
    font-size: .75rem;
    text-decoration: none;
}

.tabbar a.active { color: var(--red); font-weight: 600; }
.tab-icon { font-size: 1.35rem; line-height: 1; }

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

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.card.narrow { max-width: 420px; margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mt { margin-top: 1.5rem; }
.mt-s { margin-top: .75rem; }
.mb { margin-bottom: 1rem; }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.big-emoji { font-size: 3rem; text-align: center; line-height: 1.2; }
.section-title { margin: 1.5rem 0 .75rem; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }

.badge {
    display: inline-block;
    padding: .1rem .55rem;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    vertical-align: middle;
}

.badge-muted { background: var(--border); color: var(--muted); }

.alert { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; overflow-wrap: anywhere; }
.alert-success { background: var(--success-bg); color: var(--success-text); }
.alert-error { background: var(--error-bg); color: var(--error-text); }

/* --- Formulare & Buttons -------------------------------------------------- */

.form { display: grid; gap: .9rem; }
.form h2 { margin-top: .75rem; }

label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }

input, select, textarea {
    width: 100%;
    min-height: 48px;
    padding: .65rem .8rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-weight: 400;
}

input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .6rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn:active { transform: scale(.98); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-danger { color: var(--error-text); }
.btn-block { width: 100%; }
.btn-small { min-height: 38px; padding: .35rem .8rem; font-size: .875rem; }

.copy-field { display: flex; gap: .5rem; }
.copy-field input { flex: 1; min-width: 0; }

/* --- Startseite ------------------------------------------------------------ */

.hero {
    padding: 1.75rem 1rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--red), #8e0b20);
    color: #fff;
    text-align: center;
    box-shadow: var(--shadow);
}

.hero-value { font-size: 4rem; font-weight: 800; line-height: 1; }
.hero-label { font-size: 1.1rem; font-weight: 600; margin-top: .25rem; }
.hero-meta { margin-top: .75rem; opacity: .85; font-size: .9rem; }
.hero-hint { margin-top: .5rem; font-weight: 600; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.tile {
    display: grid;
    gap: .2rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--text);
    text-decoration: none;
}

.tile.is-soon { opacity: .55; }
.tile-icon { font-size: 1.75rem; }

/* --- Listen ------------------------------------------------------------------ */

.list { display: grid; gap: .5rem; }

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    min-height: 52px;
    padding: .75rem 1rem;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.list-item.active { outline: 2px solid var(--red); }

.user-list { list-style: none; margin: 0; padding: 0; }

.user-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--border);
}

.user-list li:last-child { border-bottom: 0; }
.user-list li.is-inactive strong { text-decoration: line-through; color: var(--muted); }

.actions { position: relative; }
.actions summary { list-style: none; }
.actions summary::-webkit-details-marker { display: none; }

.actions-menu {
    position: absolute;
    right: 0;
    z-index: 5;
    display: grid;
    gap: .4rem;
    width: 220px;
    margin-top: .3rem;
    padding: .5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgb(0 0 0 / .15);
}

/* --- Teilnehmer ------------------------------------------------------------ */

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.page-head h1 { margin: 0; }

.link { color: var(--red); cursor: pointer; font-size: .875rem; font-weight: 600; }

.inline-form { display: flex; gap: .5rem; margin-top: .5rem; }
.inline-form > input, .inline-form > select { flex: 1; min-width: 0; min-height: 40px; padding: .4rem .7rem; }

.office-list, .duty-list, .plain-list { list-style: none; margin: 0; padding: 0; }
.office-list li { display: flex; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.office-list li:last-child { border-bottom: 0; }
.office-icon { font-size: 1.6rem; line-height: 1.3; }
.office-body { flex: 1; min-width: 0; }
.pause-note { margin-top: .25rem; padding: .3rem .6rem; border-radius: 8px; background: var(--bg); font-size: .875rem; }

.duty-list li, .plain-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--border);
}
.duty-list li:last-child, .plain-list li:last-child { border-bottom: 0; }
.duty-title { flex: 1; min-width: 0; font-weight: 600; }
.duty-list select { min-height: 38px; padding: .3rem .5rem; max-width: 9.5rem; }

.btn-icon { min-width: 38px; padding: .35rem; }

.list-item.is-me { outline: 2px solid var(--red); }
.chevron { color: var(--muted); font-size: 1.4rem; line-height: 1; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.chip {
    display: inline-block;
    padding: .25rem .7rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: .875rem;
    text-decoration: none;
}
.chip-strong { border-color: var(--red); }
.card .chips { margin-bottom: 0; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.segmented label { font-weight: 400; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.segmented span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .3rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
    font-size: .8rem;
    cursor: pointer;
}
.segmented input:checked + span { border-color: var(--red); background: var(--red); color: #fff; font-weight: 600; }
.segmented input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

label.check { display: flex; align-items: center; gap: .6rem; font-weight: 400; font-size: 1rem; }
label.check input { width: 22px; min-height: 22px; height: 22px; flex-shrink: 0; accent-color: var(--red); }

.intolerance-card { border-left: 5px solid var(--border); }
.intolerance-card.severity-allergy { border-left-color: var(--red); }
.intolerance-card.severity-intolerance { border-left-color: #e5a50a; }
.intolerance-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .6rem; font-size: 1.1rem; }
.intolerance-head .count { font-size: 1.4rem; font-weight: 800; color: var(--muted); }
.plain-list li.severity-allergy strong { color: var(--red); }

/* --- Zeitstrahl -------------------------------------------------------------- */

.badge-soft { background: var(--bg); color: var(--red); border: 1px solid var(--red); }

.timeline-day { margin-bottom: 1.5rem; }
.day-head {
    position: sticky;
    top: calc(52px + env(safe-area-inset-top));
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 -1rem .5rem;
    padding: .5rem 1rem;
    background: var(--bg);
    font-size: 1rem;
}
.timeline-day.is-today .day-head span:first-child { color: var(--red); }

.event {
    --accent: var(--border);
    margin-bottom: .6rem;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    border-left: 5px solid var(--accent);
    scroll-margin-top: 110px;
}
.event.type-travel { --accent: #3b82f6; }
.event.type-meeting { --accent: #8b5cf6; }
.event.type-meal { --accent: #e5a50a; }
.event.type-activity { --accent: #16a34a; }
.event.type-party { --accent: var(--red); }
.event.is-now { outline: 2px solid var(--red); }
.event.is-next { outline: 2px dashed var(--red); }

.event-main { display: flex; gap: .75rem; padding: .8rem 1rem; color: var(--text); text-decoration: none; }
.event-time { display: grid; width: 3.1rem; flex-shrink: 0; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.event-time .muted { font-weight: 400; font-size: .85rem; }
.event-icon { font-size: 1.4rem; line-height: 1.2; }
.event-body { flex: 1; min-width: 0; }
.event-body .badge { margin-bottom: .2rem; }
.event-title { display: block; overflow-wrap: anywhere; }
.rsvp-summary { margin-top: .2rem; color: var(--muted); }

.quick-rsvp { display: flex; align-items: center; gap: .5rem; padding: 0 1rem .8rem 4.85rem; }
.quick-rsvp .btn { min-height: 34px; padding: .2rem .7rem; }
.btn.is-selected { background: var(--red); border-color: var(--red); color: #fff; }

.add-to-day { display: inline-block; margin: .1rem 0 0 .3rem; color: var(--muted); text-decoration: none; }

.event-detail { border-top: 5px solid var(--border); }
.event-detail.type-travel { border-top-color: #3b82f6; }
.event-detail.type-meeting { border-top-color: #8b5cf6; }
.event-detail.type-meal { border-top-color: #e5a50a; }
.event-detail.type-activity { border-top-color: #16a34a; }
.event-detail.type-party { border-top-color: var(--red); }
.event-when { font-weight: 600; }

.rsvp-head { font-size: 1rem; margin: 1rem 0 .3rem; }
.rsvp-head:first-of-type { margin-top: .25rem; }
.rsvp-list { margin: 0; padding-left: 1.2rem; }

.button-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.button-row > * { flex: 1; }
.button-row .btn { width: 100%; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; font-size: .9rem; margin-bottom: .3rem; padding: 0; }
.type-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.type-picker legend { grid-column: 1 / -1; }
.type-picker label { font-weight: 400; }
.type-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.type-picker label > span {
    display: grid;
    justify-items: center;
    gap: .1rem;
    padding: .5rem .25rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: .75rem;
    text-align: center;
    cursor: pointer;
}
.type-icon { font-size: 1.4rem; }
.type-picker input:checked + span { border-color: var(--red); background: var(--red); color: #fff; font-weight: 600; }
.type-picker input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

/* --- Getränke -------------------------------------------------------------- */

.guest-who { margin-bottom: .75rem; }
.link-button { border: 0; background: none; padding: 0; color: var(--red); font: inherit; text-decoration: underline; cursor: pointer; }

.drink-picker { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.drink-picker legend { grid-column: 1 / -1; }
.drink-picker label { font-weight: 400; }
.drink-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.drink-picker label > span {
    display: grid;
    align-content: center;
    gap: .15rem;
    min-height: 76px;
    height: 100%;
    padding: .7rem .8rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    overflow-wrap: anywhere;
}
.drink-picker input:checked + span { border-color: var(--red); background: var(--red); color: #fff; }
.drink-picker input:checked + span .muted { color: rgb(255 255 255 / .85); }
.drink-picker input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

.order-row { display: grid; grid-template-columns: 5.5rem 1fr; gap: .6rem; }
.btn-big { min-height: 56px; font-size: 1.1rem; }

.order {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
    padding: .7rem .9rem;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
    border-left: 5px solid var(--border);
}
.order-icon { font-size: 1.5rem; }
.order-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.order.status-in_progress { border-left-color: #e5a50a; }
.order.status-done { border-left-color: #16a34a; }
.order.status-done strong { color: #16a34a; }
.order.status-cancelled { opacity: .55; }

.bar-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.bar-stats > div { display: grid; padding: .7rem 1rem; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.bar-stats strong { font-size: 1.8rem; line-height: 1.1; }

.queue-item {
    margin-bottom: .75rem;
    padding: .9rem 1rem;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    border-left: 6px solid var(--red);
}
.queue-item.status-in_progress { border-left-color: #e5a50a; }
.queue-head { display: flex; justify-content: space-between; align-items: baseline; }
.queue-pos { font-weight: 800; color: var(--muted); }
.queue-drink { font-size: 1.35rem; font-weight: 800; line-height: 1.25; margin: .15rem 0; overflow-wrap: anywhere; }
.queue-drink .qty { color: var(--red); }
.queue-wish { font-style: italic; margin-bottom: .2rem; overflow-wrap: anywhere; }
.queue-for { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.queue-actions { display: flex; gap: .5rem; margin-top: .7rem; }
.queue-actions form:not(:last-child) { flex: 1; }
.queue-actions .btn { width: 100%; min-height: 46px; }
.queue-actions .btn-icon { width: 46px; }

.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { padding: .35rem 0; border-bottom: 1px solid var(--border); }

.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li { display: grid; gap: .4rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.menu-list li:last-child { border-bottom: 0; }
.menu-list li.is-off input { opacity: .6; }
.menu-edit { display: grid; grid-template-columns: 1fr auto; gap: .4rem; }
.menu-edit input { min-height: 40px; padding: .4rem .7rem; }
.menu-edit input[name=description] { grid-column: 1; }
.menu-edit button { grid-column: 2; grid-row: 1 / span 2; }
.menu-actions { display: flex; gap: .4rem; justify-content: flex-end; }

/* --- Umfragen --------------------------------------------------------------- */

.poll-item > span:first-child { display: grid; gap: .1rem; min-width: 0; overflow-wrap: anywhere; }
.poll-meta { font-weight: 400; }
.poll-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }

.poll-banner {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: var(--radius);
    border: 2px solid var(--red);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
}
.poll-banner > span:last-child { display: grid; min-width: 0; }
.poll-banner .small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll-banner-icon { font-size: 1.8rem; }

.vote-options { display: grid; gap: .5rem; }
.vote-option {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 52px;
    padding: .6rem .9rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}
.vote-option input { width: 22px; height: 22px; min-height: 22px; flex-shrink: 0; accent-color: var(--red); }
.vote-option:has(input:checked) { border-color: var(--red); }
.vote-option span { overflow-wrap: anywhere; }

.segmented-2 { grid-template-columns: 1fr 1fr; }

.results { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.result-head { display: flex; justify-content: space-between; gap: .5rem; overflow-wrap: anywhere; }
.bar { height: 12px; margin: .3rem 0 .2rem; border-radius: 999px; background: var(--bg); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: var(--muted); transition: width .4s ease; }
.results li.is-winner .bar span, .results:not(:has(.is-winner)) .bar span { background: var(--red); }
.results li.is-winner .result-head { font-weight: 700; }
.results-hidden { padding: 1rem 0; font-size: 1.05rem; }

/* --- Regelwerk -------------------------------------------------------------- */

.rules-tools { position: sticky; top: calc(52px + env(safe-area-inset-top)); z-index: 3; display: flex; gap: .5rem; margin: 0 -1rem 1rem; padding: .5rem 1rem; background: var(--bg); }
.rules-tools input { flex: 1; min-width: 0; min-height: 42px; padding: .45rem .8rem; }
.toc { position: relative; }
.toc summary { list-style: none; min-height: 42px; }
.toc summary::-webkit-details-marker { display: none; }
.toc-list {
    position: absolute;
    right: 0;
    z-index: 5;
    display: grid;
    width: min(320px, calc(100vw - 2rem));
    max-height: 60vh;
    overflow-y: auto;
    margin-top: .3rem;
    padding: .4rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgb(0 0 0 / .15);
}
.toc-list a { padding: .45rem .6rem; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .9rem; }
.toc-list a:active, .toc-list a:hover { background: var(--bg); }
.toc-num { display: inline-block; min-width: 2.6rem; color: var(--red); font-weight: 700; }

.rule { scroll-margin-top: 120px; }
.rule h2 { font-size: 1.1rem; }
.rule-num { color: var(--red); margin-right: .2rem; }
.rule-body p { margin: 0 0 .6rem; }
.rule-body p:last-child { margin-bottom: 0; }
.rule-body ul { margin: 0 0 .6rem; padding-left: 1.3rem; }
.rule-admin { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .75rem; padding-top: .6rem; border-top: 1px solid var(--border); }
.rule-actions { display: flex; gap: .3rem; }
.btn[disabled] { opacity: .35; cursor: default; }
.rule-head-fields { display: grid; grid-template-columns: 4.5rem 1fr; gap: .6rem; }

/* --- Sonderregel ------------------------------------------------------------- */

[hidden] { display: none !important; }
.special-link { display: block; color: inherit; text-decoration: none; }
.special-card {
    margin: 1rem 0;
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f5b700, #e08a00);
    color: #1d1b19;
    box-shadow: var(--shadow);
}
.special-card.is-expired { filter: grayscale(1); opacity: .7; }
.special-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-weight: 800; text-transform: uppercase; font-size: .8rem; letter-spacing: .04em; }
.special-timer { font-variant-numeric: tabular-nums; font-size: 1rem; text-transform: none; }
.special-text { margin: .4rem 0; font-size: 1.25rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.special-meta { opacity: .8; }
.special-progress { height: 6px; margin-top: .6rem; border-radius: 999px; background: rgb(0 0 0 / .15); overflow: hidden; }
.special-progress span { display: block; height: 100%; background: #1d1b19; border-radius: 999px; }
.special-edit { margin: -.6rem 0 1rem; text-align: right; }
.special-item p { margin: 0 0 .3rem; }
.prompt-helper summary { cursor: pointer; }
.prompt-helper textarea { margin-top: .3rem; font-size: .9rem; }

/* --- ERIK KESCHER! ------------------------------------------------------------ */

.kescher-form { margin: 1rem 0; }
.kescher-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    width: 100%;
    min-height: 64px;
    border: 0;
    border-radius: var(--radius);
    background: repeating-linear-gradient(-45deg, #1d1b19 0 14px, #2b2724 14px 28px);
    color: #f5b700;
    font: inherit;
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: .04em;
    box-shadow: 0 4px 0 #000, var(--shadow);
    cursor: pointer;
}
.kescher-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.kescher-icon { font-size: 1.8rem; }
.kescher-stats { margin-top: -.4rem; }

.kescher-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgb(200 16 46 / .96);
    color: #fff;
    text-align: center;
    animation: kescher-in .25s ease-out;
}
.kescher-overlay-inner { display: grid; gap: .6rem; justify-items: center; max-width: 360px; }
.kescher-overlay-icon { font-size: 6rem; line-height: 1; animation: kescher-shake .6s ease-in-out 3; }
.kescher-overlay-title { font-size: 2.6rem; font-weight: 900; line-height: 1.05; }
.kescher-overlay-sub { font-size: 1.15rem; }
.kescher-overlay-rule { opacity: .85; font-size: .9rem; }
.kescher-overlay .btn { margin-top: 1rem; min-width: 200px; background: #fff; color: var(--red); border: 0; }
@keyframes kescher-in { from { opacity: 0; transform: scale(1.05); } }
@keyframes kescher-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-15deg); } 75% { transform: rotate(15deg); } }
@media (prefers-reduced-motion: reduce) { .kescher-overlay, .kescher-overlay-icon { animation: none; } }

/* --- Busfahren ---------------------------------------------------------------- */

.bus-board { display: grid; justify-items: center; gap: .8rem; margin: 1rem 0 1.25rem; }
.bus-sign {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: .9rem;
    padding: .9rem 1.4rem;
    border: 4px solid #0a7a3d;
    border-radius: 18px;
    background: #f5d000;
    color: #0a7a3d;
    box-shadow: var(--shadow);
}
.bus-sign-h {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    background: #0a7a3d;
    color: #f5d000;
    font-size: 2rem;
    font-weight: 900;
}
.bus-sign-label { font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; }
.bus-sign-number { font-size: 4rem; font-weight: 900; line-height: .95; font-variant-numeric: tabular-nums; }
.bus-busdriver { margin-top: -.2rem; }
.bus-crew { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; width: 100%; }
.bus-crew > div { display: grid; justify-items: center; padding: .6rem; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font-size: 1.15rem; text-align: center; overflow-wrap: anywhere; }
.bus-controls label { font-weight: 600; }
.bus-secondary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-top: .75rem; }
.bus-secondary details { margin-left: auto; text-align: right; }
.bus-ranking { margin: 0; padding-left: 1.4rem; }
.bus-ranking li { padding: .3rem 0; }
.bus-ranking li { display: list-item; }
.bus-ranking li > span:first-child { display: inline-block; min-width: 40%; }
.bus-ranking li > strong { float: right; }

.bus-banner {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-top: 1rem;
    padding: .8rem 1rem;
    border-radius: var(--radius);
    border: 3px solid #0a7a3d;
    background: #f5d000;
    color: #0a5a2d;
    text-decoration: none;
    box-shadow: var(--shadow);
}
.bus-banner > span:last-child { display: grid; }
.bus-sign-mini {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: #0a7a3d;
    color: #f5d000;
    font-weight: 900;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* --- Strafenkasse -------------------------------------------------------------- */

.cash-box {
    margin-bottom: 1rem;
    padding: 1.25rem 1rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #14532d, #0a7a3d);
    color: #fff;
    text-align: center;
    box-shadow: var(--shadow);
}
.cash-label { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; opacity: .85; }
.cash-total { font-size: 3rem; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }

.penalty {
    margin-bottom: .6rem;
    padding: .8rem 1rem;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    border-left: 5px solid #e5a50a;
    overflow-wrap: anywhere;
    scroll-margin-top: 80px;
}
.penalty.status-confirmed { border-left-color: var(--red); }
.penalty.status-reduced { border-left-color: #16a34a; }
.penalty.status-rejected { border-left-color: var(--border); opacity: .7; }
.penalty.status-rejected .penalty-amount { text-decoration: line-through; }
.penalty-head { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.penalty-amount { font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.penalty-amount s { font-weight: 400; font-size: .9rem; margin-right: .2rem; }
.penalty-note { font-style: italic; }
.penalty-decide { display: grid; gap: .5rem; margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.penalty-decide input { min-height: 40px; padding: .4rem .7rem; }
.penalty-buttons, .penalty-reduce { display: flex; gap: .5rem; }
.penalty-buttons .btn { flex: 1; }
.penalty-reduce input { flex: 1; min-width: 0; }
.penalty-delete { text-align: right; margin-top: .3rem; }

.sinner-list { margin: 0; padding-left: 1.4rem; }
.sinner-list li { padding: .3rem 0; }
.sinner-list li > span { display: inline-block; min-width: 65%; }
.sinner-list li > strong { float: right; }
.sinner-list li.is-me { color: var(--red); }

.catalog-edit { display: grid; gap: .5rem; padding: .9rem 1rem; }
.catalog-edit input, .catalog-edit select { min-height: 40px; padding: .4rem .6rem; }
.catalog-row { display: flex; gap: .4rem; }
.catalog-row input { width: 5rem; flex-shrink: 0; }
.catalog-row select { flex: 1; min-width: 0; }

/* --- Tagesinfo ---------------------------------------------------------------- */

.news {
    margin-bottom: .75rem;
    padding: .9rem 1rem;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    border-top: 4px solid var(--border);
    overflow-wrap: anywhere;
}
.news.is-pinned { border-top-color: var(--red); }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.news-title { margin: .35rem 0 .3rem; font-size: 1.15rem; }
.news-actions { display: flex; justify-content: flex-end; gap: .4rem; margin-top: .6rem; }
.home-news { margin-top: .5rem; }
.home-news .section-title { margin-top: 1rem; }
details.card > summary { cursor: pointer; }

/* --- Push ------------------------------------------------------------------------ */

.push-prompt {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1rem;
    padding: .7rem .8rem .7rem 1rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 2px dashed var(--red);
}
.push-prompt a { display: grid; flex: 1; color: var(--text); text-decoration: none; }
.push-prompt .small { color: var(--muted); }
.push-status { font-weight: 600; }
.syscheck { list-style: none; margin: 0; padding: 0; }
.syscheck li { padding: .25rem 0; }

@media (min-width: 700px) {
    .tiles { grid-template-columns: repeat(3, 1fr); }
}
