/* ==========================================================
   ASV 2027 – Mobilbereich (hell)
   Gleiche Farbwelt wie die Desktop-Seite: Blau als Grundfarbe,
   je Modul eine eigene Bereichsfarbe (.tone-*).
   ========================================================== */
:root {
    color-scheme: light;
    --accent: #2f7bff; --accent-2: #46b4ff; --accent-ink: #1b5fd6;
    --accent-50: #e8f0ff; --accent-100: #d3e2ff; --accent-25: #f2f7ff;
    --accent-rgb: 47, 123, 255; --accent-2-rgb: 70, 180, 255; --on-accent: #fff;
    --navy: #14275c; --deep-rgb: 10, 22, 52;
    --bg: #e9eef6; --surface: #fff; --border: #d8e0ec; --border-soft: #e6ebf3;
    --text: #0c1428; --text-muted: #4f5a6f; --text-soft: #8a96ab;
    --radius: 12px; --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .05);
    --shadow-md: 0 10px 30px rgba(var(--deep-rgb), .12);
    --bar-h: 60px;
    --stripe: linear-gradient(90deg, #1b5fd6 0%, #2f7bff 50%, #46b4ff 100%);
    --ease: cubic-bezier(.2, .7, .2, 1);
}
/* Bereichsfarben: derzeit alle im ASV-Blau (einheitlich, ruhig).
   Die Klassen bleiben, damit einzelne Bereiche später wieder eine eigene Farbe bekommen können. */
.tone-blau,
.tone-orange,
.tone-violett,
.tone-gruen,
.tone-pink,
.tone-rot,
.tone-gelb,
.tone-teal,
.tone-indigo,
.tone-slate { --accent: #2f7bff; --accent-2: #46b4ff; --accent-ink: #1b5fd6; --accent-50: #e8f0ff; --accent-100: #d3e2ff; --accent-25: #f2f7ff; --accent-rgb: 47, 123, 255; --accent-2-rgb: 70, 180, 255; --on-accent: #fff; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
.m-body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 15px; line-height: 1.5; color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(700px 420px at 0% 0%, rgba(47, 123, 255, .16), transparent 60%),
        radial-gradient(600px 420px at 100% 8%, rgba(70, 180, 255, .12), transparent 60%);
    background-attachment: fixed;
    padding-top: calc(var(--bar-h) + env(safe-area-inset-top));
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent-100); outline-offset: 2px; border-radius: 6px; }

