/* Schrift liegt bei der App, damit beim Öffnen nichts an Google oder andere Server geht. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/plus-jakarta-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #F5F5F2;
  --surface: #FFFFFF;
  --text: #1C2321;
  --muted: #5B6461;
  --line: #E4E4DE;
  --border: #D6D8D2;
  --accent: #2F6B4F;
  --accent-soft: #E7EFEA;
  --accent-ink: #1F4D38;
  --warm: #8A5212;
  --warm-soft: #FBEFDF;
  --on-accent: #FFFFFF;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141816;
    --surface: #1E2421;
    --text: #EEF1EF;
    --muted: #A3ACA8;
    --line: #2C3430;
    --border: #3A433F;
    --accent: #5FAF88;
    --accent-soft: #23362D;
    --accent-ink: #A9DCC3;
    --warm: #F0B977;
    --warm-soft: #3A2C1B;
    --on-accent: #0F1A14;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.view {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 28px) 20px calc(env(safe-area-inset-bottom) + 110px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.5px; }
h2 { margin: 0; font-size: 17px; font-weight: 700; }
p { margin: 0; }
.head { display: flex; flex-direction: column; gap: 4px; }
.sub { font-size: 14px; color: var(--muted); font-weight: 500; line-height: 1.5; }
.section { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > .btn { flex: 1; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-direction: row; }
.grow { flex: 1; min-width: 0; }
.note { font-size: 13px; color: var(--muted); line-height: 1.5; }

.card { background: var(--surface); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.muted { color: var(--muted); font-size: 14px; }
.card.soft { background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; line-height: 1.5; display: block; }
.card.warn { background: var(--warm-soft); color: var(--warm); font-size: 13px; line-height: 1.5; display: block; }

.hero { background: var(--accent); color: var(--on-accent); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.hero-top { display: flex; justify-content: space-between; font-weight: 600; font-size: 15px; }
.hero-sub { font-size: 13px; opacity: 0.92; line-height: 1.4; }
.bar { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--on-accent) 28%, transparent); overflow: hidden; }
.bar > div { height: 100%; background: var(--on-accent); border-radius: 4px; transition: width 0.3s ease; }
.hero-btn { align-self: flex-start; background: color-mix(in srgb, var(--on-accent) 18%, transparent); color: var(--on-accent); border: none; border-radius: 12px; min-height: 40px; padding: 0 14px; font-size: 13px; font-weight: 600; }

.tip { border: 1.5px solid var(--accent); }
.tip-head { display: flex; gap: 8px; align-items: center; color: var(--accent); }
.tip-head strong { color: var(--text); font-size: 15px; }
.tip p { font-size: 14px; color: var(--muted); line-height: 1.5; }

.task { display: flex; align-items: center; background: var(--surface); border-radius: 18px; }
.task-main { flex: 1; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 16px; border: none; background: none; text-align: left; }
.box { width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--border); display: grid; place-items: center; flex-shrink: 0; }
.box svg { width: 14px; height: 14px; stroke: var(--on-accent); stroke-width: 3; }
.task.done .box { background: var(--accent); border-color: var(--accent); }
.task-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.task-label { font-size: 15px; font-weight: 600; }
.task.done .task-label { color: var(--muted); text-decoration: line-through; }
.task-area { font-size: 12px; color: var(--muted); }
.task-min { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }

.icon-btn { width: 44px; height: 44px; border: none; background: none; border-radius: 14px; display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.icon-btn.solid { background: var(--surface); color: var(--text); }

.add { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border: 1.5px dashed var(--border); border-radius: 18px; background: transparent; font-weight: 600; color: var(--accent); }
.add svg { width: 18px; height: 18px; }

.btn { min-height: 48px; border: none; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-weight: 700; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.ghost { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); }
.btn.small { min-height: 40px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn svg { width: 18px; height: 18px; }

.appt { flex-direction: row; gap: 14px; align-items: flex-start; }
.date-badge { width: 52px; height: 56px; border-radius: 14px; background: var(--warm-soft); color: var(--warm); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.date-badge span { font-size: 11px; font-weight: 600; }
.date-badge strong { font-size: 20px; line-height: 1.1; }
.appt-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.appt-time { font-size: 13px; color: var(--muted); font-weight: 600; }
.appt-title { font-size: 16px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--warm); }
.chips svg { width: 14px; height: 14px; }
.chip { font-size: 11px; font-weight: 600; color: var(--warm); background: var(--warm-soft); padding: 4px 8px; border-radius: 8px; }

.month { padding: 14px 10px; gap: 6px; }
.grid7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; }
.grid7.gap { gap: 6px; }
.wd { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding-bottom: 4px; }
.day { height: 44px; border: none; border-radius: 14px; background: transparent; font-size: 15px; font-weight: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; }
.day.today { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.day.sel { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.dot { width: 5px; height: 5px; border-radius: 3px; }
.dot.on { background: #C9822B; }
.day.sel .dot.on { background: var(--on-accent); }

.fab { position: fixed; right: max(20px, calc(50% - 260px)); bottom: calc(env(safe-area-inset-bottom) + 90px); height: 52px; padding: 0 20px; border: none; border-radius: 26px; background: var(--accent); color: var(--on-accent); font-weight: 700; display: flex; align-items: center; gap: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
.fab svg { width: 18px; height: 18px; stroke-width: 2.5; }

.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input { width: 100%; border: 1.5px solid var(--border); border-radius: 12px; padding: 12px; font-size: 16px; background: var(--surface); min-height: 48px; }
.input:focus-visible, button:focus-visible, .pill:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.daybudget { min-height: 58px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; }
.daybudget span { font-size: 12px; font-weight: 700; }
.daybudget strong { font-size: 13px; font-weight: 600; }
.daybudget.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-btn, .pill span { min-height: 44px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 600; padding: 0 14px; display: inline-flex; align-items: center; }
.pill-btn.on, .pill input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; }

.plan { padding: 4px 16px; gap: 0; }
.plan-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.plan-row:last-child { border-bottom: none; }
.plan-day { width: 28px; font-size: 13px; font-weight: 700; color: var(--accent); }
.plan-task { flex: 1; font-size: 14px; font-weight: 500; }
.plan-min { font-size: 12px; color: var(--muted); white-space: nowrap; }

.setting { flex-direction: row; align-items: center; padding: 6px 6px 6px 16px; }
.switch-row { display: flex; align-items: center; gap: 12px; flex: 1; min-height: 48px; position: relative; }
.switch-row input { position: absolute; opacity: 0; width: 44px; height: 28px; margin: 0; }
.switch { width: 44px; height: 28px; border-radius: 14px; background: var(--border); position: relative; flex-shrink: 0; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: #FFFFFF; transition: transform 0.2s; }
.switch-row input:checked + .switch { background: var(--accent); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 8px 12px calc(env(safe-area-inset-bottom) + 8px); background: var(--surface); border-top: 1px solid var(--line); z-index: 5; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 76px; min-height: 48px; border: none; background: none; color: var(--muted); font-size: 12px; font-weight: 500; justify-content: center; }
.tab.on { color: var(--accent); font-weight: 700; }

.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 10; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 90vh; overflow-y: auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 22px 20px calc(env(safe-area-inset-bottom) + 20px); z-index: 11; display: flex; flex-direction: column; gap: 12px; }
.sheet form { display: flex; flex-direction: column; gap: 12px; }

/* Müllabfuhr */
.dots { display: flex; gap: 2px; min-height: 5px; }
.card.waste { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; border: 1px solid var(--border); font: inherit; color: inherit; }
.card.waste.alert { border-color: var(--warm); background: var(--warm-soft); }
.waste-text { font-weight: 600; }
.card.waste.muted .waste-text, .card.waste.muted { font-weight: 500; }
.bin-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 9px; background: var(--accent-soft); color: var(--text); }
.bin-dot { width: 9px; height: 9px; border-radius: 5px; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.file-btn { cursor: pointer; display: inline-flex; align-items: center; }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper .input { flex: 1; text-align: center; }
.stepper .icon-btn { font-size: 22px; font-weight: 600; border: 1.5px solid var(--border); }
.unit { font-size: 14px; font-weight: 600; color: var(--muted); min-width: 52px; }
.link { border: none; background: none; padding: 0; color: var(--accent); font-weight: 700; text-decoration: underline; font-size: inherit; }
.warn-btn { margin-top: 10px; background: var(--warm); color: var(--surface); }
.warn-text { color: var(--warm); }
#mm-results:empty { display: none; }

.plan-day { display: flex; flex-direction: column; line-height: 1.2; }
.plan-day small { font-size: 11px; font-weight: 500; color: var(--muted); }
.plan-task { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-empty { color: var(--muted); font-size: 13px; }
.plan-chip { border: 1.5px solid var(--border); background: var(--bg); border-radius: 10px; min-height: 36px; padding: 4px 10px; font-size: 13px; font-weight: 600; text-align: left; }
.plan-chip span { color: var(--muted); font-weight: 500; }
.plan-chip.pinned { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.card.warn .plan-chip { margin: 4px 4px 0 0; }
.plan-min.over, .move-day small.over { color: var(--warm); font-weight: 700; }
.move-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.move-day span { flex-direction: column; justify-content: center; padding: 6px 0; width: 100%; min-height: 56px; gap: 2px; }
.move-day small { font-size: 11px; font-weight: 500; }

/* Sicherung */
.file-btn { margin-top: 10px; cursor: pointer; }

.hidden { display: none !important; }
[data-for] { display: flex; flex-direction: column; gap: 12px; }
.add-pill { color: var(--accent); border-style: dashed; gap: 6px; }
.add-pill svg { width: 16px; height: 16px; }
.plan-chip.extra { border-color: var(--warm); background: var(--warm-soft); color: var(--warm); }
.plan-chip em { font-style: normal; font-weight: 500; font-size: 11px; display: block; opacity: 0.85; }
.plan-min { display: flex; flex-direction: column; align-items: flex-end; }
.plan-min small { font-size: 11px; color: var(--warm); font-weight: 600; }
