/* OUR MOMENTS – Gestaltung
   Mobile First: Grundlage ist das iPhone, größere Bildschirme werden unten ergänzt. */

:root {
    --bg: #f7f2ee;
    --surface: #fffdfb;
    --surface-2: #f1ebe6;
    --ink: #221d23;
    --muted: #7b7078;
    --line: rgba(34, 29, 35, .09);
    --accent: #a85d70;
    --accent-ink: #ffffff;
    --accent-soft: rgba(168, 93, 112, .12);
    --secret: #3d3550;
    --secret-soft: rgba(61, 53, 80, .09);
    --danger: #b3412f;
    --ok: #4f7a57;
    --shadow: 0 1px 2px rgba(34, 29, 35, .04), 0 8px 24px rgba(34, 29, 35, .06);
    --radius: 20px;
    --radius-sm: 12px;
    --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", Arial, sans-serif;
    --tabbar-h: 64px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16131a;
        --surface: #211d26;
        --surface-2: #2a2530;
        --ink: #f3ece9;
        --muted: #a79ca5;
        --line: rgba(255, 255, 255, .09);
        --accent: #d98ea0;
        --accent-ink: #1b1519;
        --accent-soft: rgba(217, 142, 160, .14);
        --secret: #c9bfe6;
        --secret-soft: rgba(201, 191, 230, .1);
        --danger: #ef8a78;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 17px/1.5 var(--sans);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: 100dvh;
}

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

a { color: var(--accent); text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.page {
    max-width: 680px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top) + 20px) max(20px, env(safe-area-inset-left)) 24px max(20px, env(safe-area-inset-right));
}

.narrow { max-width: 520px; margin: 0 auto; }

