/* Gemeinsame Oberfläche von Dateien, Code und Vault.
   Wird von pages/index.html, pages/code.html und pages/vault.html geladen;
   das Markup dazu kommt aus pages/_navbar.html via ui.py. */

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

:root {
  --nav-h: 64px; --icon-scale: 1; --tile-size: 220px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --bg: #fffaf4;
  --panel: #ffffff;
  --panel2: #fffdfb;
  --panel-alt: #fffdfb;
  --panel-subtle: #faeee3;
  --panel-hover: #fff1e5;
  --panel-active: #ffe9d6;
  --card: #ffffff;
  --ink: #382b29;
  --muted: #806d63;
  --line: #efdfcf;
  --line-strong: #e8bd9b;
  --fox: #dc722e;
  --fox-hover: #c86020;
  --fox-dark: #9c4d20;
  --fox-soft: #f5e7db;
  --fox-soft-hover: #ecd5c2;
  --ok: #20623a;
  --ok-bg: #e3f4e7;
  --warn: #a14d18;
  --warn-bg: #fff0df;
  --danger: #b13d1e;
  --danger-bg: #ffe3da;
  --shadow-card: 0 14px 36px rgba(142, 88, 53, .09);
  --shadow-menu: 0 14px 35px rgba(80, 50, 30, .2);
  --backdrop: rgba(40, 23, 11, .52);
  --nav-bg: rgba(255, 250, 244, .9);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161311;
  --panel: #211c19;
  --panel2: #26201d;
  --panel-alt: #26201d;
  --panel-subtle: #2e2622;
  --panel-hover: #362c26;
  --panel-active: #463429;
  --card: #211c19;
  --ink: #f3eae3;
  --muted: #b09c90;
  --line: #382e28;
  --line-strong: #5c4537;
  --fox: #e57a35;
  --fox-hover: #f08946;
  --fox-dark: #f4a26d;
  --fox-soft: #352922;
  --fox-soft-hover: #46352b;
  --ok: #6fd692;
  --ok-bg: #193824;
  --warn: #f5a962;
  --warn-bg: #3d2814;
  --danger: #ff8b73;
  --danger-bg: #421e18;
  --shadow-card: 0 16px 42px rgba(0, 0, 0, .38);
  --shadow-menu: 0 16px 40px rgba(0, 0, 0, .55);
  --backdrop: rgba(8, 5, 4, .72);
  --nav-bg: rgba(24, 20, 18, .88);
}

[hidden] { display: none !important; }

html, body, button, input, select, textarea {
  font-family: var(--font-sans);
}

/* Basis-Reset: ohne das zeigen Buttons in Code/Vault die Browser-Rahmen */
button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; transition: background-color .14s ease, color .14s ease, border-color .14s ease, transform .1s ease; }
button:disabled { cursor: wait; }

.icon32 { width: 44px; height: 44px; image-rendering: pixelated; vertical-align: middle; }
.icon32.x2 { width: 28px; height: 28px; }
.icon64 { width: 64px; height: 64px; image-rendering: pixelated; vertical-align: middle; }

.navbar { position: fixed; top: 0; left: 0; right: 0; height: 64px; min-height: 64px; box-sizing: border-box; display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--nav-bg); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); z-index: 20; }
.brand { flex: none; display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; font-size: 1.05rem; text-decoration: none; white-space: nowrap; }
.brand img { margin-right: 2px; }
/* Statusmeldung: nur so breit wie nötig. Ohne Text darf sie keinen Platz belegen,
   sonst schrumpft das Suchfeld auf wenige Pixel. */
.nav-status { flex: 0 1 auto; min-width: 0; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .8rem; }
.nav-status:empty { display: none; }
.search { flex: 0 1 440px; width: 100%; max-width: 440px; margin: 0 auto; position: relative; }
.search input { width: 100%; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); font: inherit; outline-color: var(--fox); transition: border-color .15s ease, box-shadow .15s ease; }
.search input:focus { border-color: var(--fox); box-shadow: 0 0 0 3px rgba(220, 114, 46, .15); outline: none; }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.settings-button { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 0; border-radius: 11px; background: none; color: var(--fox-dark); text-decoration: none; font-weight: 700; font-size: .92rem; white-space: nowrap; cursor: pointer; }

