/* ==========================================================================
   EVENT-APP (/e/:slug)

   Gestaltung nach der Look-&-Feel-Spezifikation vom 25.08.2026.

   Vier Regeln, aus denen fast alles folgt:

   1. GENAU EINE Akzentfarbe, alles andere Graustufe. Kein zweiter Markenton,
      keine Verlaeufe. Farbe kommt aus dem Inhalt - Hero, Portraits, Logos -
      nicht aus geschmuecktem Beiwerk.
   2. KEINE Karten und keine Schatten in Listen. Volle Breite, Haarlinie.
      Karten sind der haeufigste Grund, warum selbstgebaute Event-Apps wie ein
      Verwaltungsprogramm aussehen statt wie eine App.
   3. Feste Zeilen-Rhythmik: JEDE Liste benutzt dieselbe Zeile. 64px Hoehe,
      16px Rand, 48px Kachel, Titel, Untertitel, Aktion rechts.
   4. Systemschriften. Fuehlt sich nativ an, laedt sofort, kostet nichts.

   Hier steht KEIN Hex-Wert. Alle Farben kommen als --ev-*-Token aus
   utils/eventapp-theme.js und stehen serverseitig im ersten HTML - deshalb
   gibt es kein Umfaerben nach dem ersten Bild.

   Mobile first: jede Regel gilt zuerst fuer 390px. Gemessen wurde bei
   390, 834 und 1440px.
   ========================================================================== */

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

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

body.ev-body {
    font-family: var(--ev-font);
    background: var(--ev-bg);
    color: var(--ev-text);
    font-size: 16px;
    line-height: 1.5;
    /* Ohne diese Zeile schiebt ein zu breites Element die ganze Seite
       seitlich - der Fehler, der Ende Juli dreimal auftrat. */
    overflow-x: hidden;
    overscroll-behavior-y: none;
}

/* Das hidden-Attribut muss JEDE display-Angabe schlagen.
 *
 * Ohne diese Regel ist `element.hidden = true` wirkungslos, sobald die Klasse
 * ein eigenes display setzt - und das tun hier fast alle. In "Mein Plan"
 * stand deshalb "Noch nichts gemerkt" direkt unter dem gemerkten Punkt, und
 * der Kalender-Knopf zeigte sich auch bei leerem Plan (Benos Screenshot vom
 * 26.08.2026). Betroffen waren .ev-empty, .ev-plan-export, .ev-day und
 * .ev-row - vier Stellen, an denen derselbe Fehler einzeln haette
 * repariert werden muessen. Eine Regel ist die ehrlichere Loesung. */
[hidden] { display: none !important; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.ev-icon { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Sichtbar nur fuer Screenreader */
.ev-sr {
    position: absolute; width: 1px; height: 1px;
    padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Kopfleiste
   -------------------------------------------------------------------------- */

/* Die Statusleiste des Geraets gehoert der Kopfleiste dazu.
 *
 * Als App auf dem Home-Bildschirm liegt die Seite unter Uhrzeit, Dynamic
 * Island und Batterie (status-bar-style black-translucent plus
 * viewport-fit=cover). Ohne diesen Abstand sassen Glocke, Teilen und Menue
 * hinter der Statusleiste - auf einem iPhone 14/15 sind das rund 59px, also
 * die gesamte Leistenhoehe. Beno hat die Glocke deshalb auf dem Geraet nicht
 * gefunden (26.08.2026), obwohl sie da war.
 *
 * Alles, was unter der Leiste klebt, rechnet ueber --ev-safe-top mit -
 * sonst haengen Tagesleiste, Filter und Tagesueberschrift um denselben
 * Betrag zu hoch. */
:root { --ev-safe-top: env(safe-area-inset-top, 0px); }

.ev-navbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 4px;
    height: calc(56px + var(--ev-safe-top));
    padding: var(--ev-safe-top) 4px 0;
    background: var(--ev-navbar-bg);
    color: var(--ev-navbar-text);
}

/* Auf dem Startbildschirm liegt die Leiste ueber dem Hero. Kein eigener
   Aufbau dafuer - nur andere Flaeche, gleiche Geometrie. */
.ev-body[data-screen="home"] .ev-navbar {
    position: fixed;
    left: 0; right: 0;
    /* Nicht ganz transparent: die weisse Uhrzeit des Geraets steht sonst
       direkt im Titelbild und ist ueber einem hellen Foto unlesbar. Der
       Verlauf faellt auf einem dunklen Bild nicht auf. */
    background: linear-gradient(to bottom, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0));
    color: var(--ev-on-media);
}
.ev-body[data-screen="home"] .ev-navbar-title { opacity: 0; }

.ev-navbar-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
}

