/* ─── Æther Notizen · Webapp · Design gespiegelt aus der Android-App ─── */
:root {
  --obsidian:      #131315;
  --surface-low:   #1A1A1E;
  --surface-mid:   #222226;
  --surface-high:  #353437;
  --primary:       #2962FF;
  --primary-light: #B6C4FF;
  --gold:          #FFC61F;
  --on-surface:    #E5E1E4;
  --on-variant:    #928F96;
  --danger:        #CC3A3A;
  --success:       #69D277;
  --radius:        16px;
  --shadow:        0 8px 30px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--obsidian);
  color: var(--on-surface);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.brand-name { font-family: "Manrope", sans-serif; font-weight: 800; letter-spacing: .5px; }
.view { min-height: 100dvh; }
[hidden] { display: none !important; }

/* ─── Login ─── */
.login-view { display: grid; place-items: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface-low);
  border: 1px solid var(--surface-high);
  border-radius: 20px; padding: 34px 28px;
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.brand-logo { border-radius: 50%; }
.brand-name { font-size: 30px; margin: 0; }
.login-sub { color: var(--on-variant); margin: 2px 0 22px; font-size: 14px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 13px; color: var(--on-variant); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; font-size: 15px;
  background: var(--surface-mid); color: var(--on-surface);
  border: 1px solid var(--surface-high); border-radius: 12px; outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: var(--primary); }

