/* Superhuman: ruhig und dicht wie Linear, Zahlen und Ringe wie Whoop. Dunkel zuerst, hell folgt dem System. */
:root {
  color-scheme: dark;
  --bg: #0d0e12;
  --panel: #14161c;
  --raised: #1c1f27;
  --line: #262a34;
  --edge: #636a7b;
  --ink: #eceef2;
  --muted: #a0a5b2;
  --accent: #5b67e0;
  --accent-ink: #ffffff;
  --accent-soft: rgba(110, 122, 240, .18);
  --accent-text: #a7b0ff;
  --good: #3ecf8e; --good-soft: rgba(62, 207, 142, .15);
  --warn: #f2c14e; --warn-soft: rgba(242, 193, 78, .15);
  --bad: #f2737a; --bad-soft: rgba(242, 115, 122, .15);
  --sleep: #8fb0ff;
  --on-good: #0b1a12;
  --bar: #3a3f4c;
  --shadow: 0 18px 48px rgba(0, 0, 0, .45);
  --r-lg: 18px; --r-md: 12px; --r-sm: 8px;
  --f: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f6f7f9;
    --panel: #ffffff;
    --raised: #eef0f4;
    --line: #e2e5eb;
    --edge: #848b9b;
    --ink: #15171c;
    --muted: #5a606e;
    --accent: #4b57d1;
    --accent-soft: rgba(75, 87, 209, .12);
    --accent-text: #3b47c2;
    --good: #0f7a4b; --good-soft: rgba(15, 122, 75, .12);
    --warn: #8f6200; --warn-soft: rgba(196, 140, 0, .14);
    --bad: #c3333b; --bad-soft: rgba(195, 51, 59, .1);
    --sleep: #3559c0;
    --on-good: #ffffff;
    --bar: #c9cdd6;
    --shadow: 0 18px 48px rgba(20, 24, 40, .14);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--f); font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body.locked { overflow: hidden; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--accent-text); text-underline-offset: 2px; }
button, input, textarea { font: inherit; color: inherit; }
::placeholder { color: var(--muted); opacity: 1; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Start, Anmeldung ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.gate-wrap { min-height: 100vh; display: grid; place-items: start center; padding: 10vh 16px 32px; }
.gate { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.gate h1 { font-size: 30px; font-weight: 650; letter-spacing: -.02em; }
.gate #pinMsg { font-size: 15px; font-weight: 600; }
.gate-note { color: var(--muted); font-size: 14px; max-width: 300px; margin-top: -8px; }
.dots { display: flex; gap: 12px; min-height: 16px; }
.dots i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--edge); }
.dots i.on { background: var(--ink); border-color: var(--ink); }
.pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; }
.pad button { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--edge); background: var(--panel); font-size: 26px; font-weight: 550; }
.pad button:active { background: var(--raised); }
.pad .ok { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-size: 17px; font-weight: 650; }
.pad .del { font-size: 14px; }
.setup { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.setup ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.setup code { background: var(--raised); padding: 1px 6px; border-radius: 6px; font-size: 13px; }

/* ---------- Rahmen: Seitenleiste am Desktop, Leiste unten am Handy ---------- */
.shell { min-height: 100vh; }
.main { max-width: 760px; margin: 0 auto; padding: 0 16px calc(var(--tab-h) + var(--safe-b) + 24px); }
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.nav .brand, .nav .side-foot { display: none; }
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 44px; border: 0; background: none; color: var(--muted); font-size: 11.5px; font-weight: 550; text-decoration: none;
}
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--ink); }
.tab .badge { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 232px 1fr; }
  .nav {
    position: sticky; top: 0; bottom: auto; height: 100vh; padding: 18px 12px; display: flex; flex-direction: column; gap: 2px;
    border-top: 0; border-right: 1px solid var(--line); background: var(--panel); backdrop-filter: none;
  }
  .nav .brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font-weight: 650; letter-spacing: -.01em; }
  .nav .brand img { width: 22px; height: 22px; border-radius: 6px; }
  .tab { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: var(--r-sm); font-size: 14px; }
  .tab svg { width: 18px; height: 18px; }
  .tab:hover { background: var(--raised); color: var(--ink); }
  .tab[aria-current="page"] { background: var(--raised); }
  .tab .badge { position: static; margin-left: auto; }
  .nav .side-foot { display: block; margin-top: auto; padding: 10px; color: var(--muted); font-size: 12.5px; }
  .main { padding: 0 32px 48px; margin: 0; max-width: 820px; }
}

