/* Elisas Logbuch: ruhiges Blau-Grau, weiße Karten, eine Farbe je Kategorie (Optionen). */
:root {
  color-scheme: light;
  --bg: #EEF3F8;
  --bg-2: #E2EAF2;
  --card: #FFFFFF;
  --card-2: #F5F8FB;
  --border: #D6E2EE;
  --line: #E6EDF4;
  --text: #1E2C3A;
  --text-2: #566778;
  --text-3: #5F6F7F;
  --accent: #2A72BC;
  --on-accent: #FFFFFF;
  --accent-fg: #27609B;
  --ok: #2E9E5B;
  --ok-fill: #237A46;
  --ok-text: #237A46;
  --warn: #D9822B;
  --warn-text: #A8601A;
  --danger: #C93C3C;
  --danger-text: #B23434;
  --shadow: 0 1px 2px rgba(23, 53, 85, .05), 0 4px 14px rgba(23, 53, 85, .06);
  --shadow-lg: 0 12px 40px rgba(16, 38, 62, .22);
  --blur-bg: rgba(238, 243, 248, .84);
  --r: 16px;
  --r-sm: 12px;
  --tabbar-h: 60px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --track: #E4EBF2;
  --switch-off: #DCE3EA;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D141C;
  --bg-2: #1A2531;
  --card: #151F29;
  --card-2: #1B2734;
  --border: #243241;
  --line: #202C39;
  --text: #E6EDF4;
  --text-2: #A6B4C2;
  --text-3: #8C9BAA;
  --accent-fg: #6FA3DA;
  --ok-text: #5CC98A;
  --warn-text: #F0A65A;
  --danger-text: #F08A8A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 14px rgba(0, 0, 0, .25);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .55);
  --blur-bg: rgba(13, 20, 28, .84);
  --track: #243241;
  --switch-off: #2C3A49;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.sheet-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
svg.i { flex: none; display: block; }
.muted { color: var(--text-3); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 0; }
.mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.center { text-align: center; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

/* ---------------------------------------------------------------- Rahmen */
.app { min-height: 100vh; padding-left: var(--sal); padding-right: var(--sar); }
.app.with-tabs { padding-bottom: calc(var(--tabbar-h) + var(--sab) + 24px); }
.app.fullscreen { padding-bottom: calc(84px + var(--sab)); }
.boot { padding: 40vh 0; text-align: center; color: var(--text-3); }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: calc(var(--sat) + 8px) 12px 10px;
  background: var(--blur-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
.tb-left { justify-self: start; display: flex; align-items: center; }
.tb-right { justify-self: end; display: flex; align-items: center; }
.tb-center { text-align: center; min-width: 0; max-width: 64vw; }
.tb-title { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title.small { font-size: 15px; letter-spacing: .04em; }
.tb-sub { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: var(--accent-fg); }
.icon-btn.small { width: 44px; height: 44px; color: var(--text-3); }
.icon-btn:active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.link-btn { border: 0; background: none; color: var(--accent-fg); font-size: 16px; padding: 10px 6px; min-height: 44px; }
.link-btn.strong { font-weight: 700; }

.view { max-width: 680px; margin: 0 auto; padding: 14px 16px 24px; }

/* ---------------------------------------------------------------- Karten */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
}
.card-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3);
}
.card-title > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.card-title.inline { margin: 0; flex: 1; }
.card-title .muted { font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 13px; }
.sub-title { margin: 14px 0 8px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.hint { margin: 8px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.hint.warn { color: var(--warn-text); }
.empty { text-align: center; color: var(--text-2); padding: 28px 12px; }
.foot-note { margin: 18px 4px 0; font-size: 11.5px; color: var(--text-3); text-align: center; line-height: 1.5; }
.section-head { margin: 22px 4px 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }

/* ---------------------------------------------------------------- Banner */
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 12px 12px 14px; border-radius: var(--r); margin-bottom: 12px; border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow); font-size: 13.5px; line-height: 1.4; }
.banner > div { flex: 1; }
.banner > svg { color: var(--accent-fg); }
.banner.warn { background: color-mix(in srgb, var(--danger) 9%, var(--card)); border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.banner.warn > svg { color: var(--danger-text); }
.banner.backup { background: color-mix(in srgb, var(--warn) 10%, var(--card)); border-color: color-mix(in srgb, var(--warn) 32%, var(--border)); }
.banner.backup > svg { color: var(--warn-text); }

/* ---------------------------------------------------------------- Übersicht */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 16px; }
.hero-stats { display: grid; gap: 8px; }
.hs { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 8px; font-size: 13px; color: var(--text-2); }
.hs > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs b { color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hs small { grid-column: 1 / -1; color: var(--text-3); font-size: 11.5px; margin-top: -4px; }
.hero-time { grid-column: 1 / -1; display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.mini-prog { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; font-size: 12.5px; color: var(--text-2); }
.mini-prog b { color: var(--text); font-variant-numeric: tabular-nums; }
.mini-prog .bar { grid-column: 1 / -1; }

.ring .ring-track { stroke: var(--track); }
.ring .ring-fill { stroke: var(--accent); transition: stroke-dashoffset .8s cubic-bezier(.2, .8, .2, 1); }
.ring .ring-track.cat { stroke: color-mix(in srgb, var(--c) 16%, var(--track)); }
.ring .ring-fill.cat { stroke: var(--c); }
.ring-txt { font-size: 22px; font-weight: 800; fill: var(--text); }
.ring-txt.big { font-size: 28px; }
.ring-sub { font-size: 12px; font-weight: 600; fill: var(--text-3); }

.empty-hint { text-align: center; padding: 20px 18px; }
.empty-hint p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.empty-ico { width: 48px; height: 48px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-fg); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }

.cat-block { margin-top: 6px; }
.cat-head { display: flex; align-items: center; gap: 8px; margin: 20px 4px 10px; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-2); }
.cat-head .meta { margin-left: auto; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-3); font-size: 12.5px; white-space: nowrap; }
.swatch { width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex: none; }
.swatch.inline { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  min-height: 132px; padding: 12px; border-radius: 15px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.tile:active { transform: scale(.975); }
.tile.done { border-color: color-mix(in srgb, var(--c) 45%, var(--border)); background: color-mix(in srgb, var(--c) 5%, var(--card)); }
.tile-top { display: flex; align-items: center; justify-content: space-between; }
.ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--cfg, var(--c)); background: color-mix(in srgb, var(--c) 15%, var(--card)); flex: none; }
:root[data-theme="dark"] .ico { background: color-mix(in srgb, var(--c) 22%, var(--card)); }
.ico.sm { width: 30px; height: 30px; border-radius: 9px; }
.pct { font-size: 12px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.badge-done { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--cfill, var(--c)); color: var(--on-c, #fff); }
.tile .name { flex: 1; font-weight: 650; font-size: 13.5px; line-height: 1.25; }
.tile .name, .count-row .lbl b, .pick-name, .cr-name, .tr-name, .comp-text, .quote, .eh-title, .sw-label, .chip, .csh-name, .cat-head {
  -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; min-width: 0;
}
.bar { height: 7px; border-radius: 7px; background: color-mix(in srgb, var(--c, var(--accent)) 16%, var(--track)); overflow: hidden; }
.bar.slim { height: 5px; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c, var(--accent)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.bar.ok > i { background: var(--ok); }
.bar.ok { background: color-mix(in srgb, var(--ok) 14%, var(--track)); }
.tile .num { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tile .num b { color: var(--text); font-size: 14px; }
.tile.pulse { animation: pulse 1.4s ease-out 1; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); transform: scale(1); }
  30% { transform: scale(1.03); }
  100% { box-shadow: 0 0 0 14px transparent; transform: scale(1); }
}

/* ---------------------------------------------------------------- Bedienelemente */
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bg-2); margin-bottom: 12px; }
.card .seg { margin-bottom: 0; }
.seg button { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 650; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 4px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: #2C3C4E; box-shadow: inset 0 0 0 1px #3A4D63; }
.area-seg button { flex-direction: column; gap: 2px; font-size: 12px; min-height: 52px; }
.area-seg button[aria-pressed="true"] { color: var(--accent-fg); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--card); color: var(--text);
  font-weight: 650; font-size: 14px; line-height: 1.2; text-align: left;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}
