/* Layout: one-screen app. Portrait = stacked (Kopf, Kern, Gespräch, Eingabe). Querformat ab 900px = Kern links, Gespräch rechts (Echo Show 8: 1280x800). */
:root {
  /* Look "Nacht" (Standard, dunkel) */
  --bg: #070b14;
  --bg-2: #0d1424;
  --surface: rgba(140, 180, 255, 0.06);
  --surface-strong: rgba(140, 180, 255, 0.11);
  --line: rgba(150, 190, 255, 0.16);
  --fg: #e6eefc;
  --fg-dim: #8c9bb8;
  --accent: #66d4ff;
  --accent-2: #ffbe5c;
  --accent-ink: #04121c;
  --core: #bfefff;
  --font-display: "Oxanium", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 18px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-look]) {
    --bg: #eef3fa; --bg-2: #ffffff; --surface: rgba(30, 60, 120, 0.05); --surface-strong: rgba(30, 60, 120, 0.09);
    --line: rgba(30, 60, 120, 0.14); --fg: #0f1a2e; --fg-dim: #56647d; --accent: #1479d9; --accent-2: #e08a12;
    --accent-ink: #ffffff; --core: #1479d9; color-scheme: light;
  }
}
:root[data-theme="light"]:not([data-look]) {
  --bg: #eef3fa; --bg-2: #ffffff; --surface: rgba(30, 60, 120, 0.05); --surface-strong: rgba(30, 60, 120, 0.09);
  --line: rgba(30, 60, 120, 0.14); --fg: #0f1a2e; --fg-dim: #56647d; --accent: #1479d9; --accent-2: #e08a12;
  --accent-ink: #ffffff; --core: #1479d9; color-scheme: light;
}
/* Looks, die man im Entwurf umschalten kann */
:root[data-look="nacht"] {
  --bg: #070b14; --bg-2: #0d1424; --surface: rgba(140, 180, 255, 0.06); --surface-strong: rgba(140, 180, 255, 0.11);
  --line: rgba(150, 190, 255, 0.16); --fg: #e6eefc; --fg-dim: #8c9bb8; --accent: #66d4ff; --accent-2: #ffbe5c;
  --accent-ink: #04121c; --core: #bfefff; color-scheme: dark;
}
:root[data-look="tag"] {
  --bg: #eef3fa; --bg-2: #ffffff; --surface: rgba(30, 60, 120, 0.05); --surface-strong: rgba(30, 60, 120, 0.09);
  --line: rgba(30, 60, 120, 0.14); --fg: #0f1a2e; --fg-dim: #56647d; --accent: #1479d9; --accent-2: #e08a12;
  --accent-ink: #ffffff; --core: #1479d9; color-scheme: light;
}
:root[data-look="abend"] {
  --bg: #120c08; --bg-2: #1c130d; --surface: rgba(255, 190, 130, 0.06); --surface-strong: rgba(255, 190, 130, 0.11);
  --line: rgba(255, 190, 130, 0.16); --fg: #f6e7d6; --fg-dim: #a8907a; --accent: #ff9f4a; --accent-2: #ffd27a;
  --accent-ink: #1d0f04; --core: #ffd9b0; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-2), var(--bg) 70%) fixed, var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  overflow: hidden;
}
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.app {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "head" "main" "dock";
  gap: 12px;
  padding-block: 14px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  max-width: 1400px;
  margin: 0 auto;
}

/* Kopf */
header { grid-area: head; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand .mark { width: 26px; height: 26px; color: var(--core); filter: drop-shadow(0 0 6px var(--accent)); flex: none; }
#stars { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.app { position: relative; z-index: 1; }
.brand b { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.32em; }
.brand span { font-family: var(--font-display); color: var(--fg-dim); font-size: 0.85rem; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.wx { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--fg-dim); }
.wx strong { color: var(--fg); font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.wx svg { width: 22px; height: 22px; }

.people { display: flex; gap: 6px; flex-wrap: wrap; }
.person {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  font-size: 0.9rem; color: var(--fg-dim); transition: background .2s, color .2s, border-color .2s;
}
.person i {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-family: var(--font-display); font-weight: 600; font-size: 0.8rem;
  background: var(--surface-strong); color: var(--fg);
}
.person[aria-pressed="true"] { color: var(--fg); border-color: var(--accent); background: var(--surface); }
.person[aria-pressed="true"] i { background: var(--accent); color: var(--accent-ink); }

.draft { position: relative; }
@media (max-width: 899px) { .people { order: 5; flex-basis: 100%; } }
.draft summary {
  list-style: none; cursor: pointer; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-dim); border: 1px dashed var(--line); border-radius: 999px; padding: 6px 12px;
}
.draft summary::-webkit-details-marker { display: none; }
.draft[open] summary { color: var(--fg); border-color: var(--accent); }
.draft-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(300px, calc(100vw - 32px));
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  display: grid; gap: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.draft-panel h4 { margin: 0 0 6px; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-dim); font-weight: 600; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 6px 10px; cursor: pointer; font-size: 0.85rem;
}
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.draft-panel p { margin: 0; font-size: 0.8rem; color: var(--fg-dim); line-height: 1.4; }

/* Hauptbereich */
main { grid-area: main; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; min-height: 0; }
.stage { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 0; }
.orb-wrap { position: relative; width: min(46vh, 72vw, 340px); aspect-ratio: 1; max-width: 100%; }
.orb-wrap canvas { width: 100%; height: 100%; display: block; }
.status { text-align: center; display: grid; gap: 2px; max-width: 100%; text-wrap: balance; }
.stage > * { max-width: 100%; }
.status .label {
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; font-size: 0.85rem; color: var(--accent);
}
.status .hint { font-size: 0.9rem; color: var(--fg-dim); min-height: 1.3em; }

/* Gespräch */
.convo {
  min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
  padding: 4px 2px 8px; scroll-behavior: smooth;
  mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 100%);
}
.msg { max-width: 62ch; min-width: 0; line-height: 1.5; animation: rise .35s ease-out both; }
.msg.q { align-self: flex-end; color: var(--fg-dim); font-size: 0.95rem; text-align: right; }
.msg.q .who { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; display: block; margin-bottom: 2px; }
.msg.q .text { color: var(--fg); background: var(--surface-strong); padding: 8px 14px; border-radius: 16px 16px 4px 16px; display: inline-block; text-align: left; }
.msg.a { align-self: flex-start; font-size: 1.12rem; }
.msg.a .text { white-space: pre-wrap; }
.msg.a.kid { font-size: 1.25rem; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sources span { font-size: 0.75rem; color: var(--fg-dim); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.cursor { display: inline-block; width: 0.5em; height: 1em; background: var(--accent); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(2) infinite; }
.empty { margin: auto 0; color: var(--fg-dim); text-align: center; font-size: 1rem; line-height: 1.5; }
.empty b { color: var(--fg); font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; display: block; margin-bottom: 4px; letter-spacing: 0.02em; }

.wcard {
  margin-top: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius);
  padding: 12px 14px; display: grid; gap: 10px; max-width: 420px;
}
.wcard-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 0.85rem; color: var(--fg-dim); }
.wcard-top strong { font-family: var(--font-display); color: var(--fg); font-size: 1rem; font-weight: 600; }
.hours { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; font-variant-numeric: tabular-nums; }
.hours div { display: grid; gap: 4px; justify-items: center; font-size: 0.8rem; color: var(--fg-dim); }
.hours b { font-family: var(--font-display); font-size: 1.15rem; color: var(--fg); font-weight: 600; }
.hours svg { width: 26px; height: 26px; }
.hours .rain { color: var(--accent); font-size: 0.75rem; }

