/* DryKit-app. Eén kolom zo breed als een telefoon; op een groot scherm in het midden. Huisstijl van de kit: Fredoka en Nunito, waterblauw, zonnegeel, koraal, mint en lila, geen zwarte tekst. */
:root {
  --bg: #FFF8EE; --surface: #FFFFFF; --tint: #DCEBFB; --tint-2: #EEF5FD;
  --ink: #1F6FC4; --text: #2D5A9E; --muted: #5A72A0; --line: #EADFCF;
  --water: #3D8DE0; --sun: #FFC83D; --sun-soft: #FFF1C7; --coral: #FF7A59; --coral-ink: #D9482F; --coral-soft: #FFE3DA;
  --mint: #5BC98C; --mint-ink: #178A5A; --mint-soft: #D8F5E6; --lila: #B9A6FF; --lila-ink: #6A4FD0; --lila-soft: #ECE6FF;
  --stage: #E7EEF7; --pip-face: #1E3A66; --on-accent: #FFFFFF; --shade: rgba(31, 111, 196, 0.18);
  --display: 'Fredoka', 'Trebuchet MS', sans-serif; --body: 'Nunito', 'Trebuchet MS', sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #12233B; --surface: #19304F; --tint: #1F3D63; --tint-2: #1A3557;
  --ink: #A9D2FF; --text: #DCEBFB; --muted: #9DB4D6; --line: #2A4468;
  --water: #5AA3EE; --sun: #FFC83D; --sun-soft: #4A3F1E; --coral: #FF8A6E; --coral-ink: #FFA58E; --coral-soft: #4A2B2A;
  --mint: #5BC98C; --mint-ink: #7EE0AB; --mint-soft: #1D4436; --lila: #B9A6FF; --lila-ink: #C9BAFF; --lila-soft: #2F2C55;
  --stage: #0C1828; --pip-face: #1E3A66; --on-accent: #FFFFFF; --shade: rgba(0, 0, 0, 0.4); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #12233B; --surface: #19304F; --tint: #1F3D63; --tint-2: #1A3557;
  --ink: #A9D2FF; --text: #DCEBFB; --muted: #9DB4D6; --line: #2A4468;
  --water: #5AA3EE; --sun: #FFC83D; --sun-soft: #4A3F1E; --coral: #FF8A6E; --coral-ink: #FFA58E; --coral-soft: #4A2B2A;
  --mint: #5BC98C; --mint-ink: #7EE0AB; --mint-soft: #1D4436; --lila: #B9A6FF; --lila-ink: #C9BAFF; --lila-soft: #2F2C55;
  --stage: #0C1828; --pip-face: #1E3A66; --on-accent: #FFFFFF; --shade: rgba(0, 0, 0, 0.4); color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--stage); color: var(--text); font-family: var(--body); font-weight: 700; font-size: 15px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; text-wrap: balance; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
a { color: var(--ink); }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; position: relative; }
@media (min-width: 560px) { .app { box-shadow: 0 0 60px var(--shade); } }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px max(18px, env(safe-area-inset-right, 0px)) 6px max(18px, env(safe-area-inset-left, 0px)); }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--ink); }
.brand .dot { color: var(--coral); }
.top-right { display: flex; align-items: center; gap: 8px; }
.kid { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 2px solid var(--tint); border-radius: 999px; padding: 4px 12px 4px 6px; font-size: 13px; max-width: 170px; }
.kid span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av { width: 24px; height: 24px; border-radius: 50%; background: var(--sun); color: var(--pip-face); font-family: var(--display); display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.iconbtn { border: none; background: var(--surface); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.iconbtn svg { width: 20px; height: 20px; }
main { flex: 1; padding: 6px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; }

.card { background: var(--surface); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.soft { background: var(--tint-2); }
.eyebrow { font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; font-weight: 800; color: var(--coral-ink); }
.muted { color: var(--muted); font-size: 13.5px; }
.h2 { font-size: 21px; line-height: 1.15; }
.page-head { display: flex; flex-direction: column; gap: 4px; padding: 6px 4px 2px; }
.page-head h1 { font-size: 30px; line-height: 1.05; }
.page-head p { color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.btn { border: none; border-radius: 999px; padding: 12px 20px; font-family: var(--display); font-weight: 600; font-size: 16px; background: var(--water); color: var(--on-accent); align-self: flex-start; text-align: center; }
.btn.wide { align-self: stretch; }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--tint); }
.btn.coral { background: var(--coral); }
.btn.mint { background: var(--mint); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: default; }
.linkbtn { border: none; background: none; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 800; align-self: flex-start; }

/* Formulieren */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .lbl { font-size: 12.5px; color: var(--muted); font-weight: 800; }
.input { width: 100%; min-width: 0; border: 2px solid var(--tint); background: var(--bg); color: var(--ink); border-radius: 14px; padding: 10px 12px; font: 600 17px var(--display); }
.input.code { text-transform: uppercase; letter-spacing: 3px; font-size: 22px; text-align: center; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 2px solid var(--tint); background: transparent; border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 800; color: var(--text); }
.chip[aria-pressed="true"] { background: var(--water); border-color: var(--water); color: var(--on-accent); }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.check:first-child { border-top: none; }
.check input { appearance: none; width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--tint); background: var(--bg); margin: 0; display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--mint); border-color: var(--mint); }
.check input:checked::after { content: ''; width: 11px; height: 6px; border-left: 3px solid #FFFFFF; border-bottom: 3px solid #FFFFFF; transform: translateY(-2px) rotate(-45deg); }
.moment-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px 36px; gap: 8px; align-items: center; }
.moment-row .input { font-size: 15px; padding: 8px 10px; }
.del { border: none; background: var(--coral-soft); color: var(--coral-ink); border-radius: 50%; width: 34px; height: 34px; font-size: 18px; }
.err { color: var(--coral-ink); font-size: 13.5px; }