.ev-iconbtn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: inherit;
}
.ev-iconbtn:active { background: var(--ev-sidemenu-active); }
.ev-iconbtn[hidden] { display: none; }

/* Glocke: der Punkt zeigt an, dass Benachrichtigungen laufen. Ohne ihn
   unterscheidet sich "an" von "aus" nur durch eine Fuellung, die auf einem
   farbigen Kopfbalken kaum zu sehen ist. */
.ev-bell { position: relative; }
.ev-bell.is-on .ev-icon { fill: currentColor; }
.ev-bell-dot {
    position: absolute;
    top: 8px; right: 8px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--ev-success);
    border: 2px solid var(--ev-navbar-bg);
    opacity: 0;
}
.ev-bell.is-on .ev-bell-dot { opacity: 1; }
/* Auf dem Startbildschirm liegt die Leiste ueber dem Foto - dort braucht der
   Punkt einen eigenen Rand, sonst verschwindet er im Bild. */
.ev-body[data-screen="home"] .ev-bell-dot { border-color: rgba(0, 0, 0, .45); }

/* Weisse Symbole auf einem beliebigen Titelbild.
 *
 * --ev-on-media ist immer Weiss; ueber einem hellen Foto waren Glocke, Teilen
 * und Menue damit praktisch unsichtbar - Beno hat die Glocke am 26.08.
 * schlicht nicht gefunden. Eine halbtransparente Scheibe darunter macht den
 * Kontrast unabhaengig davon, was auf dem Bild ist. */
.ev-body[data-screen="home"] .ev-iconbtn {
    background: rgba(0, 0, 0, .38);
    backdrop-filter: blur(2px);
}
.ev-body[data-screen="home"] .ev-iconbtn:active { background: rgba(0, 0, 0, .55); }

/* --------------------------------------------------------------------------
   Bildschirme
   -------------------------------------------------------------------------- */

.ev-screen { display: none; }
.ev-screen.is-active { display: block; }
.ev-main { padding-bottom: 48px; }

/* --------------------------------------------------------------------------
   Start
   -------------------------------------------------------------------------- */

/* Das Titelbild bleibt stehen, die Menuekarte gleitet darueber.
 *
 * Vorher scrollten beide zusammen weg. Jetzt liegt das Bild fest hinter der
 * Karte: beim Scrollen schiebt sich die Karte darueber, beim Zurueckscrollen
 * gibt sie es wieder frei. Das Bild selbst bewegt sich nie - deshalb wirkt
 * es wie ein Hintergrund und nicht wie ein weggerolltes Foto.
 *
 * Nur auf dem Startbildschirm: auf den anderen gibt es kein Hero. */
.ev-hero { position: relative; }

.ev-body[data-screen="home"] .ev-hero {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 0;
}

/* Wie viel vom Bild in der ERSTEN Ansicht zu sehen ist. Den Wert setzt
   js/eventapp.js auf die tatsaechliche Bildhoehe, hoechstens 46vh - sonst
   klaffte unter einem breiten (also niedrigen) Bild eine Luecke bis zur
   Karte. */
