/* =========================================================================
   Tarko – Oberfläche
   Ruhig und fotografisch: Das Hintergrundbild (gerenderte Alpenlandschaft)
   ist das Einzige, das laut sein darf. Alles andere ist Material und Schrift.
   - Chrom (Leiste, Dock, Widgets, Seitenleisten): durchscheinend
   - Inhalt (Fenster, Dialoge): fast deckend, damit man gut liest
   - Akzent: Bergsee-Blau, sparsam
   ========================================================================= */

@font-face {
  font-family: "Inter Tarko";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter Tarko", "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter Tarko", "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;

  /* Inhalt */
  --bg: #ffffff;
  --bg-2: #f4f4f6;
  --bg-3: #ebebef;
  --side: rgba(238, 238, 242, .74);
  --label: rgba(0, 0, 0, .87);
  --label-2: rgba(60, 60, 67, .68);
  --label-3: rgba(60, 60, 67, .40);
  --sep: rgba(60, 60, 67, .13);
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .07);
  --hover: rgba(0, 0, 0, .045);
  --tint: #0a6cdb;
  --tint-text: #ffffff;
  --tint-weak: rgba(10, 108, 219, .12);
  --danger: #dc3a30;
  --ok: #2a9b51;
  --warn: #c98100;
  --shadow-win: 0 0 0 .5px rgba(0, 0, 0, .18), 0 22px 70px rgba(0, 0, 0, .32), 0 6px 18px rgba(0, 0, 0, .12);
  --shadow-pop: 0 0 0 .5px rgba(0, 0, 0, .14), 0 12px 40px rgba(0, 0, 0, .22);

  /* Kategorien in der Speicheranzeige */
  --c-photos: #f2a33a;
  --c-videos: #9a5de2;
  --c-documents: #0a6cdb;
  --c-music: #e2456f;
  --c-other: #8e9198;
  --c-trash: #c7c8cd;
  --c-system: #5e6168;

  /* Material auf dem Hintergrundbild (dunkle Bilder) */
  --on-wall: #fff;
  --on-wall-2: rgba(255, 255, 255, .74);
  --on-wall-3: rgba(255, 255, 255, .5);
  --chrome: rgba(22, 24, 34, .32);
  --chrome-line: rgba(255, 255, 255, .16);
  --widget: rgba(24, 26, 38, .38);
  --widget-line: rgba(255, 255, 255, .14);

  --r-win: 16px;
  --r-widget: 24px;
  --r-ctl: 8px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.3, .4, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1d20;
    --bg-2: #161618;
    --bg-3: #29292d;
    --side: rgba(36, 36, 40, .72);
    --label: rgba(255, 255, 255, .92);
    --label-2: rgba(235, 235, 245, .62);
    --label-3: rgba(235, 235, 245, .34);
    --sep: rgba(255, 255, 255, .1);
    --fill: rgba(118, 118, 128, .26);
    --fill-2: rgba(118, 118, 128, .15);
    --hover: rgba(255, 255, 255, .06);
    --tint: #3b8bff;
    --tint-weak: rgba(59, 139, 255, .2);
    --danger: #ff5a4f;
    --ok: #3ccb6c;
    --warn: #f0a92d;
    --c-documents: #3b8bff;
    --c-trash: #55565c;
    --c-system: #8a8d94;
    --shadow-win: 0 0 0 .5px rgba(255, 255, 255, .12), 0 22px 70px rgba(0, 0, 0, .55), 0 6px 18px rgba(0, 0, 0, .3);
    --shadow-pop: 0 0 0 .5px rgba(255, 255, 255, .14), 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

/* Helle Hintergrundbilder (Nebelmeer): dunkle Schrift auf hellem Glas */
body[data-tone="light"] {
  --on-wall: rgba(0, 0, 0, .86);
  --on-wall-2: rgba(0, 0, 0, .6);
  --on-wall-3: rgba(0, 0, 0, .4);
  --chrome: rgba(255, 255, 255, .42);
  --chrome-line: rgba(255, 255, 255, .6);
  --widget: rgba(255, 255, 255, .5);
  --widget-line: rgba(255, 255, 255, .7);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.38;
  color: var(--on-wall);
  background: #1b2236;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: default; }
a { color: var(--tint); }
img, svg, video { display: block; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--tint) 55%, transparent); outline-offset: 1px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: color-mix(in srgb, var(--tint) 35%, transparent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Hintergrundbild ---------- */

#wall { position: fixed; inset: 0; z-index: 0; background: #1b2236 center / cover no-repeat; }
#wall .ph { position: absolute; inset: -40px; background: center / cover no-repeat; filter: blur(24px); transform: scale(1.04); }
#wall img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s var(--ease); }
#wall img.on { opacity: 1; }
#wall::after { /* leichte Abdunklung oben, damit die Leiste lesbar bleibt */
  content: ""; position: absolute; inset: 0 0 auto; height: 160px;
  background: linear-gradient(rgba(0, 0, 0, .16), transparent);
  pointer-events: none;
}
body[data-tone="light"] #wall::after { background: linear-gradient(rgba(255, 255, 255, .2), transparent); }
#app { position: fixed; inset: 0; z-index: 1; }
#overlays { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
#overlays > * { pointer-events: auto; }

/* ---------- Grundbausteine ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 14px; border-radius: 999px; border: 0;
  background: var(--fill); color: var(--label);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background .15s, transform .15s var(--ease), opacity .15s;
}
.btn svg { width: 16px; height: 16px; margin-left: -2px; }
.btn:hover { background: color-mix(in srgb, var(--fill) 100%, var(--label) 6%); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; transform: none; }
.btn.primary { background: var(--tint); color: var(--tint-text); }
.btn.primary:hover { background: color-mix(in srgb, var(--tint) 88%, #000); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); color: #fff; }
.btn.plain { background: transparent; color: var(--tint); padding: 0 8px; }
.btn.plain:hover { background: var(--tint-weak); }
.btn.lg { height: 44px; padding: 0 26px; font-size: 15px; font-weight: 600; }
.btn.block { width: 100%; }

.ibtn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; border: 0;
  background: transparent; color: var(--label-2); flex: none;
}
.ibtn svg { width: 18px; height: 18px; }
.ibtn:hover { background: var(--hover); color: var(--label); }
.ibtn:disabled { opacity: .35; background: transparent; }
.ibtn.on { background: var(--fill); color: var(--label); }

.tf {
  width: 100%; height: 32px; padding: 0 10px; border-radius: 8px;
  border: .5px solid var(--sep); background: var(--bg); color: var(--label);
  box-shadow: inset 0 .5px 1px rgba(0, 0, 0, .04);
}
.tf::placeholder { color: var(--label-3); }
.tf:focus { border-color: transparent; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tint) 45%, transparent); }
.tf.lg { height: 44px; padding: 0 14px; font-size: 15px; border-radius: 12px; background: var(--fill-2); border-color: transparent; }
.tf.code { font-size: 26px; height: 56px; text-align: center; letter-spacing: .35em; font-variant-numeric: tabular-nums; font-weight: 500; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; font-weight: 500; color: var(--label-2); }
.pw { position: relative; }
.pw .tf { padding-right: 40px; }
.pw .eye { position: absolute; right: 4px; top: 50%; translate: 0 -50%; }
.form-error { color: var(--danger); font-size: 12.5px; min-height: 1px; }
.form-error:empty { display: none; }
.hint { color: var(--label-2); font-size: 12px; margin: 8px 4px 0; }

.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--fill); gap: 2px; }
.seg button {
  border: 0; background: transparent; height: 26px; padding: 0 12px; border-radius: 7px;
  color: var(--label); font-weight: 500; font-size: 12.5px;
}
.seg button.on { background: var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(0, 0, 0, .05); }
.seg.icons button { padding: 0 8px; display: grid; place-items: center; }
.seg.icons svg { width: 17px; height: 17px; }

.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--fill); transition: background .2s; pointer-events: none; }
.switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: translate .22s var(--spring);
}
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { translate: 16px 0; }
.switch input:focus-visible + i { outline: 3px solid color-mix(in srgb, var(--tint) 55%, transparent); }

.bar { position: relative; height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; display: flex; }
.bar > i { display: block; height: 100%; background: var(--tint); transition: width .5s var(--ease); }
.bar > i + i { box-shadow: -1px 0 0 var(--bg); }
.bar.indet > i { width: 30% !important; animation: indet 1.3s ease-in-out infinite; border-radius: 99px; }
@keyframes indet { from { translate: -100% 0; } to { translate: 340% 0; } }

.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--fill); border-top-color: var(--label-2); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { rotate: 360deg; } }

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--fill); color: var(--label-2); white-space: nowrap; }
.badge.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.badge.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.badge.bad { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.badge.tint { background: var(--tint-weak); color: var(--tint); }

.avatar {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none;
  font-size: 11.5px; font-weight: 600; color: #fff; letter-spacing: .02em;
  background: linear-gradient(180deg, #9aa0ab, #6e737d);
}
.avatar.c1 { background: linear-gradient(180deg, #6fb2ff, #2f74e0); }
.avatar.c2 { background: linear-gradient(180deg, #ffb36b, #e8772e); }
.avatar.c3 { background: linear-gradient(180deg, #7bd88f, #2f9e55); }
.avatar.c4 { background: linear-gradient(180deg, #c99bff, #8051d6); }
.avatar.lg { width: 56px; height: 56px; font-size: 21px; }
.avatar.xl { width: 72px; height: 72px; font-size: 26px; }

.empty { display: grid; place-items: center; align-content: center; gap: 6px; padding: 48px 24px; text-align: center; height: 100%; color: var(--label-2); }
.empty svg { width: 44px; height: 44px; color: var(--label-3); margin-bottom: 6px; stroke-width: 1.3; }
.empty h3 { margin: 0; font-size: 17px; font-weight: 600; color: var(--label); letter-spacing: -.01em; }
.empty p { margin: 0 0 10px; max-width: 34ch; }

/* ---------- Toasts ---------- */

