:root {
  /* Ruhiger Papier-Hintergrund, weiße Karten; Grün & Koralle als Akzente */
  --bg: #f1efea;
  --card: #ffffff;
  --ink: #1d1b18;
  --muted: #6f6a62;
  --line: #e3dfd7;
  --soft: #ebe7df;
  --brand: #12a37a;      /* Grün */
  --brand-ink: #ffffff;
  --brand-2: #ef5b3f;    /* Koralle */
  --sun: #ffb81c;        /* Sonnengelb */
  --both: #6c5ce7;
  --alarm: #e8412c;
  --alarm-bg: #ffece6;
  --warn: #d98500;
  --warn-bg: #fff3d6;
  --ok: #12a37a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(30, 25, 15, .05), 0 4px 14px rgba(30, 25, 15, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16130f; --card: #221e19; --ink: #f6efe5; --muted: #a99c8c; --line: #362f27; --soft: #2b2520;
    --brand: #3fd1a1; --brand-ink: #0d1f19; --brand-2: #ff7b5c; --sun: #ffc94a; --both: #9d8cff;
    --alarm: #ff6a52; --alarm-bg: #3b1c16; --warn: #ffbf47; --warn-bg: #3a2b12; --ok: #3fd1a1;
    --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  padding: env(safe-area-inset-top) 0 calc(84px + env(safe-area-inset-bottom));
  min-height: 100vh;
}
main { max-width: 620px; margin: 0 auto; padding: 12px 16px 24px; }
h1 { font-size: 28px; letter-spacing: -.02em; margin: 14px 0 4px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 26px 0 8px; font-weight: 650; }
p { margin: 6px 0; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.row { display: flex; gap: 8px; align-items: center; }
.spread { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* Kopf */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.who { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* Karten */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.card + .card { margin-top: 10px; }

/* Heute-Banner */
.todaybox { border-radius: var(--radius); padding: 16px; margin-top: 12px; border: 2px solid var(--line); background: var(--card); }
.todaybox.alert { border-color: var(--alarm); background: var(--alarm-bg); }
.todaybox.alert .tb-title { color: var(--alarm); }
.tb-title { font-weight: 800; font-size: 18px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.tb-list { margin: 8px 0 0; padding: 0; list-style: none; }
.tb-list li { padding: 6px 0; border-top: 1px dashed var(--line); display: flex; gap: 10px; align-items: baseline; }
.tb-list li:first-child { border-top: 0; }
.tb-time { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 68px; }
.tb-allday { font-size: 11px; font-weight: 800; letter-spacing: .06em; background: var(--alarm); color: #fff; border-radius: 6px; padding: 2px 6px; min-width: auto; }

/* Hinweis-Chips (Offen) */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-weight: 650; font-size: 14px; text-decoration: none; border: 1px solid transparent; }
.chip.red { background: var(--alarm-bg); color: var(--alarm); }

/* Wochenleiste */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 16px; }
.wd { text-align: center; padding: 6px 0 8px; border-radius: 12px; text-decoration: none; }
.wd .n { font-weight: 700; font-size: 17px; }
.wd .l { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.wd.today { background: var(--ink); color: var(--bg); }
.wd.today .l { color: inherit; opacity: .7; }
.wd .marks { display: flex; gap: 3px; justify-content: center; height: 6px; margin-top: 4px; }
.wd .marks i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.wd .marks i.full { width: 16px; border-radius: 3px; background: var(--alarm); }

/* Agenda */
.day { margin-top: 18px; }
.day-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.day-h b { font-size: 16px; }
.day-h span { color: var(--muted); font-size: 14px; }
.day-h.is-today b { color: var(--alarm); }

.ev { display: flex; gap: 12px; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 12px 0; text-decoration: none; box-shadow: var(--shadow); position: relative; }
.ev + .ev { margin-top: 8px; }
.ev .bar { width: 5px; border-radius: 0 4px 4px 0; flex: none; }
.ev .when { min-width: 50px; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; padding-top: 1px; }
.ev .when small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.ev .body { flex: 1; min-width: 0; }
.ev .t { font-weight: 650; overflow-wrap: anywhere; }
.ev .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ev.allday { border: 2px solid var(--alarm); background: var(--alarm-bg); }
.ev.allday .when { color: var(--alarm); font-size: 11px; letter-spacing: .05em; font-weight: 800; padding-top: 4px; }
.ev.proposed { border-style: dashed; border-width: 2px; border-color: var(--warn); background: var(--warn-bg); }
.ev.declined { opacity: .55; }
.ev.declined .t { text-decoration: line-through; }
.ev.unseen::after { content: "NEU"; position: absolute; top: -7px; right: 10px; background: var(--alarm); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 2px 7px; border-radius: 999px; }

.tag { font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.tag.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid currentColor; }
.tag.red { background: var(--alarm); color: #fff; }
.tag.ok { color: var(--ok); }
.tag.person { color: #fff; }

/* Formulare */
label.f { display: block; margin-top: 16px; font-weight: 650; font-size: 14px; }
label.f > span.hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=search], input[type=password], input[type=email], input[type=date], input[type=time], input[type=number], textarea, select {
  width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; appearance: none; -webkit-appearance: none; min-height: 48px;
}
input:focus, textarea:focus { outline: none; border-color: var(--ink); }
textarea { min-height: 80px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: flex; margin-top: 6px; background: var(--soft); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; padding: 10px 6px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.toggle { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.toggle input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.toggle b { display: block; }
.toggle.on-warn:has(input:checked) { border-color: var(--warn); background: var(--warn-bg); }
.toggle.on-red:has(input:checked) { border-color: var(--alarm); background: var(--alarm-bg); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quick button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 14px 18px; font: inherit; font-weight: 700; cursor: pointer; background: var(--ink); color: var(--bg); text-decoration: none; min-height: 50px; }
.btn.block { width: 100%; margin-top: 18px; }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn.yes { background: var(--ok); color: #fff; }
.btn.no { background: var(--alarm); color: #fff; }
.btn.small { padding: 8px 12px; min-height: 38px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .5; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.err { color: var(--alarm); font-weight: 600; margin-top: 12px; }

/* Detail */
.detail-when { font-size: 18px; font-weight: 650; margin-top: 4px; }
.status { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; margin-top: 12px; font-weight: 600; }
.status.warn { background: var(--warn-bg); color: var(--warn); }
.status.red { background: var(--alarm-bg); color: var(--alarm); }
.status.ok { background: var(--soft); color: var(--ok); }
.comments { margin-top: 10px; }
.cm { padding: 10px 12px; border-radius: 12px; background: var(--soft); margin-top: 8px; max-width: 88%; }
.cm.mine { margin-left: auto; background: var(--card); border: 1px solid var(--line); }
.cm small { color: var(--muted); display: block; font-size: 12px; }

/* Offen */
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.empty .big { font-size: 42px; }

/* Tableiste */
#tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: center; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 10; }
#tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; text-decoration: none; font-size: 11px; color: var(--muted); min-width: 60px; padding: 4px 0; }
#tabbar a .ico { font-size: 20px; filter: grayscale(1); opacity: .7; }
#tabbar a.on { color: var(--ink); font-weight: 700; }
#tabbar a.on .ico { filter: none; opacity: 1; }
#tabbar a.add span { width: 52px; height: 52px; border-radius: 18px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 28px; font-weight: 400; margin-top: -18px; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.badge { position: absolute; top: -2px; right: 10px; background: var(--alarm); color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px; }
.badge[hidden] { display: none; }
#tabbar[hidden], #alarm[hidden], #toast[hidden] { display: none; }

/* ACHTUNG-Alarm (Vollbild) */
#alarm { position: fixed; inset: 0; z-index: 50; background: var(--alarm); color: #fff; display: flex; flex-direction: column; padding: calc(28px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; animation: pop .25s ease-out; }
#alarm[hidden] { display: none; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
#alarm .al-k { font-size: 13px; letter-spacing: .14em; font-weight: 800; opacity: .85; }
#alarm h1 { font-size: 40px; line-height: 1.05; margin: 8px 0 18px; }
#alarm ul { list-style: none; padding: 0; margin: 0; flex: 1; }
#alarm li { background: rgba(255,255,255,.14); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; }
#alarm li b { display: block; font-size: 20px; }
#alarm li .w { font-weight: 800; font-size: 13px; letter-spacing: .06em; opacity: .9; }
#alarm li .task { margin-top: 6px; font-weight: 650; }
#alarm li .task.open { background: #fff; color: var(--alarm); display: inline-block; padding: 2px 10px; border-radius: 8px; }
#alarm .al-tomorrow { margin-top: 8px; opacity: .9; font-size: 15px; }
#alarm button { margin-top: 16px; width: 100%; min-height: 60px; border: 0; border-radius: 18px; background: #fff; color: var(--alarm); font: inherit; font-size: 19px; font-weight: 800; cursor: pointer; }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 600; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }

.login { max-width: 400px; margin: 8vh auto 0; }
.logo { font-size: 44px; }
.install-hint { border: 2px dashed var(--warn); background: var(--warn-bg); }
code { background: var(--soft); padding: 2px 6px; border-radius: 6px; font-size: 13px; word-break: break-all; }

/* Mehrere Personen */
.who.wrap { flex-wrap: wrap; gap: 6px 14px; }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 72px; }
.people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pp { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.pp.off { opacity: .55; }
.prow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.prow:first-child { border-top: 0; padding-top: 0; }
.prow .dot { width: 14px; height: 14px; }
.pmenu { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px 26px; }
.addp { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; }
.cm small .dot { vertical-align: 0; }

/* ---------- Handy-Optimierungen ---------- */
h1 { font-size: clamp(24px, 7vw, 28px); overflow-wrap: anywhere; }
.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
input, textarea, select { min-width: 0; max-width: 100%; }
input[type=date], input[type=time] { display: block; }
@media (max-width: 420px) { .two.stack-sm { grid-template-columns: 1fr; gap: 0; } }
.tag { white-space: normal; overflow-wrap: anywhere; max-width: 100%; line-height: 1.35; }
.ev { gap: 10px; }
.ev .when { width: 64px; min-width: 64px; flex: none; }
.ev .ad { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .03em; color: #fff; background: var(--alarm); border-radius: 5px; padding: 3px 5px; line-height: 1.2; }
.ev .ad.cont { background: var(--muted); }
.ev.allday .when { padding-top: 1px; }
.ev .t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.quick button { min-height: 40px; }
.seg button { min-height: 40px; }
.tb-list li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; }
.tb-time { min-width: 0; padding-top: 1px; }
.tb-allday { font-size: 9.5px; letter-spacing: .03em; padding: 3px 5px; display: inline-block; line-height: 1.2; }
.tb-ev { text-decoration: none; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tb-t { font-weight: 650; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.tb-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.dt-title { display: flex; gap: 10px; align-items: center; }
.dt-title .dot { flex: none; }
.detail-when { font-size: 17px; }
.actions .btn { min-width: 0; padding-left: 10px; padding-right: 10px; }
.prow .grow { min-width: 0; }
.prow .btn.small { flex: none; }
@media (max-width: 360px) {
  main { padding-left: 12px; padding-right: 12px; }
  #tabbar a { min-width: 52px; }
  .ev .when { width: 60px; min-width: 60px; font-size: 14px; }
  .week { gap: 2px; }
}

/* ---------- Kinder & Haustiere ---------- */
.mtag { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 1px 9px 1px 4px; border-radius: 999px;
  background: color-mix(in srgb, var(--mc) 18%, var(--card)); color: color-mix(in srgb, var(--mc) 72%, var(--ink)); border: 1.5px solid color-mix(in srgb, var(--mc) 55%, transparent); white-space: nowrap; }
.mtag .me { font-size: 13px; line-height: 1; }
.mtag.big { font-size: 14px; padding: 4px 12px 4px 6px; }
.mtag.big .me { font-size: 16px; }
.lg-m { color: color-mix(in srgb, var(--mc) 70%, var(--ink)); font-weight: 600; }
.mav { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; flex: none;
  background: color-mix(in srgb, var(--mc) 22%, var(--card)); border: 2px solid var(--mc); }
.mpick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mpick button { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 6px 14px 6px 8px; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.mpick button .me { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--mc) 20%, var(--card)); font-size: 16px; }
.mpick button.on { background: color-mix(in srgb, var(--mc) 20%, var(--card)); border-color: var(--mc); color: color-mix(in srgb, var(--mc) 70%, var(--ink)); }
.mpick button.on::after { content: "✓"; font-weight: 800; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pick.emo button { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 22px; cursor: pointer; }
.pick.emo button.on { border-color: var(--ink); background: var(--soft); }
.pick.col button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.pick.col button.on { box-shadow: 0 0 0 3px var(--ink); }
#alarm .al-m { display: inline-block; font-size: 15px; background: #fff; color: color-mix(in srgb, var(--mc) 80%, #000); border-radius: 999px; padding: 1px 10px; margin-right: 8px; vertical-align: 3px; font-weight: 800; }

/* ---------- Frische Farben ---------- */
:root { --glow1: transparent; --glow2: transparent; }
@media (prefers-color-scheme: dark) { :root { --glow1: #3a2316; --glow2: #0f2f27; } }
body { background:
  radial-gradient(900px 340px at -10% -8%, var(--glow1) 0%, transparent 62%),
  radial-gradient(800px 320px at 110% -6%, var(--glow2) 0%, transparent 60%),
  var(--bg); background-repeat: no-repeat; }
.btn { background: var(--brand); color: var(--brand-ink); box-shadow: 0 2px 10px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn.ghost { background: var(--soft); color: var(--ink); box-shadow: none; }
.btn.yes { background: var(--ok); color: var(--brand-ink); }
.btn.no { background: var(--alarm); color: #fff; box-shadow: none; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.toggle input, .switch input { accent-color: var(--brand); }
.seg button.on { color: var(--ink); }
.wd.today { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 35%, transparent); }
.wd.today .l { opacity: .85; }
.ev.unseen::after { background: var(--brand-2); }
.chip { border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.chip.red { border-color: color-mix(in srgb, var(--alarm) 25%, transparent); }
#tabbar a.on { color: var(--brand); }
#tabbar a.add span { background: linear-gradient(135deg, #ff8a5c, #ec4d3a); color: #fff; box-shadow: 0 6px 18px rgba(236, 77, 58, .38); }
.badge { background: var(--brand-2); }
.status.ok { background: color-mix(in srgb, var(--ok) 14%, var(--card)); }
.empty .big img { width: 64px; height: 64px; }

/* Kopfzeile mit Logo */
#apphead { max-width: 620px; margin: 0 auto; padding: 12px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#apphead .brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
#apphead .brand img { width: 34px; height: 34px; }
#apphead .crew { display: flex; }
#apphead .crew span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; border: 2px solid var(--bg); margin-left: -6px; }
#apphead[hidden] { display: none; }
.login .logo img { width: 84px; height: 84px; }
.login h1 { font-size: 32px; }

/* ---------- Kalender: Ansichten ---------- */
.viewseg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--soft); border-radius: 14px; padding: 4px; margin-top: 10px; }
.viewseg a { text-align: center; text-decoration: none; padding: 9px 4px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); min-height: 40px; display: grid; place-items: center; }
.viewseg a.on { background: var(--card); color: var(--brand); box-shadow: var(--shadow); }
.calnav { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; }
.calnav .nb { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; text-decoration: none; font-size: 26px; line-height: 1; background: var(--card); border: 1px solid var(--line); color: var(--ink); padding-bottom: 3px; }
.calnav .ct { flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; }
.calnav .ct b { font-size: 20px; letter-spacing: -.01em; }
.calnav .ct span { font-size: 13px; color: var(--muted); }
.calnav .todaybtn { align-self: center; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--brand); text-decoration: none; padding: 3px 12px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--brand) 45%, transparent); background: var(--card); }
.daystrip { margin-top: 4px; }
.daystrip .wd.sel:not(.today) { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--card); }

/* Tag */
.allday-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.adh { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--alarm); padding: 0 4px; }
.tl-scroll { max-height: calc(100vh - 330px); min-height: 280px; overflow-y: auto; margin-top: 10px; padding-top: 10px; border-radius: 12px; overscroll-behavior: contain; }
.timeline { position: relative; }
.timeline .hr { position: absolute; left: 0; right: 0; height: 56px; border-top: 1px dashed var(--line); text-decoration: none; }
.timeline .hr span { position: absolute; top: -9px; left: 0; width: 44px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg); padding-right: 4px; font-variant-numeric: tabular-nums; }
.timeline .hr:active { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.tl-events { position: absolute; left: 50px; right: 0; top: 0; bottom: 0; pointer-events: none; }
.tl-ev { position: absolute; pointer-events: auto; text-decoration: none; overflow: hidden; border-radius: 10px; padding: 5px 8px; font-size: 13px; line-height: 1.25;
  background: color-mix(in srgb, var(--ec) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--ec) 35%, transparent); border-left: 4px solid var(--ec); box-shadow: var(--shadow); }
.tl-ev b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: color-mix(in srgb, var(--ec) 45%, var(--ink)); }
.tl-ev span { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-ev.short { padding-top: 3px; }
.tl-ev.short span { display: none; }
.tl-ev.proposed { border-style: dashed; border-left-style: solid; }
.tl-ev.unseen { box-shadow: var(--shadow), inset 0 0 0 1.5px color-mix(in srgb, var(--brand-2) 60%, transparent); }
.nowline { position: absolute; left: 46px; right: 0; height: 2px; background: var(--alarm); z-index: 2; pointer-events: none; }
.nowline::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--alarm); }

/* Woche */
.weeklist { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.wday { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px 8px 8px; }
.wday.weekend { background: color-mix(in srgb, var(--soft) 55%, var(--card)); }
.wday.today { border: 2px solid var(--brand); }
.wdh { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-decoration: none; padding-top: 2px; }
.wdh .l { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.wdh .n { font-size: 22px; font-weight: 800; line-height: 1.1; }
.wday.today .wdh .n { color: var(--brand); }
.wde { display: flex; flex-direction: column; gap: 5px; min-width: 0; justify-content: center; }
.free { color: var(--muted); font-size: 14px; text-decoration: none; padding: 8px 4px; }
.mini { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 7px 10px; border-radius: 10px; min-height: 40px;
  background: color-mix(in srgb, var(--ec) 12%, var(--card)); border-left: 4px solid var(--ec); }
.mini .mw { font-size: 13px; font-weight: 800; min-width: 44px; font-variant-numeric: tabular-nums; flex: none; }
.mini.ad .mw { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--alarm); }
.mini .mt { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.mini .mm { display: inline-block; font-size: 12px; font-weight: 700; padding: 0 7px; margin-right: 5px; border-radius: 999px; background: color-mix(in srgb, var(--mc) 22%, var(--card)); color: color-mix(in srgb, var(--mc) 70%, var(--ink)); }
.mini .mq { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--warn); }
.mini.proposed { outline: 1.5px dashed var(--warn); outline-offset: -1.5px; }
.mini.unseen .mt::after { content: "neu"; display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--brand-2); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .04em; vertical-align: 2px; text-transform: uppercase; }

/* Monat */
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mgrid.head { margin-top: 6px; }
.mgrid.head span { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.mc { min-height: 62px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 4px 3px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.mc .dn { font-size: 13px; font-weight: 700; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; align-self: center; }
.mc.today .dn { background: var(--brand); color: var(--brand-ink); }
.mc.sel { outline: 2px solid var(--brand); outline-offset: -2px; }
.mc.out { opacity: .4; }
.mc.hasad { background: color-mix(in srgb, var(--alarm) 7%, var(--card)); }
.pills { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pill { display: block; font-size: 10.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 4px; padding: 0 3px;
  background: color-mix(in srgb, var(--ec) 22%, var(--card)); border-left: 3px solid var(--ec); }
.pill.ad { background: var(--ec); color: #fff; border-left: 0; }
.mc .more { font-size: 10px; color: var(--muted); text-align: center; font-weight: 700; }
.msel { margin-top: 16px; }
@media (max-width: 520px) {
  .pill { font-size: 0; height: 6px; padding: 0; border-left: 0; border-radius: 3px; background: var(--ec); }
  .pill.ad { height: 8px; }
  .mc { min-height: 54px; padding: 4px 4px; }
}

/* ---------- Farbwahl & Symbole ---------- */
.pick.col { gap: 10px; }
.pick.col button { width: 40px; height: 40px; position: relative; display: grid; place-items: center; padding: 0; }
.pick.col button.on::after { content: "✓"; color: #fff; font-weight: 900; font-size: 18px; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.pick.col button.taken { opacity: .28; cursor: not-allowed; box-shadow: 0 0 0 1.5px var(--line); }
.pick.col button.taken span { color: #fff; font-size: 13px; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.pick-hint { margin: 8px 0 0; }
.pick-hint:empty { display: none; }
.emo-prev { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 30px; background: var(--soft); border: 1.5px solid var(--line); }
.emo-tabs { margin-top: 8px; }
.tones { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tones button { width: 44px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 20px; cursor: pointer; padding: 0; }
.tones button.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--card)); }
.pick.emo button { width: 46px; height: 46px; font-size: 26px; padding: 0; }
.pick.emo button.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--card)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 40%, transparent); }

/* ---------- Wiederkehrende Termine ---------- */
.recbox { margin-top: 16px; padding: 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; }
.recrow { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 600; }
.recrow input { width: 76px; margin: 0; text-align: center; }
.wdpick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-top: 12px; }
.wdpick button { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font: inherit; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; padding: 0; }
.wdpick button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.recbox input[name=rec_until] { margin-top: 8px; }
.recsum { margin: 12px 0 0; font-weight: 700; color: var(--brand); }
.recsum:empty { display: none; }
.recline { margin-top: 6px; color: var(--brand); font-size: 15px; }
.tag.rec { background: color-mix(in srgb, var(--brand) 12%, var(--card)); color: color-mix(in srgb, var(--brand) 75%, var(--ink)); }
.mini .mr { flex: none; font-size: 12px; opacity: .75; }
.choice { margin-top: 14px; padding: 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.choice .btn.block { margin-top: 10px; }
.daychips { margin: 2px 0 10px; padding: 2px 0 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.daychips::-webkit-scrollbar { display: none; }
.daychips .chip { flex: none; white-space: nowrap; padding: 6px 11px; font-size: 13px; }

/* ---------------------------------------------------------------- Heute: Tagesüberblick */
.hello { margin: 4px 0 12px; }
.hello .hi { font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.hello .hd { color: var(--muted); font-weight: 600; margin-top: 2px; }
.herobox { border-radius: var(--radius); padding: 14px 16px; background: color-mix(in srgb, var(--brand) 12%, var(--card));
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.herobox.alert { background: var(--alarm-bg); border-color: color-mix(in srgb, var(--alarm) 35%, transparent); }
.herobox.calm { background: color-mix(in srgb, var(--sun) 16%, var(--card)); border-color: color-mix(in srgb, var(--sun) 40%, transparent); }
.hh { font-size: 17px; font-weight: 650; line-height: 1.35; }
.hfacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hf { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.hf.red { color: var(--alarm); border-color: color-mix(in srgb, var(--alarm) 35%, transparent); }
.hf.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.hprog { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 10%, transparent); margin-top: 12px; overflow: hidden; }
.hprog i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--sun)); }
.hprog-l { font-size: 12.5px; color: var(--muted); margin-top: 5px; font-weight: 600; }
.nextcard { display: block; margin-top: 10px; padding: 12px 14px; border-radius: var(--radius); text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--ec, var(--brand)) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--ec, var(--brand)) 35%, transparent);
  border-left: 5px solid var(--ec, var(--brand)); box-shadow: var(--shadow); }
.nextcard.done { --ec: var(--ok); }
.nextcard > span { display: block; }
.nextcard .nt .mtag { vertical-align: 2px; margin-right: 6px; }
.nextcard .nk { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: color-mix(in srgb, var(--ec, var(--brand)) 60%, var(--ink)); }
.nextcard .nt { font-size: 18px; font-weight: 750; margin-top: 3px; overflow-wrap: anywhere; }
.nextcard .nw { font-size: 14px; color: var(--muted); margin-top: 3px; font-weight: 600; }
.h2sub { text-transform: none; letter-spacing: 0; font-weight: 600; margin-left: 4px; }
.tasklist { display: flex; flex-direction: column; gap: 8px; }
.taskrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--line); border-left: 4px solid var(--ec); }
.taskrow.open { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); border-left-color: var(--warn); }
.tr-main { flex: 1; min-width: 0; text-decoration: none; color: var(--ink); }
.tr-main b, .tr-main span { display: block; overflow-wrap: anywhere; }
.tr-main span { font-size: 13px; color: var(--muted); margin-top: 1px; }
.taskrow .btn, .taskrow .tag { flex: none; }
.daylist { display: flex; flex-direction: column; gap: 6px; }
.dl.past { opacity: .5; }
.dl.past .mt { text-decoration: line-through; text-decoration-thickness: 1px; }
.dl.now .mini { box-shadow: 0 0 0 2px var(--ec, var(--brand)); }
.small-empty { padding: 18px 10px; }
.small-empty .big { font-size: 34px; }
.small-empty p { margin: 6px 0 12px; }
.nextstrip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ns-day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 2px; border-radius: 12px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); color: var(--ink); min-width: 0; }
.ns-day .l { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.ns-day .n { font-size: 18px; font-weight: 800; }
.ns-day .c { font-size: 12px; color: var(--muted); font-weight: 700; }
.ns-day .marks { display: flex; gap: 3px; height: 6px; margin-top: 2px; }
.ns-day .marks i { width: 6px; height: 6px; border-radius: 50%; }
.ns-day.ad { border-color: color-mix(in srgb, var(--alarm) 45%, transparent); background: var(--alarm-bg); }

/* ---------------------------------------------------------------- Andere Kalender (Import & Export) */
.tag.feed { background: color-mix(in srgb, var(--both) 14%, var(--card)); color: color-mix(in srgb, var(--both) 75%, var(--ink)); }
.status.feedbox { display: block; background: color-mix(in srgb, var(--both) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--both) 30%, transparent); color: var(--ink); font-weight: 500; }
.small-link { margin-top: 12px; font-size: 14px; min-height: 44px; }
.linkcard { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.linkcard .lc-ico { font-size: 24px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--soft); flex: none; }
.linkcard b, .linkcard .muted { display: block; }
.linkcard .chev { font-size: 26px; color: var(--muted); line-height: 1; }
.conn-tabs { margin: 14px 0 4px; }
.feed + .feed { margin-top: 10px; }
.fd-who { gap: 5px; margin-top: 8px; }
.fd-state { margin-top: 10px; font-size: 13.5px; font-weight: 650; overflow-wrap: anywhere; }
.fd-state.good { color: var(--ok); }
.fd-state.bad { color: var(--alarm); }
.fd-act { gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.fd-form:not(:empty) { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.fd-url { overflow-wrap: anywhere; margin: 4px 0 0; font-size: 12px; }
#fform { margin-top: 12px; }
.filepick { display: block; position: relative; margin-top: 4px; padding: 16px; border: 2px dashed var(--line); border-radius: 14px; text-align: center; font-weight: 650; color: var(--muted); cursor: pointer; overflow-wrap: anywhere; }
.filepick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.filepick:focus-within { border-color: var(--brand); color: var(--ink); }
.exp-btns { display: grid; gap: 8px; margin-top: 14px; }
.exp-btns .btn { justify-content: flex-start; min-height: 48px; padding: 10px 14px; }
.xb { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: #1a73e8; flex: none; }
.xb.ol { background: #0f6cbd; }
.xb.ap { background: var(--soft); font-size: 15px; }
.linkbox { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.linkbox code { flex: 1; min-width: 0; font-size: 12px; padding: 10px; border-radius: 10px; background: var(--soft); overflow-wrap: anywhere; word-break: break-all; max-height: 4.6em; overflow: hidden; }
.linkbox .btn { flex: none; }
details.howto { margin-top: 10px; padding: 12px 16px; }
details.howto summary, .howto-in summary { font-weight: 700; cursor: pointer; }
details.howto ol { padding-left: 20px; margin: 10px 0 4px; }
details.howto ol li + li { margin-top: 4px; }
.howto-in { margin-top: 10px; padding: 10px 12px; background: var(--soft); border-radius: 12px; }
.howto-in summary { font-size: 14px; color: var(--brand); }
.howto-in p { margin: 8px 0 0; }
.calfound { display: grid; gap: 8px; margin-top: 6px; }
.cf { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; }
.cf input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.cf b, .cf .muted { display: block; overflow-wrap: anywhere; }
.cf:has(input:disabled) { opacity: .55; }
/* Schnellauswahl ganze Familie */
.quickall { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.quickall button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px dashed color-mix(in srgb, var(--both) 45%, var(--line)); background: var(--card); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 650; cursor: pointer; }
.quickall button.on { border-style: solid; border-color: var(--both); background: color-mix(in srgb, var(--both) 14%, var(--card)); color: color-mix(in srgb, var(--both) 70%, var(--ink)); }
/* Geräte mit Benachrichtigungen */
.devs { display: grid; gap: 6px; }
.dev { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.dev .di { font-size: 20px; line-height: 1.2; flex: none; }
.dev b { margin-right: 4px; }
.dev .muted, .dev .dr { display: block; overflow-wrap: anywhere; }
.dev .dr { margin-top: 3px; }
.dev.ok { background: color-mix(in srgb, var(--ok) 10%, var(--card)); }
.dev.bad { background: var(--alarm-bg); }
.dev.bad .dr { color: var(--alarm); font-weight: 600; }
.dev .btn { flex: none; }

/* ---------------------------------------------------------------- Schriften (wie STACHE ADVISORY)
   Libre Franklin (Überschriften, Schriftzug) und Work Sans (Text) – beide SIL Open Font License 1.1,
   selbst gehostet im Ordner fonts/ (kein Abruf bei Google), auf lateinische Zeichen inkl. Umlaute gekürzt. */
@font-face { font-family: 'Libre Franklin'; font-style: normal; font-weight: 700 800; font-display: swap; src: url('fonts/libre-franklin-700-800.woff') format('woff'); }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('fonts/work-sans-400-800.woff') format('woff'); }
body { font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
h1, .hello .hi, #alarm h1, .dt-title, .nextcard .nt, .sheet .cl h3 { font-family: 'Libre Franklin', 'Work Sans', system-ui, sans-serif; letter-spacing: -.01em; }
h1, .hello .hi, #alarm h1 { font-weight: 800; }
.wm { font-family: 'Libre Franklin', 'Work Sans', system-ui, sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: .10em; line-height: 1; }
#apphead .brand .wm { font-size: 18px; margin-top: 1px; }
.wm-title { font-size: 30px; margin: 10px 0 4px; letter-spacing: .10em; }

/* ---------------------------------------------------------------- Vorzeitig abgeschlossen */
.tl-ev.done { opacity: .5; }
.tl-ev.done b { text-decoration: line-through; text-decoration-thickness: 1px; }
.mini.done { opacity: .6; }
.mini.done .mt { text-decoration: line-through; text-decoration-thickness: 1px; }
.nextwrap { position: relative; }
.nextwrap .donebtn { position: absolute; right: 10px; bottom: 10px; min-height: 34px; padding: 6px 10px; font-size: 13px; background: color-mix(in srgb, var(--card) 85%, transparent); border: 1px solid var(--line); }
.nextwrap .nextcard { padding-bottom: 14px; }
.nextwrap:has(.donebtn) .nextcard .nw { padding-right: 120px; }
.donebox { display: block; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: inherit; text-decoration: underline; cursor: pointer; }

/* ---------------------------------------------------------------- Wochenende & Urlaub */
.f-hint { align-self: end; padding-bottom: 12px; }
@media (max-width: 420px) { .f-hint { padding: 6px 0 0; } }
.f.sub { margin-top: 4px; font-weight: 500; color: var(--muted); }
.vacline { margin: 8px 0 0; }

/* ---------------------------------------------------------------- Zugang „nur ansehen“ */
.tag.ro { background: color-mix(in srgb, var(--both) 14%, var(--card)); color: color-mix(in srgb, var(--both) 75%, var(--ink)); }
body.ro #tabbar a.add { display: none; }
body.ro #tabbar a[data-tab="inbox"] { display: none; }
.vacline .btn { margin-left: 6px; }

/* ---------------------------------------------------------------- Abendvorschau (ruhig statt knallig) */
#alarm.eve { background: linear-gradient(180deg, color-mix(in srgb, var(--both) 16%, var(--bg)) 0%, var(--bg) 70%); color: var(--ink); }
#alarm.eve .al-k { color: color-mix(in srgb, var(--both) 75%, var(--ink)); opacity: 1; }
#alarm.eve h1 { font-size: 34px; }
#alarm.eve li { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
#alarm.eve li .w { color: var(--muted); opacity: 1; }
#alarm.eve li .task.open { background: var(--warn-bg); color: var(--warn); }
#alarm.eve .al-m { background: color-mix(in srgb, var(--mc) 18%, var(--card)); }
#alarm.eve .al-hint { margin: -6px 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-weight: 700; }
#alarm.eve button { background: var(--both); color: #fff; }

/* ---------------------------------------------------------------- Kalender-Symbol mit heutigem Datum */
#tabbar a .calico { filter: none; opacity: 1; width: 22px; height: 22px; margin: 5px 0 2px; box-sizing: border-box; border-radius: 5px; overflow: hidden; display: flex; flex-direction: column;
  background: var(--card); border: 1.5px solid currentColor; font-style: normal; line-height: 1; }
#tabbar a .calico b { display: block; font-size: 5.5px; font-weight: 800; letter-spacing: .04em; padding: 2px 0 1px; background: currentColor; text-align: center; }
#tabbar a .calico b { color: var(--card); background: var(--muted); }
#tabbar a .calico i { font-style: normal; font-size: 11px; font-weight: 800; flex: 1; display: grid; place-items: center; color: var(--ink); margin-top: -1px; }
#tabbar a.on .calico { border-color: var(--brand-2); }
#tabbar a.on .calico b { background: var(--brand-2); color: #fff; }

/* ---------------------------------------------------------------- Version & Neuigkeiten */
#apphead .brandrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ver { border: 1px solid var(--line); background: var(--card); color: var(--muted); font: inherit; font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  padding: 2px 7px; border-radius: 999px; cursor: pointer; line-height: 1.4; }
.ver:hover, .ver:focus-visible { color: var(--ink); border-color: var(--muted); }
.ver-login { display: inline-block; margin: 0 0 12px; font-size: 12px; padding: 10px 14px; }
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(20, 14, 6, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease-out; }
.sheet { width: 100%; max-width: 560px; max-height: 82vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 22px 22px 0 0;
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.2); animation: up .25s ease-out; }
@media (min-width: 600px) { .sheet-bg { align-items: center; } .sheet { border-radius: 22px; } }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sheet-h .wm { font-size: 17px; }
.vtag { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 6px; }
.sheet-x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--soft); color: var(--ink); font-size: 16px; cursor: pointer; }
.sheet-b { overflow-y: auto; padding-top: 4px; }
.cl h3 { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; margin: 16px 0 6px; }
.cl h3 span { font-weight: 600; color: var(--muted); font-size: 13px; }
.cl ul { margin: 0; padding-left: 20px; color: var(--ink); font-size: 14.5px; }
.cl li + li { margin-top: 4px; }
.cl:not(.cur) ul { color: color-mix(in srgb, var(--ink) 75%, var(--muted)); }
.cl.cur { background: color-mix(in srgb, var(--brand) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); border-radius: 14px; padding: 2px 14px 12px; margin-top: 12px; }
.cl.cur h3 { margin-top: 12px; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Heute: ein Hinweis auf „Offen“ statt vieler Chips */
.waitline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: 14px; text-decoration: none;
  background: var(--warn-bg); color: var(--warn); font-weight: 700; border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.waitline .chev { font-size: 22px; line-height: 1; }
/* Mehr als Menü */
.menu { display: grid; gap: 10px; margin-top: 14px; }
.menu .linkcard { margin: 0; }
.menu-ver { text-align: center; margin-top: 22px; }
.menu-ver .ver { font-size: 12px; padding: 10px 14px; }
/* Termin-Formular: seltene Optionen eingeklappt */
details.more-opts { margin-top: 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); padding: 0 14px; }
details.more-opts > summary { list-style: none; cursor: pointer; padding: 14px 0; display: flex; flex-direction: column; gap: 2px; position: relative; padding-right: 26px; }
details.more-opts > summary::-webkit-details-marker { display: none; }
details.more-opts > summary::after { content: '›'; position: absolute; right: 2px; top: 50%; transform: translateY(-50%) rotate(90deg); font-size: 22px; color: var(--muted); transition: transform .15s; }
details.more-opts[open] > summary::after { transform: translateY(-50%) rotate(-90deg); }
details.more-opts[open] { padding-bottom: 14px; }
/* Schnellauswahl kompakter */
.quickall { gap: 6px; margin-top: 8px; }
.quickall button { flex: 0 1 auto; min-height: 38px; padding: 6px 12px; font-size: 13.5px; }
.ev .when .wdate { display: block; margin: 0 0 2px; font-size: 11.5px; font-weight: 700; color: var(--brand); text-transform: none; }
.icsline { text-align: center; margin: 18px 0 0; font-size: 14px; }
.icsline a { color: var(--muted); font-weight: 600; }
#addp:not(.hidden) { margin-top: 12px; }

/* ---------------------------------------------------------------- Heute: schlichter Fortschritt + Haken */
.h2prog { display: flex; align-items: center; gap: 12px; }
.h2prog .prog { flex: 1; display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; }
.h2prog .pbar { flex: 1; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; }
.h2prog .pbar i { display: block; height: 100%; border-radius: inherit; background: var(--ok); transition: width .3s; }
.h2prog .pnum { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Erledigte Termine (vorbei oder „Schon vorbei“) bekommen einen Haken */
.dl.past .mini .mw::before, .mini.done .mw::before { content: '✓'; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 5px; border-radius: 50%;
  background: var(--ok); color: #fff; font-size: 10px; font-weight: 900; vertical-align: 1px; }
.dl.past { opacity: .62; }
.herobox.tap, h2.tap { cursor: pointer; }
.herobox.tap:active { transform: scale(.99); }
.h2more { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 12.5px; color: var(--muted); }
h2.tap { display: flex; align-items: baseline; gap: 4px; }
.digest-try { gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; }

/* ---------------------------------------------------------------- Suche */
.hsearch { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); text-decoration: none; background: var(--card); border: 1px solid var(--line); flex: none; }
.hsearch:active { transform: scale(.95); }
#apphead .crew { margin-left: 4px; }
.searchbar input { margin-top: 10px; font-size: 17px; padding-left: 42px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b6f62' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 20 20'/%3E%3C/svg%3E") no-repeat 13px center / 20px; }
.sfilter { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: none; }
.sfilter::-webkit-scrollbar { display: none; }
.sfilter button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.sfilter button.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--card)); }
/* Kopfzeile auf schmalen Handys: alles passt nebeneinander */
#apphead { gap: 6px; }
#apphead .brandrow { flex: 1 1 auto; min-width: 0; gap: 6px; }
#apphead .ver { flex: none; }
@media (max-width: 420px) {
  #apphead { padding-left: 14px; padding-right: 14px; }
  #apphead .brand { gap: 6px; }
  #apphead .brand img { width: 30px; height: 30px; }
  #apphead .brand .wm { font-size: 16px; letter-spacing: .08em; }
  #apphead .ver { font-size: 10px; padding: 2px 6px; }
  .hsearch { width: 34px; height: 34px; }
  #apphead .crew span { width: 24px; height: 24px; font-size: 11px; margin-left: -8px; }
}
@media (max-width: 350px) { #apphead .crew { display: none; } }

/* ---------------------------------------------------------------- Heller Modus: weiße Karten, Farbe nur als Streifen */
@media (prefers-color-scheme: light) {
  .herobox, .herobox.calm { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .waitline { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--warn); box-shadow: var(--shadow); }
  .mini { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--ec); box-shadow: 0 1px 2px rgba(30, 25, 15, .03); }
  .mini.ad { background: var(--card); }
  .taskrow, .taskrow.open { background: var(--card); border-color: var(--line); box-shadow: var(--shadow); }
  .taskrow.open { border-left-color: var(--warn); }
  .nextcard { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--ec, var(--brand)); }
  .nextcard.done { border-left-color: var(--ok); }
  .wx, .linkcard .lc-ico { background: var(--soft); }
}