/* Eingabe */
.dock { grid-area: dock; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.suggest { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.suggest::-webkit-scrollbar { display: none; }
.suggest button {
  flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; font-size: 0.9rem; color: var(--fg); transition: border-color .2s, background .2s;
}
.suggest button:hover { border-color: var(--accent); }
.bar { display: flex; align-items: center; gap: 12px; }
.typebox {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 4px 4px 18px;
}
.typebox input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 10px 0; font-size: 1rem; }
.typebox input::placeholder { color: var(--fg-dim); }
.typebox button { border: 0; background: var(--surface-strong); border-radius: 999px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.typebox button svg { width: 18px; height: 18px; }

.talk {
  flex: none; position: relative; width: 76px; height: 76px; border-radius: 50%;
  border: 0; cursor: pointer; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent), 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform .15s ease, background .2s;
}
.talk svg { width: 32px; height: 32px; }
.talk:active, .talk.down { transform: scale(0.94); }
.talk.down { animation: ring 1.2s ease-out infinite; }
.talk[data-mode="stop"] { background: var(--accent-2); }
.talk-label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); text-align: center; margin-top: 4px; }
.talk-col { display: grid; justify-items: center; }
.listen {
  flex: none; width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg-dim);
  display: grid; place-items: center; transition: background .2s, color .2s, border-color .2s;
}
.listen svg { width: 24px; height: 24px; }
.listen[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--surface-strong); }
.live {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
}
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); animation: pulse 1.8s ease-in-out infinite; }
.orb-wrap.wakeable { cursor: pointer; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* Querformat: Echo Show 8, Laptop */
@media (min-width: 900px) and (orientation: landscape), (min-width: 1100px) {
  .app {
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "head head" "stage main" "stage dock";
    column-gap: 32px;
  }
  main { display: contents; }
  .stage { grid-area: stage; }
  .convo { grid-area: main; }
  .orb-wrap { width: min(52vh, 34vw, 420px); }
}
/* Echo Show 8 hat wenig Höhe: kompakter */
@media (max-height: 820px) and (orientation: landscape) {
  .app { padding-block: 10px; gap: 8px; }
  .talk { width: 60px; height: 60px; }
  .talk svg { width: 26px; height: 26px; }
  .talk-label { margin-top: 2px; }
}
@media (max-width: 480px) {
  .person span { display: none; }
  .person { padding: 3px; }
  .person i { width: 34px; height: 34px; }
  .brand b { font-size: 1.1rem; }
  .orb-wrap { width: min(34vh, 70vw); }
  .bar { gap: 8px; }
  .listen { width: 46px; height: 46px; }
  .talk { width: 68px; height: 68px; }
}

@keyframes rise { from { opacity: 0.2; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent), 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent); } 100% { box-shadow: 0 0 0 22px transparent, 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent); } }
@media (prefers-reduced-motion: reduce) {
  .msg, .talk.down, .cursor, .live::before { animation: none; }
}

/* ---------- Ergänzungen für den Prototyp ---------- */
.msg.a.error .text { color: var(--accent-2); }
.sources a { font-size: 0.75rem; color: var(--fg-dim); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; text-decoration: none; }
.sources a:hover { color: var(--fg); border-color: var(--accent); }
.msg.q.live-q .text { opacity: 0.75; }
.notice { font-size: 0.8rem; color: var(--accent-2); text-align: center; }
.deep-toggle { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--fg-dim); cursor: pointer; }
.draft-panel .logout { justify-self: start; border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 6px 10px; cursor: pointer; font-size: 0.85rem; }

/* Login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; position: relative; z-index: 1; }
.login form { width: min(360px, 100%); display: grid; gap: 14px; justify-items: center; text-align: center; }
.login img { width: 120px; height: 120px; filter: drop-shadow(0 0 18px var(--accent)); }
.login h1 { margin: 0; font-family: var(--font-display); letter-spacing: 0.32em; font-size: 1.6rem; }
.login input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 12px 18px; font-size: 1rem; outline: none; }
.login input:focus { border-color: var(--accent); }
.login button { border: 0; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 12px 28px; font-size: 1rem; cursor: pointer; font-weight: 600; }
.login .err { color: var(--accent-2); min-height: 1.3em; font-size: 0.9rem; }
.login select { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 12px 18px; font-size: 1rem; }
.login-check { display: flex; align-items: center; gap: 8px; color: var(--fg-dim); font-size: 0.92rem; cursor: pointer; }
.login-check input { width: auto; accent-color: var(--accent); }
.login-note { margin: 0; color: var(--fg-dim); font-size: 0.85rem; line-height: 1.5; }
.login form[hidden] { display: none; }

/* „Familie“ = unbekannt, wer spricht; optisch von den Personen abgesetzt */
.person.fam { margin-right: 6px; }
.person.fam i { background: transparent; border: 1px dashed var(--line); }

/* ---------- Link zur Einstellungsseite ---------- */
.draft-link {
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-dim); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
}
.draft-link:hover { color: var(--fg); border-color: var(--accent); }

/* ---------- Einstellungsseite ---------- */
body.page { overflow: auto; }
.settings { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; position: relative; z-index: 1; }
.settings-head { grid-area: auto; display: flex; align-items: center; gap: 16px; }
.settings-head h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; letter-spacing: 0.04em; }
.back { color: var(--accent); text-decoration: none; font-family: var(--font-display); letter-spacing: 0.08em; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 16px; display: grid; gap: 14px; align-content: start; }
.card h2 { margin: 0; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim); font-weight: 600; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row small { display: block; color: var(--fg-dim); font-size: 0.82rem; margin-top: 2px; }
.row.check { justify-content: flex-start; align-items: flex-start; flex-wrap: nowrap; cursor: pointer; }
.row.check > span { flex: 1; min-width: 0; }
.row.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.row.slider { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 6px; }
.row.slider output { color: var(--accent); font-variant-numeric: tabular-nums; margin-left: 6px; }
.row.slider input[type="range"] { width: 100%; accent-color: var(--accent); }
.row.slider textarea { width: 100%; resize: vertical; border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; padding: 8px 10px; font: inherit; color: var(--fg); }
.btn { justify-self: start; border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 8px 14px; cursor: pointer; font-size: 0.9rem; }
.btn:hover { border-color: var(--accent); }
.muted { margin: 0; color: var(--fg-dim); font-size: 0.9rem; }

/* =========================================================
   Layout über die volle Breite mit Widget-Bereich (0.2.0)
   Hochformat: Kopf, Widget-Leiste (quer scrollbar), Kern, Gespräch, Eingabe
   Querformat ab 900px: Kern | Gespräch, Widgets als Leiste unter dem Kern
   Ab 1280px: Kern | Gespräch | Widget-Spalte
   ========================================================= */
