@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/bricolage.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
}
/* Playful "sticker" look for teenagers: thick ink outlines, hard offset shadows, loud colours per kid. */
:root {
  --bg: #FFF4E0;
  --card: #FFFFFF;
  --ink: #1A1625;
  --ink-soft: #57506A;
  --line: #1A1625;
  --primary: #7B5CFF;
  --primary-tint: #E5DEFF;
  --mirelle: #FF5DA2;
  --mirelle-tint: #FFD9EA;
  --matteo: #2BD69B;
  --matteo-tint: #CFF7E6;
  --ouder: #7B5CFF;
  --ouder-tint: #E5DEFF;
  --ok: #22C55E;
  --ok-tint: #D3F8E0;
  --wait: #FFC233;
  --wait-tint: #FFF0C2;
  --redo: #FF5A4E;
  --redo-tint: #FFDCD8;
  --moved: #3DA5FF;
  --moved-tint: #D8EDFF;
  --missed: #1A1625;
  --missed-tint: #E4E0EC;
  --disabled: #B9B4C2;
  --radius: 18px;
  --bw: 2.5px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 2px 2px 0 var(--ink);
  --nav-h: 72px;
  --display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background-color: var(--bg);
  background-image: radial-gradient(rgba(26,22,37,.09) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-family: var(--display); }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 17px; font-weight: 700; }


/* App shell */
.shell { display: flex; min-height: 100vh; }
.sidenav { display: none; }
main {
  flex: 1; width: 100%; max-width: 760px; margin: 0 auto;
  padding: 22px 16px calc(var(--nav-h) + 30px);
}
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 8px 10px env(safe-area-inset-bottom);
  background: var(--card); border-top: var(--bw) solid var(--ink);
  display: flex; gap: 6px;
}
.navbtn {
  flex: 1; border: var(--bw) solid transparent; background: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 800;
  color: var(--ink-soft); position: relative; border-radius: 14px;
}
.navbtn .ico { font-size: 22px; line-height: 1; }
.navbtn.on { color: var(--ink); background: var(--accent-tint, var(--primary-tint)); border-color: var(--ink); }
.badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--redo); color: var(--ink); font-size: 12px; font-weight: 900;
  border: 2px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.navbtn .badge { position: absolute; top: 2px; left: calc(50% + 6px); }

@media (min-width: 900px) {
  .bottomnav { display: none; }
  .sidenav {
    display: flex; flex-direction: column; gap: 6px; width: 240px; flex: none;
    padding: 24px 14px; border-right: var(--bw) solid var(--ink); background: var(--card);
    position: sticky; top: 0; height: 100vh;
  }
  .sidenav .who { display: flex; gap: 10px; align-items: center; padding: 4px 10px 18px; font-family: var(--display); font-size: 18px; }
  .sidenav .navbtn {
    flex: none; flex-direction: row; justify-content: flex-start; gap: 12px;
    padding: 11px 12px; font-size: 15px;
  }
  .sidenav .navbtn .badge { position: static; margin-left: auto; }
  main { padding: 34px 32px 48px; }
}

