/* KinHub Kids — a 13" tablet on the wall, at a child's height.
 *
 * Design rules this file keeps to, all of them for the same reason:
 *  - Nothing is red and nothing is ever styled as failure. An undone thing just
 *    hasn't happened yet.
 *  - Touch targets are at least 88px. Small buttons on a wall, read at an angle,
 *    by someone in a hurry, do not get hit.
 *  - One accent colour at a time — the colour of whoever is looking at it.
 *  - Type is large enough to read across a kitchen, and short enough to be worth
 *    reading. Text weights stay <= 600, per the house style.
 *  - Works the same in portrait and landscape; the mount isn't decided yet.
 */
:root {
  --bg: #F7F4EF;            /* warm paper, not clinical white */
  --surface: #FFFFFF;
  --surface-alt: #F0EBE3;
  --border: #E3DCD1;
  --text: #2E2A26;
  --sub: #6B635A;
  --muted: #9A9188;
  --accent: #00A398;        /* replaced per member at runtime */
  --accent-light: #E3F5F3;
  --gold: #E8A317;
  --radius: 22px;
  --gap: 16px;
  font-size: 18px;
}
@media (min-width: 1100px) { :root { font-size: 20px; } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overscroll-behavior: none; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Red Hat Text', system-ui, sans-serif;
  /* A wall tablet is never reading prose and never wants a text cursor. */
  -webkit-user-select: none; user-select: none;
}
.root { height: 100%; display: flex; flex-direction: column; }
.boot { margin: auto; color: var(--muted); font-size: 2rem; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

/* ── shared shell ───────────────────────────────────────────────────────── */
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pad { padding: var(--gap) clamp(16px, 3vw, 32px); }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 32px; }
.row { display: flex; align-items: center; gap: var(--gap); }
.grow { flex: 1; min-width: 0; }
.h1 { font-size: 2.2rem; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.h2 { font-size: 1.25rem; font-weight: 600; margin: 0 0 10px; color: var(--sub); }
.quiet { color: var(--muted); font-family: Poppins, sans-serif; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

/* ── pairing ────────────────────────────────────────────────────────────── */
.pair { margin: auto; text-align: center; max-width: 620px; padding: 32px; }
.pair h1 { font-size: 2.6rem; font-weight: 600; margin: 0 0 8px; }
.pair p { font-size: 1.15rem; color: var(--sub); font-family: Poppins, sans-serif; line-height: 1.6; }
.code-in {
  width: 100%; margin: 28px 0 20px; padding: 22px; text-align: center;
  font-size: 3rem; font-weight: 600; letter-spacing: 0.35em; text-transform: uppercase;
  border: 3px solid var(--border); border-radius: var(--radius); background: var(--surface);
  color: var(--text); font-family: 'Red Hat Text', monospace; -webkit-user-select: text; user-select: text;
}
.code-in:focus { outline: none; border-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 88px; padding: 0 36px; border-radius: var(--radius);
  background: var(--accent); color: #fff; font-size: 1.35rem; font-weight: 600;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; }
.btn-quiet { background: var(--surface); color: var(--sub); border: 1px solid var(--border); }
.err { color: #A8582C; font-family: Poppins, sans-serif; margin-top: 14px; min-height: 1.5em; }

/* ── who's looking (picker) ─────────────────────────────────────────────── */
.picker { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.picker-grid {
  display: grid; gap: clamp(16px, 2.5vw, 28px);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  padding: 0 clamp(16px, 4vw, 48px);
}
.who {
  position: relative; aspect-ratio: 1 / 1; max-height: 42vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  border-radius: 32px; background: var(--surface); border: 3px solid var(--border);
  transition: transform .14s ease;
}
.who:active { transform: scale(.96); }
.who .face {
  width: clamp(88px, 14vh, 150px); aspect-ratio: 1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(2.4rem, 6vh, 4rem); font-weight: 600; color: #fff; overflow: hidden;
}
.who .face img { width: 100%; height: 100%; object-fit: cover; }
.who .nm { font-size: clamp(1.4rem, 3vh, 2rem); font-weight: 600; }
.badge {
  position: absolute; top: 14px; right: 14px; min-width: 56px; height: 56px; padding: 0 14px;
  border-radius: 28px; background: var(--gold); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 1.25rem; font-weight: 600; box-shadow: 0 4px 14px rgba(232,163,23,.4);
  animation: nudge 2.4s ease-in-out 6;
}
@keyframes nudge { 0%,88%,100% { transform: scale(1); } 94% { transform: scale(1.12); } }
/* A child with something waiting is gold all the way round, so it reads from
 * the other end of the hall rather than needing the badge to be read.
 *
 * Power: the glow is drawn once, on a layer of its own, and only its opacity
 * and size animate -- animating box-shadow repainted the card every frame. It
 * breathes a few times to catch the eye, then holds still at full glow, as
 * does the badge: any endless animation keeps Chromium composing frames all
 * day on a screen nobody may be looking at (measured ~1.5 W). */
.who.has-stars { border-color: var(--gold); }
.who.has-stars::before {
  content: ''; position: absolute; inset: -3px; border-radius: 32px; pointer-events: none; z-index: -1;
  box-shadow: 0 0 0 11px rgba(232,163,23,.10), 0 14px 40px rgba(232,163,23,.42);
  will-change: opacity, transform;
  animation: gold-breathe 3.2s ease-in-out 5 forwards;
}
@keyframes gold-breathe {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .35; transform: scale(.985); }
}
.who.both .faces { display: flex; }
.who.both .faces .face { margin-right: -22px; border: 4px solid var(--surface); }

/* ── member shell ───────────────────────────────────────────────────────── */
.top { display: flex; align-items: center; gap: var(--gap); padding: 14px clamp(16px, 3vw, 32px) 0; }
.back { width: 72px; height: 72px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); font-size: 1.8rem; display: flex; align-items: center; justify-content: center; }
.top .face { width: 62px; aspect-ratio: 1; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 600; overflow: hidden; }
.top .face img { width: 100%; height: 100%; object-fit: cover; }
.pts { display: flex; align-items: baseline; gap: 8px; padding: 10px 22px; border-radius: 999px; background: var(--accent-light); color: var(--accent); }
.pts b { font-size: 1.9rem; font-weight: 600; }

/* Now / Next — the most important thing on the screen. ADHD makes clock time
 * nearly useless and "what is happening and what is after it" essential. */
.nownext { display: grid; gap: var(--gap); margin: var(--gap) clamp(16px,3vw,32px) 0; grid-template-columns: 1fr; }
@media (min-width: 860px) { .nownext { grid-template-columns: 1.4fr 1fr; } }
.now { padding: 24px; border-radius: var(--radius); background: var(--accent); color: #fff; display: flex; align-items: center; gap: 22px; min-height: 150px; }
.now .lbl, .next .lbl { font-size: .95rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.now .ttl { font-size: 2rem; font-weight: 600; line-height: 1.15; }
.next { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); min-height: 150px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.next .ttl { font-size: 1.5rem; font-weight: 600; }
.next .when { color: var(--sub); font-family: Poppins, sans-serif; }

/* Time you can see rather than read — a ring that drains. */
.ring { width: 104px; height: 104px; flex: none; }
.ring circle { fill: none; stroke-width: 11; }
.ring .track { stroke: rgba(255,255,255,.28); }
.ring .fill { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring text { fill: #fff; font-size: 26px; font-weight: 600; text-anchor: middle; font-family: 'Red Hat Text', sans-serif; }

/* ── tabs ───────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 10px; padding: var(--gap) clamp(16px,3vw,32px) 0; }
.tab { flex: 1; min-height: 80px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); font-size: 1.2rem; font-weight: 600; color: var(--sub); display: flex; align-items: center; justify-content: center; gap: 10px; }
.tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── day list ───────────────────────────────────────────────────────────── */
.per { margin: 22px clamp(16px,3vw,32px) 8px; font-size: 1rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.items { display: grid; gap: 12px; padding: 0 clamp(16px,3vw,32px); }
.item { display: flex; align-items: center; gap: 18px; min-height: 100px; padding: 16px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-align: left; }
.item .tick { width: 56px; height: 56px; flex: none; border-radius: 50%; border: 3px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.7rem; color: transparent; }
.item.done { background: var(--accent-light); border-color: transparent; }
.item.done .tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.item.done .ttl { text-decoration: line-through; text-decoration-thickness: 3px; color: var(--sub); }
.item .ttl { font-size: 1.4rem; font-weight: 500; }
.item .sub { color: var(--sub); font-family: Poppins, sans-serif; font-size: .95rem; }
.item .pt { color: var(--gold); font-weight: 600; font-size: 1.15rem; }
.item.ev { border-left: 8px solid var(--gold); }
.meals { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); padding: 0 clamp(16px,3vw,32px); }
.meal { padding: 18px 20px; border-radius: var(--radius); background: var(--surface-alt); }
.meal .lbl { font-size: .85rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.meal .ttl { font-size: 1.2rem; font-weight: 500; margin-top: 4px; }

/* ── week ───────────────────────────────────────────────────────────────── */
.wk-modes { display: flex; gap: 10px; padding: var(--gap) clamp(16px,3vw,32px) 0; flex-wrap: wrap; }
.chip { min-height: 64px; padding: 0 26px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 1.05rem; font-weight: 600; color: var(--sub); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.wk { display: grid; gap: 12px; padding: var(--gap) clamp(16px,3vw,32px); grid-template-columns: 1fr; }
@media (min-width: 900px) and (orientation: landscape) { .wk.seven { grid-template-columns: repeat(7, 1fr); } .wk.five { grid-template-columns: repeat(5, 1fr); } .wk.two { grid-template-columns: repeat(2, 1fr); } }
.dayc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.dayc.today { border-color: var(--accent); border-width: 3px; }
.dayc .dn { font-size: 1.15rem; font-weight: 600; }
.dayc .dn small { display: block; color: var(--muted); font-weight: 400; font-size: .85rem; font-family: Poppins, sans-serif; }
.slot { background: var(--surface-alt); border-radius: 14px; padding: 12px 14px; }
.slot .lbl { font-size: .75rem; font-weight: 600; letter-spacing: .12em; color: var(--muted); }
.slot .ttl { font-size: 1.05rem; font-weight: 500; margin-top: 2px; }
.slot .more { font-size: .85rem; color: var(--muted); font-family: Poppins, sans-serif; }
.slot.empty .ttl { color: var(--muted); font-weight: 400; }

/* ── things to do ───────────────────────────────────────────────────────── */
.acts { display: grid; gap: 14px; padding: var(--gap) clamp(16px,3vw,32px); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.act { min-height: 150px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; text-align: left; }
.act .ttl { font-size: 1.45rem; font-weight: 600; }
.act .with { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--sub); font-family: Poppins, sans-serif; }
.act.picked { border-color: var(--accent); border-width: 3px; animation: pop .45s ease; }
@keyframes pop { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.spin { margin: var(--gap) clamp(16px,3vw,32px) 0; }

/* ── points ─────────────────────────────────────────────────────────────── */
.claims { display: grid; gap: 14px; padding: var(--gap) clamp(16px,3vw,32px); }
/* White, so a star to collect reads as a thing to do rather than as more of
   the coloured band above it. The gold is on the star, where it belongs. */
.claim { min-height: 130px; padding: 22px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); display: flex; align-items: center; gap: 20px; text-align: left; }
.claim .ic { font-size: 2.8rem; width: 3.4rem; text-align: center; }
.claim .amt { font-size: 2.2rem; font-weight: 600; color: var(--gold); flex: none; }
.claim .why { font-size: 1.3rem; font-weight: 500; }
.claim .from { opacity: .85; font-family: Poppins, sans-serif; font-size: .95rem; }
/* Collecting happens in three beats rather than one slide: the card springs
 * under the finger so the tap is felt, a star leaves it and arcs into the
 * running total, and the card then folds out of the list so the ones below
 * glide up instead of snapping. */
.claim.going { animation: claim-pop .26s cubic-bezier(.34,1.56,.64,1) forwards; }
@keyframes claim-pop {
  0%   { transform: scale(1); }
  100% { transform: scale(1.05); box-shadow: 0 0 0 4px rgba(232,163,23,.55), 0 14px 40px rgba(232,163,23,.35); }
}
.claim.gone { animation: claim-fold .44s cubic-bezier(.4,0,.2,1) forwards; overflow: hidden; }
@keyframes claim-fold {
  0%   { max-height: var(--h,200px); opacity: 1; transform: scale(1.05); }
  40%  { opacity: 0; transform: scale(.92); }
  100% { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; margin-bottom: -14px; }
}
.star-fly {
  position: fixed; z-index: 60; pointer-events: none; color: var(--gold);
  font-size: 3.4rem; line-height: 1; text-shadow: 0 6px 22px rgba(232,163,23,.7);
  will-change: transform, opacity;
}
/* Whatever it lands on takes the hit, so the star arrives somewhere rather
 * than just stopping. */
.landed { animation: land .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes land {
  0%, 100% { transform: scale(1); }
  40%      { transform: scale(1.22); box-shadow: 0 0 0 8px rgba(232,163,23,.28); }
}
.goal { margin: var(--gap) clamp(16px,3vw,32px); padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.bar { height: 26px; border-radius: 13px; background: var(--surface-alt); overflow: hidden; margin-top: 14px; }
.bar > i { display: block; height: 100%; border-radius: 13px; background: var(--accent); transition: width .9s cubic-bezier(.2,.8,.2,1); }

/* Celebration. Big, brief, and impossible to miss. */
/* The dim is not decoration. Without it the gold "+5" landed on the gold claim
 * cards and could not be read at all, and the unlocked line sat on top of a
 * card's own words. Dimming the room for a second makes it a moment. */
.burst { position: fixed; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; z-index: 50; animation: burst-dim 1.8s ease forwards; }
@keyframes burst-dim {
  0%        { background: rgba(28,24,20,0); }
  14%, 72%  { background: rgba(28,24,20,.58); }
  100%      { background: rgba(28,24,20,0); }
}
.burst .n { position: relative; font-size: 7rem; font-weight: 600; color: var(--gold); animation: burst 1.5s cubic-bezier(.34,1.56,.64,1) forwards; text-shadow: 0 8px 30px rgba(0,0,0,.18); }
@keyframes burst { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 22% { transform: scale(1.22) rotate(3deg); opacity: 1; } 55% { transform: scale(1) rotate(0); opacity: 1; } 100% { transform: scale(1.06); opacity: 0; } }
/* A ring pushing out from the number: it reads as impact at a glance, which a
 * number growing on its own does not. */
.burst .ring { position: absolute; width: 22vh; height: 22vh; border-radius: 50%; border: 6px solid var(--gold); animation: shock .9s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes shock { 0% { transform: scale(.2); opacity: .85; } 100% { transform: scale(3.4); opacity: 0; } }
.conf { position: absolute; left: 50%; top: 50%; width: 8px; height: 12px; margin: -6px 0 0 -4px; border-radius: 2px; opacity: 0; animation: pop 1.5s cubic-bezier(.12,.75,.3,1) forwards; }
@keyframes pop {
  0%   { transform: translate(0, 0) rotate(0) scale(.4); opacity: 1; }
  65%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1); opacity: 0; }
}

/* ── photo booth ─────────────────────────────────────────────────────────
 * A tile on the home screen, then the camera full screen. The rules are the
 * same as everywhere else here: one finger, no reading, nothing styled as
 * failure, and no photo leaves the tablet until a child has chosen to keep it.
 */
.who.booth { border-style: dashed; }
.who.booth .face { background: var(--gold); font-size: clamp(2.4rem, 6vh, 4rem); }

.booth-full { position: fixed; inset: 0; z-index: 60; background: #111; display: flex; flex-direction: column; }
.booth-stage { flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.booth-stage video, .booth-stage img, .booth-stage canvas {
  max-width: 100%; max-height: 100%; width: auto; height: auto; display: block;
}
/* The preview is mirrored so moving left moves the reflection left. The saved
 * photo is not — a mirrored photograph of a person reads as wrong. */
.booth-stage video.mirror { transform: scaleX(-1); }
.booth-stage video.rot90 { transform: rotate(90deg); }
.booth-stage video.rot180 { transform: rotate(180deg); }
.booth-stage video.rot270 { transform: rotate(270deg); }
.booth-stage video.mirror.rot90 { transform: rotate(90deg) scaleX(-1); }
.booth-stage video.mirror.rot180 { transform: rotate(180deg) scaleX(-1); }
.booth-stage video.mirror.rot270 { transform: rotate(270deg) scaleX(-1); }

.booth-bar { display: flex; align-items: center; gap: var(--gap); padding: clamp(12px,2vh,20px) clamp(16px,3vw,32px); background: #1b1b1b; }
.booth-bar .btn { min-height: 88px; }
.booth-bar .btn-quiet { background: #2a2a2a; color: #eee; border-color: #3a3a3a; }
.booth-say { flex: 1; color: #fff; font-size: 1.3rem; font-weight: 600; }
.booth-say small { display: block; font-weight: 400; font-size: .95rem; opacity: .7; font-family: Poppins, sans-serif; }

/* The countdown is the whole interface for three seconds, so it is enormous. */
.booth-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.booth-count span { font-size: 28vh; font-weight: 600; color: #fff; text-shadow: 0 10px 50px rgba(0,0,0,.6); animation: tick 1s ease-in-out; }
@keyframes tick { 0% { transform: scale(.55); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.booth-flash { position: absolute; inset: 0; background: #fff; animation: flash .45s ease-out forwards; pointer-events: none; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
/* The frame preview, drawn by the same code that draws it onto the photo. It
 * is positioned and sized from the video's own box in JS, because the video is
 * letterboxed inside the stage — a frame pinned to the stage would float away
 * from the picture. Deliberately not mirrored: a reversed star would be a lie
 * about the photo that gets kept. */
.booth-stage #frameview { position: absolute; max-width: none; max-height: none; pointer-events: none; }

/* Two rows of choices: the look, then the frame. Emoji lead so a child who
 * cannot read yet can still tell them apart, and they scroll sideways rather
 * than shrinking below a finger's width. */
.booth-picks { background: #161616; padding: clamp(8px,1.4vh,14px) clamp(12px,2vw,24px); display: flex; flex-direction: column; gap: 8px; }
.booth-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.booth-row::-webkit-scrollbar { display: none; }
.booth-chip {
  flex: 0 0 auto; min-width: 92px; min-height: 76px; padding: 8px 14px; border-radius: 18px;
  background: #262626; color: #ddd; border: 3px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.booth-chip .ic { font-size: 1.7rem; line-height: 1; }
.booth-chip .lb { font-size: .8rem; font-weight: 600; white-space: nowrap; }
.booth-chip.on { background: var(--accent); color: #fff; border-color: #fff; }

.booth-tools { display: flex; gap: 10px; align-items: center; }
.booth-tool { min-height: 56px; min-width: 56px; padding: 0 16px; border-radius: 28px; background: #2a2a2a; color: #ddd; font-size: 1rem; font-weight: 600; }
.booth-tool.on { background: var(--accent); color: #fff; }

/* "I need you" — for a child who will not come and find you. */
/* In the top bar on every page, so it is always in the same place. */
.help { flex: none; min-height: 72px; padding: 0 26px; border-radius: 36px; background: var(--surface); border: 3px solid var(--accent); color: var(--accent); font-size: 1.15rem; font-weight: 600; white-space: nowrap; }
.help.sent { background: var(--accent); color: #fff; }
.empty { text-align: center; color: var(--muted); font-family: Poppins, sans-serif; font-size: 1.3rem; padding: 48px 24px; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── Both: the shared page ───────────────────────────────────────────────
 * Not a combined calendar. The photo booth, the routines every child shares,
 * and the shelf of things to do. Each child's own day lives behind their own
 * face, where it belongs.
 */
.big-card {
  width: 100%; min-height: 128px; margin: 0 0 var(--gap);
  border-radius: var(--radius); background: var(--surface); border: 3px dashed var(--border);
  display: flex; align-items: center; justify-content: center; gap: 18px;
}
.big-card:active { transform: scale(.98); }
.big-card .ic { font-size: clamp(2.4rem, 7vh, 3.6rem); line-height: 1; }
.big-card .lb { font-size: clamp(1.2rem, 3.2vh, 1.7rem); font-weight: 600; color: var(--text); }

/* One row per shared routine, with a tick per child. One of them cleaning
 * their teeth does not clean the other's, so each keeps their own. */
.shared-row { display: flex; align-items: center; gap: var(--gap); padding: clamp(12px,2vh,18px) clamp(14px,2.4vw,22px); border-bottom: 1px solid var(--border); }
.shared-row:last-child { border-bottom: 0; }
.shared-row .ttl { font-size: clamp(1.05rem, 2.6vh, 1.35rem); font-weight: 600; }
.who-ticks { display: flex; gap: 10px; }
.who-tick {
  min-width: 64px; min-height: 64px; border-radius: 32px;
  border: 3px solid var(--border); background: transparent;
  font-size: 1rem; font-weight: 600; color: var(--text);
  transition: transform .12s ease;
}
.who-tick:active { transform: scale(.94); }
.who-tick.done { color: #fff; }

/* Icons. Stored MaterialCommunityIcons names are rendered as emoji (see
   iconOf in app.js). Pin the emoji fonts explicitly: Chromium on the wall
   tablet otherwise falls back to a monochrome glyph for a few of them. */
.ic { flex: none; line-height: 1; font-family: "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji", sans-serif; font-style: normal; }
.item .ic { font-size: 2.4rem; width: 3rem; text-align: center; }
.item.done .ic { opacity: .4; }
.shared-row .ic { font-size: 1.9rem; width: 2.3rem; text-align: center; }
.act .ic { font-size: 2.6rem; margin-bottom: auto; }
.ttl .ic { font-size: .92em; margin-right: .32em; }

/* Yesterday: reachable, never competing with the days still to come. */
.yday-btn { display: block; margin: var(--gap) clamp(16px,3vw,32px) 0; padding: 10px 18px; border-radius: 999px; background: transparent; border: 1px dashed var(--border); color: var(--sub); font-size: .95rem; font-family: Poppins, sans-serif; }
.yday-btn.on { border-style: solid; color: var(--text); }
.dayc.past { opacity: .55; }

/* Recipe photos on meals. Square, cropped, and never allowed to push the name
   off the card -- the picture is the draw, the name is the confirmation. */
.pic { flex: none; display: block; background-size: cover; background-position: center; background-repeat: no-repeat; background-color: var(--surface-alt); border-radius: 14px; }
.meal.haspic { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.meal .pic { width: 72px; height: 72px; }
.slot.dinner { display: flex; align-items: center; gap: 10px; }
.slot.dinner .pic { width: 44px; height: 44px; border-radius: 10px; }

/* Points: the goal leads, in the child's own colour, and the stars waiting to
   be collected sit under it in white so they read as something to do. */
.goal-hero { margin: var(--gap) clamp(16px,3vw,32px); padding: 22px 24px; border-radius: var(--radius); color: #fff; }
.goal-hero .glbl { font-size: .95rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .78; }
.goal-hero .grow-row { display: flex; align-items: center; gap: 16px; margin: 10px 0 16px; }
.goal-hero .gico { font-size: 3rem; line-height: 1; flex: none; font-family: "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.goal-hero .gpic { width: 68px; height: 68px; flex: none; border-radius: 16px; background-size: cover; background-position: center; }
.goal-hero .gname { font-size: 1.9rem; font-weight: 600; line-height: 1.15; }
.goal-hero .gsub { font-size: 1rem; opacity: .85; margin-top: 2px; font-family: Poppins, sans-serif; }
.goal-hero .gbar { height: 14px; border-radius: 999px; background: rgba(255,255,255,.3); overflow: hidden; }
.goal-hero .gbar i { display: block; height: 100%; background: #fff; border-radius: 999px; transition: width .4s ease; }
.goal-hero .gfoot { margin-top: 10px; font-size: 1rem; opacity: .9; font-family: Poppins, sans-serif; }
.goal-claim { display: block; width: 100%; margin-top: 18px; min-height: 84px; border: 0; border-radius: 20px; background: #fff; color: var(--text); font-size: 1.5rem; font-weight: 600; font-family: inherit; }
.goal-claim.done { background: rgba(255,255,255,.22); color: #fff; }

/* The jobs bank. Quieter than a star waiting to be collected: this is an offer,
   not something already earned. */
/* Earn more stars: a quieter grid under the goal, not a second list of claims. */
.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; padding: var(--gap) clamp(16px,3vw,32px); }
.job { min-height: 76px; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); display: flex; align-items: center; gap: 12px; text-align: left; }
.job .ic { font-size: 1.7rem; width: 2.2rem; text-align: center; }
.job .jpic { width: 44px; height: 44px; border-radius: 11px; }
.job .why { font-size: 1.02rem; font-weight: 500; display: block; }
.job .jstate { font-size: .8rem; color: var(--sub); font-family: Poppins, sans-serif; }
.job .amt { font-size: 1.25rem; font-weight: 600; color: var(--gold); flex: none; }
.job.waiting { background: var(--surface-alt); border-style: dashed; }
.job.waiting .amt { color: var(--muted); }

/* "Let's go": the way into a checklist, under the step that carries it. */
.item-wrap { display: grid; gap: 8px; }
.letsgo { min-height: 72px; border: 0; border-radius: 18px; background: var(--accent-light); color: var(--accent); font-family: inherit; font-size: 1.25rem; font-weight: 600; }

/* The checklist itself, full screen. Big enough to work through standing up,
   with a picture on every line. */
.list-full { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; padding: 24px clamp(16px,3vw,32px) 22px; }
.list-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.list-head .lico { font-size: 2.8rem; line-height: 1; flex: none; font-family: "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.list-head .llbl { font-size: .85rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sub); }
.list-head .lname { font-size: 1.9rem; font-weight: 600; line-height: 1.15; }
.lclose { width: 62px; height: 62px; flex: none; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); font-size: 1.5rem; color: var(--sub); font-family: inherit; }
.list-bar { height: 12px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; margin-bottom: 16px; }
.list-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--lc); transition: width .3s ease; }
.list-items { flex: 1; overflow-y: auto; display: grid; gap: 12px; align-content: start; }
.lrow { display: flex; align-items: center; gap: 18px; min-height: 96px; padding: 0 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); font-family: inherit; font-size: 1.5rem; font-weight: 500; text-align: left; color: var(--text); }
.lrow .ltick { width: 54px; height: 54px; flex: none; border-radius: 50%; border: 3px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: transparent; }
.lrow .lic { font-size: 2.4rem; width: 3rem; text-align: center; flex: none; font-family: "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.lrow .lpic { width: 62px; height: 62px; border-radius: 15px; }
.lrow.on { background: var(--surface-alt); border-color: var(--lc); }
.lrow.on .ltick { background: var(--lc); border-color: var(--lc); color: #fff; }
.lrow.on .grow { color: var(--sub); text-decoration: line-through; text-decoration-thickness: 3px; }
.list-foot { margin-top: 16px; min-height: 84px; border: 0; border-radius: 22px; background: var(--surface-alt); color: var(--sub); font-family: inherit; font-size: 1.35rem; font-weight: 600; }
.list-foot.on { background: var(--lc); color: #fff; animation: foot-glow 1.4s ease-in-out; }
@keyframes foot-glow { 0% { transform: scale(1); } 30% { transform: scale(1.04); } 60% { transform: scale(.99); } 100% { transform: scale(1); } }

/* A list finished today: the button says so, and the row gets a tick. */
.letsgo.ready { background: var(--accent); color: #fff; }
.item.ready { position: relative; }
.item.ready::after { content: '\2713'; position: absolute; top: -8px; right: -8px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.15); }

/* An activity in Today: what this part of the day is, not a thing to tick. */
.item.act-row { border: 2px dashed var(--accent); background: var(--accent-light); }
.item.act-row .ttl { font-weight: 600; font-size: 1.5rem; }
.item.act-row .ic { font-size: 2.6rem; }

/* My Week: a picture for each part of the day, and a free day said plainly. */
.slot .lbl .sic { margin-right: 6px; font-family: "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.slot.freeday .ttl { color: var(--sub); font-weight: 500; }

/* Things to do: a photo of the real thing fills the top of the card. */
.act .apic { display: block; width: 100%; height: 120px; border-radius: 14px; margin-bottom: auto; }
.act.hasphoto { padding-top: 12px; }
.act .getready { color: var(--accent); font-weight: 600; }

/* Together today: who is at each activity. */
.who-dots { display: flex; gap: 6px; flex: none; }
.who-dot { width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 600; font-size: .95rem; display: flex; align-items: center; justify-content: center; }

/* The goal after this one, quietly. */
.goal-hero .gnext { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.3); font-size: 1rem; opacity: .9; font-family: Poppins, sans-serif; }

/* Picking the next goal. */
.pick-full { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; padding: 24px clamp(16px,3vw,32px) 22px; }
.pick-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; align-content: start; padding: 4px 2px 14px; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px 16px; border-radius: var(--radius); background: var(--surface); border: 3px solid var(--border); color: var(--text); font-family: inherit; }
.pick.on { border-color: var(--lc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lc) 25%, transparent); transform: scale(1.03); }
.pick .pico { font-size: 3.6rem; line-height: 1.1; font-family: "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.pick .ppic { width: 110px; height: 110px; border-radius: 18px; background-size: cover; background-position: center; }
.pick .pname { font-size: 1.2rem; font-weight: 600; text-align: center; line-height: 1.2; }
.pick .ppts { font-size: 1.1rem; font-weight: 600; color: var(--gold); }
.pick-go { min-height: 84px; border: 0; border-radius: 22px; background: var(--lc); color: #fff; font-size: 1.5rem; font-weight: 600; font-family: inherit; }
.pick-go:disabled { opacity: .45; }

/* The screen asleep: black, and it takes every touch until three taps wake it. */
.sleep-cover { position: fixed; inset: 0; z-index: 9999; background: #000; touch-action: none; }

/* Earn more stars, docked under the points page. Six cards show; more scroll
   inside the dock, and the stars to collect scroll above it. */
.jobs-dock { flex: none; background: var(--bg); border-top: 1px solid var(--border); box-shadow: 0 -8px 18px rgba(0,0,0,.05); padding-bottom: 12px; }
.jobs-dock .jobs { grid-template-columns: repeat(2, 1fr); padding-top: 4px; padding-bottom: 4px; max-height: calc(3 * 76px + 2 * 10px + 8px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.jobs-dock .job { height: 76px; min-height: 0; }
.jobs-dock .job .why { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) {
  .jobs-dock .jobs { grid-template-columns: repeat(3, 1fr); max-height: calc(2 * 76px + 10px + 8px); }
}

/* Points: the total sits in the goal box; each child's is on their home button. */
.goal-hero .ghead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.goal-hero .gtotal { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 16px; border-radius: 999px; background: rgba(255,255,255,.22); font-size: 1.1rem; font-weight: 600; }
.goal-hero .gtotal b { font-size: 1.6rem; }
.who .wpts { font-size: 1.25rem; font-weight: 600; color: var(--gold); }