.app {
  max-width: none;
  grid-template-areas: "head" "widgets" "main" "dock";
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.widgets { grid-area: widgets; display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 2px; }
.widgets::-webkit-scrollbar { display: none; }
.widgets:empty { display: none; }
.widgets .widget { flex: 0 0 min(300px, 82vw); }

@media (min-width: 900px) and (orientation: landscape), (min-width: 1100px) {
  .app {
    grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "head head" "widgets widgets" "stage main" "stage dock";
  }
  .widgets .widget { flex-basis: 260px; }
}
@media (min-width: 1280px) {
  .app {
    grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.25fr) minmax(300px, 0.75fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "head head head" "stage main widgets" "stage dock widgets";
    column-gap: 28px;
  }
  .widgets { flex-direction: column; overflow-x: hidden; overflow-y: auto; align-self: stretch; padding-bottom: 8px;
    mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); }
  .widgets .widget { flex: none; }
}

/* ---------- Widget-Karten ---------- */
.widget {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  background: linear-gradient(160deg, var(--surface-strong), var(--surface) 60%);
  backdrop-filter: blur(6px); display: grid; gap: 10px; align-content: start; overflow: hidden;
  animation: widget-in .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 110ms + 150ms);
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
/* Lichtkante, die einmal über die Karte wandert */
.widget::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(110deg, transparent 35%, color-mix(in srgb, var(--accent) 18%, transparent) 50%, transparent 65%);
  background-size: 250% 100%; background-position: 120% 0;
  animation: sheen 1.6s ease-out both; animation-delay: calc(var(--i, 0) * 110ms + 600ms);
}
.widget:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-2px);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 14%, transparent); }
.widget h3 { margin: 0; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim); font-weight: 600; }
.wnote { margin: 0; font-size: 0.85rem; color: var(--fg-dim); line-height: 1.4; }
.wnote code { font-size: 0.8rem; color: var(--accent); }
.wsub { margin: -4px 0 0; font-family: var(--font-display); font-size: 0.95rem; color: var(--fg); }

/* Lade-/Platzhalter-Schimmer */
.wshimmer { display: grid; gap: 7px; }
.wshimmer span { height: 9px; border-radius: 6px; background: linear-gradient(90deg, var(--surface), var(--surface-strong), var(--surface)); background-size: 200% 100%; animation: shimmer 1.8s linear infinite; }
.wshimmer span:nth-child(2) { width: 80%; } .wshimmer span:nth-child(3) { width: 55%; }

/* Wetter */
.wnow { display: flex; align-items: center; gap: 14px; }
.wnow > div { display: grid; }
.wtemp { font-family: var(--font-display); font-size: 2.4rem; font-weight: 600; line-height: 1; color: var(--fg); }
.wnow span { color: var(--fg); font-size: 0.95rem; }
.wnow small { color: var(--fg-dim); font-size: 0.78rem; }
.whours { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: center; font-variant-numeric: tabular-nums; }
.whours div { display: grid; justify-items: center; gap: 2px; font-size: 0.75rem; color: var(--fg-dim); }
.whours b { font-family: var(--font-display); color: var(--fg); font-size: 1rem; }
.whours i, .wday i { font-style: normal; color: var(--accent); font-size: 0.72rem; }
.wdays { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.wday { display: grid; grid-template-columns: 26px 1fr auto 34px; align-items: center; gap: 8px; font-size: 0.85rem; }
.wday b { font-family: var(--font-display); }
.wday i { color: var(--fg-dim); font-size: 0.85rem; text-align: right; }

/* Animierte Wettersymbole */
.wx { width: 26px; height: 26px; color: var(--fg); overflow: visible; }
.wx.lg { width: 58px; height: 58px; color: var(--core); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 60%, transparent)); }
.wx.sm { width: 22px; height: 22px; }
.wx-sun { color: var(--accent-2); }
.wx-rays { transform-origin: 12px 12px; animation: spin 18s linear infinite; }
.wx-sun.small .wx-rays { transform-origin: 8px 8px; }
.wx-cloud { animation: drift 6s ease-in-out infinite; }
.wx-drop { color: var(--accent); animation: drop 1.1s linear infinite; }
.wx-flake { fill: currentColor; animation: flake 2.4s ease-in infinite; }
.wx-drop.d2, .wx-flake.d2 { animation-delay: .35s; } .wx-drop.d3, .wx-flake.d3 { animation-delay: .7s; }
.wx-bolt { color: var(--accent-2); animation: bolt 3s steps(1) infinite; }
.wx-fog { animation: drift 4s ease-in-out infinite reverse; opacity: .7; }
.wx-moon { color: var(--core); }
.wx-twinkle { fill: currentColor; animation: pulse 2.4s ease-in-out infinite; } .wx-twinkle.d2 { animation-delay: 1.1s; }