/* =====================================================================================
   DESKTOP / LAPTOP (ab 1000 px Breite). Alles hier drunter gilt NUR auf großen Bildschirmen –
   Handys und Tablets im Hochformat bleiben unverändert.
   ===================================================================================== */
.placeline { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.placeline .pi { flex: none; font-size: 18px; }
.placeline .pt { flex: 1; min-width: 0; }
.placeline .pt b { display: block; font-weight: 650; overflow-wrap: anywhere; }
.placeline .pt small { color: var(--brand); font-weight: 650; font-size: 12.5px; }
.placeline .pa { flex: none; color: var(--muted); font-size: 20px; }

@media (min-width: 1000px) {
  :root { --side: 248px; }
  body.nav { padding: 0 0 40px var(--side); }
  main { max-width: 760px; padding: 8px 32px 40px; }
  body[data-view="today"] main, body[data-view="home"] main { max-width: 1180px; }

  /* Kopfzeile: Logo oben in der Seitenleiste, Suche & Personen oben rechts */
  #apphead { position: fixed; top: 0; left: 0; width: var(--side); max-width: none; margin: 0; padding: 22px 18px 0; z-index: 11; flex-wrap: wrap; gap: 12px; }
  #apphead .brandrow { flex: 1 1 100%; }
  #apphead .brand img { width: 34px; height: 34px; }
  #apphead .brand .wm { font-size: 17px; letter-spacing: .08em; }
  #apphead .ver { flex: none; }
  #apphead .hsearch, #apphead .crew { position: fixed; top: 18px; }
  #apphead .hsearch { right: 120px; width: 40px; height: 40px; margin: 0; }
  #apphead .crew { right: 28px; top: 24px; display: flex; }
  #apphead .crew span { width: 30px; height: 30px; font-size: 12px; margin-left: -6px; }
  body.nav main { padding-top: 76px; }

  /* Navigation: Seitenleiste links statt Leiste unten */
  #tabbar { top: 0; bottom: 0; right: auto; width: var(--side); flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 4px;
    padding: 96px 14px 24px; border-top: 0; border-right: 1px solid var(--line); background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; }
  #tabbar a { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 15px; font-weight: 600; min-width: 0; padding: 10px 14px; border-radius: 12px; color: var(--muted); }
  #tabbar a:hover { background: var(--soft); color: var(--ink); }
  #tabbar a.on { background: color-mix(in srgb, var(--brand) 10%, var(--card)); color: var(--brand); }
  #tabbar a .ico { width: 24px; text-align: center; font-size: 19px; }
  #tabbar a .calico { margin: 0 1px; }
  #tabbar a.add { order: -1; margin-bottom: 14px; padding: 0; background: none; }
  #tabbar a.add:hover { background: none; }
  #tabbar a.add span { width: 100%; height: 46px; margin: 0; border-radius: 12px; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
  #tabbar a.add span::after { content: 'Neuer Termin'; }
  #tabbar .badge { position: static; margin-left: auto; }
  #toast { bottom: 28px; left: calc(50% + var(--side) / 2); }

  /* Heute: zwei Spalten – links Überblick & Aufgaben, rechts Heute & Morgen */
  .tgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; align-items: start; }
  .tcol-b > h2:first-child { margin-top: 18px; }
  .tcol-b { position: sticky; top: 76px; }

  /* Kalender Monat: großes Raster, gewählter Tag rechts daneben */
  .mbody { display: grid; grid-template-columns: minmax(0, 1fr) 320px; column-gap: 28px; }
  .mbody .mgrid { grid-column: 1; align-self: start; }
  .mbody .msel { grid-column: 2; grid-row: 2; margin-top: 0; position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; }
  .mgrid { gap: 6px; }
  .mc { min-height: 112px; padding: 6px; border-radius: 12px; }
  .mc .dn { align-self: flex-start; font-size: 14px; }
  .pill { font-size: 12px; padding: 1px 6px; line-height: 1.4; }
  .mc:hover { border-color: var(--brand); }

  /* Kalender Woche: sieben Spalten nebeneinander */
  .weeklist { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
  .wday { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; align-content: start; min-height: 420px; padding: 10px 8px; gap: 8px; }
  .wday .wde { display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; }
  .wday .free { text-align: center; display: block; }
  .wday .wdh { flex-direction: row; justify-content: center; gap: 6px; }
  .wday .mini { flex-wrap: wrap; gap: 2px 6px; padding: 6px 8px; }
  .wday .mini .mw { min-width: 0; }
  .wday .mini .mt { flex-basis: 100%; font-size: 13.5px; overflow-wrap: break-word; word-break: normal; hyphens: auto; -webkit-hyphens: auto; }
  .wday .mini .mm { font-size: 11px; padding: 0 6px; }

  /* Tag: Zeitleiste darf höher sein */
  .tl-scroll { max-height: calc(100vh - 300px); }

  /* „Achtung heute“ / Abendvorschau als großes Fenster statt Vollbild-Handy */
  #alarm { padding: 48px max(28px, calc((100vw - 720px) / 2)); }
  #alarm h1 { font-size: 44px; }
  #alarm button { max-width: 720px; }
}

/* Kleine Laptops (1000–1199 px): schmalere Seitenleiste, damit Woche & Monat Platz haben */
@media (min-width: 1000px) and (max-width: 1199px) {
  :root { --side: 212px; }
  #apphead { padding: 22px 14px 0; }
  #apphead .brand img { width: 30px; height: 30px; }
  #apphead .brand .wm { font-size: 15px; }
  main { padding: 8px 22px 40px; }
  .mbody { grid-template-columns: minmax(0, 1fr) 270px; column-gap: 20px; }
  .weeklist { gap: 5px; }
  .wday { padding: 8px 5px; }
  .wday .mini { padding: 5px 6px; }
  .wday .mini .mt { font-size: 12.5px; }
}
