/* Devoted. Elk thema vult dezelfde set kleuren in; de rest van de opmaak gebruikt alleen die namen. */
:root {
  --bg: #17171a; --panel: #1f1f23; --tile: #27272b; --line: #3a3a40;
  --fg: #f5f5f7; --muted: #a3a3ad; --faint: #6d6d77;
  --accent: #ec4899; --on-accent: #fff;
  --accent2: #9b4dea; --on-accent2: #fff;
  --bar: var(--bg); --on-bar: var(--fg);
  --them: var(--tile); --on-them: var(--fg);
  --yellow: #facc15; --red: #f0524f; --green: #4ade80; --blue: #6aa5f8;
  --art: radial-gradient(120% 90% at 30% 15%, color-mix(in srgb, var(--accent2) 45%, var(--tile)) 0%, var(--tile) 60%, var(--panel) 100%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --tab-h: 70px; --top-h: 62px;
  color-scheme: dark;
}
:root[data-theme="robijn"] {
  --bg: #212123; --panel: #29292c; --tile: #323236; --line: #48484e;
  --accent: #d99a16; --on-accent: #1d1400; --accent2: #a81419; --on-accent2: #fff;
  --bar: #8f1013; --on-bar: #fff; --them: #c98c0c; --on-them: #1d1400;
}
:root[data-theme="oceaan"] {
  --bg: #0f1820; --panel: #15212c; --tile: #1c2b38; --line: #2f4354; --muted: #9db0bf; --faint: #5f7485;
  --accent: #22d3ee; --on-accent: #04222a; --accent2: #3b82f6; --on-accent2: #fff;
}
:root[data-theme="smaragd"] {
  --bg: #101915; --panel: #16221c; --tile: #1d2d25; --line: #30473b; --muted: #9db8a9; --faint: #5f7d6d;
  --accent: #34d399; --on-accent: #052218; --accent2: #0f9d8c; --on-accent2: #fff;
}
:root[data-theme="licht"] {
  --bg: #f3f2f7; --panel: #ffffff; --tile: #f7f6fb; --line: #dad6e4;
  --fg: #1f1b2d; --muted: #666176; --faint: #9a96a8;
  --accent: #d6307c; --on-accent: #fff; --accent2: #7c3aed; --on-accent2: #fff;
  --them: #e8e5f1; --on-them: #1f1b2d;
  --yellow: #b7860b; --red: #d43b38; --green: #1e9a53; --blue: #2f6fd6;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.45 var(--font); -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
h1, h2, h3, p, ol { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.f { fill: currentColor; stroke: none; }
.muted { color: var(--muted); } .small { font-size: 13px; } .strong { font-weight: 700; } .center { text-align: center; } .mt { margin-top: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; } .gap-l { gap: 14px; } .gap-s { gap: 6px; }
.grow { flex: 1; }
.center-note { padding: 40px 16px; text-align: center; color: var(--muted); }

/* inloggen */
.auth { max-width: 420px; margin-inline: auto; padding: calc(28px + env(safe-area-inset-top, 0px)) 16px 40px; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.brand img { border-radius: 18px; }
.brand h1 { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* bovenbalk */
.top, .chat-top { position: fixed; top: 0; left: 0; right: 0; z-index: 6; background: var(--bar); color: var(--on-bar); padding: env(safe-area-inset-top, 0px) max(10px, calc(50% - 276px)) 0; height: calc(var(--top-h) + env(safe-area-inset-top, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; font-size: 26px; position: relative; border-radius: 12px; flex-shrink: 0; }
.icon-btn.boxed { background: var(--tile); font-size: 22px; }
.icon-btn.bell { opacity: .45; } .icon-btn.bell.has { opacity: 1; }
.count { position: absolute; top: 0; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.count.inline { position: static; margin-left: auto; }
.pill-name { display: flex; align-items: center; gap: 10px; border: 1px solid color-mix(in srgb, currentColor 28%, transparent); border-radius: 99px; padding: 5px 18px 5px 6px; min-width: 0; font-weight: 500; }
.pill-name span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* avatar: foto of eerste letter */
.av { border-radius: 50%; background: #d4d4d8; color: #3f3f46; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; overflow: hidden; position: relative; width: 32px; height: 32px; font-size: 15px; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.m { width: 46px; height: 46px; font-size: 20px; }
.av.l { width: 92px; height: 92px; font-size: 42px; }
.av.ring { box-shadow: 0 0 0 3px var(--accent), 0 0 22px color-mix(in srgb, var(--accent) 55%, transparent); }
.av-wrap { position: relative; display: inline-grid; }
.dot { position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px; border-radius: 50%; background: #9ca3af; border: 3px solid var(--tile); }
.dot.on { background: #22c55e; }
.dot.s { width: 13px; height: 13px; border-width: 2px; right: -1px; bottom: -1px; border-color: var(--bar); }

.wrap { max-width: 572px; margin-inline: auto; padding: calc(var(--top-h) + 10px + env(safe-area-inset-top, 0px)) 16px calc(var(--tab-h) + 104px + env(safe-area-inset-bottom, 0px)); }
section.view { display: flex; flex-direction: column; gap: 14px; padding-bottom: 84px; }
.empty { padding: 24px 18px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.h-sec { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; }
.h-sec svg { color: var(--accent); font-size: 22px; }

/* hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.art { border-radius: 18px; background: var(--art); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 172px; padding: 14px; text-align: center; overflow: hidden; }
.art em { font-style: normal; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art small { color: var(--muted); font-size: 13px; }
.art small.on { color: var(--green); }
.tiles { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tile { flex: 1; background: var(--tile); border-radius: 18px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.tile div { text-align: center; flex: 1; min-width: 0; }
.tile b { display: block; font-weight: 800; font-size: 32px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile span.l { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.tile > span:last-child { display: grid; font-size: 36px; }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.duo button { border-radius: 10px; padding: 9px 6px; font-weight: 800; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; line-height: 1.15; }
.duo .add { background: color-mix(in srgb, var(--red) 28%, var(--tile)); color: var(--red); }
.duo .forgive { background: color-mix(in srgb, var(--green) 22%, var(--tile)); color: var(--green); }
.strip { border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); border-radius: 12px; padding: 10px 14px; text-align: center; }
.strip.two { border-color: color-mix(in srgb, var(--accent2) 45%, var(--line)); background: color-mix(in srgb, var(--accent2) 12%, var(--panel)); }
.strip.red { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); background: color-mix(in srgb, var(--red) 10%, var(--panel)); }

/* secties en rijen */
.sec { background: var(--panel); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-radius: 14px; padding: 16px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.sec > h2 { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding-inline: 4px; }
.sec > h2 svg { font-size: 20px; }
.sec > h2.warn { color: var(--yellow); }
.sec > p { padding-inline: 4px; }
.row { background: var(--tile); border: 1px solid var(--line); border-radius: 12px; padding: 12px 6px 12px 12px; display: flex; align-items: center; gap: 12px; }
.row.pad { padding-right: 12px; } .row.wrap-row { flex-wrap: wrap; } .row.top-align { align-items: flex-start; }
.row.off { opacity: .55; }
.row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; width: 100%; }
.r-title { font-weight: 700; font-size: 16.500px; line-height: 1.25; overflow-wrap: anywhere; }
.r-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.r-note { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.row.done .r-title { text-decoration: line-through; color: var(--muted); }
.cb { width: 30px; height: 30px; border-radius: 9px; border: 2.500px solid var(--accent); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; color: transparent; }
.cb.on { background: var(--green); border-color: var(--green); color: #10321c; }
.cb.wait { border-color: var(--yellow); color: var(--yellow); }
.cb:disabled { cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; padding: 3px 8px; border-radius: 7px; border: 1px solid var(--line); background: color-mix(in srgb, var(--fg) 5%, var(--tile)); white-space: nowrap; }
.chip.pts { border-color: color-mix(in srgb, var(--yellow) 40%, var(--line)); background: color-mix(in srgb, var(--yellow) 10%, var(--tile)); } .chip.pts svg { color: var(--yellow); }
.chip.rep { border-color: color-mix(in srgb, var(--accent2) 50%, var(--line)); background: color-mix(in srgb, var(--accent2) 14%, var(--tile)); }
.chip.str { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); background: color-mix(in srgb, var(--red) 9%, var(--tile)); }
.chip.two { border-color: color-mix(in srgb, var(--accent2) 55%, var(--line)); background: color-mix(in srgb, var(--accent2) 14%, var(--tile)); } .chip.two svg { color: var(--accent2); }
.chip.ok { border-color: color-mix(in srgb, var(--green) 50%, var(--line)); color: var(--green); }
.chip.warn { border-color: color-mix(in srgb, var(--yellow) 50%, var(--line)); color: var(--yellow); }
.chip.bad { border-color: color-mix(in srgb, var(--red) 50%, var(--line)); color: var(--red); }
.dots { width: 34px; height: 40px; display: grid; place-items: center; color: var(--muted); font-size: 22px; flex-shrink: 0; border-radius: 8px; }
.act { border-radius: 9px; padding: 10px 18px; font-weight: 700; font-size: 15px; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; background: var(--accent2); color: var(--on-accent2); }
.act.red { background: var(--red); color: #fff; } .act.green { background: #22a559; color: #fff; }
.act.plain { background: color-mix(in srgb, var(--fg) 10%, var(--tile)); color: var(--fg); }
.act.locked, .act:disabled { background: color-mix(in srgb, var(--fg) 7%, var(--tile)); color: var(--faint); cursor: not-allowed; }
.seg { display: flex; background: var(--panel); border-radius: 12px; padding: 5px; gap: 4px; }
.seg button { flex: 1 1 auto; padding: 9px 8px; border-radius: 8px; font-weight: 700; font-size: 13px; line-height: 1.2; min-width: 0; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent2) 30%, var(--panel)); color: color-mix(in srgb, var(--accent2) 70%, var(--fg)); }
.seg.red button[aria-pressed="true"] { background: color-mix(in srgb, var(--red) 28%, var(--panel)); color: var(--red); }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fchips { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; min-width: 0; }
.fchip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--muted); }
.fchip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.filters select { width: auto; padding: 6px 10px; font-size: 13px; font-weight: 600; border-radius: 10px; }
.btn { background: var(--accent); color: var(--on-accent); font-weight: 700; border-radius: 10px; padding: 11px 16px; font-size: 15px; }
.btn.quiet { background: var(--tile); border: 1px solid var(--line); color: var(--fg); }
.btn.danger { background: var(--red); color: #fff; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; }
.link { color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: underline; align-self: flex-start; }
.auth-links .link { align-self: center; }
.pts-v { font-variant-numeric: tabular-nums; font-weight: 800; flex-shrink: 0; padding-right: 8px; }
.pts-v.up { color: var(--red); } .pts-v.down { color: var(--green); }

/* stats en achievements */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--tile); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; min-width: 0; }
.stat > span { display: grid; font-size: 30px; }
.stat b { display: block; font-weight: 800; font-size: 28px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat div span { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.ach { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bdg { background: var(--tile); border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.bdg .ico { width: 100%; aspect-ratio: 1; max-width: 120px; border-radius: 8px; background: var(--panel); display: grid; place-items: center; }
.bdg .ico span, .badge-big { width: 76%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(26px, 9vw, 40px); background: color-mix(in srgb, var(--accent2) 18%, var(--tile)); box-shadow: 0 0 0 2px var(--accent), 0 0 16px color-mix(in srgb, var(--accent) 60%, transparent); }
.badge-big { width: 110px; font-size: 52px; align-self: center; }
.badge-big.lock { box-shadow: 0 0 0 2px var(--line); filter: grayscale(1); opacity: .5; }
.bdg .t { font-size: 13px; font-weight: 500; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bdg .p { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bdg.lock .ico span { box-shadow: 0 0 0 2px var(--line); filter: grayscale(1); opacity: .45; }
.bdg.lock .t { color: var(--muted); }
.more { color: var(--accent); font-weight: 700; align-self: center; padding: 8px; }

.safe { border: 1px solid color-mix(in srgb, var(--red) 45%, var(--line)); background: color-mix(in srgb, var(--red) 9%, var(--panel)); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.safe .word { font-weight: 800; font-size: 30px; line-height: 1.1; color: var(--red); overflow-wrap: anywhere; }
.cap { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.entry-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* profiel */
.profile-head { display: flex; align-items: center; gap: 18px; padding: 6px 4px; }
.code-box { font: 700 22px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; background: var(--tile); border: 1px dashed var(--line); border-radius: 10px; padding: 12px; text-align: center; user-select: all; overflow-wrap: anywhere; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.theme { border: 2px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; font-size: 13px; font-weight: 600; }
.theme[aria-pressed="true"] { border-color: var(--accent); }
.theme i { display: flex; height: 34px; border-radius: 8px; overflow: hidden; }
.theme i b { flex: 1; }
.steps { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
code { background: var(--tile); border-radius: 5px; padding: 1px 5px; font-size: 14px; }

/* chat */
.chat-top { justify-content: flex-start; }
.chat-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.chat-who b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-who span { font-size: 13px; opacity: .85; }
body.in-chat .wrap { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
.msgs { display: flex; flex-direction: column; gap: 8px; }
.day-sep { align-self: center; font-size: 12px; color: var(--muted); padding: 6px 0 2px; }
.msg { max-width: 82%; padding: 9px 14px; border-radius: 18px 18px 18px 5px; background: var(--them); color: var(--on-them); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.msg.me { align-self: flex-end; background: var(--accent2); color: var(--on-accent2); border-radius: 18px 18px 5px 18px; }
.msg time { font-size: 11px; opacity: .75; margin-left: auto; white-space: nowrap; }
.msg.media { padding: 5px; flex-direction: column; align-items: stretch; gap: 4px; }
.msg.media time { padding: 0 8px 3px; }
.msg.media .cap-text { padding: 2px 8px; }
.msg img, .msg video { display: block; max-width: 100%; max-height: 340px; border-radius: 14px; background: #000; }
.msg button.img { display: block; }
.msg audio { width: min(260px, 64vw); height: 40px; }
.msg.big { background: none; box-shadow: none; padding: 0 4px; flex-direction: column; align-items: flex-end; color: var(--fg); }
.msg.big:not(.me) { align-items: flex-start; }
.msg.big .emoji { font-size: 64px; line-height: 1.1; }
.msg.big time { background: var(--them); color: var(--on-them); padding: 3px 9px; border-radius: 10px; opacity: 1; margin: 0; }
.msg.big.me time { background: var(--accent2); color: var(--on-accent2); }
.composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--panel); border-radius: 22px 22px 0 0; padding: 10px max(12px, calc(50% - 274px)) calc(12px + env(safe-area-inset-bottom, 0px)); }
.compose, .rec { display: flex; align-items: center; gap: 6px; border-bottom: 2px solid var(--line); padding-bottom: 4px; }
.compose input[type="text"] { flex: 1; min-width: 0; background: none; border: 0; padding: 10px 6px; font-size: 17px; outline: none; }
.compose .icon-btn { color: var(--muted); }
.send { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
.rec { gap: 10px; } .rec .send { margin-left: auto; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); animation: pulse 1s infinite; }
#rec-time { font-variant-numeric: tabular-nums; font-weight: 700; }
@keyframes pulse { 50% { opacity: .25; } }

/* formulieren */
input[type="text"], input[type="number"], input[type="email"], input[type="password"], select, textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
input[type="file"] { font-size: 14px; max-width: 100%; }
textarea { resize: vertical; min-height: 80px; }
/* Invoervelden altijd goed leesbaar (en geen inzoomen op een iPhone). */
input, select, textarea { font-size: 16px; font-weight: 400; color: var(--fg); }
.wiz-body input, .wiz-body select, .wiz-body textarea { font-size: 17px; padding: 13px 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
form { display: flex; flex-direction: column; gap: 14px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; gap: 10px; } .actions > * { flex: 1; }
.menu-btn { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; background: var(--tile); font-weight: 600; font-size: 16px; text-align: left; width: 100%; }
.menu-btn svg { font-size: 22px; color: var(--accent); }
.menu-btn.danger, .menu-btn.danger svg { color: var(--red); }
.menu-btn:disabled { opacity: .38; cursor: default; }
.moods { display: flex; gap: 8px; }
.moods label { flex: 1; flex-direction: row; justify-content: center; border: 1px solid var(--line); border-radius: 10px; padding: 11px 0; color: var(--fg); font-weight: 800; font-size: 17px; cursor: pointer; }
.moods input { position: absolute; opacity: 0; pointer-events: none; }
.moods label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.moods label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* overlays: menu van links, panelen van onderen */
.overlay { position: fixed; inset: 0; z-index: 10; background: rgba(0, 0, 0, 0); visibility: hidden; transition: background .26s ease, visibility 0s linear .26s; display: flex; }
.overlay.open { background: rgba(0, 0, 0, .62); visibility: visible; transition: background .26s ease, visibility 0s; }
.drawer { width: min(84vw, 330px); height: 100%; background: var(--panel); padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; transform: translateX(-102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; }
.overlay.open .drawer { transform: none; }
.drawer-me { display: flex; align-items: center; gap: 14px; padding: 8px 6px 16px; text-align: left; }
.drawer-me b { display: block; font-size: 18px; } .drawer-me small { color: var(--muted); font-size: 13px; }
.sheet { align-items: flex-end; justify-content: center; }

/* scherm van één taak */
.layer { position: fixed; inset: 0; z-index: 9; background: var(--bg); display: flex; flex-direction: column; gap: 10px; padding: calc(14px + env(safe-area-inset-top, 0px)) max(18px, calc(50% - 268px)) calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(100%); visibility: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .3s; }
.layer.open { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.layer-title { flex: 1; font-size: 22px; font-weight: 800; }
.wiz-top .link { align-self: center; white-space: nowrap; }
.note { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; background: var(--tile); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.note .n-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: transparent; }
.note.fresh { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, var(--tile)); }
.note.fresh .n-dot { background: var(--accent); }
.note span.t { display: block; overflow-wrap: anywhere; } .note small { color: var(--muted); font-size: 13px; }
.tv-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 8px 2px 24px; }
.tv-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.tv-head h2 { font-size: 30px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; min-width: 0; }
.tv-count { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.tv-count b { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 0 6px; }
.tv-count button { width: 46px; height: 46px; border-radius: 50%; font-size: 26px; display: grid; place-items: center; background: var(--tile); }
.tv-count button.plus { background: var(--accent); color: var(--on-accent); }
.tv-count button:disabled { opacity: .3; cursor: default; }
.tv-line { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.tv-line svg { font-size: 26px; color: var(--red); }
.tv-line.good svg { color: var(--accent); }
.tv-body h3 { font-size: 26px; font-weight: 800; text-align: center; margin-top: 18px; }
.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; text-align: center; }
.gauges svg { width: 100%; max-width: 190px; height: auto; fill: none; stroke-width: 22; }
.gauges .track { stroke: var(--tile); } .gauges .value { stroke: var(--accent); transition: stroke-dashoffset .6s ease; }
.gauges b { display: block; font-size: 20px; } .gauges span { font-weight: 700; }
.tv-stat { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.tv-stat svg { font-size: 24px; color: var(--accent); } .tv-stat b { margin-left: auto; font-variant-numeric: tabular-nums; }
.panel.tall { max-height: 88%; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-grid button { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--tile); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; max-height: none; }
.switch-row, .check-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; color: var(--fg); font-size: 17px; font-weight: 600; }
.check-row { font-weight: 400; padding: 6px 0; }
.check-row input { width: 24px; height: 24px; accent-color: var(--accent); flex-shrink: 0; }
.switch { appearance: none; -webkit-appearance: none; width: 58px; height: 32px; border-radius: 99px; border: 2px solid var(--line); background: none; position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s, border-color .2s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); transition: transform .2s, background .2s; }
.switch:checked { background: var(--accent); border-color: var(--accent); }
.switch:checked::after { transform: translateX(26px); background: var(--on-accent); }
button.main { text-align: left; cursor: pointer; }
.dim { opacity: .45; pointer-events: none; }

/* taak toevoegen: stappen op een volledig scherm */
.full { justify-content: center; }
.wiz { background: var(--bg); width: 100%; max-width: 572px; height: 100%; display: flex; flex-direction: column; gap: 14px; padding: calc(14px + env(safe-area-inset-top, 0px)) 18px calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.overlay.open .wiz { transform: none; }
.wiz-top { display: flex; align-items: center; gap: 14px; }
.wiz-top .icon-btn { width: 52px; height: 52px; border-radius: 18px; }
.wiz-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.wiz-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width .3s ease; }
.wiz-body { flex: 1; overflow-y: auto; padding: 6px 2px; }
.wiz-body section { display: flex; flex-direction: column; gap: 16px; }
.wiz-body h2 { font-size: 21px; font-weight: 800; line-height: 1.25; margin-top: 8px; }
.wiz-body label { position: relative; }
.counter { align-self: flex-end; font-weight: 500; font-variant-numeric: tabular-nums; }
.wiz-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wiz-row select { flex: 1; min-width: 140px; } .wiz-row input[type="number"] { width: 84px; text-align: center; } .wiz-row input[type="date"] { flex: 1; min-width: 150px; }
input[type="time"], input[type="date"] { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
/* tijdstip kiezen: twee draaiwielen (uren en minuten) op de 24-uursklok */
.wheel { position: relative; height: 220px; display: flex; justify-content: center; gap: 30px; -webkit-mask-image: linear-gradient(transparent, #000 28%, #000 72%, transparent); mask-image: linear-gradient(transparent, #000 28%, #000 72%, transparent); }
.wheel-band { position: absolute; left: 6%; right: 6%; top: 88px; height: 44px; border-radius: 12px; background: var(--tile); }
.wheel-col { position: relative; height: 220px; width: 76px; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; padding-block: 88px; text-align: center; border-radius: 12px; overscroll-behavior: contain; }
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-col span { display: block; height: 44px; line-height: 44px; scroll-snap-align: center; font-size: 25px; color: var(--muted); font-variant-numeric: tabular-nums; cursor: pointer; }
.wheel-col span.sel { color: var(--fg); font-size: 32px; font-weight: 600; }
.btn.big { padding: 16px; border-radius: 99px; font-size: 17px; }
.ideas { display: flex; flex-wrap: wrap; gap: 10px; }
.ideas button { background: var(--tile); border-radius: 99px; padding: 14px 20px; font-weight: 700; font-size: 16px; }
.daybtns { display: flex; justify-content: space-between; gap: 4px; }
.daybtns button { width: 13%; max-width: 52px; aspect-ratio: 1; border-radius: 50%; background: var(--tile); font-weight: 700; }
.daybtns button[aria-pressed="true"], .cal button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 8px; font-size: 19px; text-transform: capitalize; }
.cal-head button { width: 44px; height: 44px; font-size: 24px; display: grid; place-items: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid span { color: var(--muted); font-size: 13px; padding: 4px 0; }
.cal-grid button { aspect-ratio: 1; border-radius: 50%; font-size: 16px; max-width: 48px; width: 100%; justify-self: center; }
.cal-grid button:disabled { color: var(--faint); cursor: default; }
.cal-grid button.today:not([aria-pressed="true"]) { box-shadow: inset 0 0 0 2px var(--line); }
@media (prefers-reduced-motion: no-preference) { .wiz-body section:not([hidden]) { animation: step-in .26s cubic-bezier(.2, .8, .2, 1); } @keyframes step-in { from { opacity: 0; transform: translateX(24px); } } }

/* beloningen */
.fold { background: var(--tile); border-radius: 18px; padding: 0 16px; }
.fold > summary { list-style: none; cursor: pointer; padding: 16px 0; font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2.500px solid currentColor; border-bottom: 2.500px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.fold[open] > summary::after { transform: rotate(-135deg); }
.fold > summary span { font-weight: 400; font-size: 15px; margin-left: auto; } .fold > summary span + * { margin: 0; }
.fold > summary:has(span)::after { margin-left: 0; }
.fold > div { padding: 2px 0 18px; }
.fold input, .fold textarea, .fold select { background: var(--bg); }
.hint { display: block; font-weight: 400; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.rf-images { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rf-images > * { aspect-ratio: 1; border-radius: 12px; overflow: hidden; position: relative; background: var(--bg); }
.rf-images img { width: 100%; height: 100%; object-fit: cover; }
.rf-images .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; font-size: 15px; }
.rf-images .add { border: 2px dashed var(--line); display: grid; place-items: center; font-size: 28px; color: var(--muted); }
.wheel-opt { display: flex; gap: 8px; align-items: center; } .wheel-opt input { flex: 1; min-width: 0; }
.wheel-opt button { width: 40px; height: 40px; border-radius: 10px; background: var(--bg); font-size: 18px; flex-shrink: 0; display: grid; place-items: center; }
.thumb { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--panel); }
.rv-images { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
.rv-images:empty { display: none; }
.rv-images button { flex: 0 0 auto; scroll-snap-align: start; }
.rv-images img { height: 190px; width: auto; max-width: 78vw; border-radius: 14px; object-fit: cover; max-height: none; }
.quote { border-left: 3px solid var(--accent); padding-left: 10px; font-style: italic; overflow-wrap: anywhere; }
/* rad van fortuin: een schijf met vakken die draait en onder de wijzer stopt */
.fortune { position: relative; width: min(78vw, 300px); aspect-ratio: 1; align-self: center; margin-top: 14px; }
.fortune-disc { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 6px var(--tile), 0 0 0 8px var(--line), 0 10px 30px rgba(0, 0, 0, .45); transition: transform 4.200s cubic-bezier(.12, .7, .1, 1); }
.fortune-disc svg { width: 100%; height: 100%; display: block; stroke: none; fill: none; stroke-width: 0; }
.fortune-disc text { font-weight: 700; font-family: var(--font); }
.fortune-pin { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 1; width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 26px solid var(--fg); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
@media (prefers-reduced-motion: reduce) { .fortune-disc { transition: none; } }
.wheel-spin { font-size: 26px; font-weight: 800; min-height: 64px; display: grid; place-items: center; padding: 14px; border-radius: 18px; background: var(--tile); overflow-wrap: anywhere; }
.wheel-spin.done { background: color-mix(in srgb, var(--accent) 18%, var(--tile)); box-shadow: 0 0 0 2px var(--accent), 0 0 22px color-mix(in srgb, var(--accent) 50%, transparent); }

/* teller bij een taak die vaker moet */
.tally { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; min-width: 44px; }
.tally b { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 15px; }
.tally .plus { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 20px; }
.tally.done b { color: var(--green); } .tally.missed b { color: var(--red); }
.row.missed .r-title { color: var(--muted); }
.cb.missed { border-color: var(--red); color: var(--red); }
.panel { background: var(--panel); border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px)); width: 100%; max-width: 572px; max-height: 92%; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; transform: translateY(104%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.overlay.open .panel { transform: none; }
.panel h3 { font-weight: 800; font-size: 20px; }
.panel img { border-radius: 12px; max-height: 50vh; object-fit: contain; align-self: center; max-width: 100%; }
.pick-head { display: flex; align-items: center; gap: 16px; }
.pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pick button { background: var(--tile); border-radius: 22px; padding: 18px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; }
.pick svg { font-size: 34px; }
.viewer { align-items: center; justify-content: center; padding: 16px; }
.viewer.open { background: rgba(0, 0, 0, .92); }
.viewer img, .viewer video { max-width: 100%; max-height: 100%; border-radius: 10px; }
.panel video { border-radius: 12px; max-height: 50vh; max-width: 100%; align-self: center; background: #000; }
.photo-grid video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.photo-grid button { position: relative; }
.photo-grid .play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: #fff; background: rgba(0, 0, 0, .25); }
.viewer .icon-btn { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }

.fab { position: fixed; z-index: 7; right: max(18px, calc(50% - 270px)); bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom, 0px)); width: 62px; height: 62px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 30px; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--panel); padding-bottom: env(safe-area-inset-bottom, 0px); border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
nav.tabs div { max-width: 572px; margin-inline: auto; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--tab-h); }
nav.tabs button { color: var(--fg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 14px; position: relative; min-width: 0; transition: color .2s; }
nav.tabs button svg { font-size: 26px; }
nav.tabs button[aria-selected="true"] { color: var(--accent); }
nav.tabs .count { top: 8px; right: calc(50% - 26px); min-width: 18px; height: 18px; font-size: 11px; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + 96px + env(safe-area-inset-bottom, 0px)); z-index: 20; background: var(--fg); color: var(--bg); padding: 9px 16px; border-radius: 99px; font-size: 14px; font-weight: 700; max-width: calc(100% - 32px); text-align: center; }

@media (max-width: 370px) { .cols { grid-template-columns: 1fr; } .tile b { font-size: 26px; } .tile > span:last-child { font-size: 28px; } .act { padding: 9px 12px; } }
@media (prefers-reduced-motion: no-preference) {
  section.view:not([hidden]) { animation: view-in .28s cubic-bezier(.2, .8, .2, 1); }
  @keyframes view-in { from { opacity: 0; transform: translateY(10px); } }
  .act, .btn, .fab, .cb, .send, .menu-btn, .pick button { transition: transform .12s, background .2s; }
  .act:active, .btn:active, .fab:active, .cb:active, .send:active, .pick button:active { transform: scale(.95); }
  .fab { animation: pop .3s cubic-bezier(.2, 1.4, .4, 1); }
  @keyframes pop { from { transform: scale(0); } }
  .msg.new { animation: msg-in .24s ease-out; }
  @keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
  .cb.on svg { animation: pop .25s cubic-bezier(.2, 1.6, .4, 1); }
}
@media (prefers-reduced-motion: reduce) { .overlay, .drawer, .panel, .wiz, .layer { transition: none; } }

/* Notities */
.fmt-bar { display: flex; gap: 6px; }
.fmt-bar button { flex: 1; padding: 10px 0; border-radius: 10px; background: var(--tile); font-weight: 700; font-size: 15px; }
.page-text { overflow-wrap: anywhere; line-height: 1.5; display: flex; flex-direction: column; gap: 8px; }
.page-text h4 { font-size: 20px; font-weight: 800; margin-top: 6px; }
.page-text h5 { font-size: 16px; font-weight: 800; margin-top: 4px; }
.page-text ul, .page-text ol { padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.page-text ul { list-style: disc; } .page-text ol { list-style: decimal; }
.page-text a { color: var(--accent); text-decoration: underline; }
.fmt-bar { gap: 4px; }
.fmt-bar button { display: grid; place-items: center; min-width: 0; padding: 9px 0; font-size: 14px; }
.fmt-bar button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fmt-bar button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.page-text h1 { font-size: 21px; font-weight: 800; margin-top: 6px; }
.page-text h2 { font-size: 17px; font-weight: 800; margin-top: 4px; }
.page-text.editor { display: block; min-height: 300px; padding: 13px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line, rgba(255,255,255,.12)); font-size: 17px; outline: none; user-select: text; -webkit-user-select: text; }
.page-text.editor:focus { border-color: var(--accent); }
.page-text.editor > * + * { margin-top: 8px; }
