:root {
  --bg: #f4f2fb;
  --bg-2: #ebe7fa;
  --surface: #ffffff;
  --surface-2: #f7f6fc;
  --border: #e6e2f3;
  --text: #1b1830;
  --muted: #6d6a86;
  --faint: #9c99b3;
  --accent: #5b4bdb;
  --accent-2: #8a5cf6;
  --accent-soft: #ece9ff;
  --pos: #0f9f72;
  --pos-soft: #def6ec;
  --neg: #e0434b;
  --neg-soft: #fde6e7;
  --ferien: #0e9bb8;   --ferien-soft: #dcf4f9;
  --urlaub: #7c4ddb;   --urlaub-soft: #efe7fd;
  --krank: #d9534f;    --krank-soft: #fbe5e4;
  --feiertag: #c9870a; --feiertag-soft: #fcf0d6;
  --frei: #4a8f3c;     --frei-soft: #e6f3e1;
  --ausgleich: #c2457a; --ausgleich-soft: #fbe4ee;
  --shadow: 0 1px 2px rgba(40, 30, 90, .04), 0 8px 24px rgba(40, 30, 90, .06);
  --shadow-lg: 0 20px 60px rgba(40, 30, 90, .18);
  --radius: 20px;
  --radius-sm: 12px;
  --nav-h: 68px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0e17; --bg-2: #15132a; --surface: #1a1828; --surface-2: #221f33; --border: #2d2a42;
    --text: #f0eefa; --muted: #a6a3bf; --faint: #6f6c88; --accent: #8b7dff; --accent-2: #b28bff; --accent-soft: #29254a;
    --pos: #34d39d; --pos-soft: #143a2e; --neg: #ff6b72; --neg-soft: #3d1d22;
    --ferien: #3cc7e3; --ferien-soft: #123842; --urlaub: #b18cff; --urlaub-soft: #2e2350;
    --krank: #ff7f7a; --krank-soft: #3e2120; --feiertag: #f1b53c; --feiertag-soft: #3a2e12;
    --frei: #7ecb6c; --frei-soft: #1f3419; --ausgleich: #f07aac; --ausgleich-soft: #3c1d2b;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); --shadow-lg: 0 20px 60px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 100% -10%, var(--bg-2), transparent 60%), radial-gradient(900px 500px at -10% 110%, var(--bg-2), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.num, .tabular { font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; padding: 20px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); max-width: 1120px; margin: 0 auto; width: 100%; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.topbar h1 { font-size: 24px; margin: 0; letter-spacing: -.4px; }
.topbar .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.3px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px rgba(91, 75, 219, .35); flex: none; }
.brand-mark svg { width: 20px; height: 20px; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(4, 1fr);
}
.navbtn { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--faint); cursor: pointer; text-decoration: none; }
.navbtn svg { width: 22px; height: 22px; }
.navbtn.active { color: var(--accent); }
.navbtn.active .ico { background: var(--accent-soft); }
.navbtn .ico { padding: 4px 16px; border-radius: 99px; display: grid; place-items: center; transition: background .2s; }

@media (min-width: 900px) {
  .bottomnav { display: none; }
  .sidebar { display: flex; flex-direction: column; gap: 6px; width: 248px; flex: none; padding: 24px 16px; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 60%, transparent); }
  .sidebar .brand { padding: 4px 10px 22px; }
  .sidebar .navbtn { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: 14px; color: var(--muted); }
  .sidebar .navbtn .ico { padding: 0; background: none !important; }
  .sidebar .navbtn:hover { background: var(--surface-2); }
  .sidebar .navbtn.active { background: var(--accent-soft); color: var(--accent); }
  .sidebar .spacer { flex: 1; }
  .sidebar .me { font-size: 13px; color: var(--muted); padding: 10px 14px; border-top: 1px solid var(--border); overflow: hidden; text-overflow: ellipsis; }
  .main { padding: 32px 36px 48px; }
  .topbar h1 { font-size: 28px; }
}

.grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid.two { grid-template-columns: 1.1fr .9fr; align-items: start; } }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card h2 { font-size: 15px; margin: 0 0 14px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card h2 .hint { font-weight: 500; font-size: 12px; color: var(--muted); }
.card + .card { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.hero {
  position: relative; overflow: hidden; color: #fff; border: 0;
  background: linear-gradient(135deg, #4a3bd0 0%, #6a4ff0 50%, #9b5cf6 100%);
  box-shadow: 0 18px 40px rgba(91, 75, 219, .32);
}
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.09); }
.hero::before { width: 260px; height: 260px; right: -80px; top: -110px; }
.hero::after { width: 180px; height: 180px; right: 60px; bottom: -120px; }
.hero .label { font-size: 13px; opacity: .85; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; }
.hero .big { font-size: 54px; font-weight: 800; letter-spacing: -2px; line-height: 1.05; margin: 6px 0 4px; }
.hero .big small { font-size: 18px; font-weight: 600; letter-spacing: 0; opacity: .8; margin-left: 4px; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.hero .pill { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2); padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; backdrop-filter: blur(6px); }

/* ---------- Clock ---------- */
.clock { display: flex; align-items: center; gap: 18px; }
.clock .ring { width: 104px; height: 104px; flex: none; position: relative; }
.clock .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.clock .ring .val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-weight: 800; font-size: 19px; letter-spacing: -.5px; }
.clock .ring .val span { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.clock .info { flex: 1; min-width: 0; }
.clock .status { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.clock .status b { color: var(--text); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pos); margin-right: 6px; box-shadow: 0 0 0 0 var(--pos); animation: pulse 1.8s infinite; vertical-align: 1px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pos) 60%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 11px 16px; border-radius: var(--radius-sm); font-weight: 650; font-size: 14px; cursor: pointer; transition: transform .08s, background .2s, box-shadow .2s, opacity .2s; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: 0; box-shadow: 0 8px 20px rgba(91, 75, 219, .3); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.go { background: var(--pos); color: #fff; border: 0; box-shadow: 0 8px 20px color-mix(in srgb, var(--pos) 35%, transparent); }
.btn.stop { background: var(--neg); color: #fff; border: 0; box-shadow: 0 8px 20px color-mix(in srgb, var(--neg) 35%, transparent); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--neg); }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 15px 22px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn.icon { padding: 9px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.field small { color: var(--faint); font-size: 12px; }
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid var(--border); background: var(--surface-2); padding: 12px 14px; border-radius: var(--radius-sm); font-size: 15px; outline: none; transition: border .15s, box-shadow .15s, background .15s; min-height: 46px;
}
.input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.fields-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 10px; }
@media (max-width: 420px) { .fields-3 { grid-template-columns: 1fr 1fr; } }

.week-plan { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week-plan label { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.week-plan .input { text-align: center; padding: 10px 2px; font-size: 14px; font-weight: 650; }
@media (max-width: 480px) { .week-plan { grid-template-columns: repeat(4, 1fr); } }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 12px; border-radius: 9px; font-weight: 650; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; flex-direction: column; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); min-width: 92px; }
.chip span { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.chip b { font-size: 17px; letter-spacing: -.3px; }

.pos { color: var(--pos); }
.neg { color: var(--neg); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; letter-spacing: .1px; }
.badge.ferien { background: var(--ferien-soft); color: var(--ferien); }
.badge.urlaub { background: var(--urlaub-soft); color: var(--urlaub); }
.badge.krank { background: var(--krank-soft); color: var(--krank); }
.badge.holiday, .badge.feiertag { background: var(--feiertag-soft); color: var(--feiertag); }
.badge.frei { background: var(--frei-soft); color: var(--frei); }
.badge.ausgleich { background: var(--ausgleich-soft); color: var(--ausgleich); }
.badge.run { background: var(--pos-soft); color: var(--pos); }
.badge.diffpos { background: var(--pos-soft); color: var(--pos); }
.badge.diffneg { background: var(--neg-soft); color: var(--neg); }

/* ---------- Week strip ---------- */
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wday { border: 1px solid var(--border); background: var(--surface-2); border-radius: 14px; padding: 9px 4px 8px; text-align: center; cursor: pointer; transition: transform .1s, border .15s; position: relative; min-width: 0; }
.wday:hover { border-color: var(--accent); }
.wday .n { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.wday .d { font-size: 17px; font-weight: 800; margin: 1px 0 6px; }
.wday .bar { height: 34px; width: 8px; margin: 0 auto; border-radius: 6px; background: var(--border); position: relative; overflow: hidden; }
.wday .bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.wday .bar i.full { background: var(--pos); }
.wday .v { font-size: 11px; font-weight: 700; margin-top: 6px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wday.today { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.wday.t-ferien .bar i { background: var(--ferien); }
.wday.t-holiday .bar i, .wday.t-feiertag .bar i { background: var(--feiertag); }
.wday.t-urlaub .bar i { background: var(--urlaub); }
.wday.t-krank .bar i { background: var(--krank); }
.wday.t-frei .bar i { background: var(--frei); }
.wday.off { opacity: .65; }
.wday .dot { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; }

.progress { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.progress i.over { background: linear-gradient(90deg, var(--pos), #3fcf9c); }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.item:last-child { border-bottom: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 700; }
.item .s { font-size: 12.5px; color: var(--muted); }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); font-size: 14px; }
.empty .em { font-size: 32px; display: block; margin-bottom: 6px; }

/* Month table */
.month { display: flex; flex-direction: column; gap: 14px; }
.mweek { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.mweek-h { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12.5px; font-weight: 700; color: var(--muted); gap: 8px; flex-wrap: wrap; }
.mweek-h b { color: var(--text); }
.mday { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 10px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.mday:last-child { border-bottom: 0; }
.mday:hover { background: var(--surface-2); }
.mday .dt { line-height: 1.1; }
.mday .dt b { font-size: 17px; display: block; }
.mday .dt span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.mday .mid { min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.mday .ist { font-weight: 700; text-align: right; font-size: 14px; }
.mday .ist small { display: block; font-size: 11px; color: var(--faint); font-weight: 600; }
.mday .df { min-width: 58px; text-align: right; font-weight: 750; font-size: 13.5px; }
.mday.off { opacity: .55; }
.mday.out { display: none; }
.mday.today { box-shadow: inset 3px 0 0 var(--accent); }
.mday.weekend .dt b { color: var(--faint); }

/* ---------- Sheet / Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 12, 40, .45); backdrop-filter: blur(3px); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 24px 24px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); animation: up .25s cubic-bezier(.2,.9,.25,1); }
.sheet .grab { width: 40px; height: 5px; border-radius: 9px; background: var(--border); margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.3px; }
.sheet .sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
@media (min-width: 700px) { .overlay { align-items: center; } .sheet { border-radius: 24px; padding: 24px 26px; } .sheet .grab { display: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

.entry-edit { border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin-bottom: 10px; background: var(--surface-2); }
.entry-edit .fields-3, .entry-edit .fields-2 { gap: 0 8px; }
.entry-edit .field { margin-bottom: 8px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 420px; }
.toast { background: var(--text); color: var(--surface); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); animation: up .25s ease; text-align: center; }
.toast.err { background: var(--neg); color: #fff; }
@media (min-width: 900px) { .toasts { bottom: 28px; } }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-wrap { width: 100%; max-width: 980px; display: grid; gap: 0; background: var(--surface); border-radius: 28px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--border); }
@media (min-width: 860px) { .auth-wrap { grid-template-columns: 1fr 1fr; } }
.auth-art { background: linear-gradient(150deg, #3d2fc4 0%, #6a4ff0 55%, #a45cf6 100%); color: #fff; padding: 36px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 220px; }
.auth-art::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.07); right: -170px; bottom: -190px; }
.auth-art::after { content: ''; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.08); left: -50px; top: 40%; }
.auth-art .brand { color: #fff; position: relative; z-index: 1; }
.auth-art .brand-mark { background: rgba(255,255,255,.18); box-shadow: none; }
.auth-art h2 { font-size: 30px; line-height: 1.15; letter-spacing: -.8px; margin: 28px 0 12px; position: relative; z-index: 1; }
.auth-art p { opacity: .85; margin: 0; position: relative; z-index: 1; max-width: 360px; }
.auth-art ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; position: relative; z-index: 1; font-size: 14px; }
.auth-art li { display: flex; gap: 10px; align-items: center; }
.auth-art li i { width: 24px; height: 24px; border-radius: 8px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-style: normal; font-size: 13px; flex: none; }
@media (max-width: 859px) { .auth-art ul, .auth-art p { display: none; } .auth-art h2 { font-size: 24px; margin: 18px 0 0; } .auth-art { min-height: 0; padding: 26px; } }
.auth-form { padding: 32px 28px 36px; }
@media (min-width: 860px) { .auth-form { padding: 48px 44px; } }
.auth-form h3 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.5px; }
.auth-form .sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.linkbtn { background: none; border: 0; color: var(--accent); font-weight: 650; cursor: pointer; padding: 0; font-size: inherit; }
.notice { padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); color: var(--text); font-size: 14px; margin-bottom: 16px; }
.notice.ok { background: var(--pos-soft); }
.notice.err { background: var(--neg-soft); color: var(--neg); }
.mail-art { font-size: 54px; text-align: center; margin: 6px 0 12px; }
.pw { position: relative; }
.pw .input { padding-right: 48px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--faint); cursor: pointer; padding: 8px; }

/* ---------- Onboarding ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 22px; }
.steps i { flex: 1; height: 5px; border-radius: 9px; background: var(--border); }
.steps i.on { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.preset { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface-2); cursor: pointer; width: 100%; text-align: left; margin-bottom: 10px; }
.preset.on { border-color: var(--accent); background: var(--accent-soft); }
.preset b { display: block; }
.preset span { color: var(--muted); font-size: 13px; }
.preset .em { font-size: 24px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 40vh auto 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--border); transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(18px); }

hr.sep { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

/* ---------- Print ---------- */
.print-only { display: none; }
@media print {
  body { background: #fff !important; color: #000; font-size: 11px; }
  .sidebar, .bottomnav, .no-print, .toasts { display: none !important; }
  .main { padding: 0; max-width: none; }
  .print-only { display: block; }
  .card, .mweek { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .mday { padding: 5px 10px; grid-template-columns: 44px 1fr auto auto; }
  .mday.out { display: none; }
}
