:root {
  --bg: #f4f6fa; --card: #fff; --text: #1b2330; --muted: #657084; --line: #e1e6ee;
  --accent: #1f6feb; --accent-text: #fff; --danger: #d1343f; --ok: #1a8f4c; --warn: #b7791f;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #11151c; --card: #1a202a; --text: #e8ecf3; --muted: #95a1b5; --line: #2a3340; --accent: #4c8dff; }
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
main { max-width: 1000px; margin: 0 auto; padding: 12px 12px calc(24px + env(safe-area-inset-bottom)); }
.top { display: flex; justify-content: space-between; align-items: center; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; font-size: 18px; }
h1 { font-size: 22px; margin: 8px 0 12px; }
h2 { font-size: 15px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
h3 { font-size: 14px; color: var(--muted); margin: 14px 0 4px; font-weight: 600; }
.muted { color: var(--muted); } .center { text-align: center; } .small { font-size: 13px; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.head h1 { margin: 8px 0 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid { grid-template-columns: 1fr 1fr; } .span2 { grid-column: span 2; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
a.card { display: block; color: inherit; text-decoration: none; }
.card .more { float: right; font-size: 13px; color: var(--accent); text-decoration: none; }
.hero h1 { margin: 4px 0 2px; }
blockquote { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 0 10px 10px 0; font-size: 17px; }
ul.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li[data-edit] { cursor: pointer; }
.list li[data-edit]:hover .t { text-decoration: underline; }
.list .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.list .t { font-weight: 500; }
.list .when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.list .late { color: var(--danger); }
.list li.done .t { text-decoration: line-through; color: var(--muted); }
.bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c, var(--line)); flex: none; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; margin-left: 8px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); font-weight: 600; white-space: nowrap; }
details summary { cursor: pointer; font-weight: 600; color: var(--muted); }
details[open] summary { margin-bottom: 8px; }
.empty { color: var(--muted); font-size: 14px; padding: 4px 0; }
.foot { margin-top: 10px; }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.tile { text-align: center; padding: 16px 8px; margin: 0; color: var(--text); text-decoration: none; }
.tile .ico { font-size: 26px; display: block; }
.tile.soon { opacity: .55; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.chips button { padding: 6px 11px; font-size: 14px; border-radius: 999px; background: var(--bg); color: var(--text); border: 1px solid var(--line); font-weight: 500; }
.chips.filter { margin: 0 0 12px; }
.chips.filter button { border-color: var(--c, var(--line)); }
.chips.filter button.on { background: var(--c, var(--accent)); color: #fff; border-color: var(--c, var(--accent)); }
input, select, textarea, button { font: inherit; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
input[type=checkbox] { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 13px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.sw { position: relative; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw span { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid transparent; }
.sw input:checked + span { border-color: var(--text); box-shadow: 0 0 0 2px var(--card); }
dialog { width: min(440px, calc(100vw - 24px)); border: 0; border-radius: 16px; background: var(--card); color: var(--text); padding: 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog h2 { color: var(--text); text-transform: none; font-size: 18px; letter-spacing: 0; margin: 0 0 4px; }
button { padding: 10px 16px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-text); font-weight: 600; cursor: pointer; }
button.link { background: none; color: var(--accent); padding: 6px; }
button.ghost { background: none; color: var(--danger); padding: 6px 8px; }
[data-new] { padding: 8px 14px; font-size: 14px; }
.err { color: var(--danger); min-height: 1.3em; margin: 6px 0; }
.login { max-width: 380px; margin: 8vh auto 0; }
.login h1 { margin-bottom: 0; }
.login input { margin-top: 8px; }
.secret { font: 15px/1.4 ui-monospace, Menlo, Consolas, monospace; word-break: break-all; padding: 10px; background: var(--bg); border-radius: 10px; border: 1px dashed var(--line); user-select: all; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 13px; }
.cal b { color: var(--muted); font-weight: 600; padding-bottom: 4px; }
.cal span { padding: 6px 0 8px; border-radius: 8px; position: relative; }
.cal .today { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.cal .inweek:not(.today) { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cal .ev::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); }
.cal .today.dot::after { background: var(--accent-text); }
.cal .bd::before { content: ""; position: absolute; bottom: 1px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; border: 1.5px solid var(--icon); box-sizing: border-box; }
.cal .ev.bd::before { margin-left: 1px; }
.cal .ev.bd::after { margin-left: -6px; }

/* Einkauf */
.qty { font-size: 13px; color: var(--accent); font-weight: 600; margin-left: 8px; white-space: nowrap; }
.note { display: block; }
.cnt { opacity: .75; font-size: 12px; margin-left: 2px; }
.chips.sugg button { font-size: 13px; padding: 5px 10px; color: var(--muted); }
.card .head h2 { margin: 0; }
.actions.wrap { flex-wrap: wrap; }
button.mini { padding: 6px 12px; font-size: 13px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
label.pill { position: relative; flex-direction: row; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span { display: inline-block; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 13px; cursor: pointer; }
.pill input:checked + span { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile { position: relative; }
.badge { position: absolute; top: 8px; right: 10px; background: var(--accent); color: var(--accent-text); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 1px 8px; }

/* Bilder: App-Icon in der Kopfzeile, Orbit-Bild in der Begruessung und in der Anmeldung */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand img { border-radius: 50%; }
.gear { font-size: 22px; text-decoration: none; line-height: 1; padding: 4px; }
.card.hero {
  display: flex; align-items: center; gap: 18px; overflow: hidden; border: 0; color: #fff;
  background: radial-gradient(90% 130% at 82% 50%, var(--hero-glow) 0%, var(--hero-bg) 62%);
}
.hero-text { flex: 1; min-width: 0; }
.hero-art {
  order: 2; flex: none; width: 240px; height: auto; margin: -6px -4px -6px auto; filter: var(--hero-filter);
  -webkit-mask-image: radial-gradient(closest-side, #000 86%, transparent 100%); mask-image: radial-gradient(closest-side, #000 86%, transparent 100%);
}
.card.hero .muted { color: rgba(255, 255, 255, .75); }
.card.hero h1 { font-size: 30px; margin: 2px 0 4px; }
@media (max-width: 560px) {
  .card.hero { flex-direction: column; align-items: stretch; gap: 4px; background: radial-gradient(120% 70% at 50% 28%, var(--hero-glow) 0%, var(--hero-bg) 70%); }
  .hero-art { order: 0; width: min(82%, 300px); margin: -4px auto 0; }
}
.login { overflow: hidden; }
.login:has(.login-art) { padding-top: 0; }
.login-art { margin: 0 -14px 46px; height: 190px; position: relative; background: radial-gradient(70% 90% at 50% 45%, var(--hero-glow), var(--hero-bg) 75%); }
.login-art::before { content: ''; position: absolute; inset: 6px 0 0; background: url(hero.webp) center / contain no-repeat; filter: var(--hero-filter); -webkit-mask-image: radial-gradient(closest-side, #000 85%, transparent); mask-image: radial-gradient(closest-side, #000 85%, transparent); }
.login-logo { position: absolute; left: 50%; bottom: -42px; transform: translateX(-50%); border-radius: 50%; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.login h1, .login > .muted { text-align: center; }

/* To-dos: Prioritaet und Wiederholung */
.prio { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 12px; font-weight: 800; vertical-align: 1px; }
.list li.low .t { color: var(--muted); }
.rep { font-size: 12px; color: var(--muted); margin-left: 8px; white-space: nowrap; }
#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: #1d1838; color: #fff; padding: 10px 16px; border-radius: 999px; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20; font-size: 14px; white-space: nowrap; max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }


/* Designs: Farben je data-theme (auch fuer die Vorschau in den Einstellungen) */
[data-theme] { --hero-bg: #0c0920; --hero-glow: #2a1a5e; --hero-filter: none; }
[data-theme=space] {
  color-scheme: dark; --bg: #0d0a1f; --card: #18142f; --text: #ecebff; --muted: #a29dc6; --line: #2b2650;
  --accent: #8b6cff; --accent-text: #fff; --danger: #ff5d6c; --hero-bg: #0c0920; --hero-glow: #2c1b63; --hero-filter: none;
}
[data-theme=orange] {
  color-scheme: dark; --bg: #140c07; --card: #22150d; --text: #fff2e8; --muted: #c9a58c; --line: #3d2617;
  --accent: #ff8c32; --accent-text: #1d0e03; --danger: #ff5d5d; --hero-bg: #160a03; --hero-glow: #5c2a0b; --hero-filter: hue-rotate(140deg) saturate(1.25);
}
[data-theme=sky] {
  color-scheme: light; --bg: #edf4fc; --card: #fff; --text: #0f2440; --muted: #587091; --line: #d5e2f1;
  --accent: #2477e0; --accent-text: #fff; --danger: #d1343f; --hero-bg: #0a2550; --hero-glow: #1d64b8; --hero-filter: hue-rotate(-45deg) brightness(1.12);
}
[data-theme=aurora] {
  color-scheme: dark; --bg: #08130f; --card: #10201a; --text: #e6fff4; --muted: #8fb8a6; --line: #1f3a2f;
  --accent: #2fd39a; --accent-text: #04140d; --danger: #ff6b6b; --hero-bg: #05120d; --hero-glow: #0e4a34; --hero-filter: hue-rotate(-100deg) saturate(1.1);
}
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 8px 10px; background: var(--bg); color: var(--text); border: 2px solid var(--line); border-radius: 14px; text-align: left; }
.theme.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.theme b { margin-top: 4px; }
.theme-prev { display: block; position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: radial-gradient(80% 120% at 72% 50%, var(--hero-glow), var(--hero-bg) 70%); }
.theme-prev img { position: absolute; right: 2%; top: 4%; height: 92%; filter: var(--hero-filter); -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent); mask-image: radial-gradient(closest-side, #000 82%, transparent); }
.theme-prev i { position: absolute; left: 8%; height: 7%; border-radius: 4px; background: #fff; opacity: .85; }
.theme-prev i:nth-of-type(1) { top: 24%; width: 36%; }
.theme-prev i:nth-of-type(2) { top: 42%; width: 24%; opacity: .45; }
.theme-prev i:nth-of-type(3) { top: 64%; width: 22%; height: 14%; border-radius: 99px; background: var(--accent); opacity: 1; }
.linkcard { display: flex; justify-content: space-between; font-weight: 600; }

/* Anschaffungen */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px; }
.stat b { font-size: 19px; }
@media (max-width: 520px) { .stats { gap: 6px; } .stat { padding: 10px 8px; } .stat b { font-size: 16px; } }
.wish-meta { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.wish-meta.late { color: var(--danger); }
.wish-meta b { color: var(--text); }
.progress { display: block; height: 6px; margin-top: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.ext { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); text-decoration: none; color: var(--accent); font-weight: 700; }

/* Menue: Knopf links, Schublade, auf breiten Bildschirmen Leiste oben */
.top { gap: 10px; }
.menu-btn { background: none; color: var(--text); font-size: 22px; padding: 4px 8px; line-height: 1; }
.top .gear { margin-left: auto; }
.topnav { display: none; }
@media (min-width: 1100px) {
  .menu-btn { display: none; }
  .topnav { display: flex; gap: 2px; margin-left: 18px; }
  .toplink { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
  .toplink .ico { font-size: 16px; }
  .toplink:hover { color: var(--text); background: var(--bg); }
  .toplink.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
}
dialog.drawer { margin: 0; height: 100%; max-height: 100%; width: min(300px, 84vw); border-radius: 0 18px 18px 0; padding: calc(14px + env(safe-area-inset-top)) 12px 14px; animation: slidein .18s ease-out; }
@keyframes slidein { from { transform: translateX(-100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 0 6px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; font-size: 18px; }
.drawer-head img { border-radius: 50%; }
.drawer-head .close { margin-left: auto; font-size: 18px; color: var(--muted); }
#navlist { list-style: none; margin: 0; padding: 0; }
.navlink { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 12px; color: var(--text); text-decoration: none; font-size: 17px; font-weight: 500; }
.navlink .ico { width: 26px; text-align: center; font-size: 20px; }
.navlink:hover { background: var(--bg); }
.navlink.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-weight: 700; }

/* Finanzen */
.monthnav { display: flex; align-items: center; gap: 6px; margin: -4px 0 12px; }
.monthnav b { font-size: 16px; min-width: 9em; text-align: center; }
.monthnav button { font-size: 22px; padding: 2px 10px; }
.monthnav button.small { font-size: 13px; }
.alert { border-color: color-mix(in srgb, var(--warn, #b7791f) 60%, var(--line)); background: color-mix(in srgb, #f0a020 10%, var(--card)); }
.fin-sum .big { font-size: 36px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 8px; }
.fin-sum .big.late { color: var(--danger); }
.big-bar { height: 10px; }
.calc { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 14px 0 8px; }
.calc dt { color: var(--muted); } .calc dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.calc dt a { color: inherit; }
.calc .sum { border-top: 1px solid var(--line); padding-top: 6px; color: var(--text); font-weight: 700; }
.plus { color: var(--ok, #1a8f4c); }
[data-theme] .plus { color: color-mix(in srgb, #2fbf71 85%, var(--text)); }
.amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; text-align: right; }
.small-amt { font-size: 14px; font-weight: 400; }
.small-amt .wish-meta { margin-top: 0; }
.ico-l { font-size: 22px; width: 28px; text-align: center; flex: none; }
.progress.warn span { background: #f0a020; }
.progress.over span { background: var(--danger); }
input.bigin { font-size: 26px; font-weight: 700; padding: 10px 12px; }
.card h2 .small { text-transform: none; letter-spacing: 0; margin-left: 6px; font-weight: 500; }

/* Icons: schlichte Linien, einfarbig in Sternen-Gold (--icon je Design) */
:root { --icon: #c9971f; }
[data-theme=space] { --icon: #f0c75e; }
[data-theme=orange] { --icon: #f6c66a; }
[data-theme=sky] { --icon: #b07f12; }
[data-theme=aurora] { --icon: #eccb6a; }
svg.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
svg.i.fill { fill: currentColor; }
.gold, .ico, .ico-l, .menu-btn, .top .gear, .drawer-head .close { color: var(--icon); }
.tile .ico { display: flex; justify-content: center; margin-bottom: 4px; }
.tile .ico svg.i { width: 30px; height: 30px; stroke-width: 1.5; }
.navlink .ico { display: flex; justify-content: center; }
.navlink .ico svg.i { width: 22px; height: 22px; }
.toplink .ico svg.i { width: 18px; height: 18px; }
.navlink.on .ico, .toplink.on .ico { color: var(--accent); }
.menu-btn svg.i, .top .gear svg.i { width: 24px; height: 24px; }
.top .gear { display: flex; }
.drawer-head .close svg.i { width: 20px; height: 20px; }
.ico-l svg.i { width: 22px; height: 22px; }
.prio { display: inline-flex; width: auto; height: auto; margin-right: 5px; background: none; color: var(--icon); vertical-align: -1px; }
.pill span { display: inline-flex; align-items: center; gap: 5px; }
.pill input:checked + span svg.i:not(.gold) { color: inherit; }
.linkcard span:first-child { display: inline-flex; align-items: center; gap: 8px; }
h2 svg.i, h3 svg.i { vertical-align: -.22em; margin-right: 2px; }


/* Begruessung: Tag, Uhr, Tageszeit-Symbol, Wetter */
.hero-day { margin: 0 0 10px; font-size: 16px; color: rgba(255, 255, 255, .92); }
.hero-day .muted { color: rgba(255, 255, 255, .6); }
.hero-now { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.clock { font-size: 46px; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.tod { color: var(--icon); display: flex; }
.tod svg.i { width: 40px; height: 40px; stroke-width: 1.4; }
.tod-label { align-self: flex-end; margin-bottom: 4px; color: rgba(255, 255, 255, .6) !important; }
.wx { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); max-width: 30em; min-height: 58px; }
.wx-ico { color: var(--icon); display: flex; }
.wx-ico svg.i { width: 34px; height: 34px; stroke-width: 1.4; }
.wx-temp { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wx-txt { display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; min-width: 0; }
.wx-txt span { color: rgba(255, 255, 255, .7); font-size: 13px; }
.wx .muted { color: rgba(255, 255, 255, .7); }
.wx-set { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.wx-set svg.i { color: var(--icon); }
.placebtn { display: flex; align-items: center; gap: 6px; text-align: left; color: var(--text); padding: 6px 0; flex-wrap: wrap; }
.placebtn svg.i { color: var(--icon); }
@media (max-width: 560px) { .clock { font-size: 40px; } .hero-day { font-size: 15px; } }

/* Feiertage (Baden-Wuerttemberg) */
.list li.hol .bar { background: var(--icon); }
.list li.hol .t { font-weight: 600; }
.cal .hol:not(.today) { color: var(--icon); font-weight: 700; }

/* Einstellungen: Kalender-Abo, Sicherheit */
a.btn { display: inline-block; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--accent-text); font-weight: 600; text-decoration: none; }
.feedurl { font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; margin: 4px 0 8px; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.setrow:first-of-type { border-top: 0; }
.setrow > span { display: flex; flex-direction: column; gap: 2px; }
button.outline { background: none; color: var(--danger); border: 1px solid currentColor; }

/* Termine: Ort, Serien */
.wish-meta.loc { display: flex; align-items: center; gap: 4px; }
.wish-meta.loc svg.i { color: var(--icon); width: 14px; height: 14px; }
.maplink { display: inline-flex; align-items: center; gap: 6px; margin-top: -6px; font-size: 14px; color: var(--accent); text-decoration: none; }
.maplink svg.i { color: var(--icon); }
.chooser button { width: 100%; }
.chooser p { margin: 0; }
.chooser svg.i { vertical-align: -.2em; }
button.outline-acc { background: none; color: var(--accent); border: 1px solid var(--accent); }

/* Fitness */
.daynav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.daynav b { font-size: 17px; }
.daynav button, .monthnav button { font-size: 24px; padding: 2px 12px; }
button:disabled { opacity: .3; cursor: default; }
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 14px; }
.weekstrip button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 8px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 600; }
.weekstrip button.sel { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.marks { display: flex; gap: 3px; min-height: 7px; justify-content: center; }
i.m { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
i.m.gym { background: var(--icon); }
i.m.sport { border: 1.5px solid var(--icon); box-sizing: border-box; }
i.m.food.good { background: color-mix(in srgb, var(--text) 85%, transparent); }
i.m.food.ok { background: color-mix(in srgb, var(--text) 40%, transparent); }
i.m.food.bad { border: 1.5px solid color-mix(in srgb, var(--text) 55%, transparent); box-sizing: border-box; }
.chips.food i.m { margin-right: 6px; vertical-align: 1px; }
.chips button.hint:not(.on) { border-style: dashed; border-color: var(--icon); }
.fitcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 14px 0 6px; text-align: center; }
.fitcal b { font-size: 11px; color: var(--muted); font-weight: 600; }
.fitcal > span, .fitcal > button { min-height: 42px; border-radius: 9px; font-size: 13px; padding: 4px 0 3px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
.fitcal > button { background: var(--bg); color: var(--text); border: 1px solid transparent; font-weight: 500; }
.fitcal > button.act { background: color-mix(in srgb, var(--icon) 18%, var(--bg)); }
.fitcal > button.today { border-color: var(--line); font-weight: 700; }
.fitcal > button.sel { border-color: var(--accent); }
.fitcal > span.future { color: var(--muted); opacity: .45; }
.bars { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(90px, 34%) 1fr 44px; align-items: center; gap: 10px; font-size: 14px; }
.bars li b { text-align: right; font-variant-numeric: tabular-nums; }
.bars .progress { margin: 0; }
.bars .progress.ok span { opacity: .55; }
.bars .progress.bad span { opacity: .3; }
.stat .down, .stat .up { color: var(--text); }
.wchart { width: 100%; height: auto; display: block; }
.wchart .grid { stroke: var(--line); stroke-width: 1; }
.wchart text { fill: var(--muted); font-size: 10px; }
.wchart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.wchart .pt { fill: var(--icon); }

/* Umschalter (Reiter) */
.seg { display: flex; gap: 4px; padding: 4px; margin: 0 0 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.seg button { flex: 1; padding: 8px 6px; border-radius: 9px; background: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--accent); color: var(--accent-text); }
.seg .cnt { opacity: .75; font-size: 12px; }

/* Kalender */
.calnav { display: flex; align-items: center; gap: 6px; margin: -2px 0 10px; }
.calnav b { flex: 1; text-align: center; font-size: 16px; }
.calnav button { font-size: 24px; padding: 2px 12px; }
.calnav button.small { font-size: 13px; }
.mcal-card { padding: 8px; }
.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mcal > b { font-size: 11px; color: var(--muted); text-align: center; font-weight: 600; padding: 2px 0 4px; }
.mcal > button { min-height: 56px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 4px 3px; border-radius: 8px; background: var(--bg); color: var(--text); border: 1px solid transparent; text-align: left; font-weight: 500; overflow: hidden; }
.mcal > button.other { opacity: .4; }
.mcal > button.today .num { background: var(--accent); color: var(--accent-text); border-radius: 999px; padding: 0 6px; }
.mcal > button.sel { border-color: var(--accent); }
.mcal > button.hol .num { color: var(--icon); font-weight: 700; }
.mcal .num { align-self: flex-start; font-size: 13px; line-height: 1.5; }
.mcal .evs { display: none; flex-direction: column; gap: 2px; min-width: 0; }
.evchip { display: block; font-size: 11px; line-height: 1.35; padding: 1px 4px; border-radius: 4px; background: color-mix(in srgb, var(--c, var(--accent)) 22%, transparent); border-left: 2px solid var(--c, var(--accent)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evchip.bd { --c: var(--icon); }
.evchip svg.i { width: 11px; height: 11px; color: var(--icon); vertical-align: -1px; }
.mcal .more { font-size: 11px; color: var(--muted); padding-left: 4px; }
.mcal .dots { display: flex; gap: 3px; flex-wrap: wrap; margin-top: auto; padding-left: 2px; }
.mcal .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.mcal .dots i.bd { background: none; border: 1.5px solid var(--icon); box-sizing: border-box; }
@media (min-width: 760px) {
  .mcal > button { min-height: 96px; }
  .mcal .evs { display: flex; }
  .mcal .dots { display: none; }
}
.dayhead { display: flex; align-items: baseline; gap: 10px; }
.dayhead button { padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.holname { font-size: 12px; font-weight: 500; color: var(--icon); text-transform: none; letter-spacing: 0; }
p.holname { margin: 0 0 8px; }
.none { margin: 2px 0 6px; }
.bdline svg.i { color: var(--icon); }
.weekgrid { display: grid; gap: 4px; }
.wday { padding: 2px 0 8px; border-bottom: 1px solid var(--line); }
.wday:last-child { border-bottom: 0; }
.wday.today .dayhead button { color: var(--accent); }
@media (min-width: 1000px) {
  .weekgrid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
  .wday { border-bottom: 0; border-right: 1px solid var(--line); padding-right: 8px; }
  .wday:last-child { border-right: 0; }
  .wday .list li { flex-wrap: wrap; }
}

/* Einstellungen: Uebersicht und Unterseiten */
.setnav { list-style: none; margin: 0; padding: 0; }
.setnav li + li { border-top: 1px solid var(--line); }
.setnav a { display: flex; align-items: center; gap: 14px; padding: 13px 4px; color: var(--text); text-decoration: none; }
.setnav .ico { color: var(--icon); display: flex; }
.setnav .ico svg.i { width: 24px; height: 24px; }
.setnav .grow { display: flex; flex-direction: column; gap: 1px; }
a.back { display: inline-block; margin-bottom: 6px; color: var(--accent); text-decoration: none; font-weight: 600; font-size: 15px; }
.setlink { display: inline-flex; align-items: center; gap: 8px; margin: 4px 2px 18px; color: var(--muted); text-decoration: none; font-size: 14px; }
.setlink svg.i { color: var(--icon); }
.center { text-align: center; }
.setnav .grow { flex: 1; }
/* Ueberschriften der Fitness-Karten */
h2.sect { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
h2.sect .small { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; }
.weekstrip button .num { font-size: 11px; font-weight: 500; color: var(--muted); }
.weekstrip button.today .num { color: var(--accent); font-weight: 700; }

/* Desktop zuerst: breiterer Inhalt auf grossen Bildschirmen */
@media (min-width: 1100px) { main { max-width: 1400px; padding: 20px 28px 32px; } }

/* Finanzen */
.fin-head { flex-wrap: wrap; gap: 12px; }
.fin-head .monthnav { margin: 0; }
.book .seg { margin-bottom: 14px; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg svg.i { width: 16px; height: 16px; }
.inrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inrow input { flex: 1; min-width: 150px; }
.splits { display: grid; gap: 8px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; }
.split { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: center; min-height: 40px; }
.split .check { margin: 0; }
.split input[hidden] { display: none; }
.foodline { margin: -2px 0 0; font-size: 15px; }
.foodline b { color: var(--text); }
.h2link { margin-left: auto; font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--accent); text-decoration: none; }
.card h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.catbars .progress { margin-top: 6px; }
.tablewrap { overflow-x: auto; margin: 0 -4px; }
.exptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.exptable th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.exptable td { padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.exptable td.what { white-space: normal; min-width: 160px; }
.exptable td.what svg.i { vertical-align: -.2em; margin-right: 4px; }
.exptable .num { text-align: right; font-variant-numeric: tabular-nums; }
.exptable tbody tr { cursor: pointer; }
.exptable tbody tr:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.exptable tfoot td { font-weight: 600; border-bottom: 0; padding-top: 10px; }
.stat svg.i { vertical-align: -.2em; }

/* MFA-Einrichtung: QR-Code */
.qrbox { display: flex; justify-content: center; margin: 4px 0 6px; }
.qrbox svg.qr { border-radius: 10px; background: #fff; max-width: 100%; height: auto; }
.login details { margin: 0 0 10px; }
.login details summary { cursor: pointer; color: var(--accent); }

/* Testumgebung (DEV): Banner, Schild, orange Kopfzeilen-Kante */
.envbar { background: repeating-linear-gradient(-45deg, #e86014 0 14px, #d4520c 14px 28px); color: #fff; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: .02em; padding: calc(4px + env(safe-area-inset-top)) 10px 4px; }
.env-test .top { border-bottom: 2px solid #e86014; padding-top: 8px; }
.envtag { display: inline-block; margin-left: 2px; padding: 1px 7px; border-radius: 6px; background: #e86014; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em; vertical-align: 2px; }
/* Sparen */
.savesum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.savesum > span { display: flex; flex-direction: column; gap: 2px; }
.savesum b { font-size: 17px; font-variant-numeric: tabular-nums; }
.book .seg button { font-size: 13px; padding: 8px 4px; }
.hoursbox[hidden] { display: none; }

/* Aufklappbare Karten (Fixkosten, Einnahmen): eingeklappt grobe Uebersicht */
details.fold { padding: 0; }
details.fold > summary { list-style: none; cursor: pointer; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 4px; }
details.fold > :not(summary) { margin-left: 14px; margin-right: 14px; }
details.fold > .foot { padding-bottom: 12px; }
.foldhead { display: flex; align-items: center; gap: 10px; }
.foldhead b { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.foldhead b svg.i { width: 16px; height: 16px; }
.foldsum { margin-left: auto; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.foldhead::after { content: '›'; color: var(--muted); font-size: 20px; line-height: 1; transition: transform .15s; }
details.fold[open] .foldhead::after { transform: rotate(90deg); }
.foldchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.fchip b { color: var(--text); font-variant-numeric: tabular-nums; }
.fchip svg.i { width: 13px; height: 13px; color: var(--icon); }
.book .recent { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.book .recent h3 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.book .recent .list li { padding: 7px 0; }

.foldsum.small { font-size: 13px; font-weight: 500; }
details.fold[open] .onlyclosed { display: none; }
details.fold.book > form, details.fold.book > .recent { padding-bottom: 14px; }
details.fold.book > .seg { margin-top: 10px; }
/* Finanzen: drei feste, voneinander unabhaengige Spalten (nichts ueber volle Breite).
   Aufklappen verschiebt nur, was in derselben Spalte darunter steht. */
.fin-cols { display: grid; gap: 0 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.fin-cols .card { margin-bottom: 10px; }
.fin-cols .stats { margin-bottom: 10px; }
.fin-cols .stats .card { margin-bottom: 0; }
.fin-sum .calc { margin-bottom: 0; }
.explist li { padding: 8px 0; }
.expsum { display: flex; justify-content: space-between; padding: 10px 0 4px; border-top: 1px solid var(--line); font-weight: 600; }
.expsum b { font-variant-numeric: tabular-nums; }
@media (min-width: 1000px) {
  .fin-cols { grid-template-columns: 400px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .fc1 { grid-column: 1; grid-row: 1; }
  .fc2 { grid-column: 2; grid-row: 1 / span 2; }
  .fc3 { grid-column: 1; grid-row: 2; }
}
@media (min-width: 1300px) {
  .fin-cols { grid-template-columns: 400px minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; }
  .fc1, .fc2, .fc3 { grid-row: 1; }
  .fc2 { grid-column: 2; } .fc3 { grid-column: 3; }
}
/* Startseite: Schnellbuchung im Begruessungsbereich */
.quickbtn { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; }
.quickbtn svg.i { width: 18px; height: 18px; }
#qb .seg { margin-bottom: 4px; }

/* Tagebuch: links Liste, rechts Eintrag (feste Spalten); Handy: Liste oder Eintrag */
.notes-cols { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.notes-cols.has-sel .notes-left { display: none; }
.notes-cols:not(.has-sel) .notes-right { display: none; }
.note-detail .back { display: inline-block; margin-bottom: 8px; }
.nd-head .grow { flex: 1; min-width: 0; }
@media (min-width: 1000px) {
  .notes-cols { grid-template-columns: 420px minmax(0, 1fr); max-width: 1300px; }
  .notes-cols.has-sel .notes-left, .notes-cols:not(.has-sel) .notes-right { display: block; }
  .note-detail .back { display: none; }
  .notes-right { position: sticky; top: 90px; }
}
.seg.wrap { flex-wrap: wrap; margin-bottom: 10px; }
.seg.wrap button { flex: 1 1 auto; font-size: 13px; }
.nsearch { width: 100%; margin-bottom: 10px; }
.notelist li { padding: 0; }
.notelist li.sel { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 10px; }
.noteitem { display: flex; align-items: center; gap: 10px; padding: 10px 6px; color: inherit; text-decoration: none; width: 100%; }
.noteitem .t svg.i { width: 14px; height: 14px; vertical-align: -.1em; }
.ntags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ntags span, .ntags button { font-size: 11px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.ntags button { cursor: pointer; }
.tag.st-active { --c: var(--accent); } .tag.st-paused { --c: var(--muted); } .tag.st-done { --c: #5fb38a; }
.note-empty { text-align: center; padding: 40px 20px; }
.note-empty svg.i { width: 36px; height: 36px; }
.nd-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.nd-head h2 { margin: 0; font-size: 20px; text-transform: none; letter-spacing: 0; color: var(--text); }
.nd-head .ico-l svg.i { width: 24px; height: 24px; }
.fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 12px 0; padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.fields dt { color: var(--muted); font-size: 13px; }
.fields dd { margin: 0; overflow-wrap: anywhere; }
.nbody { line-height: 1.6; margin: 12px 0; }
.nbody p { margin: 0 0 10px; }
.nlog { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; }
.nlog h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.logf { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; align-items: start; margin-bottom: 8px; }
@media (max-width: 640px) { .logf { grid-template-columns: 1fr; } }
.nlog .list li { align-items: flex-start; }
.ndocs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.ndoc { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); text-decoration: none; font-size: 14px; }
.ndoc:hover { border-color: var(--accent); }
.ndoc svg.i { width: 15px; height: 15px; }

/* Finanzen: Verlauf. Feste, geprueft farbenblind-taugliche Reihenfarben (nicht aus dem Design abgeleitet) */
:root { --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; }
[data-theme=space], [data-theme=orange], [data-theme=aurora] { --c1: #3987e5; --c2: #d95926; --c3: #199e70; }
.chartwrap { position: relative; }
.fchart { width: 100%; height: auto; display: block; }
.fchart .cg { stroke: var(--line); stroke-width: 1; }
.fchart .ct { fill: var(--muted); font-size: 11px; }
.fchart .cv { fill: var(--text); font-size: 11px; font-weight: 600; }
.fchart .c1 { fill: var(--c1); } .fchart .c2 { fill: var(--c2); } .fchart .c3 { fill: var(--c3); }
.fchart .cinc { stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.fchart .chit { fill: transparent; cursor: crosshair; }
.fchart g:hover .chit { fill: color-mix(in srgb, var(--text) 6%, transparent); }
.clegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.clegend span, .tipg span { display: inline-flex; align-items: center; gap: 6px; }
i.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
i.sw.c1 { background: var(--c1); } i.sw.c2 { background: var(--c2); } i.sw.c3 { background: var(--c3); }
i.sw.cinc { height: 2px; width: 12px; border-radius: 1px; background: var(--text); }
.charttip { position: absolute; z-index: 5; pointer-events: none; min-width: 170px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); font-size: 12px; }
.tipg { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; margin-top: 4px; color: var(--muted); }
.tipg b { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.ctable { margin-top: 6px; }
.ctable summary { cursor: pointer; }
.progress.ok > span { background: #2fbf71; }
/* Abgleich */
.reconlast { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.reconlast b { font-size: 24px; font-variant-numeric: tabular-nums; }
.warn { color: var(--warn, #d69e2e); }
[data-theme] .warn { color: #f0b44c; }
[data-theme=sky] .warn { color: #b7791f; }
.reconcalc { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.reconcalc .calc { margin: 0; }
.reconhist summary { cursor: pointer; margin: 4px 0; }
.balpair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.balpair > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.balpair b { font-size: 21px; font-variant-numeric: tabular-nums; }
.reconline { margin: 8px 0 0; }