/* Kopfleisten-Menüs: "Dienste" und das Sitzungsmenü (Avatar + Vorname). */
.nav-menu { position: relative; flex: none; }
.nav-menu.active > .settings-button { background: var(--panel-active); color: var(--fox-dark); }
.caret { font-size: .7em; opacity: .75; }
.nav-dropdown { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; min-width: 225px; padding: 6px; display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-menu); }
.nav-dropdown-item { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 9px; color: var(--ink); font-weight: 600; font-size: .88rem; text-decoration: none; white-space: nowrap; width: 100%; text-align: left; }
.nav-dropdown-item:hover, .nav-dropdown-item:focus-visible { background: var(--panel-hover); color: var(--fox-dark); }
.nav-dropdown-item.active { background: var(--panel-active); color: var(--fox-dark); }
.nav-dropdown-item .icon32.x2 { width: 20px; height: 20px; }
.nav-dropdown-sep { margin: 5px 8px; border: 0; border-top: 1px solid var(--line); }

/* ── Google-style Waffle App Launcher (#servicesMenu) ────────────────────────── */
.waffle-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; }
.waffle-icon { flex: none; opacity: .88; transition: transform .15s ease, opacity .15s ease; vertical-align: middle; }
.waffle-toggle:hover .waffle-icon { opacity: 1; transform: scale(1.08); }

.nav-dropdown.app-launcher {
  width: 324px;
  max-width: calc(100vw - 20px);
  padding: 12px;
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.app-launcher-card {
  background: var(--panel-subtle);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px 10px 14px;
}

.app-launcher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 8px;
}
.app-launcher-head span {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .01em;
}
.app-launcher-edit {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
  text-decoration: none;
}
.app-launcher-edit:hover {
  background: var(--panel-hover);
  color: var(--ink);
}

.app-launcher-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 4px;
  margin-top: 4px;
}

.nav-dropdown.app-launcher .app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 7px;
  padding: 10px 4px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
  transition: background .12s ease, transform .12s ease;
}
.nav-dropdown.app-launcher .app-tile:hover,
.nav-dropdown.app-launcher .app-tile:focus-visible {
  background: var(--panel-hover);
  color: var(--fox-dark);
  transform: translateY(-2px);
}
.nav-dropdown.app-launcher .app-tile.active {
  background: var(--panel-active);
  color: var(--fox-dark);
}

.app-tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  font-size: 22px;
  transition: transform .14s ease, box-shadow .14s ease;
}
.nav-dropdown.app-launcher .app-tile:hover .app-tile-icon {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
}

.app-tile-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.app-tile-icon .code-symbol {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
  font-size: 20px;
  color: var(--fox);
}
.app-tile-icon.fox-icon {
  background: rgba(229, 122, 53, .12);
  border-color: rgba(229, 122, 53, .25);
}
.app-tile-icon.code-icon {
  background: rgba(244, 162, 109, .14);
  border-color: rgba(244, 162, 109, .25);
}
.app-tile-icon.vault-icon {
  background: rgba(184, 75, 20, .12);
  border-color: rgba(184, 75, 20, .25);
}
.app-tile-icon.todo-icon {
  background: rgba(46, 160, 67, .12);
  border-color: rgba(46, 160, 67, .25);
  color: #2ea043;
  font-weight: 800;
  font-size: 20px;
}
.app-tile-icon.calendar-icon {
  background: rgba(56, 139, 253, .12);
  border-color: rgba(56, 139, 253, .25);
}
.app-tile-icon.contacts-icon {
  background: rgba(163, 113, 247, .12);
  border-color: rgba(163, 113, 247, .25);
}
.app-tile-icon.mail-icon {
  background: rgba(235, 94, 40, .14);
  border-color: rgba(235, 94, 40, .28);
}
.app-tile-icon.admin-icon {
  background: rgba(145, 111, 91, .12);
  border-color: rgba(145, 111, 91, .25);
}