#toasts { position: fixed; left: 50%; bottom: 104px; translate: -50% 0; z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 10px 8px 16px; border-radius: 14px;
  background: rgba(30, 30, 34, .9); color: #fff; font-weight: 500; pointer-events: auto;
  backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .3); max-width: min(560px, 92vw);
  animation: toastIn .35s var(--spring);
}
.toast:not(:has(button)):not(:has(.bar)) { padding-right: 16px; }
.toast.err { background: rgba(150, 30, 28, .92); }
.toast button { border: 0; background: rgba(255, 255, 255, .16); color: #fff; height: 26px; padding: 0 12px; border-radius: 8px; font-weight: 600; }
.toast button:hover { background: rgba(255, 255, 255, .26); }
.toast .bar { width: 120px; background: rgba(255, 255, 255, .2); }
.toast .bar i { background: #fff; }
.toast .pct { width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; opacity: .8; }
.toast.out { opacity: 0; translate: 0 6px; transition: .2s; }
@keyframes toastIn { from { opacity: 0; translate: 0 12px; scale: .96; } }

/* ---------- Dialoge ---------- */

.scrim {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 20px;
  background: rgba(0, 0, 0, .28); animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: min(440px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  background: var(--bg); color: var(--label); border-radius: 18px; padding: 22px;
  box-shadow: var(--shadow-win); animation: sheetIn .32s var(--spring);
}
.sheet.wide { width: min(560px, 100%); }
@keyframes sheetIn { from { opacity: 0; scale: .94; } }
.sheet > .sicon { width: 56px; height: 56px; margin: 4px auto 14px; }
.sheet > .sicon svg { width: 56px; height: 56px; }
.sheet h2 { margin: 0 0 6px; font-size: 17px; font-weight: 650; letter-spacing: -.012em; text-align: center; }
.sheet > p { margin: 0 0 16px; color: var(--label-2); text-align: center; }
.sheet .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.sheet .acts .btn { min-width: 92px; }
.sheet.center .acts { justify-content: center; }
.sheet .body { display: grid; gap: 12px; }

/* ---------- Menüs ---------- */

.menu {
  position: fixed; min-width: 200px; padding: 5px; border-radius: 11px; z-index: 300;
  background: color-mix(in srgb, var(--bg) 82%, transparent); color: var(--label);
  backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: var(--shadow-pop); animation: menuIn .14s var(--ease);
}
@keyframes menuIn { from { opacity: 0; scale: .97; } }
.menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; height: 28px; padding: 0 10px; border: 0; border-radius: 6px;
  background: transparent; text-align: left; font-size: 13px; white-space: nowrap;
}
.menu-item svg { width: 16px; height: 16px; color: var(--label-2); }
.menu-item:hover, .menu-item:focus-visible { background: var(--tint); color: #fff; outline: 0; }
.menu-item:hover svg, .menu-item:focus-visible svg { color: #fff; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger svg { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger); color: #fff; }
.menu-sep { height: 1px; margin: 5px 8px; background: var(--sep); }
.menu .who { padding: 8px 10px 10px; display: grid; gap: 1px; }
.menu .who b { font-size: 13px; font-weight: 600; }
.menu .who small { color: var(--label-2); font-size: 12px; }

/* =========================================================================
   Ersteinrichtung, Anmeldung, Einladung
   ========================================================================= */

.onb { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; overflow: auto; }
.onb-mark { position: fixed; top: 22px; left: 26px; display: flex; align-items: center; gap: 9px; color: var(--on-wall); opacity: 0; transition: opacity .6s; z-index: 2; }
.onb-mark.show { opacity: 1; }
.onb-mark svg { width: 22px; height: 22px; }
.onb-mark b { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.02em; }

/* Begrüssung */
.hello { display: grid; justify-items: center; gap: 44px; text-align: center; }
.hello-word {
  font-family: var(--font-display); font-size: clamp(64px, 11vw, 148px); font-weight: 600; letter-spacing: -.045em; line-height: 1;
  color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, .25); min-height: 1.2em; white-space: nowrap;
}
.hello .btn { opacity: 0; translate: 0 8px; transition: opacity .6s, translate .6s var(--ease); pointer-events: none; }
.hello .btn.show { opacity: 1; translate: 0; pointer-events: auto; }
.btn.glass {
  background: rgba(255, 255, 255, .2); color: #fff; border: .5px solid rgba(255, 255, 255, .4);
  backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 30px rgba(0, 0, 0, .18);
}
.btn.glass:hover { background: rgba(255, 255, 255, .3); }
.hello-skip { position: fixed; right: 24px; bottom: 22px; border: 0; background: none; color: rgba(255, 255, 255, .7); font-size: 13px; padding: 6px 8px; border-radius: 8px; }
.hello-skip:hover { color: #fff; background: rgba(255, 255, 255, .12); }

/* Karte für die Schritte */
.panel {
  width: min(520px, 100%); padding: 36px 40px 32px; border-radius: 28px; color: var(--label);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(40px) saturate(1.8); -webkit-backdrop-filter: blur(40px) saturate(1.8);
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .3), 0 30px 90px rgba(0, 0, 0, .3);
  display: grid; gap: 22px;
}
.panel.step-enter { animation: stepIn .55s var(--ease) both; }
.panel.step-leave { animation: stepOut .3s ease-in both; }
@keyframes stepIn { from { opacity: 0; translate: 0 18px; scale: .985; } }
@keyframes stepOut { to { opacity: 0; translate: 0 -10px; scale: .99; } }
.panel .head { display: grid; gap: 8px; text-align: center; justify-items: center; }
.panel h1 { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.panel .lead { margin: 0; color: var(--label-2); font-size: 15px; max-width: 38ch; line-height: 1.45; }
.panel > .lead { text-align: center; margin: 0 auto; }
.panel form { display: grid; gap: 14px; }
.panel .acts { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 4px; }
.panel .acts .grow { flex: 1; }
.panel .foot { text-align: center; color: var(--label-3); font-size: 12px; }
.progress-dots { display: flex; gap: 6px; justify-content: center; }
.progress-dots i { width: 22px; height: 4px; border-radius: 2px; background: var(--fill); transition: background .3s; }
.progress-dots i.done { background: color-mix(in srgb, var(--tint) 45%, transparent); }
.progress-dots i.on { background: var(--tint); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 0; height: 28px; padding: 0 12px; border-radius: 99px; background: var(--fill-2); color: var(--label); font-size: 12.5px; font-weight: 500; }
.chip:hover { background: var(--fill); }

/* Das Gerät als Produktbild */
.device { width: 220px; height: 170px; margin: -8px auto -6px; }
.device svg { width: 100%; height: 100%; overflow: visible; }
.device.sm { width: 140px; height: 108px; margin: -10px auto -12px; }
.device .led { animation: ledBreath 3.2s ease-in-out infinite; }
@keyframes ledBreath { 50% { opacity: .45; } }
.device-rise { animation: rise 1.1s var(--ease) both; }
@keyframes rise { from { opacity: 0; translate: 0 26px; } }

/* Daten mitbringen */
.sources { display: grid; gap: 8px; }
.source {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px;
  border: 0; background: var(--fill-2); text-align: left; color: var(--label); width: 100%;
}
.source:hover { background: var(--fill); }
.logo { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.logo svg { width: 24px; height: 24px; }
.cell .logo { width: 30px; height: 30px; border-radius: 8px; }
.cell .logo svg { width: 18px; height: 18px; }
.sheet > .sicon .logo { width: 56px; height: 56px; border-radius: 14px; }
.sheet > .sicon .logo svg { width: 32px; height: 32px; stroke-width: 1.7; }
.source b { display: block; font-size: 14px; font-weight: 600; }
.source small { display: block; color: var(--label-2); font-size: 12.5px; }
.source .state { color: var(--label-2); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.source .state svg { width: 16px; height: 16px; }
.source .state.ok { color: var(--ok); }
.source[aria-disabled="true"] { opacity: .55; }

.steps-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: s; }
.steps-list li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; counter-increment: s; color: var(--label); }
.steps-list li::before {
  content: counter(s); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--fill); font-size: 12px; font-weight: 650; color: var(--label-2);
}
.steps-list small { display: block; color: var(--label-2); }
.devcode {
  font-size: 30px; font-weight: 650; letter-spacing: .12em; text-align: center; padding: 14px; border-radius: 14px;
  background: var(--fill-2); font-variant-numeric: tabular-nums; user-select: all;
}
.waiting { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--label-2); }

.drop {
  display: grid; place-items: center; gap: 6px; padding: 22px; border-radius: 14px; text-align: center;
  border: 1.5px dashed var(--sep); color: var(--label-2);
}
.drop.over { border-color: var(--tint); background: var(--tint-weak); color: var(--tint); }
.drop svg { width: 28px; height: 28px; }
.zips { display: grid; gap: 4px; max-height: 180px; overflow: auto; }
.zip-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.zip-row:hover { background: var(--hover); }
.zip-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zip-row small { color: var(--label-2); }

.done-mark { width: 84px; height: 84px; margin: 0 auto; }
.done-mark circle { fill: none; stroke: var(--ok); stroke-width: 3; stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1s var(--ease) .1s forwards; }
.done-mark path { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s var(--ease) .8s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* =========================================================================
   Schreibtisch
   ========================================================================= */

.desk { position: absolute; inset: 0; }

/* Obere Leiste */
.menubar {
  position: absolute; inset: 0 0 auto; height: 32px; z-index: 50; display: flex; align-items: center; gap: 4px; padding: 0 10px 0 14px;
  background: var(--chrome); color: var(--on-wall);
  backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8);
  border-bottom: .5px solid var(--chrome-line);
  font-weight: 500;
}
.menubar .dev { display: flex; align-items: center; gap: 8px; font-weight: 650; margin-right: auto; min-width: 0; }
.menubar .dev svg { width: 18px; height: 18px; flex: none; }
.menubar .dev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 6px; border: 0;
  background: transparent; color: inherit; font-weight: 500; white-space: nowrap;
}
.mb-btn:hover, .mb-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .16); }
body[data-tone="light"] .mb-btn:hover { background: rgba(0, 0, 0, .07); }
.mb-btn svg { width: 16px; height: 16px; }
.mb-btn .avatar { width: 22px; height: 22px; font-size: 9.5px; }
.mb-btn.status svg { width: 17px; height: 17px; }
.mb-btn .ring { width: 15px; height: 15px; }
.clock { font-variant-numeric: tabular-nums; }