/* Header */
.hello { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.hello .sub { color: var(--ink); margin-top: 4px; font-weight: 600; }
.avatar {
  width: 54px; height: 54px; border-radius: 16px; flex: none; transform: rotate(-6deg);
  display: grid; place-items: center; font-weight: 900; font-size: 24px; color: var(--ink);
  background: var(--c, var(--primary)); border: var(--bw) solid var(--ink); box-shadow: var(--shadow-sm);
  font-family: var(--display);
}
.avatar.sm { width: 34px; height: 34px; font-size: 15px; border-radius: 10px; }

/* Cards and sections */
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head .hint { color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.card {
  background: var(--card); border-radius: var(--radius); border: var(--bw) solid var(--ink); box-shadow: var(--shadow);
  padding: 16px;
}
.stack { display: grid; gap: 16px; }

/* Chore card (child) */
.chore { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 14px; align-items: center; }
.chore .tile {
  width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center;
  font-size: 34px; background: var(--accent-tint, var(--primary-tint));
  border: var(--bw) solid var(--ink); transform: rotate(-5deg);
}
.stack > .chore:nth-child(even) .tile { transform: rotate(5deg); }
.chore .name { font-size: 19px; font-weight: 800; font-family: var(--display); letter-spacing: -.01em; }
.chore .meta { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.chore .quip { font-size: 14px; color: var(--ink); margin-top: 3px; font-style: italic; }
.chore .actions { grid-column: 1 / -1; display: flex; gap: 10px; }
.chore .note {
  grid-column: 1 / -1; background: var(--redo-tint); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 12px; padding: 10px 12px; font-size: 14px;
}
.chore.is-done .tile { background: var(--ok-tint); }

/* Buttons */
.btn {
  border: var(--bw) solid var(--ink); border-radius: 14px; padding: 12px 18px; font-weight: 900; font-size: 16px;
  min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: var(--shadow-sm); transition: transform .06s, box-shadow .06s; color: var(--ink);
  font-family: var(--display);
}
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.btn.primary { background: var(--accent, var(--primary)); flex: 1; }
.btn.soft { background: var(--card); }
.btn.ok { background: var(--ok); flex: 1; }
.btn.redo { background: var(--redo-tint); }
.btn.danger { background: var(--redo); }
.btn.small { min-height: 40px; padding: 7px 12px; font-size: 14px; border-radius: 11px; }
.btn:disabled { background: #EEECF0; color: var(--disabled); border-color: var(--disabled); box-shadow: none; cursor: default; }
.linkbtn { border: 0; background: none; color: var(--ink); font-weight: 800; padding: 6px 4px; text-decoration: underline; text-underline-offset: 3px; }

/* Status pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  padding: 3px 10px; font-size: 13px; font-weight: 800; border: 2px solid var(--ink); color: var(--ink); max-width: 100%;
}
.pill.open { background: var(--primary-tint); }
.pill.wacht { background: var(--wait); }
.pill.goed { background: var(--ok-tint); }
.pill.afgekeurd { background: var(--redo-tint); }
.pill.moved { background: var(--moved-tint); }
.pill.gemist { background: var(--missed-tint); }

/* Banner */
.banner {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius);
  background: var(--accent-tint, var(--primary-tint)); margin-bottom: 16px; border: var(--bw) solid var(--ink);
}
.banner .ico { font-size: 28px; transform: rotate(-12deg); }
.banner .txt { flex: 1; font-size: 14px; }
.banner .txt b { display: block; font-size: 15px; }

/* Progress */
.progress { display: flex; gap: 12px; align-items: center; font-family: var(--display); }
.progress .face { font-size: 26px; }
.bar { flex: 1; height: 18px; border-radius: 999px; background: var(--bg); overflow: hidden; border: 2px solid var(--ink); }
.bar > span { display: block; height: 100%; background: var(--accent, var(--primary)); border-right: 2px solid var(--ink); }

/* Week grid */
.week { display: grid; gap: 12px; }
.day { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; align-items: start; }
.day .dname { font-weight: 800; padding-top: 6px; font-family: var(--display); font-size: 17px; }
.day .dname small { display: block; font-weight: 600; color: var(--ink-soft); font-size: 13px; font-family: system-ui, sans-serif; }
.day.today .dname { background: var(--accent, var(--primary)); border: 2px solid var(--ink); border-radius: 10px; padding: 4px 8px; width: fit-content; }
.day.today .dname small { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 12px; padding: 6px 10px;
  font-size: 14px; font-weight: 700; background: var(--card); border: 2px solid var(--ink);
}
.chip.status small { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-top: 1px; }
.chip.status.goed { background: var(--ok-tint); }
.chip.status.wacht { background: var(--wait-tint); }
.chip.status.afgekeurd, .chip.status.gemist { background: var(--redo-tint); }
.em { display: inline-block; margin-right: .4em; }
.pill .em { margin-right: .25em; }
.dot { display: inline-block; flex: none; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ink); }
.dot.open { background: var(--primary); }
.dot.wacht { background: var(--wait); }
.dot.goed { background: var(--ok); }
.dot.afgekeurd { background: var(--redo); }
.dot.moved { background: var(--moved); }
.dot.gemist { background: var(--missed); }
.dot.overgeslagen { background: #fff; border-style: dashed; }
.chip.status.overgeslagen { background: var(--bg); border-style: dashed; }
.pill.overgeslagen { background: var(--bg); border-style: dashed; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--ink-soft); margin-top: 14px; font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Parent: review */
.review { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; align-items: center; }
.review .tile { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 30px; border: var(--bw) solid var(--ink); transform: rotate(-5deg); }
.review .actions { grid-column: 1 / -1; display: flex; gap: 10px; }

/* Parent: kid summary */
.kidsum { display: grid; gap: 16px; }
@media (min-width: 640px) { .kidsum { grid-template-columns: 1fr 1fr; } }
.counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.count { border-radius: 12px; padding: 8px 2px; text-align: center; border: 2px solid var(--ink); }
.count b { display: block; font-size: 22px; font-family: var(--display); }
.count small { font-size: 12px; font-weight: 700; white-space: nowrap; }

/* Schedule */
.slot .kidtag { flex-wrap: wrap; }
.slot .pill { white-space: normal; }
.slot { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 2px dashed rgba(26,22,37,.18); }
.slot:first-of-type { border-top: 0; }
.slot .tile { font-size: 26px; text-align: center; }
.kidtag { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; }
.kidtag i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1.5px solid var(--ink); }

/* Manage list */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar select { font: inherit; font-weight: 700; padding: 8px 10px; border-radius: 11px; border: var(--bw) solid var(--ink); background: var(--card); }
.mrow { display: grid; grid-template-columns: 24px 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 2px dashed rgba(26,22,37,.18); }
.mrow:first-child { border-top: 0; }
.mrow .tile { font-size: 26px; text-align: center; }
.mrow .sub { font-size: 13px; color: var(--ink-soft); }
.mrow.paused .tile, .mrow.paused .nm { opacity: .45; }
.mrow .ops { display: flex; gap: 4px; }
.iconbtn { border: 2px solid var(--ink); background: var(--primary-tint); color: var(--ink); border-radius: 10px; width: 38px; height: 38px; font-size: 16px; }
.iconbtn.del { background: var(--redo-tint); }
.iconbtn.more { display: none; font-weight: 900; }
@media (max-width: 639px) {
  .mrow .ops .iconbtn { display: none; }
  .mrow .ops .iconbtn.more { display: inline-block; }
}
.actionlist { display: grid; gap: 10px; }
.actionlist .btn { width: 100%; justify-content: flex-start; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); }

/* Devices */
.prow { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 0; border-top: 2px dashed rgba(26,22,37,.18); }
.prow:first-child { border-top: 0; }
.devices { grid-column: 2 / -1; display: grid; gap: 8px; }
.device { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; background: var(--bg); border: 2px solid var(--ink); border-radius: 10px; padding: 8px 10px; }
.role { font-size: 12px; font-weight: 800; color: var(--ink-soft); }

/* Tabs inside a page */
.tabs { display: flex; gap: 6px; background: var(--card); padding: 5px; border-radius: 14px; border: var(--bw) solid var(--ink); box-shadow: var(--shadow-sm); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { flex: 1 1 auto; border: 2px solid transparent; background: none; padding: 8px 10px; border-radius: 10px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.tabs button.on { background: var(--primary-tint); color: var(--ink); border-color: var(--ink); }

/* Forms */
/* minmax(0, 1fr) and min-width 0: iOS gives a time input its own minimum width, which pushed it out of the card */
label.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; font-weight: 800; font-size: 14px; margin-bottom: 14px; }
.field input, .field select, .field textarea {
  font: inherit; font-weight: 500; padding: 12px; border-radius: 12px; border: var(--bw) solid var(--ink); background: #fff; width: 100%; min-width: 0; max-width: 100%;
}
.field input[type="time"] { -webkit-appearance: none; appearance: none; display: block; min-height: 48px; text-align: left; }
.iconpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.iconpick button { border: 2px solid transparent; background: var(--bg); border-radius: 12px; height: 46px; font-size: 24px; }
.iconpick button.on { border-color: var(--ink); background: var(--primary-tint); }
/* minmax(0, 1fr) and padding 0: seven days must fit a 320 px phone, also with Safari's wider default button padding */
.daypick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.daypick button { border: 2px solid transparent; background: var(--bg); border-radius: 10px; height: 42px; padding: 0; min-width: 0; font: inherit; font-weight: 700; }
.daypick button.on { border-color: var(--ink); background: var(--primary-tint); }
.radios { display: grid; gap: 8px; }
.radio {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 14px;
  border: var(--bw) solid var(--ink); background: #fff; font-weight: 800; text-align: left; width: 100%;
}
.radio.on { background: var(--accent-tint, var(--primary-tint)); box-shadow: var(--shadow-sm); }
.radio small { display: block; font-weight: 500; color: var(--ink-soft); }

/* Modal */
.scrim { position: fixed; inset: 0; background: rgba(26,22,37,.5); z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--card); width: 100%; max-width: 520px; border-radius: 24px 24px 0 0; border: var(--bw) solid var(--ink); border-bottom: 0;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 88vh; overflow: auto;
}
@media (min-width: 640px) { .scrim { align-items: center; } .sheet { border-radius: 24px; border-bottom: var(--bw) solid var(--ink); box-shadow: 6px 6px 0 var(--ink); } }
.sheet h2 { margin-bottom: 6px; }
.sheet .lead { color: var(--ink-soft); margin: 0 0 16px; }
.sheet .foot { display: flex; gap: 10px; margin-top: 18px; }
.sheet .foot .btn { flex: 1; }

/* Toast */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%) rotate(-1.5deg); bottom: calc(var(--nav-h) + 16px);
  background: var(--wait); color: var(--ink); padding: 12px 16px; border-radius: 14px; z-index: 90;
  font-weight: 800; font-size: 15px; max-width: calc(100% - 32px); border: var(--bw) solid var(--ink); box-shadow: var(--shadow);
  font-family: var(--display);
}
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* Confetti burst after "Klaar!" */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.confetti i {
  position: absolute; top: -20px; width: 10px; height: 16px; border: 1.5px solid var(--ink); border-radius: 2px;
  animation: fall 1.4s cubic-bezier(.2,.6,.4,1) forwards;
}
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .btn { transition: none; } }

