:root {
  --bg: #f3f6f3; --card: #ffffff; --text: #14231a; --muted: #5f7167; --line: #dfe7e1;
  --accent: #16a34a; --accent-d: #12823b; --accent-soft: #dcf5e4; --on-accent: #fff;
  --user: #16a34a; --user-text: #fff; --bot: #ffffff; --danger: #dc2626; --warn: #d97706;
  --p: #3b82f6; --c: #f59e0b; --f: #ec4899;
  --radius: 16px; --tab-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1511; --card: #172019; --text: #e8f1ea; --muted: #94a79b; --line: #26332a;
    --accent: #22c55e; --accent-d: #16a34a; --accent-soft: #14301f; --on-accent: #06210f;
    --user: #1c8f4a; --user-text: #fff; --bot: #1a251d;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif; overscroll-behavior: none; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
button, input, textarea, select { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; }

/* Auth */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.logo { font-size: 44px; text-align: center; }
.auth-card h1 { text-align: center; font-size: 22px; }
.auth-card p { text-align: center; margin: 0; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
input:not([type=checkbox]):not([type=file]), select, textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; color: var(--text); width: 100%; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.btn { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 14px; cursor: pointer; font-weight: 600; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:active { background: var(--accent-d); }
.btn.danger { color: var(--danger); }
.btn.link { border: none; background: none; color: var(--accent); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* Shell */
.shell { height: 100dvh; display: flex; flex-direction: column; }
.top { padding: calc(10px + var(--safe-t)) 16px 10px; display: flex; align-items: center; justify-content: space-between; background: var(--card); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 18px; }
main { flex: 1; min-height: 0; position: relative; }
.view { position: absolute; inset: 0; }
.view.scroll { overflow-y: auto; padding: 14px 16px 24px; -webkit-overflow-scrolling: touch; }
.view.scroll > * + * { margin-top: 14px; }
.tabbar { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--card); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabbar button { border: none; background: none; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; color: var(--muted); cursor: pointer; padding: 0; }
.tabbar button span { font-size: 21px; line-height: 1; }
.tabbar button.active { color: var(--accent); font-weight: 700; }

/* Chat */
.chat { display: flex; flex-direction: column; }
.chat-list { flex: 1; overflow-y: auto; padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
.msg { max-width: 88%; display: flex; flex-direction: column; gap: 4px; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.bot { align-self: flex-start; }
.bubble { padding: 10px 13px; border-radius: 18px; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--user); color: var(--user-text); border-bottom-right-radius: 6px; white-space: pre-wrap; }
.msg.bot .bubble { background: var(--bot); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble p { margin: 0 0 8px; } .bubble p:last-child { margin: 0; }
.bubble ul, .bubble ol { margin: 4px 0 8px; padding-left: 20px; }
.bubble h3, .bubble h4 { margin: 10px 0 4px; font-size: 16px; }
.bubble table { border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; margin: 6px 0; }
.bubble th, .bubble td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; white-space: nowrap; }
.bubble code { background: var(--bg); padding: 1px 5px; border-radius: 6px; font-size: .92em; }
.bubble a { color: var(--accent); }
.imgs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.imgs img { width: 120px; height: 120px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.badge { font-size: 12px; background: var(--accent-soft); color: var(--accent-d); padding: 2px 8px; border-radius: 999px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .badge { color: var(--accent); } }
.badge.warn { background: #fde9c8; color: #8a4b00; }
.typing { color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.dots span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin-right: 3px; animation: b 1.2s infinite; }
.dots span:nth-child(2) { animation-delay: .2s; } .dots span:nth-child(3) { animation-delay: .4s; }
@keyframes b { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.empty { text-align: center; color: var(--muted); margin: auto; padding: 24px 12px; }
.empty h2 { color: var(--text); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 12px; font-size: 14px; cursor: pointer; color: var(--text); }
.attach-bar { display: flex; gap: 8px; padding: 6px 12px 0; overflow-x: auto; }
.attach { position: relative; flex: none; }
.attach img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.attach button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: none; background: #000a; color: #fff; cursor: pointer; line-height: 1; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 8px 12px 10px; background: var(--bg); }
.composer textarea { resize: none; max-height: 140px; border-radius: 20px; padding: 10px 14px; }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 20px; cursor: pointer; }
.icon-btn.send { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.icon-btn[disabled] { opacity: .5; }

/* Tracker */
.daynav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daynav .title { font-weight: 700; text-align: center; flex: 1; }
.ring-wrap { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 112px; height: 112px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .c b { font-size: 22px; } .ring .c span { font-size: 12px; color: var(--muted); }
.macros { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.macro .l { display: flex; justify-content: space-between; font-size: 13px; }
.bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; border-radius: 99px; }
.meal-h { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 6px; }
.entry { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.entry:first-of-type { border-top: none; }
.entry img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.entry .n { font-weight: 600; } .entry .m { font-size: 12px; color: var(--muted); }
.entry .k { text-align: right; white-space: nowrap; font-weight: 700; }
.fab-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chart { width: 100%; height: auto; display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2.three { grid-template-columns: repeat(3, 1fr); }

/* Wissen */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { border: none; background: none; padding: 8px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.sec-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; display: flex; justify-content: space-between; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; margin-bottom: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.item .t { font-weight: 600; } .item .d { font-size: 12px; color: var(--muted); }
.meter { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }
.cat { font-size: 11px; background: var(--accent-soft); color: var(--accent-d); border-radius: 99px; padding: 1px 8px; }
@media (prefers-color-scheme: dark) { .cat { color: var(--accent); } }

/* Settings */
.set > * + * { margin-top: 12px; }
.switch { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; color: var(--text); font-size: 16px; }
.switch input { width: 22px; height: 22px; accent-color: var(--accent); }
.status { font-size: 14px; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.status.ok { color: var(--accent-d); } .status.bad { color: var(--danger); }

/* Sheet / Toast */
.sheet-bg { position: fixed; inset: 0; background: #0008; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); }
.sheet h2 { font-size: 18px; margin-bottom: 10px; }
.sheet .form > * + * { margin-top: 10px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); transform: translateX(-50%); background: #111e; color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 60; max-width: 90%; font-size: 14px; }
.spinner { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: sp 0.8s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
.md-body h3 { margin: 12px 0 4px; } .md-body p { margin: 0 0 8px; } .md-body table { border-collapse: collapse; display: block; overflow-x: auto; }
.md-body th, .md-body td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; }
.md-body a { color: var(--accent); }

/* Desktop: Inhalt wie ein Telefon zentrieren */
@media (min-width: 800px) {
  .shell { max-width: 720px; margin: 0 auto; border-inline: 1px solid var(--line); }
  .sheet { border-radius: 20px; margin-bottom: 4vh; }
  .sheet-bg { align-items: center; }
}

.pill { border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; margin-bottom: 8px; cursor: pointer; }
.opt .t { font-weight: 600; } .opt .d { font-size: 13px; color: var(--muted); }
.opt .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt.on .dot { border-color: var(--accent); background: radial-gradient(var(--accent) 45%, transparent 50%); }

/* Kontext-Anzeige, Uebergabe, Plan */
.ctxbar { display: flex; align-items: center; gap: 8px; border: none; background: var(--card); border-bottom: 1px solid var(--line); padding: 5px 14px; cursor: pointer; width: 100%; }
.ctx-track { flex: 1; height: 4px; background: var(--line); border-radius: 99px; overflow: hidden; }
.ctx-track i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.ctx-track i.warn { background: var(--warn); } .ctx-track i.full { background: var(--danger); }
.ctx-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.handover { background: var(--accent-soft); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.handover summary { cursor: pointer; font-weight: 600; color: var(--accent-d); }
@media (prefers-color-scheme: dark) { .handover summary { color: var(--accent); } }
.handover .md-body { margin-top: 8px; }
.top .row { gap: 6px; }
.icon-sm { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 16px; }
.day-card.today { border-color: var(--accent); }
.pmeal { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.pmeal:first-of-type { border-top: none; }
.pmeal .ic { width: 28px; text-align: center; font-size: 18px; flex: none; }
.pmeal .n { font-weight: 600; } .pmeal .m { font-size: 12px; color: var(--muted); }
.pmeal .k { white-space: nowrap; text-align: right; font-weight: 700; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.pills span { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.shop-sec { font-weight: 700; margin: 12px 0 4px; }
.shop-item { display: flex; flex-direction: row; gap: 10px; align-items: center; padding: 6px 0; color: var(--text); font-size: 16px; }
.shop-item input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.shop-item.done span { text-decoration: line-through; color: var(--muted); }
.conv-item { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; margin-bottom: 8px; }
.conv-item.on { border-color: var(--accent); background: var(--accent-soft); }

/* ===== Navigation / Mehr ===== */
.seg.three { grid-template-columns: repeat(3, 1fr); }
.seg.three button { padding: 8px 4px; font-size: 14px; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.menu { display: flex; flex-direction: column; gap: 10px; }
.menu-item { display: flex; gap: 14px; align-items: center; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; width: 100%; }
.menu-item > span { font-size: 26px; }

/* ===== Gemeinsame Bausteine ===== */
.ev { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ev:first-of-type { border-top: none; }
.ev.done b { color: var(--muted); }
.ev [data-edit] { cursor: pointer; }
.day-title { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.day-title h2 { font-size: 18px; }
.supp-box { margin-top: 8px; padding: 8px 10px; background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; }
.supp-h { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.supp-row { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; padding: 5px 0; color: var(--text); font-size: 15px; cursor: pointer; }
.supp-row input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin-top: 1px; }
.supp-row.done span { text-decoration: line-through; color: var(--muted); }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.chip-w { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-d); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip-w.done { opacity: .65; }
@media (prefers-color-scheme: dark) { .chip-w { color: var(--accent); } }
.conv-item.off { opacity: .55; }
.wd-chips { display: flex; gap: 6px; }
.wd { flex: 1; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 0; font-weight: 700; cursor: pointer; color: var(--muted); }
.wd.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg3 button { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 4px; font-weight: 600; cursor: pointer; font-size: 14px; }
.seg3 button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.note-box { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }
.note-box.big { font-size: 17px; line-height: 1.5; padding: 16px; }
.ex-det { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 8px 0; }
.ex-det summary { cursor: pointer; display: flex; gap: 10px; align-items: center; list-style: none; }
.ex-det summary::-webkit-details-marker { display: none; }
.ex-n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-d); display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.steps { margin: 4px 0 8px; padding-left: 22px; } .steps li { margin-bottom: 5px; }
.steps.big { font-size: 17px; line-height: 1.5; } .steps.big li { margin-bottom: 9px; }
.steps.bad li::marker { color: var(--danger); }
.session .ex-preview { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ===== Kalender ===== */
.cal-card { padding: 10px; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-head span { text-align: center; font-size: 12px; color: var(--muted); padding: 2px 0 6px; font-weight: 600; }
.cal-grid { gap: 3px; }
.cal-cell { border: 1px solid transparent; background: var(--bg); border-radius: 10px; min-height: 48px; padding: 4px 2px 3px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; cursor: pointer; color: var(--text); }
.cal-cell.dim { opacity: .38; }
.cal-cell.today .n { background: var(--accent); color: var(--on-accent); border-radius: 99px; padding: 0 7px; font-weight: 700; }
.cal-cell.sel { border-color: var(--accent); background: var(--accent-soft); }
.cal-cell .n { font-size: 14px; }
.dots { display: flex; gap: 3px; min-height: 8px; }
.dots .d, .cal-legend .d { display: inline-block; width: 7px; height: 7px; border-radius: 50%; vertical-align: middle; margin-right: 3px; }
.dots .d { margin: 0; }
.d.w { background: var(--accent); } .d.w.done { box-sizing: border-box; background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.d.m { background: var(--c); } .d.n { background: var(--p); } .d.t { background: var(--muted); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--muted); margin-top: 8px; justify-content: center; }
.cal-legend span { display: inline-flex; align-items: center; }

/* ===== Workout-Modus ===== */
body.wo-open { overflow: hidden; }
.wo { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; padding-top: var(--safe-t); }
.wo-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.wo-title b { font-size: 16px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wo-bar { height: 4px; background: var(--line); } .wo-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.wo-rest { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: var(--accent); color: var(--on-accent); font-size: 16px; }
.wo-rest .btn { background: #fff3; border-color: transparent; color: inherit; }
.wo-body { flex: 1; overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch; max-width: 640px; width: 100%; margin: 0 auto; }
.wo-hero { font-size: 56px; text-align: center; margin: 12px 0 4px; }
.wo-body h2 { font-size: 22px; margin-bottom: 8px; }
.ex-title { font-size: 24px !important; }
.target { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 14px; }
.target > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 4px; text-align: center; }
.target b { display: block; font-size: 22px; } .target span { font-size: 12px; color: var(--muted); }
.sets { display: flex; flex-direction: column; gap: 8px; }
.setrow { display: flex; align-items: flex-end; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; }
.setrow.done { background: var(--accent-soft); border-color: var(--accent); }
.setrow .sn { width: 22px; font-weight: 700; color: var(--muted); align-self: center; }
.setrow label { flex: 1; font-size: 11px; gap: 2px; min-width: 0; }
.setrow input { padding: 8px 10px !important; font-size: 17px !important; text-align: center; }
.setok { width: 48px; height: 44px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); font-size: 20px; cursor: pointer; color: var(--muted); flex: none; }
.setok.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.wo-foot { display: flex; gap: 10px; padding: 10px 14px calc(10px + var(--safe-b)); background: var(--card); border-top: 1px solid var(--line); }
.wo-foot .btn { padding: 14px 16px; font-size: 16px; }
.rating { display: flex; gap: 8px; justify-content: space-between; }
.rating button { flex: 1; font-size: 28px; padding: 10px 0; border-radius: 14px; border: 2px solid var(--line); background: var(--card); cursor: pointer; }
.rating button.on { border-color: var(--accent); background: var(--accent-soft); }

/* ===== Verlauf & Check-in ===== */
.tabbar button { position: relative; }
.tabbar button.dot::after { content: ''; position: absolute; top: 8px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid var(--card); }
.banner { display: flex; gap: 10px; align-items: center; border-color: var(--accent); background: var(--accent-soft); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.kpi .kl { font-size: 12px; color: var(--muted); } .kpi .kv { font-size: 22px; font-weight: 700; margin: 2px 0; } .kpi .ks { font-size: 12px; color: var(--muted); }
.kpi.good .kv { color: var(--accent-d); }
@media (prefers-color-scheme: dark) { .kpi.good .kv { color: var(--accent); } }
.ci-btn { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.ci-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.ci-dots i { width: 28px; height: 5px; border-radius: 99px; background: var(--line); }
.ci-dots i.done { background: var(--accent); } .ci-dots i.cur { background: var(--accent); opacity: .55; }
.ci-q { font-size: 22px !important; text-align: center; margin: 6px 0 16px !important; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale button { border: 2px solid var(--line); background: var(--bg); border-radius: 14px; padding: 12px 2px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); }
.scale button.on, .yn button.on { border-color: var(--accent); background: var(--accent-soft); }
.scale .em { font-size: 30px; line-height: 1; } .scale .lb { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.15; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .yn.col { grid-template-columns: 1fr; }
.yn button { border: 2px solid var(--line); background: var(--bg); border-radius: 16px; padding: 22px 10px; font-size: 20px; font-weight: 700; cursor: pointer; color: var(--text); }