.chip:active { transform: scale(.96); }
.chip small { font-weight: 500; font-size: 12px; color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--chip, var(--accent)); border-color: var(--chip, var(--accent)); color: var(--chip-on, var(--on-accent)); }
.chip[aria-pressed="true"] small { color: inherit; opacity: .85; }
.chips.small .chip, .chip.small { min-height: 44px; padding: 6px 12px; font-size: 13px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; }
.dots { display: inline-flex; gap: 3px; align-items: center; margin-left: 2px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; box-shadow: 0 0 0 1.5px var(--card); }
.chip[aria-pressed="true"] .dots i { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85); }
.asa { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.asa-btn { justify-content: center; padding: 8px 0; font-size: 17px; font-weight: 800; border-radius: 12px; min-height: 46px; }

.switches { display: grid; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 6px 0; border-top: 1px solid var(--line); }
.switches .switch-row:first-child { border-top: 0; }
.sw-label { display: grid; gap: 2px; font-weight: 600; font-size: 14.5px; }
.sw-label > span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sw-label small { font-weight: 500; font-size: 12px; color: var(--text-3); }
.switch-title { cursor: pointer; margin-bottom: 4px; }
input.switch {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 51px; height: 31px; border-radius: 31px; margin: 0;
  background: var(--switch-off); position: relative; cursor: pointer; transition: background-color .2s;
}
input.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); transition: transform .2s; }
input.switch:checked { background: var(--ok); }
input.switch:checked::after { transform: translateX(20px); }