/* Kopfzeile */
.top { display: flex; align-items: center; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 0 10px; position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.top h1 { font-size: 20px; font-weight: 650; letter-spacing: -.015em; }
.top .sub { color: var(--muted); font-size: 13px; }
.top .grow { flex: 1; min-width: 0; }
.sync { text-decoration: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--edge); background: var(--panel); color: var(--muted); font-size: 12.5px; font-weight: 550; }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--edge); }
.sync.ok i { background: var(--good); }
.sync.bad i { background: var(--bad); }
.sync.busy i { background: var(--accent-text); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.notice { margin: 4px 0 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--bad-soft); font-size: 14px; }

/* ---------- Abschnitte ---------- */
.view { outline: none; }
.view > * + * { margin-top: 14px; }
.sec { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); }
.sec-h { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px 10px; }
.sec-h h2 { font-size: 15px; font-weight: 650; letter-spacing: -.005em; }
.sec-h .meta { margin-left: auto; color: var(--muted); font-size: 13px; text-align: right; }
.sec-b { padding: 0 16px 16px; }
.sec-b > * + * { margin-top: 12px; }
.sec p.lead { color: var(--muted); font-size: 14px; }
.rows { margin: 0; padding: 0; list-style: none; }
.row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 16px; border-top: 1px solid var(--line); }
.row .lt { flex: 1; min-width: 0; }
.row .lt b { display: block; font-weight: 550; }
.row .lt small { display: block; color: var(--muted); font-size: 13px; }
.row .rt { text-align: right; font-variant-numeric: tabular-nums; }
.row .rt small { display: block; color: var(--muted); font-size: 12.5px; }
button.row { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
button.row:hover { background: var(--raised); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }

/* Kennzahl */
.kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi .k { color: var(--muted); font-size: 12.5px; font-weight: 550; }
.kpi .v { font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .s { color: var(--muted); font-size: 12.5px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--edge); background: var(--panel); font-size: 14.5px; font-weight: 600; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--raised); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.pri:hover { filter: brightness(1.08); }
.btn.block { width: 100%; }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; }
.linkbtn { border: 0; background: none; padding: 10px 2px; min-height: 44px; color: var(--accent-text); font-weight: 600; font-size: 14px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* Chips (auswählbar) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; min-width: 44px; justify-content: center; padding: 0 14px; border-radius: 22px; border: 1px solid var(--edge); background: transparent; font-size: 14.5px; font-weight: 550; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-text); color: var(--ink); }
.chip[aria-pressed="true"]::before { content: ''; width: 14px; height: 14px; background: currentColor; -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 8.5l3 3 7-7" fill="none" stroke="black" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center/contain no-repeat; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 8.5l3 3 7-7" fill="none" stroke="black" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center/contain no-repeat; }

/* Häkchen */
.check { flex: none; width: 44px; height: 44px; margin: -8px; border: 0; border-radius: 10px; background: transparent; display: grid; place-items: center; position: relative; color: var(--on-good); }
.check::before { content: ''; position: absolute; left: 8px; top: 8px; width: 28px; height: 28px; box-sizing: border-box; border-radius: 8px; border: 1.5px solid var(--edge); }
.check svg { position: relative; width: 16px; height: 16px; opacity: 0; }
.check[aria-checked="true"]::before { background: var(--good); border-color: var(--good); }
.check:disabled { opacity: .5; cursor: default; }
.set .check:not([aria-checked="true"]) svg { opacity: .35; }
.check[aria-checked="true"] svg { opacity: 1; }