.ev-body[data-screen="home"] .ev-homecard {
    position: relative;
    z-index: 1;
    margin-top: var(--ev-hero-band, 46vh);
}
.ev-hero-image {
    width: 100%;
    /* Natuerliche Hoehe statt erzwungener 16:9-Ausschnitt.
     *
     * Vorher stand hier aspect-ratio: 16/9 mit object-fit: cover - ein
     * hochformatiges Titelbild wurde dadurch mittig beschnitten, oben UND
     * unten fehlte etwas. Genau das ist Beno am 26.08. aufgefallen.
     *
     * Jetzt behaelt das Bild sein Seitenverhaeltnis; der Deckel bei 80vh
     * sorgt nur dafuer, dass unter einem sehr hohen Bild immer noch ein
     * Stueck der Menuekarte zu sehen ist - sonst wuesste niemand, dass da
     * ueberhaupt etwas kommt. Was der Deckel abschneidet, holt man durch
     * Scrollen zurueck. */
    height: auto;
    max-height: 80vh;
    object-fit: cover;
    /* Oben buendig: Wenn ueberhaupt beschnitten wird, dann unten. Der obere
       Bildrand ist bei Veranstaltungsplakaten der Teil mit dem Namen. */
    object-position: top;
}
/* Der Ersatz ohne Bild braucht eine Hoehe - er hat keine eigene. */
.ev-hero-image--fallback { aspect-ratio: 16 / 9; }
.ev-hero-image--fallback { background: var(--ev-accent); }
/* Abdunklung nur oben: die weissen Symbole der Leiste muessen auch auf einem
   hellen Foto lesbar bleiben. */
.ev-hero-shade {
    position: absolute; inset: 0 0 auto 0; height: 96px;
    background: linear-gradient(rgba(0, 0, 0, .38), rgba(0, 0, 0, 0));
    pointer-events: none;
}

.ev-homecard {
    position: relative;
    /* Die Karte ueberlappt das Bild um 16px - der abgerundete Rand liegt
       dadurch AUF dem Foto und nicht daneben. */
    margin-top: -16px;
    padding: 20px 16px 8px;
    background: var(--ev-bg);
    border-radius: 16px 16px 0 0;
}
.ev-homelogo { width: 64px; height: 64px; object-fit: contain; margin-bottom: 10px; }
.ev-hometitle { font-size: 22px; line-height: 28px; font-weight: 600; overflow-wrap: anywhere; }
.ev-homedates { margin-top: 2px; color: var(--ev-accent-text); font-size: 14px; font-weight: 500; }
.ev-homeintro { margin-top: 10px; color: var(--ev-text-muted); font-size: 15px; max-width: 62ch; }

.ev-menu { list-style: none; margin-top: 14px; }
.ev-menu-row + .ev-menu-row { border-top: 1px solid var(--ev-divider); }
.ev-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 10px 0;
}
.ev-menu-link:active { background: var(--ev-pressed); }
.ev-menu-icon {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--ev-accent);
    color: var(--ev-on-accent);
}
.ev-menu-body { min-width: 0; }
.ev-menu-title { display: block; font-size: 16px; font-weight: 600; }
.ev-menu-sub { display: block; font-size: 14px; color: var(--ev-accent-text); }

/* --------------------------------------------------------------------------
   Tagesleiste und Filter
   -------------------------------------------------------------------------- */

.ev-daybar {
    position: sticky;
    top: calc(56px + var(--ev-safe-top));
    z-index: 20;
    display: flex;
    gap: 0;
    background: var(--ev-navbar-bg);
    color: var(--ev-navbar-text);
    /* Bei mehr als drei Tagen wird quer gescrollt - IN der Leiste, nicht
       auf der Seite. */
    overflow-x: auto;
    scrollbar-width: none;
}
.ev-daybar::-webkit-scrollbar { display: none; }

