:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-2: #f1ede6;
  --text: #24242a;
  --muted: #7b7a82;
  --line: #e7e2d9;
  --accent: #e76f51;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--surface));
  --accent-mid: color-mix(in srgb, var(--accent) 38%, var(--surface));
  --ok: #2f9e6b;
  --warn: #b7791f;
  --err: #c2413a;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(40, 30, 20, .04), 0 8px 24px rgba(40, 30, 20, .06);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171b; --surface: #202127; --surface-2: #2a2b32; --text: #eeedf0; --muted: #9b9aa3; --line: #34353d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --accent-soft: color-mix(in srgb, var(--accent) 20%, var(--surface));
    --accent-mid: color-mix(in srgb, var(--accent) 45%, var(--surface));
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) calc(84px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h3 { font-size: 15px; font-weight: 650; margin-bottom: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
#app { max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* ---------- Kopf */
.top { padding: 14px 0 6px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; color: var(--muted); }
.logo { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 15px; }
.sync { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; background: var(--line); }
.sync-ok { background: var(--ok); }
.sync-offline { background: var(--warn); }
.sync-auth { background: var(--err); }
.people { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.people::-webkit-scrollbar { display: none; }
.person {
  display: flex; align-items: center; gap: 6px; flex: none; border: 0; cursor: pointer;
  padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 600;
  transition: transform .15s, background .2s;
}
.person .avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--c) 18%, var(--surface)); font-size: 17px; }
.person.active { background: var(--c); color: #fff; }
.person.active .avatar { background: rgba(255, 255, 255, .25); }
.person:active { transform: scale(.96); }

.view { padding: 8px 0 24px; display: flex; flex-direction: column; gap: 14px; }
.greet { font-size: 26px; font-weight: 700; margin: 8px 0 2px; }

/* ---------- Karten */
.card { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.empty { text-align: center; display: grid; gap: 12px; justify-items: center; }
.inst { display: grid; gap: 14px; position: relative; overflow: hidden; }
.inst::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 90px;
  background: linear-gradient(180deg, var(--accent-soft), transparent); pointer-events: none;
}
.inst > * { position: relative; }
.inst-head { display: flex; gap: 12px; align-items: center; }
.inst-head h2 { font-size: 19px; }
.inst-head p { margin: 0; }
.inst-emoji { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-size: 24px; }
.inst-body { display: flex; gap: 18px; align-items: center; }
.inst-info { flex: 1; min-width: 0; }
.headline { font-size: 20px; margin: 0 0 2px; }
.headline b { color: var(--accent); }
.inst-info .muted { margin: 0; font-size: 14px; }
.ring-wrap { position: relative; flex: none; }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label b { font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-label span { font-size: 12px; color: var(--muted); }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 11; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.2, .8, .2, 1); }
.days { display: flex; gap: 6px; margin-top: 12px; }
.day { display: grid; justify-items: center; gap: 3px; }
.day i { width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); display: block; transition: background .2s; }
.day.on i { background: var(--accent); }
.day.today i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-mid); }
.day.future i { background: transparent; border: 1.5px dashed var(--line); }
.day small { font-size: 10px; color: var(--muted); font-weight: 600; }
.inst-actions { display: flex; gap: 8px; }

