/* Easy-Passwort – Tresor-Oberfläche. Baut auf ui/theme.css auf (Tokens), Hell/Dunkel nach System. */

/* ───────────── Zusätzliche Tokens ───────────── */
:root {
  --ok-text: #4ade80;
  --warn-text: #fbbf24;
  --bad-text: #f87171;
  --ok-soft: rgba(34, 197, 94, 0.14);
  --warn-soft: rgba(245, 165, 36, 0.14);
  --mark-bg: rgba(45, 212, 191, 0.30);
  --pw-ziffer: #7cb4ff;
  --pw-zeichen: #fbbf24;
  --overlay: rgba(3, 6, 12, 0.62);
  --toast-bg: #eef2f8;
  --toast-text: #0f1a2e;
  --toast-akzent: #0f766e;
  --typ-karte: #6366f1;
  --typ-kontakt: #d97706;
  --typ-notiz: #64748b;
  --karte-a: #0f766e;
  --karte-b: #1e3a5f;
  --segment-an: #243049;
  --seite-breite: 256px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ok-text: #15803d;
    --warn-text: #b45309;
    --bad-text: #dc2626;
    --ok-soft: rgba(22, 163, 74, 0.12);
    --warn-soft: rgba(217, 119, 6, 0.12);
    --mark-bg: rgba(13, 148, 136, 0.20);
    --pw-ziffer: #1d4ed8;
    --pw-zeichen: #c2410c;
    --overlay: rgba(15, 26, 46, 0.38);
    --toast-bg: #0f1a2e;
    --toast-text: #f1f5f9;
    --toast-akzent: #5eead4;
    --segment-an: #ffffff;
  }
}

:root[data-theme="light"] {
  --ok-text: #15803d; --warn-text: #b45309; --bad-text: #dc2626;
  --ok-soft: rgba(22, 163, 74, 0.12); --warn-soft: rgba(217, 119, 6, 0.12); --mark-bg: rgba(13, 148, 136, 0.20);
  --pw-ziffer: #1d4ed8; --pw-zeichen: #c2410c; --overlay: rgba(15, 26, 46, 0.38);
  --toast-bg: #0f1a2e; --toast-text: #f1f5f9; --toast-akzent: #5eead4; --segment-an: #ffffff;
}

/* ───────────── Grundgerüst ─────────────
   Alles füllt den Container der Hülle (height: 100%), nie das ganze Fenster: Die Windows-App hat darüber eine eigene Titelleiste.
   Überlagerungen (Dialog, Schublade, Meldungen) sind absolut im Rahmen positioniert, nur das Kontextmenü hängt am Fenster. */
.ep-rahmen {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
}
.ep-wurzel { height: 100%; min-height: 0; overflow: hidden; }
.ep-rahmen *, .ep-menue * { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.ep-rahmen :focus-visible, .ep-menue :focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ep-rahmen [hidden] { display: none !important; }

.ep-app {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 100%);
  grid-template-columns: var(--seite-breite) minmax(320px, 380px) minmax(0, 1fr);
}
.ep-app.mittel { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); }
.ep-app.schmal { grid-template-columns: minmax(0, 1fr); }
.ep-app.breit.mit-einst { grid-template-columns: var(--seite-breite) minmax(0, 1fr); }
.ep-app.mittel.mit-einst { grid-template-columns: minmax(0, 1fr); }