.ev-daytab {
    flex: 1 0 auto;
    min-width: 88px;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    opacity: .72;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.ev-daytab.is-active { opacity: 1; border-bottom-color: currentColor; }

.ev-filterbar {
    position: sticky;
    top: calc(56px + var(--ev-safe-top));
    z-index: 19;
    background: var(--ev-surface-alt);
    border-bottom: 1px solid var(--ev-divider);
}
.ev-body[data-has-days="true"] .ev-filterbar { top: calc(100px + var(--ev-safe-top)); }

.ev-filterbar-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--ev-text-muted);
    text-align: left;
}
.ev-filterbar-btn.is-filtered { color: var(--ev-accent-text); font-weight: 500; }

/* Blatt von unten: dort ist der Daumen. Ein Menue am oberen Rand erreicht
   man auf einem 390px-Geraet nur durch Umgreifen. */
.ev-sheet { position: fixed; inset: 0; z-index: 60; }
.ev-sheet[hidden] { display: none; }
.ev-sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.ev-sheet-panel {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    max-height: 82vh;
    overflow-y: auto;
    padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
    background: var(--ev-bg);
    border-radius: 16px 16px 0 0;
}
.ev-sheet-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.ev-sheet-head h2 { font-size: 18px; font-weight: 600; }
.ev-sheet-group { border: 0; margin-top: 12px; }
.ev-sheet-group legend {
    font-size: 13px; line-height: 18px; font-weight: 700;
    color: var(--ev-text-muted); margin-bottom: 8px;
}
.ev-sheet-reset {
    width: 100%; min-height: 48px; margin-top: 18px;
    color: var(--ev-accent-text); font-weight: 500;
}

.ev-chip {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin: 0 6px 6px 0;
    padding: 8px 14px;
    border: 1px solid var(--ev-divider);
    border-radius: 999px;
    font-size: 13px;
    line-height: 16px;
    font-weight: 500;
    background: var(--ev-bg);
}
.ev-chip.is-active {
    background: var(--ev-accent);
    border-color: var(--ev-accent);
    color: var(--ev-on-accent);
}
.ev-chip.is-static { background: var(--ev-bg-shade); border-color: var(--ev-bg-shade); }

/* --------------------------------------------------------------------------
   DIE Listenzeile - eine Definition fuer Programm, Mitwirkende, Orte
   -------------------------------------------------------------------------- */

.ev-list { list-style: none; }

.ev-row {
    display: flex;
    align-items: stretch;
    background: var(--ev-bg);
    /* Haarlinie eingerueckt bis unter den Text, nicht bis zum Rand - so
       liest sich die Liste als Folge von Eintraegen und nicht als Tabelle. */
    box-shadow: inset 0 -1px 0 var(--ev-divider);
    /* Kostet nichts und wirkt fast wie echtes Windowing: der Browser laesst
       Zeilen ausserhalb des Sichtfelds ungerechnet. Wichtig bei 300+
       Programmpunkten. */
    content-visibility: auto;
    contain-intrinsic-size: auto 64px;
}
.ev-row:last-child { box-shadow: none; }
.ev-row.is-hidden { display: none; }

.ev-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 64px;
    padding: 8px 8px 8px 16px;
}
.ev-row-main:active { background: var(--ev-pressed); }

/* Endzeit als schmale Spalte links. Die Startzeit steht in der
   Gruppenueberschrift - sie zweimal zu zeigen kostet Breite ohne Gewinn. */
.ev-row-time {
    flex: 0 0 auto;
    width: 40px;
    font-size: 13px;
    line-height: 18px;
    font-variant-numeric: tabular-nums;
    color: var(--ev-text-subtle);
}

.ev-row-thumb {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    /* Nie leerer Platz statt Bild: fehlt eins, steht hier die Akzentflaeche
       mit dem Symbol des Typs. Das ist der Grund, warum die Liste auch mit
       halb gepflegten Inhalten aufgeraeumt wirkt. */
    background: var(--ev-thumb-bg);
    color: var(--ev-thumb-icon);
}
.ev-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ev-row-thumb--person { border-radius: 50%; }