/* Start */
.welcome { background: var(--tint); border-radius: 26px; padding: 22px 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.welcome h1 { font-size: 34px; line-height: 1.02; }
.steps-dots { display: flex; gap: 6px; padding: 0 4px; }
.steps-dots span { height: 6px; flex: 1; border-radius: 3px; background: var(--tint); }
.steps-dots span.on { background: var(--water); }
.verdict { border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.verdict.good { background: var(--mint-soft); }
.verdict.wait { background: var(--sun-soft); }
.verdict b { font-family: var(--display); font-size: 19px; color: var(--ink); }

/* Vandaag */
.hero { background: var(--tint); border-radius: 26px; padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.hero h1 { font-size: 38px; line-height: 1; padding-right: 76px; }
.hero h1 span { color: var(--coral); }
.hero .sub { font-size: 14px; padding-right: 64px; }
.hero .pip { position: absolute; right: 12px; top: 10px; }
.weeks { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: 18px; padding: 10px; }
.week { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.week .wl { font-size: 11.5px; color: var(--muted); }
.drops { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; justify-items: center; }
.drop { border: none; background: none; padding: 0; width: 100%; max-width: 26px; display: block; }
.drop svg { width: 100%; height: auto; aspect-ratio: 24 / 27; display: block; }
.reward { font-size: 10.5px; font-weight: 800; padding: 3px 6px; border-radius: 999px; background: var(--sun-soft); white-space: nowrap; }
.reward.final { background: var(--coral-soft); }
.today-drop { animation: bob 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.tip .todo { background: var(--tint-2); border-radius: 14px; padding: 10px 12px; display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.tip .todo b { color: var(--ink); }
.party { background: var(--sun-soft); }
.next { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--mint-soft); border-radius: 16px; padding: 10px 14px; font-size: 14px; }
.next b { color: var(--ink); }
.next .t { font-family: var(--display); font-size: 24px; color: var(--mint-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.log-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lb { border: none; border-radius: 20px; padding: 14px 4px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--display); font-weight: 600; font-size: 17px; min-height: 100px; transition: transform .12s; }
.lb:active { transform: scale(.96); }
.lb svg { width: 36px; height: 36px; }
.lb small { font-family: var(--body); font-size: 11.5px; font-weight: 700; color: var(--muted); }
.lb.ok { background: var(--mint-soft); color: var(--mint-ink); }
.lb.try { background: var(--lila-soft); color: var(--lila-ink); }
.lb.oops { background: var(--coral-soft); color: var(--coral-ink); }
.where { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.log { display: flex; flex-direction: column; }
.log-row { display: grid; grid-template-columns: 48px 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 14px; }
.log-row:first-child { border-top: none; }
.log-row .time { font-variant-numeric: tabular-nums; color: var(--muted); }
.pin { width: 12px; height: 12px; border-radius: 50%; }
.pin.ok { background: var(--mint); } .pin.try { background: var(--lila); } .pin.oops { background: var(--coral); }
.log-row .who { font-size: 12px; color: var(--muted); }
.x { border: none; background: none; color: var(--muted); font-size: 18px; width: 30px; height: 30px; border-radius: 50%; }
.evening { background: var(--sun-soft); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.evening .row { flex-wrap: wrap; }

/* Voortgang */
.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; height: 130px; padding-top: 8px; }
.bar { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; }
.bar i { display: block; border-radius: 5px; min-height: 0; }
.bar i.ok { background: var(--mint); } .bar i.try { background: var(--lila); } .bar i.oops { background: var(--coral); }
.bar-labels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; font-size: 11px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.insight { background: var(--tint-2); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.path { display: flex; flex-direction: column; }
.path-step { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.path-step:first-child { border-top: none; }
.path-step .n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: var(--on-accent); }
.path-step .when { font-size: 12px; color: var(--muted); }

/* Hulp */
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.help { border: none; text-align: left; background: var(--surface); border-radius: 20px; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 118px; transition: transform .12s; }
.help:active { transform: scale(.97); }
.help .badge { width: 34px; height: 34px; }
.help b { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--ink); line-height: 1.15; }
.help span { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.help.urgent { background: var(--coral-soft); }
.help.urgent b { color: var(--coral-ink); }
.say { background: var(--tint); border-radius: 18px; padding: 12px 14px; font-family: var(--display); font-weight: 500; font-size: 18px; color: var(--ink); line-height: 1.3; }
.say small { display: block; font-family: var(--body); font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.block h3 { font-size: 16px; margin-bottom: 6px; }
.block ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.block li { position: relative; padding-left: 22px; }
.block li::before { content: ''; position: absolute; left: 3px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--mint); }
.block.not li::before { background: var(--coral); border-radius: 2px; transform: rotate(45deg); }
.block.know { background: var(--surface); border-radius: 18px; padding: 12px 14px; }
.block.know.doctor, .doctor-card { background: var(--sun-soft); }

/* Delen */
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 2px solid var(--tint); border-radius: 14px; padding: 8px 8px 8px 12px; }
.linkbox code { flex: 1; min-width: 0; font: 700 13px var(--body); color: var(--ink); overflow-wrap: anywhere; max-height: 3.2em; overflow: hidden; }
.linkbox button { border: none; background: var(--water); color: var(--on-accent); border-radius: 10px; padding: 8px 12px; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.preview-card { border: 2px dashed var(--tint); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }

/* Diploma */
.diploma { background: var(--surface); border: 6px solid var(--water); border-radius: 22px; padding: 18px 16px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; position: relative; overflow: hidden; }
.diploma .flags { position: absolute; left: 0; right: 0; top: 0; height: 26px; }
.diploma .kick { font-size: 11px; letter-spacing: 3px; color: var(--coral-ink); font-weight: 800; text-transform: uppercase; margin-top: 18px; }
.diploma h1 { font-size: 26px; }
.diploma .name { font-family: var(--display); font-size: 34px; color: var(--coral); line-height: 1; }
.diploma .photo { width: 120px; height: 120px; border-radius: 18px; border: 3px dashed var(--tint); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 12px; background: var(--bg); }
.diploma .photo img { width: 100%; height: 100%; object-fit: cover; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: fall 2.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* Tabs */
.tabs { position: sticky; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.tab { border: none; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 12px; font-weight: 800; color: var(--muted); border-radius: 14px; }
.tab svg { width: 26px; height: 26px; }
.tab[aria-current="page"] { color: var(--ink); background: var(--tint-2); }
.tab.helptab[aria-current="page"] { color: var(--coral-ink); background: var(--coral-soft); }

/* Bladen en meldingen */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; background: rgba(18, 35, 59, 0.42); }
.sheet { width: 100%; max-width: 480px; background: var(--bg); border-radius: 28px 28px 0 0; max-height: 90vh; overflow-y: auto; padding: 10px max(18px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 12px; }
.grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); align-self: center; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sheet-head h2 { font-size: 26px; line-height: 1.05; }
.close { border: none; background: var(--surface); border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0; color: var(--ink); font-size: 20px; }
.toast { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 28px); max-width: 452px; background: var(--surface); border-radius: 20px; padding: 14px; box-shadow: 0 10px 30px var(--shade); display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.toast b { font-family: var(--display); font-size: 18px; color: var(--ink); display: block; }
.toast .act { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.toast .act button { border: none; border-radius: 999px; padding: 7px 12px; font-weight: 800; font-size: 13px; background: var(--tint); color: var(--ink); }

/* Printbare dagenkaart */
.print-area { display: none; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #FFFFFF; }
  .app, .sheet-wrap, .toast { display: none !important; }
  .print-area { display: block; color: #1F6FC4; font-family: var(--body); }
  .print-area h1 { font-size: 40px; color: #1F6FC4; }
  .print-area h1 span { color: #E8573F; }
  .pk-row { display: grid; grid-template-columns: 90px repeat(7, 1fr) 110px; gap: 10px; align-items: center; margin-top: 14px; }
  .pk-row svg { width: 70px; height: 80px; }
  .pk-row .rw { border: 3px dashed #FFC83D; border-radius: 14px; padding: 10px; text-align: center; font-weight: 800; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