/* Status-Punkt */
.st { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1.5px solid var(--edge); color: var(--muted); }
.st.yes { background: var(--good); border-color: var(--good); color: var(--on-good); }
.st.no { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.st.na { border-style: dashed; }

/* Felder */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--edge); background: var(--bg); font-size: 16px; }
.input:focus { outline: 2px solid var(--accent-text); outline-offset: -1px; }
textarea.input { min-height: 72px; resize: vertical; }
.err { color: var(--bad); font-size: 13.5px; font-weight: 550; }

/* ---------- Heute: Spur der 61 Tage ---------- */
.hero { padding: 6px 0 2px; }
.hero-top { display: flex; align-items: flex-end; gap: 14px; }
.daycount { display: flex; align-items: baseline; gap: 6px; }
.daycount b { font-size: 52px; font-weight: 700; letter-spacing: -.045em; line-height: .95; font-variant-numeric: tabular-nums; }
.daycount span { color: var(--muted); font-size: 17px; font-weight: 550; }
.hero-meta { margin-left: auto; text-align: right; color: var(--muted); font-size: 13px; line-height: 1.45; }
.hero-meta b { color: var(--ink); font-weight: 600; }
.track { margin-top: 14px; display: grid; grid-template-columns: repeat(61, 1fr); gap: 2px; align-items: end; height: 64px; }
.track i { display: block; border-radius: 2px; background: var(--bar); min-height: 6px; }
.track i.good { background: var(--good); } .track i.warn { background: var(--warn); } .track i.bad { background: var(--bad); }
.track i.open { background: transparent; box-shadow: inset 0 0 0 1px var(--edge); height: 30% !important; }
.track i.fut { background: var(--line); height: 14% !important; }
.track i.today { background: var(--accent-text); height: 100% !important; }
.track-x { display: grid; grid-template-columns: repeat(61, 1fr); gap: 2px; margin-top: 6px; height: 14px; }
.track-x i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); justify-self: center; align-self: center; }
.track-legend { display: flex; justify-content: space-between; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.next-ms { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.next-ms i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); flex: none; }
.swipe-hint { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }
.swipe-hint span:first-child::before { content: '← '; } .swipe-hint span:last-child::after { content: ' →'; }

/* Aufruf zur Eingabe */
.cta { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent-text) 40%, transparent); }
.cta .lt { flex: 1; min-width: 0; }
.cta b { display: block; font-size: 16px; font-weight: 650; }
.cta small { color: var(--muted); font-size: 13px; }
.cta.done { background: var(--panel); border-color: var(--line); }

/* Hinweise */
.alert { display: flex; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.alert:first-child { border-top: 0; }
.alert i { flex: none; width: 4px; border-radius: 2px; background: var(--edge); }
.alert.warn i { background: var(--warn); } .alert.bad i { background: var(--bad); } .alert.info i { background: var(--accent-text); }
.alert b { display: block; font-weight: 600; }
.alert p { color: var(--muted); font-size: 14px; }

/* Ringe */
.rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 8px 14px; }
.ring { position: relative; display: grid; justify-items: center; text-align: center; }
.ring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--edge); stroke-width: 6; stroke-linecap: round; }
.ring-fg.good { stroke: var(--good); } .ring-fg.warn { stroke: var(--warn); } .ring-fg.bad { stroke: var(--bad); } .ring-fg.sleep { stroke: var(--sleep); } .ring-fg.accent { stroke: var(--accent-text); }
.ring-txt { position: absolute; top: 0; height: 84px; display: grid; place-items: center; width: 84px; }
.ring-txt b { font-size: 17px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ring-lbl { font-size: 13px; font-weight: 600; margin-top: 4px; }
.ring-sub { font-size: 12px; color: var(--muted); }

/* Top 3 und Todos */
.t3 { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px 2px; border-top: 1px solid var(--line); }
.t3 .lt { flex: 1; min-width: 0; }
.t3 .lt small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.t3 input { width: 100%; border: 0; background: transparent; padding: 0; min-height: 44px; font-size: 16px; }
.t3 input:focus { outline: none; }
.t3:focus-within { background: var(--raised); }
.t3.done input { color: var(--muted); text-decoration: line-through; }
.todo { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 8px 6px 16px; border-top: 1px solid var(--line); }
.todo .lt { flex: 1; min-width: 0; }
.todo .lt span { display: block; overflow-wrap: anywhere; }
.todo .lt small { color: var(--muted); font-size: 12.5px; }
.todo.done .lt span { color: var(--muted); text-decoration: line-through; }
.todo .more { flex: none; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); border-radius: var(--r-sm); display: grid; place-items: center; }
.todo .more:hover { background: var(--raised); color: var(--ink); }
.grp-h { padding: 12px 16px 4px; color: var(--muted); font-size: 12.5px; font-weight: 650; border-top: 1px solid var(--line); }
.add { display: flex; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.add .input { flex: 1; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--raised); gap: 2px; flex-wrap: wrap; }
.seg button { min-height: 44px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.25); }