.ev-row-body { min-width: 0; flex: 1 1 auto; }
.ev-row-title {
    display: block;
    font-size: 16px;
    line-height: 20px;
    overflow-wrap: anywhere;
}
.ev-row-sub {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    line-height: 20px;
    color: var(--ev-text-muted);
    /* Zwei Zeilen genuegen; danach wird die Zeilen-Rhythmik unruhig. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ev-row.is-muted .ev-row-title { text-decoration: line-through; color: var(--ev-text-subtle); }

.ev-row-action {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    color: var(--ev-text-subtle);
}
.ev-row-action[aria-pressed="true"] { color: var(--ev-accent-text); }
.ev-row-action[aria-pressed="true"] .ev-icon { fill: currentColor; }

.ev-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 18px;
    font-weight: 500;
    vertical-align: 1px;
    background: var(--ev-bg-shade);
    color: var(--ev-text-muted);
}
/* Bedeutungsfarben sind nicht themebar - abgesagt muss rot sein, auch wenn
   die Marke rot ist. */
.ev-badge--cancelled { background: var(--ev-danger); color: var(--ev-on-danger); }
.ev-badge--changed { background: var(--ev-live); color: var(--ev-on-live); }

/* Zeitgruppe */
/* Der Klebe-Abstand richtet sich danach, was ueber der Liste steht.
 *
 * Im Programm sind das Kopfleiste (56) und Filterleiste (44) - zusammen 100,
 * mit Tagesreitern 144. In "Mein Plan" gibt es beides nicht: dort klebte die
 * Tagesueberschrift 44 bis 88px zu tief und schnitt den ersten Eintrag oben
 * ab (Benos Screenshot vom 26.08.2026). */
.ev-group {
    position: sticky;
    top: calc(100px + var(--ev-safe-top));
    z-index: 10;
    padding: 6px 16px;
    background: var(--ev-bg-shade);
    font-size: 13px;
    line-height: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.ev-body[data-has-days="true"] .ev-group { top: calc(144px + var(--ev-safe-top)); }
/* In "Mein Plan" steht nur die Kopfleiste darueber. */
.ev-screen[data-screen="plan"] .ev-group,
.ev-body[data-has-days="true"] .ev-screen[data-screen="plan"] .ev-group { top: calc(56px + var(--ev-safe-top)); }

/* --------------------------------------------------------------------------
   Detailseite
   -------------------------------------------------------------------------- */

.ev-detail[hidden] { display: none; }

.ev-detail-band { height: 140px; background: var(--ev-accent); }

.ev-detail-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
}
/* Die Kachel ueberlappt das Farbband - der eine visuelle Griff der App.
   Kostet nichts und macht aus einer Textseite einen Eintrag. */
.ev-detail-tile {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    margin-top: -60px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--ev-bg);
    color: var(--ev-accent);
    box-shadow: 0 0 0 1px var(--ev-divider);
}
.ev-detail-tile img { width: 100%; height: 100%; object-fit: cover; }
.ev-detail-tile--person { border-radius: 50%; }

.ev-detail-actions { display: flex; gap: 8px; padding-bottom: 8px; }
.ev-actionbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--ev-divider);
    border-radius: 8px;
    background: var(--ev-bg);
    color: var(--ev-text);
}
.ev-actionbtn[aria-pressed="true"] {
    border-color: var(--ev-accent);
    color: var(--ev-accent-text);
}
.ev-actionbtn[aria-pressed="true"] .ev-icon { fill: currentColor; }

.ev-detail-body { padding: 14px 16px 40px; }
.ev-detail-body h1 { font-size: 22px; line-height: 28px; font-weight: 600; overflow-wrap: anywhere; }
.ev-detail-meta { margin-top: 4px; color: var(--ev-text-muted); font-size: 14px; }
.ev-detail-body p { margin-top: 12px; font-size: 16px; line-height: 24px; max-width: 68ch; }
.ev-subhead { margin-top: 24px; font-size: 16px; font-weight: 600; }
.ev-detail-body .ev-list { margin-top: 6px; }
.ev-list--inline .ev-row-main { padding-left: 0; }