.ep-spalte { min-width: 0; min-height: 0; height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.ep-scroll { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.ep-fueller { flex: 1 1 auto; }
.ep-dim { color: var(--muted); }
.ep-klein { font-size: 12px; }
.ep-mitte { text-align: center; }
.ep-umbruch { overflow-wrap: anywhere; word-break: break-word; }
.ep-mono { font-family: var(--mono); letter-spacing: .02em; }
.ep-unsichtbar { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

mark { background: var(--mark-bg); color: inherit; border-radius: 3px; padding: 0 1px; }
kbd {
  font-family: var(--mono); font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 5px; display: inline-block;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--panel2); color: var(--muted);
}

/* ───────────── Knöpfe, Eingaben (Ergänzungen zu theme.css) ───────────── */
.ep-btn .ep-sym { flex: none; }
.ep-btn.klein { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.ep-btn.icon.klein { width: 28px; padding: 0; }
.ep-btn.gross { height: 44px; font-size: 15px; border-radius: 10px; }
.ep-btn.breit { width: 100%; }
.ep-btn.an { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.ep-btn.flach:hover { background: var(--hover); }
.ep-btn.gefahr { color: var(--bad-text); }
.ep-btn.gefahr:hover { background: var(--bad-soft); }
.ep-btn.gefahr-voll { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 600; }
.ep-btn.gefahr-voll:hover { filter: brightness(1.08); }
.ep-btn.ep-fav-an { color: var(--warn); }
.ep-btn:disabled { pointer-events: none; }
.ep-btn.aus { opacity: .55; pointer-events: none; }

.ep-input { transition: border-color .12s, box-shadow .12s; min-width: 0; }
.ep-input:focus, .ep-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ep-input.gross { height: 44px; font-size: 15px; border-radius: 10px; }
.ep-input.klein { height: 28px; font-size: 13px; padding: 0 8px; }
.ep-input[aria-invalid="true"] { border-color: var(--bad); }
.ep-input:disabled { opacity: .65; }
select.ep-input { padding-right: 8px; cursor: pointer; }
select option { background: var(--panel); color: var(--text); }
textarea.ep-input { line-height: 1.5; }

.ep-label { font-weight: 500; }
.ep-feldhilfe { font-size: 12px; color: var(--muted); margin: 5px 0 0; line-height: 1.4; }
.ep-feldhilfe.fehler { color: var(--bad-text); }
.ep-fehler { color: var(--bad-text); font-size: 13px; margin: 8px 0 0; }
.ep-fehler-text { color: var(--bad-text); }
.ep-zeile-zwischen { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; min-height: 20px; }
.ep-zeile-zwischen .ep-staerke { margin-top: 5px; }

.ep-check { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; margin: 12px 0 4px; cursor: pointer; line-height: 1.4; }
.ep-check input { width: 16px; height: 16px; margin: 2px 0 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.ep-check.klein { font-size: 12.5px; margin: 2px 0; color: var(--muted); }

/* Passwortfeld mit Knöpfen im Feld */
.ep-pwfeld { position: relative; display: flex; align-items: center; }
.ep-pwfeld .ep-input { padding-right: 44px; }
.ep-pwfeld.mit-generator .ep-input { padding-right: 82px; }
.ep-pwfeld-auge, .ep-pwfeld-gen { position: absolute; top: 50%; transform: translateY(-50%); height: 30px !important; width: 34px !important; }
.ep-pwfeld-auge { right: 4px; }
.ep-pwfeld.mit-generator .ep-pwfeld-auge { right: 40px; }
.ep-pwfeld-gen { right: 4px; }
.ep-input.sichtbar { font-family: var(--mono); }

/* Stärke */
.ep-staerke { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ep-staerke .balken { display: inline-flex; gap: 3px; }
.ep-staerke .balken i { display: block; width: 16px; height: 4px; border-radius: 2px; background: var(--line); }
.ep-staerke.kompakt .balken i { width: 11px; }
.ep-staerke.s0 .an, .ep-staerke.s1 .an { background: var(--bad); }
.ep-staerke.s2 .an { background: var(--warn); }
.ep-staerke.s3 .an { background: var(--ok); }
.ep-staerke.s4 .an { background: var(--accent); }
.ep-staerke.s0 .text, .ep-staerke.s1 .text { color: var(--bad-text); }
.ep-staerke.s2 .text { color: var(--warn-text); }
.ep-staerke.s3 .text { color: var(--ok-text); }
.ep-staerke.s4 .text { color: var(--accent); }

/* Passwort lesbar */
.ep-pwtext { overflow-wrap: anywhere; }
.ep-pwtext .pw-z { color: var(--pw-ziffer); }
.ep-pwtext .pw-s { color: var(--pw-zeichen); }

/* Schalter */
.ep-schalter { display: flex; align-items: center; gap: 12px; cursor: pointer; position: relative; }
.ep-schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ep-schalter .spur { width: 40px; height: 24px; border-radius: 12px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.ep-schalter .knopf { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.ep-schalter input:checked + .spur { background: var(--accent); }
.ep-schalter input:checked + .spur .knopf { transform: translateX(16px); }
.ep-schalter input:focus-visible + .spur { outline: 2px solid var(--accent); outline-offset: 2px; }
.ep-schalter.aus { opacity: .55; cursor: default; }
.ep-schalter-text, .schalter-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.schalter-text small { font-size: 12px; color: var(--muted); }

/* Hinweise */
.ep-hinweis { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; margin: 10px 0; }
.ep-hinweis > .ep-sym { flex: none; margin-top: 1px; }
.ep-hinweis.info { background: var(--accent-soft); }
.ep-hinweis.info > .ep-sym { color: var(--accent); }
.ep-hinweis.warn { background: var(--warn-soft); }
.ep-hinweis.warn > .ep-sym { color: var(--warn); }
.ep-hinweis.fehler { background: var(--bad-soft); }
.ep-hinweis.fehler > .ep-sym { color: var(--bad); }

.ep-badge.gefahr { background: var(--bad-soft); color: var(--bad-text); border-color: transparent; }
.ep-avatar { color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); letter-spacing: 0; line-height: 1; }

.ep-spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; flex: none; animation: ep-drehen .75s linear infinite; }
.ep-spinner.gross { width: 30px; height: 30px; border-width: 3px; color: var(--accent); }
.ep-sym.dreht { animation: ep-drehen 1s linear infinite; }
.ep-mit-spinner { display: flex; align-items: center; gap: 8px; }
@keyframes ep-drehen { to { transform: rotate(360deg); } }
@keyframes ep-rein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ep-blenden { from { opacity: 0; } to { opacity: 1; } }
@keyframes ep-von-links { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes ep-von-unten { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ───────────── Sperre / Einrichten ───────────── */
.ep-vollbild {
  height: 100%; overflow-y: auto; display: flex; padding: 24px 16px;
  background: radial-gradient(1100px 520px at 50% -12%, var(--accent-soft), transparent 62%), var(--bg);
}
.ep-vollbild > .ep-spinner { margin: auto; }
.ep-karte-zentral {
  margin: auto; width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 28px 28px 22px; display: flex; flex-direction: column;
}
.ep-karte-zentral.breit { max-width: 480px; }
.ep-karte-zentral h1 { margin: 6px 0 0; font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.ep-zentral-kopf { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 12px; }
.ep-zentral-kopf p { margin: 0; }
.ep-zentral-kopf .ep-dim { font-size: 13.5px; max-width: 360px; }
.ep-konto-zeile { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 3px 12px; max-width: 100%; }
.ep-konto-zeile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-karte-zentral .ep-btn.gross { margin-top: 14px; }
.ep-karte-zentral .ep-btn.gross + .ep-btn.gross { margin-top: 8px; }
.ep-karte-zentral > p.ep-klein, .ep-formular > p.ep-klein { margin: 12px 0 0; }
.ep-reiter { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin: 6px 0 4px; }
.ep-reiter button { min-height: 34px; border: none; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; padding: 4px 6px; line-height: 1.25; }
.ep-reiter button:hover { color: var(--text); }
.ep-reiter button.aktiv { background: var(--segment-an); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.ep-formular { display: flex; flex-direction: column; }

/* ───────────── Seitenleiste ───────────── */
.ep-seite { background: var(--bg2); border-right: 1px solid var(--line); }
.ep-seite-innen { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.ep-seite-kopf { display: flex; align-items: center; gap: 10px; padding: 16px 14px 10px 16px; flex: none; }
.ep-marke { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.ep-marke strong { font-size: 14.5px; font-weight: 700; letter-spacing: -.005em; }
.ep-marke span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 4px 8px 12px; }
.ep-nav-gruppe { display: flex; flex-direction: column; gap: 1px; }
.ep-nav-unten { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.ep-nav-eintrag {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px; border-radius: 8px; border: none;
  background: transparent; color: var(--muted); cursor: pointer; text-align: left; font-size: 13.5px;
}
.ep-nav-eintrag:hover { background: var(--hover); color: var(--text); }
.ep-nav-eintrag.aktiv { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.ep-nav-eintrag.aktiv .ep-sym { color: var(--accent); }
.ep-nav-eintrag .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-nav-eintrag .anzahl { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; font-weight: 400; }
.ep-nav-eintrag.aktiv .anzahl { color: var(--muted); }
.drop, .ep-nav-eintrag.drop, .ep-ordner-zeile.drop, .ep-nav-kopf.drop { background: var(--accent-soft) !important; box-shadow: inset 0 0 0 2px var(--accent); }
.ep-nav-kopf {
  display: flex; align-items: center; justify-content: space-between; margin: 14px 0 2px; padding: 0 2px 0 10px; min-height: 28px; border-radius: 6px;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); font-weight: 600;
}
.ep-ordnerbaum { display: flex; flex-direction: column; gap: 1px; }
.ep-ordner-zeile { display: flex; align-items: center; gap: 0; border-radius: 8px; position: relative; min-height: 34px; }
.ep-ordner-zeile:hover { background: var(--hover); }
.ep-ordner-zeile.aktiv { background: var(--accent-soft); }
.ep-ordner-zeile .ep-ordner-knopf { flex: 1; min-width: 0; padding-left: 4px; background: transparent !important; }
.ep-ordner-zeile.aktiv .ep-ordner-knopf { color: var(--text); font-weight: 600; }
.ep-ordner-zeile.aktiv .ep-ordner-knopf .ep-sym { color: var(--accent); }
.ep-ordner-pfeil { width: 20px; height: 24px; flex: none; display: grid; place-items: center; border: none; background: transparent; color: var(--dim); cursor: pointer; border-radius: 5px; padding: 0; }
.ep-ordner-pfeil:hover { color: var(--text); background: var(--hover); }
.ep-ordner-pfeil-platz { width: 20px; flex: none; }
.ep-ordner-mehr { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border: none; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; margin-right: 4px; opacity: 0; }
.ep-ordner-zeile:hover .ep-ordner-mehr, .ep-ordner-zeile:focus-within .ep-ordner-mehr, .ep-ordner-mehr:focus-visible { opacity: 1; }
.ep-ordner-mehr:hover { background: var(--panel2); color: var(--text); }
.ep-ordner-zeile.eingabe { gap: 8px; padding-right: 6px; color: var(--muted); }
.ep-ordner-zeile.eingabe .ep-input { flex: 1; }
.ep-nav-leer { font-size: 12px; color: var(--dim); padding: 2px 10px 6px; margin: 0; line-height: 1.4; }
.ep-seite-fuss { flex: none; border-top: 1px solid var(--line); padding: 8px 10px 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; }
.ep-sync { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 0 0 0 8px; min-height: 30px; }
.ep-sync-punkte { display: inline-flex; gap: 4px; flex: none; }
.ep-sync-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-sync.rot .ep-sync-text { color: var(--bad-text); }
.ep-sync.gelb .ep-sync-text { color: var(--warn-text); }
.ep-punkt { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--dim); }
.ep-punkt.gruen { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.ep-punkt.gelb { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.ep-punkt.rot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.ep-seite-knoepfe { display: flex; gap: 4px; align-items: center; }
.ep-werkzeug .ep-sym { color: var(--accent); }
.ep-sperren { flex: 1; justify-content: flex-start; padding-left: 8px; }

/* Schublade (schmale/mittlere Breite) – absolut in .ep-app, nicht am Fenster */
.ep-schublade-hg { position: absolute; inset: 0; background: var(--overlay); z-index: 800; animation: ep-blenden .15s ease-out; }
.ep-schublade {
  position: absolute; top: 0; bottom: 0; left: 0; z-index: 801; width: min(300px, 86%); box-shadow: var(--shadow);
  animation: ep-von-links .2s ease-out; padding-top: env(safe-area-inset-top);
}

/* ───────────── Liste ───────────── */
.ep-spalte-liste { background: var(--panel); border-right: 1px solid var(--line); }
.ep-app.schmal .ep-spalte-liste { border-right: none; }
.ep-liste-spalte-innen { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.ep-liste-kopf { flex: none; padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.ep-liste-titelzeile { display: flex; align-items: center; gap: 6px; min-height: 34px; min-width: 0; }
.ep-liste-titel { margin: 0; font-size: 16px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.005em; }
.ep-liste-anzahl { flex: none; font-size: 11.5px; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; line-height: 18px; font-variant-numeric: tabular-nums; }
.ep-sortieren { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); height: 30px; padding: 0 2px 0 8px; border-radius: 8px; flex: none; cursor: pointer; }
.ep-sortieren:hover { background: var(--hover); color: var(--text); }
.ep-sortieren:focus-within { outline: 2px solid var(--accent); outline-offset: 0; }
.ep-sortieren select { appearance: none; -webkit-appearance: none; background: transparent; border: none; color: inherit; font-size: 12.5px; padding: 0 4px 0 0; cursor: pointer; max-width: 118px; outline: none; }
.ep-neu-knopf { padding: 0 10px 0 8px; gap: 4px; }
.ep-suche { display: flex; align-items: center; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); padding: 0 6px 0 12px; gap: 8px; color: var(--dim); transition: border-color .12s, box-shadow .12s; }
.ep-suche:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--accent); }
.ep-suche-feld { flex: 1; min-width: 0; height: 100%; border: none; background: transparent; outline: none !important; font-size: 14.5px; color: var(--text); padding: 0; }
.ep-suche-feld::placeholder { color: var(--dim); }
.ep-suche-feld::-webkit-search-cancel-button, .ep-suche-feld::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.ep-suche-leeren { width: 26px; height: 26px; border-radius: 50%; border: none; background: var(--panel2); color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
.ep-suche-leeren:hover { color: var(--text); background: var(--hover); }
.ep-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ep-chip { height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; white-space: nowrap; }
.ep-chip:hover { background: var(--hover); color: var(--text); }
.ep-chip.an { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }

.ep-liste { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; position: relative; outline: none; padding: 6px 0; overscroll-behavior: contain; }
.ep-liste:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); outline: none !important; }
.ep-liste-innen { position: relative; }
.ep-liste-fenster { will-change: transform; }
.ep-zeile {
  display: flex; align-items: center; gap: 12px; margin: 0 8px; padding: 0 10px; border-radius: 10px; cursor: pointer; position: relative;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.ep-zeile:hover { background: var(--hover); }
.ep-zeile.aktiv { background: var(--accent-soft); }
.ep-zeile.aktiv::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: var(--accent); }
.ep-zeile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ep-zeile-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; min-width: 0; color: var(--text); }
.ep-zeile-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-fav { color: var(--warn); flex: none; }
.ep-zeile-unter { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.ep-zeile-unter-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-treffer-hinweis { flex: none; font-size: 11px; padding: 0 7px; line-height: 18px; border-radius: 9px; background: var(--warn-soft); color: var(--warn-text); font-weight: 600; }
.ep-pk-badge { flex: none; }
.ep-weitere { display: block; width: calc(100% - 32px); margin: 10px 16px 16px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; background: transparent; color: var(--accent); cursor: pointer; font-size: 13px; }
.ep-weitere:hover { background: var(--accent-soft); }
.ep-leer { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 52px 24px; color: var(--muted); }
.ep-leer > .ep-sym { color: var(--dim); margin-bottom: 4px; }
.ep-leer p { margin: 0; max-width: 320px; font-size: 13px; line-height: 1.5; }
.ep-leer .ep-leer-titel { font-size: 15px; font-weight: 600; color: var(--text); }
.ep-leer-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

/* ───────────── Kopfzeilen (Detail, Editor, Einstellungen) ───────────── */
.ep-topbar { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--panel); flex: none; min-width: 0; }
.ep-topbar h2 { margin: 0; font-size: 16px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-zurueck { padding-left: 4px; gap: 2px; }

/* ───────────── Detail ───────────── */
.ep-spalte-detail { background: var(--bg); }
.ep-detail, .ep-editor, .ep-einst { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.ep-detail-inhalt { max-width: 780px; margin: 0 auto; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 16px; animation: ep-blenden .12s ease-out; }
.ep-detail-kopf { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ep-detail-titel { min-width: 0; flex: 1; }
.ep-detail-titel h1 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; letter-spacing: -.01em; }
.ep-detail-unter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; min-width: 0; }
.ep-pfad { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; max-width: 100%; min-width: 0; }
.ep-pfad span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-pfad:hover { color: var(--text); background: var(--hover); }
.ep-detail-aktionen { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-gruppe { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ep-gruppe-kopf { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: none; border-bottom: 1px solid var(--line); color: var(--muted); width: 100%; background: transparent; font: inherit; text-align: left; }
.ep-gruppe-kopf h3 { margin: 0; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); }
.ep-gruppe-kopf .ep-btn { margin-left: auto; }
.ep-klappbar { cursor: pointer; }
.ep-klappbar:hover { background: var(--hover); }
.ep-klappbar[aria-expanded="false"] { border-bottom: none; }
.ep-feld { display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 16px; border-bottom: 1px solid var(--line); min-height: 62px; }
.ep-gruppe-inhalt > .ep-feld:last-child, .ep-gruppe-inhalt > .ep-passkey:last-child { border-bottom: none; }
.ep-feld-inhalt { flex: 1; min-width: 0; }
.ep-feld-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.ep-feld-wert { font-size: 14.5px; color: var(--text); overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }
.ep-feld-wert.klickbar { cursor: pointer; display: inline-block; border-radius: 4px; }
.ep-feld-wert.klickbar:hover { color: var(--accent); }
.ep-feld-wert.mehrzeilig { white-space: pre-wrap; user-select: text; line-height: 1.55; display: block; }
.ep-verdeckt { letter-spacing: .14em; color: var(--muted); }
.ep-feld-knoepfe { display: flex; gap: 2px; flex: none; align-self: center; }
.ep-kopier { color: var(--accent); }
.ep-feld .ep-staerke { margin-top: 6px; }
.ep-totp { display: inline-flex !important; align-items: center; gap: 12px; font-size: 20px; letter-spacing: .1em; }
.ep-totp-rest {
  --anteil: 1;
  width: 26px; height: 26px; border-radius: 50%; font-size: 10px; letter-spacing: 0; display: inline-grid; place-items: center; color: var(--text); font-family: var(--font);
  background: radial-gradient(closest-side, var(--panel) 74%, transparent 76% 100%), conic-gradient(var(--accent) calc(var(--anteil) * 1turn), var(--line) 0);
}
.ep-totp-rest.knapp { background: radial-gradient(closest-side, var(--panel) 74%, transparent 76% 100%), conic-gradient(var(--bad) calc(var(--anteil) * 1turn), var(--line) 0); }
.ep-passkey { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ep-egruppe .ep-passkey { border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; }
.ep-passkey-sym { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.ep-passkey-text { flex: 1; min-width: 0; }
.ep-passkey-rp { font-weight: 600; overflow-wrap: anywhere; }
.ep-passkey-user { font-size: 13px; overflow-wrap: anywhere; }
.ep-passkey-meta { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.ep-version { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--line); }
.ep-gruppe-inhalt > .ep-version:last-child { border-bottom: none; }
.ep-version-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ep-version-datum { font-size: 12px; color: var(--muted); }
.ep-version-name { font-weight: 600; overflow-wrap: anywhere; }
.ep-version-zeile { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.ep-version-zeile > .ep-dim { flex: none; width: 70px; font-size: 12px; }
.ep-version > .ep-btn { flex: none; }
.ep-versionen-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; padding: 12px 16px; font-size: 13px; }
.ep-geloescht { margin: 14px 12px 16px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.ep-geloescht h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.ep-geloescht-zeile { display: flex; align-items: center; gap: 8px; min-height: 36px; color: var(--muted); min-width: 0; }
.ep-geloescht-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 13px; }
.ep-meta { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; padding: 2px 4px; }
.ep-meta > div { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ep-meta span { overflow-wrap: anywhere; }

.ep-kartenbild {
  width: 100%; max-width: 340px; aspect-ratio: 1.586; border-radius: 16px; padding: 18px 20px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--karte-a), var(--karte-b)); display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
}
.ep-kartenbild::after { content: ''; position: absolute; right: -60px; top: -80px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.ep-kartenbild-oben { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.ep-kartenbild-chip { width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #f6d98b, #c9a227); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.ep-kartenbild-marke { font-weight: 700; letter-spacing: .04em; font-size: 15px; }
.ep-kartenbild-nummer { font-size: 18px; letter-spacing: .14em; position: relative; z-index: 1; white-space: nowrap; overflow: hidden; }
.ep-kartenbild-unten { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .92; position: relative; z-index: 1; }
.ep-kartenbild-unten span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.ep-detail-leer { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); text-align: center; padding: 24px; }
.ep-detail-leer h2 { margin: 10px 0 0; font-size: 18px; color: var(--text); }
.ep-detail-leer p { margin: 0; }
.ep-detail-leer .ep-logo { opacity: .9; }
.ep-tasten { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 16px; font-size: 12px; color: var(--muted); }
.ep-tasten span { display: inline-flex; align-items: center; gap: 4px; }

/* ───────────── Editor ───────────── */
.ep-editor-inhalt { max-width: 780px; margin: 0 auto; padding: 24px 32px 40px; display: flex; flex-direction: column; gap: 16px; }
.ep-editor-name { display: flex; align-items: flex-end; gap: 14px; }
.ep-editor-name .ep-efeld { flex: 1; min-width: 0; }
.ep-editor-name .ep-label { margin-top: 0; }
.ep-egruppe { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 16px; min-width: 0; }
.ep-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; }
.ep-raster .breit { grid-column: 1 / -1; }
.ep-efeld { min-width: 0; }
.ep-efeld-schalter { display: flex; align-items: flex-end; padding: 10px 0 6px; }
.ep-urls { display: flex; flex-direction: column; gap: 8px; }
.ep-url-zeile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 200px) 34px; gap: 6px; align-items: center; }
.ep-hinzu { align-self: flex-start; color: var(--accent); padding-left: 6px; }
.ep-hinzu-zeile { display: flex; gap: 4px; flex-wrap: wrap; }
.ep-zusatz-zeile { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) 34px 34px; gap: 6px; align-items: center; margin-bottom: 8px; }
.ep-egruppe > .ep-label:first-child { margin-top: 12px; margin-bottom: 8px; }
.ep-notiz-gross { min-height: 300px; font-family: var(--font); }
.ep-editor-fuss { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--panel); flex: none; }
.ep-editor-fehler .ep-hinweis { margin: 0; }

/* Generator */
.ep-popover {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; width: 340px; max-width: calc(100vw - 32px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px 14px; animation: ep-rein .14s ease-out;
}
.ep-popover-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; }
.ep-generator { display: flex; flex-direction: column; gap: 12px; }
.ep-generator-vorschau { display: flex; align-items: center; gap: 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px 10px 12px; min-height: 52px; }
.ep-generator-pw { flex: 1; min-width: 0; font-size: 16px; line-height: 1.4; user-select: all; -webkit-user-select: all; }
.ep-segment { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.ep-segment button { min-height: 30px; border: none; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12.5px; padding: 2px 6px; line-height: 1.25; }
.ep-segment button:hover { color: var(--text); }
.ep-segment button.an { background: var(--segment-an); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.ep-regler { display: grid; grid-template-columns: auto minmax(0, 1fr) 30px; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.ep-regler input[type="range"] { width: 100%; accent-color: var(--accent); margin: 0; }
.ep-regler output { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.ep-klassen { display: flex; gap: 6px; flex-wrap: wrap; }
.ep-chip-check { position: relative; display: inline-flex; }
.ep-chip-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.ep-chip-check span { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.ep-chip-check input:checked + span { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.ep-chip-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.ep-generator-knoepfe { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ep-generator-modal { max-width: 420px; }

/* ───────────── Einstellungen ───────────── */
.ep-spalte-einst { background: var(--bg); grid-column: 2 / -1; }
.ep-app.mittel .ep-spalte-einst, .ep-app.schmal .ep-spalte-einst { grid-column: 1 / -1; }
.ep-einst-raster { display: grid; grid-template-columns: 200px minmax(0, 760px); gap: 32px; justify-content: center; padding: 24px 32px 56px; }
.ep-einst-nav { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.ep-einst-nav-eintrag { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border: none; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; font-size: 13.5px; }
.ep-einst-nav-eintrag:hover { background: var(--hover); color: var(--text); }
.ep-einst-nav-eintrag.aktiv { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.ep-einst-nav-eintrag.aktiv .ep-sym { color: var(--accent); }
.ep-einst-inhalt { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ep-einst-abschnitt { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; scroll-margin-top: 16px; min-width: 0; }
.ep-einst-abschnitt-kopf { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.ep-einst-abschnitt-kopf h3 { margin: 0; font-size: 15px; font-weight: 700; }
.ep-einst-abschnitt-kopf p { margin: 3px 0 0; font-size: 13px; line-height: 1.45; }
.ep-einst-sym { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.ep-einst-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; min-width: 0; }
.ep-einst-abschnitt-inhalt > .ep-einst-zeile:first-child { border-top: none; padding-top: 4px; }
.ep-einst-zeile > div { min-width: 0; flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; }
.ep-einst-zeile p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; }
.ep-einst-formular { display: flex; flex-direction: column; padding: 12px 0 4px; border-top: 1px solid var(--line); }
.ep-knopfzeile { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ep-serverliste { list-style: none; margin: 0 0 4px; padding: 0; }
.ep-serverliste li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ep-serverliste li:first-child { border-top: none; }
.ep-serverliste .ep-punkt { margin-top: 6px; }
.ep-server-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ep-sync-zusammen { font-size: 13px; font-weight: 600; }
.ep-sync-zusammen.gruen { color: var(--ok-text); }
.ep-sync-zusammen.gelb { color: var(--warn-text); }
.ep-sync-zusammen.rot { color: var(--bad-text); }
.ep-ablage { border: 2px dashed var(--line); border-radius: 12px; padding: 22px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--muted); transition: border-color .12s, background .12s; }
.ep-ablage.drueber { border-color: var(--accent); background: var(--accent-soft); }
.ep-ablage p { margin: 0; }
.ep-datei-knopf { position: relative; }
.ep-datei-knopf:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.ep-ergebnis { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0 0; background: var(--bg2); }
.ep-ergebnis-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ep-ergebnis-kopf .ep-sym { color: var(--ok-text); }
.ep-ergebnis-kopf .ep-dim { font-size: 12.5px; }
.ep-ergebnis-zahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ep-ergebnis-zahlen div { display: flex; flex-direction: column; align-items: center; background: var(--panel); border-radius: 10px; padding: 10px 6px; text-align: center; }
.ep-ergebnis-zahlen strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.ep-ergebnis-zahlen span { font-size: 12px; color: var(--muted); }
.ep-regeln { display: flex; flex-direction: column; gap: 8px; }
.ep-regel { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); min-width: 0; }
.ep-regel-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ep-regel-editor { border: 1px solid var(--accent); border-radius: 10px; padding: 10px; background: var(--bg2); }
.ep-json { min-height: 170px; font-size: 12.5px; line-height: 1.5; white-space: pre; overflow: auto; tab-size: 2; }
.ep-regel-meldung { font-size: 12.5px; margin: 6px 0 0; }
.ep-regel-meldung.ok { color: var(--ok-text); }
.ep-regel-meldung.warn { color: var(--warn-text); }
.ep-regel-meldung.fehler { color: var(--bad-text); }
.ep-einst-unterliste { margin-top: 18px; }
.ep-einst-unterliste h4, .ep-tastenliste h4 { margin: 0 0 6px; font-size: 13px; }
.ep-kleinliste { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ep-kleinliste li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 4px 3px 10px; border-radius: 8px; background: var(--bg2); font-size: 13px; min-width: 0; }
.ep-ueber { display: flex; gap: 14px; align-items: flex-start; }
.ep-ueber p { margin: 4px 0 0; line-height: 1.45; }
.ep-tastenliste { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ep-tastenliste dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 14px; margin: 0; align-items: center; }
.ep-tastenliste dd { margin: 0; color: var(--muted); font-size: 13px; }

/* ───────────── Überlagerungen ───────────── */
.ep-meldungen {
  position: absolute; left: 50%; bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px)); transform: translateX(-50%); z-index: 1000;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100% - 32px);
}
.ep-meldung {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border-radius: 12px; max-width: 100%;
  background: var(--toast-bg); color: var(--toast-text); box-shadow: var(--shadow); font-size: 13.5px; animation: ep-rein .18s ease-out;
}
.ep-meldung .text { min-width: 0; overflow-wrap: anywhere; }
.ep-meldung > .ep-sym { color: var(--toast-akzent); flex: none; }
.ep-meldung.fehler > .ep-sym { color: var(--bad); }
.ep-meldung .ep-btn { color: var(--toast-akzent); font-weight: 700; height: 28px; }
.ep-meldung .ep-btn:hover { background: rgba(127, 127, 127, .15); }

.ep-modal-hg { position: absolute; inset: 0; background: var(--overlay); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; animation: ep-blenden .14s ease-out; }
.ep-modal {
  width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; overflow-x: hidden;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 18px 20px 18px;
  font: 14px/1.45 var(--font); animation: ep-rein .16s ease-out;
}
.ep-modal.breit { max-width: 640px; }
.ep-modal-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ep-modal-kopf h2 { margin: 0; font-size: 16px; font-weight: 700; }
.ep-dialog-kopf { display: flex; align-items: center; gap: 12px; }
.ep-dialog-kopf h2 { margin: 0; font-size: 16.5px; font-weight: 700; line-height: 1.3; }
.ep-dialog-sym { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ep-dialog-sym.gefahr { background: var(--bad-soft); color: var(--bad); }
.ep-dialog-text { color: var(--muted); margin: 12px 0 4px; line-height: 1.5; }
.ep-dialog-knoepfe { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

.ep-menue { position: fixed; z-index: 950; min-width: 210px; max-width: min(300px, calc(100vw - 16px)); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 5px; font: 14px/1.45 var(--font); }
.ep-menue-eintrag { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px; border: none; background: transparent; color: var(--text); border-radius: 8px; cursor: pointer; font-size: 13.5px; text-align: left; }
.ep-menue-eintrag:hover, .ep-menue-eintrag:focus-visible { background: var(--hover); outline: none !important; }
.ep-menue-eintrag .ep-sym { color: var(--muted); }
.ep-menue-eintrag.gefahr, .ep-menue-eintrag.gefahr .ep-sym { color: var(--bad-text); }
.ep-menue-eintrag kbd { margin-left: auto; }
.ep-menue-eintrag:disabled { opacity: .5; cursor: default; }
.ep-menue-trenner { height: 1px; background: var(--line); margin: 4px 6px; }
.ep-sym-platz { width: 16px; flex: none; }

/* ───────────── Mittlere Breite ───────────── */
@media (max-width: 999px) {
  .ep-detail-inhalt, .ep-editor-inhalt { padding: 22px 22px 40px; }
  .ep-einst-raster { grid-template-columns: 180px minmax(0, 1fr); gap: 20px; padding: 20px 20px 48px; }
}

/* ───────────── Schmal (iPhone) ───────────── */
@media (max-width: 699px) {
  .ep-input, select.ep-input, textarea.ep-input, .ep-suche-feld { font-size: 16px; } /* iOS zoomt sonst beim Antippen */
  .ep-input { height: 42px; }
  .ep-input.klein { height: 36px; }
  .ep-btn { height: 40px; }
  .ep-btn.icon { width: 40px; }
  .ep-btn.klein { height: 34px; }
  .ep-btn.icon.klein { width: 34px; }
  .ep-liste-kopf { padding: 10px 12px 10px; padding-top: max(10px, env(safe-area-inset-top)); gap: 9px; }
  .ep-suche { height: 42px; }
  .ep-chip { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 15px; }
  .ep-zeile { margin: 0 6px; padding: 0 10px; }
  .ep-pk-text { display: none; }
  .ep-liste { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .ep-topbar { padding: 6px 10px; padding-top: max(6px, env(safe-area-inset-top)); min-height: 54px; }
  .ep-detail-inhalt, .ep-editor-inhalt { padding: 16px 14px 32px; padding-bottom: max(32px, calc(env(safe-area-inset-bottom) + 20px)); gap: 14px; }
  .ep-detail-titel h1 { font-size: 20px; }
  .ep-detail-aktionen .ep-btn { flex: 1 1 auto; }
  .ep-detail-aktionen .ep-btn.icon { flex: 0 0 auto; width: 44px; }
  .ep-feld { min-height: 66px; padding: 10px 6px 10px 14px; }
  .ep-feld-wert { font-size: 15.5px; }
  .ep-feld-knoepfe .ep-btn.icon { width: 44px; height: 44px; }
  .ep-raster { grid-template-columns: minmax(0, 1fr); }
  .ep-url-zeile { grid-template-columns: minmax(0, 1fr) 44px; }
  .ep-url-zeile > :first-child { grid-column: 1 / -1; }
  .ep-zusatz-zeile { grid-template-columns: minmax(0, 1fr) 44px 44px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .ep-zusatz-zeile > :first-child { grid-column: 1 / -1; }
  .ep-editor-name { align-items: center; }
  .ep-einst-raster { grid-template-columns: minmax(0, 1fr); padding: 14px 12px 40px; padding-bottom: max(40px, calc(env(safe-area-inset-bottom) + 24px)); gap: 14px; }
  .ep-einst-abschnitt { padding: 16px 14px; }
  .ep-einst-zeile .ep-btn { flex: 1 1 auto; }
  .ep-karte-zentral { padding: 22px 18px 18px; border-radius: 16px; }
  .ep-vollbild { padding: 16px 12px; padding-top: max(16px, env(safe-area-inset-top)); }
  .ep-modal-hg { align-items: flex-end; padding: 0; }
  .ep-modal { max-width: none; border-radius: 18px 18px 0 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); max-height: calc(100% - 24px); animation: ep-von-unten .2s ease-out; }
  .ep-dialog-knoepfe .ep-btn { flex: 1 1 auto; }
  .ep-ergebnis-zahlen strong { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .ep-meldung, .ep-modal, .ep-modal-hg, .ep-schublade, .ep-schublade-hg, .ep-popover, .ep-detail-inhalt { animation: none !important; }
  .ep-schalter .spur, .ep-schalter .knopf { transition: none; }
}

@media (forced-colors: active) {
  .ep-zeile.aktiv, .ep-nav-eintrag.aktiv, .ep-chip.an { outline: 2px solid Highlight; }
}
