/* Klusjes-app. Mobiel-eerst, licht + donker. Geen externe fonts of afbeeldingen.
   Let op: strikte CSP (style-src 'self') -> geen inline style="...". Dynamische waarden
   (voortgangsbreedte) worden via de CSSOM gezet (el.style.width), niet via attributen. */

:root {
  color-scheme: light dark;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --text: #1b2232;
  --muted: #56607a;
  --border: #dde2ee;
  --primary: #2f5bea;
  --primary-ink: #ffffff;
  --primary-soft: #e3eaff;
  --ok: #17803d;
  --ok-soft: #d9f3e2;
  --warn: #b25e00;
  --warn-soft: #ffe7c7;
  --bad: #c62828;
  --bad-soft: #fddcdc;
  --grey-soft: #e6e9f1;
  --ring: #2f5bea;
  --shadow: 0 1px 2px rgb(20 30 60 / 8%), 0 4px 14px rgb(20 30 60 / 6%);
  --radius: 16px;
  --tap: 52px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1320;
    --surface: #1a2033;
    --surface-2: #232a42;
    --text: #edf0f9;
    --muted: #a3adc7;
    --border: #2d3552;
    --primary: #7d9bff;
    --primary-ink: #0b1020;
    --primary-soft: #26325f;
    --ok: #52d482;
    --ok-soft: #173a27;
    --warn: #ffb04d;
    --warn-soft: #473314;
    --bad: #ff7b7b;
    --bad-soft: #471d1d;
    --grey-soft: #272e45;
    --ring: #9db3ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 4px 14px rgb(0 0 0 / 30%);
  }
}

:root[data-theme="dark"] {
  --bg: #0f1320;
  --surface: #1a2033;
  --surface-2: #232a42;
  --text: #edf0f9;
  --muted: #a3adc7;
  --border: #2d3552;
  --primary: #7d9bff;
  --primary-ink: #0b1020;
  --primary-soft: #26325f;
  --ok: #52d482;
  --ok-soft: #173a27;
  --warn: #ffb04d;
  --warn-soft: #473314;
  --bad: #ff7b7b;
  --bad-soft: #471d1d;
  --grey-soft: #272e45;
  --ring: #9db3ff;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 4px 14px rgb(0 0 0 / 30%);
}