.ev-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    margin-top: 12px;
    padding: 8px 14px;
    border: 1px solid var(--ev-divider);
    border-radius: 999px;
    font-size: 14px;
}
.ev-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-chips .ev-pill { margin-top: 0; }

.ev-notice {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ev-on-danger);
}
.ev-notice--danger { background: var(--ev-danger); }
.ev-notice--warn { background: var(--ev-live); }

/* --------------------------------------------------------------------------
   Mein Plan, Push, Leerzustaende
   -------------------------------------------------------------------------- */

.ev-plan-head { padding: 16px 16px 8px; }
.ev-plan-export {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 8px;
    background: var(--ev-accent);
    color: var(--ev-on-accent);
    font-weight: 600;
}
.ev-conflict {
    padding: 4px 16px 10px 76px;
    background: var(--ev-bg);
    box-shadow: inset 0 -1px 0 var(--ev-divider);
    color: var(--ev-text-muted);
    font-size: 13px;
}

.ev-pushrow {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px 16px;
    background: var(--ev-surface-alt);
    box-shadow: inset 0 -1px 0 var(--ev-divider);
}
.ev-pushrow[hidden] { display: none; }
.ev-pushrow-body { flex: 1 1 auto; min-width: 0; }
.ev-pushrow-title { font-size: 15px; font-weight: 500; }
.ev-pushrow-sub { font-size: 13px; color: var(--ev-text-muted); }
.ev-pushbtn {
    flex: 0 0 auto;
    /* 44px, nicht 40 - das Mindestmass fuer ein Tippziel (Regel 31.07.2026).
       Beim Messen der Benachrichtigungs-Zentrale am 26.08. aufgefallen. */
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--ev-accent);
    border-radius: 999px;
    color: var(--ev-accent-text);
    font-size: 14px;
    font-weight: 500;
}
.ev-pushbtn.is-on { background: var(--ev-accent); color: var(--ev-on-accent); border-color: var(--ev-accent); }
.ev-pushbtn[disabled] { opacity: .5; }

/* Leerzustaende sind nie einfach weiss - das liest sich wie ein Fehler. */
.ev-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 56px 24px;
    color: var(--ev-text-subtle);
    text-align: center;
}
/* Ohne diese Zeile wirkt das hidden-Attribut NICHT: eine display-Angabe in
   der Klasse schlaegt es. In "Mein Plan" stand deshalb "Noch nichts gemerkt"
   auch dann, wenn etwas gemerkt war - direkt unter dem gemerkten Punkt
   (gefunden am 26.08.2026 auf Benos Handy). */
.ev-empty[hidden] { display: none; }
.ev-empty p { font-size: 15px; max-width: 34ch; }

/* --------------------------------------------------------------------------
   Schublade
   -------------------------------------------------------------------------- */