/* Stundenplan */
.tt { display: grid; gap: 10px; }
.tt.multi { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); }
.tt-col b { display: block; font-size: 0.8rem; color: var(--accent); margin-bottom: 4px; }
.tt ol { margin: 0; padding-left: 1.4em; display: grid; gap: 3px; font-size: 0.9rem; }
.tt li::marker { color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.tt li.free { list-style: none; margin-left: -1.4em; color: var(--fg-dim); }

@keyframes widget-in { from { opacity: 0; transform: translateY(14px) scale(.97); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes sheen { to { background-position: -120% 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { 50% { transform: translateX(1.2px); } }
@keyframes drop { 0% { transform: translateY(-2px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(4px); opacity: 0; } }
@keyframes flake { 0% { transform: translateY(-2px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(1px, 4px); opacity: 0; } }
@keyframes bolt { 0%, 88%, 94% { opacity: .25; } 90%, 96% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .widget, .widget::after, .wx *, .wshimmer span { animation: none !important; }
}
/* Schmale Hochformat-Geräte: Widgets kompakt halten */
@media (max-width: 1279px) {
  .widgets .whours, .widgets .wdays { display: none; }
  .widgets .widget { flex-basis: min(240px, 70vw); padding: 10px 14px; }
  .widgets .tt ol { grid-auto-flow: column; grid-template-rows: repeat(3, auto); column-gap: 18px; }
}
.place-search { display: flex; gap: 8px; }
.place-search input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; padding: 8px 12px; color: var(--fg); outline: none; }
.place-search input:focus { border-color: var(--accent); }
.places { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.places button { width: 100%; text-align: left; border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.places button:hover { border-color: var(--accent); background: var(--surface-strong); }
.places .ok { color: var(--accent); }

/* ---------- Kalenderseite ---------- */
.cal-page { max-width: 1400px; margin: 0 auto; padding: 20px 20px 48px; display: grid; gap: 16px; position: relative; z-index: 1; }
.cal-who { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--fg-dim); font-size: 0.9rem; }
.cal-who select, .cal-form input, .cal-form select, .cal-form textarea, .cal-import-form input {
  border: 1px solid var(--line); background: var(--bg-2); color: var(--fg); border-radius: 10px; padding: 7px 10px; font: inherit; }
.cal-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) {
  .cal-layout { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); }
  .cal-month { grid-row: span 2; }
}
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h2 { margin: 0 auto 0 0; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.04em; text-transform: none; color: var(--fg); }
.cal-month .cal-nav h2 { order: 1; margin: 0 auto 0 8px; }
.cal-month .cal-nav #next { order: 0; } .cal-month .cal-nav #today { order: 2; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.danger { border-color: color-mix(in srgb, var(--accent-2) 60%, transparent); color: var(--accent-2); margin-left: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-dim); padding: 4px 0; }
.cal-cell { min-height: 92px; display: flex; flex-direction: column; gap: 3px; align-items: stretch; text-align: left; padding: 6px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; cursor: pointer; overflow: hidden; transition: border-color .2s, background .2s; }
.cal-cell:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.cal-cell.out { opacity: 0.45; }
.cal-cell .n { font-family: var(--font-display); font-size: 0.85rem; color: var(--fg-dim); }
.cal-cell.today .n { color: var(--accent-ink); background: var(--accent); border-radius: 999px; width: 1.7em; text-align: center; }
.cal-cell.sel { background: var(--surface-strong); border-color: var(--accent); }
.chip { font-size: 0.72rem; border-radius: 6px; padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--fg); }
.more { font-size: 0.7rem; color: var(--fg-dim); }
.cat-müll.chip, .cal-list li.cat-müll { --c: #7bd389; } .cat-schule.chip, .cal-list li.cat-schule { --c: #ffbe5c; }
.cat-arzt.chip, .cal-list li.cat-arzt { --c: #ff7a8a; } .cat-geburtstag.chip, .cal-list li.cat-geburtstag { --c: #c79bff; }
.cat-sport.chip, .cal-list li.cat-sport { --c: #66d4ff; }
.chip[class*="cat-"] { background: color-mix(in srgb, var(--c, var(--accent)) 26%, transparent); }
.cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cal-list li { display: grid; grid-template-columns: 92px 1fr; column-gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); border-left: 4px solid var(--c, var(--accent)); }
.cal-list li.muted { border-left-color: var(--line); cursor: default; display: block; }
.cal-list li:hover:not(.muted) { background: var(--surface-strong); }
.cal-list b { font-family: var(--font-display); font-weight: 500; font-size: 0.85rem; color: var(--fg-dim); grid-row: span 2; }
.cal-list small { color: var(--fg-dim); }
.cal-form { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.cal-form h3 { margin: 0; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim); }
.cal-form label:not(.row):not(.chipbox) { display: grid; gap: 4px; font-size: 0.85rem; color: var(--fg-dim); }
.cal-form .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.cal-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.cal-form legend { font-size: 0.85rem; color: var(--fg-dim); margin-bottom: 4px; }
.cal-form small { color: var(--fg-dim); font-size: 0.78rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbox input { position: absolute; opacity: 0; pointer-events: none; }
.chipbox span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 0.85rem; }
.chipbox input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chipbox input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.cal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.err { color: var(--accent-2); margin: 0; min-height: 1.2em; font-size: 0.9rem; }
.cal-import-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.cal-import-form label { display: grid; gap: 4px; font-size: 0.85rem; color: var(--fg-dim); }
@media (max-width: 700px) {
  .cal-cell { min-height: 54px; padding: 4px; }
  .cal-cell .chip { font-size: 0; height: 6px; padding: 0; }
  .settings-head { flex-wrap: wrap; }
}

/* Termine-Widget */
.w-calendar a.wlink { font-size: 0.8rem; color: var(--accent); text-decoration: none; justify-self: start; }
.wcal { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wcal li { display: grid; grid-template-columns: 96px 1fr; gap: 8px; font-size: 0.88rem; align-items: baseline; }
.wcal li b { font-family: var(--font-display); font-weight: 500; font-size: 0.78rem; color: var(--fg-dim); }
.wwaste { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  background: color-mix(in srgb, #7bd389 14%, transparent); border: 1px solid color-mix(in srgb, #7bd389 35%, transparent); font-size: 0.88rem; }
.wwaste svg { width: 22px; height: 22px; color: #7bd389; flex: none; }
.wwaste b { font-family: var(--font-display); }

/* Erinnerungs-Banner */
.reminder {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 50; width: min(640px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--accent-2); box-shadow: 0 16px 50px rgba(0,0,0,.45), 0 0 30px color-mix(in srgb, var(--accent-2) 25%, transparent);
  animation: widget-in .5s cubic-bezier(.2,.8,.2,1) both; font-size: 1.05rem;
}
.reminder svg { width: 26px; height: 26px; color: var(--accent-2); flex: none; animation: ring-bell 1.2s ease-in-out 2; transform-origin: 50% 10%; }
.reminder span { flex: 1; }
@keyframes ring-bell { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }

/* =========================================================
   Handy und kleine Tablets (0.6.1)
   ========================================================= */
.nav-links { display: flex; gap: 6px; }
.draft-link { display: inline-flex; align-items: center; gap: 6px; }
.draft-link svg { width: 16px; height: 16px; flex: none; }
.person.fam i { color: var(--fg); }

@media (max-width: 899px) {
  .app { gap: 8px; padding-block: 10px; }
  header { gap: 8px 10px; }
  .brand { margin-right: auto; }
  /* Kopf: oben Logo und Symbole, darunter Personen in einer wischbaren Zeile */
  .nav-links { order: 2; }
  .draft-link { padding: 0; width: 38px; height: 38px; justify-content: center; border-radius: 50%; }
  .draft-link span { display: none; }
  .draft-link svg { width: 19px; height: 19px; }
  .people { order: 5; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .people::-webkit-scrollbar { display: none; }
  .person { flex: none; }

  /* Widgets als flache Karten */
  .widgets { gap: 8px; }
  .widgets .widget { flex-basis: min(250px, 70vw); max-height: 122px; padding: 10px 12px; gap: 6px; }
  .widgets .widget h3 { font-size: 0.66rem; }
  .widgets .wx.lg { width: 38px; height: 38px; }
  .widgets .wtemp { font-size: 1.7rem; }
  .widgets .wnow { gap: 10px; }
  .widgets .wnow small { display: none; }
  .widgets .wcal li:nth-child(n+3), .widgets .w-calendar .wlink { display: none; }
  .widgets .wwaste { padding: 5px 8px; font-size: 0.82rem; }
  .widgets .wshimmer span:nth-child(n+2) { display: none; }
  .widgets .tt ol { font-size: 0.82rem; gap: 1px; }

  /* Stern kleiner, sobald ein Gespräch läuft */
  .orb-wrap { width: min(30vh, 64vw); transition: width .4s ease; }
  body.chatting .orb-wrap { width: min(17vh, 34vw); }
  body.chatting .status .hint { display: none; }
  .stage { gap: 2px; }
  .msg.a { font-size: 1.02rem; } .msg.a.kid { font-size: 1.12rem; }
  .empty { font-size: 0.92rem; } .empty b { font-size: 1.2rem; }
  .suggest button { padding: 7px 12px; font-size: 0.85rem; }
  .reminder { top: 8px; font-size: 0.95rem; }
}

/* Handy quer: Widgets ausblenden, Stern links klein */
@media (max-height: 500px) and (orientation: landscape) {
  .widgets { display: none; }
  .app { grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr); grid-template-rows: auto minmax(0, 1fr) auto;
         grid-template-areas: "head head" "stage main" "stage dock"; padding-block: 6px; column-gap: 16px; }
  main { display: contents; }
  .stage { grid-area: stage; }
  .convo { grid-area: main; }
  .people { flex-basis: auto; order: 0; }
  .orb-wrap { width: min(42vh, 26vw) !important; }
  .talk { width: 56px; height: 56px; }
}

/* Kalender auf dem Handy */
@media (max-width: 700px) {
  .cal-page { padding: 14px 12px 40px; gap: 12px; }
  .cal-who { margin-left: 0; flex-basis: 100%; }
  .cal-who select { flex: 1; }
  .cal-grid { gap: 3px; }
  .cal-wd { font-size: 0.62rem; letter-spacing: 0.06em; }
  .cal-cell { min-height: 46px; padding: 3px; border-radius: 8px; }
  .cal-cell .n { font-size: 0.78rem; }
  .cal-nav { flex-wrap: wrap; }
  .cal-nav h2 { font-size: 1rem; }
  .btn.primary { white-space: nowrap; }
  .cal-list li { grid-template-columns: 74px 1fr; }
  .card { padding: 12px; }
}
@media (max-width: 480px) {
  .brand { gap: 8px; min-width: 0; }
  .brand b { letter-spacing: 0.2em; font-size: 1rem; }
  .brand span { font-size: 0.75rem; white-space: nowrap; }
  .draft-link { width: 34px; height: 34px; }
}

/* Termine-Widget: Abstand zwischen hervorgehobenem Termin und der Liste */
.w-calendar .cbody { display: grid; gap: 12px; }
.wcal { gap: 8px; }
@media (max-width: 899px) { .w-calendar .cbody { gap: 8px; } }

/* Profilbilder */
.person i { overflow: hidden; }
.person i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; flex: none;
  background: var(--surface-strong); border: 1px solid var(--line); font-family: var(--font-display); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 84px; height: 84px; font-size: 1.6rem; }
.members { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.members li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.m-info { flex: 1; min-width: 0; display: grid; }
.m-info small { color: var(--fg-dim); }
.member-form { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.member-form h3 { margin: 0; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim); }
.member-form label:not(.btn) { display: grid; gap: 4px; font-size: 0.85rem; color: var(--fg-dim); }
.member-form input:not([type=file]), .member-form select, #actor { border: 1px solid var(--line); background: var(--bg-2); color: var(--fg); border-radius: 10px; padding: 7px 10px; font: inherit; }
.member-form .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.avatar-edit { display: flex; align-items: center; gap: 14px; }
.avatar-btns { display: flex; flex-wrap: wrap; gap: 8px; }
label.btn { cursor: pointer; }
.cal-list li.virtual { cursor: default; }

/* Bildausschnitt-Editor */
.crop-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, .72); }
.crop-box { width: min(380px, 100%); display: grid; gap: 12px; padding: 18px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.crop-box h3 { margin: 0; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim); }
.crop-stage { position: relative; width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; touch-action: none; }
.crop-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.crop-stage canvas:active { cursor: grabbing; }
/* Abdunklung außerhalb des Kreises, der Kreis zeigt das spätere Profilbild */
.crop-ring { position: absolute; inset: 0; pointer-events: none; border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .55); outline: 2px solid color-mix(in srgb, var(--accent) 80%, transparent); }
.crop-tools { display: flex; align-items: center; gap: 12px; }
.crop-tools input { flex: 1; accent-color: var(--accent); }

/* ---------- Essensplan ---------- */
.meal-grid { display: grid; grid-template-columns: 64px repeat(var(--slots, 2), minmax(0, 1fr)); gap: 6px; }
.mg-head { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-dim); padding: 2px 4px; }
.mg-day { display: grid; align-content: center; font-size: 0.8rem; color: var(--fg-dim); }
.mg-day b { font-family: var(--font-display); color: var(--fg); font-weight: 600; }
.mg-day.today b { color: var(--accent); }
.mg-cell { min-height: 52px; border: 1px solid var(--line); border-radius: 10px; display: grid; }
.mg-cell.filled { border-color: color-mix(in srgb, #ffbe5c 45%, transparent); background: color-mix(in srgb, #ffbe5c 10%, transparent); }
.mg-btn { border: 0; background: transparent; cursor: pointer; text-align: left; padding: 8px 10px; font-size: 0.92rem; color: var(--fg); border-radius: 10px; }
.mg-cell:not(.filled) .mg-btn { color: var(--fg-dim); text-align: center; font-size: 1.2rem; }
.mg-btn:hover { background: var(--surface-strong); }
.mg-edit { display: grid; gap: 6px; padding: 6px; }
.mg-edit input { border: 1px solid var(--line); background: var(--bg-2); color: var(--fg); border-radius: 8px; padding: 6px 8px; font: inherit; min-width: 0; }
.mg-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mg-actions .btn { padding: 5px 10px; }
.mg-actions .btn.danger { margin-left: 0; }
.dish-search { border: 1px solid var(--line); background: var(--bg-2); color: var(--fg); border-radius: 10px; padding: 8px 12px; font: inherit; }
.dish-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 360px; overflow-y: auto; }
.dish-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.dish-list li.muted { cursor: default; display: block; }
.dish-list li:hover:not(.muted) { background: var(--surface-strong); }
.dish-list small { color: var(--fg-dim); white-space: nowrap; }
.ingr { display: grid; gap: 6px; }
.ingr-row { display: grid; grid-template-columns: 70px 90px minmax(0, 1fr) auto; gap: 6px; }
.ingr-row input { min-width: 0; }
.ingr-row .btn { padding: 4px 10px; }
@media (max-width: 700px) {
  .meal-grid { grid-template-columns: 48px repeat(var(--slots, 2), minmax(0, 1fr)); gap: 4px; }
  .mg-btn { font-size: 0.82rem; padding: 6px; }
  .ingr-row { grid-template-columns: 58px 70px minmax(0, 1fr) auto; }
}
.cat-essen.chip, .cal-list li.cat-essen { --c: #ffbe5c; }

/* Essen-Widget */
.wmeals { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wmeals li { display: grid; grid-template-columns: 96px 1fr; gap: 8px; font-size: 0.88rem; align-items: baseline; }
.wmeals li b { font-family: var(--font-display); font-weight: 500; font-size: 0.78rem; color: var(--fg-dim); }
.wmeals li.none span { color: var(--fg-dim); }
.w-meals a.wlink { font-size: 0.8rem; color: var(--accent); text-decoration: none; justify-self: start; }
@media (max-width: 899px) { .widgets .w-meals .wlink { display: none; } }

/* ---------- Einkaufsliste ---------- */
.shop-add { display: flex; gap: 8px; }
.shop-add input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--bg-2); color: var(--fg); border-radius: 10px; padding: 10px 12px; font: inherit; }
.shop-add input:focus { border-color: var(--accent); outline: none; }
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.shop-list li { display: flex; align-items: center; gap: 8px; border-radius: 10px; transition: opacity .3s; }
.shop-list li:hover { background: var(--surface-strong); }
.shop-list label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 9px 10px; cursor: pointer; }
.shop-list input { position: absolute; opacity: 0; pointer-events: none; }
.shop-list .box { width: 24px; height: 24px; flex: none; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.shop-list input:checked + .box { background: var(--accent); border-color: var(--accent); }
.shop-list input:checked + .box::after { content: ""; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.shop-list input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.shop-list .what { display: grid; min-width: 0; }
.shop-list .what b { font-weight: 500; font-size: 1.02rem; }
.shop-list .what small { color: var(--fg-dim); font-size: 0.8rem; }
.shop-list li.is-done .what b { text-decoration: line-through; color: var(--fg-dim); }
.shop-list.done li { opacity: 0.7; }
.shop-list .del { border: 0; background: transparent; color: var(--fg-dim); font-size: 1.3rem; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; flex: none; }
.shop-list .del:hover { color: var(--accent-2); background: var(--surface); }

/* Einkaufs-Widget */
.wshop { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wshop li { font-size: 0.82rem; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.w-shopping a.wlink { font-size: 0.8rem; color: var(--accent); text-decoration: none; justify-self: start; }
@media (max-width: 899px) { .widgets .w-shopping .wlink { display: none; } .widgets .wshop li:nth-child(n+5) { display: none; } }

/* Wetter-Widget kompakt (0.10.1) */
.w-weather .wnow { display: flex; align-items: center; gap: 10px; }
.w-weather .wx.lg { width: 40px; height: 40px; }
.w-weather .wtemp { font-size: 1.9rem; }
.w-weather .wnow > span { display: grid; font-size: 0.9rem; line-height: 1.25; }
.w-weather .wnow small { display: block; color: var(--fg-dim); font-size: 0.75rem; }
.w-weather .wdays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.w-weather .wday { display: grid; justify-items: center; gap: 2px; grid-template-columns: none; font-size: 0.78rem; color: var(--fg-dim); }
.w-weather .wday b { font-family: var(--font-display); color: var(--fg); font-size: 0.95rem; }
.w-weather .wday b i { color: var(--fg-dim); font-size: 0.8rem; font-style: normal; }
.w-weather .wday small { color: var(--accent); font-size: 0.7rem; }
@media (max-width: 899px) { .widgets .w-weather .wdays { display: none; } }

/* Stundenplan: Widget und Editor (0.11.0) */
.tt-time-sum { margin: 0 0 4px; font-size: 0.8rem; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.tt-time-sum.late { color: var(--accent-2); }
.tt ol.tt-l { list-style: none; padding: 0; gap: 2px; }
.tt ol.tt-l li { display: flex; gap: 8px; }
.tt ol.tt-l li span { width: 1.2em; color: var(--fg-dim); font-variant-numeric: tabular-nums; text-align: right; }
.tt ol.tt-l li.free { color: var(--fg-dim); margin-left: 0; font-style: italic; }
.tt-edit { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.tt-edit legend { font-size: 0.85rem; color: var(--fg-dim); margin-bottom: 4px; }
.tt-scroll { overflow-x: auto; }
.tt-table { border-collapse: collapse; min-width: 640px; width: 100%; font-size: 0.85rem; }
.tt-table th { color: var(--fg-dim); font-weight: 500; padding: 4px; text-align: left; }
.tt-table td { padding: 2px; }
.tt-table input { width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--bg-2); color: var(--fg); border-radius: 8px; padding: 5px 6px; font: inherit; }
.tt-table td.tt-time { display: flex; gap: 2px; min-width: 150px; }
.tt-table td.tt-time input { padding: 5px 2px; }
.settings { max-width: 900px; }
.tt-table { min-width: 700px; }
.tt-table td.tt-time { min-width: 0; flex-direction: column; gap: 2px; width: 92px; }
.tt-table td input[data-d] { min-width: 92px; }

/* ---------- Stundenplan-Seite ---------- */
.w-timetable a.wlink { font-size: 0.8rem; color: var(--accent); text-decoration: none; justify-self: start; }
@media (max-width: 899px) { .widgets .w-timetable .wlink { display: none; } }
.tp-kids { display: flex; gap: 8px; flex-wrap: wrap; }
.tp-kid { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 0.95rem; }
.tp-kid .avatar { width: 34px; height: 34px; }
.tp-kid[aria-selected="true"] { border-color: var(--accent); background: var(--surface-strong); }
.tp-days { display: none; gap: 6px; }
.tp-day { flex: 1; border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 8px 0; cursor: pointer; font-family: var(--font-display); }
.tp-day.today { color: var(--accent); }
.tp-day[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tp-wrap { overflow-x: auto; }
.tp-table { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.tp-table th { font-weight: 500; color: var(--fg-dim); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px; }
.tp-table th.today { color: var(--accent); }
.tp-table th.tp-p { width: 92px; text-transform: none; letter-spacing: 0; text-align: left; }
.tp-table th.tp-p b { display: block; color: var(--fg); font-family: var(--font-display); font-size: 0.95rem; }
.tp-table th.tp-p small { font-variant-numeric: tabular-nums; font-size: 0.74rem; }
.tp-table td { border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; text-align: center; font-size: 0.95rem; background: var(--surface); }
.tp-table td.free { color: var(--fg-dim); background: transparent; border-style: dashed; }
.tp-table td.today { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.tp-table td.now { background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: var(--accent); font-weight: 600; }
/* Handy: nur der gewählte Tag */
@media (max-width: 700px) {
  .tp-days { display: flex; }
  .tp-table th:not(.tp-p):not(.sel), .tp-table td:not(.sel) { display: none; }
  .tp-table td.sel { text-align: left; padding-left: 14px; }
  .tp-kid { padding-right: 10px; font-size: 0.9rem; }
}

/* =========================================================
   Kopfzeile neu (0.13.0): Marke+Version | Navigation | Personenwahl
   ========================================================= */
header.topbar { display: flex; align-items: center; gap: 12px 18px; flex-wrap: nowrap; position: relative; z-index: 30; }
.topbar .brand { margin-right: 0; flex: none; }
.ver { font-family: var(--font-display); font-size: 0.72rem; color: var(--fg-dim); text-decoration: none; border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 8px; letter-spacing: 0.04em; }
.ver:hover { color: var(--accent); border-color: var(--accent); }
.mainnav { flex: 1; display: flex; justify-content: center; gap: 4px; min-width: 0; }
.mainnav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 12px; color: var(--fg-dim);
  text-decoration: none; font-size: 0.88rem; transition: background .2s, color .2s; white-space: nowrap; }
.mainnav a svg { width: 18px; height: 18px; flex: none; }
.mainnav a:hover { color: var(--fg); background: var(--surface-strong); }
.who { position: relative; flex: none; }
.who-btn { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--surface); cursor: pointer; font-size: 0.9rem; }
.who-btn i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-style: normal;
  font-family: var(--font-display); font-weight: 600; font-size: 0.8rem; background: var(--accent); color: var(--accent-ink); }
.who-btn i img { width: 100%; height: 100%; object-fit: cover; }
.who-btn.fam { border-color: var(--line); }
.who-btn.fam i { background: transparent; border: 1px dashed var(--line); color: var(--fg); }
.who-btn > svg { width: 14px; height: 14px; color: var(--fg-dim); }
.who-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 10px; border-radius: 14px;
  background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.45); display: grid; gap: 6px;
  animation: widget-in .25s ease-out both; }
.who-title { margin: 2px 6px 4px; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-dim); }
.who-pop .people { display: grid; gap: 2px; order: 0; flex-basis: auto; overflow: visible; }
.who-pop .person { width: 100%; justify-content: flex-start; border: 0; border-radius: 10px; padding: 5px 8px; font-size: 0.95rem; color: var(--fg); }
.who-pop .person:hover { background: var(--surface-strong); }
.who-pop .person span { display: inline !important; }
.who-pop .person i { width: 30px; height: 30px; }
.who-pop .person[aria-pressed="true"] { background: var(--surface-strong); }

/* „Mein Tag“ */
.suggest .myday { display: inline-flex; align-items: center; gap: 6px; border-color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 14%, transparent); font-weight: 600; }
.suggest .myday svg { width: 16px; height: 16px; color: var(--accent-2); }

/* Einblendung von Ansichten */
.viewer { position: fixed; inset: 12px; z-index: 60; display: grid; grid-template-rows: auto minmax(0, 1fr); border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg); box-shadow: 0 30px 80px rgba(0,0,0,.6); overflow: hidden; animation: widget-in .35s ease-out both; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.viewer-bar b { font-family: var(--font-display); letter-spacing: 0.06em; }
.viewer iframe { width: 100%; height: 100%; border: 0; background: var(--bg); }
@media (min-width: 1280px) { .viewer { inset: 16px 16px 16px auto; width: min(1100px, 70vw); } }
html.embed .back { display: none; }
html.embed .cal-page, html.embed .settings { padding-top: 10px; }

/* Hilfe / Versionshistorie */
.doc { line-height: 1.55; }
.doc h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 18px 0 4px; color: var(--accent); letter-spacing: 0.02em; text-transform: none; }
.doc h3 { font-size: 1rem; margin: 14px 0 2px; }
.doc h4 { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-dim); margin: 10px 0 0; }
.doc p, .doc ul { margin: 4px 0; }
.doc ul { padding-left: 1.3em; }
.doc code { font-size: 0.85em; background: var(--surface-strong); border-radius: 5px; padding: 1px 5px; }
.doc a, .about-links a, #meta a { color: var(--accent); }
.about-links { margin: 0; font-size: 0.9rem; }

/* Handy: Marke + Person oben, Navigation als wischbare Zeile darunter */
@media (max-width: 899px) {
  header.topbar { flex-wrap: wrap; }
  .topbar .brand { flex: 1; min-width: 0; }
  .mainnav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; gap: 2px; }
  .mainnav::-webkit-scrollbar { display: none; }
  .mainnav a { flex-direction: column; gap: 2px; padding: 4px 8px; font-size: 0.68rem; }
  .who-btn span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
  .viewer { inset: 0; border-radius: 0; }
}
@media (min-width: 900px) and (max-width: 1279px) { .mainnav a span { display: none; } .mainnav a { padding: 8px; } }
@media (max-width: 480px) { .who-btn span, .brand #clock { display: none; } }

/* Scrollbalken im Gespräch nur beim Scrollen zeigen */
.convo { scrollbar-width: thin; scrollbar-color: transparent transparent; transition: scrollbar-color .3s; }
.convo.scrolling { scrollbar-color: color-mix(in srgb, var(--fg) 30%, transparent) transparent; }
.convo::-webkit-scrollbar { width: 6px; }
.convo::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.convo.scrolling::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--fg) 30%, transparent); }

/* Schwebender Sprechknopf über Einblendungen (0.14.0) */
.fab { position: fixed; right: 28px; bottom: 28px; z-index: 70; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.fab > * { pointer-events: auto; }
.fab-status { display: grid; max-width: min(360px, 60vw); padding: 8px 14px; border-radius: 14px; background: var(--bg-2);
  border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.45); font-size: 0.85rem; }
.fab-status b { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em; color: var(--fg-dim); }
.fab-status span { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fab-status span:empty { display: none; }
.fab[data-state="listening"] .fab-status { border-color: var(--accent); }
.fab[data-state="listening"] .fab-status b { color: var(--accent); }
.fab[data-state="thinking"] .fab-status b, .fab[data-state="speaking"] .fab-status b { color: var(--accent-2); }
.fab-btn { width: 68px; height: 68px; }
.fab-btn svg { width: 28px; height: 28px; }
/* im Leerlauf ein ruhiges Atmen, damit klar ist: Mikrofon bereit */
.fab[data-state="idle"] .fab-btn { animation: fab-breathe 3s ease-in-out infinite; }
@keyframes fab-breathe { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 18%, transparent), 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent); } }
@media (max-width: 899px) { .fab { right: 14px; bottom: 14px; } .fab-btn { width: 60px; height: 60px; } }
@media (prefers-reduced-motion: reduce) { .fab[data-state="idle"] .fab-btn { animation: none; } }