.btn { font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; border: none; border-radius: 12px; transition: filter .15s, background .15s; }
.btn-primary { width: 100%; padding: 13px; background: var(--primary); color: #fff; margin-top: 6px; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: transparent; color: var(--on-variant); padding: 8px 12px; }
.btn-ghost:hover { color: var(--on-surface); background: var(--surface-mid); }
.error-msg { color: var(--danger); font-size: 14px; margin: 14px 0 0; text-align: center; }
.login-info { color: var(--on-variant); font-size: 14px; margin: 14px 0 0; text-align: center; }
.code-resend { display: block; width: 100%; margin-top: 10px; }
#code-input { letter-spacing: .3em; font-size: 22px; text-align: center; }
.auth-switch a { color: var(--on-variant); text-decoration: underline; text-underline-offset: 3px; }
.auth-switch a:hover { color: var(--on-surface); }

/* ─── Topbar ─── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; background: rgba(19,19,21,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-mid);
}
.topbar-brand { display: flex; align-items: center; gap: 9px; }
.topbar-brand img { border-radius: 50%; }
.topbar-brand .brand-name { font-size: 20px; }
.search-wrap { flex: 1; max-width: 520px; margin: 0 auto; }
#search {
  width: 100%; padding: 10px 16px; font-size: 14px;
  background: var(--surface-mid); color: var(--on-surface);
  border: 1px solid transparent; border-radius: 22px; outline: none;
}
#search:focus { border-color: var(--surface-high); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-badge {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #7C4DFF);
  color: #fff; font-weight: 700; font-size: 14px;
  display: grid; place-items: center; text-transform: uppercase;
}
/* Profil-Icon als Knopf + Konto-Menü (Export / Einstellungen / Abmelden) */
.profile-wrap { position: relative; }
.profile-btn {
  border: 2px solid transparent; cursor: pointer; padding: 0; font-family: inherit;
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.profile-btn:hover, .profile-btn[aria-expanded="true"] {
  border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(41,98,255,.25);
}
.profile-btn:active { transform: scale(.95); }
.profile-menu {
  position: absolute; top: 44px; right: 0; z-index: 60;
  min-width: 230px; max-width: 86vw;
  background: var(--surface-mid); border: 1px solid var(--surface-high);
  border-radius: 14px; padding: 6px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 2px;
  animation: pop-in .12s ease;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.profile-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--surface-high); margin-bottom: 4px; }
.profile-name { display: block; font-weight: 600; font-size: 14px; color: var(--on-surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-email { display: block; font-size: 12px; color: var(--on-variant); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: none; color: var(--on-surface); cursor: pointer;
  font-family: inherit; font-size: 14px; padding: 10px 12px; border-radius: 10px;
  transition: background .12s;
}
.menu-item svg { color: var(--on-variant); flex: none; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-high); outline: none; }
.menu-item:hover svg { color: var(--on-surface); }
#logout-btn:hover { color: #ff8a80; }
#logout-btn:hover svg { color: #ff8a80; }

/* ─── Dialog (Einstellungen) ─── */
.dialog {
  width: 100%; max-width: 520px; max-height: 90dvh; overflow-y: auto;
  background: var(--surface-low); border: 1px solid var(--surface-high);
  border-radius: 20px; box-shadow: var(--shadow);
  padding: 12px 20px 22px;
}
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dialog-head h2 { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 20px; margin: 0 0 0 4px; }
.settings-section { padding: 14px 4px 6px; border-top: 1px solid var(--surface-mid); }
.settings-section:first-of-type { border-top: none; }
.settings-section h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: var(--on-variant); }
.settings-hint { margin: -4px 0 12px; font-size: 13px; color: var(--on-variant); }
/* Segment-Auswahl (Kachelgröße) */
.seg { display: inline-flex; background: var(--surface-mid); border: 1px solid var(--surface-high); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button {
  background: none; border: none; color: var(--on-variant); cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 500; padding: 8px 16px; border-radius: 9px;
  transition: background .12s, color .12s;
}
.seg button:hover { color: var(--on-surface); }
.seg button[aria-checked="true"] { background: var(--primary); color: #fff; font-weight: 600; }
/* Papierkorb-Liste */
.trash-list { display: flex; flex-direction: column; gap: 6px; max-height: 42dvh; overflow-y: auto; }
.trash-empty { color: var(--on-variant); font-size: 14px; padding: 12px 4px; }
.trash-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-mid); border: 1px solid transparent; border-radius: 12px; padding: 10px 12px;
}
.trash-item:hover { border-color: var(--surface-high); }
.trash-info { flex: 1; min-width: 0; }
.trash-title { display: block; font-size: 14px; font-weight: 500; color: var(--on-surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-date { display: block; font-size: 12px; color: var(--on-variant); margin-top: 2px; }
.trash-actions { display: flex; gap: 4px; flex: none; }
.trash-actions .icon-btn { width: 38px; height: 38px; }
.trash-actions .icon-btn.restore:hover { color: var(--success); }
.trash-actions .icon-btn:disabled { opacity: .5; cursor: default; }

/* ─── Notes ─── */
.notes-wrap { padding: 22px 20px 120px; max-width: 1180px; margin: 0 auto; }
.notes-status { color: var(--on-variant); font-size: 14px; padding: 30px 4px; text-align: center; }
.notes-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
/* Kachelgröße aus den Einstellungen (localStorage aether_tile_size) */
.notes-grid.size-small { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.notes-grid.size-large { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.notes-grid.size-small .note-card { min-height: 130px; max-height: 300px; padding: 12px 12px 10px; }
.notes-grid.size-small .note-card .note-body { -webkit-line-clamp: 8; font-size: 13px; }
.notes-grid.size-large .note-card { min-height: 220px; max-height: 480px; }
.notes-grid.size-large .note-card .note-body { -webkit-line-clamp: 16; }
.note-card {
  background: var(--surface-low);
  border: 1px solid var(--surface-mid);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 180px; max-height: 400px;
  /* Der Rand bleibt 1 px; beim Überfahren wird er 2 px stark. Damit die Karte
     dabei nicht um einen Pixel wächst, kommt die zweite Hälfte als Schatten
     nach innen statt als echter Rand. */
  transition: border-color .15s, box-shadow .15s, transform .08s;
  /* Die ganze Karte ist Griff (siehe app.js): keine Textauswahl beim Ziehen,
     kein Long-Press-Callout auf iOS. touch-action bleibt normal, damit über
     den Karten weiter gescrollt werden kann (Touch-Drag = kurz halten). */
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.note-card:hover {
  border-color: var(--surface-high);
  box-shadow: inset 0 0 0 1px var(--surface-high);
}
.note-card:active { transform: scale(.99); }
.note-card .note-title {
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 16px;
  margin: 0; color: var(--on-surface);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.note-card .note-body {
  font-size: 14px; line-height: 1.5; color: var(--on-variant); white-space: pre-wrap;
  display: -webkit-box; -webkit-line-clamp: 13; -webkit-box-orient: vertical; overflow: hidden;
}
.note-card .note-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.note-card .note-date { font-size: 12px; color: var(--on-variant); opacity: .8; }
.pin-badge { color: var(--gold); margin-left: auto; }
.lock-badge { color: var(--on-variant); }
/* Rechtsbündige Icon-Gruppe im Karten-Fuß (Schloss, Pin, Greif-Punkt). */
.foot-right { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.foot-right .pin-badge { margin-left: 0; }
/* Greif-Punkt zum Verschieben: touch-action none NUR hier, damit das normale
   Scrollen über der Karte weiter funktioniert. */
.drag-handle {
  padding: 2px 6px; border-radius: 6px;
  color: var(--on-variant); opacity: .55; font-size: 15px; line-height: 1;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.note-card:hover .drag-handle { opacity: 1; }
.drag-handle:active { cursor: grabbing; color: var(--on-surface); }
/* Gezogene Karte „schwebt" — Position/Skalierung setzt JS per transform (Cursor-Folge);
   das Gleiten der weichenden Karten läuft über die Web-Animations-API (siehe app.js). */
.note-card.dragging {
  opacity: .92;
  border-color: var(--primary);
  box-shadow: 0 14px 40px rgba(41,98,255,.45);
  cursor: grabbing;
  will-change: transform;
}
/* ─── Mehrfachauswahl ─── */
.select-toggle { width: 34px; height: 34px; border-radius: 12px; border: 1px solid var(--surface-high); background: var(--surface-mid); }
.select-toggle[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.selection-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--primary) 16%, var(--surface-low));
  border: 1px solid color-mix(in srgb, var(--primary-light) 30%, transparent);
  border-radius: 14px; padding: 10px 14px; margin: -4px 0 14px;
  animation: pop-in .14s ease;
}
.selection-count { font-weight: 600; font-size: 14px; flex: 1; }
.selection-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sel-btn { padding: 8px 14px; font-size: 13px; width: auto; margin: 0; }
.note-card.selected { border-color: var(--primary-light); box-shadow: 0 0 0 2px var(--primary-light) inset; }
.note-check {
  position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--on-variant); background: rgba(19,19,21,.6);
  display: grid; place-items: center; color: transparent;
}
.note-card { position: relative; }
.note-card.selected .note-check { background: var(--primary); border-color: var(--primary); color: #fff; }
body.selecting .note-card { cursor: pointer; }

/* ⋯-Knopf auf der Notizkarte (Ordner-Menü) */
.card-menu-btn {
  background: none; border: none; color: var(--on-variant); cursor: pointer;
  width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
  opacity: .55; transition: opacity .12s, background .12s, color .12s; flex: none; padding: 0;
}
.card-menu-btn svg { display: block; }
.note-card:hover .card-menu-btn { opacity: 1; }
.card-menu-btn:hover { background: var(--surface-high); color: var(--on-surface); }
/* Links in Notizen (Karte und Editor) */
.markdown a, .note-body a {
  color: var(--primary-light); text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer; word-break: break-word;
}
.markdown a:hover, .note-body a:hover { color: #fff; }
.editor-content a { cursor: text; }
.editor-content a:hover { color: #fff; }
.empty-hint { color: var(--on-variant); text-align: center; padding: 60px 20px; font-size: 15px; }

/* ─── FAB (Plus-Knopf, 20 % kleiner als früher) ─── */
.fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 20;
  width: 48px; height: 48px; border-radius: 16px; border: none; cursor: pointer;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(41,98,255,.45);
  transition: filter .15s, box-shadow .15s, transform .1s;
}
/* Hover wie beim Profil-Icon und „Neuer Ordner": heller Ring statt nur heller. */
.fab:hover {
  filter: brightness(1.1);
  box-shadow: 0 10px 30px rgba(41,98,255,.45), 0 0 0 3px rgba(182,196,255,.35);
}
.fab:active { transform: scale(.94); }

/* ─── Editor ─── */
.editor-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.55); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
}
.editor {
  width: 100%; max-width: 720px; max-height: 90dvh;
  background: var(--surface-low); border: 1px solid var(--surface-high);
  border-radius: 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; padding: 12px 20px 18px;
}
.editor-head { display: flex; align-items: center; justify-content: space-between; }
.editor-head-actions { display: flex; gap: 4px; }
.icon-btn {
  background: transparent; border: none; color: var(--on-variant); cursor: pointer;
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-mid); color: var(--on-surface); }
.icon-btn-danger:hover { color: var(--danger); }
.icon-btn.pinned { color: var(--gold); }
.editor-title {
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 22px;
  background: transparent; border: none; outline: none; color: var(--on-surface);
  padding: 10px 6px 6px; width: 100%;
}
.editor-content {
  flex: 1; min-height: 260px; max-height: 62dvh; overflow-y: auto;
  background: transparent; border: none; outline: none;
  color: var(--on-surface); font-family: "Inter", sans-serif; font-size: 16px; line-height: 1.6;
  padding: 6px; width: 100%; cursor: text;
}
.editor-content:empty:before {
  content: attr(data-placeholder);
  color: var(--on-variant); pointer-events: none;
}
/* Scrollbalken in der Notiz im Farbverlauf des Profil-Icons. */
.editor, .editor-content, .editor-read {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
.editor::-webkit-scrollbar,
.editor-content::-webkit-scrollbar,
.editor-read::-webkit-scrollbar { width: 10px; }
.editor::-webkit-scrollbar-track,
.editor-content::-webkit-scrollbar-track,
.editor-read::-webkit-scrollbar-track { background: transparent; }
.editor::-webkit-scrollbar-thumb,
.editor-content::-webkit-scrollbar-thumb,
.editor-read::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background-image: linear-gradient(135deg, var(--primary), #7C4DFF);
  border: 2px solid transparent;
  background-clip: padding-box;
}
.editor::-webkit-scrollbar-thumb:hover,
.editor-content::-webkit-scrollbar-thumb:hover,
.editor-read::-webkit-scrollbar-thumb:hover {
  background-image: linear-gradient(135deg, var(--primary-light), #7C4DFF);
}
.fmt-btn { font-size: 17px; font-family: "Manrope", sans-serif; }
.fmt-btn strong { font-weight: 800; }
.head-sep { width: 1px; height: 22px; background: var(--surface-high); margin: 0 4px; }
/* Leseansicht (gerendertes Markdown) */
.editor-read { padding: 8px 6px 6px; overflow-y: auto; }
.editor-read-title {
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 22px;
  color: var(--on-surface); margin: 4px 0 12px;
}
.editor-read-content { font-size: 16px; line-height: 1.6; color: var(--on-surface); }

/* Markdown-Rendering – gespiegelt aus MarkdownVisualTransformation der App:
   **fett**, *kursiv*, @mentions farbig; # bleibt Text. Zeilenumbrüche erhalten. */
.markdown { white-space: pre-wrap; word-break: break-word; }
.markdown strong { font-weight: 700; color: var(--on-surface); }
.markdown em { font-style: italic; }
.markdown .mention { color: var(--primary-light); font-weight: 500; }
.note-body.markdown strong { font-weight: 700; }

.editor-locked {
  background: var(--surface-mid); border: 1px solid var(--surface-high);
  border-radius: 12px; padding: 14px; color: var(--on-variant); font-size: 14px; line-height: 1.5; margin: 6px;
}
.editor-foot { padding: 4px 6px 0; }
#editor-meta { font-size: 12px; color: var(--on-variant); }

/* ─── Toast ─── */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: var(--surface-high); color: var(--on-surface);
  padding: 12px 20px; border-radius: 12px; font-size: 14px; z-index: 100;
  box-shadow: var(--shadow); animation: toast-in .2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ─── Notiz-Farben (nur Webapp; --nc = gewählte Farbe) ─── */
.note-card.colored {
  background: color-mix(in srgb, var(--nc) 14%, var(--surface-low));
  border-color: color-mix(in srgb, var(--nc) 45%, var(--surface-mid));
}
.note-card.colored:hover { border-color: color-mix(in srgb, var(--nc) 75%, var(--surface-mid)); }
.editor.colored { background: color-mix(in srgb, var(--nc) 10%, var(--surface-low)); }
.icon-btn.has-color { color: var(--nc); }

.editor-head-actions { position: relative; }
.color-pop {
  position: absolute; top: 48px; right: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(5, 34px); gap: 10px;
  background: var(--surface-mid); border: 1px solid var(--surface-high);
  border-radius: 14px; padding: 12px; box-shadow: var(--shadow);
}
.swatch {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 2px solid rgba(255,255,255,.15);
  background: var(--sw, var(--surface-high));
  transition: transform .1s, border-color .15s;
}
.swatch.none { background: var(--surface-low); color: var(--on-variant); font-size: 14px; line-height: 1; }
.swatch:hover { transform: scale(1.1); }
.swatch.active { border-color: #fff; }

/* ─── Auth-Umschalter (Login ↔ Registrieren) ─── */
.auth-switch { text-align: center; margin: 16px 0 0; }
.link-btn {
  background: none; border: none; color: var(--primary-light);
  cursor: pointer; font-size: 14px; font-family: inherit; padding: 4px;
}
.link-btn:hover { text-decoration: underline; }

/* ─── Teilen ─── */
.share-badge {
  font-size: 12px; color: var(--primary-light);
  background: rgba(41,98,255,.14); padding: 2px 8px; border-radius: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%;
}
.icon-btn.has-shares { color: var(--primary-light); }
.share-pop {
  position: absolute; top: 48px; right: 0; z-index: 60;
  width: 320px; max-width: 86vw;
  background: var(--surface-mid); border: 1px solid var(--surface-high);
  border-radius: 14px; padding: 14px; box-shadow: var(--shadow); text-align: left;
}
.share-pop h4 { margin: 0 0 10px; font-size: 14px; color: var(--on-surface); }
.share-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.share-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-high); border-radius: 20px;
  padding: 4px 10px; font-size: 13px; color: var(--on-surface);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.share-chip button {
  background: none; border: none; color: var(--on-variant);
  cursor: pointer; font-size: 13px; padding: 0; line-height: 1;
}
.share-chip button:hover { color: var(--danger); }
.share-empty { color: var(--on-variant); font-size: 13px; margin: 0 0 10px; }
.share-add { display: flex; gap: 8px; }
.share-add input {
  flex: 1; min-width: 0; padding: 9px 12px; font-size: 14px;
  background: var(--surface-low); color: var(--on-surface);
  border: 1px solid var(--surface-high); border-radius: 10px; outline: none;
}
.share-add input:focus { border-color: var(--primary); }
.share-add .btn { padding: 0 14px; background: var(--primary); color: #fff; border-radius: 10px; font-size: 14px; }
.share-suggest { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; max-height: 180px; overflow-y: auto; }
.share-suggest button {
  text-align: left; background: none; border: none; color: var(--on-surface);
  font-size: 13px; padding: 7px 8px; border-radius: 8px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.share-suggest button:hover { background: var(--surface-high); }
.share-suggest .s-name { color: var(--on-variant); margin-left: 6px; }
.share-hint { color: var(--on-variant); font-size: 12px; margin: 10px 0 0; line-height: 1.4; }

/* ─── PIN-Entsperren gesperrter Notizen ─── */
.unlock-form { display: flex; gap: 8px; margin-top: 12px; }
.unlock-form input {
  flex: 1; max-width: 160px; padding: 9px 12px; font-size: 15px; letter-spacing: 3px;
  background: var(--surface-low); color: var(--on-surface);
  border: 1px solid var(--surface-high); border-radius: 10px; outline: none;
}
.unlock-form input:focus { border-color: var(--primary); }
.unlock-form .btn { padding: 0 16px; background: var(--primary); color: #fff; border-radius: 10px; font-size: 14px; }
.unlock-error { color: var(--danger); font-size: 13px; margin: 8px 0 0; }

/* ─── @-Mention-Autocomplete ─── */
.editor { position: relative; }
.mention-pop {
  position: absolute; z-index: 70;
  min-width: 220px; max-width: 290px; max-height: 220px; overflow-y: auto;
  background: var(--surface-mid); border: 1px solid var(--surface-high);
  border-radius: 12px; padding: 6px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 2px;
}
.mention-pop button {
  text-align: left; background: none; border: none; color: var(--on-surface);
  font-size: 13px; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mention-pop button:hover, .mention-pop button.active { background: var(--surface-high); }
.mention-pop .s-name { color: var(--on-variant); margin-left: 6px; }

/* ─── Werkzeugleiste: Ordnerpfad, Sortierung, Ansicht (seit 2026-09-27) ─── */
.view-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: -6px 0 16px; padding: 0 2px;
}
.crumbs { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; }
.crumb-back {
  background: var(--surface-mid); border: 1px solid var(--surface-high); color: var(--on-variant);
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; cursor: pointer;
  flex: none; transition: color .12s, background .12s;
}
.crumb-back:hover { color: var(--on-surface); background: var(--surface-high); }
.crumb-icon { color: var(--primary-light); flex: none; }
.crumb-label {
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 15px; color: var(--on-surface);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: min(46vw, 420px);
}
.crumb-count { font-size: 13px; color: var(--on-variant); flex: none; }
.crumb-menu { width: 30px; height: 30px; border-radius: 10px; flex: none; }
.toolbar-right { display: flex; align-items: center; gap: 10px; flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-mid); border: 1px solid var(--surface-high); color: var(--on-surface);
  font-family: inherit; font-size: 13px; font-weight: 500;
  padding: 7px 12px; border-radius: 12px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.chip svg { color: var(--on-variant); flex: none; }
.chip:hover { border-color: var(--primary-light); }
.sort-wrap { position: relative; }
/* Ansichts-Umschalter: Statt die Füllung hart umzuschalten, gleitet ein
   Indikator („Thumb") unter den aktiven Knopf – eine weiche Easing-Kurve
   (ease-out) lässt ihn zügig starten und sanft ankommen. */
.view-seg { padding: 2px; border-radius: 12px; position: relative; }
.view-seg::before {
  content: ""; position: absolute; top: 2px; bottom: 2px; left: 2px;
  width: calc((100% - 6px) / 2);
  border-radius: 10px; background: var(--primary);
  transform: translateX(calc(var(--seg-pos, 0) * (100% + 2px)));
  transition: transform .26s cubic-bezier(.22, .61, .36, 1);
}
.view-seg button {
  padding: 7px 11px; border-radius: 10px; display: grid; place-items: center;
  position: relative; z-index: 1;
  transition: color .2s ease;
}
/* Die Füllung übernimmt der gleitende Indikator. */
.view-seg button[aria-checked="true"] { background: none; color: #fff; }
.view-seg button svg { display: block; }
@media (prefers-reduced-motion: reduce) {
  .view-seg::before { transition: none; }
}

/* Aufklapp-Menü (Sortierung, Karten-Menü) */
.pop-menu {
  position: absolute; z-index: 70; min-width: 216px; max-width: 90vw;
  background: var(--surface-mid); border: 1px solid var(--surface-high);
  border-radius: 14px; padding: 6px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 2px;
  animation: pop-in .12s ease;
}
#sort-menu { top: 40px; right: 0; }
#card-menu { position: fixed; }
.pop-head {
  font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  color: var(--on-variant); padding: 8px 12px 4px;
}
.pop-sep { height: 1px; background: var(--surface-high); margin: 5px 4px; }
.pop-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; color: var(--on-surface); cursor: pointer;
  font-family: inherit; font-size: 14px; padding: 9px 12px; border-radius: 10px;
  transition: background .12s;
}
.pop-item:hover, .pop-item:focus-visible { background: var(--surface-high); outline: none; }
.pop-item .tick { margin-left: auto; color: var(--primary-light); opacity: 0; flex: none; }
.pop-item[aria-checked="true"] { color: var(--on-surface); }
.pop-item[aria-checked="true"] .tick { opacity: 1; }
.pop-item.danger:hover { color: #ff8a80; }

/* ─── Listenansicht ─── */
.notes-grid.view-list { grid-template-columns: 1fr; gap: 8px; }
.notes-grid.view-list .note-card {
  min-height: 0; max-height: none;
  flex-direction: row; align-items: center; gap: 14px;
  padding: 12px 16px;
}
.notes-grid.view-list .note-card .note-title {
  -webkit-line-clamp: 1; flex: none; width: min(34%, 280px); font-size: 15px;
}
.notes-grid.view-list .note-card .note-body {
  -webkit-line-clamp: 1; flex: 1; min-width: 0; font-size: 13px; white-space: nowrap;
}
.notes-grid.view-list .note-card .note-foot { margin-top: 0; padding-top: 0; flex: none; }
.notes-grid.view-list .note-card .note-title:empty { display: none; }

/* ─── Dialog „In Ordner verschieben" + Eingabe-Dialog ─── */
.dialog-narrow { max-width: 420px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.dialog-actions .btn { width: auto; padding: 10px 18px; margin: 0; }
.move-search, .prompt-input {
  width: 100%; padding: 11px 13px; font-size: 15px; margin: 4px 0 12px;
  background: var(--surface-mid); color: var(--on-surface);
  border: 1px solid var(--surface-high); border-radius: 12px; outline: none;
  font-family: inherit; transition: border-color .15s;
}
.move-search:focus, .prompt-input:focus { border-color: var(--primary); }
.move-list { display: flex; flex-direction: column; gap: 4px; max-height: 46dvh; overflow-y: auto; }
.move-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface-mid); border: 1px solid transparent; color: var(--on-surface);
  font-family: inherit; font-size: 14px; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.move-item:hover { border-color: var(--primary-light); }
.move-item svg { color: var(--on-variant); flex: none; }
.move-item[aria-checked="true"] { border-color: var(--primary-light); }
.move-item[aria-checked="true"] .tick { color: var(--primary-light); margin-left: auto; }
.move-item .tick { margin-left: auto; opacity: 0; }
.move-item[aria-checked="true"] .tick { opacity: 1; }
.move-item .move-count { margin-left: auto; font-size: 12px; color: var(--on-variant); }
.move-item[aria-checked="true"] .move-count { margin-left: 0; }
.move-new { width: 100%; margin-top: 12px; padding: 11px; }
.move-empty { color: var(--on-variant); font-size: 14px; padding: 14px 4px; }

/* ─── Ordner-Leiste links (seit 2026-09-27, Fassung 2) ────────────────────
 * Fährt per transform sanft ein/aus; der Notizbereich rückt auf großen
 * Schirmen mit (padding-left), auf kleinen legt sich die Leiste darüber. */
.sidebar-toggle { flex: none; }
.sidebar {
  position: fixed; left: 0; top: var(--topbar-h, 66px); bottom: 0; z-index: 30;
  width: 264px; max-width: 82vw;
  background: var(--surface-low); border-right: 1px solid var(--surface-mid);
  display: flex; flex-direction: column; gap: 4px; padding: 14px 10px 14px 12px;
  transform: translateX(-102%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
.sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.35); }
.sidebar-head { display: flex; align-items: center; gap: 8px; padding: 0 6px 8px; }
.sidebar-title {
  font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  color: var(--on-variant); flex: 1;
}
.sidebar-sort { width: 30px; height: 30px; border-radius: 9px; }
#folder-sort-menu { top: 34px; right: 0; min-width: 190px; }
.folder-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; }
.side-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: 1px solid transparent; color: var(--on-surface); cursor: pointer;
  font-family: inherit; font-size: 14px; padding: 9px 10px; border-radius: 10px;
  transition: background .12s, border-color .12s, color .12s;
}
.side-item svg { color: var(--on-variant); flex: none; }
.side-item .side-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item .side-count { font-size: 12px; color: var(--on-variant); flex: none; }
.side-item .side-shared { font-size: 12px; flex: none; opacity: .85; }
.side-item:hover { background: var(--surface-mid); }
.side-item.active { background: var(--surface-mid); color: var(--on-surface); }
.side-item.active svg { color: var(--primary-light); }
.side-item.active .side-name { font-weight: 600; }
/* Ziel beim Ziehen einer Notiz auf einen Ordner */
.side-item.drop-target {
  border-color: var(--primary-light); background: color-mix(in srgb, var(--primary) 22%, var(--surface-low));
  color: #fff;
}
.side-item.drop-target svg, .side-item.drop-target .side-count { color: #fff; }
/* Gezogene Ordnerzeile (Sortieren per Ziehen) */
.side-item.side-dragging {
  background: var(--surface-mid); border-color: var(--primary-light);
  box-shadow: 0 10px 26px rgba(0,0,0,.45);
  position: relative; cursor: grabbing;
}
.side-item { touch-action: pan-y; }
.side-menu {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px;
  color: var(--on-variant); opacity: .4; flex: none; cursor: pointer;
  transition: opacity .12s, background .12s, color .12s;
}
.side-item:hover .side-menu { opacity: .85; }
.side-menu:hover { opacity: 1; background: var(--surface-high); color: var(--on-surface); }
.side-empty { color: var(--on-variant); font-size: 13px; padding: 10px; }
.side-new {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--surface-mid); border: 1px solid var(--surface-high); color: var(--on-surface);
  font-family: inherit; font-size: 14px; padding: 10px; border-radius: 12px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.side-new svg { color: var(--primary-light); }
.side-new:hover { border-color: var(--primary-light); }
.sidebar-scrim {
  position: fixed; inset: var(--topbar-h, 66px) 0 0 0; z-index: 29;
  background: rgba(0,0,0,.45); animation: pop-in .15s ease;
}
/* Während eines Ziehens darf der Abdunkler keine Zeiger-Ereignisse schlucken:
   er liegt über allem und machte sonst jedes Ablageziel unerreichbar. */
body.card-dragging .sidebar-scrim,
body.task-drag-main .sidebar-scrim,
body.task-drag-sub .sidebar-scrim { pointer-events: none; }
/* Notizbereich rückt mit, solange Platz ist */
.notes-wrap { transition: padding-left .3s cubic-bezier(.2, .8, .2, 1); }
body.sidebar-open .notes-wrap { padding-left: 288px; }
@media (max-width: 900px) {
  body.sidebar-open .notes-wrap { padding-left: 20px; }
}

/* ─── Ordner anpinnen (seit 2026-09-27) ───────────────────────────────────
 * Das kleine Pin-Symbol an der Zeile zeigt den Zustand in Gold (Akzentfarbe der
 * App, wie die angehefteten Notizen). Angepinnte Ordner stehen immer oben. */
.side-item .side-pin { color: var(--gold); opacity: .95; }
.side-item.pinned .side-name { font-weight: 600; }

/* ─── Aufgabenseite (seit 2026-09-28 eine eigene Seite statt Overlay) ──────
 * Sie benutzt dieselben Bausteine wie die Notizübersicht (.sidebar,
 * .view-toolbar, .selection-bar, Raster) – nur auf eigenen Elementen. Dadurch
 * sieht und verhält sich beides gleich, ohne dass an der Notizansicht etwas
 * geändert werden musste. */

/* Umschalter Notizen ↔ Aufgaben: exakt so groß wie das Profil-Icon daneben
 * (34×34, Wunsch des Users) und mit demselben Symbol wie die Handy-App. */
.tasks-btn {
  width: 34px; height: 34px; border-radius: 50%; flex: none; padding: 0;
  background: var(--surface-mid); border: 2px solid transparent; color: var(--on-variant);
  display: grid; place-items: center; cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.tasks-btn svg { display: block; }
.tasks-btn:hover { color: var(--on-surface); border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(41,98,255,.25); }
.tasks-btn:active { transform: scale(.95); }
.tasks-btn[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }

.tasks-tools { display: flex; flex-direction: column; gap: 8px; padding: 0 2px 14px; }
.tasks-new { display: flex; gap: 8px; }
.tasks-new input {
  flex: 1; min-width: 0; padding: 11px 13px; font-size: 15px; font-family: inherit;
  background: var(--surface-mid); color: var(--on-surface);
  border: 1px solid var(--surface-high); border-radius: 12px; outline: none;
  transition: border-color .15s;
}
.tasks-new input:focus { border-color: var(--primary); }
.tasks-new .btn { flex: none; background: var(--primary); color: #fff; padding: 0 16px; border-radius: 12px; font-size: 14px; }

/* Raster der Aufgaben – genau wie das Notizraster umschaltbar zwischen
 * Kacheln (mehrspaltig) und Liste (einspaltig, volle Breite). Jede
 * HAUPTaufgabe ist eine Kachel; ihre Unteraufgaben stehen darin. */
.tasks-grid {
  display: grid; gap: 14px; align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.tasks-grid.view-list { grid-template-columns: 1fr; gap: 8px; }
/* Die Zeile „· n offen · n erledigt · n Ordner" ist deutlich länger als die der
 * Notizen. Sie muss deshalb schrumpfen und kürzen dürfen – sonst läuft sie auf
 * schmalen Schirmen unter die Sortier- und Ansichtsknöpfe. Bewusst NUR auf der
 * Aufgabenseite, die Notiz-Werkzeugleiste bleibt unverändert. */
#tasks-view .crumbs { flex-wrap: wrap; }
#tasks-view .crumb-label { flex: none; }   /* der Name kürzt sich selbst, er weicht nicht */
#tasks-view .crumb-count {
  flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tasks-grid > .task-item.is-main {
  background: var(--surface-low); border: 1px solid var(--surface-mid);
  border-radius: var(--radius); padding: 6px 10px 10px; position: relative;
  min-width: 0;
}
/* „Erledigt"-Bereich und Leerhinweis gehen immer über die ganze Breite. */
.tasks-grid > .task-done-block, .tasks-grid > .empty-hint { grid-column: 1 / -1; }
/* Eine Aufgabe (und genauso eine Unteraufgabe) */
.task-item { touch-action: pan-y; border-radius: 12px; min-width: 0; }
.task-row {
  display: flex; align-items: flex-start; gap: 4px;
  border-radius: 10px; border: 1px solid transparent;
  transition: background .12s, border-color .12s;
}
.task-row:hover { background: var(--surface-mid); }
/* Kreis links: leer, beim Hovern wird er zum Häkchen (Wunsch des Users). */
.task-circle {
  flex: none; position: relative; width: 34px; height: 34px; padding: 0;
  background: none; border: none; cursor: pointer; color: transparent;
  display: grid; place-items: center; align-self: flex-start;
}
.task-circle::before {
  content: ""; position: absolute; width: 21px; height: 21px; border-radius: 50%;
  border: 2px solid var(--surface-high); transition: border-color .15s, background .15s;
}
.task-circle svg { position: relative; z-index: 1; transition: color .12s; }
.task-circle:hover::before, .task-circle:focus-visible::before { border-color: var(--primary-light); }
.task-circle:hover svg, .task-circle:focus-visible svg { color: var(--primary-light); }
.task-circle:focus-visible { outline: none; }
.task-item.is-done .task-circle::before { background: var(--success); border-color: var(--success); }
.task-item.is-done .task-circle svg { color: var(--obsidian); }
/* Aufklapp-Pfeil */
.task-twist {
  flex: none; width: 24px; height: 34px; padding: 0; background: none; border: none;
  color: var(--on-variant); cursor: pointer; display: grid; place-items: center; align-self: flex-start;
}
.task-twist:hover { color: var(--on-surface); }
.twist-icon { transition: transform .15s; }
.task-twist[aria-expanded="true"] .twist-icon,
.task-done-toggle[aria-expanded="true"] .twist-icon { transform: rotate(90deg); }
/* Titel: bricht um statt abgeschnitten zu werden (auch lange Titel am iPhone) */
.task-title {
  flex: 1; min-width: 0; padding: 7px 2px; font-size: 15px; line-height: 1.35;
  overflow-wrap: anywhere; cursor: pointer;
}
.task-item.is-sub .task-title { font-size: 14px; }
.task-item.is-done .task-title { color: var(--on-variant); text-decoration: line-through; cursor: default; }
.task-badges { display: flex; align-items: center; gap: 5px; flex: none; padding-top: 6px; }
.task-badge {
  font-size: 11px; color: var(--on-variant); background: var(--surface-mid);
  padding: 2px 7px; border-radius: 9px; white-space: nowrap;
}
.task-badge-share { color: var(--primary-light); background: rgba(41,98,255,.14); }
.task-item[data-notes="0"] .task-badge-note { display: none; }
.task-menu {
  flex: none; width: 28px; height: 28px; margin-top: 3px; padding: 0; border: none;
  border-radius: 8px; background: none; color: var(--on-variant);
  opacity: .55; cursor: pointer; display: grid; place-items: center;
  transition: opacity .12s, background .12s, color .12s;
}
.task-row:hover .task-menu { opacity: 1; }
.task-menu:hover { background: var(--surface-high); color: var(--on-surface); }
/* Aufgeklappter Bereich: Notiz, Unteraufgaben, Eingabe, „Erledigt" */
.task-detail { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 8px 34px; }
.task-notes {
  width: 100%; resize: vertical; min-height: 38px; padding: 8px 10px;
  font-family: inherit; font-size: 13.5px; line-height: 1.45;
  background: var(--surface-mid); color: var(--on-surface);
  border: 1px solid transparent; border-radius: 10px; outline: none;
  transition: border-color .15s;
}
/* Ein leeres Notizfeld tritt zurück (nur feine Linie) – sonst wäre die Liste
 * bei vielen aufgeklappten Aufgaben unruhig. */
.task-notes:placeholder-shown { background: transparent; border-color: var(--surface-mid); }
.task-notes:placeholder-shown:hover { background: var(--surface-mid); }
.task-notes:focus { border-color: var(--primary); background: var(--surface-mid); }
.task-subs { display: flex; flex-direction: column; gap: 2px; min-height: 4px; }
/* Beim Ziehen einer Unteraufgabe wird jede LEERE Ablagefläche sichtbar – sonst
 * könnte man in eine Aufgabe ohne Unterpunkte nichts hineinziehen. Nur die
 * leeren wachsen, damit sich das Layout unter dem Finger kaum verschiebt. */
body.task-drag-sub .task-subs:empty {
  min-height: 34px; border: 1px dashed var(--primary-light); border-radius: 10px;
}
.task-add { display: flex; align-items: center; gap: 8px; padding-left: 2px; }
.task-add svg { color: var(--on-variant); flex: none; }
.task-sub-input {
  flex: 1; min-width: 0; padding: 8px 10px; font-family: inherit; font-size: 13.5px;
  background: transparent; color: var(--on-surface);
  border: 1px dashed var(--surface-high); border-radius: 10px; outline: none;
  transition: border-color .15s, background .15s;
}
.task-sub-input:focus { border-style: solid; border-color: var(--primary); background: var(--surface-mid); }
.task-done-block { margin-top: 2px; }
.task-done-toggle {
  display: flex; align-items: center; gap: 6px; width: 100%;
  background: none; border: none; color: var(--on-variant); cursor: pointer;
  font-family: inherit; font-size: 13px; padding: 7px 6px; border-radius: 9px;
  transition: background .12s, color .12s;
}
.task-done-toggle:hover { background: var(--surface-mid); color: var(--on-surface); }
.task-done-list { display: flex; flex-direction: column; gap: 2px; padding-left: 4px; }
/* Gezogene Zeile + Ablageziel. z-index 40 liegt ÜBER der Ordnerleiste (30) –
 * sonst rutschte die Aufgabe beim Ziehen darunter und wirkte „kaputt". */
.task-item.task-dragging {
  position: relative; z-index: 40; cursor: grabbing;
  background: var(--surface-mid); box-shadow: 0 10px 26px rgba(0,0,0,.45);
}
.task-item.task-drop-target { outline: 2px solid var(--primary-light); outline-offset: -1px; }
.task-share-pop { position: fixed; z-index: 71; top: 80px; left: 40px; }

/* Kennzeichen „liegt in Ordner X" – erscheint nur in der Suche, weil man dort
 * auch Aufgaben aus Ordnern sieht (wie das 📁 an der Notizkarte). */
.task-badge-folder { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }

/* Mehrfachauswahl auf der Aufgabenseite: dasselbe Muster wie bei den
 * Notizkarten (Häkchen oben rechts, Rahmen in Primärfarbe). Nur Hauptaufgaben
 * lassen sich auswählen – Unteraufgaben folgen ihrer Aufgabe. */
.task-check {
  position: absolute; top: 9px; right: 9px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--on-variant); background: rgba(19,19,21,.6);
  display: none; place-items: center; color: transparent; z-index: 2;
}
body.selecting-tasks .tasks-grid > .task-item.is-main > .task-check { display: grid; }
/* Platz für das Häkchen schaffen, damit es nichts überdeckt */
body.selecting-tasks .tasks-grid > .task-item.is-main > .task-row { padding-right: 28px; }
body.selecting-tasks .tasks-grid > .task-item.is-main { cursor: pointer; }
.tasks-grid > .task-item.selected { border-color: var(--primary-light); box-shadow: 0 0 0 2px var(--primary-light) inset; }
.tasks-grid > .task-item.selected > .task-check { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ─── Tastaturkürzel in den Einstellungen (seit 2026-09-28) ────────────────
 * Machart aus der Hub-Menüleiste übernommen: zuklappbare Abschnitte, links die
 * Taste als <kbd>, rechts im Klartext, was sie tut. */
.shortcut-list { display: flex; flex-direction: column; gap: 2px; }
.sc-head {
  display: flex; align-items: center; gap: 6px; width: 100%; text-align: left;
  background: none; border: none; color: var(--on-variant); cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: .3px;
  padding: 8px 6px; border-radius: 9px;
  transition: background .12s, color .12s;
}
.sc-head:hover { background: var(--surface-mid); color: var(--on-surface); }
.sc-head[aria-expanded="true"] .twist-icon { transform: rotate(90deg); }
.sc-rows {
  list-style: none; margin: 0 0 8px; padding: 0 4px;
  display: flex; flex-direction: column; gap: 1px;
}
.sc-rows li { display: flex; align-items: baseline; gap: 10px; padding: 5px 4px; }
.sc-keys { display: flex; align-items: center; gap: 4px; flex: none; min-width: 96px; flex-wrap: wrap; }
.sc-text { flex: 1; min-width: 0; font-size: 13px; color: var(--on-variant); overflow-wrap: anywhere; }
.sc-rows kbd {
  font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1;
  padding: 4px 6px; min-width: 20px; text-align: center;
  background: var(--surface-mid); color: var(--on-surface);
  border: 1px solid var(--surface-high); border-radius: 6px;
}

@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .search-wrap { order: 3; flex-basis: 100%; max-width: none; }
  .notes-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .notes-grid.size-small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .notes-grid.size-large { grid-template-columns: 1fr; }
  .notes-grid.view-list .note-card .note-title { width: auto; flex: 1; }
  .notes-grid.view-list .note-card .note-body { display: none; }
  .crumb-label { max-width: 40vw; }
  .chip #sort-label { display: none; }
  .chip { padding: 7px 10px; }
  .share-pop { right: -60px; }
  .profile-menu { right: -6px; }
  /* Aufgabenseite am iPhone: eine Spalte, nichts läuft aus seiner Fläche, und
   * der ✚-Knopf unten rechts verdeckt die letzte Kachel nicht (Polster unten
   * kommt aus .notes-wrap). */
  .tasks-grid { grid-template-columns: 1fr; gap: 10px; }
  .tasks-grid > .task-item.is-main { padding: 4px 8px 8px; }
  .tasks-new { flex-wrap: wrap; }
  .tasks-new .btn { padding: 11px 16px; }
  .task-detail { margin-left: 22px; }
  .task-menu { opacity: .85; }
  .task-badges { max-width: 42%; overflow: hidden; }
  .task-badge-folder { max-width: 90px; }
  .chip #tsort-label { display: none; }
  /* Die Kürzel-Übersicht darf nicht in zwei unleserliche Spalten zerfallen */
  .sc-rows li { flex-direction: column; gap: 3px; }
  .sc-keys { min-width: 0; }
}