.ev-drawer { position: fixed; inset: 0; z-index: 70; }
.ev-drawer[hidden] { display: none; }
.ev-drawer-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.ev-drawer-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(280px, 82vw);
    padding: calc(8px + var(--ev-safe-top)) 0 24px;
    background: var(--ev-sidemenu-bg);
    color: var(--ev-sidemenu-text);
    overflow-y: auto;
}
.ev-drawer-head { display: flex; justify-content: flex-end; padding: 0 4px 8px; }
.ev-nav { display: block; }
.ev-drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 20px;
    font-size: 16px;
}
.ev-drawer-link.is-active { background: var(--ev-sidemenu-active); font-weight: 600; }
.ev-drawer-foot {
    margin-top: 16px;
    padding: 16px 20px 0;
    border-top: 1px solid var(--ev-sidemenu-active);
    font-size: 13px;
    opacity: .82;
}
.ev-drawer-foot a { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Seitenfuss
   -------------------------------------------------------------------------- */

.ev-foot {
    /* Ueber dem feststehenden Titelbild: auf dem Startbildschirm liegt das
       Hero bei z-index 0 und haette den Fuss sonst verschluckt. */
    position: relative;
    z-index: 1;
    padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
    text-align: center;
    background: var(--ev-bg);
}
.ev-foot a {
    display: inline-block;
    /* 44px Tippziel, auch wenn die Zeile nur 17px hoch ist. */
    min-height: 44px;
    padding: 12px 8px;
    font-size: 15px;
    color: var(--ev-accent-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Benachrichtigungen
   -------------------------------------------------------------------------- */

/* Der Zaehler an der Glocke - dieselbe Rolle wie das Badge auf der Landing. */
.ev-bell-count {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 18px; height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--ev-accent);
    color: var(--ev-on-accent);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.ev-bell-count[hidden] { display: none; }
/* Wo der Zaehler steht, waere der Punkt doppelt gemoppelt. */
.ev-bell:has(.ev-bell-count:not([hidden])) .ev-bell-dot { opacity: 0; }

.ev-notify { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.ev-notify[hidden] { display: none; }
.ev-notify-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.ev-notify-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(520px, 100%);
    max-height: 82vh;
    background: var(--ev-bg);
    color: var(--ev-text);
    border-radius: 18px 18px 0 0;
    overflow: hidden;
}
@media (min-width: 640px) {
    .ev-notify { align-items: center; }
    .ev-notify-panel { border-radius: 18px; }
}
.ev-notify-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 12px 10px 20px;
    border-bottom: 1px solid var(--ev-divider);
}
.ev-notify-head h2 { margin: 0; font-size: 18px; font-weight: 600; }

/* Der Schalter steht ueber der Liste, nicht daneben: wer die Glocke oeffnet,
   will genau diese Entscheidung treffen. */
.ev-notify-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--ev-divider);
    background: var(--ev-bg-shade);
}
.ev-notify-switch-body { flex: 1 1 auto; min-width: 0; }
.ev-notify-switch-title { font-size: 15px; font-weight: 600; }
.ev-notify-switch-sub { margin-top: 2px; font-size: 13px; color: var(--ev-text-muted); }

.ev-notify-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Eine Nachricht ist eine Listenzeile - wie alles andere in dieser App. */
.ev-notify-list .notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--ev-divider);
    cursor: pointer;
}
.ev-notify-list .notification-item:active { background: var(--ev-pressed); }
.ev-notify-list .notification-item.unread { background: var(--ev-surface-alt); }
/* Ungelesen bekommt einen Balken in der Akzentfarbe statt einer Farbflaeche,
   die auf jedem zweiten Farbschema untergeht. */
.ev-notify-list .notification-item.unread { box-shadow: inset 3px 0 0 var(--ev-accent); }
.ev-notify-list .notification-icon { flex: 0 0 auto; font-size: 18px; line-height: 1.3; }
.ev-notify-list .notification-content { flex: 1 1 auto; min-width: 0; }
.ev-notify-list .notification-text {
    font-size: 15px;
    line-height: 1.4;
    /* Lange Texte erst gekuerzt, beim Antippen ganz - wie auf der Landing. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ev-notify-list .notification-item.expanded .notification-text {
    -webkit-line-clamp: unset;
    overflow: visible;
}
.ev-notify-list .notification-time { margin-top: 4px; font-size: 12px; color: var(--ev-text-subtle); }
.ev-notify-list .expand-indicator {
    width: 16px; height: 16px;
    margin-top: 6px;
    border-left: 2px solid var(--ev-text-subtle);
    border-bottom: 2px solid var(--ev-text-subtle);
    transform: rotate(-45deg);
}
.ev-notify-list .notification-item.expanded .expand-indicator { transform: rotate(135deg); }
.ev-notify-list .notification-empty { padding: 40px 20px; text-align: center; color: var(--ev-text-muted); }
.ev-notify-list .notification-empty p { margin: 0 0 6px; font-size: 15px; }
.ev-notify-list .notification-hint { font-size: 13px; color: var(--ev-text-subtle); }

/* --------------------------------------------------------------------------
   Anleitungsblatt (iPhone/iPad)
   -------------------------------------------------------------------------- */

.ev-sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.ev-sheet[hidden] { display: none; }
.ev-sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.ev-sheet-panel {
    position: relative;
    width: min(560px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    padding: 4px 20px calc(24px + env(safe-area-inset-bottom));
    background: var(--ev-bg);
    color: var(--ev-text);
    border-radius: 18px 18px 0 0;
}
@media (min-width: 640px) {
    .ev-sheet { align-items: center; }
    .ev-sheet-panel { border-radius: 18px; }
}
.ev-sheet-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 -20px 4px;
    padding: 14px 20px 10px;
    background: var(--ev-bg);
}
.ev-sheet-head h2 { margin: 0; font-size: 19px; font-weight: 600; }
.ev-sheet-intro { margin: 0 0 18px; font-size: 15px; line-height: 1.5; }
.ev-sheet-foot {
    margin: 18px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ev-text-muted);
}

