  /* ---------- SoulVision Studio · Tokens (Moonstone hell = Standard, Void dunkel) ---------- */
  :root {
    --bg: #FCF9F1; --surface: #FFFDF8; --surface-2: #F8F4EA; --sunken: #F4EEE2;
    --line: #EAE3D2; --line-strong: #D9CFB8;
    --ink: #1A1424; --ink-display: #1A1424; --muted: #6B6478; --faint: #9A93A6;
    --accent: #BB955D; --accent-strong: #9E7A45; --accent-soft: rgba(187, 149, 93, 0.14); --on-accent: #FFFDF8;
    --tile-a: #46437D; --tile-b: #2B2340; --tile-c: #1A1424; --tile-icon: #CBA774; --tile-line: rgba(203, 167, 116, 0.38);
    --tile-shadow: 0 10px 22px rgba(26, 20, 36, 0.18), 0 1px 2px rgba(26, 20, 36, 0.12);
    --scrim: rgba(26, 20, 36, 0.4);
    --sky: none;
    --shadow: 0 1px 2px rgba(26, 20, 36, 0.05), 0 8px 24px rgba(26, 20, 36, 0.07);
    --shadow-lg: 0 24px 60px rgba(26, 20, 36, 0.22);
    --focus: 0 0 0 3px rgba(187, 149, 93, 0.45);
    --font-display: "Rozha One", Georgia, "Times New Roman", serif;
    --font-body: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    --r: 12px; --r-sm: 7px;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #1A1424; --surface: #231B32; --surface-2: #2B2340; --sunken: #161120;
      --line: rgba(196, 184, 216, 0.16); --line-strong: rgba(196, 184, 216, 0.32);
      --ink: #FCF9F1; --ink-display: #EAE3D2; --muted: #C4B8D8; --faint: #8E86A6;
      --accent: #CBA774; --accent-strong: #DDBB88; --accent-soft: rgba(203, 167, 116, 0.16); --on-accent: #1A1424;
      --tile-a: #55519A; --tile-b: #342A52; --tile-c: #211A33; --tile-icon: #DDBB88; --tile-line: rgba(221, 187, 136, 0.42);
      --tile-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.4);
      --scrim: rgba(8, 6, 12, 0.62);
      --sky: radial-gradient(90% 50% at 12% -8%, rgba(70, 67, 125, 0.55) 0%, rgba(70, 67, 125, 0) 70%);
      --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.28);
      --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
    }
  }
  :root[data-theme="dark"] {
    --bg: #1A1424; --surface: #231B32; --surface-2: #2B2340; --sunken: #161120;
    --line: rgba(196, 184, 216, 0.16); --line-strong: rgba(196, 184, 216, 0.32);
    --ink: #FCF9F1; --ink-display: #EAE3D2; --muted: #C4B8D8; --faint: #8E86A6;
    --accent: #CBA774; --accent-strong: #DDBB88; --accent-soft: rgba(203, 167, 116, 0.16); --on-accent: #1A1424;
    --tile-a: #55519A; --tile-b: #342A52; --tile-c: #211A33; --tile-icon: #DDBB88; --tile-line: rgba(221, 187, 136, 0.42);
    --tile-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.4);
    --scrim: rgba(8, 6, 12, 0.62);
    --sky: radial-gradient(90% 50% at 12% -8%, rgba(70, 67, 125, 0.55) 0%, rgba(70, 67, 125, 0) 70%);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  }

  [hidden] { display: none !important; }
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
  body::before { content: ""; position: fixed; inset: 0; background: var(--sky); pointer-events: none; z-index: 0; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; }
  :focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
  .i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .i.sm { width: 15px; height: 15px; }

  .topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .brand-mark { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--accent); font-size: 15px; }
  .brand-text { display: grid; line-height: 1.1; min-width: 0; }
  .brand-eyebrow { font-size: 9.5px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent-strong); }
  .brand-name { font-family: var(--font-display); font-size: 19px; color: var(--ink-display); white-space: nowrap; }
  .topbar .spacer { flex: 1; }
  .clock { font-family: var(--font-display); font-size: 20px; color: var(--ink-display); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
  .iconbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--muted); flex: none; }
  .iconbtn:hover { background: var(--surface-2); color: var(--ink); }
  .iconbtn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
  .btn { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); padding: 8px 14px; font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
  .btn:hover { border-color: var(--ink); }
  .btn.gold { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
  .btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
  .btn.danger { color: #B24A3A; border-color: rgba(178, 74, 58, 0.4); }
  .btn.sm { padding: 6px 11px; font-size: 12px; }

  .wrap { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; padding: 26px 16px 150px; }
  .hero { display: grid; gap: 4px; margin-bottom: 20px; }
  .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent); margin: 0; }
  .eyebrow::before { content: "✦\00a0"; }
  h1.greet { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 6vw, 44px); line-height: 1.08; margin: 0; color: var(--ink-display); text-wrap: balance; }
  .gold { color: var(--accent); }
  .hero .meta { color: var(--muted); font-size: 13.5px; display: flex; gap: 6px 14px; flex-wrap: wrap; }
  .hero .meta b { color: var(--ink); font-weight: 600; }
  .search { position: relative; margin: 6px 0 26px; }
  .search input { width: 100%; padding: 12px 40px 12px 42px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 15px; box-shadow: var(--shadow); }
  .search .i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--faint); }
  .search .clr { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }

  section { margin-bottom: 30px; }
  .shead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
  .shead .eyebrow { margin: 0; }
  .shead small { font-size: 12px; color: var(--faint); }
  .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 18px 8px; }
  .tile { display: grid; justify-items: center; gap: 8px; text-decoration: none; color: inherit; border: 0; background: none; padding: 0; width: 100%; position: relative; }
  .tico { width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center; color: var(--tile-icon); position: relative; flex: none;
    background: radial-gradient(circle at 78% 22%, rgba(252, 249, 241, 0.7) 0 1px, transparent 1.7px), radial-gradient(circle at 26% 76%, rgba(203, 167, 116, 0.8) 0 1px, transparent 1.7px), radial-gradient(circle at 60% 62%, rgba(252, 249, 241, 0.4) 0 0.7px, transparent 1.4px), radial-gradient(120% 120% at 18% 12%, var(--tile-a) 0%, var(--tile-b) 46%, var(--tile-c) 100%);
    box-shadow: var(--tile-shadow), inset 0 0 0 1px var(--tile-line); transition: transform 0.15s, box-shadow 0.15s; }
  .tico .ti { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .tile:hover .tico { transform: translateY(-2px); box-shadow: var(--tile-shadow), inset 0 0 0 1px var(--tile-icon); }
  .tile:active .tico { transform: scale(0.95); }
  .tlbl { font-size: 12px; font-weight: 600; color: var(--ink); text-align: center; line-height: 1.25; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
  .tile .badge { position: absolute; top: -6px; right: calc(50% - 40px); width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; box-shadow: var(--shadow); }
  .tile .badge .i { width: 12px; height: 12px; stroke-width: 2.2; }
  .tile.shared .tico { background: radial-gradient(120% 120% at 18% 12%, #6E6A9E 0%, #4A4675 50%, #2E2A4A 100%); }
  .tile.link .tico { background: radial-gradient(120% 120% at 18% 12%, var(--tile-b) 0%, var(--tile-c) 100%); }
  .tile.add .tico { background: transparent; border: 1.5px dashed var(--line-strong); box-shadow: none; color: var(--muted); }
  .tile.add:hover .tico { color: var(--ink); border-color: var(--ink); }
  .ftile .tico { background: var(--surface-2); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .ftile .mini { border-radius: 7px; display: grid; place-items: center; color: var(--tile-icon); background: radial-gradient(120% 120% at 18% 12%, var(--tile-a) 0%, var(--tile-b) 50%, var(--tile-c) 100%); box-shadow: inset 0 0 0 0.5px var(--tile-line); }
  .ftile .mini .ti { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .ftile .mini.more { background: transparent; color: var(--faint); font-size: 10px; font-weight: 700; box-shadow: none; }
  .ftile .cnt { position: absolute; top: -4px; right: calc(50% - 40px); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 700; display: grid; place-items: center; }

  .chips { display: flex; gap: 6px; flex-wrap: wrap; }
  .chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600; text-decoration: none; max-width: 100%; }
  .chip:hover { border-color: var(--ink); }
  .chip .ci { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: var(--tile-icon); background: radial-gradient(120% 120% at 18% 12%, var(--tile-a) 0%, var(--tile-b) 50%, var(--tile-c) 100%); flex: none; }
  .chip .ci .ti { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .chip span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .rows { display: grid; gap: 6px; }
  .row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; text-align: left; width: 100%; }
  .row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
  .row .ri { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--tile-icon); background: radial-gradient(120% 120% at 18% 12%, var(--tile-a) 0%, var(--tile-b) 50%, var(--tile-c) 100%); box-shadow: inset 0 0 0 1px var(--tile-line); flex: none; }
  .row .ri .ti { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .row.shared .ri { background: radial-gradient(120% 120% at 18% 12%, #6E6A9E 0%, #4A4675 50%, #2E2A4A 100%); }
  .row .rt { flex: 1; min-width: 0; display: grid; gap: 2px; }
  .row .rn { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .row .rs { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .row .rm { font-size: 11px; color: var(--faint); white-space: nowrap; display: grid; justify-items: end; gap: 3px; }
  .row .rm .i { color: var(--faint); }
  .empty { border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 24px 18px; color: var(--muted); text-align: center; font-size: 14px; }

  /* Dock */
  .dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 35; display: flex; gap: 12px; padding: 10px 14px; border-radius: 30px; background: color-mix(in srgb, var(--surface) 80%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid var(--line); box-shadow: var(--shadow-lg); max-width: calc(100vw - 24px); }
  .dock .tile { width: auto; }
  .dock .tico { width: 56px; height: 56px; border-radius: 17px; }
  .dock .tico .ti { width: 26px; height: 26px; }
  .dock .tlbl { display: none; }
  .dock .tile .badge { right: -6px; }

  /* Sheets */
  .scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; }
  .sheet { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: min(82vh, 760px); overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 20px 22px 22px; display: grid; gap: 14px; align-content: start; }
  .sheet-head { display: flex; align-items: center; gap: 12px; }
  .sheet-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 24px; margin: 0; flex: 1; color: var(--ink-display); line-height: 1.15; }
  .sheet-head .sub { font-size: 12.5px; color: var(--muted); }
  .sheet .grid { gap: 16px 6px; }
  .field { display: grid; gap: 5px; }
  .field label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
  .field input, .field select { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
  .field .sub { font-size: 11.5px; color: var(--faint); }
  .frow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .checks { display: flex; gap: 14px; flex-wrap: wrap; }
  .checks label { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; }
  .checks input { accent-color: var(--accent); width: 17px; height: 17px; }
  .icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
  .icons button { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; }
  .icons button .ti { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .icons button[aria-pressed="true"] { background: var(--ink); color: var(--accent); border-color: var(--ink); }
  .sheet .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding-top: 4px; border-top: 1px solid var(--line); margin-top: 4px; }
  .sheet .actions .left { margin-right: auto; }
  .note { font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 10px; }
  @media (max-width: 720px) {
    .sheet { left: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 86vh; border-radius: 18px 18px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
    .frow { grid-template-columns: 1fr; }
  }
  #toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow-lg); max-width: min(90vw, 520px); text-align: center; z-index: 60; }
  @media (max-width: 560px) {
    .brand-eyebrow { display: none; }
    .clock { font-size: 18px; }
    .grid { grid-template-columns: repeat(4, 1fr); gap: 16px 6px; }
    .tico { width: 62px; height: 62px; border-radius: 19px; }
    .dock { gap: 8px; padding: 8px 10px; }
    .dock .tico { width: 52px; height: 52px; }
  }
  @media (prefers-reduced-motion: reduce) { .tico, .tile:hover .tico { transition: none; transform: none; } }

  /* ---------- Tor (Anmeldung / Einrichtung) ---------- */
  .gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; z-index: 1; }
  .gate-card { width: min(380px, 100%); display: grid; gap: 14px; justify-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 26px 22px; }
  .gate-card.wide { width: min(560px, 100%); }
  .gate-card .brand-mark { justify-self: start; }
  .gate-card .btn.gold { justify-content: center; padding: 12px 16px; font-size: 15px; }
  .gate-msg { margin: 0; padding: 9px 12px; border-radius: var(--r-sm); background: rgba(178, 74, 58, 0.12); color: #B24A3A; font-size: 13.5px; font-weight: 600; }
  .vsub { color: var(--muted); margin: 0; }
  .steps { margin: 0; padding-left: 20px; display: grid; gap: 18px; }
  .steps li { display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
  .steps li b { color: var(--ink); }
  .steps .sub { font-size: 12.5px; color: var(--faint); margin: 0; }
  .steps code { font-size: 12.5px; color: var(--ink); background: var(--surface-2); padding: 2px 6px; border-radius: 5px; word-break: break-all; }
  .qr { width: 180px; background: #fff; border-radius: 10px; padding: 4px; }
  .qr svg { display: block; width: 100%; height: auto; }
  .field textarea { width: 100%; min-height: 140px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); resize: vertical; line-height: 1.5; }
  .kinds { display: flex; gap: 6px; flex-wrap: wrap; }
  .kinds button { border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
  .kinds button[aria-pressed="true"] { background: var(--ink); color: var(--accent); border-color: var(--ink); }
  .loglist { display: grid; gap: 4px; font-size: 12px; color: var(--muted); max-height: 240px; overflow-y: auto; }
  .loglist div { display: flex; gap: 8px; }
  .loglist .bad { color: #B24A3A; font-weight: 600; }
  .stat { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
  .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
  .dot.ok { background: #4E8A5E; } .dot.warn { background: #C0705A; }

  /* ---------- Öffentliche Startseite (immer Moonstone, wie soulvision.studio) ---------- */
  .landing { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px 72px; position: relative; z-index: 1; background: #FCF9F1; color: #1A1424; color-scheme: light; }
  .landing-in { display: grid; justify-items: center; gap: 36px; text-align: center; }
  .landing-logo { width: min(240px, 62vw); height: auto; display: block; }
  .landing-btn { background: #BB955D; border-color: #BB955D; color: #1A1424; padding: 18px 34px; font-size: 17px; font-weight: 600; border-radius: 999px; text-decoration: none; box-shadow: 0 10px 28px rgba(26, 20, 36, 0.14); }
  .landing-btn:hover { background: #1A1424; border-color: #1A1424; color: #FCF9F1; }
  .quiet-login { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); font-size: 12px; color: #1A1424; opacity: 0.35; text-decoration: none; letter-spacing: 0.04em; }
  .quiet-login:hover { opacity: 0.7; }