/* ---------- Radio (0.16.0) ---------- */
.radio-eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.radio-eq i { width: 3px; height: 30%; background: var(--accent); border-radius: 2px; }
body.radio-playing .radio-eq i { animation: eq 0.9s ease-in-out infinite; }
.radio-eq i:nth-child(2) { animation-delay: .2s !important; } .radio-eq i:nth-child(3) { animation-delay: .45s !important; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.st-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.st-list li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; }
.st-list li.muted { display: block; border: 0; }
.st-logo { width: 38px; height: 38px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background: var(--surface-strong); flex: none; }
.st-logo img { width: 100%; height: 100%; object-fit: cover; }
.st-name { flex: 1; min-width: 0; display: grid; }
.st-name b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-name small { color: var(--fg-dim); font-size: 0.78rem; }
.st-list .btn { padding: 6px 12px; }

/* Medien-Player unter dem Stern (0.17.0) */
.player { width: min(380px, 100%); margin-top: 10px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, transparent), var(--surface) 60%);
  display: grid; gap: 8px; text-align: left; animation: widget-in .45s cubic-bezier(.2,.8,.2,1) both; }
.pl-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pl-logo { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; flex: none; display: grid; place-items: center;
  background: var(--surface-strong); font-size: 1.6rem; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.pl-logo img { width: 100%; height: 100%; object-fit: cover; }
.pl-what { flex: 1; min-width: 0; display: grid; gap: 1px; }
.pl-what small { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-what b { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-what span { color: var(--fg-dim); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-what span:empty { display: none; }
.pl-meta { margin: 0; font-size: 0.75rem; color: var(--fg-dim); line-height: 1.4; }
.pl-meta:empty { display: none; }
.pl-ctrl { display: flex; align-items: center; gap: 10px; }
.pl-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-strong); cursor: pointer; flex: none; }
.pl-btn:hover { border-color: var(--accent); }
#plToggle { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pl-vol-ico { width: 18px; height: 18px; color: var(--fg-dim); flex: none; }
.pl-ctrl input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); }
.player .radio-eq { flex: none; }
@media (max-width: 899px) {
  .player { margin-top: 4px; padding: 8px 10px; gap: 4px; }
  .pl-logo { width: 40px; height: 40px; }
  .pl-meta { display: none; }
  body.chatting .player { width: 100%; }
}