/* ---------- Buttons */
.btn {
  border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 650; cursor: pointer;
  background: var(--surface-2); transition: transform .12s, filter .2s, background .2s; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.secondary { background: var(--accent-soft); color: var(--text); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.danger, .link.danger { color: var(--err); }
.btn.big { padding: 16px 22px; font-size: 18px; border-radius: 18px; min-width: 130px; }
.btn:disabled { opacity: .45; box-shadow: none; }
.grow { flex: 1; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.link { background: none; border: 0; color: var(--muted); padding: 10px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--muted); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 0; border-radius: 999px; padding: 8px 14px; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; font-weight: 600; }
.chip.active { background: var(--accent); color: #fff; }
.chips.small .chip { padding: 6px 12px; font-size: 14px; box-shadow: inset 0 0 0 1.5px var(--line); background: transparent; }

/* ---------- Läuft-Banner */
.running {
  width: 100%; display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer;
  padding: 14px 16px; border-radius: 18px; background: var(--accent); color: #fff; font-weight: 600; box-shadow: var(--shadow);
}
.running b { margin-left: auto; font-variant-numeric: tabular-nums; }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.chev { color: inherit; opacity: .6; }

/* ---------- Timer */
#timer {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center;
  background: linear-gradient(170deg, var(--accent-soft) 0%, var(--bg) 60%);
  transform: translateY(100%); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom);
}
#timer.open { transform: none; }
.timer-inner { width: 100%; max-width: 420px; display: grid; justify-items: center; gap: 10px; text-align: center; position: relative; }
.t-min { position: absolute; top: -8px; left: 0; }
.t-inst { font-size: 22px; font-weight: 700; }
.t-person { color: var(--muted); font-weight: 600; }
.t-clock-wrap { position: relative; width: min(78vw, 300px); aspect-ratio: 1; margin: 16px 0 6px; }
.t-ring { width: 100%; height: 100%; }
.t-ring .ring-bg, .t-ring .ring-fg { stroke-width: 10; }
.t-ring .ring-fg { transition: stroke-dashoffset 1s linear; }
.t-center { position: absolute; inset: 0; display: grid; place-content: center; }
.t-clock { font-size: clamp(52px, 16vw, 72px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.t-state { color: var(--muted); font-weight: 600; }
#timer.paused .t-clock { opacity: .4; }
#timer.paused .t-state { color: var(--warn); }
.t-week { margin: 0 0 12px; color: var(--muted); }
.t-week b { color: var(--text); }
.t-actions { display: flex; gap: 12px; }

/* ---------- Modal / Sheet */
#modal {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(20, 18, 15, 0); transition: background .25s;
}
#modal.open { background: rgba(20, 18, 15, .35); }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--surface);
  border-radius: 26px 26px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
#modal.open .sheet { transform: none; }
@media (min-width: 640px) {
  #modal { align-items: center; }
  .sheet { border-radius: 26px; }
}
.stack { display: grid; gap: 14px; }
.stack h2 { font-size: 22px; }
.stack > p { margin: -8px 0 0; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
input, select {
  width: 100%; border: 1.5px solid var(--line); background: var(--bg); border-radius: 12px; padding: 11px 12px; color: var(--text); font-weight: 500;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick label { display: block; }
.pick input { position: absolute; opacity: 0; width: 0; }
.pick span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-size: 22px; background: var(--surface-2); cursor: pointer; transition: transform .1s; }
.pick input:checked + span { box-shadow: 0 0 0 2.5px var(--accent); transform: scale(1.05); }
.pick input:focus-visible + span { outline: 2px solid var(--accent); }
.pick.colors span { border-radius: 50%; width: 34px; height: 34px; }
.pick.colors input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--text); }
.grid3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper input { text-align: center; max-width: 110px; font-size: 18px; font-weight: 700; }
.stepper button { width: 44px; height: 44px; flex: none; border-radius: 12px; border: 0; background: var(--surface-2); font-size: 22px; cursor: pointer; }
.stepper .unit { color: var(--muted); }
.summary { display: grid; gap: 8px; }
.counted { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); }
.counted span { color: var(--muted); font-weight: 600; }
.counted b { font-size: 22px; }
.summary .muted { margin: -2px 0 0 4px; }
.msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.msgs li { padding: 10px 12px 10px 36px; border-radius: 12px; font-size: 14px; position: relative; }
.msgs li::before { position: absolute; left: 12px; top: 9px; font-weight: 700; }
.msgs .warn { background: color-mix(in srgb, var(--warn) 13%, var(--surface)); }
.msgs .warn::before { content: "!"; color: var(--warn); }
.msgs .err { background: color-mix(in srgb, var(--err) 12%, var(--surface)); }
.msgs .err::before { content: "×"; color: var(--err); }
.msgs.pulse { animation: nudge .4s; }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- Verlauf */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--surface); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 2px; }
.tile-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.tile-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile-value small { font-size: 13px; color: var(--muted); font-weight: 600; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis, .heatmap .axis { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.chart .axis.cur { fill: var(--text); font-weight: 700; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .bar { transition: opacity .2s; }
.chart .bar.reached { fill: var(--accent); }
.chart .bar.missed { fill: var(--accent-mid); }
.chart .bar.current { fill: var(--accent); opacity: .55; }
.chart .bar.current.reached { opacity: 1; }
.chart .bar-g.sel .hit { fill: color-mix(in srgb, var(--accent) 8%, transparent); }
.chart .goal-line { fill: none; stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 4 3; opacity: .55; pointer-events: none; }
.chart-caption { margin: 10px 0 0; font-size: 14px; color: var(--muted); min-height: 2.8em; }
.chart-caption b { color: var(--text); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.lg.reached { background: var(--accent); }
.lg.missed { background: var(--accent-mid); }
.lg.goal { height: 0; border-top: 2px dashed var(--text); opacity: .55; border-radius: 0; width: 16px; }
.heatmap { width: 100%; height: auto; display: block; }
.hm { transition: opacity .2s; }
.hm.l0, .hm-sw.l0 { fill: var(--surface-2); background: var(--surface-2); }
.hm.l1, .hm-sw.l1 { fill: color-mix(in srgb, var(--accent) 28%, var(--surface)); background: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.hm.l2, .hm-sw.l2 { fill: color-mix(in srgb, var(--accent) 52%, var(--surface)); background: color-mix(in srgb, var(--accent) 52%, var(--surface)); }
.hm.l3, .hm-sw.l3 { fill: color-mix(in srgb, var(--accent) 76%, var(--surface)); background: color-mix(in srgb, var(--accent) 76%, var(--surface)); }
.hm.l4, .hm-sw.l4 { fill: var(--accent); background: var(--accent); }
.hm-legend { justify-content: flex-end; gap: 4px; }
.hm-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sessions { list-style: none; margin: 0; padding: 0; }
.sessions li + li { border-top: 1px solid var(--line); }
.session { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 0; background: none; border: 0; text-align: left; cursor: pointer; }
.session small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.s-date { width: 82px; flex: none; font-weight: 650; }
.s-note { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.s-min { font-weight: 700; font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.s-min small { display: inline; margin-left: 2px; }

/* ---------- Einstellungen */
.settings .card { display: grid; gap: 10px; }
.settings h3 { margin-bottom: 2px; }
.settings p { margin: 0; }
.person-block { border-radius: 16px; background: var(--bg); padding: 6px; }
.row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 12px; }
.row:hover { background: var(--surface-2); }
.row .chev { margin-left: auto; color: var(--muted); }
.row.sub { padding-left: 20px; }
.row.sub small { display: block; color: var(--muted); font-size: 12px; }
.row.add { color: var(--accent); font-weight: 600; }
.avatar.big { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); font-size: 20px; }
.inline { display: flex; gap: 8px; }

/* ---------- Onboarding */
.onboarding { min-height: 90vh; display: grid; align-content: center; justify-items: center; gap: 14px; text-align: center; padding: 20px; }
.onboarding h1 { font-size: 28px; }
.onboarding p { max-width: 320px; margin: 0 0 10px; }
.hero-note { width: 88px; height: 88px; border-radius: 28px; background: linear-gradient(135deg, #f4a261, #e76f51); color: #fff; font-size: 46px; display: grid; place-items: center; box-shadow: 0 12px 30px rgba(231, 111, 81, .35); }
.sync-setup { margin-top: 18px; color: var(--muted); font-size: 14px; }
.sync-setup summary { cursor: pointer; }
.sync-setup form { margin-top: 10px; }

/* ---------- Tabbar & Toast */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; gap: 4px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar button {
  flex: 1; max-width: 140px; border: 0; background: none; padding: 6px; border-radius: 12px; cursor: pointer;
  display: grid; justify-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--muted);
}
.tabbar .ti { font-size: 20px; line-height: 1; }
.tabbar button.active { color: var(--accent); }
.tabbar[hidden] { display: none; }
#toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 40;
  transform: translate(-50%, 20px); opacity: 0; transition: .25s; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Wochenbilanz */
.balance { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bal-row { display: grid; grid-template-columns: 92px 1fr 62px; align-items: center; gap: 12px; padding: 5px 0; }
.bal-scale { display: grid; grid-template-columns: 92px 1fr 62px; gap: 12px; height: 16px; }
.bal-scale-track { position: relative; }
.bal-goal-label { position: absolute; transform: translateX(-50%); font-size: 11px; font-weight: 650; color: var(--muted); }
.b-week { font-weight: 650; font-size: 14px; }
.b-week small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.b-track { position: relative; height: 12px; border-radius: 4px; background: var(--surface-2); }
.b-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.b-track em { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--text); opacity: .6; }
.is-over .b-track i { background: var(--accent); }
.is-under .b-track i { background: var(--accent-mid); }
.is-current .b-track i { background: repeating-linear-gradient(135deg, var(--accent-mid) 0 4px, color-mix(in srgb, var(--accent-mid) 45%, var(--surface)) 4px 7px); }
.b-diff { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.is-under .b-diff { color: var(--muted); }
.is-current .b-diff { color: var(--muted); font-weight: 600; font-size: 13px; }
.lg.goal-tick { width: 2px; height: 12px; border-radius: 1px; background: var(--text); opacity: .6; }

/* ---------- Korrekturfenster / Nachtragen */
.lock-info { margin: -4px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 14px; background: var(--surface-2); color: var(--muted); }
.lock-info.open { background: var(--accent-soft); color: var(--text); }
input:disabled, .stepper button:disabled { opacity: .55; }
.tag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.s-edit { flex: none; color: var(--accent); font-size: 14px; }

/* ---------- Onboarding (mehrstufig) */
.onboarding.left { justify-items: stretch; text-align: left; align-content: start; padding-top: 32px; max-width: 460px; margin: 0 auto; }
.onboarding h2 { font-size: 24px; }
.onboarding .btn.wide { width: 100%; max-width: 360px; }
.onboarding.left .btn.wide { max-width: none; }
.onboarding .btn small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.onboarding .btn.ghost.wide { flex-direction: column; gap: 2px; }
.onboarding .left { text-align: left; }
.onboarding .back { justify-self: start; padding-left: 0; text-decoration: none; }
.ob-steps { display: flex; gap: 6px; }
.ob-steps i { width: 28px; height: 5px; border-radius: 3px; background: var(--line); }
.ob-steps i.on { background: var(--accent); }
.ob-people { display: grid; gap: 10px; }
.ob-person { display: flex; gap: 10px; align-items: center; }
.ob-person .avatar.big { flex: none; width: 46px; height: 46px; font-size: 24px; border: 0; cursor: pointer; background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.ob-person input { font-size: 17px; }
.link.add { justify-self: start; padding-left: 0; color: var(--accent); text-decoration: none; font-weight: 650; }
.ob-inst { background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.ob-inst-head { display: flex; align-items: center; gap: 10px; }
.ob-inst-head .avatar.big { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.ob-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ob-row .stepper input { max-width: 70px; }
.ob-error { color: var(--err); font-size: 14px; margin: 0; min-height: 1em; }
.hero-note.ok { background: linear-gradient(135deg, #52b788, #2a9d8f); box-shadow: 0 12px 30px rgba(42, 157, 143, .35); }
.hero-note.spin { animation: pulse 1.4s infinite; }
.hint-box { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 14px; color: var(--text); max-width: 420px; margin: 0; }
.hint-box span { color: var(--muted); }
.code-input { font-size: 30px; font-weight: 700; text-align: center; letter-spacing: .15em; font-variant-numeric: tabular-nums; padding: 14px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 14px; }
details.more[open] { display: grid; gap: 8px; }

/* ---------- Banner */
.banner { display: grid; gap: 6px; padding: 14px 16px; border-radius: 18px; font-size: 14px; margin-bottom: 4px; }
.banner span { color: var(--muted); }
.banner.warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); }
.banner.warn b { color: var(--text); }
.banner.demo { background: var(--surface-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.banner .link { padding: 0; color: var(--accent); font-weight: 650; }
.btn.small { padding: 8px 12px; font-size: 14px; border-radius: 12px; }
.status-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-line .sync { margin: 0; }

/* ---------- Gerät hinzufügen */
.pair .pair-code { font-size: 44px; font-weight: 800; letter-spacing: .12em; text-align: center; font-variant-numeric: tabular-nums; padding: 10px; border-radius: 18px; background: var(--accent-soft); }
.pair .pair-code.expired { opacity: .35; text-decoration: line-through; }
.pair .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.pair .or::before, .pair .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pair .qr { width: 180px; margin: 0 auto; padding: 8px; background: #fff; border-radius: 14px; }
.pair .qr svg { display: block; width: 100%; height: auto; }
.pair .qr svg path { fill: #000; }

/* ---------- Übetage: Beschriftung */
.hm-hint { margin: -4px 0 10px; }
.hm.future { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 3 3; }
.hm.today { stroke: var(--text); stroke-width: 2; }
.heatmap .axis.cur { fill: var(--text); font-weight: 700; }