/* Kindkleuren: --kid = vulling, --kid-ink = tekst erop */
.kleur-rood { --kid: #e5484d; --kid-ink: #fff; }
.kleur-oranje { --kid: #ee7d14; --kid-ink: #1b1204; }
.kleur-geel { --kid: #f1c40f; --kid-ink: #2a2200; }
.kleur-groen { --kid: #2fa84f; --kid-ink: #fff; }
.kleur-blauw { --kid: #3b6cf6; --kid-ink: #fff; }
.kleur-paars { --kid: #8e4ec6; --kid-ink: #fff; }
.kleur-roze { --kid: #e5498b; --kid-ink: #fff; }
.kleur-turkoois { --kid: #12a594; --kid-ink: #fff; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.45 var(--font);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .6em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* ---------- shell ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 1.2rem; }
.who { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--kid, var(--muted)); flex: none; }
.screen {
  flex: 1; width: 100%; max-width: 720px; margin: 0 auto;
  padding: 16px 14px calc(96px + env(safe-area-inset-bottom));
  outline: none;
}
.screen.no-tabs { padding-bottom: 32px; }
.stack > * + * { margin-top: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-inner { display: flex; width: 100%; max-width: 720px; }
.tab {
  flex: 1; min-height: 62px; padding: 6px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: 0; cursor: pointer; color: var(--muted);
}
.tab-icon { font-size: 1.45rem; line-height: 1; }
.tab-label { font-size: .74rem; font-weight: 600; }
.tab[aria-current="page"] { color: var(--primary); }
.tab[aria-current="page"] .tab-label { text-decoration: underline; text-underline-offset: 3px; }
.tab-badge {
  position: absolute; margin: -4px 0 0 22px; min-width: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bad); color: #fff; font-size: .7rem; font-weight: 700; text-align: center;
}

.banner {
  position: sticky; top: 0; z-index: 30; padding: 8px 14px; text-align: center;
  background: var(--warn-soft); color: var(--warn); font-weight: 600;
}

.toast-area {
  position: fixed; left: 0; right: 0; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 14px;
}
.toast {
  max-width: 480px; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow);
  background: var(--text); color: var(--bg); font-weight: 600; pointer-events: auto;
}
.toast.bad { background: var(--bad); color: #fff; }

/* ---------- basiselementen ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 10px 20px; border-radius: 14px;
  border: 2px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 700;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 44px; padding: 6px 14px; font-size: .92rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row > .btn { flex: 1 1 auto; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .legend { font-weight: 700; font-size: .95rem; }
.input {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border-radius: 12px;
  border: 2px solid var(--border); background: var(--surface); color: var(--text);
}
.input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.hint { color: var(--muted); font-size: .9rem; }
.error { color: var(--bad); font-weight: 600; min-height: 1.2em; }

.hero { text-align: center; padding: 28px 8px 8px; }
.hero .logo { font-size: 4rem; line-height: 1; }
.hero h2 { margin-top: 10px; font-size: 1.7rem; }

details.paste { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
details.paste summary { cursor: pointer; font-weight: 600; min-height: 36px; display: flex; align-items: center; }

/* ---------- voortgang ---------- */
.progress { height: 18px; border-radius: 9px; background: var(--grey-soft); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 9px; background: var(--ok); transition: width .4s ease; }

.celebrate {
  text-align: center; padding: 18px 14px; border-radius: var(--radius);
  background: var(--ok-soft); color: var(--ok); font-weight: 800; font-size: 1.15rem;
}
.celebrate .big { font-size: 2.6rem; display: block; animation: pop .6s ease; }
@keyframes pop { 0% { transform: scale(.3) rotate(-12deg); } 70% { transform: scale(1.2) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }

/* ---------- klusje-kaart (kind) ---------- */
.section-title { margin: 20px 2px 8px; font-size: 1.05rem; font-weight: 800; color: var(--muted); }
.chore {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 10px;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.chore-emoji { flex: none; font-size: 2.1rem; line-height: 1; }
.chore-check {
  flex: none; width: 68px; height: 68px; border-radius: 50%; cursor: pointer;
  border: 4px solid var(--border); background: var(--surface-2); font-size: 2rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.chore-check:active { transform: scale(.94); }
.chore-body { flex: 1; min-width: 0; }
.chore-title { font-weight: 800; font-size: 1.12rem; overflow-wrap: anywhere; }
.chore-sub { color: var(--muted); font-size: .92rem; }
.chore-note { margin-top: 4px; padding: 6px 10px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-weight: 600; font-size: .95rem; }
.chore.status-done { border-color: var(--warn); }
.chore.status-done .chore-check { background: var(--warn-soft); border-color: var(--warn); }
.chore.status-approved { border-color: var(--ok); }
.chore.status-approved .chore-check { background: var(--ok-soft); border-color: var(--ok); }
.chore.status-rejected { border-color: var(--bad); }
.chore.status-rejected .chore-check { background: var(--bad-soft); border-color: var(--bad); }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800;
  background: var(--grey-soft); color: var(--muted);
}
.badge.done { background: var(--warn-soft); color: var(--warn); }
.badge.approved { background: var(--ok-soft); color: var(--ok); }
.badge.rejected { background: var(--bad-soft); color: var(--bad); }
.badge.week { background: var(--primary-soft); color: var(--primary); }

/* ---------- week (kind) ---------- */
.daycard { margin-bottom: 10px; padding: 12px 14px; }
.daycard.today { border: 2px solid var(--primary); }
.daycard-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px;
  background: var(--grey-soft); font-size: .92rem;
}
.chip.done { background: var(--warn-soft); }
.chip.approved { background: var(--ok-soft); }
.chip.rejected { background: var(--bad-soft); }

/* ---------- ouder: kind-kaarten en items ---------- */
.kidcard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.kidname {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 6px; border-radius: 999px;
  background: var(--kid); color: var(--kid-ink); font-weight: 800; white-space: nowrap; flex: none;
}
.kidname .dot { background: var(--kid-ink); opacity: .35; }
.kidcard-head .count { margin-left: auto; font-weight: 800; }
.item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.item:first-of-type { border-top: 0; }
.item-emoji { font-size: 1.6rem; line-height: 1.2; flex: none; }
.item-body { flex: 1; min-width: 0; }
.item-title { font-weight: 700; overflow-wrap: anywhere; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.reject-form { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- ouder: weekraster ---------- */
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.weeknav .label { text-align: center; font-weight: 800; }
.weeknav .btn { white-space: nowrap; padding: 6px 12px; }
.weekgrid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; align-items: stretch; }
.wg-head { text-align: center; font-size: .78rem; font-weight: 800; color: var(--muted); padding: 2px 0; }
.wg-head.today { color: var(--primary); text-decoration: underline; }
.wg-name { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 800; }
.wg-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell {
  position: relative; min-height: 50px; padding: 2px; border-radius: 10px; border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .86rem; cursor: pointer;
  background: var(--grey-soft); color: var(--muted);
}
.cell.c-green { background: var(--ok-soft); color: var(--ok); }
.cell.c-orange { background: var(--warn-soft); color: var(--warn); }
.cell.c-red { background: var(--bad-soft); color: var(--bad); }
.cell.c-open { background: var(--surface); color: var(--text); border-color: var(--border); }
.cell.c-none, .cell.c-future { background: var(--grey-soft); color: var(--muted); font-weight: 600; cursor: default; }
.cell.is-today { border-color: var(--primary); }
.cell.selected { outline: 3px solid var(--ring); outline-offset: 1px; }
.cell.pending::after {
  content: ""; position: absolute; top: 3px; right: 3px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 2px var(--surface);
}
.legend-row { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .84rem; margin-top: 12px; color: var(--muted); }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 16px; height: 16px; border-radius: 5px; background: var(--grey-soft); border: 2px solid transparent; }
.swatch.c-green { background: var(--ok); } .swatch.c-orange { background: var(--warn); } .swatch.c-red { background: var(--bad); }
.swatch.c-open { background: var(--surface); border-color: var(--border); }
.pending-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.detail { margin-top: 14px; }

/* ---------- beheer ---------- */
.list-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px; }
.list-card .emoji { font-size: 1.8rem; }
.list-card .grow { flex: 1; min-width: 0; }
.list-card .title { font-weight: 800; overflow-wrap: anywhere; }
.kid-dots { display: inline-flex; gap: 4px; flex-wrap: wrap; vertical-align: middle; }
.kid-dots .dot { width: 12px; height: 12px; }

/* ---------- dialoog (sheet) ---------- */
dialog.sheet {
  width: min(560px, 100% - 16px); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 20px;
  background: var(--surface); color: var(--text); box-shadow: 0 10px 40px rgb(0 0 0 / 35%);
}
dialog.sheet::backdrop { background: rgb(10 14 28 / 55%); }
.sheet-body { padding: 18px; overflow-y: auto; max-height: calc(100dvh - 24px); display: flex; flex-direction: column; gap: 14px; }
.sheet-body h3 { font-size: 1.25rem; }

.dayrow { display: flex; flex-wrap: wrap; gap: 6px; }
.daybtn {
  min-width: 46px; min-height: 46px; padding: 0 8px; border-radius: 12px; border: 2px solid var(--border);
  background: var(--surface); font-weight: 800; cursor: pointer;
}
.daybtn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.choice { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 12px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; }
.choice input { width: 22px; height: 22px; flex: none; accent-color: var(--primary); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.emoji-btn { min-height: 46px; font-size: 1.5rem; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; }
.emoji-btn[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 4px solid transparent; background: var(--kid); cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--kid-ink); font-weight: 900;
}
.swatch-btn[aria-pressed="true"] { border-color: var(--text); }

.qr-wrap { display: flex; justify-content: center; }
.qr { background: #fff; padding: 10px; border-radius: 12px; max-width: 100%; height: auto; image-rendering: pixelated; }
.linkbox { word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; padding: 10px; border-radius: 10px; background: var(--surface-2); user-select: all; }
.warnbox { padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 700; }

.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty .big { font-size: 2.6rem; display: block; }
.spinner { text-align: center; padding: 40px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 560px) {
  .cell { min-height: 58px; font-size: 1rem; }
  .wg-head { font-size: .9rem; }
}

/* ---------- versie 2: weekklusjes met doel, afspraken ---------- */
.weekly-card { margin-bottom: 10px; display: flex; flex-direction: column; gap: 10px; }
.weekly-head { display: flex; align-items: center; gap: 14px; }
.wk-entries { display: flex; flex-direction: column; gap: 8px; }
.wk-entry { padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border: 2px solid var(--border); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.wk-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; font-weight: 700; }
.wk-entry.status-done { border-color: var(--warn); }
.wk-entry.status-approved { border-color: var(--ok); }
.wk-entry.status-rejected { border-color: var(--bad); }
.wk-note { margin: 0; text-align: center; font-weight: 700; color: var(--muted); }
.wk-note.ok { color: var(--ok); font-size: 1.1rem; }
.weekly-item .wk-entries { margin-top: 8px; }

.agreement-card { margin-bottom: 10px; display: flex; flex-direction: column; gap: 10px; }
.agreement-card.verdict-kept { border: 2px solid var(--ok); }
.agreement-card.verdict-broken { border: 2px solid var(--warn); }
.agreement-check { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.agreement-q { font-weight: 800; }
.thumbs { display: flex; gap: 10px; }
.thumb {
  width: 64px; height: 64px; border-radius: 50%; border: 4px solid var(--border); background: var(--surface-2);
  font-size: 1.9rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.thumb:active { transform: scale(.94); }
.thumb[disabled] { opacity: .45; cursor: default; }
.thumb.yes[aria-pressed="true"] { background: var(--ok-soft); border-color: var(--ok); }
.thumb.no[aria-pressed="true"] { background: var(--warn-soft); border-color: var(--warn); }
.verdict { padding: 8px 12px; border-radius: 12px; font-weight: 800; }
.verdict.kept { background: var(--ok-soft); color: var(--ok); }
.verdict.broken { background: var(--warn-soft); color: var(--warn); }
.chore-note.neutral { background: var(--surface-2); color: var(--text); }
.chip.agreement.kept { background: var(--ok-soft); }
.chip.agreement.broken { background: var(--warn-soft); }
.chip.agreement.self_yes, .chip.agreement.self_no { background: var(--primary-soft); }
.agreements-foot { margin-top: 12px; }
.badge.kept { background: var(--ok-soft); color: var(--ok); }
.badge.broken { background: var(--warn-soft); color: var(--warn); }

@media (max-width: 400px) {
  .tab-label { font-size: .68rem; }
  .tab-icon { font-size: 1.3rem; }
}

/* ---------- rapport ---------- */
.chipbtn { border-radius: 999px; }
.chipbtn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.report-head { display: flex; flex-direction: column; gap: 2px; }
.report-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.report-block h4 { margin: 0; font-size: 1rem; }
.report-block:first-of-type { border-top: 0; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.stats.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 6px; }
.stat { text-align: center; padding: 6px 2px; border-radius: 10px; background: var(--surface-2); }
.stat-value { font-size: 1.25rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: .72rem; color: var(--muted); overflow-wrap: anywhere; }
.stat.ok .stat-value { color: var(--ok); }
.stat.bad .stat-value { color: var(--bad); }
.report-row { margin-top: 10px; }
.report-row-title { font-weight: 700; overflow-wrap: anywhere; }
.week-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.plain-list { margin: 4px 0 0; padding-left: 20px; }
.cmp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; justify-content: space-between; padding: 6px 0; border-top: 1px dashed var(--border); }
.cmp-nums { color: var(--muted); font-size: .88rem; }
.trend { font-weight: 800; white-space: nowrap; }
.trend.up { color: var(--ok); }
.trend.down { color: var(--bad); }
.trend.same, .trend.none { color: var(--muted); }
.report-copy { min-height: 240px; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.print-only { display: none; }

/* ---------- afdrukken (A4, zonder navigatie) ---------- */
@page { size: A4; margin: 14mm; }
@media print {
  :root:root:root {
    --bg: #fff; --surface: #fff; --surface-2: #f1f1f1; --text: #000; --muted: #444; --border: #999;
    --primary: #1a3fb0; --primary-ink: #fff; --primary-soft: #e8edff;
    --ok: #0f6a2f; --ok-soft: #dff3e6; --warn: #8a4a00; --warn-soft: #fbe9cf; --bad: #a01818; --bad-soft: #fbe0e0;
    --grey-soft: #e4e4e4; --shadow: none;
    color-scheme: light;
  }
  body { background: #fff; color: #000; font-size: 11pt; }
  .topbar, .tabbar, .banner, .toast-area, .no-print, dialog, #offline, noscript { display: none !important; }
  .print-only { display: block; margin-bottom: 8pt; }
  .print-only h1 { font-size: 18pt; }
  .print-only p { margin: 0; color: #444; }
  .screen, .screen.no-tabs { max-width: none; padding: 0; }
  .card { box-shadow: none; border: 1px solid #999; break-inside: avoid; page-break-inside: avoid; margin-bottom: 10pt; }
  .report-kid { break-inside: avoid; page-break-inside: avoid; }
  .report-kid + .report-kid { break-before: auto; }
  .kidname { border: 1px solid #000; color: #000; background: #fff; }
  .kidname .dot { background: #000; opacity: 1; }
  .progress { border: 1px solid #777; }
  .progress-bar { background: #555 !important; }
  .stat { border: 1px solid #bbb; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- herinneringen ---------- */
.push-card { margin-top: 20px; }
.push-card .push-on { font-weight: 700; margin: 0; }
.reminder-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; }
.reminder-label { font-weight: 700; }
.reminder-row .input { width: 8.5rem; }
.reminder-on { min-height: 52px; }
@media (max-width: 400px) { .reminder-row { grid-template-columns: 1fr 1fr; } .reminder-label { grid-column: 1 / -1; } }

/* ---------- hulpvragen ---------- */
.help-btn { margin-top: 6px; align-self: flex-start; }
.help-general { margin-bottom: 14px; }
.help-status { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin-top: 6px; }
.help-quote { font-style: italic; overflow-wrap: anywhere; }
.help-text { min-height: 90px; resize: vertical; }
.help-block { border: 2px solid var(--primary); }
.help-praise { margin: 6px 0 0; font-weight: 800; color: var(--ok); }
.badge.help { background: var(--primary-soft); color: var(--primary); }

/* ---------- niet hier ---------- */
.cell.c-away { background: repeating-linear-gradient(135deg, var(--grey-soft) 0 6px, var(--surface) 6px 12px); color: var(--muted); font-weight: 600; border-color: var(--border); }
.swatch.c-away { background: repeating-linear-gradient(135deg, var(--grey-soft) 0 4px, var(--surface) 4px 8px); border-color: var(--border); }
.away-note { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.celebrate.away-card { background: var(--primary-soft); color: var(--primary); }
.wg-away-btn { margin-left: auto; min-height: 36px; padding: 2px 10px; }
.presence-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.presence-day {
  display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 0; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--border); background: var(--surface); min-height: 62px;
}
.presence-day .pd-day { font-size: .72rem; color: var(--muted); font-weight: 700; }
.presence-day .pd-num { font-size: 1.05rem; font-weight: 800; }
.presence-day .pd-state { font-size: .68rem; font-weight: 700; color: var(--ok); }
.presence-day.away { background: repeating-linear-gradient(135deg, var(--grey-soft) 0 6px, var(--surface) 6px 12px); }
.presence-day.away .pd-state { color: var(--muted); }
.presence-day.override { border-color: var(--primary); }
@media print { .wg-away-btn { display: none !important; } }

/* ---------- tweewekelijks ritme ---------- */
.badge.week-letter { margin-left: 6px; background: var(--primary-soft); color: var(--primary); }
.badge.week-letter.week-b { background: var(--warn-soft); color: var(--warn); }
.presence-day.week-b .pd-day::after { content: " B"; }
.presence-day.week-a .pd-day::after { content: " A"; }

/* ---------- aandringen ---------- */
.nag-banner { padding: 14px 16px; border-radius: var(--radius); background: var(--warn-soft); color: var(--text); border: 2px solid var(--warn); margin-bottom: 14px; }
.nag-banner .nag-count { font-weight: 900; font-size: 1.15rem; color: var(--warn); }
.nag-banner .plain-list { margin: 6px 0 0; font-weight: 700; }
.push-status { margin: 6px 0 0; font-size: .92rem; font-weight: 600; }
.push-status.off { color: var(--bad); }
.push-status.on { color: var(--ok); }

/* ---------- logboek en automatisch slot ---------- */
.log-list { list-style: none; margin: 0; padding: 0; }
.log-row { padding: 10px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.log-row:first-child { border-top: 0; }
.log-what { font-weight: 700; }
.log-row.role-child .log-what { color: var(--warn); }
dialog.lockscreen {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 24px 18px; border: 0;
  background: var(--bg); color: var(--text);
}
dialog.lockscreen::backdrop { background: var(--bg); }
.lock-form { max-width: 360px; margin: 12vh auto 0; }
body.is-locked .app, body.is-locked .toast-area { visibility: hidden; }

.push-status.opened { color: var(--muted); font-weight: 500; margin-top: 2px; }

/* ---------- eerlijke telling: afgevinkt is nog geen "gedaan" ---------- */
.cell.c-waiting { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.swatch.c-waiting { background: var(--primary-soft); border-color: var(--primary); }
.badge.waiting { background: var(--primary-soft); color: var(--primary); }
.chip.waiting { background: var(--primary-soft); }
.waiting-note { margin: 8px 0 0; padding: 6px 12px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.stat.wait .stat-value { color: var(--primary); }
.trace { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; overflow-wrap: anywhere; }
.badge.trace-flag { background: var(--warn-soft); color: var(--warn); }

.undo-note { margin: 8px 0 0; padding: 6px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 700; }

/* ---------- lange of rare tekst blijft in zijn vak ---------- */
body { overflow-wrap: anywhere; }
.card, .chore, .item, .daycard, .list-card, .wk-entry, .agreement-card, .weekly-card, .log-row, .nag-banner { overflow: hidden; min-width: 0; }
.chore-body, .item-body, .grow { min-width: 0; }
.kidname { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip, .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ---------- kop per kind in het rapport: nooit afgekapt op een smalle telefoon ---------- */
.kidcard-head { flex-wrap: wrap; row-gap: 6px; }
.report-kid .kidcard-head .count { flex: 1 1 11rem; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.report-kid .trend { white-space: normal; }