/* ---------- Kopfzeile ---------- */
.m-bar {
    position: fixed; z-index: 50; top: 0; left: 0; right: 0;
    height: calc(var(--bar-h) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 12px 0;
    display: flex; align-items: center; gap: 6px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(var(--deep-rgb), .05);
}
.m-bar::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--stripe); }
.m-brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.m-brand img { height: 36px; width: auto; flex-shrink: 0; }
.m-brand span { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.m-brand strong { font-size: 15px; font-weight: 800; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-brand small { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-brand--small img { height: 30px; }
.m-brand--small small { color: var(--accent-ink); font-weight: 600; }
.m-back, .m-bar__btn {
    width: 40px; height: 40px; flex-shrink: 0;
    display: grid; place-items: center; border-radius: 50%;
    font-size: 17px; color: var(--navy); transition: background .15s;
}
.m-back { background: var(--accent-50); color: var(--accent-ink); }
.m-back:active, .m-bar__btn:active { background: var(--accent-100); }

/* ---------- Inhalt ---------- */
.m-main { max-width: 640px; margin: 0 auto; padding: 18px 16px 28px; }
.m-section { margin-top: 26px; }
.m-section > h2, .m-h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 18px; font-weight: 800; color: var(--navy); }
.m-section > h2 i, .m-h2 i { color: var(--accent); font-size: 16px; }
.m-text { margin: 0 0 12px; color: var(--text-muted); }
.m-muted { color: var(--text-muted); font-size: 13px; }

/* Kopf einer Unterseite */
.m-head {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 18px; padding: 16px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(260px 140px at 100% 0%, rgba(var(--accent-2-rgb), .28), transparent 65%),
        linear-gradient(135deg, #fff 0%, var(--accent-50) 60%, var(--accent-100) 100%);
    border: 1px solid var(--accent-100); border-left: 5px solid var(--accent);
    box-shadow: 0 6px 18px rgba(var(--accent-rgb), .10);
}
.m-head__icon {
    width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center;
    border-radius: 14px; font-size: 20px; color: var(--on-accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 6px 16px rgba(var(--accent-rgb), .30);
}
.m-head h1 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; color: var(--navy); }
.m-head p { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }

/* Karten */
.m-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
    padding: 16px;
}
.m-card + .m-card { margin-top: 12px; }
.m-card h3 { margin: 0 0 4px; font-size: 16px; color: var(--navy); line-height: 1.3; }
.m-card p { margin: 0 0 10px; font-size: 14px; color: var(--text-muted); }
.m-card p:last-child { margin-bottom: 0; }
.m-card--flush { padding: 0; overflow: hidden; }
.m-card--tint { background: linear-gradient(135deg, var(--accent-50), var(--accent-25)); border-color: var(--accent-100); }
.m-card--accent {
    color: #fff; border: 0;
    background: radial-gradient(260px 160px at 100% 0%, rgba(255,255,255,.2), transparent 60%), linear-gradient(150deg, var(--accent) 0%, var(--accent-ink) 60%, var(--navy) 100%);
}
.m-card--accent h3, .m-card--accent p { color: #fff; }
.m-card--accent p { opacity: .9; }

/* Info-Zeilen (Icon + Beschriftung + Wert) */
.m-facts { display: grid; gap: 8px; }
.m-fact { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--accent-25); border: 1px solid var(--accent-100); }
.m-fact > i { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; color: var(--accent); background: #fff; font-size: 15px; }
.m-fact__l { display: block; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-soft); }
.m-fact__v { display: block; font-weight: 700; color: var(--navy); line-height: 1.3; }
.m-fact__s { display: block; font-size: 13px; color: var(--text-muted); }

/* Buttons */
.m-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 16px; border-radius: 999px;
    font-weight: 700; font-size: 15px; text-align: center;
    color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 6px 16px rgba(var(--accent-rgb), .28);
    transition: transform .12s;
}
.m-btn:active { transform: scale(.98); }
.m-btn--ghost { color: var(--navy); background: var(--surface); border: 1px solid var(--border); box-shadow: none; }
.m-btn--light { color: var(--navy); background: #fff; box-shadow: none; }
.m-btn--sm { min-height: 38px; font-size: 13px; padding: 0 14px; display: inline-flex; }
.m-actions { display: grid; gap: 8px; margin-top: 14px; }
.m-actions--2 { grid-template-columns: 1fr 1fr; }

/* Chips / Badges */
.m-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.m-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent-50); border: 1px solid var(--accent-100); }
.m-chip--plain { color: var(--text-muted); background: #f3f6fa; border-color: var(--border-soft); }
.m-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent-50); border: 1px solid var(--accent-100); }

/* Liste mit Pfeil */
.m-list { list-style: none; margin: 0; padding: 0; }
.m-list > li + li { border-top: 1px solid var(--border-soft); }
.m-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
a.m-row:active { background: var(--accent-25); }
.m-row__body { flex: 1; min-width: 0; }
.m-row__body strong { display: block; color: var(--navy); line-height: 1.3; }
.m-row__body span { display: block; font-size: 13px; color: var(--text-muted); }
.m-row__chev { color: var(--text-soft); font-size: 12px; }
.m-row__icon { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; color: var(--accent); background: var(--accent-50); }

/* Datums-Kachel */
.m-date { width: 50px; flex-shrink: 0; text-align: center; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--accent-100); box-shadow: var(--shadow-sm); }
.m-date__m { display: block; padding: 2px 0; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--on-accent); background: var(--accent); }
.m-date__d { display: block; font-size: 20px; font-weight: 800; line-height: 1.25; color: var(--navy); }
.m-date__w { display: block; padding-bottom: 3px; font-size: 11px; color: var(--text-muted); }