/* Widgets */
.widgets {
  position: absolute; top: 56px; left: 28px; z-index: 2;
  display: grid; grid-template-columns: repeat(2, 170px); grid-auto-rows: 170px; gap: 16px;
}
.wg {
  position: relative; overflow: hidden; border-radius: var(--r-widget); padding: 16px; border: 0; text-align: left;
  background: var(--widget); color: var(--on-wall);
  backdrop-filter: blur(40px) saturate(1.7); -webkit-backdrop-filter: blur(40px) saturate(1.7);
  box-shadow: inset 0 0 0 .5px var(--widget-line), 0 8px 30px rgba(0, 0, 0, .12);
  display: flex; flex-direction: column; animation: wgIn .7s var(--ease) both;
  transition: transform .2s var(--ease);
}
.wg:active { transform: scale(.98); }
.wg.wide { grid-column: span 2; }
.wg:nth-child(2) { animation-delay: .06s; }
.wg:nth-child(3) { animation-delay: .12s; }
.wg:nth-child(4) { animation-delay: .18s; }
@keyframes wgIn { from { opacity: 0; translate: 0 10px; } }
.wg-top { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--on-wall-2); }
.wg-top svg { width: 15px; height: 15px; }
.wg-big { font-family: var(--font-display); font-size: 30px; font-weight: 650; letter-spacing: -.03em; line-height: 1.05; margin-top: auto; font-variant-numeric: tabular-nums; }
.wg-big small { font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin-left: 3px; color: var(--on-wall-2); }
.wg-sub { font-size: 12px; color: var(--on-wall-2); margin-top: 2px; }
.wg .bar { height: 8px; margin-top: 12px; background: rgba(255, 255, 255, .18); }
body[data-tone="light"] .wg .bar { background: rgba(0, 0, 0, .08); }
.wg .bar > i + i { box-shadow: -1.5px 0 0 rgba(0, 0, 0, .25); }
.wg-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 9px; font-size: 11.5px; color: var(--on-wall-2); }
.wg-legend span { display: inline-flex; align-items: center; gap: 5px; }
.wg-legend i { width: 7px; height: 7px; border-radius: 50%; }

