@font-face { font-family: "Figtree"; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url("/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url("/fonts/figtree-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Studienportal – dunkles, warmes, Apple-inspiriertes Design */
:root {
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --wiwi: #4f7ff0;      /* Blaubeerblau */
  --soz: #c25f6c;       /* Weinrot + Lachsrosa */
  --pol: #5aa83c;       /* Blattgrün */
  --fremd: #cc9a2e;     /* Ocker */
  --familie: #a77bca;
  --arbeit: #4ba39c;
  --lernen: #e0b85a;
  --neutral: #8f8277;
  --radius: 24px;
  --radius-s: 12px;
  --rail-w: 92px;
  --panel-w: 258px;
  --sidebar-c: 92px;
  --blur: 0px;
  --mod-alpha: .62;
  --ok: #4cc26b; --warn: #e3a53a; --bad: #e5604f; --test: #7fa6d6;
}
:root[data-theme="dark"] {
  --bg: #121110; --bg2: #1d1a17;
  --panel-rgb: 26, 23, 20;
  --panel-solid: #1f1c19; --panel-2: #2b2723; --hover: rgba(255, 248, 235, .07);
  --line: rgba(255, 248, 235, .11); --line-strong: rgba(255, 248, 235, .2);
  --text: #f5f2ed; --muted: #c2bbb1; --faint: #8f887e;
  --accent: #cdd5a4; --accent-text: #1d2111; --accent-ink: #d8dfb4;
  --gold: #dbb05a; --sel: rgba(219, 190, 120, .16); --sel-line: rgba(219, 190, 120, .6);
  --rail: rgba(20, 18, 16, .86); --pill: rgba(16, 15, 13, .82);
  --warn-bg: rgba(92, 46, 24, .55); --warn-line: #b8693d;
  --input: rgba(14, 13, 12, .72); --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #efebe4; --bg2: #e2dbd0;
  --panel-rgb: 255, 252, 247;
  --panel-solid: #fbf8f3; --panel-2: #efe9e0; --hover: rgba(50, 40, 25, .06);
  --line: rgba(50, 40, 25, .12); --line-strong: rgba(50, 40, 25, .22);
  --text: #1f1c18; --muted: #6c6358; --faint: #9b9184;
  --accent: #cdd5a4; --accent-text: #1d2111; --accent-ink: #5c6a28;
  --gold: #b0842c; --sel: rgba(176, 132, 44, .14); --sel-line: rgba(176, 132, 44, .55);
  --rail: rgba(250, 247, 242, .9); --pill: rgba(255, 253, 249, .9);
  --warn-bg: rgba(214, 140, 90, .18); --warn-line: #c0703a;
  --input: rgba(255, 255, 255, .85); --shadow: 0 18px 50px rgba(60, 45, 25, .18);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.42 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
#bg { position: fixed; inset: -40px; z-index: 0; background: radial-gradient(circle at 20% 0%, var(--bg2), var(--bg) 70%);
  background-size: cover; background-position: center; filter: blur(var(--blur)); transform: scale(1.04); }
#bg.has-image { filter: blur(var(--blur)) brightness(.82); }
#bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, .05) 60%, rgba(0, 0, 0, .18)); }
:root[data-theme="light"] #bg::after { background: linear-gradient(90deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 60%); }
:root[data-theme="light"] #bg.has-image { filter: blur(var(--blur)) brightness(1.05) saturate(.9); }
#shell { position: relative; z-index: 1; display: flex; height: 100vh; height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
svg:not([width]):not([class*="big"]) { max-width: 100%; }
svg[viewBox="0 0 24 24"] { width: 1.15em; height: 1.15em; flex: none; }
a { color: var(--accent-ink); }
h1 { font-size: 30px; font-weight: 780; letter-spacing: -.03em; margin: 0; }
h2 { font-size: 17px; font-weight: 650; margin: 0 0 10px; letter-spacing: -.01em; }
h3 { font-size: 13px; font-weight: 600; margin: 0 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- Symbolleiste (Rail) */
#sidebar {
  width: var(--rail-w); flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: calc(16px + env(safe-area-inset-top)) 0 calc(14px + env(safe-area-inset-bottom));
  background: var(--rail); backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-right: 1px solid var(--line); z-index: 6; overflow: visible;
}
.brand { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 10px; flex: none;
  background: linear-gradient(145deg, rgba(219, 176, 90, .28), rgba(205, 213, 164, .12)); border: 1px solid var(--sel-line);
  font: 700 17px/1 var(--font); letter-spacing: -.04em; color: var(--gold); text-decoration: none; }
.nav-toggle { width: 52px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--pill); display: grid;
  place-items: center; cursor: pointer; color: var(--text); margin: 0 0 14px; flex: none; }
.nav-toggle svg { width: 18px; height: 18px; }
.nav-toggle:hover, .nav-toggle:focus-visible { border-color: var(--line-strong); }
.nav-item { position: relative; display: grid; place-items: center; width: 52px; height: 48px; flex: 0 1 48px; min-height: 24px;
  border-radius: 15px; color: var(--muted); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; background: none; }
.nav-item svg { width: 22px; height: 22px; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { border-color: var(--sel-line); background: var(--sel); color: var(--gold); }
.nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nav-item .badge.count { position: absolute; top: 2px; right: 0; font-size: 10px; padding: 1px 5px; min-width: 16px; }
.nav-sep { width: 36px; height: 1px; background: var(--line); margin: 6px 0; flex: 0 0 1px; }
#sidebar { min-height: 0; }
@media (max-height: 820px) { .nav-item svg { width: 19px; height: 19px; } .brand { width: 40px; height: 40px; margin-bottom: 6px; } .nav-toggle { height: 36px; margin-bottom: 8px; } .nav-sep { margin: 3px 0; } }
.dot-badge { display: none; }
/* Beschriftung beim Darüberfahren und bei Tastaturfokus */
.nav-item:hover::after, .nav-item:focus-visible::after {
  content: attr(data-label); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  background: var(--panel-solid); color: var(--text); border: 1px solid var(--line-strong); padding: 6px 10px; white-space: nowrap;
  border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); pointer-events: none; z-index: 60; }

/* ---------------------------------------------------------------- Routine-Panel (ausklappbarer Bereich) */
#panel { width: var(--panel-w); flex: none; padding: calc(16px + env(safe-area-inset-top)) 0 calc(16px + env(safe-area-inset-bottom)) 14px; overflow: hidden; }
#panel.closed { display: none; }
.rpanel { height: 100%; overflow: auto; border-radius: 26px; padding: 22px 16px; background: rgba(var(--panel-rgb), calc(var(--mod-alpha) + .14));
  border: 1px solid var(--line); backdrop-filter: blur(26px) saturate(1.2); -webkit-backdrop-filter: blur(26px) saturate(1.2);
  display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.rpanel h2 { font-size: 18px; font-weight: 750; margin: 0 4px; letter-spacing: -.015em; }
.rpanel .eyebrow { margin: 0 4px -6px; }
.run-row { display: flex; gap: 8px; }
.run-main { flex: 1; min-height: 56px; border-radius: 16px; border: 0; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; line-height: 1.15; }
.run-main:hover { filter: brightness(1.05); } .run-main:disabled { opacity: .75; cursor: default; }
.run-main svg { width: 18px; height: 18px; }
.run-more { width: 48px; border-radius: 16px; border: 1px solid var(--line); background: var(--pill); cursor: pointer; display: grid; place-items: center; }
.run-more svg { width: 18px; height: 18px; }
.p-btn { width: 100%; min-height: 44px; border-radius: 15px; border: 1px solid var(--line); background: var(--pill); color: var(--text);
  font-weight: 650; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; padding: 0 12px; }
.p-btn:hover { border-color: var(--line-strong); }
.p-btn svg { width: 17px; height: 17px; }
.runs summary { cursor: pointer; font-weight: 650; font-size: 13px; padding: 2px 4px; list-style: none; }
.runs summary::before { content: "▸ "; } .runs[open] summary::before { content: "▾ "; }
.runs .run-link { display: flex; gap: 8px; width: 100%; border: 0; background: none; text-align: left; padding: 6px 4px; border-radius: 9px; cursor: pointer; font-size: 12.5px; color: var(--text); }
.runs .run-link:hover { background: var(--hover); }
.warn-card { border-radius: 18px; padding: 16px; background: var(--warn-bg); border: 1px solid var(--warn-line); }
.warn-card h3 { color: var(--text); text-transform: none; letter-spacing: -.01em; font-size: 16px; font-weight: 750; margin-bottom: 8px; }
.warn-card ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.warn-card .p-btn { margin-top: 10px; min-height: 38px; font-size: 13px; }
.ok-card { border-radius: 18px; padding: 12px 14px; background: rgba(76, 194, 107, .1); border: 1px solid rgba(76, 194, 107, .35); font-size: 13px; }
.eyebrow { font-size: 11.5px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------------------------------------------------------------- Main */
#main { flex: 1; min-width: 0; overflow: auto; padding: calc(18px + env(safe-area-inset-top)) 22px calc(30px + env(safe-area-inset-bottom)); outline: none; }
#view { max-width: 1400px; margin: 0 auto; }
.view-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.view-head h1 { margin-right: auto; }
.card { background: rgba(var(--panel-rgb), var(--mod-alpha)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); }
.card.tight { padding: 14px; border-radius: 18px; }
.grid { display: grid; gap: 14px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 7px;
  border-radius: 99px; background: var(--hover); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { color: var(--ok); } .badge.warn { color: var(--warn); } .badge.bad { color: var(--bad); } .badge.test { color: var(--test); }
.badge.count { background: var(--bad); color: #fff; border: 0; min-width: 18px; justify-content: center; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; background: var(--neutral); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(76, 194, 107, .18); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(229, 96, 79, .18); }
.dot.warn { background: var(--warn); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 15px; font-weight: 600;
  border-radius: 13px; border: 1px solid var(--line); background: var(--pill); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--line-strong); }
.btn.lg { height: 48px; padding: 0 18px; font-size: 15.5px; border-radius: 15px; }
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: var(--accent-text); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { color: var(--bad); }
.btn.icon { width: 34px; padding: 0; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 17px; height: 17px; }
.x-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--hover); cursor: pointer; display: grid;
  place-items: center; flex: none; color: var(--muted); touch-action: manipulation; }
.x-btn:hover { color: var(--text); background: var(--line-strong); }
.x-btn svg { width: 16px; height: 16px; pointer-events: none; }

input[type=text], input[type=search], input[type=email], input[type=date], input[type=time], input[type=number],
input[type=url], input[type=password], select, textarea {
  background: var(--input); border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 7px 10px;
  min-height: 34px; outline: none; width: 100%; color: var(--text); }
select option { background: var(--panel-solid); color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(205, 213, 164, .25); }
input[type=range] { accent-color: var(--accent); width: 100%; }
input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; }
label.field { display: block; } label.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fields .full { grid-column: 1 / -1; }

/* Segmented control (Kategorienauswahl) */
.seg { display: inline-flex; padding: 3px; background: var(--input); border: 1px solid var(--line-strong); border-radius: 11px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 8px; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; font-weight: 550; }
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.seg button .dot { width: 8px; height: 8px; }

/* Toggle-Pillen (Ebenen) */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line-strong);
  cursor: pointer; user-select: none; background: transparent; }