/* Die Schritte sind Listenzeilen wie ueberall sonst - keine Karten. */
.ev-steps { list-style: none; margin: 0; padding: 0; }
.ev-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--ev-divider);
}
.ev-step:last-child { border-bottom: 1px solid var(--ev-divider); }
.ev-step-num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--ev-accent);
    color: var(--ev-on-accent);
    font-size: 14px;
    font-weight: 600;
}
.ev-step-text { flex: 1 1 auto; font-size: 15px; line-height: 1.45; }
.ev-step-icon { vertical-align: -4px; margin-left: 2px; }

.ev-sheet-btn {
    display: block;
    width: 100%;
    min-height: 48px;
    margin-top: 20px;
    border-radius: 10px;
    background: var(--ev-accent);
    color: var(--ev-on-accent);
    font-size: 16px;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Rueckmeldung
   -------------------------------------------------------------------------- */

.ev-toast {
    position: fixed;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 80;
    max-width: calc(100vw - 32px);
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--ev-text);
    color: var(--ev-bg);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}
.ev-toast[hidden] { display: none; }

/* Unter 768px gibt es keine Seitenspalte und keine Detailflaeche.
   Diese Regel steht VOR den Media-Queries: bei gleicher Spezifitaet gewinnt
   die spaetere. Stuende sie darunter, waere die Seitenspalte auch auf dem
   Tablet ausgeblendet - und weil dort zugleich der Menue-Knopf verschwindet,
   gaebe es ueberhaupt keine Navigation mehr. Genau so gemessen am 25.08. */
.ev-sidebar, .ev-detailpane { display: none; }

/* --------------------------------------------------------------------------
   Tablet und Desktop
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {
    /* Drei Spalten: festes Menue links, Liste, Detailflaeche rechts.
       Die Schublade entfaellt - ihr Inhalt steht dauerhaft. */
    .ev-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }
    .ev-sidebar {
        display: block;
        background: var(--ev-sidemenu-bg);
        color: var(--ev-sidemenu-text);
        padding: 20px 0;
    }
    .ev-drawer-toggle { display: none; }
    .ev-main { padding-bottom: 64px; }
    .ev-navbar { padding: 0 8px; }
}

@media (min-width: 1100px) {
    .ev-shell { grid-template-columns: 280px minmax(0, 560px) minmax(0, 1fr); }
    .ev-detailpane {
        display: block;
        border-left: 1px solid var(--ev-divider);
        min-height: 100vh;
    }
    /* Auf dem Desktop steht das Detail neben der Liste statt an ihrer
       Stelle - deshalb bleibt die Liste sichtbar, wenn ein Eintrag offen ist. */
    .ev-body[data-detail-open="true"] .ev-screen.is-active { display: block; }
}

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