/* ---------- Startseite ---------- */
.m-welcome { text-align: center; padding: 6px 4px 2px; }
.m-welcome__kicker { display: inline-block; margin-bottom: 8px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--accent-ink); background: rgba(255,255,255,.8); border: 1px solid var(--accent-100); }
.m-welcome h1 { margin: 0 0 8px; font-size: 22px; line-height: 1.25; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.m-welcome p { margin: 0 0 8px; color: var(--text-muted); font-size: 14px; }

.m-hero { position: relative; margin: 14px 0 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow-md); }
.m-hero img { width: 100%; height: 100%; object-fit: cover; }

.m-mbt {
    margin-top: 18px; padding: 16px; border-radius: var(--radius-lg);
    background:
        radial-gradient(300px 200px at 100% 0%, rgba(var(--accent-2-rgb), .25), transparent 60%),
        linear-gradient(140deg, #fff 0%, var(--accent-50) 100%);
    border: 1px solid var(--accent-100); box-shadow: 0 8px 22px rgba(var(--accent-rgb), .12);
}
.m-mbt__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.m-mbt__head h2 { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 800; color: var(--navy); }
.m-mbt__head h2 i { color: var(--accent); margin-right: 4px; }
.m-mbt__motto { margin: 2px 0 0; font-size: 13px; font-style: italic; color: var(--accent-ink); }
.m-poster { display: block; max-width: 300px; margin: 0 auto 14px; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 10px 24px rgba(var(--deep-rgb), .22); }
.m-poster img { width: 100%; height: auto; }
.m-mbt .m-fact { background: rgba(255,255,255,.8); border-color: var(--accent-100); }
.m-mbt .m-fact > i { color: var(--accent); }
.m-ticks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; font-size: 14px; color: var(--text); }
.m-ticks li { display: flex; gap: 10px; }
.m-ticks i { width: 18px; margin-top: 3px; text-align: center; color: var(--accent); }
.m-mbt .m-ticks i { color: var(--accent); }