.input {
  display: block; width: 100%; min-height: 46px; padding: 11px 12px;
  font-size: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--card-2); color: var(--text);
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--text-3); }
textarea.input { resize: vertical; min-height: 84px; line-height: 1.4; }
input[type="date"].input { line-height: 22px; }
input[type="date"].input::-webkit-date-and-time-value { text-align: left; }
.input.num { width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 650; color: var(--text-2); }

.search { position: relative; }
.search .input { padding-left: 40px; background: var(--card); }
.search-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 16px; border-radius: 13px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-weight: 650; font-size: 15px; text-align: center;
  transition: transform .1s, filter .15s;
}
.btn:active { transform: scale(.98); filter: brightness(.96); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.small { min-height: 44px; padding: 7px 12px; font-size: 13.5px; border-radius: 11px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent-fg); }
.btn.block { display: flex; width: 100%; }
.btn.big { width: 100%; min-height: 54px; font-size: 17px; font-weight: 750; border-radius: 15px; }
.btn.danger { color: var(--danger-text); background: color-mix(in srgb, var(--danger) 8%, var(--card)); border-color: color-mix(in srgb, var(--danger) 28%, var(--border)); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.cat-btn { background: var(--cfill, var(--c)); border-color: var(--cfill, var(--c)); color: var(--on-c, #fff); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.btn-row > .btn { flex: 1 1 auto; }
.btn-col { display: grid; gap: 8px; }
.from-last { margin: -4px 0 10px; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); flex: none; }
.stepper button { width: 44px; height: 44px; border: 0; background: none; color: var(--accent-fg); display: grid; place-items: center; }
.stepper button:active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.stepper .val { min-width: 30px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.inline-step { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; }

/* ---------------------------------------------------------------- Erfassen */
.count-card { border-width: 1.5px; border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.sum-badge { background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 3px 10px; font-size: 13px; letter-spacing: 0; font-weight: 800; }
.count-list { display: grid; }
.count-row { display: grid; grid-template-columns: 5px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.count-row:first-child { border-top: 0; }
.count-row .cbar { width: 5px; height: 34px; border-radius: 4px; background: var(--c); }
.count-row .lbl b { display: block; font-size: 14.5px; font-weight: 650; }
.count-row .lbl small { color: var(--text-3); font-size: 12px; }
.count-row.off { opacity: .5; }
.count-row.off .lbl b { text-decoration: line-through; }
.count-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.savebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 10px max(16px, var(--sar)) calc(10px + var(--sab)) max(16px, var(--sal));
  background: var(--blur-bg); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
}
.savebar .btn { max-width: 648px; margin: 0 auto; display: flex; }

/* ---------------------------------------------------------------- Listen (Verlauf, Register) */
.list { display: grid; gap: 8px; }
.list-meta { margin: 12px 4px 0; font-size: 12.5px; color: var(--text-3); }
.month-head { display: flex; justify-content: space-between; margin: 18px 4px 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.row-card { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.row-card:active { transform: scale(.99); }
.date-block { display: grid; justify-items: center; line-height: 1.05; padding: 4px 0; border-radius: 10px; background: var(--card-2); }
.date-block b { font-size: 19px; font-weight: 800; }
.date-block small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-3); }
.date-block .wd { font-weight: 600; text-transform: none; }
.row-main { display: grid; gap: 2px; min-width: 0; }
.t1 { font-weight: 650; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: break-word; }
.t2 { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-dots { margin: 3px 0 0; }
.row-end { display: flex; align-items: center; gap: 4px; }
.plus { font-weight: 800; color: var(--accent-fg); font-size: 14px; font-variant-numeric: tabular-nums; }
.plus.cat { color: var(--cfg, var(--c)); }

/* ---------------------------------------------------------------- Eintrag / Position */
.entry-hero { padding: 16px; }
.eh-date { font-size: 13px; font-weight: 700; color: var(--accent-fg); text-transform: uppercase; letter-spacing: .06em; }
.eh-title { font-size: 19px; font-weight: 750; margin-top: 4px; line-height: 1.25; }
.eh-sub { color: var(--text-2); margin-top: 4px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 600; }
.kv.small { font-size: 13px; }
.note { margin: 0; white-space: pre-wrap; }
.plus-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.plus-list.left { justify-content: flex-start; }
.plus-chip { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px; font-weight: 700; font-size: 13.5px; background: var(--cfill, var(--c)); color: var(--on-c, #fff); }

.item-hero { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 16px; }
.ih-text { display: grid; gap: 8px; }
.ih-status { font-size: 15px; color: var(--text); }
.ih-status.done { color: var(--ok-text); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.ih-note { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.quote { margin: 0; font-size: 14px; line-height: 1.45; }
.quote.parent { color: var(--text-3); font-size: 13px; margin-bottom: 6px; }

.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; align-items: end; height: 130px; }
.bars .b { display: grid; grid-template-rows: 16px 1fr 16px; height: 100%; text-align: center; }
.bars .bv { font-size: 10.5px; font-weight: 700; color: var(--text-2); }
.bars .bcol { display: flex; align-items: flex-end; justify-content: center; }
.bars .bcol i { display: block; width: 100%; max-width: 22px; min-height: 2px; border-radius: 5px 5px 2px 2px; background: var(--c, var(--accent)); }
.bars small { font-size: 10px; color: var(--text-3); }

/* ---------------------------------------------------------------- Kompetenzen */
.comp-summary .cs-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 14px; color: var(--text-2); }
.comp-summary .cs-row b { color: var(--text); font-size: 18px; }
.comp-sec { padding: 0; overflow: hidden; }
.comp-sec .bar { margin: 0 14px 12px; }
.comp-sec-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px; border: 0; background: none; text-align: left; font-weight: 700; font-size: 14.5px; }
.csh-name { flex: 1; }
.csh-meta { color: var(--text-3); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.comp-sec-head .chev { color: var(--text-3); transition: transform .2s; }
.comp-sec.open .chev { transform: rotate(180deg); }
.comp-rows { border-top: 1px solid var(--line); padding: 0 14px 6px; }
.comp-row { padding: 12px 0; border-top: 1px solid var(--line); }
.comp-row:first-child { border-top: 0; }
.comp-row.sub { padding-left: 14px; }
.comp-text { font-size: 14px; line-height: 1.45; }
.comp-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pill { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 6px 10px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--card); color: var(--text-2); font-size: 12.5px; font-weight: 650; }
.pill svg { opacity: .35; }
.pill[aria-pressed="true"] { background: color-mix(in srgb, var(--ok) 14%, var(--card)); border-color: color-mix(in srgb, var(--ok) 55%, var(--border)); color: var(--ok-text); }
.pill.strong[aria-pressed="true"] { background: var(--ok-fill); border-color: var(--ok-fill); color: #fff; }
.pill[aria-pressed="true"] svg { opacity: 1; }
.mini-count { display: inline-flex; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 750; background: color-mix(in srgb, var(--c) 16%, var(--card)); color: var(--text); vertical-align: 1px; white-space: nowrap; }
.mini-count.done { background: var(--cfill, var(--c)); color: var(--on-c, #fff); }

/* ---------------------------------------------------------------- Optionen */
.color-list { display: grid; }
.color-row { display: flex; align-items: center; gap: 12px; min-height: 52px; border-top: 1px solid var(--line); cursor: pointer; }
.color-row:first-child { border-top: 0; }
.cr-name { flex: 1; font-weight: 600; font-size: 14.5px; }
input.swatch-input { -webkit-appearance: none; appearance: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; flex: none; }
input.swatch-input::-webkit-color-swatch-wrapper { padding: 0; }
input.swatch-input::-webkit-color-swatch { border: 2px solid color-mix(in srgb, var(--text) 12%, transparent); border-radius: 50%; }
input.swatch-input::-moz-color-swatch { border: 2px solid color-mix(in srgb, var(--text) 12%, transparent); border-radius: 50%; }
.preset-dots { display: inline-flex; margin-right: 2px; }
.preset-dots i { width: 10px; height: 10px; border-radius: 50%; margin-right: -3px; box-shadow: 0 0 0 1.5px var(--card); }
.accent-row { display: flex; flex-wrap: wrap; gap: 10px; }
.accent-dot { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06); display: grid; place-items: center; color: var(--text-3); background: var(--card-2); overflow: hidden; }
.accent-dot[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--text); }
.accent-dot.custom { border: 1.5px dashed var(--border); cursor: pointer; }
input.swatch-input.overlay { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
details.acc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; min-height: 44px; }
details.acc > summary::-webkit-details-marker { display: none; }
.target-list { display: grid; margin-top: 8px; }
.target-row { display: grid; grid-template-columns: 5px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.target-row:first-child { border-top: 0; }
.target-row .cbar { width: 5px; height: 30px; border-radius: 4px; background: var(--c); }
.tr-name { font-size: 14px; font-weight: 600; display: grid; }
.tr-name small { font-weight: 500; color: var(--text-3); font-size: 12px; }

/* ---------------------------------------------------------------- Tab-Leiste */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch;
  height: calc(var(--tabbar-h) + var(--sab)); padding: 0 var(--sar) var(--sab) var(--sal);
  background: var(--blur-bg); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 650; color: var(--text-3); }
.tab[aria-current="page"] { color: var(--accent-fg); }
.tab.add { justify-content: flex-end; padding-bottom: 6px; color: var(--accent-fg); }
.add-btn { width: 54px; height: 54px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 0 4px var(--bg); transition: transform .12s; }
.tab.add:active .add-btn { transform: scale(.92); }

/* ---------------------------------------------------------------- Sheet und Toast */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 18, 28, .42); opacity: 0; transition: opacity .25s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 680px; max-height: 86vh; overflow: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: var(--card); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  padding: 6px 16px calc(18px + var(--sab));
  transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.sheet.tall { max-height: 90vh; }
.sheet-wrap.show .sheet-backdrop { opacity: 1; }
.sheet-wrap.show .sheet { transform: translateY(0); }
.grabber { width: 38px; height: 5px; border-radius: 5px; background: var(--border); margin: 6px auto 10px; }
.sheet-title { margin: 0 0 12px; text-align: center; font-size: 17px; font-weight: 750; }
.sheet-text { margin: 0 0 14px; text-align: center; color: var(--text-2); line-height: 1.5; }
.sheet-actions { display: grid; gap: 8px; margin-top: 14px; }
.success { text-align: center; }
.success-ico { width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) 1; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-date { margin: 0 0 12px; color: var(--text-2); font-weight: 600; }
.pick-group { margin-bottom: 10px; }
.pick-head { display: flex; align-items: center; gap: 8px; margin: 12px 2px 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); }
.pick-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 4px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font-weight: 600; font-size: 14.5px; }
.pick-name { flex: 1; }

#toast-root { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--sab) + 14px); z-index: 120; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.app.fullscreen ~ #toast-root { bottom: calc(88px + var(--sab)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 520px; padding: 12px 14px 12px 16px; border-radius: 14px; background: #1C2A38; color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 550; opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast button { border: 0; background: none; color: #8EC8FF; font-weight: 800; padding: 10px 12px; margin: -8px -8px -8px 0; min-height: 44px; min-width: 44px; white-space: nowrap; }
:root[data-theme="dark"] .toast { background: #E6EDF4; color: #14202B; }
:root[data-theme="dark"] .toast button { color: #1C64B0; }

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