.app-tile-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-dropdown.app-launcher .app-launcher-external {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-dropdown.app-launcher .nav-dropdown-item.external {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: .84rem;
  justify-content: flex-start;
}
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--fox); color: white; font-size: .72rem; font-weight: 800; }
.session-button .session-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
/* Kompakte Kopfleiste (Einstellungen → Darstellung, localStorage foxdrop.compactNav) */
.compact-nav { --nav-h: 50px; }
.compact-nav .navbar { gap: 6px; padding: 3px 10px; height: 50px; min-height: 50px; }
.compact-nav .navbar .icon32 { width: 34px; height: 34px; }
.compact-nav .navbar .icon32.x2 { width: 24px; height: 24px; }
.compact-nav .navbar .settings-button { padding: 5px 8px; font-size: .88rem; }
.compact-nav .navbar .search input { padding: 6px 11px; }
.settings-button:hover { background: var(--panel-hover); }
.settings-button.active { background: var(--panel-active); color: var(--fox-dark); }
.settings-button.accent { background: var(--fox); color: white; }
.settings-button.accent:hover { background: var(--fox-hover); }

/* Kontextmenü für Kacheln und Space-Zeilen (Aktionen liegen darin) */
.context-menu { position: fixed; z-index: 100; min-width: 215px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-menu); animation: menuFadeIn .1s ease-out; }
@keyframes menuFadeIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.context-menu button { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 9px 12px; color: var(--ink); background: transparent; text-align: left; font-weight: 500; font-size: .88rem; border-radius: 8px; }
.context-menu button[data-shortcut]::after { content: attr(data-shortcut); font-size: .74rem; color: var(--muted); font-family: ui-monospace, SFMono-Regular, monospace; opacity: .85; }
.context-menu button:hover { color: var(--fox-dark); background: var(--panel-hover); }
.context-menu button[hidden] { display: none; }
/* Destruktive Einträge sichtbar absetzen, damit „Löschen“ nie wie ein
   gewöhnlicher Eintrag wirkt. */
.context-menu button.danger { color: var(--danger); }
.context-menu button.danger:hover { color: var(--danger); background: var(--danger-bg); }
.context-menu hr { margin: 5px 8px; border: 0; border-top: 1px solid var(--line); }

/* Auslöser für das Space-Menü (rechts daneben tut es auch ein Rechtsklick) */
.space-menu-trigger { flex: none; padding: 3px 6px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 800; line-height: 1; }
.space-menu-trigger:hover, .space-item:hover .space-menu-trigger, .space-row:hover .space-menu-trigger,
.space-item.active .space-menu-trigger, .space-row.active .space-menu-trigger { background: var(--fox-soft); color: var(--fox-dark); }

/* Space-Liste: in Dateien und Code identisch (randlos) */
.spaces-menu, .spaces { padding: 12px; background: none; border: 0; border-radius: 0; box-shadow: none; text-align: left; }
.spaces-head, .spaces h3 { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 6px 10px; margin: 0; color: var(--fox-dark); font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.spaces-head button, .spaces h3 button { padding: 3px 9px; border-radius: 8px; font-size: .8rem; }
.space-item, .spaces .space-row { display: flex; align-items: center; gap: 5px; border-radius: 9px; padding: 2px 4px; transition: background-color .12s ease; }
.space-item.active, .spaces .space-row.active { background: var(--panel-active); }
.space-item button.space-name, .spaces .space-row button.name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; padding: 7px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-weight: 600; font-size: .86rem; }
.space-item .space-count, .spaces .count { color: var(--muted); font-size: .72rem; }
.space-item.drop-target, .spaces .space-row.drop-target { background: var(--panel-active); outline: 2px dashed var(--fox); border-radius: 9px; }
/* Trennt die eigenen Spaces vom öffentlichen Bereich. */
.space-sep { margin: 8px 6px 6px; border-top: 1px solid var(--line); }
.spaces .hint { color: var(--muted); font-size: .72rem; margin-top: 10px; }

