/* Little Scouts (public/kids.js). Theme tokens only, so every colour theme and dark mode just work. Calm motion. */
.kd{display:flex;flex-direction:column;gap:14px}
.kd svg{display:block}
.kd-list{display:flex;flex-direction:column;gap:8px}
.kd-list:empty{display:none}
.kd-row{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:12px 14px;width:100%}
.kd-av{display:block;width:48px;height:48px;flex:none}
.kd-av .avimg{width:100%;height:100%}
.kd-av.big{width:60px;height:60px}
.kd-t{display:flex;flex-direction:column;min-width:0;gap:2px}
.kd-t b{font:700 16px/1.25 var(--body);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kd-t>span{font-size:13px;color:var(--muted);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kd-t h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kd-go{color:var(--muted)}.kd-go svg{width:16px;height:16px}
.kd-add{width:100%}
.kd-private{display:flex;gap:8px;align-items:flex-start;margin:0;color:var(--muted);font-size:13px;line-height:1.45}
.kd-private svg{width:13px;height:13px;flex:none;margin-top:3px}

/* the add / edit form */
.kd-form input{font:16px var(--body);padding:13px 14px;border-radius:14px;border:1px solid var(--line);background:var(--surface);color:var(--ink);min-height:44px;width:100%}
.kd-form .k{margin-top:2px}
.kd-form .kd-feed{display:flex;flex-direction:column;gap:10px}
.kd-form .kd-feed[hidden]{display:none}
.kd-chips{display:flex;flex-wrap:wrap;gap:8px}
.kd-chips button{min-height:40px;padding:9px 14px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:14px;display:inline-flex;align-items:center;gap:8px}
.kd-chips button[aria-checked="true"]{background:var(--primary);color:var(--primary-ink);border-color:var(--primary)}
.kd-chips .sw,.kd-gstats .sw{width:16px;height:16px;border-radius:50%;border:1px solid var(--line);display:inline-block;flex:none}
.kd-avs{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;max-width:420px}
.kd-avs button{padding:3px;border-radius:50%;background:none;border:3px solid transparent;aspect-ratio:1}
.kd-avs button[aria-checked="true"]{border-color:var(--accent)}
.kd-avs .avimg{width:100%;height:100%}
.kd-form .text-btn.danger{color:var(--bad);font-weight:600}

/* a kid's page */
.kd-head{display:flex;align-items:center;gap:14px}
.kd-head .kd-t{flex:1}
.kd-head .kd-t .muted{font-size:14px}
.kd-alert{border-radius:var(--r);padding:16px 18px;display:flex;flex-direction:column;gap:8px}
.kd-alert b{font:800 18px/1.2 var(--display);display:block}
.kd-alert p{margin:2px 0 0;font-size:15px;line-height:1.45}
.kd-alert .ai svg{width:16px;height:16px;margin-top:3px}
.kd-alert.watch{background:var(--warn-soft);border:1px solid var(--warn);flex-direction:row;gap:10px;color:var(--ink)}
.kd-alert.watch .ai{color:var(--warn)}
.kd-alert.watch b{font:700 16px/1.3 var(--body)}
.kd-alert.call{background:var(--bad);color:var(--status-ink)}
.kd-alert.call .at{display:flex;gap:10px}
.kd-alert.call .line{font-weight:600}
.kd-alert.call .em{font-size:13px;opacity:.9;margin:0}
.kd-call{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border-radius:12px;background:rgba(255,255,255,.22);color:var(--status-ink);font-weight:700;text-decoration:none}
.kd-call svg{width:15px;height:15px}
.kd-log{gap:12px}
.kd-quick{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.kd-tile{min-height:88px;background:var(--sunk);border-radius:16px;padding:10px 6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;font-size:14px;line-height:1.2}
.kd-tile svg{width:26px;height:26px}
.kd-tile:disabled{opacity:.6}
.kd-more{background:none;padding:10px 0;min-height:44px;color:var(--accent);font-size:15px;text-align:left}
.kd-undo{display:flex;align-items:center;gap:10px;background:var(--sunk);border-radius:12px;padding:6px 6px 6px 12px;font-size:15px}
.kd-undo svg{width:16px;height:16px;flex:none}
.kd-undo span{flex:1}
.kd-undo .link-btn{font-size:15px;font-weight:700;color:var(--accent);min-height:40px;padding:0 10px}
.kd-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.kd-stat{background:var(--sunk);border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:2px}
.kd-stat b{font:800 30px/1 var(--display);font-variant-numeric:tabular-nums}
.kd-stat em{font-style:normal;font-weight:600;font-size:14px;color:var(--muted)}
.kd-stat em.low{color:var(--warn)}
.kd-stat span{font-size:13px;line-height:1.3;color:var(--muted)}
.kd-since{margin:0}
.kd-hk{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.kd-stars{display:grid;grid-template-columns:repeat(5,minmax(0,54px));gap:8px;justify-content:center}
.kd-cell{aspect-ratio:1;border-radius:50%;background:var(--sunk);display:grid;place-items:center}
.kd-cell i{font:500 12px var(--mono);color:var(--muted);font-style:normal}
.kd-cell.on{background:var(--accent-soft);border:1px solid var(--gold)}
.kd-cell svg{width:55%;height:55%}
.kd-cell.fresh svg{animation:kdfade .7s ease-out both}
@keyframes kdfade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion: reduce){.kd-cell.fresh svg,.kd-party{animation:none}}
.kd-next{margin:0;text-align:center;font-size:14px}
.kd-week{display:grid;grid-template-columns:repeat(7,1fr);align-items:end;height:60px}
.kd-week span{display:flex;flex-direction:column;align-items:center;gap:4px}
.kd-week i{width:14px;border-radius:7px;background:var(--sunk);display:block}
.kd-week i.on{background:var(--gold)}
.kd-week em{font:500 10px var(--mono);color:var(--muted);font-style:normal}
.kd-party{flex-direction:row;align-items:center;gap:12px;background:var(--accent-soft);border-color:var(--accent);animation:kdfade .5s ease-out both}
.kd-party .kd-pal{width:64px;height:64px;flex:none}
.kd-party>div{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}
.kd-party b{font:800 19px/1.2 var(--display);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kd-party .icon-btn{background:none;border:0;color:var(--muted)}
.kd-hist{display:flex;flex-direction:column;gap:8px}
.kd-day{font-size:13px;font-weight:600;color:var(--muted);margin-top:4px}
.kd-rows{list-style:none;margin:0;padding:4px;gap:0}
.kd-rows li{display:grid;grid-template-columns:22px 1fr auto auto;gap:10px;align-items:center;padding:8px 6px 8px 10px;border-bottom:1px solid var(--line)}
.kd-rows li:last-child{border-bottom:0}
.kd-rows .ri svg{width:16px;height:16px;margin:auto}
.kd-rows .rt{display:flex;flex-direction:column;min-width:0;font-size:15px;line-height:1.3}
.kd-rows small{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kd-rows small.bad{color:var(--bad)}
.kd-rows time{font:500 12px var(--mono);color:var(--muted)}
.kd-del{background:none;padding:0;width:36px;height:36px;display:grid;place-items:center;color:var(--muted);border-radius:10px}
.kd-del svg{width:14px;height:14px}
.kd-del[data-armed="1"]{width:auto;padding:0 10px;font-size:13px;color:var(--bad)}

/* the log sheet */
.kd-sheet{display:flex;flex-direction:column;gap:10px}
.kd-sheet .k{margin-top:6px}
.kd-when{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.kd-when b{flex-basis:100%;font-weight:600}
.kd-when .small-btn{flex:1}
.kd-when .small-btn:disabled{opacity:.45}
.kd-signs summary{cursor:pointer;color:var(--accent);font-weight:600;font-size:15px;min-height:44px;display:flex;align-items:center;list-style:none}
.kd-signs summary::-webkit-details-marker{display:none}
.kd-photo{display:flex;align-items:center;justify-content:center;gap:8px;border-radius:14px;padding:13px 20px;min-height:48px;font-weight:600;cursor:pointer;position:relative}
.kd-photo svg{width:18px;height:18px}
.kd-photo input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.kd-photo:focus-within{outline:3px solid var(--accent);outline-offset:2px}

/* Scout's read */
.kd-grading,.kd-graded{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:12px 0}
.kd-grading b{font:800 20px var(--display)}
.kd-grading button{width:100%}
.kd-pal{width:80px;height:80px;display:block}
.kd-pal.big{width:110px;height:110px}
.kd-graded h2{font-size:24px}
.kd-graded p{margin:0}
.kd-gstats{flex-direction:row}
.kd-gstats>div{flex:1;display:flex;flex-direction:column;gap:4px}
.kd-gstats b{display:flex;align-items:center;gap:8px;font-weight:600}
.kd-saw ul{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:4px;font-size:15px}
.kd-saved{display:flex;align-items:center;justify-content:center;gap:8px;margin:0;color:var(--muted);font-size:14px}
.kd-saved svg{width:15px;height:15px}