/* ---------- Typografie ---------- */
.eyebrow { margin: 0 0 4px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.title { font-family: var(--serif); font-weight: 600; font-size: 32px; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.page-head { margin: 8px 0 24px; }
.page-head .muted { margin: 0; }
.section { margin: 32px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-title { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 0 0 12px; }
.section-note { margin: -6px 0 12px; font-size: 14px; color: var(--muted); }
.link-more { font-size: 15px; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Karten und Flächen ---------- */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin: 0 0 16px;
}
.card-title { font-size: 17px; font-weight: 600; margin: 0 0 14px; }

.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -20px;
    padding: 2px 20px 12px;
    scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* Erlebnis-Karte */
.xp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 168px;
    padding: 18px;
    border-radius: var(--radius);
    color: #2a2026;
    background: var(--mood);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.xp-card:active { transform: scale(.98); }
.xp-card-top { min-height: 26px; }
.xp-card-title { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.2; margin: 0 0 4px; }
.xp-card-sub { margin: 0 0 6px; font-size: 15px; opacity: .85; }
.xp-card-meta { margin: 0; font-size: 13px; opacity: .75; }
.xp-card.is-surprise::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1.5px dashed rgba(255, 255, 255, .7);
    border-radius: var(--radius);
    pointer-events: none;
}

/* Stimmungen (Farbwelten) */
.mood-rose { --mood: linear-gradient(145deg, #f6dcd7 0%, #e7b3b5 55%, #c98b98 100%); }
.mood-sand { --mood: linear-gradient(145deg, #f5eadb 0%, #e6cfab 55%, #c9a77c 100%); }
.mood-sage { --mood: linear-gradient(145deg, #e6ede0 0%, #bccdb5 55%, #8fa58a 100%); }
.mood-ocean { --mood: linear-gradient(145deg, #dfeaf0 0%, #a9c6d4 55%, #6f97ad 100%); }
.mood-night { --mood: linear-gradient(145deg, #4a4263 0%, #2f2a44 55%, #1c1a2b 100%); }
.xp-card.mood-night, .xp-hero.mood-night { color: #f4eef5; }

.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    background: rgba(255, 255, 255, .6);
    color: #2a2026;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.pill-secret { background: rgba(43, 36, 58, .82); color: #fff; }
.pill-light { background: rgba(255, 255, 255, .7); }
.pill-small { font-size: 11px; padding: 2px 8px; background: var(--surface-2); color: var(--muted); }

/* ---------- Startseite ---------- */
.reveal {
    display: block;
    padding: 20px;
    margin: 0 0 16px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #3d3550, #7a5470);
    color: #fff;
    box-shadow: var(--shadow);
}
.reveal-kicker { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.reveal-title { display: block; font-family: var(--serif); font-size: 24px; margin: 4px 0; }
.reveal-from { display: block; font-size: 14px; opacity: .85; }

.empty { text-align: center; padding: 32px 12px; }
.empty .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }

.timeline { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.timeline-item a { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px 14px 34px; color: var(--ink); position: relative; }
.timeline-item + .timeline-item a { border-top: 1px solid var(--line); }
.timeline-item a::before { content: ""; position: absolute; left: 16px; top: 21px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline-item.kind-release a::before { background: var(--secret); }
.timeline-item.kind-block a::before { background: transparent; border: 2px solid var(--accent); }
.timeline-label { font-weight: 500; }
.timeline-when { font-size: 14px; color: var(--muted); }

/* ---------- Segment-Auswahl ---------- */
.segmented {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin: 0 0 20px;
    border-radius: 14px;
    background: var(--surface-2);
    overflow-x: auto;
    scrollbar-width: none;
}
.segmented a {
    flex: 1 0 auto;
    text-align: center;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
}
.segmented a.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* ---------- Erlebnis-Ansicht ---------- */
.xp-hero {
    position: relative;
    margin: calc(-1 * (env(safe-area-inset-top) + 20px)) -20px 20px;
    padding: calc(env(safe-area-inset-top) + 72px) 24px 32px;
    background: var(--mood);
    color: #2a2026;
    border-radius: 0 0 28px 28px;
}
.xp-hero .back, .xp-hero .hero-action {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 14px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    color: #2a2026;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-size: 15px;
    font-weight: 500;
}
.xp-hero .back { left: 16px; width: 40px; }
.xp-hero .hero-action { right: 16px; padding: 0 16px; }
.xp-title { font-family: var(--serif); font-size: 34px; line-height: 1.12; margin: 10px 0 6px; }
.xp-sub { font-size: 18px; margin: 0 0 10px; opacity: .85; }
.xp-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; opacity: .8; }
.xp-countdown { margin: 16px 0 0; font-size: 15px; font-weight: 600; }

.notice { padding: 14px 16px; border-radius: var(--radius-sm); font-size: 15px; margin: 0 0 16px; }
.notice-secret { background: var(--secret-soft); color: var(--secret); }

.blocks { display: grid; gap: 14px; margin: 20px 0; }
.block { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.block-title { font-family: var(--serif); font-size: 21px; margin: 0 0 10px; }
.block-kicker { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.block-flag { margin: -4px 0 12px; font-size: 13px; color: var(--secret); }

.big-countdown { font-family: var(--serif); font-size: 34px; line-height: 1.2; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }

.block-locked { text-align: center; background: var(--secret-soft); box-shadow: none; border: 1.5px dashed var(--line); }
.lock-icon { color: var(--secret); margin-bottom: 4px; }
.lock-title { font-family: var(--serif); font-size: 20px; margin: 0; }
.lock-when { margin: 2px 0; color: var(--muted); font-size: 15px; }
.lock-countdown { margin: 0; font-weight: 600; color: var(--secret); font-variant-numeric: tabular-nums; }

.block-finale { text-align: center; padding: 32px 24px; background: linear-gradient(180deg, var(--surface), var(--accent-soft)); }
.finale-ornament { color: var(--accent); font-size: 22px; }
.finale-title { font-family: var(--serif); font-size: 26px; margin: 8px 0 12px; }
.finale-body { font-family: var(--serif); font-size: 18px; }

.link-card { display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.link-label { font-weight: 600; font-size: 18px; }
.link-note { color: var(--muted); font-size: 15px; }
.link-host { color: var(--accent); font-size: 14px; margin-top: 4px; }

.checklist-head { display: flex; justify-content: space-between; align-items: baseline; }
.checklist-count { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li + li { border-top: 1px solid var(--line); }
.checklist form { margin: 0; }
.check-btn {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 12px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.check-box { flex: 0 0 24px; height: 24px; border-radius: 50%; border: 1.8px solid var(--muted); transition: all .2s var(--ease); }
.is-done .check-box { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--surface); }
.check-text { flex: 1; }
.is-done .check-text { color: var(--muted); text-decoration: line-through; }
.check-by { font-size: 12px; color: var(--muted); }

.xp-footer { text-align: center; margin: 24px 0; }

/* ---------- Formulare ---------- */
.field { display: block; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.field small.field-error, .field-error { color: var(--danger); }
input[type="text"], input[type="password"], input[type="url"], input[type="datetime-local"], textarea {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--ink);
    font: 17px/1.4 var(--sans); /* 17px verhindert das automatische Zoomen auf dem iPhone */
    -webkit-appearance: none;
    appearance: none;
    min-height: 48px;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, textarea:focus { background: var(--surface); border-color: var(--accent); outline: none; }
.field-row { display: grid; gap: 0 12px; }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin: 0 0 16px; }
.fieldset legend { font-weight: 600; padding: 0 6px; }

.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; }
.choice input { margin-top: 4px; accent-color: var(--accent); }
.choice strong { display: block; font-size: 16px; }
.choice small { display: block; color: var(--muted); font-size: 14px; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.release-field { margin-top: 12px; }
.choices:not(:has(input[value="timed"]:checked)) + .release-field { display: none; }

.moods { display: flex; flex-wrap: wrap; gap: 8px; }
.mood-option { position: relative; cursor: pointer; }
.mood-option input { position: absolute; opacity: 0; }
.mood-option span { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--mood); color: #2a2026; font-size: 14px; font-weight: 500; border: 2px solid transparent; }
.mood-option.mood-night span { color: #fff; }
.mood-option input:checked + span { border-color: var(--ink); }
.mood-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.inline-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 0 0 12px; cursor: pointer; }
.inline-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
.release-toggle .release-at { display: none; }
.release-toggle:has(input[name="use_release"]:checked) .release-at { display: block; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    border: 0;
    font: 600 16px/1 var(--sans);
    cursor: pointer;
    transition: transform .15s var(--ease), opacity .15s;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); margin: 0 0 16px; font-size: 15px; }
.alert p { margin: 0 0 4px; }
.alert-error { background: rgba(179, 65, 47, .1); color: var(--danger); }

/* ---------- Bausteine bearbeiten ---------- */
.block-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.block-item, .block-item details, .block-item summary { min-width: 0; }
.block-item { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.block-item-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; }
.block-item-head::-webkit-details-marker { display: none; }
.block-type { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); flex: 0 0 auto; }
.block-preview { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 15px; }
.block-form { padding: 4px 16px 16px; }
.block-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.block-tools form { margin: 0; }

.add-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.add-item { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.add-item summary { display: flex; flex-direction: column; padding: 14px 16px; cursor: pointer; list-style: none; }
.add-item summary::-webkit-details-marker { display: none; }
.add-item summary small { color: var(--muted); font-size: 14px; }
.add-item[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }

.danger-zone { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); }

.back-inline { display: inline-flex; align-items: center; gap: 2px; font-size: 16px; margin: 0 0 10px -4px; }
.back-inline svg { width: 20px; height: 20px; }

/* ---------- Login ---------- */
.auth { min-height: calc(100dvh - 80px); display: flex; flex-direction: column; justify-content: center; max-width: 420px; margin: 0 auto; }
.auth-brand { text-align: center; margin-bottom: 28px; }
.brand-mark svg { width: 56px; height: 56px; stroke: var(--accent); stroke-width: 2; }
.brand-title { font-family: var(--serif); font-weight: 500; letter-spacing: .18em; font-size: 26px; margin: 8px 0 4px; }
.brand-sub { color: var(--muted); margin: 0; }

/* ---------- Profil & Admin ---------- */
.profile-actions { display: grid; gap: 10px; margin-top: 8px; }
.profile-actions form { margin: 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.stats div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-weight: 600; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 24px 1fr auto; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.checks li:last-child { border-bottom: 0; }
.check-icon { font-weight: 700; }
.checks .ok .check-icon { color: var(--ok); }
.checks .fail .check-icon { color: var(--danger); }
.checks .warn .check-icon { color: #b58a2a; }
.check-value { color: var(--muted); text-align: right; }
.check-hint { grid-column: 2 / -1; color: var(--muted); }
.user-list { list-style: none; margin: 0; padding: 0; }
.user-list li { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.user-list li:last-child { border-bottom: 0; }
.user-list span { display: block; }
.user-list summary { list-style: none; }
.user-list summary::-webkit-details-marker { display: none; }
.log-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.log-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.log-pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 320px; overflow: auto; background: var(--surface-2); padding: 12px; border-radius: var(--radius-sm); }
.empty-page { text-align: center; padding-top: 18vh; }

/* ---------- Galerie ---------- */
.gallery { display: grid; gap: 6px; grid-template-columns: repeat(3, 1fr); margin: 0 -8px; }
.gallery-1 { grid-template-columns: 1fr; }
.gallery-2 { grid-template-columns: 1fr 1fr; }
.gallery-item { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--surface-2); }
.gallery-1 .gallery-item { aspect-ratio: auto; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.gallery-1 .gallery-item img { height: auto; }
.gallery-item:active img { transform: scale(.97); }
.gallery-caption { margin: 10px 0 0; font-size: 15px; color: var(--muted); }

input[type="file"] { display: block; width: 100%; font: 15px var(--sans); padding: 12px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); }

.media-manage { list-style: none; margin: 0; padding: 0 16px 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.media-manage li { position: relative; aspect-ratio: 1; }
.media-manage img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.media-manage form { position: absolute; top: 4px; right: 4px; margin: 0; }
.media-remove { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; cursor: pointer; }

.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; background: #0c0a0e; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.lightbox.is-open { display: flex; animation: fadeUp .25s var(--ease) both; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-close { position: absolute; top: calc(env(safe-area-inset-top) + 12px); right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 16px; cursor: pointer; }
.lb-count { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 18px); left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .75); font-size: 14px; }

.admin-banner { display: block; margin: 0 0 16px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); font-size: 15px; }

/* ---------- QR-Stationen ---------- */
select { display: block; width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); font: 17px var(--sans); -webkit-appearance: none; appearance: none; }
.stations { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin: 0 0 14px; }
.stations-head { display: flex; justify-content: space-between; align-items: baseline; }
.stations-head .section-title { margin-bottom: 8px; }
.station-list { list-style: none; margin: 0; padding: 0; }
.station-list li { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.station-no { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; border: 1.6px solid var(--muted); color: var(--muted); }
.station-list .is-found .station-no { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.station-list li:not(.is-found) .station-name { color: var(--muted); }
.station-item .block-item-head { cursor: default; }

.scan-hero { margin: calc(-1 * (env(safe-area-inset-top) + 20px)) -20px 20px; padding: calc(env(safe-area-inset-top) + 48px) 24px 32px; background: var(--mood); color: #2a2026; border-radius: 0 0 28px 28px; text-align: center; }
.scan.mood-night .scan-hero { color: #f4eef5; }
.scan-hero .eyebrow { color: inherit; opacity: .75; }
.scan-note { margin: 10px 0 0; font-size: 15px; }
.scan-found { font-family: var(--serif); font-size: 26px; animation: pop .6s var(--ease) both .2s; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: none; } }
.scan-progress { text-align: center; }
.scan-actions { text-align: center; }

.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.qr-card { margin: 0; background: #fff; color: #221d23; border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); break-inside: avoid; page-break-inside: avoid; }
.qr-code svg { width: 100%; height: auto; display: block; }
.qr-card figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.qr-brand { font-family: var(--serif); letter-spacing: .16em; font-size: 13px; }
.qr-no { font-size: 14px; color: #7b7078; }

@media print {
    body { background: #fff; padding: 0 !important; }
    .no-print, .tabbar, .toasts { display: none !important; }
    .page { max-width: none; padding: 0; }
    .qr-grid { grid-template-columns: repeat(2, 1fr); gap: 12mm; }
    .qr-card { box-shadow: none; border: 1px solid #ddd; }
    .fade-in { animation: none !important; }
}

/* ---------- Hinweise (Toasts) ---------- */
.toasts { position: fixed; z-index: 50; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 10px); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
    max-width: 460px;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    animation: toast 4s var(--ease) forwards;
}
.toast-error { background: var(--danger); color: #fff; }
@keyframes toast {
    0% { opacity: 0; transform: translateY(-12px); }
    8%, 85% { opacity: 1; transform: none; }
    100% { opacity: 0; transform: translateY(-12px); visibility: hidden; }
}

/* ---------- Tab-Leiste unten ---------- */
.tabbar {
    position: fixed;
    z-index: 40;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding: 0 8px env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(20px);
    backdrop-filter: saturate(1.6) blur(20px);
    border-top: 1px solid var(--line);
}
.tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 500;
    padding: 6px 0;
    -webkit-tap-highlight-color: transparent;
}
.tabbar a.is-active { color: var(--accent); }
.tabbar a.is-active svg { stroke-width: 2.1; }
.tab-new-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 6px 16px var(--accent-soft);
}
.tab-new-circle svg { stroke-width: 2.2; }

/* ---------- Animationen ---------- */
.fade-in { animation: fadeUp .55s var(--ease) both; }
.delay-1 { animation-delay: .06s; }
.delay-2 { animation-delay: .12s; }
.delay-3 { animation-delay: .18s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Größere Bildschirme ---------- */
@media (min-width: 600px) {
    .field-row { grid-template-columns: 1fr 1fr; }
    .rail { grid-auto-columns: 46%; }
    .stack { grid-template-columns: 1fr 1fr; }
    .xp-hero { margin-left: 0; margin-right: 0; border-radius: 28px; margin-top: 0; padding-top: 72px; }
    .xp-hero .back, .xp-hero .hero-action { top: 14px; }
    .stats { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1000px) {
    .page { max-width: 820px; padding-top: 40px; }
    .tabbar { top: 0; bottom: auto; height: 64px; padding: 0 calc(50% - 410px); border-top: 0; border-bottom: 1px solid var(--line); }
    .tabbar a { flex-direction: row; justify-content: center; gap: 8px; font-size: 14px; }
    body.has-nav { padding-bottom: 40px; padding-top: 64px; }
    .toasts { top: 76px; }
}