/* Repository-Kopf mit KI-Titel und -Beschreibung */
.repo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-alt); text-align: left; }
.repo-head strong { font-size: .95rem; }
.repo-head p { margin: 4px 0 0; font-size: .84rem; }
.repo-head button { flex: none; padding: 7px 11px; border-radius: 9px; background: var(--fox-soft); color: var(--fox-dark); font-size: .8rem; font-weight: 700; }
.repo-head[hidden] { display: none; }

/* Gummiband-Auswahl über den Dateien (Drag auf leerer Fläche) */
.marquee { position: fixed; z-index: 60; border: 1px solid var(--fox); background: rgba(220, 114, 46, .14); border-radius: 4px; pointer-events: none; }

/* Auswahlleiste sitzt in der Kopfzeile und darf das Raster nicht verschieben */
.file-toolbar.selection-active .breadcrumbs, .file-toolbar.selection-active .file-controls { display: none; }
.sectionbar.selection-active .controls { display: none; }
.file-toolbar .selection-bar, .sectionbar .selection-bar { flex: 1 1 auto; min-width: 0; }
.file-toolbar .selection-bar > *, .sectionbar .selection-bar > * { flex: 0 0 auto; white-space: nowrap; }
.file-toolbar .selection-bar, .sectionbar .selection-bar { padding: 0; gap: 6px; border: 0; background: none; margin: 0; flex-wrap: nowrap; overflow: hidden; min-width: 0; }
.file-toolbar .selection-bar strong, .sectionbar .selection-bar strong { font-size: .8rem; white-space: nowrap; }
.file-toolbar .selection-bar button, .sectionbar .selection-bar button { padding: 5px 9px; font-size: .78rem; }
.file-toolbar .selection-bar select, .sectionbar .selection-bar select { padding: 5px 8px; font-size: .78rem; max-width: 180px; }

/* Auswahlleiste für Mehrfachauswahl (Dateien und Code) */
.selection-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-hover); }
.selection-bar strong { color: var(--fox-dark); font-size: .86rem; }
.selection-bar button { padding: 7px 11px; border-radius: 9px; background: var(--fox-soft); color: var(--fox-dark); font-size: .82rem; font-weight: 700; }
.selection-bar button:hover { background: var(--fox-soft-hover); }
.selection-bar button.danger { background: var(--danger-bg); color: var(--danger); }
.selection-bar select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); font: inherit; font-size: .82rem; max-width: 220px; }

@media (max-width: 760px) {
  .navbar, .compact-nav .navbar {
    position: static;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    min-height: 0;
  }
  .brand span { display: none; }
  .search {
    flex: 1 1 100%;
    min-width: 180px;
    max-width: none;
    margin: 0;
    order: 10;
  }
  .nav-right {
    flex-wrap: wrap;
    margin-left: auto;
    justify-content: flex-end;
  }
  .spaces-menu #spaces-list { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .spaces-menu .space-sep, .spaces-menu .spaces-hint { display: none; }
  .space-item { flex: 0 0 auto; background: var(--panel); border: 1px solid var(--line); padding: 2px 8px; }
}

/* Freigabe- und Link-Zeilen im Teilen-Dialog */
.share-grant { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: .84rem; }
.share-grant span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.share-grant button { flex: none; padding: 5px 9px; border-radius: 8px; background: var(--fox-soft); color: var(--fox-dark); font-size: .78rem; font-weight: 700; }
.share-grant button:hover { background: var(--fox-soft-hover); }

/* Einheitliche Dialog- und Modal-Basis (verhindert transparente Hintergründe und falsche Kontraste) */
dialog, .modal-dialog {
  background: var(--panel) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line-strong) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
dialog h1, dialog h2, dialog h3, dialog h4,
.modal-dialog h1, .modal-dialog h2, .modal-dialog h3, .modal-dialog h4 {
  color: var(--ink) !important;
}
dialog label, .modal-dialog label {
  color: var(--ink) !important;
}
dialog .muted, .modal-dialog .muted,
dialog small, .modal-dialog small {
  color: var(--muted) !important;
}
dialog input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
dialog select, dialog textarea,
.modal-dialog input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.modal-dialog select, .modal-dialog textarea {
  background: var(--panel-alt) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
}
dialog::backdrop, .modal-backdrop {
  background: var(--backdrop, rgba(14, 10, 8, .72)) !important;
  backdrop-filter: blur(5px);
}