/* Empty state */
.empty { text-align: center; padding: 30px 16px; color: var(--ink); font-weight: 700; font-family: var(--display); font-size: 18px; }
.empty .big { font-size: 54px; display: inline-block; transform: rotate(-8deg); }

/* Login screens */
.auth { max-width: 420px; margin: 40px auto; text-align: center; padding: 0 16px; }
.auth .logo { font-size: 72px; display: inline-block; transform: rotate(-10deg); }
.auth h1 { margin: 10px 0 8px; font-size: 38px; }
.auth p { color: var(--ink-soft); }
.auth .btn { width: 100%; margin-top: 18px; }
.qr { width: 220px; height: 220px; margin: 8px auto; display: block; border: var(--bw) solid var(--ink); border-radius: 12px; padding: 8px; background: #fff; }
.countdown { font-weight: 900; color: var(--ink); background: var(--wait); padding: 0 6px; border-radius: 6px; }
.steps { text-align: left; margin: 12px 0 0; padding-left: 22px; }
.steps li { margin-bottom: 8px; }
.muted { color: var(--ink-soft); font-size: 14px; }

/* Additions for the live site */
.topline { display: flex; justify-content: flex-end; margin: -8px 0 4px; }
.qrbox { display: flex; justify-content: center; margin: 8px 0; }
.qrbox img { width: 220px; height: 220px; image-rendering: pixelated; border: var(--bw) solid var(--ink); border-radius: 12px; padding: 8px; background: #fff; }
.hidden { display: none !important; }
@media (min-width: 900px) { .topline { display: none; } }

/* Feeding the cats: one row per cat, morning and evening, fits a 320 px phone */
.cats summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 4px; }
.cats summary::-webkit-details-marker { display: none; }
.cats summary::after { content: "▾"; margin-left: auto; font-weight: 800; }
.cats[open] summary { margin-bottom: 10px; }
.cats[open] summary::after { content: "▴"; }
.catrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 8px; }
.catrow > b { grid-column: 1 / -1; }
.catrow + .catrow { margin-top: 12px; }
.feed { border: 2px solid var(--ink); background: var(--bg); border-radius: 12px; padding: 8px 6px; font-weight: 800; min-width: 0; }
.feed small { display: block; font-weight: 500; color: var(--ink-soft); font-size: 12px; }
.feed.done { background: var(--ok-tint); }

/* Pull to refresh hint, only in the home screen app */
.pullhint { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.pullhint.show { opacity: 1; }