.pill.on { background: var(--hover); border-color: var(--accent); }
.pill input { display: none; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------------------------------------------------------------- Banner / Toast */
#banner:empty { display: none; }
#banner { max-width: 1400px; margin: 0 auto 14px; }
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(229, 96, 79, .4);
  background: rgba(229, 96, 79, .12); flex-wrap: wrap; }
.banner.info { border-color: rgba(127, 166, 214, .4); background: rgba(127, 166, 214, .12); }
.banner svg { width: 18px; height: 18px; flex: none; }   /* sonst füllt das Symbol den ganzen Bildschirm */
#toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(30px);
  opacity: 0; background: var(--panel-solid); border: 1px solid var(--line-strong); padding: 10px 16px; border-radius: 12px;
  box-shadow: var(--shadow); transition: .25s; z-index: 200; pointer-events: none; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------------------------------------------------------------- Modal / Sheet */
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 100; display: flex; align-items: center;
  justify-content: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow);
  width: min(560px, 100%); max-height: min(86vh, 900px); display: flex; flex-direction: column; overflow: hidden; }
.sheet.wide { width: min(760px, 100%); }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; flex: 1; min-width: 0; }
.sheet-body { padding: 16px 18px; overflow: auto; }
.sheet-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Übersicht */
.hero { margin: 8px 0 26px; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; margin: 8px 0 12px; }
.saved { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.saved .dot { width: 7px; height: 7px; box-shadow: none; }
.ws { display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; }
.ws h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.035em; margin: 6px 0 6px; }
.ws .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.searchbar { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; position: relative; }
.searchbox { flex: 1; min-width: 240px; position: relative; }
.searchbox input { height: 52px; border-radius: 16px; padding-left: 46px; font-size: 16px; background: var(--input);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.searchbox > svg { position: absolute; left: 16px; top: 16px; width: 20px; height: 20px; color: var(--muted); z-index: 1; pointer-events: none; }
.results { position: absolute; left: 0; right: 0; top: 58px; z-index: 30; background: var(--panel-solid); border: 1px solid var(--line-strong);
  border-radius: 16px; box-shadow: var(--shadow); padding: 6px; max-height: 60vh; overflow: auto; }
.results button { display: flex; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 10px; text-align: left; cursor: pointer; color: var(--text); align-items: center; }
.results button:hover, .results button.on { background: var(--sel); }
.results .kind { font-size: 11px; font-weight: 700; color: var(--muted); width: 70px; flex: none; text-transform: uppercase; letter-spacing: .06em; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.home-grid .card h2 { font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; flex: 1; }
.round { width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line); background: var(--pill); display: grid; place-items: center; cursor: pointer; color: var(--text); }
.round.on { color: var(--gold); border-color: var(--sel-line); }
.round svg { width: 18px; height: 18px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chipbtn { border: 1px solid var(--line); background: var(--pill); color: var(--text); border-radius: 99px; padding: 5px 12px; cursor: pointer; font-size: 13px; font-weight: 600; }
.chipbtn.on { background: var(--sel); border-color: var(--sel-line); }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 12px; }
.file-row:hover { background: var(--hover); }
.file-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--hover); flex: none; font-size: 10px; font-weight: 800; color: var(--muted); }
.file-row a { color: var(--text); text-decoration: none; font-weight: 600; }
.star { border: 0; background: none; cursor: pointer; color: var(--faint); font-size: 17px; padding: 4px; }
.star.on { color: var(--gold); }
.profile-line { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.profile-line:last-child { border-bottom: 0; }
.profile-line span:first-child { width: 110px; color: var(--muted); flex: none; }
.quick a, .quick button { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 11px; color: var(--text);
  text-decoration: none; border: 0; background: none; width: 100%; cursor: pointer; text-align: left; font-size: 13.5px; }
.quick a:hover, .quick button:hover { background: var(--hover); }
.quick svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 10px; }
.status { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 14px; background: var(--hover); border: 1px solid var(--line); }
.status .dot { margin-top: 5px; }
.list-item { display: flex; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.list-item:last-child { border-bottom: 0; }
.bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; background: var(--neutral); }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- Website & Unterseiten */
#crumbs { max-width: 1400px; margin: 0 auto 10px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#crumbs:empty { display: none; }
#crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; } #crumbs a:hover { color: var(--text); }
#crumbs .sep { color: var(--faint); } #crumbs [aria-current] { color: var(--text); font-weight: 650; }
.ownerbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; position: relative; }
.site-hero { display: flex; gap: 28px; align-items: center; padding: 34px; margin-bottom: 16px; flex-wrap: wrap; position: relative; }
.site-hero h1 { font-size: clamp(36px, 5.2vw, 60px); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; margin: 6px 0 8px; }
.site-hero .lead { font-size: 18px; color: var(--muted); }
.avatar { width: 132px; height: 132px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; font-size: 44px; font-weight: 800;
  letter-spacing: -.04em; color: var(--gold); background: linear-gradient(145deg, rgba(219, 176, 90, .28), rgba(205, 213, 164, .1)); border: 1px solid var(--sel-line); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.site-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.site-grid .span2 { grid-column: 1 / -1; }
.site-grid .card h2 { font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.prose { font-size: 15.5px; line-height: 1.65; margin: 0; }
.timeline { list-style: none; margin: 4px 0 14px; padding: 0 0 0 18px; border-left: 2px solid var(--line-strong); }
.timeline li { position: relative; padding: 4px 0 12px 8px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline .when { display: block; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .03em; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.proj { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 18px; background: var(--hover); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
a.proj:hover { border-color: var(--sel-line); }
.proj svg { width: 18px; height: 18px; color: var(--gold); }
.proj.tile { flex-direction: row; align-items: center; gap: 10px; padding: 14px 16px; background: rgba(var(--panel-rgb), var(--mod-alpha)); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.link-btn { border: 0; background: none; color: var(--accent-ink); font-weight: 650; cursor: pointer; padding: 0; text-decoration: underline; }
.page-body { min-height: 120px; }
.page-body > h1:first-child { display: none; }
@media (max-width: 820px) {
  .site-grid { grid-template-columns: 1fr; }
  .site-hero { padding: 22px; gap: 16px; flex-direction: column; align-items: flex-start; }
    .site-hero .row .btn { flex: 1 1 auto; }
  .ownerbar .btn { flex: 1 1 40%; }
}

/* ---------------------------------------------------------------- Musikleiste */
#musicbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 4px; width: min(440px, calc(100vw - var(--rail-w) - 28px)); padding: 6px 8px 6px 6px; border-radius: 20px;
  background: rgba(var(--panel-rgb), .86); border: 1px solid var(--line-strong); box-shadow: var(--shadow); backdrop-filter: blur(26px) saturate(1.4); -webkit-backdrop-filter: blur(26px) saturate(1.4); overflow: hidden; }
#musicbar.hidden { display: none; }
#musicbar .mb-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; padding: 0; font: inherit; }
#musicbar .mb-text { min-width: 0; display: flex; flex-direction: column; }
#musicbar .mb-text b { font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#musicbar .mb-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#musicbar .mb-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; color: var(--text); cursor: pointer; display: grid; place-items: center; flex: none; }
#musicbar .mb-btn:hover { background: var(--hover); } #musicbar .mb-btn:disabled { opacity: .35; }
#musicbar .mb-btn svg { width: 22px; height: 22px; fill: currentColor; }
#musicbar .mb-prog { position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
#musicbar .mb-prog span { display: block; height: 100%; background: var(--text); opacity: .7; }
#main { padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important; }

/* ---------------------------------------------------------------- Kalender */
.cal-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cal-grid { display: grid; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: rgba(var(--panel-rgb), var(--mod-alpha)); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.cal-h { padding: 8px 8px; font-size: 12px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); text-align: left; }
.cal-kw { font-size: 11px; color: var(--faint); padding: 8px 4px; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 104px; padding: 6px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); cursor: pointer;
  display: flex; flex-direction: column; gap: 3px; min-width: 0; background: none; text-align: left; border-top: 0; border-left: 0; color: var(--text); }
.cal-day:hover { background: var(--hover); }
.cal-day.other { opacity: .45; }
.cal-day.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-num { font-size: 13px; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; flex: none; }
.cal-day.today .cal-num { background: var(--accent); color: var(--accent-text); }
.cal-num.last { box-shadow: 0 0 0 2px var(--lernen); }        /* letzter Tag des Monats */
.chip { font-size: 11.5px; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 3px solid var(--c, var(--neutral)); background: color-mix(in srgb, var(--c, var(--neutral)) 22%, transparent); }
.chip.cancel { text-decoration: line-through; opacity: .6; }
.more { font-size: 11px; color: var(--muted); padding-left: 4px; }
.day-ev { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 11px 12px; border-radius: 12px; background: var(--hover);
  border-left: 4px solid var(--c, var(--neutral)); cursor: pointer; }
.day-ev + .day-ev { margin-top: 8px; }
.day-ev .t { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.links { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.links a { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; text-decoration: none; padding: 4px 8px; border-radius: 7px; background: var(--hover); width: fit-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- Stundenplan */
.tt { display: grid; grid-template-columns: 46px repeat(5, 1fr); position: relative; border-radius: var(--radius); border: 1px solid var(--line);
  background: rgba(var(--panel-rgb), var(--mod-alpha)); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); overflow: hidden; }
.tt-head { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); height: 34px; }
.tt-head.today { color: var(--accent); }
.tt-scale { position: relative; border-right: 1px solid var(--line); }
.tt-scale span:last-child { transform: translateY(-100%); }
.tt-scale span { position: absolute; right: 5px; font-size: 10.5px; color: var(--faint); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.tt-col { position: relative; border-right: 1px solid var(--line); }
.tt-col:last-child { border-right: 0; }
.tt-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.tt-line.half { border-top-style: dotted; opacity: .5; }
.tt-ev { position: absolute; left: 3px; right: 3px; border-radius: 7px; padding: 3px 6px; overflow: hidden; cursor: pointer; font-size: 11.5px; line-height: 1.25;
  background: color-mix(in srgb, var(--c) 30%, var(--panel-solid)); border-left: 3px solid var(--c); }
.tt-ev b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-ev .typ { font-weight: 700; text-transform: uppercase; font-size: 9.5px; letter-spacing: .05em; opacity: .9; }
.tt-ev.cancel { opacity: .45; text-decoration: line-through; }
.tt-ev .changed { color: var(--warn); font-weight: 700; }
.tt-now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--bad); z-index: 2; }

/* ---------------------------------------------------------------- Notizen */
.notes { display: grid; grid-template-columns: 210px 280px 1fr; height: calc(100dvh - 60px); gap: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: rgba(var(--panel-rgb), var(--mod-alpha)); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.notes > div { min-height: 0; display: flex; flex-direction: column; }
.n-folders { border-right: 1px solid var(--line); padding: 10px 8px; overflow: auto; }
.n-list { border-right: 1px solid var(--line); }
.n-list-items { overflow: auto; flex: 1; padding: 4px 8px; }
.n-folder, .n-note { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; color: var(--text); }
.n-folder svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.n-folder.on, .n-note.on { background: var(--sel); }
.n-folder:hover, .n-note:hover { background: var(--hover); }
.n-note { flex-direction: column; align-items: stretch; gap: 1px; border-bottom: 1px solid var(--line); border-radius: 9px; }
.n-note b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-note .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-editor { min-width: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--line); align-items: center; }
.toolbar button, .toolbar select, .toolbar label.tb { height: 30px; min-width: 30px; border: 0; background: none; border-radius: 7px; cursor: pointer; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text); font-size: 13px; position: relative; }
.toolbar select { width: auto; min-height: 30px; padding: 0 4px; background: var(--input); border: 1px solid var(--line); }
.toolbar button:hover, .toolbar label.tb:hover { background: var(--hover); }
.toolbar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.toolbar input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.toolbar svg { width: 16px; height: 16px; }
.editor { flex: 1; overflow: auto; padding: 20px 28px 60px; outline: none; font-size: 15px; line-height: 1.55; }
.editor h1 { font-size: 26px; margin: .2em 0 .4em; } .editor h2 { font-size: 20px; margin: .8em 0 .3em; } .editor h3 { font-size: 16px; text-transform: none; color: var(--text); letter-spacing: 0; margin: .8em 0 .3em; }
.editor blockquote { border-left: 3px solid var(--accent); margin: .6em 0; padding: .1em 0 .1em 14px; color: var(--muted); }
.editor pre { background: var(--input); padding: 10px; border-radius: 8px; font: 13px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; }
.editor table { border-collapse: collapse; margin: .6em 0; min-width: 50%; }
.editor td, .editor th { border: 1px solid var(--line-strong); padding: 6px 9px; min-width: 60px; }
ul.checklist { list-style: none; padding-left: 4px; }
ul.checklist li { position: relative; padding-left: 28px; margin: 3px 0; }
ul.checklist li::before { content: ""; position: absolute; left: 0; top: .2em; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--faint); cursor: pointer; }
ul.checklist li.checked::before { background: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
ul.checklist li.checked { color: var(--muted); }
.ctx { position: fixed; z-index: 150; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 11px; box-shadow: var(--shadow); padding: 5px; min-width: 220px; }
.ctx button { display: flex; width: 100%; gap: 8px; padding: 7px 10px; border: 0; background: none; border-radius: 7px; cursor: pointer; text-align: left; color: var(--text); }
.ctx button:hover { background: var(--hover); }
.n-mobile-back { display: none; }
#n-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- Mail (iPad-Mail-Aufbau) */
.mail { display: grid; grid-template-columns: 250px minmax(0, 1fr); height: calc(100dvh - 140px); min-height: 460px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: rgba(var(--panel-rgb), var(--mod-alpha)); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.mail > div { min-height: 0; overflow: auto; }
.m-side { border-right: 1px solid var(--line); padding: 10px; }
.m-acc { margin-top: 12px; }
.m-acc-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 4px 6px; }
.m-cat { display: flex; align-items: center; gap: 9px; padding: 6px 8px 6px 10px; border-radius: 9px; cursor: pointer; width: 100%; border: 0; background: none; text-align: left; color: var(--text); }
.m-cat svg { width: 16px; height: 16px; color: var(--accent); }
.m-cat.on { background: var(--sel); }
.m-cat:hover { background: var(--hover); }
.m-cat .n { margin-left: auto; color: var(--faint); font-size: 12px; }
.m-main { position: relative; overflow: hidden !important; display: block; }
.m-list { position: absolute; inset: 0; display: flex; flex-direction: column; }
.m-list-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex: none; }
.small-btn { min-height: 32px; padding: 0 10px; font-size: 13px; }
.m-scroll { flex: 1; overflow: auto; overscroll-behavior: contain; }
.m-swipe { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.m-act { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; padding: 0 22px; font-weight: 700; font-size: 13px; color: #fff; opacity: 0; }
.m-act svg { width: 20px; height: 20px; }
.m-act.left { background: #3f7fd8; justify-content: flex-start; } .m-act.right { background: #8a6a3a; justify-content: flex-end; }
.m-swipe.swiping[data-dir="left"] .m-act.left, .m-swipe.swiping[data-dir="right"] .m-act.right { opacity: .55; }
.m-swipe.arm-left .m-act.left, .m-swipe.arm-right .m-act.right { opacity: 1; }
.m-item { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; cursor: pointer; width: 100%; text-align: left; color: var(--text);
  background: var(--panel-solid); touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: transform .18s ease; }
.m-swipe.swiping .m-item { transition: none; }
.m-item-body { flex: 1; min-width: 0; }
.m-item:hover { background: color-mix(in srgb, var(--panel-solid) 88%, var(--text)); }
.m-item.on, .m-item.picked { background: color-mix(in srgb, var(--panel-solid) 80%, var(--gold)); }
.m-pick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; margin-top: 10px; }
.m-item.picked .m-pick { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.m-quick { position: absolute; right: 10px; top: 8px; display: none; gap: 4px; }
.m-quick button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.m-quick svg { width: 15px; height: 15px; }
@media (hover: hover) { .m-item:hover .m-quick { display: flex; } .editing .m-item:hover .m-quick { display: none; } }
.m-editbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex: none; background: var(--sel); }
.m-list-h b { min-width: 0; }
@media (max-width: 820px) { .m-list-h { flex-wrap: wrap; row-gap: 2px; } .m-list-h b { flex: 1 1 calc(100% - 50px); } .m-list-h .small-btn { margin-left: auto; } .m-list-h .small-btn + .small-btn { margin-left: 0; } }
.m-snack { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 160; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px;
  border-radius: 16px; background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.m-item .from { font-weight: 650; display: flex; gap: 6px; align-items: center; }
.m-item .from span:first-child { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.m-item .subj { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-item .prev { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-item.unread .from::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.m-read { position: absolute; inset: 0; z-index: 2; background: var(--panel-solid); overflow: auto; transform: translateX(102%); transition: transform .25s ease; visibility: hidden; }
.mail[data-pane="read"] .m-read { transform: none; visibility: visible; }
.m-read-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel-solid); }
.m-read-body { padding: 18px 26px 40px; }
.m-read pre { white-space: pre-wrap; font: inherit; line-height: 1.6; }
.acc-tag { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--hover); color: var(--muted); }
.acc-tag.uni { color: var(--wiwi); } .acc-tag.gmail { color: var(--bad); } .acc-tag.icloud { color: var(--test); }

/* ---------------------------------------------------------------- Prüfpunkte */
.review { display: flex; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.review:last-child { border-bottom: 0; }
.review-section { margin-top: 22px; }

/* ---------------------------------------------------------------- Routine */
.steps .step { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.steps .step:last-child { border-bottom: 0; }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.kpis { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi { padding: 10px 14px; border-radius: 12px; background: var(--hover); border: 1px solid var(--line); min-width: 110px; }
.kpi b { font-size: 22px; display: block; }

/* ---------------------------------------------------------------- Befehlspalette */
.palette { width: min(600px, 100%); align-self: flex-start; margin-top: 10vh; }
.palette input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 16px; padding: 14px 16px; box-shadow: none !important; background: transparent; }
.pal-list { max-height: 50vh; overflow: auto; padding: 6px; }
.pal-item { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.pal-item.on { background: var(--sel); }
.kbd { font-size: 11px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 5px; color: var(--muted); }

table.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
table.matrix th, table.matrix td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.matrix th { color: var(--muted); font-weight: 600; font-size: 12px; }

/* ---------------------------------------------------------------- Mobil (iPhone / schmales iPad) */
@media (max-width: 1100px) {
  .notes { grid-template-columns: 180px 240px 1fr; }
  .mail { grid-template-columns: 210px minmax(0, 1fr); }
}
@media (max-width: 820px) {
  /* iPhone: schmale Symbolleiste, Routine-Panel als Überlagerung */
  :root { --rail-w: 62px; }
  #sidebar { position: fixed; left: 0; top: 0; bottom: 0; }
  .brand { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
  .nav-toggle { width: 44px; height: 40px; margin-bottom: 8px; }
  .nav-item { width: 46px; height: 42px; flex-basis: 42px; border-radius: 13px; min-height: 22px; }
  .nav-item svg { width: 19px; height: 19px; }
  #sidebar { gap: 1px; }
  .nav-item:hover::after { display: none; }
  #panel { position: fixed; left: var(--rail-w); top: 0; bottom: 0; z-index: 7; width: min(300px, calc(100vw - var(--rail-w) - 8px)); padding-right: 0; }
  #panel .rpanel { box-shadow: var(--shadow); background: rgba(var(--panel-rgb), .96); }
  #main { margin-left: var(--rail-w); }
  #main { padding: calc(12px + env(safe-area-inset-top)) 12px calc(24px + env(safe-area-inset-bottom)); }
  .searchbar .btn { flex: 1 1 40%; }
  .btn.lg { height: 44px; font-size: 14.5px; padding: 0 14px; }
  .ws h2 { font-size: 28px; }
  .card { padding: 18px; }
  .ws .actions { margin-left: 0; }
  .fields { grid-template-columns: 1fr; }
  .cal-day { min-height: 64px; padding: 3px; }
  .chip { font-size: 0; height: 6px; padding: 0; border-left-width: 0; background: var(--c); }
  .cal-day .more { font-size: 10px; }
  .notes, .mail { grid-template-columns: 1fr; height: calc(100dvh - 40px); }
  .notes > div, .mail > div { display: none; }
  .notes[data-pane="folders"] .n-folders, .notes[data-pane="list"] .n-list, .notes[data-pane="editor"] .n-editor { display: flex; }
  .mail[data-pane="side"] .m-side { display: block; }
  .mail[data-pane="list"] .m-main, .mail[data-pane="read"] .m-main { display: block; }
  .m-read-body { padding: 14px 16px 60px; }
  .n-mobile-back { display: inline-flex; }
  .editor { padding: 14px 16px 60px; }
  .toolbar.mobile-hidden { display: none; }
  .toolbar { max-height: 40vh; overflow: auto; }
  .backdrop { padding: 0; align-items: flex-end; }
  .sheet, .sheet.wide { width: 100%; max-height: calc(100dvh - env(safe-area-inset-top) - 10px); border-radius: 18px 18px 0 0; }
  .sheet-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .tt-ev { font-size: 10px; padding: 2px 3px; } .tt-ev b { font-size: 10.5px; }
  .tt { grid-template-columns: 34px repeat(5, 1fr); }
  h1 { font-size: 22px; }
}
@media (min-width: 821px) { .mobile-only { display: none !important; } }
@media (max-height: 640px) { .nav-item { height: 30px; flex-basis: 30px; } }

/* Kennzeichnung erfundener Testdaten */
.testmark { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 1px 5px; border-radius: 5px;
  background: rgba(127, 166, 214, .2); color: var(--test); border: 1px dashed rgba(127, 166, 214, .6); vertical-align: 1px; }
.chip.test, .tt-ev.test { outline: 1px dashed rgba(127, 166, 214, .7); outline-offset: -1px; }

/* OPAL-Anmeldung über den Server-Browser */
.opal-login.sheet { width: min(1100px, 100%); }
.rb-bar { margin-bottom: 8px; }
.rb-view { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-strong); background: #fff; outline: none; aspect-ratio: 1024 / 720; max-height: 62vh; margin: 0 auto; }
.rb-view:focus { box-shadow: 0 0 0 3px rgba(205, 213, 164, .45); }
.rb-view img { width: 100%; height: 100%; display: block; cursor: pointer; user-select: none; -webkit-user-select: none; }
.rb-keys { margin-top: 10px; }

/* Reiterleiste innerhalb einer Unterwebsite */
#subnav { max-width: 1400px; margin: 0 auto 16px; display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none;
  padding: 5px; border-radius: 16px; background: rgba(var(--panel-rgb), var(--mod-alpha)); border: 1px solid var(--line);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); width: fit-content; max-width: 100%; }
#subnav:empty { display: none; }
#subnav::-webkit-scrollbar { display: none; }
#subnav .subnav-title { font-weight: 750; font-size: 13px; padding: 0 10px 0 8px; color: var(--muted); white-space: nowrap; }
#subnav a { white-space: nowrap; padding: 7px 13px; border-radius: 11px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 13.5px; }
#subnav a:hover { background: var(--hover); }
#subnav a.on { background: var(--sel); box-shadow: inset 0 0 0 1px var(--sel-line); }
/* Wochenleiste im Studienplaner */
.weekbar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.wday { border: 1px solid var(--line); background: var(--hover); border-radius: 14px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--text); }
.wday b { font-size: 22px; } .wday.today { border-color: var(--sel-line); background: var(--sel); }
/* Besuchervorschau: nur lesen */
body.visitor .owner-only, body.visitor #musicbar, body.visitor #panel { display: none !important; }
/* Neue Version: sanftes Ausblenden vor dem Neuladen */
body.reloading #shell { opacity: 0; transition: opacity .2s ease; }

/* Routine-Knopf in der Studienplaner-Übersicht: am Laptop kompakt, am Telefon volle Breite */
@media (min-width: 821px) { .studium-run { max-width: 340px; } .studium-run .run-main { min-height: 50px; } }

/* ---------------------------------------------------------------- Ablage im Explorer-Aufbau (abgerundet) */
.explorer { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 10px; height: calc(100vh - 150px); min-height: 520px; }
.ex-toolbar, .ex-address, .ex-status { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: rgba(var(--panel-rgb), var(--mod-alpha)); border: 1px solid var(--line); border-radius: 18px; padding: 7px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.ex-status { padding: 6px 14px; border-radius: 14px; gap: 14px; }
.ex-tool { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 12px; border: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; }
.ex-tool svg { width: 17px; height: 17px; }
.ex-tool:hover:not(:disabled) { background: var(--hover); }
.ex-tool:disabled { opacity: .38; cursor: default; }
.ex-tool.primary { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.ex-tool.danger:not(:disabled) { color: var(--bad); }
.ex-tool.on { background: var(--sel); }
.ex-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.ex-viewseg { padding: 2px; } .ex-viewseg button { min-height: 32px; padding: 0 10px; } .ex-viewseg svg { width: 16px; height: 16px; }
.ex-address .btn.icon { min-height: 34px; width: 34px; border-radius: 11px; }
.ex-crumbs { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; background: var(--input); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; overflow: hidden; white-space: nowrap; }
.ex-crumbs svg { width: 16px; height: 16px; color: var(--gold); flex: none; }
.ex-crumbs button { border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; padding: 3px 6px; border-radius: 8px; } .ex-crumbs button:hover { background: var(--hover); }
.ex-address .ex-search { flex: 0 1 300px; width: 300px; min-width: 180px; min-height: 36px; border-radius: 12px; }
.ex-address { flex-wrap: nowrap; }
.ex-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 10px; min-height: 0; }
.explorer.with-pane .ex-body { grid-template-columns: 220px minmax(0, 1fr) 260px; }
.ex-nav, .ex-main, .ex-pane { background: rgba(var(--panel-rgb), var(--mod-alpha)); border: 1px solid var(--line); border-radius: 20px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); min-height: 0; overflow: auto; }
.ex-nav { padding: 8px; display: flex; flex-direction: column; gap: 1px; }
.ex-nav-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 10px 10px 4px; }
.ex-nav-item { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 0 10px; border: 0; border-radius: 11px; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.ex-nav-item svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.ex-nav-item:hover, .ex-nav-item.drop { background: var(--hover); }
.ex-nav-item.on { background: var(--sel); box-shadow: inset 0 0 0 1px var(--sel-line); }
.ex-nav-item.on svg, .ex-nav-item[data-drop] svg { color: var(--gold); }
.ex-main { padding: 6px; outline: none; position: relative; }
.ex-main.drop { box-shadow: inset 0 0 0 2px var(--sel-line); }
.ex-table { --cols: minmax(220px, 1fr) 150px 170px 80px; font-size: 13.5px; }
.ex-table.with-folder { --cols: minmax(200px, 1fr) 150px 160px 80px 120px; }
.ex-head, .ex-row { display: grid; grid-template-columns: var(--cols); align-items: center; gap: 10px; padding: 0 10px; }
.ex-head { position: sticky; top: -6px; z-index: 1; background: var(--panel-solid); border-radius: 12px; margin-bottom: 3px; }
.ex-th { display: flex; align-items: center; gap: 6px; min-height: 32px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left; padding: 0; }
.ex-th.on { color: var(--text); } .ex-arrow { font-size: 9px; color: var(--gold); }
.ex-row { min-height: 40px; border-radius: 11px; cursor: default; user-select: none; -webkit-user-select: none; }
.ex-row:hover { background: var(--hover); }
.ex-row.sel, .ex-tile.sel { background: var(--sel); box-shadow: inset 0 0 0 1px var(--sel-line); }
.ex-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ex-name .file-ic { width: 26px; height: 26px; border-radius: 8px; font-size: 8px; }
.ex-fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ex-c { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.ex-size { text-align: right; }
.ex-star { color: var(--gold); font-size: 12px; } .ex-web svg { width: 13px; height: 13px; color: var(--accent-ink); }
.file-ic[style*="--fc"] { background: color-mix(in srgb, var(--fc) 22%, transparent); color: var(--fc); }
.file-ic.big { width: 72px; height: 72px; border-radius: 18px; font-size: 14px; } .file-ic.big svg { width: 30px; height: 30px; }
.ex-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.ex-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border-radius: 16px; text-align: center; user-select: none; -webkit-user-select: none; position: relative; }
.ex-tile:hover { background: var(--hover); }
.ex-tile .ex-fn { max-width: 100%; font-size: 12.5px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ex-tile .ex-star { position: absolute; top: 8px; right: 12px; }
.ex-empty { display: grid; place-items: center; align-content: center; gap: 4px; height: 100%; min-height: 240px; color: var(--muted); text-align: center; }
.ex-empty svg { width: 40px; height: 40px; color: var(--faint); } .ex-empty p { margin: 0; }
.ex-pane { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.ex-prev { display: grid; place-items: center; min-height: 140px; border-radius: 16px; background: var(--hover); margin-bottom: 8px; }
.ex-prev .file-ic.big { width: 100%; height: 150px; border-radius: 14px; }
.ex-prev > svg { width: 44px; height: 44px; }
.ex-pane-name { word-break: break-word; }
.ex-props { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12.5px; margin: 10px 0; }
.ex-props dt { color: var(--faint); } .ex-props dd { margin: 0; word-break: break-word; }
@media (max-width: 1100px) { .explorer.with-pane .ex-body { grid-template-columns: 200px minmax(0, 1fr); } .explorer .ex-pane { display: none; } .ex-tool span { display: none; } .ex-tool.primary span { display: inline; } }
@media (max-width: 820px) {
  .explorer { height: auto; min-height: 0; grid-template-rows: auto; }
  .ex-body, .explorer.with-pane .ex-body { grid-template-columns: 1fr; }
  .ex-nav { flex-direction: row; overflow-x: auto; padding: 6px; border-radius: 16px; }
  .ex-nav-h, #ex-newf2 { display: none; }
  .ex-nav-item { width: auto; flex: none; white-space: nowrap; }
  .ex-address { flex-wrap: wrap; }
  .ex-address .ex-search { flex: 1 1 100%; width: 100%; order: 5; }
  .ex-toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .ex-toolbar::-webkit-scrollbar { display: none; }
  .ex-tool { flex: none; } .ex-toolbar .grow { display: none; }
  .ex-sep, #ex-pane, .ex-status .faint { display: none; }
  .ex-main { min-height: 50vh; }
  .ex-table, .ex-table.with-folder { --cols: minmax(0, 1fr) 70px; }
  .ex-table .ex-c:not(.ex-size), .ex-head .ex-th:not([data-sort=name]):not([data-sort=size]) { display: none; }
  .ex-row { min-height: 46px; }
}

/* ---------------------------------------------------------------- Einordnen („In Website öffnen“) */
.ein-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; margin-bottom: 10px; border-radius: 18px; text-decoration: none; color: var(--text);
  background: var(--sel); border: 1px solid var(--sel-line); }
.ein-banner svg { width: 18px; height: 18px; color: var(--gold); }
.ein-files { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 16px; }
.ein-file { flex: none; width: 120px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 8px; border-radius: 18px;
  background: rgba(var(--panel-rgb), var(--mod-alpha)); border: 1px solid var(--line); }
.ein-file .small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ein-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.ein-grid h2 { display: flex; align-items: center; gap: 8px; } .ein-grid h2 svg { width: 20px; height: 20px; color: var(--gold); }
.ein-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--hover); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ein-opt:hover { border-color: var(--line-strong); }
.ein-opt.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }

/* Kacheln direkt auf dem Hintergrundbild (z. B. Unterhaltung): so deckend wie die Module */
.proj.solid { background: rgba(var(--panel-rgb), max(var(--mod-alpha), .78)); backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); border-radius: var(--radius); }
.proj.solid:hover { border-color: var(--line-strong); }

/* Pfad oben links an das Hintergrundbild angepasst (app.js misst die Helligkeit dahinter) */
body.crumbs-dark #crumbs, body.crumbs-dark #crumbs a, body.crumbs-dark #crumbs .sep { color: rgba(20, 17, 14, .72); text-shadow: 0 0 8px rgba(255, 250, 240, .55); }
body.crumbs-dark #crumbs [aria-current], body.crumbs-dark #crumbs a:hover { color: #14110e; }
body.crumbs-light #crumbs, body.crumbs-light #crumbs a, body.crumbs-light #crumbs .sep { color: rgba(255, 250, 242, .78); text-shadow: 0 1px 8px rgba(0, 0, 0, .55); }
body.crumbs-light #crumbs [aria-current], body.crumbs-light #crumbs a:hover { color: #fffaf2; }

.home-grid .span2 { grid-column: span 2; }
@media (max-width: 1100px) { .home-grid .span2 { grid-column: 1 / -1; } }

/* Besuchervorschau: kleiner, unauffälliger Knopf in der Leiste */
.ownerbar .visitor-btn { min-height: 34px; padding: 0 10px; gap: 6px; font-size: 12.5px; color: var(--muted); border-color: transparent; background: transparent; }
.ownerbar .visitor-btn svg { width: 15px; height: 15px; }
.ownerbar .visitor-btn:hover { color: var(--text); background: var(--hover); }

/* ---------------------------------------------------------------- Datum-/Zeitauswahl (statt Eintippen) */
input.dtp-input { cursor: pointer; caret-color: transparent; }
input.dtp-input::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.dtp { position: fixed; z-index: 200; width: 288px; padding: 12px; border-radius: 18px; background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 14px; }
.dtp button { font: inherit; color: var(--text); background: none; border: 0; cursor: pointer; border-radius: 10px; }
.dtp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dtp-head button { width: 32px; height: 32px; font-size: 20px; } .dtp-head button:hover { background: var(--hover); }
.dtp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dtp-wd span { font-size: 11px; color: var(--faint); font-weight: 700; padding: 4px 0; }
.dtp-grid button { height: 34px; } .dtp-grid button:hover { background: var(--hover); }
.dtp-grid button.today { color: var(--gold); font-weight: 800; }
.dtp-grid button.on { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.dtp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dtp-quick button { padding: 6px 10px; border: 1px solid var(--line); background: var(--hover); font-size: 12.5px; }
.dtp-quick button:hover { border-color: var(--line-strong); }
.dtp-time .dtp-quick { margin: 0 0 10px; }
.dtp-cols { display: flex; align-items: center; justify-content: center; gap: 6px; }
.dtp-col { position: relative; height: 190px; width: 84px; overflow-y: auto; scroll-snap-type: y mandatory; border-radius: 14px; background: var(--hover); padding: 4px; scrollbar-width: none; }
.dtp-col::-webkit-scrollbar { display: none; }
.dtp-col button { display: block; width: 100%; height: 36px; scroll-snap-align: center; font-size: 17px; font-variant-numeric: tabular-nums; }
.dtp-col button:hover { background: var(--hover); }
.dtp-col button.on { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.dtp-colon { font-size: 22px; font-weight: 700; color: var(--muted); }
.dtp-foot { display: flex; justify-content: space-between; margin-top: 10px; }
.dtp-foot .btn { min-height: 34px; }

/* Werdegang: Zeitstrahl mit Jahr am Punkt, Station dazwischen.
   Die Linie besteht aus Abschnitten je Eintrag, damit laufende Stationen gestrichelt sein können. */
.yearline { list-style: none; margin: 6px 0 16px; padding: 0 0 0 26px; }
.yearline li { position: relative; }
.yearline li::after { content: ""; position: absolute; left: -20px; top: 0; bottom: 0; border-left: 2px solid var(--line-strong); }
.yearline li:first-child::after { top: 50%; }
.yearline li:last-child::after { bottom: 50%; }
.yl-dot { height: 22px; display: flex; align-items: center; }
.yl-dot::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; box-sizing: border-box; border-radius: 50%; background: var(--accent); z-index: 1; }
.yl-dot span { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: var(--gold); font-variant-numeric: tabular-nums; }
.yl-dot.yl-future::before { background: var(--panel-solid); border: 2px dashed var(--accent); }
.yl-dot.yl-future span { color: var(--muted); font-weight: 700; letter-spacing: 0; }
.yl-dot.yl-future::after, .yl-station.running::after { border-left-style: dashed; border-left-color: var(--accent); }
.yl-station { padding: 8px 0 12px; }
.yl-station::before { content: ""; position: absolute; left: -18px; top: 50%; width: 10px; height: 2px; background: var(--line-strong); }
.yl-station.running::before { background: var(--accent); opacity: .7; }
.yl-run { margin-right: 4px; vertical-align: 1px; }

/* ---------------------------------------------------------------- Musik (nach dem Vorbild von Apple Music) */
.m-art { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; background: center/cover no-repeat; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.m-art.ph { background-image: linear-gradient(135deg, hsl(var(--h) 45% 38%), hsl(calc(var(--h) + 40) 50% 22%)); color: rgba(255, 255, 255, .8); }
.m-art.ph svg { width: 45%; height: 45%; }
.m-art.round { border-radius: 50%; }
.mb-art { width: 42px; height: 42px; border-radius: 9px; }
/* Jetzt läuft */
.np { position: fixed; inset: 0; z-index: 120; display: flex; justify-content: center; transform: translateY(105%); transition: transform .38s cubic-bezier(.2, .8, .2, 1); color: #fff; touch-action: pan-x; }
.np.open { transform: none; }
.np-bg { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 10%, #5a4a3a 0%, #1f1a16 70%, #0d0c0b 100%); transition: background .6s; }
.np-bg::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .18); }
.np-inner { position: relative; width: min(460px, 100%); height: 100%; display: flex; flex-direction: column; padding: calc(10px + env(safe-area-inset-top)) 28px calc(24px + env(safe-area-inset-bottom)); gap: 14px; }
.np button { color: inherit; background: none; border: 0; cursor: pointer; font: inherit; }
.np-grab { align-self: center; padding: 8px 30px; } .np-grab span { display: block; width: 40px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .45); }
.np-cover { flex: 1; min-height: 0; display: grid; place-items: center; }
.np-art { width: min(100%, 52vh); height: auto; aspect-ratio: 1; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.np-cover.paused .np-art { transform: scale(.82); }
.np-titlebar { display: flex; align-items: center; gap: 12px; }
.np-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.np-meta b { font-size: 21px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-meta span { font-size: 18px; color: rgba(255, 255, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-more { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .16) !important; font-size: 12px !important; letter-spacing: 1px; }
.np input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: linear-gradient(to right, rgba(255,255,255,.85) var(--p, 0%), rgba(255,255,255,.25) var(--p, 0%)); outline: none; margin: 0; padding: 0; min-height: 0; border: 0; }
.np input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .15s; }
.np input[type=range]:hover::-webkit-slider-thumb, .np input[type=range]:active::-webkit-slider-thumb { opacity: 1; }
.np input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.np-times { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; }
.np-ctrl { display: flex; align-items: center; justify-content: space-evenly; }
.np-ctrl button { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; }
.np-ctrl button:active { background: rgba(255, 255, 255, .12); }
.np-ctrl svg { width: 34px; height: 34px; fill: currentColor; }
.np-ctrl .big svg { width: 48px; height: 48px; }
.np-vol { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .7); } .np-vol svg { width: 18px; height: 18px; flex: none; }
.np-foot { display: flex; justify-content: space-between; } .np-foot button { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: rgba(255, 255, 255, .75); }
.np-foot button.on { background: rgba(255, 255, 255, .2); color: #fff; } .np-foot svg { width: 22px; height: 22px; }
.np-top { display: flex; align-items: center; gap: 12px; } .np-art-s { width: 64px; height: 64px; border-radius: 10px; }
.np-top .np-meta b { font-size: 17px; } .np-top .np-meta span { font-size: 15px; }
.np-qhead { display: flex; align-items: center; gap: 8px; margin-top: 4px; } .np-qhead b { font-size: 17px; }
.np-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px !important; border-radius: 12px; background: rgba(255, 255, 255, .14) !important; font-size: 12.5px !important; }
.np-chip svg { width: 15px; height: 15px; } .np-chip.on { background: rgba(255, 255, 255, .85) !important; color: #1a1714; }
.np-queue { flex: 1; min-height: 0; overflow: auto; margin: 0 -8px; padding: 0 8px; touch-action: pan-y; }
.np-q { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 12px; cursor: pointer; transition: transform .15s; background: transparent; }
.np-q:hover { background: rgba(255, 255, 255, .08); } .np-q.dragging { transition: none; background: rgba(255, 255, 255, .16); z-index: 2; position: relative; }
.np-q b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .np-q span span, .np-q .grow > span { font-size: 13px; color: rgba(255, 255, 255, .6); }
.np-q .grow { min-width: 0; } .np-art-xs { width: 42px; height: 42px; border-radius: 7px; }
.np-handle { padding: 6px 4px 6px 10px; font-size: 20px; color: rgba(255, 255, 255, .5); cursor: grab; touch-action: none; user-select: none; }
.np-qrm { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; opacity: .55; } .np-qrm:hover { opacity: 1; background: rgba(255,255,255,.12) !important; } .np-qrm svg { width: 14px; height: 14px; }
.np-empty { color: rgba(255, 255, 255, .55); font-size: 14px; padding: 8px 6px; }
/* Mediathek */
.ml-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; } .ml-bar input[type=search] { flex: 1; min-width: 180px; max-width: 360px; }
.ml-card { padding: 10px; }
.ml-play { display: flex; gap: 8px; margin: 4px 6px 12px; } .ml-play .btn { min-width: 140px; justify-content: center; }
.ml-row { position: relative; overflow: hidden; border-radius: 12px; }
.ml-act { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; padding: 0 20px; font-weight: 700; font-size: 13px; color: #fff; opacity: 0; }
.ml-act svg { width: 18px; height: 18px; } .ml-act.left { background: #8a63d2; } .ml-act.right { background: #d2783a; justify-content: flex-end; }
.ml-row.swiping[data-dir="left"] .ml-act.left, .ml-row.swiping[data-dir="right"] .ml-act.right { opacity: .55; } .ml-row.arm .ml-act { opacity: 1 !important; }
.ml-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 12px; cursor: pointer; background: var(--panel-solid); touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: transform .18s; }
.ml-row.swiping .ml-item { transition: none; }
.ml-item:hover { background: color-mix(in srgb, var(--panel-solid) 90%, var(--text)); } .ml-item.on b { color: var(--gold); }
.ml-art { width: 46px; height: 46px; } .ml-txt { min-width: 0; display: flex; flex-direction: column; }
.ml-txt b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ml-txt span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-eq svg { width: 16px; height: 16px; color: var(--gold); }
.ml-more { width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; letter-spacing: 1px; font-size: 11px; } .ml-more:hover { background: var(--hover); color: var(--text); }
.ml-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; padding: 6px; }
.ml-album { display: flex; flex-direction: column; gap: 3px; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; padding: 0; font: inherit; min-width: 0; }
.ml-album b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 6px; } .ml-album span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-cover { width: 100%; height: auto; aspect-ratio: 1; border-radius: 10px; } .ml-cover-l { width: 180px; height: 180px; border-radius: 12px; }
.ml-artist { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: none; color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.ml-artist:hover { background: var(--hover); } .ml-artist > svg { width: 16px; height: 16px; color: var(--faint); }
.ml-hero { display: flex; align-items: flex-end; gap: 20px; padding: 10px 8px 16px; flex-wrap: wrap; } .ml-hero h2 { font-size: 26px; margin: 0 0 4px; } .ml-hero .ml-play { margin: 12px 0 0; }
@media (max-width: 820px) { .ml-cover-l { width: 140px; height: 140px; } .np-inner { padding-left: 22px; padding-right: 22px; } }

/* Fotos in Notizen und Seiten */
.editor img, .page-body img, .prose img { max-width: 100%; height: auto; border-radius: 12px; display: block; margin: 6px 0; }

/* Einträge der Routine: bestätigen oder entfernen */
.trust-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; background: var(--warn-bg); border: 1px solid var(--warn-line); }
.trust-box .grow { min-width: 200px; }
.trust-ok { margin: 0 0 10px; }
.tt-ev.unconfirmed { outline: 1.5px dashed var(--warn); outline-offset: -2px; }

/* iOS-App mit eigener Tab-Leiste: Seitenleiste und Routine-Leiste des Portals ausblenden (Navigation macht die App) */
.ios-tabs #sidebar, .ios-tabs #panel { display: none !important; }

/* Rechner (nach dem Vorbild von Apples Rechner, eigene Gestaltung) */
.calc { max-width: 380px; margin: 8px auto 0; padding: 18px; border-radius: 28px; background: rgba(0,0,0,.55); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.calc-out { text-align: right; color: #fff; font-weight: 300; padding: 18px 10px 14px; min-height: 92px; overflow: hidden; white-space: nowrap; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.calc-k { aspect-ratio: 1; border-radius: 50%; border: 0; font-size: 30px; background: #333230; color: #fff; cursor: pointer; transition: filter .1s; touch-action: manipulation; }
.calc-k:active { filter: brightness(1.5); }
.calc-k.fn { background: #a5a4a0; color: #111; font-size: 24px; }
.calc-k.op { background: var(--accent, #cdd6a4); color: #1c210f; font-size: 34px; }
.calc-k.op.on { background: #fff; color: var(--accent-ink, #6b7340); }
.calc-k.wide { grid-column: span 2; aspect-ratio: auto; border-radius: 999px; text-align: left; padding-left: 30px; }