.wg.photo { padding: 0; }
.wg.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wg.photo::after { content: ""; position: absolute; inset: auto 0 0; height: 60%; background: linear-gradient(transparent, rgba(0, 0, 0, .5)); }
.wg.photo .cap { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; color: #fff; }
.wg.photo .cap b { display: block; font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.wg.photo .cap small { font-size: 11.5px; opacity: .85; }
.wg.photo.empty-ph { padding: 16px; }
.wg.photo.empty-ph::after { display: none; }

.wg-state { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.wg-state .ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .16); flex: none; }
.wg-state .ico svg { width: 19px; height: 19px; }
.wg-state .ico.ok { background: #2a9b51; color: #fff; }
.wg-state .ico.warn { background: #e19a12; color: #fff; }
.wg-state .ico.bad { background: #dc3a30; color: #fff; }
.wg-state b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; line-height: 1.15; }
.wg-lines { display: grid; gap: 3px; margin-top: 10px; font-size: 11.5px; color: var(--on-wall-2); }
.wg-lines span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg .bar.thin { height: 5px; margin-top: 8px; }
.wg .bar > i.light { background: #fff; }
body[data-tone="light"] .wg .bar > i.light { background: var(--tint); }

/* Dock */
.dock {
  position: absolute; left: 50%; bottom: 10px; translate: -50% 0; z-index: 60;
  display: flex; gap: 6px; padding: 7px; border-radius: 24px;
  background: var(--chrome);
  backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: inset 0 0 0 .5px var(--chrome-line), 0 10px 40px rgba(0, 0, 0, .2);
}
.dock-app { position: relative; border: 0; background: none; padding: 0; width: 56px; height: 56px; border-radius: 14px; transition: translate .25s var(--spring); }
.dock-app:hover { translate: 0 -4px; }
.dock-app:active { scale: .94; }
.dock-app .appicon { width: 56px; height: 56px; }
.dock-app .tip {
  position: absolute; left: 50%; bottom: calc(100% + 14px); translate: -50% 4px; opacity: 0; pointer-events: none;
  padding: 4px 10px; border-radius: 7px; background: rgba(30, 30, 34, .82); color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: .15s;
}
.dock-app:hover .tip, .dock-app:focus-visible .tip { opacity: 1; translate: -50% 0; }
.dock-app .run { position: absolute; left: 50%; bottom: -5px; translate: -50% 0; width: 4px; height: 4px; border-radius: 50%; background: var(--on-wall); opacity: 0; }
.dock-app.running .run { opacity: .85; }
.dock-app .lock { position: absolute; right: -3px; top: -3px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(40, 40, 46, .85); color: #fff; }
.dock-app .lock svg { width: 11px; height: 11px; }
.dock-app.locked .appicon { filter: saturate(.3) brightness(.9); }
.dock-sep { width: 1px; margin: 8px 3px; background: var(--chrome-line); }

.appicon { display: block; border-radius: 22.5%; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 4px 10px rgba(0, 0, 0, .14); }
.appicon svg { width: 100%; height: 100%; }
.appicon.sm { width: 18px; height: 18px; box-shadow: 0 .5px 1px rgba(0, 0, 0, .2); }
.appicon.md { width: 40px; height: 40px; }
.appicon.lg { width: 72px; height: 72px; }

/* Wartungsmodus */
.maint {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 24px;
  background: rgba(10, 12, 20, .35); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.maint .panel { text-align: center; }
.maint .panel .bar { height: 8px; }

/* =========================================================================
   Fenster
   ========================================================================= */

.windows { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.win {
  position: absolute; display: flex; flex-direction: column; pointer-events: auto;
  border-radius: var(--r-win); overflow: hidden; background: var(--bg); color: var(--label);
  box-shadow: var(--shadow-win);
}
.win.inactive { box-shadow: 0 0 0 .5px rgba(0, 0, 0, .14), 0 14px 40px rgba(0, 0, 0, .2); }
.win.win-open { animation: winOpen .42s var(--spring); }
.win.win-close { animation: winClose .2s ease-in forwards; }
@keyframes winOpen { from { opacity: 0; transform: translate(var(--fx, 0), var(--fy, 40px)) scale(.6); } }
@keyframes winClose { to { opacity: 0; scale: .94; } }
.win-body { flex: 1; min-height: 0; display: flex; }
.win-body > * { flex: 1; min-width: 0; }
.win-ctl { position: absolute; top: 18px; left: 18px; z-index: 5; display: flex; gap: 8px; }
.win-ctl button {
  width: 13px; height: 13px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center;
  background: var(--fill); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .1);
}
.win:not(.inactive) .win-ctl .close { background: #ff5f57; }
.win:not(.inactive) .win-ctl .zoom { background: #28c840; }
.win-ctl svg { width: 9px; height: 9px; opacity: 0; color: rgba(0, 0, 0, .6); stroke-width: 2.6; }
.win-ctl:hover svg { opacity: 1; }
.win-grip { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; z-index: 6; }
.drag { user-select: none; -webkit-user-select: none; }

/* Gemeinsame Teile der Apps */
.sidebar {
  width: 216px; flex: none; display: flex; flex-direction: column; padding: 52px 10px 10px; gap: 1px; overflow: auto;
  background: var(--side);
  backdrop-filter: blur(40px) saturate(1.8); -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border-right: .5px solid var(--sep);
}
.sb-group { font-size: 11px; font-weight: 650; color: var(--label-3); padding: 14px 10px 4px; }
.sb-item {
  display: flex; align-items: center; gap: 9px; width: 100%; height: 30px; padding: 0 10px; border-radius: 7px; border: 0;
  background: transparent; color: var(--label); text-align: left; font-size: 13px; white-space: nowrap;
}
.sb-item svg { width: 17px; height: 17px; color: var(--tint); flex: none; }
.sb-item:hover { background: var(--hover); }
.sb-item.on { background: var(--fill); font-weight: 600; }
.sb-item .count { margin-left: auto; color: var(--label-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.sb-item.drop-over { background: var(--tint); color: #fff; }
.sb-item.drop-over svg { color: #fff; }
.sb-foot { margin-top: auto; padding: 12px 10px 4px; display: grid; gap: 7px; font-size: 11.5px; color: var(--label-2); }
.sb-foot .bar { height: 5px; }

.toolbar {
  height: 52px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 14px;
  border-bottom: .5px solid var(--sep); background: var(--bg);
}
.toolbar.inset { padding-left: 82px; }
.toolbar .title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.toolbar .title small { display: block; font-size: 11.5px; font-weight: 500; color: var(--label-2); letter-spacing: 0; }
.toolbar .spacer { flex: 1; min-width: 8px; }
.toolbar .tsep { width: 1px; height: 20px; background: var(--sep); margin: 0 4px; }
.search { position: relative; width: 180px; flex: 0 1 180px; min-width: 90px; }
.search svg { position: absolute; left: 8px; top: 50%; translate: 0 -50%; width: 15px; height: 15px; color: var(--label-3); pointer-events: none; }
.search .tf { height: 28px; padding-left: 28px; background: var(--fill-2); border-color: transparent; box-shadow: none; }
.statusbar { height: 28px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 11.5px; color: var(--label-2); border-top: .5px solid var(--sep); }

/* ---------- Dateien ---------- */

.finder { display: flex; height: 100%; }
.f-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.f-content { flex: 1; min-height: 0; overflow: auto; position: relative; }
.f-content.dragging { box-shadow: inset 0 0 0 3px var(--tint); background: var(--tint-weak); }
.f-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 4px; padding: 14px; }
.f-cell { display: grid; justify-items: center; gap: 6px; padding: 10px 6px 8px; border-radius: 10px; }
.f-cell .thumb { width: 72px; height: 64px; display: grid; place-items: center; position: relative; }
.f-cell .thumb > svg { width: 64px; height: 64px; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .12)); }
.f-cell .thumb img { max-width: 76px; max-height: 64px; border-radius: 4px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .16); background: var(--fill); }
.f-cell .thumb .play { position: absolute; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; }
.f-cell .thumb .play svg { width: 12px; height: 12px; }
.f-cell .name { font-size: 12px; text-align: center; line-height: 1.25; padding: 1px 5px; border-radius: 4px; max-width: 100%; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.f-cell.sel { background: var(--fill-2); }
.f-cell.sel .name { background: var(--tint); color: #fff; }
.f-cell.drop-over { background: var(--tint-weak); box-shadow: inset 0 0 0 2px var(--tint); }

.f-list { width: 100%; border-collapse: collapse; font-size: 13px; }
.f-list th { position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 500; font-size: 11.5px; color: var(--label-2); padding: 6px 12px; background: var(--bg); border-bottom: .5px solid var(--sep); }
.f-list td { padding: 0 12px; height: 28px; white-space: nowrap; color: var(--label-2); }
.f-list td:first-child { color: var(--label); width: 55%; max-width: 0; }
.f-list tr.lrow:nth-child(even) td { background: var(--fill-2); }
.f-list tr.lrow.sel td { background: var(--tint); color: #fff; }
.f-list tr.lrow.drop-over td { background: var(--tint-weak); }
.f-list .ln { display: flex; align-items: center; gap: 8px; min-width: 0; }
.f-list .ln svg { width: 20px; height: 20px; flex: none; }
.f-list .ln span { overflow: hidden; text-overflow: ellipsis; }
.f-list td.num { font-variant-numeric: tabular-nums; }

/* Frühere Stände: Leiste über dem Inhalt */
.timebar {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex: none;
  background: color-mix(in srgb, var(--tint) 10%, var(--bg)); border-bottom: .5px solid var(--sep);
}
.timebar svg.clk { width: 18px; height: 18px; color: var(--tint); flex: none; }
.timebar .when { font-weight: 600; }
.timebar select { height: 28px; border-radius: 7px; border: .5px solid var(--sep); background: var(--bg); padding: 0 8px; max-width: 260px; }
.timebar .spacer { flex: 1; }

.trash-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--label-2); border-bottom: .5px solid var(--sep); }
.trash-head span { flex: 1; }
.trash-row { display: grid; grid-template-columns: 32px 1fr auto auto; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: .5px solid var(--sep); }
.trash-row svg { width: 30px; height: 30px; }
.trash-row b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-row small { color: var(--label-2); font-size: 12px; }
.trash-row .size { color: var(--label-2); font-variant-numeric: tabular-nums; }

/* Schnellansicht */
.ql { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); animation: fade .18s; }
.ql-bar { height: 52px; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 82px; border-bottom: .5px solid var(--sep); }
.ql-bar .t { flex: 1; min-width: 0; font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql-body { flex: 1; min-height: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 20px; position: relative; }
.ql-body img, .ql-body video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 6px 30px rgba(0, 0, 0, .2); }
.ql-body iframe { width: 100%; height: 100%; border: 0; border-radius: 6px; background: #fff; }
.ql-body pre { width: 100%; height: 100%; margin: 0; overflow: auto; padding: 18px; border-radius: 8px; background: var(--bg); box-shadow: 0 0 0 .5px var(--sep); font: 12.5px/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre-wrap; }
.ql-none { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--label-2); }
.ql-none svg { width: 96px; height: 96px; }
.ql-none b { color: var(--label); font-size: 15px; }
.ql-nav { position: absolute; top: 50%; translate: 0 -50%; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 80%, transparent); box-shadow: var(--shadow-pop); color: var(--label); }
.ql-nav svg { width: 18px; height: 18px; }
.ql-nav.prev { left: 14px; }
.ql-nav.next { right: 14px; }

/* Versionen-Dialog */
.versions { display: grid; gap: 2px; max-height: 320px; overflow: auto; margin: 0 -8px; }
.ver { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 8px; border-radius: 8px; }
.ver:hover { background: var(--hover); }
.ver b { font-weight: 600; }
.ver small { color: var(--label-2); grid-column: 1; }
.ver .acts2 { grid-row: span 2; display: flex; gap: 6px; }

/* ---------- Fotos ---------- */

.pho { display: flex; height: 100%; background: var(--bg); }
.pho-side { width: 220px; }
.sb-group.row { display: flex; align-items: center; justify-content: space-between; padding-right: 4px; }
.sb-add { width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: var(--label-2); display: grid; place-items: center; padding: 0; }
.sb-add svg { width: 15px; height: 15px; }
.sb-add:hover { background: var(--hover); color: var(--label); }
.sb-item .lbl { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sb-item.album { gap: 8px; }
.sb-item.album .cov { width: 20px; height: 20px; border-radius: 5px; overflow: hidden; flex: none; background: var(--fill); display: grid; place-items: center; }
.sb-item.album .cov img { width: 100%; height: 100%; object-fit: cover; }
.sb-item.album .cov svg { width: 13px; height: 13px; color: var(--label-3); }
.sb-item.muted { color: var(--label-2); }
.sb-item.muted svg { color: var(--label-3); }
.pho-albums { display: grid; gap: 1px; }

.pho-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.pho-main.dragging::after { content: ""; position: absolute; inset: 52px 0 0; box-shadow: inset 0 0 0 3px var(--tint); background: var(--tint-weak); pointer-events: none; z-index: 5; }
.pho-bar .title { display: flex; flex-direction: column; justify-content: center; }
.pho-bar .seg button { padding: 0 12px; }
.pho-zoom { display: flex; gap: 0; }
.pho-extra { display: flex; gap: 6px; align-items: center; }
.pho-extra:empty { display: none; }
.selbar { background: color-mix(in srgb, var(--tint) 7%, var(--bg)); }
.selbar .title b { font-size: 14px; font-weight: 650; }
.pho-selacts { display: flex; gap: 2px; align-items: center; margin-right: 6px; }
.pho-selacts .btn { margin-left: 4px; }
.ibtn.danger { color: var(--danger); }
.btn.sm { height: 24px; padding: 0 9px; font-size: 12px; }

.pho-banner { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: .5px solid var(--sep); background: var(--bg-2); flex: none; }
.pho-banner .ico svg { width: 22px; height: 22px; color: var(--tint); display: block; }
.pho-banner .grow { flex: 1; min-width: 0; display: grid; gap: 3px; }
.pho-banner b { font-size: 13px; font-weight: 650; }
.pho-banner small { color: var(--label-2); font-size: 12px; }
.pho-banner .bar { margin-top: 3px; max-width: 420px; }

.pho-scroll { flex: 1; min-height: 0; overflow: auto; --tile: 136px; padding: 0 2px 24px; outline: none; overscroll-behavior: contain; }
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr)); gap: 2px; align-content: start; }
.pho-scroll > .p-grid + .p-grid { margin-top: 2px; }
.p-month header {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: baseline; gap: 10px; padding: 16px 12px 10px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
}
.p-month h3 { margin: 0; font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.p-month h3 .yr { font-weight: 400; color: var(--label-2); }
.p-month header small { color: var(--label-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.p-month header .spacer { flex: 1; }
.p-month header .selall[hidden] { display: none; }
.p-month + .p-month { margin-top: 6px; }

.p-tile { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: var(--fill-2); overflow: hidden; border-radius: 0; cursor: default; }
.p-tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s, transform .2s var(--ease), filter .15s; display: block; }
.p-tile img.ok { opacity: 1; }
.p-tile:hover img { filter: brightness(.93); }
.p-tile:focus-visible { outline: 2px solid var(--tint); outline-offset: -2px; }
.p-tile .vid { position: absolute; right: 6px; bottom: 5px; display: flex; align-items: center; gap: 3px; color: #fff; font-size: 11px; font-weight: 650; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); font-variant-numeric: tabular-nums; }
.p-tile .vid svg { width: 11px; height: 11px; }
.p-tile .fav { position: absolute; left: 6px; bottom: 5px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55)); }
.p-tile .fav svg { width: 14px; height: 14px; display: block; }
.p-tile .days { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; color: #fff; font-size: 11px; font-weight: 600; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); text-align: left; }
.p-tile .fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--label-3); font-weight: 650; font-size: 12px; }
.p-tile .chk {
  position: absolute; right: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; display: none; place-items: center;
  border: 1.5px solid #fff; background: rgba(0, 0, 0, .18); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); color: transparent;
}
.p-tile .chk svg { width: 13px; height: 13px; stroke-width: 2.6; }
.selecting .p-tile .chk { display: grid; }
.selecting .p-tile .vid { bottom: 32px; }
.p-tile.sel .chk { background: var(--tint); border-color: #fff; color: #fff; }
.p-tile.sel img { transform: scale(.9); border-radius: 4px; }
.p-tile.sel::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--tint) 10%, transparent); pointer-events: none; }

/* Jahre und Monate */
.p-cards { display: grid; gap: 14px; padding: 14px 14px 8px; }
.p-cards.years { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; padding-top: 18px; }
.p-cards.months { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.p-year { margin: 0; padding: 22px 16px 0; font-family: var(--font-display); font-size: 28px; font-weight: 750; letter-spacing: -.025em; }
.p-card { position: relative; aspect-ratio: 4 / 3; border: 0; padding: 0; border-radius: 18px; overflow: hidden; background: var(--fill-2); text-align: left; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 8px 24px rgba(0, 0, 0, .10); transition: transform .25s var(--ease), box-shadow .25s; }
.p-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 16px 36px rgba(0, 0, 0, .16); }
.p-card:active { transform: scale(.985); }
.p-card img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .4s; }
.p-card img.ok { opacity: 1; }
.p-card .cap { position: absolute; inset: auto 0 0; padding: 40px 18px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .58)); color: #fff; display: grid; gap: 1px; }
.p-card .cap b { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
.p-card.month .cap b { font-size: 18px; }
.years .p-card .cap b { font-size: 40px; font-weight: 750; letter-spacing: -.035em; }
.p-card .cap small { font-size: 12.5px; color: rgba(255, 255, 255, .82); }
.mosaic { position: absolute; inset: 0; display: grid; gap: 2px; }
.mosaic.n2 { grid-template-columns: 1fr 1fr; }
.mosaic.n3 { grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; }
.mosaic.n3 img:first-child { grid-row: 1 / 3; }

.p-hero { display: flex; align-items: center; gap: 16px; padding: 22px 16px 16px; }
.p-hero h1 { margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 750; letter-spacing: -.028em; line-height: 1.1; }
.p-hero p { margin: 4px 0 0; color: var(--label-2); }
.p-hero .src { color: var(--label-3); }
.p-hero.person { gap: 18px; }
.p-hero.person .grow { flex: 1; min-width: 0; }
.p-note { display: flex; align-items: center; gap: 8px; margin: 12px 14px; padding: 10px 12px; border-radius: 10px; background: var(--fill-2); color: var(--label-2); font-size: 12.5px; }
.p-note svg { width: 16px; height: 16px; flex: none; }
.empty.small { height: auto; padding: 36px 24px; }

/* Willkommen */
.pw-welcome { max-width: 720px; margin: 0 auto; padding: 36px 24px 40px; text-align: center; display: grid; justify-items: center; }
.pw-welcome h1 { margin: 22px 0 8px; font-family: var(--font-display); font-size: 32px; font-weight: 750; letter-spacing: -.03em; }
.pw-welcome .lead { margin: 0; max-width: 50ch; color: var(--label-2); font-size: 14.5px; line-height: 1.5; }
.pw-actions { margin: 22px 0 6px; }
.pw-or { width: 100%; max-width: 560px; display: flex; align-items: center; gap: 12px; color: var(--label-3); font-size: 12px; font-weight: 600; margin: 18px 0 12px; }
.pw-or::before, .pw-or::after { content: ""; flex: 1; height: .5px; background: var(--sep); }
.pw-sources { width: 100%; max-width: 600px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pw-sources.in-sheet { grid-template-columns: repeat(2, 1fr); }
.pw-src { display: grid; justify-items: center; gap: 3px; padding: 16px 10px 14px; border: 0; border-radius: 16px; background: var(--fill-2); color: var(--label); text-align: center; transition: background .15s, transform .15s; }
.pw-src:hover { background: var(--fill); }
.pw-src:active { transform: scale(.97); }
.pw-src .logo { margin-bottom: 6px; width: 42px; height: 42px; border-radius: 11px; }
.pw-src b { font-size: 13.5px; font-weight: 650; }
.pw-src small { font-size: 11.5px; color: var(--label-2); }
.pw-note { margin: 16px 0 4px; color: var(--label-3); font-size: 12px; max-width: 52ch; }
.pw-job { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 14px; border-radius: 12px; background: var(--tint-weak); color: var(--tint); font-size: 12.5px; font-weight: 500; }
.pw-collage { position: relative; width: 236px; height: 132px; }
.pw-collage i { position: absolute; width: 86px; height: 86px; border-radius: 18px; box-shadow: 0 10px 28px rgba(0, 0, 0, .18), inset 0 0 0 .5px rgba(255, 255, 255, .25); }
.pw-collage .c0 { left: 0; top: 30px; rotate: -12deg; background: linear-gradient(160deg, #ffd9a8, #f08a5d 55%, #b05068); }
.pw-collage .c1 { left: 40px; top: 6px; rotate: -4deg; background: linear-gradient(170deg, #9fd3ff, #4d8fd8 50%, #23447f); }
.pw-collage .c2 { left: 76px; top: 26px; rotate: 3deg; z-index: 2; width: 92px; height: 92px; background: linear-gradient(180deg, #3f5fae, #b98aa6 55%, #f4b58f); }
.pw-collage .c3 { left: 118px; top: 4px; rotate: 9deg; background: linear-gradient(165deg, #c4f0c8, #5fb37a 55%, #24603f); }
.pw-collage .c4 { left: 152px; top: 34px; rotate: 15deg; background: linear-gradient(160deg, #e7d4ff, #9a7de2 55%, #4b3796); }
.pw-collage .c5 { display: none; }
.pw-collage .c2::after { content: ""; position: absolute; inset: auto 0 0; height: 46%; border-radius: 0 0 18px 18px; background: linear-gradient(transparent, #1e2448); clip-path: polygon(0 60%, 28% 20%, 46% 48%, 64% 10%, 100% 55%, 100% 100%, 0 100%); }

/* Album wählen */
.album-pick { display: grid; gap: 4px; max-height: 50vh; overflow: auto; margin: 0 -6px; }
.ap-row { display: flex; align-items: center; gap: 12px; padding: 6px; border: 0; border-radius: 10px; background: transparent; color: var(--label); text-align: left; }
.ap-row:hover { background: var(--hover); }
.ap-row .cov { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--fill); display: grid; place-items: center; flex: none; }
.ap-row .cov img { width: 100%; height: 100%; object-fit: cover; }
.ap-row .cov svg { width: 20px; height: 20px; color: var(--tint); }
.ap-row b { display: block; font-weight: 600; }
.ap-row small { display: block; color: var(--label-2); font-size: 12px; }
.ap-row.new b { color: var(--tint); }

/* Formular: Häkchen mit Erklärung */
.check { display: flex; align-items: flex-start; gap: 9px; color: var(--label); font-size: 13px; text-align: left; }
.check input { margin: 2px 0 0; accent-color: var(--tint); width: 15px; height: 15px; flex: none; }
.check small { display: block; color: var(--label-2); font-size: 12px; }
details.manual { border-radius: 10px; background: var(--fill-2); padding: 8px 12px; }
details.manual summary { cursor: pointer; color: var(--tint); font-size: 12.5px; font-weight: 500; }
details.manual > div { display: grid; gap: 8px; margin-top: 8px; }
details.manual small { color: var(--label-2); }

/* Personen */
.pp-sec { padding: 6px 14px 10px; }
.pp-sec h3 { margin: 18px 4px 10px; font-size: 15px; font-weight: 650; }
.pp-hint { margin: 14px 4px 0; color: var(--label-2); font-size: 12.5px; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; padding-top: 8px; }
.pp-grid.small { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-height: 56vh; overflow: auto; }
.pp-card { display: grid; justify-items: center; gap: 2px; padding: 12px 6px 10px; border: 0; border-radius: 14px; background: transparent; color: var(--label); text-align: center; }
.pp-card:hover { background: var(--hover); }
.pp-card b { font-size: 13px; font-weight: 600; margin-top: 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-card.unnamed b { color: var(--tint); font-weight: 500; }
.pp-card small { font-size: 11.5px; color: var(--label-2); }
.face { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: var(--fill); display: inline-block; flex: none; }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face.lg { width: 92px; height: 92px; box-shadow: 0 0 0 .5px var(--sep), 0 4px 14px rgba(0, 0, 0, .12); }
.face.xl { width: 84px; height: 84px; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.pp-progress { display: flex; align-items: center; gap: 12px; margin: 14px; padding: 12px 14px; border-radius: 12px; background: var(--fill-2); }
.pp-progress .grow { flex: 1; display: grid; gap: 3px; }
.pp-progress small { color: var(--label-2); font-size: 12px; }
.pp-progress .bar { margin-top: 4px; }
.pp-foot { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 24px 14px 8px; }
.btn.plain.muted { color: var(--label-3); }
.chip .face { width: 20px; height: 20px; margin: 0 6px 0 -6px; }
.chip { display: inline-flex; align-items: center; }

/* Grossansicht */
.lb { position: fixed; inset: 0; z-index: 120; background: #000; color: #fff; animation: fade .2s; --info: 0px; }
.lb.out { animation: fadeOut .16s forwards; }
.lb:focus { outline: none; }
@keyframes fadeOut { to { opacity: 0; } }
.lb.info-open { --info: 320px; }
.lb-bg { position: absolute; inset: -60px; background: center / cover; filter: blur(60px) brightness(.38) saturate(1.3); opacity: .9; }
.lb-bar { position: absolute; inset: 0 var(--info) auto 0; z-index: 3; height: 60px; display: flex; align-items: center; gap: 4px; padding: 0 14px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.lb-bar .meta { flex: 1; min-width: 0; padding-left: 8px; }
.lb-bar .meta b { display: block; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-bar .meta small { color: rgba(255, 255, 255, .68); font-size: 12px; }
.lb-back { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 12px 0 6px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.lb-back svg { width: 18px; height: 18px; }
.lb-back:hover { background: rgba(255, 255, 255, .22); }
.lb .ibtn { color: rgba(255, 255, 255, .86); }
.lb .ibtn:hover, .lb .ibtn.on { background: rgba(255, 255, 255, .15); color: #fff; }
.lb .ibtn.on-fav { color: #ff5c7a; }
.lb-stage { position: absolute; inset: 60px calc(60px + var(--info)) 84px 60px; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; overflow: hidden; transition: inset .25s var(--ease); }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); transition: transform .25s var(--ease); }
.lb-stage img.zoomed { cursor: zoom-out; box-shadow: none; }
.lb-nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); opacity: 0; transition: opacity .2s; }
.lb:hover .lb-nav { opacity: 1; }
.lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-nav svg { width: 20px; height: 20px; }
.lb-nav.prev { left: 12px; }
.lb-nav.next { right: calc(12px + var(--info)); }
.lb-strip { position: absolute; left: 0; right: var(--info); bottom: 14px; height: 56px; display: flex; gap: 4px; justify-content: center; overflow: hidden; padding: 0 16px; z-index: 2; }
.st-thumb { width: 44px; height: 56px; flex: none; border: 0; padding: 0; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .08); opacity: .55; transition: opacity .15s, width .2s var(--ease); }
.st-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-thumb:hover { opacity: .9; }
.st-thumb.on { opacity: 1; width: 74px; box-shadow: 0 0 0 2px #fff; }
.lb-info { position: absolute; top: 0; right: 0; bottom: 0; width: 320px; z-index: 4; background: rgba(28, 28, 32, .86); border-left: .5px solid rgba(255, 255, 255, .1); backdrop-filter: blur(40px) saturate(1.5); -webkit-backdrop-filter: blur(40px) saturate(1.5); transform: translateX(100%); transition: transform .25s var(--ease); overflow: auto; color: rgba(255, 255, 255, .92); }
.lb.info-open .lb-info { transform: none; }
.lb-info-h { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 10px 0 20px; }
.lb-info-h b { font-size: 15px; font-weight: 650; }
.lb-info-b { display: grid; gap: 4px; padding: 0 12px 20px; }
.ir { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 10px 8px; border-radius: 10px; }
.ir > span svg { width: 18px; height: 18px; color: rgba(255, 255, 255, .6); margin-top: 1px; }
.ir b { display: block; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.ir small { display: block; font-size: 12px; color: rgba(255, 255, 255, .62); margin-top: 1px; overflow-wrap: anywhere; }
.ir.big { display: block; padding: 2px 8px 10px; }
.ir.big b { font-size: 17px; font-weight: 650; }
.ir .chips { margin-top: 6px; }
.lb .chip { background: rgba(255, 255, 255, .1); color: #fff; }
.lb .chip:hover { background: rgba(255, 255, 255, .18); }
.ilink { display: inline-block; margin-top: 6px; padding: 0; border: 0; background: none; color: #6fb2ff; font-size: 12.5px; text-decoration: none; cursor: pointer; }
.ilink:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .pho .sidebar.show { display: flex; position: absolute; z-index: 20; inset: 0 auto 0 0; box-shadow: var(--shadow-win); }
  .pho-bar .seg button { padding: 0 8px; font-size: 12px; }
  .pho-zoom, .pho-bar .btn:not(.primary) { display: none; }
  .pw-sources { grid-template-columns: repeat(2, 1fr); }
  .pw-welcome h1 { font-size: 26px; }
  .lb.info-open { --info: 0px; }
  .lb-info { width: 100%; top: 40%; border-radius: 18px 18px 0 0; transform: translateY(100%); }
  .lb.info-open .lb-info { transform: none; }
  .lb-stage { inset: 60px 0 76px; }
  .lb-nav { display: none; }
  .lb-bar .meta small { display: none; }
  .lb-strip { bottom: 10px; }
  .p-cards.years { grid-template-columns: 1fr; }
  .p-cards.months { grid-template-columns: 1fr 1fr; gap: 8px; }
  .p-card { border-radius: 14px; }
}

/* ---------- Kalender ---------- */

.calapp { display: flex; height: 100%; background: var(--bg); }
.cal-side { width: 236px; }
.mini { padding: 0 4px 6px; }
.mini-head { display: flex; align-items: center; gap: 2px; padding: 0 2px 6px 6px; }
.mini-head b { flex: 1; font-size: 13px; font-weight: 650; }
.ibtn.sm { width: 24px; height: 24px; }
.ibtn.sm svg { width: 14px; height: 14px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; text-align: center; }
.mini-grid .wd { font-size: 10px; font-weight: 650; color: var(--label-3); padding: 2px 0 4px; }
.md { position: relative; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--label); font-size: 11.5px; font-variant-numeric: tabular-nums; padding: 0; aspect-ratio: 1; justify-self: center; width: 26px; }
.md:hover { background: var(--hover); }
.md.out { color: var(--label-3); }
.md.today { color: var(--danger); font-weight: 700; }
.md.sel { background: var(--label); color: var(--bg); font-weight: 650; }
.md.today.sel { background: var(--danger); color: #fff; }
.md.has::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: var(--label-3); }
.md.sel.has::after { background: currentColor; }
.cal-list { display: grid; gap: 1px; }
.sb-item.cal { gap: 9px; }
.cdot { width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--c); display: inline-grid; place-items: center; flex: none; color: #fff; }
.cdot.on { background: var(--c); }
.cdot svg { width: 10px !important; height: 10px !important; color: #fff !important; stroke-width: 3; opacity: 0; }
.cdot.on svg { opacity: 1; }
.sb-item.cal .count svg { width: 13px; height: 13px; color: var(--label-3); }

.cal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cal-bar .navgrp { display: flex; align-items: center; gap: 2px; }
.cal-title { font-size: 17px !important; margin-left: 10px; }
.cal-view { flex: 1; min-height: 0; display: flex; flex-direction: column; outline: none; }

/* Monat */
.month { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.m-head { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: .5px solid var(--sep); }
.m-head span { padding: 6px 10px; font-size: 11.5px; font-weight: 600; color: var(--label-2); text-align: right; }
.m-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(6, 1fr); }
.m-cell { border-right: .5px solid var(--sep); border-bottom: .5px solid var(--sep); padding: 3px 4px; min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 2px; cursor: default; }
.m-cell:nth-child(7n) { border-right: 0; }
.m-cell.we { background: var(--fill-2); }
.m-cell.out .m-num { color: var(--label-3); }
.m-num { display: flex; justify-content: flex-end; font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; padding: 2px 2px 0; }
.m-num span { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; }
.m-cell.today .m-num span { background: var(--danger); color: #fff; font-weight: 700; }
.m-evs { display: grid; gap: 2px; min-width: 0; }
.ev-pill { display: flex; align-items: center; gap: 5px; min-width: 0; height: 19px; padding: 0 6px; border: 0; border-radius: 5px; background: transparent; color: var(--label); font-size: 11.5px; text-align: left; }
.ev-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.ev-pill .t { color: var(--label-2); font-variant-numeric: tabular-nums; flex: none; }
.ev-pill .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ev-pill:hover { background: var(--hover); }
.ev-pill.all { background: color-mix(in srgb, var(--c) 18%, transparent); color: color-mix(in srgb, var(--c) 70%, var(--label)); }
.ev-pill.all::before { display: none; }
.ev-more { border: 0; background: none; padding: 0 6px; height: 17px; text-align: left; color: var(--label-2); font-size: 11px; font-weight: 600; }
.ev-more:hover { color: var(--tint); }

/* Woche und Tag */
.week { flex: 1; min-height: 0; display: flex; flex-direction: column; --gut: 56px; }
.w-head, .w-all { display: grid; grid-template-columns: var(--gut) repeat(var(--days), 1fr); border-bottom: .5px solid var(--sep); }
.w-head .gut, .w-all .gut { font-size: 10.5px; color: var(--label-3); display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; }
.w-day { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 8px 4px; border: 0; background: none; color: var(--label); }
.w-day small { font-size: 12px; color: var(--label-2); font-weight: 500; }
.w-day b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 32px; height: 32px; border-radius: 99px; display: grid; place-items: center; }
.w-day.today b { background: var(--danger); color: #fff; }
.w-day:hover b { background: var(--hover); }
.w-day.today:hover b { background: var(--danger); }
.oneday .w-head { display: none; }
.w-allcol { padding: 3px 2px; display: grid; gap: 2px; align-content: start; min-height: 26px; border-left: .5px solid var(--sep); min-width: 0; }
.w-scroll { flex: 1; min-height: 0; overflow: auto; }
.w-body { position: relative; display: grid; grid-template-columns: var(--gut) repeat(var(--days), 1fr);
  background-image: repeating-linear-gradient(to bottom, var(--sep) 0 1px, transparent 1px 48px); }
.w-gut { position: relative; }
.w-gut span { position: absolute; right: 8px; translate: 0 -50%; font-size: 10.5px; color: var(--label-3); font-variant-numeric: tabular-nums; }
.w-col { position: relative; border-left: .5px solid var(--sep); }
.w-col.today { background: color-mix(in srgb, var(--danger) 3%, transparent); }
.w-ev { position: absolute; overflow: hidden; border: 0; border-radius: 6px; padding: 3px 7px; text-align: left; display: flex; flex-direction: column; gap: 0;
  background: color-mix(in srgb, var(--c) 17%, var(--bg)); color: color-mix(in srgb, var(--c) 65%, var(--label)); box-shadow: inset 3px 0 0 var(--c); }
.w-ev:hover { background: color-mix(in srgb, var(--c) 26%, var(--bg)); z-index: 2; }
.w-ev b { font-size: 12px; font-weight: 650; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-ev small { font-size: 11px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-ev.short { flex-direction: row; gap: 6px; align-items: center; padding-top: 0; padding-bottom: 0; }
.nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.nowline::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

/* Termin */
.ev-form { gap: 10px; }
.ev-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.ev-row > span { color: var(--label-2); font-size: 13px; }
.ev-row select.tf { width: auto; min-width: 180px; }
.ev-dt { display: flex; gap: 6px; }
.ev-dt .tf { width: auto; }
.ev-dt .tf[type=time] { width: 112px; }
.field.inline { display: flex; align-items: center; justify-content: space-between; }
.field.inline .tf { width: auto; }
textarea.tf { height: auto; padding: 8px 10px; resize: vertical; min-height: 64px; }
.ev-detail p { margin: 0; display: flex; align-items: center; gap: 6px; }
.ev-detail p svg { width: 16px; height: 16px; color: var(--label-2); }
.ev-detail .notes { white-space: pre-wrap; color: var(--label-2); display: block; }
.ev-detail .muted { color: var(--label-2); font-size: 12.5px; }
.colors { display: flex; gap: 10px; justify-content: center; padding: 4px 0; }
.colorsw { width: 26px; height: 26px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.colorsw.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--label); }
.feedurl { padding: 10px; border-radius: 10px; background: var(--fill-2); overflow-wrap: anywhere; font-size: 12px; }

@media (max-width: 760px) {
  .calapp .sidebar.show { display: flex; position: absolute; z-index: 20; inset: 0 auto 0 0; box-shadow: var(--shadow-win); }
  .cal-title { font-size: 15px !important; margin-left: 4px; }
  .cal-bar .seg button { padding: 0 8px; font-size: 12px; }
  .m-head span { text-align: center; padding: 6px 0; }
  .ev-pill .t { display: none; }
  .ev-pill { padding: 0 3px; font-size: 10.5px; }
  .week { --gut: 44px; }
  .ev-row { flex-wrap: wrap; }
}

/* ---------- App Store ---------- */

.store { display: flex; flex-direction: column; height: 100%; background: var(--bg); }
.store-scroll { flex: 1; min-height: 0; overflow: auto; padding: 4px 28px 28px; }
.store-hero { display: flex; align-items: center; gap: 18px; padding: 18px 0 20px; }
.store-hero .appicon.lg { width: 72px; height: 72px; border-radius: 18px; }
.store-hero h1 { margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 750; letter-spacing: -.028em; }
.store-hero p { margin: 4px 0 0; color: var(--label-2); max-width: 60ch; }
.store-mine h3 { margin: 6px 0 10px; font-size: 15px; font-weight: 650; }
.store-mine .p-note { margin: 0 0 14px; }
.st-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 12px; }
.st-chips .chip.on { background: var(--label); color: var(--bg); }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.store-grid.mine { margin-bottom: 8px; }
.store-card { display: flex; align-items: center; gap: 14px; padding: 14px; border: 0; border-radius: 16px; background: var(--fill-2); color: var(--label); text-align: left; min-width: 0; }
.store-card:hover { background: var(--fill); }
.store-card .grow { flex: 1; min-width: 0; }
.store-card b { display: block; font-size: 14px; font-weight: 650; }
.store-card small { display: block; color: var(--label-2); font-size: 12px; line-height: 1.35; margin-top: 1px; }
.store-card small.err { color: var(--danger); }
.store-card small.step { color: var(--tint); }
.store-card.locked { opacity: .6; }
.store-card .act { flex: none; }
.btn.get { background: var(--tint-weak); color: var(--tint); font-weight: 650; border-radius: 99px; min-width: 64px; }
.store-busy { display: flex; align-items: center; gap: 6px; color: var(--label-2); font-size: 12px; }
.applogo { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .1), 0 2px 8px rgba(0, 0, 0, .12); }
.applogo svg { width: 28px; height: 28px; stroke-width: 1.7; }
.applogo.lg { width: 64px; height: 64px; border-radius: 16px; }
.applogo.lg svg { width: 34px; height: 34px; }
.sheet > .sicon .applogo { margin: 0 auto; }
.store-note { margin: 26px auto 0; max-width: 70ch; text-align: center; color: var(--label-3); font-size: 12px; }
.store-facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.store-facts li { display: flex; align-items: center; gap: 10px; color: var(--label); font-size: 13px; }
.store-facts svg { width: 17px; height: 17px; color: var(--label-2); flex: none; }
.store-login { display: flex; align-items: center; gap: 18px; padding: 10px 14px; border-radius: 12px; background: var(--fill-2); }
.store-login small { display: block; color: var(--label-2); font-size: 11.5px; }
.store-login code { font-size: 13px; user-select: all; }
.store-login .btn { margin-left: auto; }
p.muted { color: var(--label-2); margin: 0; }
@media (max-width: 760px) { .store-scroll { padding: 4px 14px 20px; } .store-grid { grid-template-columns: 1fr; } }

/* ---------- Einstellungen ---------- */

.settings { display: flex; height: 100%; }
.st-side { width: 230px; }
.st-me { display: flex; align-items: center; gap: 10px; padding: 6px 10px 12px; border: 0; background: none; width: 100%; text-align: left; border-radius: 10px; color: var(--label); }
.st-me:hover { background: var(--hover); }
.st-me.on { background: var(--fill); }
.st-me b { display: block; font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-me small { display: block; font-size: 11.5px; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; flex: none; }
.sq svg { width: 15px; height: 15px; color: #fff !important; stroke-width: 1.9; }
.sq.gray { background: linear-gradient(#a1a4ab, #7d8088); }
.sq.blue { background: linear-gradient(#4aa0ff, #0a6cdb); }
.sq.green { background: linear-gradient(#55d27b, #2a9b51); }
.sq.orange { background: linear-gradient(#ffb04a, #f08a12); }
.sq.teal { background: linear-gradient(#4fd0d6, #1797a3); }
.sq.red { background: linear-gradient(#ff7a6e, #dc3a30); }
.sq.indigo { background: linear-gradient(#8a87ff, #5b55e0); }
.sq.lg { width: 30px; height: 30px; border-radius: 8px; }
.sq.lg svg { width: 19px; height: 19px; }
.st-side .sb-item { height: 32px; }
.st-side .sb-item.on { background: var(--tint); color: #fff; font-weight: 500; }

.st-main { flex: 1; min-width: 0; overflow: auto; background: var(--bg-2); }
.st-head { position: sticky; top: 0; z-index: 3; height: 52px; display: flex; align-items: center; padding: 0 24px; background: color-mix(in srgb, var(--bg-2) 85%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.st-head h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.st-body { padding: 4px 24px 32px; max-width: 680px; margin: 0 auto; display: grid; gap: 22px; }
.st-hero { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 10px 0 2px; }
.st-hero h3 { margin: 6px 0 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.st-hero p { margin: 0; color: var(--label-2); max-width: 46ch; }

.group { display: grid; gap: 6px; }
.group > h4 { margin: 0 12px; font-size: 13px; font-weight: 650; color: var(--label); }
.group > .gnote { margin: 0 12px; color: var(--label-2); font-size: 12px; }
.list { background: var(--bg); border-radius: 12px; box-shadow: 0 0 0 .5px var(--sep); overflow: hidden; }
.cell { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 14px; position: relative; }
.cell + .cell::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; height: .5px; background: var(--sep); }
.cell.has-icon + .cell::before, .cell + .cell.has-icon::before { left: 50px; }
.cell .grow { flex: 1; min-width: 0; }
.cell .lbl { display: block; color: var(--label); }
.cell .sub { display: block; color: var(--label-2); font-size: 12px; margin-top: 1px; }
.cell .val { color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell button.cell-btn { all: unset; }
.cell.click { cursor: default; }
.cell.click:hover { background: var(--hover); }
.cell .chev { width: 14px; height: 14px; color: var(--label-3); }
.cell .tf { max-width: 260px; }
.cell.col { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; }
.cell .ico { width: 24px; height: 24px; color: var(--label-2); flex: none; }
.cell .ico svg { width: 24px; height: 24px; stroke-width: 1.5; }

/* Speicheranzeige wie beim Telefon */
.usage { display: grid; gap: 10px; padding: 16px; }
.usage .top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.usage .top b { font-size: 15px; font-weight: 650; }
.usage .top span { color: var(--label-2); }
.usage .bar { height: 12px; border-radius: 4px; }
.usage .bar > i + i { box-shadow: -1.5px 0 0 var(--bg); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--label-2); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; }

/* Laufwerke */
.disk-ico { width: 34px; height: 34px; flex: none; }
.disk-ico svg { width: 34px; height: 34px; }
.pool-card { display: grid; gap: 14px; padding: 18px; }
.pool-state { display: flex; align-items: center; gap: 14px; }
.pool-state .big { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.pool-state .big svg { width: 26px; height: 26px; stroke-width: 1.8; }
.pool-state .big.ok { background: var(--ok); }
.pool-state .big.warn { background: var(--warn); }
.pool-state .big.bad { background: var(--danger); }
.pool-state .big.none { background: var(--c-other); }
.pool-state b { display: block; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.pool-state span { color: var(--label-2); }
.disk-pick { display: grid; gap: 6px; }
.disk-opt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--fill-2); }
.disk-opt input { width: 18px; height: 18px; accent-color: var(--tint); }
.disk-opt .grow { flex: 1; min-width: 0; }
.disk-opt small { display: block; color: var(--label-2); }
.warnbox { display: flex; gap: 10px; padding: 12px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 13%, transparent); color: var(--label); font-size: 12.5px; }
.warnbox svg { width: 18px; height: 18px; color: var(--warn); flex: none; }
.warnbox.bad { background: color-mix(in srgb, var(--danger) 11%, transparent); }
.warnbox.bad svg { color: var(--danger); }

.walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; padding: 14px; }
.wall-pick { border: 0; background: none; padding: 0; display: grid; gap: 7px; color: var(--label); font-size: 12px; text-align: center; }
.wall-pick img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 .5px var(--sep); transition: box-shadow .15s; }
.wall-pick.on img { box-shadow: 0 0 0 3px var(--tint); }
.wall-pick.on { font-weight: 600; }

.qr { width: 184px; height: 184px; margin: 0 auto; padding: 10px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 .5px var(--sep); }
.qr svg { width: 100%; height: 100%; }
.secret { font: 500 13px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; text-align: center; color: var(--label-2); word-break: break-all; user-select: all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; padding: 14px; border-radius: 12px; background: var(--fill-2); font: 500 14px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; text-align: center; user-select: all; }
.link-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--fill-2); min-width: 0; }
.link-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12.5px ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.act-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 2px 10px; align-items: center; }
.act-row .ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); color: var(--label-2); grid-row: span 2; }
.act-row .ico svg { width: 15px; height: 15px; }
.act-row .ico.bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.act-row small { color: var(--label-2); grid-column: 2 / 4; }
.act-row time { color: var(--label-3); font-size: 12px; white-space: nowrap; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--fill-2); }
.radio input { margin-top: 2px; accent-color: var(--tint); }
.radio small { display: block; color: var(--label-2); }
.release-notes { white-space: pre-wrap; color: var(--label-2); }
.update-hero { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 20px 16px 18px; }
.update-hero .appicon { margin-bottom: 8px; }
.update-hero b { font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.update-hero span { color: var(--label-2); }

/* Zugriff von unterwegs */
.remote-hero { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 6px 20px 22px; }
.remote-hero .device.sm { margin: -4px auto 2px; }
.remote-hero b { font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.remote-hero > span { color: var(--label-2); max-width: 46ch; }
.remote-hero .acts { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.remote-hero .acts .btn { text-decoration: none; }
.remote-hero .devcode { min-width: 240px; }
.remote-url { font: 600 15px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--tint); text-decoration: none; margin-top: 4px; word-break: break-all; }
.remote-url:hover { text-decoration: underline; }

.ai-panel { display: grid; place-items: center; text-align: center; padding: 30px; height: 100%; }
.ai-panel h2 { font-family: var(--font-display); font-size: 22px; letter-spacing: -.02em; margin: 14px 0 6px; }
.ai-panel p { color: var(--label-2); max-width: 40ch; margin: 0 auto; }

/* =========================================================================
   Kleine Bildschirme (Handy)
   ========================================================================= */

@media (max-width: 760px) {
  body { font-size: 14px; }
  .menubar { height: 44px; padding-top: env(safe-area-inset-top); }
  .menubar .clock { display: none; }
  .widgets { position: absolute; top: 60px; left: 16px; right: 16px; grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
  .wg { min-height: 158px; }
  .dock { bottom: max(10px, env(safe-area-inset-bottom)); }
  .dock-app, .dock-app .appicon { width: 54px; height: 54px; }
  .windows { z-index: 70; }
  .win { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; box-shadow: none; }
  .win-grip { display: none; }
  .win-ctl { top: 16px; left: 14px; }
  .win-ctl .zoom { display: none; }
  .win-ctl button { width: 26px; height: 26px; }
  .win-ctl svg { width: 12px; height: 12px; opacity: 1; }
  .sidebar { display: none; }
  .finder .sidebar.show { display: flex; position: absolute; z-index: 20; inset: 0 auto 0 0; box-shadow: var(--shadow-win); }
  .toolbar { padding-left: 52px; }
  .toolbar.inset { padding-left: 52px; }
  .search { display: none; }
  .ql-bar { padding-left: 52px; }
  .settings .st-side.show-mobile { display: flex; width: 100%; border: 0; }
  .st-body { padding: 4px 14px 28px; }
  .st-head { padding-left: 52px; }
  .lb-stage { inset: 60px 0 20px; }
  .panel { padding: 28px 22px 24px; border-radius: 22px; }
  .hello-word { font-size: 64px; }
  #toasts { bottom: 96px; }
}

@media (max-width: 760px) {
  .finder .toolbar .seg, .finder .toolbar [aria-label="Neuer Ordner"] { display: none; }
  .toolbar .btn.primary { font-size: 0; gap: 0; padding: 0 9px; }
  .toolbar .btn.primary svg { margin: 0; width: 18px; height: 18px; }
  .toolbar .title { flex: 1 1 auto; }
  .timebar { flex-wrap: wrap; }
  .timebar select { max-width: 170px; }
}

/* Speicherpool fehlt */
.pool-alert {
  position: fixed; top: 46px; left: 50%; translate: -50% 0; z-index: 60; width: min(620px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; color: var(--on-wall);
  background: color-mix(in srgb, #c98100 34%, var(--chrome)); border: .5px solid var(--chrome-line);
  backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .25); animation: toastIn .4s var(--spring);
}
.pool-alert .sq { width: 34px; height: 34px; border-radius: 9px; }
.pool-alert .sq svg { width: 20px; height: 20px; }
.pool-alert .grow { flex: 1; min-width: 0; }
.pool-alert b { display: block; font-size: 14px; font-weight: 650; }
.pool-alert small { display: block; font-size: 12.5px; color: var(--on-wall-2); }
.pool-alert .btn { flex: none; }

/* Nutzungsbedingungen bei der Einrichtung */
.terms-check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 6px; font-size: 15px; line-height: 1.4; cursor: pointer; }
.terms-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--accent, #2f7cf6); }
.terms-text { margin: 6px 0 10px; font-size: 14px; }
.terms-text summary { cursor: pointer; font-weight: 600; }
.terms-text ul { padding-left: 18px; margin: 8px 0 0; }
.terms-text li { margin: 6px 0; }

/* =========================================================================
   Tarko 1.1 – Glas. Durchscheinende, weich gerundete Flächen mit feinem Lichtrand,
   ein eigenes Bergsee-Grün und ruhige, federnde Bewegung. Angelehnt an neue
   Glas-Oberflächen, aber mit eigener Farbe, Schrift und eigenen Formen.
   ========================================================================= */
:root {
  --font: "Inter Tarko", "Segoe UI Variable Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-display: "Inter Tarko", "Segoe UI Variable Display", "Segoe UI", Roboto, system-ui, sans-serif;
  --tint: #0a8f86;
  --tint-2: #19b5a3;
  --tint-weak: rgba(10, 143, 134, .13);
  --r-win: 26px;
  --r-ctl: 12px;
  --r-widget: 28px;
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .8);
  --glass-line: rgba(255, 255, 255, .7);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 -1px 0 rgba(0, 0, 0, .04) inset, 0 8px 28px rgba(20, 30, 50, .14);
  --pop: cubic-bezier(.34, 1.56, .64, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --tint: #3fd0c2; --tint-2: #7be8d8; --tint-weak: rgba(63, 208, 194, .2); --tint-text: #04201d;
    --glass: rgba(40, 44, 54, .55); --glass-strong: rgba(48, 52, 64, .78); --glass-line: rgba(255, 255, 255, .16);
    --glass-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 8px 28px rgba(0, 0, 0, .4);
  }
}
body { letter-spacing: -.004em; }

/* Fenster: grosse Rundung, Lichtrand, weicher Schatten */
.win { border-radius: var(--r-win); box-shadow: 0 0 0 1px rgba(255, 255, 255, .35), 0 30px 80px rgba(10, 20, 40, .38), 0 8px 24px rgba(10, 20, 40, .14); }
.win.win-open { animation: winOpen .55s var(--pop); }
@keyframes winOpen { from { opacity: 0; transform: translate(var(--fx, 0), var(--fy, 60px)) scale(.4); filter: blur(6px); } }
@keyframes winClose { to { opacity: 0; transform: translate(var(--fx, 0), var(--fy, 40px)) scale(.5); filter: blur(4px); } }
.win.win-close { animation: winClose .26s cubic-bezier(.4, 0, 1, 1) forwards; }

/* Fenster-Knöpfe: runde Glaspunkte */
.win-ctl { top: 16px; left: 16px; gap: 8px; }
.win-ctl button, .win:not(.inactive) .win-ctl .close, .win:not(.inactive) .win-ctl .zoom {
  width: 26px; height: 26px; border-radius: 50%; background: var(--glass-strong); color: var(--label-2);
  box-shadow: inset 0 0 0 1px var(--glass-line), 0 2px 6px rgba(0, 0, 0, .12); transition: transform .2s var(--pop), background .15s;
}
.win-ctl button:hover { transform: scale(1.12); color: var(--label); }
.win-ctl .close:hover { background: #ff6259; color: #fff; }
.win-ctl svg { width: 12px; height: 12px; opacity: .85; color: currentColor; stroke-width: 2.2; }

/* Seitenleisten: Glas, Auswahl als Kapsel */
.sidebar, .st-side { background: var(--glass); backdrop-filter: blur(34px) saturate(1.9); -webkit-backdrop-filter: blur(34px) saturate(1.9); }
.sb-item { border-radius: 14px; transition: background .18s, transform .18s var(--pop); }
.sb-item:hover { background: var(--hover); }
.sb-item:active { transform: scale(.97); }
.sb-item.on, .st-side .sb-item.on { background: var(--glass-strong); color: var(--label); font-weight: 600; box-shadow: var(--glass-shadow); }
.sb-item.on::before { content: none; }
.sb-item.on svg { color: var(--tint); }

/* Einstellungs-Symbole: leuchtende Glaskacheln */
.sq, .sq.lg { background: var(--sqbg, var(--tint)) !important; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .15); border-radius: 8px; }
.sq svg { color: #fff !important; stroke-width: 1.9; }
.sq.gray { --sqbg: linear-gradient(160deg, #a7adb9, #6f7683); }
.sq.blue { --sqbg: linear-gradient(160deg, #62b0ff, #2a6fe0); }
.sq.green { --sqbg: linear-gradient(160deg, #62dd8e, #1f9d57); }
.sq.orange { --sqbg: linear-gradient(160deg, #ffbf5e, #ee8a1c); }
.sq.teal { --sqbg: linear-gradient(160deg, #4fe0cf, #0a8f86); }
.sq.red { --sqbg: linear-gradient(160deg, #ff8a7e, #dc3a30); }
.sq.indigo { --sqbg: linear-gradient(160deg, #9a97ff, #5b55e0); }

/* Listen, Karten, Dialoge */
.list { border-radius: 20px; background: var(--glass-strong); box-shadow: var(--glass-shadow); }
.btn { border-radius: 99px; padding: 0 16px; transition: transform .2s var(--pop), background .15s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.95); }
.btn.primary { background: linear-gradient(180deg, var(--tint-2), var(--tint)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 14px color-mix(in srgb, var(--tint) 45%, transparent); }
.btn.primary:hover { background: linear-gradient(180deg, var(--tint-2), var(--tint)); filter: brightness(1.06); }
.tf { border-radius: 14px; }
.badge { border-radius: 99px; }
.sheet { border-radius: 30px; background: var(--glass-strong); backdrop-filter: blur(40px) saturate(1.9); -webkit-backdrop-filter: blur(40px) saturate(1.9); box-shadow: 0 0 0 1px var(--glass-line), 0 30px 80px rgba(0, 0, 0, .35); animation: sheetIn .45s var(--pop); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(.9); } }
.switch { width: 52px; height: 32px; }
.switch i::after { width: 28px; height: 28px; transition: translate .3s var(--pop), width .2s; }
.switch input:checked + i { background: linear-gradient(180deg, #4fdc86, #25a559); }
.switch input:checked + i::after { translate: 20px 0; }
.switch:active i::after { width: 34px; }
.switch input:checked:active + i::after { translate: 14px 0; }

/* Dock: schwebende Glaskapsel, Icons vergrössern sich unter dem Mauszeiger */
.dock { bottom: 14px; padding: 9px 12px; gap: 8px; border-radius: 32px; align-items: flex-end; background: var(--chrome); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px var(--chrome-line), 0 18px 50px rgba(0, 0, 0, .3); }
.dock-app { transition: translate .3s var(--pop), scale .22s var(--ease); transform-origin: 50% 100%; scale: var(--mag, 1); }
.dock-app:hover { translate: 0 0; }
.dock-app.bounce { animation: dockBounce .7s var(--ease) 2; }
@keyframes dockBounce { 0%, 100% { translate: 0 0; } 40% { translate: 0 -22px; } 60% { translate: 0 -4px; } }
.dock-app .appicon { border-radius: 24%; box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 6px 16px rgba(0, 0, 0, .28); }
.dock-sep { align-self: center; height: 40px; }

/* Widgets: Glas statt dunkle Kacheln */
.wg { border-radius: var(--r-widget); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 0 0 1px var(--widget-line), 0 12px 36px rgba(0, 0, 0, .18); transition: transform .35s var(--pop); }
.wg:hover { transform: translateY(-3px) scale(1.01); }

/* Inhalte schweben beim Öffnen sanft hinein – einmal pro Fenster, nicht bei jedem Klick */
.win-open .st-body > *, .win-open .f-grid > *, .win-open .store-grid > * { animation: rise .5s var(--ease) both; }
.win-open .f-grid > *:nth-child(n+2), .win-open .store-grid > *:nth-child(n+2) { animation-delay: .04s; }
.win-open .f-grid > *:nth-child(n+4), .win-open .store-grid > *:nth-child(n+4) { animation-delay: .08s; }
.win-open .f-grid > *:nth-child(n+8), .win-open .store-grid > *:nth-child(n+8) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.st-body > div, .f-grid { animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* Fotos: Kontaktbogen statt Kartenstapel, Quellen als Umrisskacheln */
.pw-collage { width: 260px; height: 96px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.pw-collage i { position: static !important; inset: auto !important; transform: none !important; width: auto !important; height: auto !important;
  border-radius: 2px !important; box-shadow: none !important; background: linear-gradient(160deg, #9fc9c4, #2f6f78) !important; }
.pw-collage i:nth-child(2n) { background: linear-gradient(160deg, #e9d3a4, #b07a3c) !important; }
.pw-collage i:nth-child(3n) { background: linear-gradient(160deg, #b9c2d6, #4a5a86) !important; }
.pw-collage i:nth-child(2) { grid-row: span 1; margin-top: 14px; } .pw-collage i:nth-child(5) { margin-bottom: 14px; }
.pw-src { border-radius: 8px; background: transparent; box-shadow: inset 0 0 0 1px var(--sep); }
.pw-src:hover { background: var(--tint-weak); }
.pw-src .logo { border-radius: 6px; }
.pw-welcome h1, .p-hero h1 { font-weight: 650; letter-spacing: -.02em; }

/* Apps von unterwegs, Dock-Apps */
.store-remote { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--fill-2); margin-top: 10px; }
.store-remote > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.store-remote small { color: var(--label-2); overflow: hidden; text-overflow: ellipsis; }
.dock-app .applogo-dock { width: 56px; height: 56px; display: grid; place-items: center; color: #fff; border-radius: 22.5%; }
.dock-app .applogo-dock svg { width: 30px; height: 30px; stroke-width: 1.7; }
.dock-app.extra.off .appicon { filter: saturate(.35) brightness(.92); }
.sheet > .sicon .appicon { border-radius: 22%; }
.sheet > .sicon { overflow: visible; }