/* Denkaufgabe */
.denk dl { margin: 0; display: grid; grid-template-columns: 64px 1fr; gap: 6px 12px; font-size: 14px; }
.denk dt { color: var(--muted); font-weight: 600; }
.denk dd { margin: 0; }
.lever { display: flex; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.lever .lt { flex: 1; }
.lever .lt b { display: block; font-weight: 600; }
.lever .lt p { color: var(--muted); font-size: 14px; }
.lever .tag { align-self: flex-start; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; background: var(--raised); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.good { background: var(--good-soft); color: var(--good); } .tag.warn { background: var(--warn-soft); color: var(--warn); } .tag.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- Eingabe: Karten zum Wischen ---------- */
.deck-wrap { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; }
@media (min-width: 700px) { .deck-wrap { background: color-mix(in srgb, var(--bg) 70%, black); align-items: center; justify-content: center; padding: 24px; } }
.deck { width: 100%; max-width: 460px; height: 100%; display: flex; flex-direction: column; padding: max(10px, env(safe-area-inset-top)) 16px calc(14px + var(--safe-b)); }
@media (min-width: 700px) { .deck { height: min(820px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 16px 20px 20px; box-shadow: var(--shadow); } }
.deck-h { display: flex; align-items: center; gap: 8px; }
.deck-h h2 { flex: 1; text-align: center; font-size: 15px; font-weight: 650; }
.deck-h .ico { width: 44px; height: 44px; border: 0; background: none; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--muted); }
.deck-h .ico:hover { background: var(--raised); color: var(--ink); }
.deck-h .ico:disabled { opacity: .35; }
.card.next > * { visibility: hidden; }
.deck-h .count { min-width: 44px; text-align: right; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.prog { height: 4px; border-radius: 2px; background: var(--line); margin: 6px 0 14px; overflow: hidden; }
.prog span { display: block; height: 100%; background: var(--accent-text); border-radius: 2px; transition: width .25s ease; }
.stack { position: relative; flex: 1; min-height: 0; }
.card {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; padding: 22px 20px 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; will-change: transform;
}
@media (min-width: 700px) { .card { background: var(--raised); } }
.card.next { transform: translateY(10px) scale(.96); opacity: .6; pointer-events: none; }
.card.anim { transition: transform .26s cubic-bezier(.2, .8, .2, 1), opacity .26s ease; }
.card input, .card textarea { user-select: text; -webkit-user-select: text; }
.card .kicker { color: var(--muted); font-size: 13px; font-weight: 600; }
.card h3 { font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; }
.card .hint { color: var(--muted); font-size: 14.5px; }
.card .ev { display: inline-flex; align-self: flex-start; padding: 4px 10px; border-radius: 12px; background: var(--raised); color: var(--muted); font-size: 13px; }
@media (min-width: 700px) { .card .ev { background: var(--panel); } }
.card .spacer { flex: 1; }
.stamp { position: absolute; top: 18px; padding: 4px 12px; border-radius: 8px; border: 2px solid; font-size: 15px; font-weight: 750; opacity: 0; transform: rotate(-8deg); pointer-events: none; }
.stamp.yes { right: 18px; color: var(--good); border-color: var(--good); }
.stamp.no { left: 18px; color: var(--bad); border-color: var(--bad); transform: rotate(8deg); }
.bignum { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.bignum input { width: 6.2ch; border: 0; border-bottom: 2px solid var(--edge); background: transparent; text-align: center; font-size: 52px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; padding: 0; min-height: 64px; }
.bignum input:focus { outline: none; border-bottom-color: var(--accent-text); }
.bignum span { color: var(--muted); font-size: 18px; font-weight: 600; }
.stepper { display: flex; justify-content: center; gap: 12px; }
.stepper button { min-width: 64px; min-height: 44px; border-radius: 22px; border: 1px solid var(--edge); background: transparent; font-size: 15px; font-weight: 600; }
.verdict { text-align: center; font-size: 14px; font-weight: 600; min-height: 21px; }
.deck-a { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.deck-a .btn { min-height: 56px; font-size: 16px; border-radius: 14px; }
.deck-a .no-btn { color: var(--bad); }
.deck-a .yes-btn { color: var(--good); }
.deck-a.one { grid-template-columns: 1fr 2fr; }
.deck-a .ico-l { width: 18px; height: 18px; }
.deck-foot { display: flex; justify-content: center; gap: 18px; margin-top: 4px; }
.deck-foot .linkbtn { color: var(--muted); font-weight: 550; }
.kbd { color: var(--muted); font-size: 12px; text-align: center; margin-top: 6px; }
@media (hover: none) { .kbd { display: none; } }
.list-c { display: grid; gap: 2px; margin: 0 -8px; }
.list-c .li { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 8px; border-radius: 10px; }
.list-c .li .lt { flex: 1; min-width: 0; }
.list-c .li .lt small { display: block; color: var(--muted); font-size: 12.5px; }
.list-c button.li { border: 0; background: none; text-align: left; width: 100%; }
.list-c button.li:hover { background: var(--panel); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; border: 1.5px dashed var(--edge); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 13.5px; font-weight: 600; background: transparent; padding: 0; }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot.has { border-style: solid; }
.slot .cap { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; }
.slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.done-card { align-items: center; justify-content: center; text-align: center; }
.done-card .score { font-size: 64px; font-weight: 750; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }

/* ---------- Training ---------- */
.ex { border-top: 1px solid var(--line); padding: 14px 16px; }
.ex:first-child { border-top: 0; }
.ex-h { display: flex; align-items: flex-start; gap: 10px; }
.ex-h .lt { flex: 1; min-width: 0; }
.ex-h b { font-weight: 600; }
.ex-h small { display: block; color: var(--muted); font-size: 13px; }
.ex-h a { flex: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 22px; border: 1px solid var(--edge); font-size: 13px; font-weight: 600; text-decoration: none; }
.ex .tip { margin-top: 8px; font-size: 13.5px; color: var(--accent-text); }
.sets { display: grid; gap: 8px; margin-top: 10px; max-width: 440px; }
.set { display: grid; grid-template-columns: 26px 1fr 18px 1fr 44px; align-items: center; gap: 8px; }
.set .n { color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }
.set .x { color: var(--muted); text-align: center; }
.set .input { text-align: center; font-variant-numeric: tabular-nums; padding: 8px 6px; }
.set .check { margin: 0; border-radius: 12px; }
.set .check::before { left: 0; top: 0; width: 44px; height: 44px; border-radius: 12px; }
.set .check svg { width: 20px; height: 20px; }
.set.done .input { border-color: color-mix(in srgb, var(--good) 60%, var(--edge)); }
.timer { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 12px); z-index: 40; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 26px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); font-weight: 650; font-variant-numeric: tabular-nums; }
.timer button { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 0; background: color-mix(in srgb, var(--bg) 20%, transparent); color: var(--bg); font-weight: 650; font-size: 13.5px; }
@media (min-width: 960px) { .timer { bottom: 24px; } }

/* ---------- Diagramme ---------- */
.bc { display: flex; flex-direction: column; gap: 6px; }
.bc-plot { position: relative; height: 120px; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; align-items: end; border-bottom: 1px solid var(--line); }
.bc-plot i { display: block; border-radius: 3px 3px 0 0; background: var(--bar); min-height: 2px; }
.bc-plot i.good { background: var(--good); } .bc-plot i.warn { background: var(--warn); } .bc-plot i.bad { background: var(--bad); } .bc-plot i.sleep { background: var(--sleep); } .bc-plot i.accent { background: var(--accent-text); }
.bc-plot i.empty { background: transparent; }
.bc-target { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--muted); z-index: 1; pointer-events: none; }
.bc-target em { position: absolute; right: 0; top: -19px; font-style: normal; font-size: 11.5px; color: var(--muted); background: var(--panel); padding: 0 4px; }
.bc-x { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.bc-x span { overflow: visible; }
.lc { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 120px auto; gap: 4px 8px; }
.lc-y { display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font-size: 11.5px; text-align: right; padding: 6px 0; font-variant-numeric: tabular-nums; }
.lc-plot { position: relative; border-bottom: 1px solid var(--line); }
.lc-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lc-raw { fill: none; stroke: var(--edge); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.lc-avg { fill: none; stroke: var(--accent-text); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.lc-goal { stroke: var(--good); stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.lc-dot { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--edge); }
.lc-dot.last { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--accent-text); box-shadow: 0 0 0 3px var(--panel); }
.lc-goal-lbl { position: absolute; right: 0; transform: translateY(-120%); font-size: 11.5px; color: var(--good); background: var(--panel); padding: 0 4px; }
.lc-x { grid-column: 2; display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; }
.lc.empty { height: 40px; }
.meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 3px; background: var(--accent-text); }
.meter span.good { background: var(--good); } .meter span.warn { background: var(--warn); } .meter span.bad { background: var(--bad); }
.goal { padding: 12px 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
.goal:hover { background: var(--raised); }
.goal-top, .goal-meta { width: 100%; }
.goal-top { display: flex; align-items: baseline; gap: 10px; }
.goal-top b { flex: 1; font-weight: 600; }
.goal-top .v { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.goal-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12.5px; }
.chartbox { padding: 4px 16px 16px; }
.doku { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.doku figure { margin: 0; }
.doku img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--raised); display: block; }
.doku figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.tabs-in { padding: 2px 0 2px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 9px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.table td.r, .table th.r { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Plan ---------- */
.acc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); }
.acc + .acc { margin-top: 10px; }
.acc summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; cursor: pointer; font-weight: 600; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: ''; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.acc[open] summary::after { transform: rotate(-135deg); }
.acc summary small { color: var(--muted); font-weight: 500; font-size: 13px; }
.acc .b { padding: 0 16px 16px; }
.acc ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.tl { display: grid; grid-template-columns: 52px 1fr; gap: 2px 12px; }
.tl .t { color: var(--muted); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 1px; }
.tl .d { padding-bottom: 10px; }
.tl .d small { display: block; color: var(--muted); font-size: 13.5px; }

/* ---------- Blatt (Dialog) ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; background: var(--panel); border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 700px) { .overlay { align-items: center; } .sheet { border-radius: 20px; } }
.sheet-h { display: flex; align-items: center; gap: 8px; }
.sheet-h h2 { flex: 1; font-size: 17px; font-weight: 650; }
.sheet-h .ico { width: 44px; height: 44px; padding: 0; }
.sheet-h .ico svg { width: 20px; height: 20px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 70; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); }
@media (min-width: 960px) { .toast { bottom: 24px; } }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; padding: 8px 2px; }

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