.space-group-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--fox-soft);
  color: var(--fox-dark);
  margin-left: 6px;
  vertical-align: middle;
}
html[data-theme="dark"] .space-group-pill {
  background: #352922;
  color: #f4a26d;
}

/* Passwort-/Secret- & Prompt-Dialog (FoxUI.askSecret, FoxUI.promptDialog) */
.secret-dialog { width: min(440px, calc(100vw - 34px)); margin: auto; border: 1px solid var(--line-strong);
  border-radius: 20px; padding: 24px; background: var(--panel); color: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.secret-dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(4px); }
.secret-dialog h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--ink); }
.secret-dialog .muted { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; line-height: 1.4; }
.secret-dialog label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin: 16px 0 6px 2px; }
.secret-dialog input { box-sizing: border-box; width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-alt); color: var(--ink); font: inherit; font-size: 14px; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.secret-dialog input:focus { border-color: var(--fox); box-shadow: 0 0 0 3px rgba(220, 114, 46, .18); background: var(--panel); }
.secret-dialog .status { min-height: 1.2em; margin: 8px 0 0; color: var(--fox-dark); font-size: 13px; }
.secret-dialog .editor-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.secret-dialog .editor-actions button { border: 1px solid transparent; border-radius: 11px; padding: 9px 18px;
  font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; transition: all .14s ease; }
.secret-dialog .editor-actions .soft { background: var(--panel2); color: var(--ink); border-color: var(--line); }
.secret-dialog .editor-actions .soft:hover { background: var(--panel-hover); }
.secret-dialog .editor-actions .primary { background: var(--fox); color: #fff; box-shadow: 0 4px 14px rgba(220, 114, 46, .28); }
.secret-dialog .editor-actions .primary:hover { background: var(--fox-hover); }

/* Toast-Benachrichtigungen (FoxUI.toast) */
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 36px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 15px; border-radius: 13px; background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--shadow-menu); font-size: .86rem; font-weight: 600; animation: toastSlideIn .18s cubic-bezier(.16, 1, .3, 1); }
.toast.toast-ok { border-left: 4px solid var(--ok); }
.toast.toast-warn { border-left: 4px solid var(--warn); }
.toast.toast-error { border-left: 4px solid var(--danger); color: var(--danger); }
.toast button { flex: none; padding: 2px 6px; border-radius: 6px; color: var(--muted); font-size: .9rem; }
.toast button:hover { background: var(--panel-hover); color: var(--ink); }
@keyframes toastSlideIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Tastenkürzel-Hilfe (Taste ?) */
.shortcuts-dialog { width: min(540px, calc(100vw - 32px)); margin: auto; border: 1px solid var(--line); border-radius: 18px; padding: 22px; background: var(--panel-alt); color: var(--ink); box-shadow: var(--shadow-menu); }
.shortcuts-dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(3px); }
.shortcuts-dialog h2 { margin: 0 0 12px; font-size: 1.15rem; display: flex; align-items: center; justify-content: space-between; }
.shortcuts-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; align-items: center; font-size: .86rem; margin: 0 0 16px; }
.shortcuts-list dt { display: flex; gap: 4px; justify-content: flex-end; }
.shortcuts-list dd { margin: 0; color: var(--muted); }
kbd { display: inline-block; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--panel-subtle); color: var(--ink); font: 700 .75rem/1.1 ui-monospace, SFMono-Regular, monospace; box-shadow: 0 1px 0 var(--line); }

/* Einheitlicher Fokus-Ring für Tastaturnutzung. Die Seiten bringen eigene
   Paletten mit, deshalb feste Farbe; Felder behalten ihre eigenen Stile. */
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible,
[tabindex]:focus-visible { outline: 3px solid rgba(233,111,38,.55); outline-offset: 2px; }