.m-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.m-tile {
    position: relative; overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
    padding: 8px; text-align: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .12s var(--ease), box-shadow .15s;
}
.m-tile::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.m-tile:active { transform: scale(.97); }
.m-tile i {
    width: 46px; height: 46px; display: grid; place-items: center;
    border-radius: 14px; font-size: 20px; color: var(--on-accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 6px 14px rgba(var(--accent-rgb), .30);
}
.m-tile span { font-size: 13px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.m-tile em { position: absolute; top: 7px; right: 7px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-style: normal; font-size: 11px; font-weight: 800; line-height: 20px; color: var(--on-accent); background: var(--accent); }

.m-next { display: flex; align-items: center; gap: 12px; }

/* ---------- Bilder / Galerie ---------- */
.m-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.m-album { display: block; }
.m-album__img { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--border-soft); box-shadow: var(--shadow-sm); }
.m-album__img img { width: 100%; height: 100%; object-fit: cover; }
.m-album__img b { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; color: #fff; background: rgba(var(--deep-rgb), .6); }
.m-album strong { display: block; margin-top: 6px; font-size: 13px; line-height: 1.3; color: var(--navy); }
.m-album small { font-size: 12px; color: var(--text-muted); }
.m-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: var(--radius); overflow: hidden; }
.m-photos a { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--border-soft); }
.m-photos img { width: 100%; height: 100%; object-fit: cover; }
.m-photos .is-video::after { content: '\f04b'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; color: #fff; background: rgba(0,0,0,.3); }
.m-tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.m-tabs a { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text-muted); background: #fff; border: 1px solid var(--border); }
.m-tabs a.is-active { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.m-member { margin: 20px 0 10px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }

/* ---------- Projekte / RC ---------- */
.m-cover { display: block; aspect-ratio: 16 / 9; background: var(--border-soft); }
.m-cover img { width: 100%; height: 100%; object-fit: cover; }
.m-card__body { padding: 14px 16px 16px; }
.m-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.m-progress__bar { flex: 1; height: 7px; border-radius: 999px; background: var(--border-soft); overflow: hidden; }
.m-progress__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.m-progress b { font-size: 12px; color: var(--text-muted); }
.m-todos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.m-todos li { display: flex; gap: 10px; font-size: 14px; }
.m-todos i { margin-top: 3px; color: var(--text-soft); }
.m-todos .is-done { color: var(--text-muted); text-decoration: line-through; }
.m-todos .is-done i { color: #16a34a; }
.m-entry { position: relative; padding-left: 20px; }
.m-entry::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: -14px; width: 2px; background: var(--accent-100); }
.m-entry:last-child::before { display: none; }
.m-entry::after { content: ''; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.m-entry + .m-entry { margin-top: 14px; }
.m-entry__date { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.m-entry h3 { margin: 2px 0 6px; font-size: 15px; color: var(--navy); }
.m-entry .m-photos { margin-top: 8px; }
.m-tag { display: inline-flex; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--text-muted); background: #eef2f6; }
.m-tag--ok { color: #0f7a4a; background: #e6f7ee; }
.m-tag--warn { color: #8a5a0b; background: #fdf3e2; }

/* ---------- Veranstaltungen ---------- */
.m-year { margin-top: 10px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.m-year summary { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; font-weight: 800; color: var(--navy); cursor: pointer; list-style: none; }
.m-year summary::-webkit-details-marker { display: none; }
.m-year summary::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 12px; color: var(--text-soft); transition: transform .2s; }
.m-year[open] summary::after { transform: rotate(180deg); }
.m-year summary small { margin-left: 8px; font-weight: 600; color: var(--text-muted); }
.m-year .m-list { border-top: 1px solid var(--border-soft); }

/* ---------- YouTube ---------- */
.m-yt { position: relative; aspect-ratio: 16 / 9; background: #0b1020; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.m-yt img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.m-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.m-yt__play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; color: #fff; text-align: center; background: linear-gradient(0deg, rgba(8,14,30,.75), rgba(8,14,30,.2)); }
.m-yt__play span:first-child { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; font-size: 20px; background: #e3001b; box-shadow: 0 8px 24px rgba(227,0,27,.45); }
.m-yt__play small { max-width: 300px; font-size: 11px; line-height: 1.4; opacity: .85; }

/* ---------- Formulare ---------- */
.m-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.m-field > span { font-size: 13px; font-weight: 700; color: var(--navy); }
.m-field input, .m-field select, .m-field textarea {
    width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--text);
    background: #f3f6fa; border: 1.5px solid var(--border-soft); border-radius: var(--radius);
}
.m-field textarea { min-height: 130px; resize: vertical; }
.m-field input:focus, .m-field select:focus, .m-field textarea:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-100); }
.m-field [aria-invalid="true"] { border-color: #e04848; background: #fff6f6; }
.m-err { font-size: 13px; font-weight: 600; color: #c43030; }
.m-check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; font-size: 13px; color: var(--text-muted); }
.m-check input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; accent-color: var(--accent); }
.m-check a { color: var(--accent-ink); text-decoration: underline; }
.m-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.m-alert { display: flex; gap: 10px; margin-bottom: 14px; padding: 12px 14px; border-radius: var(--radius); font-size: 14px; color: #8a2020; background: #fdeeee; border: 1px solid #f5c6c6; }
.m-alert--ok { color: #0f5c37; background: #e6f7ee; border-color: #bfe8d1; }
/* Aufnahmeantrag */
#au-form h3 { margin: 18px 0 10px; }
#au-form h3:first-of-type { margin-top: 0; }
.m-au-block { margin: 6px -4px 4px; padding: 2px 12px 4px; border-radius: var(--radius); background: var(--accent-50); }
.m-au-block[hidden] { display: none; }
.m-au-block .m-field input { background: #fff; }
.m-check + .m-err { display: block; margin: -8px 0 12px 30px; }
.m-steps { margin: 12px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; color: var(--text-muted); }
.m-steps strong { color: var(--navy); }
.m-steps li::marker { color: var(--accent); font-weight: 800; }
.m-steps form { margin-top: 10px; }

/* ---------- Personen ---------- */
.m-person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.m-person__img { width: 54px; height: 54px; flex-shrink: 0; border-radius: 50%; overflow: hidden; display: grid; place-items: center; color: var(--accent); background: var(--accent-50); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent-100); }
.m-person__img img { width: 100%; height: 100%; object-fit: cover; }
.m-person__img.is-ganz img { object-fit: contain; object-position: center bottom; }
.m-person small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.m-person strong { display: block; color: var(--navy); }
.m-person a { font-size: 13px; color: var(--accent-ink); overflow-wrap: anywhere; }

/* Fließtext (Markdown) */
.m-prose { font-size: 14px; color: var(--text-muted); line-height: 1.65; }
.m-prose h3, .m-prose h4 { margin: 18px 0 6px; font-size: 16px; color: var(--navy); line-height: 1.3; }
.m-prose > :first-child { margin-top: 0; }
.m-prose p { margin: 0 0 10px; }
.m-prose ul { margin: 0 0 10px; padding-left: 20px; }
.m-prose li::marker { color: var(--accent); }
.m-prose a { color: var(--accent-ink); text-decoration: underline; overflow-wrap: anywhere; }
.m-prose strong { color: var(--text); }

/* Leerer Zustand */
.m-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; text-align: center; color: var(--text-muted); font-size: 14px; }
.m-empty i { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; font-size: 22px; color: var(--accent); background: var(--accent-50); margin-bottom: 4px; }
.m-empty strong { color: var(--navy); }

/* ---------- Fußzeile ---------- */
.m-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--text-muted); background: rgba(255,255,255,.7); border-top: 3px solid; border-image: var(--stripe) 1; }
.m-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.m-foot a { font-weight: 600; color: var(--navy); }

.m-top {
    position: fixed; z-index: 45; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom));
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
    color: #fff; background: linear-gradient(135deg, #2f7bff, #46b4ff); box-shadow: 0 8px 20px rgba(47,123,255,.35);
    opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .25s, visibility .25s, transform .25s;
}
.m-top.is-visible { opacity: 1; visibility: visible; transform: none; }

@media (min-width: 560px) { .m-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .m-grid2 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Lightbox (gemeinsam) ---------- */
.lb {
    position: fixed; inset: 0; z-index: 1000;
    display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; grid-template-rows: 60px minmax(0, 1fr);
    background: rgba(8, 14, 30, .94);
    backdrop-filter: blur(4px);
    animation: lb-in .2s ease;
}
.lb[hidden], .lb__nav[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } }
.lb__bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 24px; color: rgba(255, 255, 255, .85); }
.lb__count { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lb__title { flex: 1; min-width: 0; font-size: 14px; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb__btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 17px; transition: background .15s; }
.lb__btn:hover { background: rgba(255, 255, 255, .12); }
.lb__nav {
    align-self: center; justify-self: center;
    width: 52px; height: 52px; display: grid; place-items: center;
    border-radius: 50%; color: #fff; font-size: 18px;
    background: rgba(255, 255, 255, .08);
    transition: background .15s;
}
.lb__nav:hover { background: rgba(255, 255, 255, .2); }
.lb__stage { grid-column: 2; grid-row: 2; margin: 0; padding: 0 0 24px; display: grid; place-items: center; min-height: 0; touch-action: pan-y; }
.lb__stage img, .lb__stage video {
    max-width: 100%; max-height: calc(100vh - 90px);
    border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    animation: lb-img .25s var(--ease);
}
@keyframes lb-img { from { opacity: 0; transform: scale(.98); } }
.lb__spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: lb-spin .8s linear infinite; }
@keyframes lb-spin { to { transform: rotate(360deg); } }
body.lb-open { overflow: hidden; }

@media (max-width: 760px) {
    .lb { grid-template-columns: 0 minmax(0, 1fr) 0; }
    .lb__nav { position: fixed; bottom: 20px; z-index: 2; }
    .lb__nav--prev { left: 20px; }
    .lb__nav--next { right: 20px; }
    .lb__stage { padding-bottom: 90px; }
    .lb__stage img, .lb__stage video { max-height: calc(100vh - 160px); border-radius: 0; }
}
.lb__caption { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 14px; color: rgba(255,255,255,.8); }
@media (prefers-reduced-motion: reduce) { .lb, .lb__stage img { animation: none; } }


/* Etiketten in Zeilen nicht strecken / nicht umbrechen */
.m-pill { white-space: nowrap; flex-shrink: 0; }
.m-row__body .m-pill, .m-row__body .m-chip { display: inline-flex; width: auto; }

/* Besucherzähler (Start) */
.m-visits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.m-visit { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 4px; text-align: center; }
.m-visit + .m-visit { border-left: 1px solid var(--border-soft); }
.m-visit strong { display: inline-flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.m-visit span { font-size: 12px; color: var(--text-muted); }
.m-visit--total { background: var(--accent-25); }
.m-visit--total strong { color: var(--accent-ink); }
.m-visit__dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: m-visit-puls 2s infinite; }
@keyframes m-visit-puls { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@media (prefers-reduced-motion: reduce) { .m-visit__dot { animation: none; } }
.m-visits__note { margin: 8px 2px 0; font-size: 12px; color: var(--text-soft); }

/* Projekte: Steckbrief + Baubericht (bb-*, Inhalt aus includes/bauberichte/) */
.m-tag i { margin-right: 4px; }
#baubericht, #bautagebuch { scroll-margin-top: 76px; }
.m-bb-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
.m-bb-facts > div { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text); line-height: 1.35; }
.m-bb-facts i { flex-shrink: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-50); color: var(--accent); font-size: 12px; }
.m-bb-facts b { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-soft); }
.bb { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 18px 16px; font-size: 14.5px; line-height: 1.55; color: var(--text); }
.bb p { margin: 0 0 12px; }
.bb b { color: var(--navy); }
.bb-head { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border-soft); }
.bb-kicker { display: inline-flex; gap: 6px; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.bb-head h2 { margin: 4px 0 8px; font-size: 20px; line-height: 1.2; font-weight: 800; color: var(--navy); }
.bb-lead { margin: 0 !important; color: var(--text-muted); }
.bb-callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--accent-50); border: 1px solid var(--accent-100); }
.bb-callout > i { flex-shrink: 0; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: #fff; }
.bb-callout p { margin: 0; font-size: 14px; }
.bb-sec { margin-top: 24px; }
.bb-sec h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 17px; font-weight: 800; color: var(--navy); }
.bb-sec h4 { margin: 16px 0 8px; font-size: 15px; color: var(--navy); }
.bb-num { flex-shrink: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--navy); color: #fff; font-size: 13px; }
.bb-features, .bb-parts, .bb-cols, .bb-lessons, .bb-power, .bb-next { display: grid; gap: 8px; }
.bb-feature, .bb-lesson { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 10px; }
.bb-feature__icon, .bb-lesson > i { flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-50); color: var(--accent); font-size: 13px; }
.bb-lesson > i { background: #fff4d6; color: #c98a00; }
.bb-feature strong, .bb-lesson strong { display: block; font-size: 14px; color: var(--navy); }
.bb-feature span, .bb-lesson span { display: block; font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.bb-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; border-radius: 12px; background: #f6f8fc; }
.bb-flow .bb-arrow { display: none; }
.bb-flow .bb-node { grid-column: auto !important; }
.bb-node { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; font-weight: 700; color: var(--navy); text-align: center; }
.bb-node i { font-size: 17px; color: var(--accent); }
.bb-node small { font-size: 11px; color: var(--text-soft); font-weight: 600; }
.bb-node--main { background: var(--navy); color: #fff; border-color: var(--navy); }
.bb-node--main i { color: #ff6b8b; }
.bb-list, .bb-part ul, .bb-panel ul { margin: 12px 0 0; padding-left: 18px; }
.bb-part ul, .bb-panel ul { margin-top: 0; }
.bb-list li, .bb-part li, .bb-panel li { margin: 4px 0; font-size: 13.5px; color: var(--text-muted); }
.bb-table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 10px; }
.bb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bb-table th { padding: 8px 10px; text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-soft); background: #f6f8fc; }
.bb-table td { padding: 7px 10px; border-top: 1px solid var(--border-soft); }
.bb-table tr.is-free td { color: var(--text-soft); }
.bb-ch { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px; border-radius: 6px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; }
.is-free .bb-ch { background: var(--border); color: var(--text-muted); }
.bb-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.bb-pill--servo { background: #e8f0ff; color: #1b5fd6; }
.bb-pill--esc { background: #fff1e0; color: #a35a00; }
.bb-part, .bb-panel { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border-soft); background: #fbfcfe; }
.bb-part h4, .bb-panel h4 { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; font-size: 14.5px; }
.bb-part h4 i, .bb-panel h4 i { color: var(--accent); }
.bb-panel--accent { background: var(--accent-50); border-color: var(--accent-100); }
.bb-power > div { display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-soft); }
.bb-power i { grid-row: span 2; color: var(--accent); font-size: 17px; margin-top: 2px; }
.bb-power strong { font-size: 13.5px; color: var(--navy); }
.bb-power span { font-size: 13px; color: var(--text-muted); }
.bb-note { display: flex; gap: 8px; margin: 10px 0 0 !important; padding: 10px 12px; border-radius: 10px; background: #fff8e6; color: #6b4a00; font-size: 13.5px; }
.bb-next { list-style: none; margin: 0; padding: 0; }
.bb-next li { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; border: 1px dashed var(--border); font-size: 13.5px; }
.bb-next i { color: var(--accent); }
.bb-foot { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--text-soft); }

.bb-sec h4 i { color: var(--accent); margin-right: 6px; }
.bb-products { display: grid; gap: 10px; }
.bb-product { border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; }
.bb-product__img { display: grid; place-items: center; aspect-ratio: 16 / 6; background: #f6f8fc; }
.bb-product__img img { width: 100%; height: 100%; object-fit: contain; }
.bb-product__img--foto { position: relative; background: #fff; border-bottom: 1px solid var(--border-soft); }
.bb-product__img--foto small { position: absolute; right: 6px; bottom: 5px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .9); font-size: 10px; color: var(--text-soft); }
.bb-product__img--foto img { padding: 6px 6px 18px; }
.bb-product__img--icon { background: var(--accent-50); }
.bb-product__img--icon i { font-size: 28px; color: var(--accent); }
.bb-product__body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; }
.bb-product__role { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.bb-product strong { font-size: 14.5px; color: var(--navy); }
.bb-product p { margin: 0 !important; font-size: 13px; color: var(--text-muted); }
.bb-product ul { margin: 2px 0 0; padding-left: 16px; }
.bb-product li { font-size: 12.5px; margin: 2px 0; }
.bb-product a { padding-top: 4px; font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.bb-small { margin: 8px 0 0 !important; font-size: 11.5px; color: var(--text-soft); }
.m-album__icon { position: absolute; inset: 0; margin: auto; width: 1em; height: 1em; font-size: 34px; color: var(--accent); }

.bb-figs { display: grid; gap: 10px; margin-bottom: 14px; }
.bb-fig { margin: 0; }
.bb-fig a { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--accent-50); }
.bb-fig img { width: 100%; height: 100%; object-fit: cover; }
.bb-fig figcaption { margin-top: 4px; font-size: 12px; color: var(--text-soft); }