/* YouTube-Einblendung (0.18.0) */
.video-panel { position: fixed; z-index: 55; inset: 70px 24px 112px auto; width: min(1000px, calc(100vw - 48px - 380px));
  display: grid; grid-template-rows: auto minmax(0, 1fr); border-radius: var(--radius); overflow: hidden; background: #000;
  border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: widget-in .35s ease-out both; }
.video-panel .viewer-bar b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.video-panel .viewer-bar span { display: flex; gap: 6px; flex: none; }
.video-box, .video-box iframe { width: 100%; height: 100%; border: 0; display: block; }
/* verkleinert: bündig auf dem Player unter dem Stern (Position setzt nova.js) */
.video-panel.mini { inset: auto; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; box-shadow: 0 -10px 30px rgba(0,0,0,.35); animation: none; }
.video-panel.mini .viewer-bar { position: absolute; top: 0; right: 0; z-index: 1; padding: 6px; border: 0; background: none; opacity: 0; transition: opacity .2s; }
.video-panel.mini:hover .viewer-bar, .video-panel.mini:focus-within .viewer-bar { opacity: 1; }
.video-panel.mini .viewer-bar b { display: none; }
.video-panel.mini .viewer-bar .btn { padding: 4px 9px; background: rgba(0,0,0,.6); }
.player.with-video { border-top-left-radius: 0; border-top-right-radius: 0; animation: none; }
@media (hover: none) { .video-panel.mini .viewer-bar { opacity: 1; } }
.player .pl-btn[hidden] { display: none; }
@media (max-width: 1279px) { .video-panel { inset: 64px 12px auto 12px; width: auto; height: min(56vw, 60vh); } .video-panel.mini { inset: auto; } }

/* Trefferliste (0.19.0) */
.video-panel.yt-results { z-index: 57; background: var(--bg-2); }
.yt-results { height: auto; max-height: calc(100vh - 94px); bottom: auto; }
.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding: 14px; overflow: auto; align-content: start; }
.yt-card { display: grid; grid-template-rows: auto auto auto; align-content: start; height: auto; gap: 4px; padding: 0 0 10px; text-align: left; cursor: pointer; color: var(--fg);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.yt-card:hover, .yt-card:focus-visible { border-color: var(--accent); outline: none; }
.yt-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; display: grid; place-items: center; font-size: 2rem; }
.yt-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yt-thumb i { position: absolute; left: 8px; top: 8px; min-width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-weight: 700; background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.yt-thumb em { position: absolute; right: 8px; bottom: 8px; font-style: normal; font-size: .72rem; padding: 2px 8px; border-radius: 8px; background: rgba(0,0,0,.75); color: #fff; }
.yt-card b { padding: 0 10px; font-weight: 600; line-height: 1.3; display: block; max-height: 2.6em; overflow: hidden; }
.yt-card small { padding: 0 10px; color: var(--fg-dim); }
@media (max-width: 899px) { .yt-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 10px; } }

/* Konto im Personenmenü (0.20.0) */
.who-account { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; color: var(--fg-dim); font-size: 0.85rem; }
.who-account b { color: var(--fg); }
.who-account .btn { margin-left: auto; padding: 4px 12px; }

/* Konten in den Einstellungen (0.20.0) */
.card h3.sub { margin: 4px 0 0; font-size: 0.85rem; color: var(--fg-dim); font-weight: 600; }
.acc-form { display: grid; gap: 8px; }
.acc-form input { border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; padding: 8px 12px; color: var(--fg); outline: none; }
.acc-form input:focus { border-color: var(--accent); }
.acc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.acc-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.acc-list .acc-what { flex: 1; min-width: 180px; display: grid; gap: 2px; }
.acc-list .acc-what small { color: var(--fg-dim); font-size: 0.8rem; overflow-wrap: anywhere; }
.acc-list .acc-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.acc-list .acc-acts .btn { padding: 5px 10px; }
.acc-list .warn { color: var(--accent-2); }
.acc-list .acc-set { display: flex; gap: 6px; width: 100%; flex-wrap: wrap; }
.acc-list .acc-set input { flex: 1 1 180px; min-width: 0; border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; padding: 6px 10px; color: var(--fg); }
.acc-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 280px; overflow: auto; font-size: 0.82rem; color: var(--fg-dim); }
.acc-log b { color: var(--fg); font-weight: 600; }
.acc-log .bad b { color: var(--accent-2); }

/* Einstellungen mit Tabs (0.23.0) */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); padding-bottom: 8px;
  position: sticky; top: 0; z-index: 5; background: var(--bg); padding-top: 6px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 1px solid transparent; background: transparent; color: var(--fg-dim); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; font: inherit; font-size: 0.92rem; white-space: nowrap; }
.tabs button:hover { color: var(--fg); border-color: var(--line); }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.tabs button[hidden] { display: none; }
.settings section.card[data-tab]:not(.on) { display: none; }
.mail-form label:not(.check) { display: grid; gap: 4px; font-size: 0.85rem; color: var(--fg-dim); }
.mail-form label small { font-size: 0.78rem; }
.mail-form .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.mail-form select { border: 1px solid var(--line); background: var(--bg-2); color: var(--fg); border-radius: 10px; padding: 8px 12px; font: inherit; }

/* Zwei-Faktor (0.24.0) */
.login-link { background: none !important; color: var(--fg-dim) !important; padding: 4px 8px !important; font-weight: 400 !important; text-decoration: underline; }
.tf-box { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.tf-box[hidden] { display: none; }
.tf-qr { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 6px; justify-self: start; }
.tf-secret { font-family: ui-monospace, monospace; font-size: 0.9rem; letter-spacing: 0.08em; overflow-wrap: anywhere; user-select: all; }
.tf-codes { list-style: none; margin: 0; padding: 10px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px;
  font-family: ui-monospace, monospace; font-size: 0.95rem; border: 1px dashed var(--accent); border-radius: 12px; }
.tf-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tf-row input { flex: 1 1 140px; min-width: 0; border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; padding: 8px 12px; color: var(--fg); }
.tf-on { color: var(--accent); font-weight: 600; }

/* Vorschläge (0.24.2): ohne Gespräch umbrechen, damit alle sichtbar sind; im Gespräch eine
   wischbare Zeile, die am Rand ausblendet statt hart abgeschnitten zu werden */
@media (min-width: 900px) {
  body:not(.chatting) .suggest { flex-wrap: wrap; justify-content: center; overflow: visible; }
}
.suggest.more-right { mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.suggest.more-left { mask-image: linear-gradient(to right, transparent, #000 48px); }
.suggest.more-left.more-right { mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }

/* Handy (0.24.3): keine Widgets, der Platz gehört Stern und Gespräch;
   „Mein Tag“ und die Ansichten decken die Infos ab */
@media (max-width: 699px) {
  .app { grid-template-areas: "head" "main" "dock"; grid-template-rows: auto minmax(0, 1fr) auto; }
  .widgets { display: none; }
}

/* Nova als App (0.26.0) */
.who-install { width: 100%; margin-top: 10px; justify-self: stretch; }
.who-install[hidden] { display: none; }
@media (display-mode: standalone) { .who-install { display: none; } }

/* Antworten aus Sternenstaub (0.27.0): jedes Wort leuchtet als Funke auf und setzt sich */
.stardust { display: inline-block; animation: stardust .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes stardust {
  0% { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)) scale(1.35); filter: blur(6px);
       text-shadow: 0 0 12px var(--accent), 0 0 24px var(--accent-2); color: var(--core, #fff); }
  45% { opacity: 1; filter: blur(1px); text-shadow: 0 0 10px var(--accent); }
  100% { opacity: 1; transform: none; filter: none; text-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { .stardust { animation: none; } }

/* Funkeln beim Abhaken (0.28.0) */
.sparkle { position: fixed; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; pointer-events: none; z-index: 90;
  background: radial-gradient(circle, #fff 0 30%, var(--accent) 60%, transparent 70%); box-shadow: 0 0 8px var(--accent);
  animation: sparkle .7s ease-out forwards; }
.sparkle:nth-of-type(odd) { background: radial-gradient(circle, #fff 0 30%, var(--accent-2) 60%, transparent 70%); box-shadow: 0 0 8px var(--accent-2); }
@keyframes sparkle { 0% { transform: translate(0, 0) scale(.4); opacity: 1; }
  70% { opacity: 1; } 100% { transform: translate(var(--sx), var(--sy)) scale(1.1); opacity: 0; } }
