:root {
  /* Brand colors, from the KiddoCue logo */
  --brand-navy: #2f49b5;
  --brand-blue: #1e88f5;
  --brand-teal: #12aeb3;
  --brand-orange: #f5a623;
  --bg: #e8f0fb;
  --card: #ffffff;
  --text: #0f2742;
  color-scheme: light;
  /* Used by menus and soft tiles (they used to fall back to light colors in dark mode). */
  --ink: var(--text);
  --soft: rgba(15, 39, 66, 0.06);
  --bg-soft: #f3f7fc;
  --mint-soft: #eefaf3;
  --sky-soft: #eef4fb;
  --muted: #5a6b84;
  --line: #dfe7f3;
  --primary: #3b5bdb;
  --primary-strong: #2f49b5;
  --primary-soft: #e3e9fd;
  --primary-ink: #ffffff;
  --accent: #0b8f94;
  --header-from: #3b5bdb;
  --header-to: #6e98fa;
  --sun: #b45309;
  --sun-soft: #fdf0cf;
  --go: #15803d;
  --go-soft: #dcf5e3;
  --danger: #c2410c;
  --danger-soft: #fde6dc;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15, 39, 66, 0.05), 0 4px 16px rgba(15, 39, 66, 0.06);
}

/* 🌙 dark: only when chosen (⚙️ Settings → Appearance); light is the default. */ html.dark {
    color-scheme: dark;
    --bg: #0b1322;
    --card: #121c2e;
    --text: #e6eef9;
    --ink: var(--text);
    --soft: rgba(255, 255, 255, 0.07);
    --bg-soft: #18253c;
    --mint-soft: #123621;
    --sky-soft: #15294a;
    --muted: #93a3bb;
    --line: #22324c;
    --primary: #8ea8f8;
    --primary-strong: #b4c6fb;
    --primary-soft: #15294a;
    --primary-ink: #06142b;
    --accent: #3fd0d4;
    --header-from: #1f2f73;
    --header-to: #33489c;
    --sun: #fbbf24;
    --sun-soft: #3a2d0d;
    --go: #4ade80;
    --go-soft: #123621;
    --danger: #fb923c;
    --danger-soft: #3b1d10;
    --shadow: none;
  }

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.2rem; display: flex; align-items: center; gap: 6px; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
.section-title { font-size: 0.95rem; color: var(--muted); margin-top: 10px; font-weight: 700; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 0.85rem; }
.center { text-align: center; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(135deg, var(--header-from), var(--header-to));
  color: #fff;
}
.beta-tag {
  font: inherit; font-size: 0.7rem; font-weight: 700; line-height: 1;
  padding: 4px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.18); color: #fff;
}
.beta-tag:hover, .beta-tag:focus-visible { background: rgba(255, 255, 255, 0.32); }
.beta-note { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--bg, #f6f3ff); border: 1px dashed var(--line); }
.whoami { font-size: 0.85rem; opacity: 0.9; text-align: right; }

.screen { max-width: 560px; margin: 0 auto; padding: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 8px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > input { flex: 1; min-width: 0; }
.row.end { justify-content: flex-end; }
.full { flex-basis: 100%; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* ---------- welcome ---------- */

.welcome { text-align: center; padding: 22px 8px 2px; }
.welcome h2 { font-size: 1.9rem; margin: 0 0 6px; letter-spacing: -0.02em; }
.welcome p { color: var(--muted); margin: 0 auto; max-width: 26em; }

/* A tilted peek at a real card, with a "they said yes" note on top. */
.peek { display: flex; flex-direction: column; align-items: flex-end; padding: 14px 6px 6px; margin: 4px 0 2px; }
.peek-card { align-self: stretch; transform: rotate(-1.5deg); pointer-events: none; box-shadow: 0 10px 30px rgba(15, 39, 66, 0.12); }
.peek-toast {
  position: relative; margin-top: -8px; transform: rotate(2deg); max-width: 92%;
  background: var(--go-soft); color: var(--text); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; font-size: 0.9rem; box-shadow: var(--shadow);
}
.trust { text-align: center; color: var(--muted); font-size: 0.92rem; margin: 0 0 4px; }

.form-title { font-size: 1.2rem; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.code-input { font: 700 1.2rem ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.15em; text-transform: uppercase; }

/* ---------- forms ---------- */

label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 0.9rem; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; padding: 0; }

input {
  font: inherit; color: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-weight: 400;
  min-height: 46px;
}
input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }

.btn {
  font: inherit; font-weight: 700;
  border: 0; border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.08s, filter 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--primary-soft); color: var(--primary-strong); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.accept { background: var(--go); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.small { padding: 7px 14px; font-size: 0.875rem; }
.btn.big { padding: 15px 20px; font-size: 1.05rem; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }

.link {
  font: inherit; font-weight: 700; color: var(--primary);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.link.back { align-self: flex-start; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  flex-direction: row; align-items: center; gap: 6px;
  padding: 9px 15px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg);
  font-weight: 500; cursor: pointer;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chip:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.chips.pick { margin-top: 10px; padding: 10px; border: 1px dashed var(--line); border-radius: 14px; }

details summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: 12px; }

/* ---------- home ---------- */

.greeting h2 { font-size: 1.5rem; }

.cta {
  display: flex; align-items: center; gap: 14px; width: 100%;
  font: inherit; text-align: left; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--header-from), var(--header-to));
  border: 0; border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
  transition: transform 0.08s;
}
.cta:active { transform: scale(0.98); }
.cta strong { display: block; font-size: 1.15rem; }
.cta small { opacity: 0.9; }
.cta-icon {
  flex: none; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, 0.2); font-size: 28px;
}
.cta-arrow { margin-left: auto; font-size: 2rem; line-height: 1; opacity: 0.8; }

.setup-nudge { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.setup-icon {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; background: var(--sun-soft); font-size: 20px;
}
.setup-text { flex: 1; min-width: 0; }
.setup-text small { display: block; color: var(--muted); font-size: 0.8rem; }
.setup-text strong { display: block; line-height: 1.25; }
.setup-dismiss { color: var(--muted); padding: 4px; }

.first-family { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 18px; }
.first-family-art { font-size: 2rem; letter-spacing: 4px; }
.first-family h3 { margin: 0; font-size: 1.25rem; }
.first-family p { margin: 0; max-width: 28em; }
.first-family .btn { width: 100%; }

.avail { display: flex; flex-direction: column; gap: 8px; }
.avail .who { font-size: 1.1rem; font-weight: 700; }
.avail .meta, .help-item .meta { color: var(--muted); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.avail .note { margin: 0; font-style: italic; }
.avail.now { border-left: 5px solid var(--go); }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.pill.now, .pill.accepted { background: var(--go-soft); color: var(--go); }
.pill.later, .pill.pending { background: var(--sun-soft); color: var(--sun); }
.pill.declined { background: var(--danger-soft); color: var(--danger); }
.pill.invite { background: var(--primary-soft); color: var(--primary-strong); }

.empty { color: var(--muted); text-align: center; padding: 18px 8px; margin: 0; }
.empty-card { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty-card .big-emoji { font-size: 2.2rem; }
.error { color: var(--danger); margin: 0; font-size: 0.9rem; }
.error:empty { display: none; }

/* ---------- family ---------- */

.invite p { margin: 0 0 8px; color: var(--muted); }
.code {
  font: 700 2rem/1.2 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.18em; margin-bottom: 10px; color: var(--primary-strong);
}
.invite-box { background: var(--primary-soft); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.invite-box .code { margin: 4px 0 0; }

.list-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.list-item small { color: var(--muted); display: block; }
.list-item .row { flex-wrap: nowrap; }
.person { display: flex; align-items: center; gap: 10px; }
.avatar {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-strong); font-weight: 800;
}

/* ---------- chrome ---------- */

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  position: relative;
  font: inherit; font-size: 0.75rem; color: var(--muted);
  background: none; border: 0; padding: 8px 4px 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabbar button span { font-size: 1.35rem; filter: grayscale(0.6); opacity: 0.8; }
.tabbar button.active { color: var(--primary); font-weight: 700; }
.tabbar button.active span { filter: none; opacity: 1; }
.badge {
  position: absolute; top: 4px; left: calc(50% + 8px);
  background: var(--danger); color: #fff;
  font-size: 0.7rem; min-width: 18px; height: 18px; line-height: 18px;
  border-radius: 9px; padding: 0 5px;
}

dialog {
  border: 0; border-radius: var(--radius);
  background: var(--card); color: var(--text);
  width: min(92vw, 440px); padding: 20px;
}
dialog::backdrop { background: rgba(4, 20, 18, 0.5); }

.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg);
  padding: 10px 18px; border-radius: 999px;
  opacity: 0; transition: opacity 0.2s, transform 0.2s;
  pointer-events: none; z-index: 1600; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- free / busy ---------- */

.segmented {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px;
}
.segmented button {
  font: inherit; font-weight: 700; color: var(--muted);
  background: none; border: 0; border-radius: 999px; padding: 10px; cursor: pointer;
}
.segmented button.active { background: var(--primary); color: var(--primary-ink); }
.segmented button.active[data-mode="busy"] { background: var(--muted); color: var(--card); }

.busy-link { align-self: center; font-size: 0.9rem; color: var(--muted); }
.row.two > label { flex: 1; min-width: 0; }
.row.two input { width: 100%; }
/* iPhone date and time boxes have a built-in minimum width that can push them past the edge. */
input[type="date"], input[type="time"] { min-width: 0; max-width: 100%; box-sizing: border-box; -webkit-appearance: none; appearance: none; }
button.chip { font: inherit; color: inherit; }
.chips.days .chip { min-width: 48px; justify-content: center; padding: 9px 10px; }

.busy-list { padding: 4px 16px; }
.busy-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.busy-row + .busy-row { border-top: 1px solid var(--line); }
.busy-row .busy-icon {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line); font-size: 1.1rem;
}
.busy-row .busy-text { flex: 1; min-width: 0; }
.busy-row strong { display: block; }
.busy-row small { color: var(--muted); display: block; }

.invite-banner {
  display: flex; gap: 12px; align-items: center;
  background: var(--sun-soft); color: var(--text);
  border-radius: var(--radius); padding: 14px 16px; margin-top: 4px;
}
.invite-banner-icon { font-size: 1.8rem; }
.invite-banner strong { display: block; }
.invite-banner small { color: var(--muted); }

/* ---------- play dates ---------- */

select {
  font: inherit; color: inherit; font-weight: 400;
  padding: 12px 14px; min-height: 46px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
}
.pick-box { margin-top: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 14px; }

.playdate { display: flex; flex-direction: column; gap: 12px; border-top: 5px solid var(--sun); }
.playdate.live { border-top-color: var(--go); }
.playdate .pd-title { font-size: 1.2rem; font-weight: 800; }
.playdate .pd-sub { color: var(--muted); font-size: 0.9rem; }
.plan { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 0.95rem; margin: 0; }
.plan dt { color: var(--muted); }
.plan dd { margin: 0; font-weight: 600; }
.plan dd.unset { color: var(--muted); font-weight: 400; font-style: italic; }
.updates { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
.updates li { display: flex; justify-content: space-between; gap: 8px; }
.updates small { color: var(--muted); white-space: nowrap; }
.status-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.status-buttons .btn { padding: 10px 8px; font-size: 0.85rem; }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.thumb {
  position: relative; aspect-ratio: 1; border: 0; padding: 0; cursor: pointer;
  border-radius: 12px; overflow: hidden; background: var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .stamp {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 6px 4px;
  font-size: 0.7rem; font-weight: 700; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}
.thumb.more { display: grid; place-items: center; font-weight: 800; color: var(--primary-strong); background: var(--primary-soft); }

.photo-dialog { width: min(96vw, 720px); padding: 12px; }
.photo-frame { position: relative; background: #000; border-radius: 12px; overflow: hidden; }
.photo-frame img { display: block; width: 100%; max-height: 70vh; object-fit: contain; }
.photo-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 1.6rem; line-height: 1;
}
.photo-nav.prev { left: 8px; }
.photo-nav.next { right: 8px; }
.photo-caption { margin: 10px 2px; font-weight: 600; }
.photo-caption small { display: block; color: var(--muted); font-weight: 400; }

/* ---------- kid avatars ---------- */

.kid-avatar {
  flex: none; display: inline-grid; place-items: center; overflow: hidden;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-soft); font-size: 1.25rem; line-height: 1;
  color: #0f2742; font-weight: 800;
  box-shadow: 0 0 0 2px var(--card);
}
.kid-avatar img { width: 100%; height: 100%; object-fit: cover; }
.kid-avatar.sm { width: 28px; height: 28px; font-size: 1rem; }
.kid-avatar.xs { width: 22px; height: 22px; font-size: 0.8rem; }
.kid-avatar.xl { width: 96px; height: 96px; font-size: 3.2rem; }
.avatar-stack { display: inline-flex; flex: none; }
.avatar-stack .kid-avatar + .kid-avatar { margin-left: -8px; }
.chip .kid-avatar { margin-left: -6px; }
.kid-preview-wrap { display: flex; justify-content: center; }
.center-row { justify-content: center; }
.spacer { flex: 1; }

.emoji-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.emoji-grid button {
  font-size: 1.35rem; aspect-ratio: 1; border-radius: 12px; cursor: pointer;
  padding: 0; min-width: 0; line-height: 1;
  border: 2px solid transparent; background: var(--bg);
}
#kid-dialog { max-height: 92vh; overflow-y: auto; }
.emoji-grid button.selected { border-color: var(--primary); background: var(--primary-soft); }
.color-row { display: flex; gap: 10px; flex-wrap: wrap; }
.color-row button {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--line);
}
.color-row button.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.busy-row .kid-avatar { position: relative; }
.busy-badge { position: absolute; }

.install-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.install-steps li { padding-left: 4px; }
.install-steps svg { width: 18px; height: 18px; vertical-align: -3px; color: #0a84ff; }

.row.two-buttons > .btn { flex: 1; min-width: 140px; }
.link.small { font-size: 0.85rem; align-self: flex-start; }
#calendar-card .btn:not(.small) { width: 100%; }

/* ---------- messages ---------- */

.tabbar { grid-template-columns: repeat(6, 1fr); }
.tabbar button { font-size: 0.66rem; }

.chat-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  font: inherit; color: inherit; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
}
.chat-row .chat-text { flex: 1; min-width: 0; }
.chat-row strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row .preview { color: var(--muted); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.chat-row.unread strong, .chat-row.unread .preview { color: var(--text); font-weight: 800; }
.chat-row .meta-col { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 0.75rem; color: var(--muted); }
.unread-dot { background: var(--primary); color: var(--primary-ink); border-radius: 999px; min-width: 20px; height: 20px; line-height: 20px; text-align: center; font-size: 0.75rem; font-weight: 800; padding: 0 6px; }

.chat-view { display: flex; flex-direction: column; gap: 8px; }
.chat-header {
  position: sticky; top: 56px; z-index: 3; display: flex; align-items: center; gap: 10px;
  background: var(--bg); padding: 6px 0 10px; border-bottom: 1px solid var(--line);
}
.chat-header .link { font-size: 2rem; line-height: 1; padding: 0 6px; }
.chat-title { flex: 1; min-width: 0; }
.chat-title strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-messages { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; }
.day-sep { align-self: center; font-size: 0.75rem; color: var(--muted); font-weight: 700; margin: 10px 0 4px; }
.bubble-wrap { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; }
.bubble-wrap.me { align-self: flex-end; align-items: flex-end; }
.bubble-wrap .who { font-size: 0.75rem; color: var(--muted); margin: 0 10px 2px; font-weight: 700; }
.bubble {
  padding: 9px 13px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
  white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.35;
}
.bubble-wrap.me .bubble { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.bubble-wrap .time { font-size: 0.7rem; color: var(--muted); margin: 2px 10px 0; }
.system-msg { align-self: center; font-size: 0.8rem; color: var(--muted); text-align: center; padding: 2px 10px; }
.chat-composer {
  position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 3;
  display: flex; gap: 8px; align-items: flex-end;
  background: var(--bg); padding: 8px 0;
}
.chat-composer textarea { flex: 1; resize: none; max-height: 140px; border-radius: 20px; }
.chat-composer .btn { border-radius: 50%; width: 46px; height: 46px; padding: 0; font-size: 1.1rem; }
textarea {
  font: inherit; color: inherit; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg); font-weight: 400;
}
textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }

.pick-list .pick-row {
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--bg);
}
.pick-row > label { flex-direction: row; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.pick-row > label input { width: 20px; height: 20px; min-height: 0; accent-color: var(--primary); }
.pick-row .chips { margin-left: 30px; }
.tall-dialog { max-height: 92vh; overflow-y: auto; }

/* ---------- invites ---------- */

.event-card { display: flex; flex-direction: column; gap: 10px; border-top: 5px solid #e879a6; }
.event-card.canceled { opacity: 0.7; border-top-color: var(--muted); }
.event-card .ev-title { font-size: 1.2rem; font-weight: 800; }
.event-card .ev-line { color: var(--muted); font-size: 0.92rem; }
.event-card .details { margin: 0; white-space: pre-wrap; }
.rsvp-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rsvp-buttons .btn { padding: 10px 4px; font-size: 0.85rem; }
.rsvp-buttons .btn.chosen { background: var(--primary); color: var(--primary-ink); }
.totals { font-weight: 700; font-size: 0.92rem; }
.guest-row { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; }
.guest-row .guest-text { flex: 1; min-width: 0; }
.guest-row small { color: var(--muted); display: block; }
.card.highlight { box-shadow: 0 0 0 3px var(--primary); }
.pill.canceled { background: var(--danger-soft); color: var(--danger); }
.pill.party { background: #fde2ef; color: #b0306a; }
/* 🌙 dark */ html.dark .pill.party { background: #4a1d33; color: #f9a8d4; }

/* ---------- birthdays ---------- */

.bday-row { flex-wrap: nowrap; }
.bday-row select { flex: 1.3; min-width: 0; }
.bday-row input { flex: 1; min-width: 0; width: 80px; }
.check-row { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
.check-row input { width: 20px; height: 20px; min-height: 0; accent-color: var(--primary); }

/* ---------- friends, history, weather, account ---------- */

.pill.friend { background: var(--sun-soft); color: var(--sun); }
.weather { font-size: 0.9rem; color: var(--text); background: var(--bg); border-radius: 10px; padding: 6px 10px; align-self: flex-start; }
.big-code { font-size: 1.6rem; text-align: center; letter-spacing: 0.12em; user-select: all; }
.danger-link { color: var(--danger); }
.history-kids { display: inline-flex; flex: none; }
.history-kids .kid-avatar + .kid-avatar { margin-left: -8px; }
.chip.friend-chip small { color: var(--muted); font-weight: 400; margin-left: 2px; }
.chip.friend-chip:has(input:checked) small { color: inherit; opacity: 0.85; }
.btn.danger-btn { background: var(--danger); color: #fff; }

/* ---------- safety info ---------- */

.care-box { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 0.92rem; }
.care-box.alert { background: var(--danger-soft); color: var(--text); border-left: 4px solid var(--danger); }
.care-box strong { font-size: 0.9rem; }
.care-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.care-row .spacer { flex: 1; }
.btn.tiny { padding: 5px 10px; font-size: 0.8rem; }
.emergency-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 6px; }
.emergency-row input { min-width: 0; width: 100%; }
.emergency-row input[name$="phone"] { grid-column: 1 / -1; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.care-row { flex-wrap: nowrap; }
.care-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.care-row .btn { flex: none; }
#kid-edit-form fieldset > input { width: 100%; margin-top: 8px; }

/* ---------- groups ---------- */

.group-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  font: inherit; color: inherit; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
}
.group-row .group-emoji { font-size: 1.6rem; flex: none; }
.group-row .chat-text { flex: 1; min-width: 0; }
.group-row small { color: var(--muted); display: block; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.member-row .member-text { flex: 1; min-width: 0; }
.member-row small { color: var(--muted); display: block; }
.member-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill.connected { background: var(--go-soft); color: var(--go); }
.pill.group { background: var(--primary-soft); color: var(--primary-strong); }

/* ---------- help links ---------- */

.info-link {
  display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 4px;
  border-radius: 50%; font-size: 0.85rem; font-weight: 700; text-decoration: none; vertical-align: middle;
  color: var(--primary-strong); background: var(--primary-soft);
}
.help-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.help-card strong { display: block; }
.help-card small { color: var(--muted); }
.help-card-icon { font-size: 1.6rem; }
.help-card .cta-arrow { color: var(--muted); }

/* Report dialog */
.report-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--muted); background: rgba(127, 127, 127, 0.1); border-radius: 6px; font-style: italic; overflow-wrap: anywhere; }
#report-form hr, #games-body hr { border: 0; border-top: 1px solid rgba(127, 127, 127, 0.25); width: 100%; margin: 4px 0; }
#report-form fieldset { border: 0; padding: 0; margin: 0; }
.bubble[role=button] { cursor: pointer; }

/* Pickup help */
.help-item { border-left: 5px solid var(--danger); }
.help-item.taken, .help-item.done { border-left-color: var(--go); }
.help-title { display: block; margin: 6px 0 2px; }

.pill.urgent { background: var(--danger-soft); color: var(--danger); }

/* Kid mode: big, bright, nothing else on screen */
body.in-kid-mode { overflow: hidden; }
.kid-mode {
  position: fixed; inset: 0; z-index: 1000; overflow-y: auto;
  background: linear-gradient(160deg, #fff7d6 0%, #d5f5ee 55%, #dbeafe 100%);
  color: #0f2742; text-align: center;
  /* Clear the iPhone's clock and Dynamic Island (the app draws under them). */
  padding: calc(64px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
}
.kid-mode h2 { font-size: 1.7rem; margin: 0 0 18px; }
.kid-mode p { font-size: 1.1rem; color: #3b5a55; }
.kid-exit {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 2; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.7); color: #3b5a55; padding: 8px 14px; font: inherit; font-size: 0.85rem;
}
.kid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; max-width: 640px; margin: 0 auto; }
.kid-face {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: #fff; border: 0; border-radius: 28px; padding: 18px 8px 14px; font: inherit; color: inherit;
  box-shadow: 0 6px 18px rgba(15, 39, 66, 0.12); cursor: pointer; transition: transform 0.12s;
}
.kid-face:active { transform: scale(0.95); }
.kid-face-name { font-size: 1.25rem; font-weight: 800; }
.kid-badge {
  position: absolute; top: 8px; right: 8px; background: #15803d; color: #fff;
  font-size: 0.75rem; font-weight: 800; padding: 3px 8px; border-radius: 999px;
}
.kid-heart { font-size: 2.4rem; }
.kid-yes {
  display: block; width: 100%; max-width: 360px; margin: 10px auto; border: 0; border-radius: 999px;
  background: #15803d; color: #fff; font: inherit; font-size: 1.4rem; font-weight: 800; padding: 20px;
  box-shadow: 0 6px 18px rgba(21, 128, 61, 0.35);
}
.kid-back { border: 0; background: transparent; font: inherit; font-size: 1.1rem; color: #3b5a55; margin-top: 18px; padding: 10px 18px; }
.kid-party { font-size: 5rem; margin: 30px 0 10px; animation: kid-pop 0.5s ease-out; }
@keyframes kid-pop { from { transform: scale(0.3); } to { transform: scale(1); } }
.kid-pin {
  position: fixed; inset: auto 16px 24px; max-width: 360px; margin: 0 auto; z-index: 1001;
  background: #fff; border-radius: 22px; padding: 20px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  display: flex; flex-direction: column; gap: 10px; color: #0f2742;
}
.kid-pin[hidden] { display: none; }
.kid-pin h3 { margin: 0; }
.kid-pin input { font-size: 2rem; letter-spacing: 0.5em; text-align: center; padding: 8px; border-radius: 12px; border: 1px solid #dfe7f6; }
.row.center { justify-content: center; }

.row.wrap { flex-wrap: wrap; }
.card.flash, .flash { animation: flash 2s ease-out; border-radius: var(--radius, 14px); }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px var(--primary); } 100% { box-shadow: var(--shadow); } }

/* Family calendar */
.segmented.small { padding: 3px; }
.segmented.small button { padding: 6px 12px; font-size: 0.85rem; }
.cal-card { padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head strong { font-size: 1.05rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-weekdays span { text-align: center; font-size: 0.75rem; color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal-day {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 5px; min-height: 46px;
  border: 0; border-radius: 12px; background: transparent; font: inherit; color: inherit; cursor: pointer;
}
.cal-day.other { opacity: 0.4; }
.cal-day.today .cal-num { background: var(--primary-soft); color: var(--primary); }
.cal-day.selected { background: var(--primary); color: var(--primary-ink); }
.cal-day.selected .cal-num { background: transparent; color: inherit; }
.cal-num { font-weight: 700; font-size: 0.92rem; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-dots { display: flex; gap: 2px; height: 6px; }
.cal-dots i, .cal-legend i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 0.75rem; color: var(--muted); }
.cal-legend i { margin-right: 4px; }
.k-playdate { --k: #0b8f94; } .k-event { --k: #db2777; }
.k-free { --k: #16a34a; } .k-busy { --k: #c2410c; } .k-birthday { --k: #d97706; } .k-activity { --k: #f5a623; }
.cal-dots i, .cal-legend i { background: var(--k); }
.cal-day.selected .cal-dots i { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8); }
.cal-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border-left: 5px solid var(--k); padding: 10px 14px; }
.cal-time { width: 4.8em; flex: none; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.cal-text { flex: 1; min-width: 0; }
.cal-text strong, .cal-text small { display: block; }
.cal-text small { color: var(--muted); }

/* Party link landing (not logged in) */
.party-mode #auth-choose, .party-mode #onboarding .welcome { display: none; }
.party-landing { margin-top: 12px; }
.party-landing .btn small { font-weight: 500; opacity: 0.85; }
.group-row.waiting { opacity: 0.8; cursor: default; }

/* Location + directions */
.location { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--bg); border-radius: 14px; padding: 10px 12px; margin: 4px 0; }
.location-label { color: var(--muted); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.location strong { font-size: 1.05rem; }
.location .directions { margin-top: 6px; }
.btn.directions { white-space: nowrap; }
dd .directions { margin-left: 4px; padding: 3px 10px; font-size: 0.8rem; }
#maps-apps .btn { text-align: center; }

/* Thank-you notes */
.thanks-box { background: var(--sun-soft); border-radius: 14px; padding: 10px 12px; }
.thanks-box p { margin: 4px 0 0; white-space: pre-wrap; }
.after-party { border-left: 5px solid #db2777; }

/* QR code flyer */
.qr-print { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.qr-brand { font-weight: 800; color: var(--primary); }
.qr-print h3 { margin: 0; font-size: 1.3rem; }
.qr-code { width: min(260px, 70vw); background: #fff; padding: 8px; border-radius: 12px; }
.qr-code svg { width: 100%; height: auto; display: block; }
.qr-print p { margin: 0; max-width: 28em; }
.qr-url { color: var(--muted); font-size: 0.8rem; word-break: break-all; }
@media print {
  body:has(#qr-dialog[open]) * { visibility: hidden !important; }
  #qr-dialog, #qr-print, #qr-print * { visibility: visible !important; }
  #qr-dialog { position: fixed; inset: 0; border: 0; box-shadow: none; max-width: none; width: 100%; background: #fff; color: #000; }
  #qr-dialog::backdrop { background: #fff; }
  .qr-print h3 { font-size: 28pt; }
  .qr-code { width: 9cm; }
  .qr-print p { font-size: 14pt; }
}
.welcome .tagline { color: var(--accent); font-weight: 800; font-size: 1.1rem; margin: 0 0 6px; }

/* ---------- front page: the rest of the website ---------- */
.more-link { display: block; text-align: center; color: var(--primary); font-weight: 700; text-decoration: none; margin: 4px 0 8px; }
.site-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.site-section h2 { text-align: center; margin: 0 0 12px; }
.site-section p { color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.steps small, .feature small { display: block; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.step-num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.feature > span { display: block; font-size: 1.5rem; margin-bottom: 4px; }
@media (max-width: 340px) { .feature-grid { grid-template-columns: 1fr; } }
.check-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check-list li { position: relative; padding-left: 26px; line-height: 1.45; }
.check-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--primary); font-weight: 800; }
.privacy-section { text-align: left; }
.maker { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 18px; }
.maker h2 { margin-bottom: 8px; }
.faq { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 8px 0 0; }
.final-cta { display: flex; flex-direction: column; gap: 10px; }
.final-cta h2 { margin-bottom: 4px; }

/* ---------- logo ---------- */
h1 .logo-tile { width: 30px; height: 30px; border-radius: 22%; display: block; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.wordmark { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 14px; }
.wordmark img { width: 74px; height: auto; }
.wordmark .wordmark-badge { width: 168px; height: 168px; border-radius: 0; filter: drop-shadow(0 6px 16px rgba(11, 78, 162, .18)); }
.wordmark span { font: 800 2.3rem/1 ui-rounded, "SF Pro Rounded", "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif; letter-spacing: -0.02em; color: var(--brand-navy); }
.wordmark b { color: var(--brand-teal); font-weight: inherit; }
/* 🌙 dark */ html.dark .wordmark span { color: #7fb3ff; } html.dark .wordmark b { color: var(--accent); }

.segmented.three { grid-template-columns: repeat(3, 1fr); }
.segmented.four { grid-template-columns: repeat(4, 1fr); }
.segmented.four button { padding: 8px 4px; font-size: 0.88rem; }
.scroll-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.scroll-chips .chip { white-space: nowrap; padding: 7px 12px; font-size: 0.88rem; }
.chip.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chip.static { cursor: default; padding: 5px 10px; font-size: 0.85rem; }
.row.between { justify-content: space-between; align-items: flex-start; flex-wrap: nowrap; }
.feature-grid .feature:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- this week ---------- */
.tonight-line { font-size: 0.95rem; }
.pill.busy-night { background: var(--sun-soft); color: var(--sun); font-weight: 800; }
.week-actions { gap: 8px; }
.week-nav { display: flex; align-items: center; justify-content: space-between; }
.week-nav strong { font-size: 1.05rem; }
.week-day { display: flex; flex-direction: column; gap: 8px; }
.week-day.today { border: 2px solid var(--primary); }
.week-day.past { opacity: 0.6; }
.week-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.week-item { display: flex; gap: 10px; align-items: baseline; }
.week-item.kind-playdate, .week-item.kind-event, .week-item.kind-activity, .week-item.kind-busy, .week-item.kind-family, .week-item.kind-help { cursor: pointer; }
.week-time { flex: none; width: 64px; color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.week-what { display: flex; flex-direction: column; min-width: 0; }
.activity-row { align-items: flex-start; }
.activity-row small { display: block; }
.icon-chip { padding: 6px 10px; font-size: 1.2rem; }
.grocery-item.done span { text-decoration: line-through; color: var(--muted); }

/* ---------- invitations: designs, comments, host tools, group photo ---------- */
.invite-banner { position: relative; overflow: hidden; border-radius: 16px; padding: 18px 16px 16px; text-align: center; background: var(--inv-bg, #eef2f8); color: var(--inv-ink, #1f2a44); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.invite-banner .invite-cover { width: calc(100% + 32px); margin: -18px -16px 8px; max-height: 240px; object-fit: cover; display: block; }
.invite-art { font-size: 2rem; letter-spacing: 6px; line-height: 1.1; }
.invite-banner.has-cover .invite-art { font-size: 1.4rem; }
.invite-kicker { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; font-size: 0.72rem; opacity: 0.85; }
.invite-banner .invite-title { margin: 0; font-size: 1.45rem; font-weight: 900; line-height: 1.2; color: inherit; overflow-wrap: anywhere; }
.invite-when { font-weight: 700; font-size: 0.95rem; }
.invite-banner .avatar-stack { margin-top: 6px; }
.party-landing .invite-banner { padding: 26px 18px 22px; }
.party-landing .invite-banner .invite-title { font-size: 1.8rem; }
.party-landing .invite-banner .invite-cover { width: calc(100% + 36px); margin: -26px -18px 10px; max-height: 300px; }

.theme-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-bottom: 8px; }
.theme-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; text-align: center; }
.theme-chip input { position: absolute; opacity: 0; pointer-events: none; }
.theme-swatch { width: 100%; height: 48px; border-radius: 12px; background: var(--inv-bg); display: grid; place-items: center; font-size: 1.4rem; border: 3px solid transparent; }
.theme-chip small { font-size: 0.75rem; color: var(--muted); }
.theme-chip input:checked + .theme-swatch { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.theme-chip input:focus-visible + .theme-swatch { outline: 2px solid var(--primary); outline-offset: 2px; }
.event-extras { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.event-extras summary { font-weight: 700; cursor: pointer; }
.event-extras .stack { margin-top: 10px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; }
.check-row input { margin-top: 4px; }

.gift-box { background: var(--sun-soft); border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.gift-box a { color: var(--primary); font-weight: 700; }
.bring-box { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.bring-item { display: flex; align-items: center; gap: 8px; min-height: 40px; border-bottom: 1px solid var(--line); }
.bring-item:last-of-type { border-bottom: 0; }
.bring-item .bring-what { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.bring-item.taken .bring-what { font-weight: 500; }
.bring-item.mine .bring-who { color: var(--primary); font-weight: 700; }
.bring-add input { flex: 1; min-width: 0; }
.bring-item .link, .bring-item .btn { margin: 0; flex-shrink: 0; }
.rsvp-by { margin: 0; font-weight: 700; color: var(--muted); font-size: 0.92rem; }
.rsvp-by.due { color: var(--danger); }
.announce-list { display: flex; flex-direction: column; gap: 6px; }
.announce { background: var(--primary-soft); border-left: 4px solid var(--primary); border-radius: 10px; padding: 8px 12px; }
.announce small { color: var(--muted); font-weight: 600; }
.announce p { margin: 2px 0 0; white-space: pre-wrap; }

.comments { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.comment-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.comment { background: var(--bg); border-radius: 12px; padding: 8px 12px; }
.comment.from-host { background: #fdeaf3; }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.88rem; }
.comment-head .link { margin-left: auto; }
.comment p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-input input { flex: 1; min-width: 0; }

.rsvp-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rsvp-tile { border-radius: 12px; padding: 8px 4px; text-align: center; background: var(--bg); }
.rsvp-tile b { display: block; font-size: 1.4rem; line-height: 1.1; }
.rsvp-tile small { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.rsvp-tile.going { background: var(--go-soft); }
.rsvp-tile.going b { color: var(--go); }
.rsvp-tile.maybe { background: var(--sun-soft); }
.rsvp-tile.no { background: var(--danger-soft); }
.host-tools { flex-wrap: wrap; }

.group-photo { margin: 0; border-radius: 16px; overflow: hidden; background: #111; position: relative; }
.group-photo img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.group-photo-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.group-photo figcaption { position: absolute; left: 10px; bottom: 10px; background: rgba(0, 0, 0, 0.55); color: #fff; font-weight: 700; font-size: 0.85rem; padding: 4px 10px; border-radius: 999px; }
.group-photo-btn { width: 100%; font-size: 1.05rem; }

.my-rsvp { border-radius: 14px; padding: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 2px; }
.my-rsvp.going { background: var(--go-soft); }
.my-rsvp.maybe { background: var(--sun-soft); }
.my-rsvp strong { font-size: 1.1rem; }
.my-rsvp small { color: var(--muted); }

.guestlist-dialog { width: min(760px, 96vw); }
.guest-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.guest-table th, .guest-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guest-table th { font-size: 0.8rem; color: var(--muted); }
.print-area h2 { margin: 0 0 4px; }
.print-area p { margin: 0 0 8px; }
@media (max-width: 520px) { .guest-table th:nth-child(5), .guest-table td:nth-child(5) { display: none; } }
@media print {
  body.printing * { visibility: hidden !important; }
  body.printing #guestlist-dialog, body.printing #guestlist-body, body.printing #guestlist-body * { visibility: visible !important; }
  body.printing #guestlist-dialog { position: fixed; inset: 0; width: 100%; max-width: none; border: 0; box-shadow: none; background: #fff; color: #000; }
  body.printing #guestlist-dialog::backdrop { background: #fff; }
  body.printing .guest-table th:nth-child(5), body.printing .guest-table td:nth-child(5) { display: table-cell; }
  body.printing .guest-table th, body.printing .guest-table td { border-color: #999; color: #000; }
}
/* 🌙 dark */ html.dark .comment.from-host { background: #3a1d2c; }
#party-comments .comments { border-top: 0; padding-top: 0; }

/* ---------- asking for help, trusted families ---------- */
.kind-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kind-chip { cursor: pointer; }
.kind-chip input { position: absolute; opacity: 0; pointer-events: none; }
.kind-chip span { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 6px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font-size: 1.4rem; height: 100%; }
.kind-chip b { font-size: 0.9rem; }
.kind-chip small { font-size: 0.72rem; color: var(--muted); line-height: 1.2; }
.kind-chip input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.kind-chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.ask-preview { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fff4d6; font-weight: 600; font-size: 0.92rem; }
.ask-quote { margin: 0; font-style: italic; color: var(--muted); }
.pill.ask { background: #fff0c2; color: #8a5a00; }
.chip-hint { color: var(--go); font-weight: 700; }
.trust-card { display: flex; flex-direction: column; gap: 8px; border-left: 5px solid var(--accent); }
.trust-card.incoming { border-left-color: var(--brand-orange); background: #fff9ec; }
.trust-card.pending { opacity: 0.85; border-left-color: var(--line); }
.trust-card .tag { font-size: 0.8rem; background: var(--bg); border-radius: 999px; padding: 3px 10px; font-weight: 600; }
.trust-history { margin: 0; font-weight: 700; color: var(--go); font-size: 0.9rem; }
.shared-acts { display: flex; flex-direction: column; gap: 4px; }
.shared-act { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--bg); border-radius: 10px; padding: 6px 10px; font-size: 0.88rem; }
.shared-act .link { margin-left: auto; }
.trust-suggest { display: flex; align-items: center; gap: 8px; background: var(--go-soft); border-radius: 12px; padding: 8px 12px; font-size: 0.9rem; }
.trust-suggest span { flex: 1; }
/* 🌙 dark */ html.dark .ask-preview { background: #3a2f12; }
  html.dark .pill.ask { background: #4a3a10; color: #ffd66b; }
  html.dark .trust-card.incoming { background: #2c2412; }
.trust-card .person strong, .trust-card .person small { display: block; }
.trust-card .person small { color: var(--muted); }
.draft-note { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--sun-soft); font-size: 0.9rem; font-weight: 600; }
.cta-party { background: linear-gradient(135deg, #e0457b, #f59e42); }

/* ---------- calendar tab, family events, days off ---------- */
.k-family { --k: #7c3aed; } .k-help { --k: #f07c1f; } .k-dayoff { --k: #0ea5e9; }
#cal-view { align-self: flex-start; grid-template-columns: repeat(3, auto); }
#cal-view button { padding: 10px 16px; }
.cal-private { margin: 0; }
.icon-chips .icon-chip { font-size: 1.3rem; padding: 4px 10px; }
.dayoff-card { display: flex; flex-direction: column; gap: 4px; text-align: left; width: 100%; font: inherit; color: inherit; cursor: pointer; border-left: 5px solid #0ea5e9; }
.dayoff-line { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.92rem; color: var(--primary); }
.dayoff-line .cta-arrow { font-size: 1.4rem; color: var(--muted); }
.dayoff-box { background: #e0f2fe; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.dayoff-box .link { align-self: flex-start; }
.dayoff-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--bg); border: 0; border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.day-actions .btn { width: 100%; }
/* 🌙 dark */ html.dark .dayoff-box { background: #0c3047; }

.week-item.kind-family, .week-item.kind-dayoff { cursor: pointer; }
.week-day { scroll-margin-top: 72px; }
.section-head { scroll-margin-top: calc(76px + env(safe-area-inset-top)); }

/* ---------- grocery list ---------- */
.grocery-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.grocery-row .grocery-item { flex: 1; font-size: 1.05rem; }
.grocery-row.done .grocery-item span { text-decoration: line-through; color: var(--muted); }
.grocery-done summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 6px 0; }
#grocery-text a.btn { text-align: center; text-decoration: none; }
.paste-box { border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; }
.paste-box summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.paste-box .stack { margin-top: 8px; }


/* Front page: the moments it helps with */
.solves { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .solves { grid-template-columns: 1fr 1fr; } }
.solve { background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.solve b { font-size: 1rem; }
.solve span { color: var(--muted); font-size: 0.92rem; }

#todo-for-row { justify-content: flex-start; align-items: center; gap: 8px; font-weight: 600; }
#todo-for-row select { width: auto; }

/* ---------- snap a schedule ---------- */
.scan-reading { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 0; text-align: center; }
.scan-spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--primary-soft); border-top-color: var(--primary); animation: scan-spin 0.9s linear infinite; }
@keyframes scan-spin { to { transform: rotate(360deg); } }
.scan-row { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: var(--bg); }
.scan-row.past { opacity: 0.6; }
.scan-row .check-row { align-items: center; }
.scan-title { flex: 1; min-width: 0; font-weight: 700; }
.scan-when { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.scan-when input[type=date] { grid-column: 1 / -1; }
.scan-when input { min-width: 0; font-size: 0.9rem; padding: 8px; }
.snap-cta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 12px; border-radius: 14px; border: 2px dashed var(--primary); background: var(--primary-soft); }
.snap-cta strong, .snap-cta small { display: block; }
.snap-cta small { color: var(--muted); font-size: 0.82rem; }
.snap-icon { font-size: 1.8rem; }

/* ---------- team calendars ---------- */
.k-team { --k: #ea580c; }
.feed-card { display: flex; flex-direction: column; gap: 4px; border-left: 5px solid #ea580c; }
.feed-card.failing { border-left-color: var(--danger); }
#calevent-feed { align-self: flex-start; }
.week-item.kind-team { cursor: pointer; }

/* Calendar: List view */
.cal-list-day { display: flex; flex-direction: column; gap: 8px; }
.cal-list-date { font-size: .95rem; margin: 6px 2px 0; color: var(--muted); font-weight: 700; }
.cal-list-day.today .cal-list-date { color: var(--primary); }
#cal-list-more { align-self: center; }

/* ☰ All tools: top left of the header, on every tab */
.menu-btn {
  position: relative; flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font: inherit; font-size: 1.35rem; font-weight: 700; line-height: 1; color: #fff; cursor: pointer;
  background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.45);
}
.menu-btn:hover, .menu-btn:focus-visible { background: rgba(255, 255, 255, 0.32); }
.menu-btn[hidden], .in-kid-mode .menu-btn { display: none; }
.menu-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--header-from); }
.menu-count[hidden] { display: none; }
.topbar h1 { margin-right: auto; }
.tools-group { margin: 6px 0 -4px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tool {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px;
  min-height: 92px; padding: 12px 6px; font: inherit; color: var(--text); cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px;
}
.tool[hidden] { display: none; }
.tool:active { transform: scale(.97); }
.tool-icon { font-size: 1.7rem; line-height: 1; }
.tool-name { font-size: .78rem; font-weight: 700; text-align: center; line-height: 1.2; }
.tool-badge { position: absolute; top: 6px; right: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.tool-badge[hidden] { display: none; }
.tools-more > summary { cursor: pointer; list-style: none; padding: 8px 0; margin: 4px 0 6px; }
.tools-more > summary::-webkit-details-marker { display: none; }
.tools-more > summary::after { content: ' ▾'; }
.tools-more[open] > summary::after { content: ' ▴'; }

/* Home: four big one-tap actions under the greeting. */
.home-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.home-actions button {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px;
  min-height: 84px; padding: 12px 4px 10px; font: inherit; font-size: .76rem; font-weight: 700; line-height: 1.2;
  text-align: center; color: var(--text); cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.home-actions button span { font-size: 1.6rem; line-height: 1; }
.home-actions button:active { transform: scale(.97); }

/* Groups: "now share it" right after starting one, and the welcome after joining. */
.group-share-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.group-share-emoji { font-size: 3rem; line-height: 1; }
.group-share-hero h3 { margin: 4px 0 0; }
#group-share-dialog .center { margin-top: -6px; }
.group-welcome { border-top: 4px solid var(--go); }

/* Share picker: one big tile per app. */
.sharepick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sharepick-option {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 78px; padding: 12px 4px;
  font: inherit; font-size: .8rem; font-weight: 700; color: var(--text); cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px;
}
.sharepick-option span { font-size: 1.7rem; line-height: 1; }
.sharepick-option:active { transform: scale(.97); }
#sharepick-note { overflow-wrap: anywhere; user-select: all; }

/* ✕ on every window: pinned to the top right while you scroll */
.dialog-x {
  /* Takes no room: the negative bottom margin lets the title line sit beside it. */
  position: sticky; top: 0; z-index: 5; margin: -6px -6px -30px auto;
  width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center;
  font: inherit; font-size: 1rem; color: var(--text); cursor: pointer;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
dialog:has(> .dialog-x) > :nth-child(2) > :first-child, dialog:has(> .dialog-x) > :nth-child(2):is(h2, h3) { padding-right: 40px; }

/* 😋 Favorite foods */
.food-chip { font: inherit; cursor: pointer; }
.food-chip.love { background: var(--go-soft); color: var(--go); border-color: var(--go); }
.food-chip.no { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.care-box.foods { background: var(--go-soft); color: var(--text); border-left: 4px solid var(--go); }
.kid-foods-btn { margin-top: 22px; border: 0; border-radius: 999px; padding: 14px 26px; font: inherit; font-size: 1.2rem; font-weight: 800; background: #fff; color: #b45309; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); cursor: pointer; }
.kid-food-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; max-width: 640px; margin: 0 auto 20px; }
.kid-food { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 20px; border: 3px solid transparent; background: #fff; font: inherit; font-size: .95rem; font-weight: 700; color: #334; cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, .08); }
.kid-food-emoji { font-size: 2.6rem; line-height: 1; }
.kid-food.on { border-color: #ef4444; background: #fff1f2; }
.kid-food-heart { position: absolute; top: 4px; right: 6px; font-size: 1.1rem; }
.foods-picked { display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.foods-picked:empty { display: none; }
.foods-drop { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); padding: 0 12px; }
.foods-drop > summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--primary); list-style: none; display: flex; justify-content: space-between; }
.foods-drop > summary::-webkit-details-marker { display: none; }
.foods-drop > summary::after { content: '▾'; transition: transform .2s; }
.foods-drop[open] > summary::after { transform: rotate(180deg); }
.foods-drop[open] { padding-bottom: 12px; }
.foods-drop > * + * { margin-top: 8px; }

/* 💊 Medicine: today's doses with ✅ Given. */
.meds-card { display: flex; flex-direction: column; gap: 8px; border-top: 4px solid #8b5cf6; }
.med-dose { display: grid; grid-template-columns: 5.2em minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.med-dose:first-of-type { border-top: 0; }
@media (max-width: 520px) { .med-dose { grid-template-columns: 4.8em minmax(0, 1fr); } .med-dose > :nth-child(3) { grid-column: 2; justify-self: start; } }
.med-time { font-weight: 800; font-size: .88rem; white-space: nowrap; }
.med-what { display: flex; flex-direction: column; min-width: 0; }
.med-what b { overflow-wrap: anywhere; }
.med-due .med-time, .med-missed .med-time { color: #b45309; }
.med-given .med-time { color: var(--go); }
.med-hist { padding: 2px 0; }
.med-time-row input { flex: 1; }
.med-inline { display: flex; align-items: center; gap: 8px; }
.med-inline input { width: 6em; }
.big-check { font-size: 1.02rem; }

/* 👋 Works better together, and 🎉 joined */
.together-x { position: absolute; top: 4px; right: 4px; min-width: 36px; min-height: 36px; }
.together-count { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.together-dots { display: flex; gap: 6px; }
.together-dots i { width: 28px; height: 6px; border-radius: 999px; background: var(--line); }
.together-dots i.on { background: var(--go); }
.joined-card { position: relative; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(135deg, var(--sun-soft), var(--card)); border-top: 4px solid #f59e0b; }
.joined-head { display: flex; align-items: center; gap: 12px; padding-right: 28px; }
.joined-head strong { display: block; font-size: 1.1rem; }
.joined-party { font-size: 2rem; animation: kid-pop .5s ease-out; }
.joined-kids { display: flex; gap: 12px; flex-wrap: wrap; }
.joined-kid { display: flex; align-items: center; gap: 6px; font-weight: 700; }

/* 📣 A note from the KiddoCue team */
.note-card { position: relative; display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--primary); background: linear-gradient(135deg, var(--primary-soft), var(--card)); }
.note-head { display: flex; align-items: center; gap: 10px; padding-right: 28px; }
.note-head strong { display: block; }
.note-icon { font-size: 1.8rem; }
.note-text { margin: 0; white-space: pre-wrap; font-size: 1rem; }
.note-moods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.note-mood { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font: inherit; color: var(--text); cursor: pointer; }
.note-mood.on { border-color: var(--primary); background: var(--primary-soft); }
.note-mood-emoji { font-size: 1.7rem; line-height: 1; }
.note-card textarea { width: 100%; font: inherit; }
.note-thanks { margin: 0; font-weight: 600; }

/* 🧪 Beta testers */
.beta-card { position: relative; display: flex; flex-direction: column; gap: 8px; border-top: 4px solid #8b5cf6; background: linear-gradient(135deg, #f3edff, var(--card)); }
/* 🌙 dark */ html.dark:not([data-theme="light"]) .beta-card { background: linear-gradient(135deg, #2a1f47, var(--card)); }
.beta-card p { margin: 0; }
.beta-head { display: flex; align-items: center; gap: 10px; padding-right: 30px; }
.beta-head strong { font-size: 1.05rem; }
.beta-icon { font-size: 1.7rem; }
.beta-list { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.beta-card .btn { align-self: flex-start; }
.invite-beta { display: block; margin-top: 4px; }

/* 👍 Follow us on Facebook */
.follow-fb { margin: 6px 0 0; }
html.native-app .fb-follow { display: none; }
/* ⚙️ More settings: the rarely changed ones, folded. */
.settings-more > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card, #fff); }
.settings-more > summary::-webkit-details-marker { display: none; }
.settings-more > summary::after { content: '▾'; margin-left: auto; }
.settings-more[open] > summary::after { content: '▴'; }
.settings-more > summary .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.settings-more > .stack { margin-top: 10px; }
.fb-link { font-weight: 700; }

/* iPhones zoom the whole page in when you tap a text box whose writing is
   smaller than 16px, and don't zoom back out. Labels are 0.9rem, and boxes
   inherit that, so every box gets at least 16px. (Bigger ones stay bigger.) */
input, select, textarea { font-size: max(16px, 1em); }
.scan-when input, .note-card textarea { font-size: 16px; }

/* Windows with their own ✕ in the title row (All tools…): that row stays pinned at the top while you scroll, so you never
   have to scroll back up to close. */
dialog .row.between:has(> [aria-label="Close"]) {
  position: sticky; top: -20px; z-index: 5; background: var(--card);
  margin: -20px -20px 0; padding: 14px 20px 10px; border-bottom: 1px solid var(--line);
}

/* Front page: 20-second demo videos, side by side (swipe on a phone) */
.demo-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; -webkit-overflow-scrolling: touch; }
.demo { flex: 0 0 min(58vw, 210px); margin: 0; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; }
.demo video { width: 100%; aspect-ratio: 1080 / 2336; border-radius: 18px; background: #2f49b5; display: block; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); }
.demo figcaption { font-weight: 700; font-size: .9rem; text-align: center; }

/* 📹 Video calls */

/* 💬 Kid messages: friend rows */
.kid-game-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 18px; border: 0; background: rgba(255,255,255,.85); font: inherit; font-size: 1.05rem; text-align: left; cursor: pointer; }
.kid-game-row .grow { flex: 1; min-width: 0; }

/* 🎲 Games within the family (kid mode) */
.kid-games-btn { background: #6366f1 !important; color: #fff !important; }
.kid-game-row .turn { background: #22a55b; color: #fff; border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: .85rem; }
.kid-choice { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.kid-choice button { font: inherit; font-size: 1.15rem; font-weight: 800; padding: 16px 18px; border-radius: 20px; border: 0; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.08); cursor: pointer; }
.kid-game-status { font-size: 1.2rem; font-weight: 800; text-align: center; margin: 0; }
.kid-game-said { text-align: center; font-size: 1.1rem; min-height: 1.4em; margin: 0; }
.kid-reactions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.kid-reactions button { font: inherit; font-size: 1rem; padding: 8px 12px; border-radius: 999px; border: 0; background: rgba(255,255,255,.9); cursor: pointer; }
.kid-reactions .end-game { background: #fff1f2; color: #9f1239; }
body.grownup-game .kid-exit { display: none; }
.quiz-board { display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin: 0 auto; }
.quiz-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; font-weight: 800; background: #fff; border-radius: 16px; padding: 10px 14px; }
.quiz-score span:last-child { text-align: right; }
.quiz-score small { color: #3b5068; }
.quiz-last { background: #fff; border-radius: 16px; padding: 10px 14px; border-left: 6px solid #22c55e; }
.quiz-last.miss { border-left-color: #f59e0b; }
.quiz-last small { color: #3b5068; display: block; margin-top: 4px; }
.quiz-offer { border: 0; border-radius: 18px; padding: 16px; background: #fff; font: inherit; font-size: 1.25rem; font-weight: 800; color: #0f2a4a; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.08); text-align: left; }
.quiz-q { font-size: 1.5rem; text-align: center; margin: 4px 0; }
.kid-game-pass { text-align: center; min-height: 1.2em; }
.arc-tile.friends { background: linear-gradient(150deg, #22c55e, #15803d); }
.chess-wrap { display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; }
.chess-check { font-weight: 800; color: #b91c1c; background: #fee2e2; padding: 6px 12px; border-radius: 999px; }
.cpiece { position: relative; z-index: 1; }
.cpiece.c0 { color: #fff; text-shadow: 0 0 2px #0f172a, 0 0 2px #0f172a, 0 1px 0 #0f172a; }
.cpiece.c1 { color: #111827; text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.kid-choice button small { font-weight: 600; font-size: .85rem; opacity: .75; }
.call-row { display: flex; align-items: center; gap: 10px; }
.call-row .grow { flex: 1; min-width: 0; }
.gboard { display: grid; gap: 6px; margin: 10px auto; width: min(92vw, 380px); }
.gboard button { aspect-ratio: 1; border: 0; border-radius: 12px; background: #fff; font-size: 2.2rem; display: grid; place-items: center; padding: 0; cursor: pointer; }
.gboard.ttt { grid-template-columns: repeat(3, 1fr); }
.gboard.c4 { grid-template-columns: repeat(7, 1fr); gap: 4px; background: #1d4ed8; padding: 8px; border-radius: 16px; }
.gboard.c4 button { border-radius: 50%; font-size: 0; }
.gboard.c4 button.p0 { background: #ef4444; } .gboard.c4 button.p1 { background: #facc15; }
.gboard.checkers { grid-template-columns: repeat(8, 1fr); gap: 0; border-radius: 10px; overflow: hidden; border: 3px solid #7c4a1e; }
.gboard.checkers button { border-radius: 0; font-size: 0; background: #f3e1c1; }
.gboard.checkers button.dark { background: #8b5a2b; }
.gboard.checkers button.sel { outline: 3px solid #22d3ee; outline-offset: -3px; }
.gboard.checkers button.target { box-shadow: inset 0 0 0 4px #22d3ee; }
.gboard .piece { width: 76%; height: 76%; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.gboard .piece.p0 { background: #ef4444; } .gboard .piece.p1 { background: #1f2937; color: #facc15; }
.gboard button.last { box-shadow: inset 0 0 0 3px #22d3ee; }
.gboard.ttt button:disabled { opacity: 1; color: inherit; }
.gboard.chess { grid-template-columns: repeat(8, 1fr); gap: 0; border-radius: 10px; overflow: hidden; border: 3px solid #475569; width: 100%; max-width: 420px; }
.gboard.chess button { aspect-ratio: 1; border: 0; border-radius: 0; padding: 0; background: #e2e8f0; display: grid; place-items: center; position: relative; font-size: clamp(1.4rem, 8vw, 2.3rem); line-height: 1; }
.gboard.chess button.dark { background: #7c93b4; }
.gboard.chess button.last { background: #fde68a; }
.gboard.chess button.dark.last { background: #d4b84a; }
.gboard.chess button.sel { outline: 3px solid #22d3ee; outline-offset: -3px; }
.gboard.chess button.target::after { content: ''; position: absolute; width: 30%; height: 30%; border-radius: 50%; background: rgba(34, 211, 238, .75); }
.gboard.chess button.target.take::after { width: 86%; height: 86%; background: none; box-shadow: inset 0 0 0 4px rgba(34, 211, 238, .9); }
.gboard.chess button.check { background: #fca5a5; }

.note-video { width: 100%; max-width: 280px; aspect-ratio: 720 / 1558; border-radius: 16px; background: #2f49b5; display: block; margin: 0 auto; }

/* 📱 Kids' own devices */
.device-row { padding: 6px 0; border-top: 1px solid var(--line); }
.pair-box { text-align: center; }
.pair-code { font: 800 1.7rem/1.1 ui-monospace, Menlo, monospace; letter-spacing: 0.08em; max-width: 100%; overflow-wrap: anywhere; background: var(--primary-soft, #e8f1ff); border-radius: 14px; padding: 12px 16px; }
.pair-qr { width: 150px; margin: 0 auto; }
.pair-qr svg { width: 100%; height: auto; }
.code-input { font: 700 1.4rem ui-monospace, Menlo, monospace; letter-spacing: 0.1em; text-transform: uppercase; }
/* 💬 kids' messages */
.kid-thread { display: flex; flex-direction: column; gap: 8px; max-width: 520px; margin: 0 auto 14px; max-height: 42vh; overflow-y: auto; padding: 4px; text-align: left; }
.kid-bubble { align-self: flex-start; background: #fff; border-radius: 20px 20px 20px 6px; padding: 10px 14px; font-size: 1.15rem; box-shadow: 0 3px 10px rgba(15, 39, 66, 0.08); }
.kid-bubble.me { align-self: flex-end; background: #2563eb; color: #fff; border-radius: 20px 20px 6px 20px; }
.kid-phrases { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 560px; margin: 0 auto 16px; }
.kid-phrases button { border: 0; border-radius: 999px; background: #fff; padding: 10px 14px; font: inherit; font-size: 1rem; box-shadow: 0 3px 10px rgba(15, 39, 66, 0.1); }
.kid-chat-btn { background: #e0f2fe; }
.chat-pick { text-align: left; width: 100%; }
body.kid-device .kid-exit { opacity: 0.6; }


.sport-pick .chips { max-height: 200px; overflow-y: auto; }

/* 💬 Play dates or hangouts */
.wording-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; }
.wording-row select { width: auto; flex: 0 1 auto; }


/* 📍 Address suggestions under a place box */
label:has(> [data-address]) { position: relative; }
.addr-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 4px;
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 12px 30px rgba(15, 39, 66, 0.18); overflow: hidden; font-weight: 400;
}
.addr-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 12px; text-align: left;
  font: inherit; color: var(--text); background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer;
}
.addr-item:first-child { border-top: 0; }
.addr-item:hover, .addr-item.on { background: var(--bg); }
.addr-icon { flex: none; }
.addr-text { display: flex; flex-direction: column; min-width: 0; }
.addr-text b { font-weight: 700; overflow-wrap: anywhere; }
.addr-text small { color: var(--muted); overflow-wrap: anywhere; }
.addr-credit { align-self: flex-end; padding: 4px 10px 6px; color: var(--muted); font-size: .7rem; }

.label-ish { margin: 0; font-weight: 700; }
.card.playdate.canceled { opacity: .85; }
.card.playdate.canceled .pd-title { text-decoration: line-through; }

/* 💛 Ask for help at the top of Home, and Log out at the bottom */
.cta.cta-help { background: linear-gradient(135deg, #f5a623, #f07c1f); padding: 14px 18px; }
.home-logout { align-self: center; margin: 18px 0 6px; }

/* ⏳ Pending on Home */
.pending-card { display: flex; flex-direction: column; gap: 6px; border-top: 4px solid #2f49b5; }
.pending-head { margin: 6px 0 0; font-size: .85rem; font-weight: 700; color: var(--muted); }
.pending-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: var(--bg); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pending-icon { font-size: 1.3rem; }
.pending-text { display: flex; flex-direction: column; min-width: 0; }
.pending-text b { overflow-wrap: anywhere; }

/* 🍎 School meals */
.meal-day { display: flex; flex-direction: column; gap: 6px; }
.meal-day.today { border-color: var(--primary); }
.meal-line { margin: 0; font-size: .92rem; }
.meal-kid { display: flex; align-items: center; gap: 8px; }
.meal-kid-name { flex: 1; min-width: 0; font-weight: 600; }
.meal-kid-name small { display: block; font-weight: 400; }
.meal-status { font: inherit; font-size: .85rem; font-weight: 700; border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.meal-status.school { background: var(--go-soft); color: var(--go); }
.meal-status.home { background: var(--sun-soft); color: var(--sun); }
.meal-status.off { background: var(--primary-soft); color: var(--primary-strong); cursor: default; }
.meal-preview { display: flex; gap: 10px; font-size: .9rem; }
.meal-preview strong { flex: none; width: 96px; }
.meal-food { display: flex; flex-direction: column; gap: 8px; }
.meal-food-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.meal-food-name strong { display: inline-block; }
.meal-food-name strong::first-letter { text-transform: uppercase; }
.meal-food-name small { flex-basis: 100%; }
.chip.wont-eat { font: inherit; cursor: pointer; }
.chip.wont-eat.on { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.meals-new { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--sun-soft); }
.meals-new > span:nth-child(2) { flex: 1; }
.meals-new small { display: block; color: var(--muted); }
.meals-line { font-weight: 600; }
#meals-body textarea { width: 100%; font: inherit; }
.meals-add { display: grid; grid-template-columns: 1fr; gap: 8px; }

/* 🧹 Calmer Home */
.tidy-hidden { display: none !important; }
.compact-row { font: inherit; color: inherit; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; }
.compact-row .compact-emoji { font-size: 1.6rem; flex-shrink: 0; }
.compact-row .compact-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.compact-row .compact-text strong { overflow-wrap: anywhere; }
.compact-row .pill { flex-shrink: 0; }
.home-more { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.home-more .more-chip { cursor: pointer; }

/* 🧹 Family tab: settings fold down to their title */
.fold > h3 { cursor: pointer; display: flex; align-items: center; gap: 6px; margin: 0; }
.fold > h3::after { content: '›'; margin-left: auto; font-size: 1.4rem; line-height: 1; color: var(--muted); transition: transform .15s; }
.fold.open > h3::after { transform: rotate(90deg); }
.fold:not(.open) > :not(h3) { display: none !important; }
.fold:not(.open) { padding-top: 14px; padding-bottom: 14px; }
/* Connected families: name on top, buttons on their own line */
#friends-list .list-item { flex-wrap: wrap; }
#families-card #friends-list > .card { box-shadow: none; border: 1px solid var(--line); }
#friends-list .list-item > .row { width: 100%; justify-content: flex-end; flex-wrap: nowrap; gap: 6px; }
#friends-list .list-item > .row .btn.ghost { padding-left: 10px; padding-right: 10px; min-width: 0; }
#friends-list .list-item > .row .btn { white-space: nowrap; }

/* 🏠🏠 Two homes */
.cop-link { border: 1px solid var(--line); box-shadow: none; }
.cop-head { align-items: center; gap: 10px; }
.cop-head > div { display: flex; flex-direction: column; min-width: 0; }
.cop-now { font-weight: 700; margin: 0; }
.cop-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cop-day { display: flex; flex-direction: column; align-items: center; border-radius: 8px; padding: 3px 0; font-size: .8rem; line-height: 1.1; }
.cop-day.mine { background: var(--primary-soft); color: var(--primary-strong); }
.cop-day.theirs { background: var(--sun-soft); color: var(--sun); }
.cop-legend { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cop-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.cop-dot.mine { background: var(--primary-soft); border: 1px solid var(--primary); }
.cop-dot.theirs { background: var(--sun-soft); border: 1px solid var(--sun); }
.cop-note { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.cop-note p { margin: 0; }
.small-code { font-size: .85rem; word-break: break-all; letter-spacing: 0; }
#coparent-body fieldset { min-width: 0; }
#coparent-body input:not([type=radio]):not([type=checkbox]), #coparent-body select { width: 100%; min-width: 0; box-sizing: border-box; }
#coparent-body .row.two > label { min-width: 0; flex: 1; }

/* 🛡️ Groups: announcements, photos, leaders */
.announce-item { box-shadow: none; border: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.announce-item p { margin: 0; white-space: pre-wrap; }
.no-photo-note { background: var(--sun-soft); color: var(--sun); border-radius: 10px; padding: 6px 10px; margin: 0; }
#group-leaders select { flex: 1; min-width: 0; }
#group-announce textarea { width: 100%; box-sizing: border-box; }
.group-meet, .group-todo { box-shadow: none; border: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.group-meet.canceled strong { color: var(--muted, #888); }
.group-todo.done { background: var(--mint-soft, #eefaf3); }
.signup-slot { border-top: 1px solid var(--line); padding-top: 6px; }
.member-row:has(.move-box) { flex-wrap: wrap; }
.move-box { flex-basis: 100%; background: var(--sky-soft, #eef4fb); border-radius: 12px; padding: 10px; }
/* 🔄 KiddoCue restarting for an update, or no internet */
.updating { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; background: color-mix(in srgb, var(--bg, #f6f8fc) 94%, transparent); backdrop-filter: blur(4px); }
.updating[hidden] { display: none; }
.updating strong { font-size: 1.25rem; }
.updating small { color: var(--muted, #667); max-width: 280px; }
.updating-spin { font-size: 2.5rem; animation: updating-spin 1.6s linear infinite; }
@keyframes updating-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .updating-spin { animation: none; } }
/* 📝 Homework Checker */
.homework-kid { display: flex; flex-direction: column; gap: 10px; box-shadow: none; border: 1px solid var(--line); }
.homework-checking { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 12px; text-align: center; }
.homework-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.homework-row-main { display: flex; flex-direction: column; min-width: 0; }
.homework-summary { box-shadow: none; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.homework-summary p { margin: 0; }
.homework-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.homework-item.v-wrong, .homework-item.v-blank { border-left: 4px solid #e25555; }
.homework-item.v-unsure { border-left: 4px solid #e2a93b; }
.homework-item.v-right { opacity: .8; }
.homework-answer { font-weight: 600; color: #1f8a4c; }
.kid-homework-card { background: rgba(255,255,255,.9); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 10px; color: #14233b; }
.kid-homework-card h3 { margin: 0; }
.kid-homework-note { margin: 0; font-size: 1.1rem; }
.kid-homework-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 0; border-radius: 16px; background: #fff3d6; font-size: 1.15rem; text-align: left; color: inherit; box-sizing: border-box; }
.kid-homework-item button { border: 0; border-radius: 999px; padding: 10px 14px; font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
.kid-homework-help { background: #fff; color: #b45309; }
.kid-homework-item .kid-homework-tick { background: #16a34a; color: #fff; }
.kid-homework-item.fixed .kid-homework-tick { background: transparent; font-size: 1.4rem; padding: 4px; }
.homework-help-pill { margin-left: 8px; font-size: .75rem; vertical-align: middle; }
.kid-homework-item.fixed { background: #dff5e6; }
.kid-homework-label { font-weight: 800; font-size: 1.4rem; }
.kid-homework-q { flex: 1; }
.kid-homework-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 8px; }
.kid-homework-bar .kid-foods-btn { margin-top: 0; }
.kid-homework-item { flex-wrap: wrap; }
.kid-homework-q { flex: 1 1 6em; min-width: 6em; }
/* 👋 Kid mode: friends fold away behind one big button */
.kid-install-tip { display: flex; align-items: center; gap: 6px; max-width: 640px; margin: 0 auto 6px; padding: 6px 8px 6px 14px; border-radius: 999px; background: rgba(255,255,255,.85); box-shadow: 0 2px 8px rgba(0,0,0,.08); position: relative; z-index: 2; width: calc(100% - 120px); box-sizing: border-box; }
.kid-install-open { flex: 1; border: 0; background: none; font: inherit; font-size: .95rem; font-weight: 700; color: #0f2a4a; text-align: left; cursor: pointer; padding: 6px 0; }
.kid-install-close { border: 0; background: none; font: inherit; font-size: 1rem; color: #5a6b84; cursor: pointer; padding: 6px 8px; }
/* 🧠 Practice */
.kid-practice-btn { color: #6d28d9; }
.kid-practice-stars { font-size: 1.2rem; font-weight: 800; margin: 0 0 6px; text-align: center; }
.kid-practice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 520px; margin: 0 auto; }
.kid-practice-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 10px; border: 0; border-radius: 24px; background: #fff; color: #0f2a4a; font: inherit; font-size: 1.2rem; font-weight: 800; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.kid-practice-tile small { font-size: .85rem; font-weight: 700; color: #15803d; }
.kid-practice-emoji { font-size: 2.6rem; line-height: 1; }
.kid-practice-homework { display: flex; flex-direction: column; gap: 10px; max-width: 520px; margin: 0 auto 16px; }
.kid-practice-tile.wide { flex-direction: row; justify-content: flex-start; flex-wrap: wrap; text-align: left; padding: 14px 18px; background: #fef9c3; }
.kid-practice-tile.wide .kid-practice-emoji { font-size: 2rem; }
.kid-practice-tile.wide small { flex-basis: 100%; }
.kid-homework-practice { margin-top: 12px; width: 100%; }
.homework-practice-card { border-left: 4px solid #7c3aed; }
.homework-practice-list { margin: 0; padding-left: 20px; }
.homework-practice-list li { margin: 2px 0; }
.kid-quiz-top { display: flex; align-items: center; justify-content: space-between; max-width: 560px; margin: 0 auto 10px; }
.kid-quiz-top .kid-back { margin: 0; }
#kid-quiz-progress { font-weight: 800; font-size: 1.1rem; color: #0f2a4a; }
.kid-quiz-q h3 { font-size: 1.6rem; line-height: 1.3; margin: 0; text-align: center; word-break: break-word; }
.kid-say { align-self: center; border: 0; border-radius: 999px; padding: 10px 18px; background: #e0e7ff; color: #3730a3; font: inherit; font-weight: 800; cursor: pointer; }
.kid-quiz-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; margin: 0 auto; width: 100%; }
.kid-quiz-choice { min-height: 74px; padding: 12px; border: 3px solid transparent; border-radius: 20px; background: #fff; color: #0f2a4a; font: inherit; font-size: 1.3rem; font-weight: 800; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.08); word-break: break-word; }
.kid-quiz-choice.right { background: #dcfce7; border-color: #16a34a; }
.kid-quiz-choice.wrong { background: #fee2e2; border-color: #ef4444; opacity: .75; }
.kid-quiz-feedback { text-align: center; font-size: 1.2rem; font-weight: 800; color: #b45309; margin: 4px 0 0; }
.kid-quiz-result { max-width: 560px; margin: 4px auto 0; background: #fff; border-radius: 20px; padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 8px; color: #0f2a4a; }
.kid-quiz-result.ok strong { color: #15803d; font-size: 1.4rem; }
.kid-quiz-result.miss strong { color: #b45309; font-size: 1.2rem; }
.kid-quiz-result p { margin: 0; }
.kid-quiz-result .kid-yes { margin-top: 4px; }
.kid-passage p { text-align: left; font-size: 1.15rem; line-height: 1.55; margin: 0; }
.kid-passage-peek { max-width: 560px; margin: 0 auto; background: rgba(255,255,255,.8); border-radius: 16px; padding: 8px 14px; color: #0f2a4a; }
.kid-passage-peek summary { font-weight: 800; cursor: pointer; }
.kid-passage-peek p { line-height: 1.5; }
.homework-practice-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 380px) { .kid-quiz-choices { grid-template-columns: 1fr; } }
/* ⚙️ Settings: one fold on the Family tab, grouped inside */
.settings-card > h3 .muted { font-weight: 500; }
.settings-card .card { box-shadow: none; border: 1px solid var(--line); margin: 0; }
.settings-group { margin: 10px 0 0; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.settings-title { white-space: nowrap; }
.settings-card > h3 .muted { flex: 1; min-width: 0; }
/* ⏱️ Homework timer */
.kid-timer-btn { color: #0f766e; }
.kid-timer-card { text-align: center; }
.kid-timer-clock { font-size: 4.2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #0f2a4a; line-height: 1.1; }
.kid-timer-card.running .kid-timer-clock { color: #0f766e; }
.kid-timer-note { font-size: 1.1rem; font-weight: 700; color: #3b5068; margin: 8px 0 0; }
/* 📊 Progress (parents) */
.progress-card { gap: 10px; }
.progress-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg); }
.progress-tabs button { border: 0; border-radius: 999px; padding: 8px; font: inherit; font-weight: 700; background: transparent; color: var(--muted); cursor: pointer; }
.progress-tabs button.on { background: var(--card, #fff); color: var(--text, inherit); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.progress-big { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.progress-stat { background: var(--bg); border-radius: 14px; padding: 10px 12px; }
.progress-stat strong { display: block; font-size: 1.35rem; }
.progress-stat small { color: var(--muted); }
.progress-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.progress-row .bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress-row .bar span { display: block; height: 100%; border-radius: 6px; background: #7c3aed; }
/* 🎬 How-to videos */
.vid-intro { margin: -4px 0 0; }
.vid-hero { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; width: 100%; padding: 12px; border: 0; border-radius: 22px; background: linear-gradient(135deg, #2f49b5, #1592d1); color: #fff; text-align: left; font: inherit; cursor: pointer; box-shadow: 0 10px 24px rgba(11, 78, 162, .25); }
.vid-hero-thumb { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #0b2f63; }
.vid-hero-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.vid-hero-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vid-hero-text strong { font-size: 1.12rem; line-height: 1.25; }
.vid-hero-text small { opacity: .9; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vid-badge { align-self: flex-start; background: #f5a623; color: #1b1b1b; font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.vid-hero-meta { align-self: flex-start; margin-top: 2px; background: rgba(255,255,255,.18); padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: .9rem; }
.vid-section { margin: 6px 0 0; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.vid-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vid-tile { position: relative; display: block; aspect-ratio: 3 / 4; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: #0b2f63; cursor: pointer; box-shadow: 0 4px 14px rgba(15, 39, 66, .14); transition: transform .15s; }
.vid-tile:active { transform: scale(.97); }
.vid-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.vid-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(5, 20, 45, 0) 35%, rgba(5, 20, 45, .88) 100%); }
.vid-time, .vid-seen { position: absolute; top: 8px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 800; color: #fff; background: rgba(5, 20, 45, .7); }
.vid-time { right: 8px; }
.vid-seen { left: 8px; background: rgba(22, 163, 74, .9); }
.vid-play { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -30px 0 0 -22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding-left: 3px; box-sizing: border-box; background: rgba(255, 255, 255, .92); color: #2f49b5; font-size: 1.05rem; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.vid-hero-thumb .vid-play { margin-top: -22px; width: 40px; height: 40px; margin-left: -20px; }
.vid-name { position: absolute; left: 10px; right: 10px; bottom: 10px; color: #fff; font-weight: 800; font-size: .92rem; line-height: 1.2; text-align: left; }
.vid-emoji { display: block; font-size: 1.3rem; margin-bottom: 2px; }
.vid-player { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; z-index: 1000; background: #000; color: #fff; display: flex; flex-direction: column; }
.vid-player[hidden] { display: none; }
.vid-player-top { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 14px 6px; }
.vid-x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 1.1rem; cursor: pointer; }
.vid-count { font-size: .85rem; opacity: .75; font-weight: 700; }
.vid-player-video { flex: 1; min-height: 0; width: 100%; object-fit: contain; background: #000; }
.vid-player-sheet { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: #0d1626; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; gap: 6px; }
.vid-player-sheet p { margin: 0; opacity: .85; font-size: .92rem; line-height: 1.35; }
.vid-player-actions { display: grid; grid-template-columns: 48px 1fr 48px; gap: 10px; margin-top: 6px; }
.vid-nav { border: 0; border-radius: 14px; background: rgba(255,255,255,.12); color: #fff; font-size: 1.6rem; cursor: pointer; }
.vid-nav:disabled { opacity: .3; }
@media (max-width: 640px) {
  #videos-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; padding-top: calc(12px + env(safe-area-inset-top)); }
}
/* 🏠 Home: Today's Plan → Homework & Practice → quick actions */
#tab-free .greeting h2 { font-size: 1.55rem; margin: 0; }
#tab-free .greeting p { margin: 0; font-size: 1.05rem; }
#tab-free > .card { border-top: 0; }
#tab-free .card { padding: 14px 16px; }
.today-card { display: flex; flex-direction: column; gap: 4px; }
.today-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0 0 8px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.today-head strong { flex: 1; font-size: 1.25rem; white-space: nowrap; }
.today-head .pill { font-size: .78rem; white-space: nowrap; }
.today-badge { display: flex; flex-direction: column; align-items: center; width: 44px; border-radius: 10px; overflow: hidden; background: var(--card); box-shadow: 0 1px 4px rgba(15, 39, 66, .18); line-height: 1.1; }
.today-badge small { width: 100%; text-align: center; background: #e53935; color: #fff; font-size: .62rem; font-weight: 800; padding: 2px 0; letter-spacing: .04em; }
.today-badge b { font-size: 1.35rem; padding: 1px 0 3px; }
.today-rows { display: flex; flex-direction: column; }
.today-row { display: grid; grid-template-columns: 4.4em 8px 24px 1fr 12px; align-items: center; gap: 8px; width: 100%; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.today-row:last-child { border-bottom: 0; }
.today-time { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.today-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-blue); }
.dot-orange { background: #f59e0b; } .dot-purple { background: #8b5cf6; } .dot-green { background: #22c55e; } .dot-teal { background: var(--brand-teal); } .dot-grey { background: var(--line); }
.today-icon { font-size: 1.25rem; text-align: center; }
.today-text { min-width: 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Tomorrow's prep rows show the whole task, what it's for and who has it. */
.ready-tmr .today-text, .ready-tmr-row .today-text { -webkit-line-clamp: 4; }
.today-row.meds-row .today-text { color: var(--primary); }
.today-row.muted-row .today-text { color: var(--muted); }
.today-go { color: var(--muted); font-size: 1.3rem; line-height: 1; }
.hw-hero { display: flex; flex-direction: column; gap: 10px; background: linear-gradient(160deg, #e8f2ff, #f6faff 60%, var(--card)); border: 1px solid #cfe0f8; box-shadow: 0 8px 24px rgba(21, 101, 192, .12); }
.hw-hero-top { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: start; }
.hw-art { position: relative; font-size: 3.6rem; line-height: 1; text-align: center; padding-top: 6px; transform: rotate(-8deg); }
.hw-spark { position: absolute; top: -4px; right: 0; font-size: 1.1rem; }
.hw-hero-text { min-width: 0; }
.hw-hero-text h3 { margin: 0 0 4px; font-size: 1.3rem; line-height: 1.2; }
.hw-hero-text p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.35; }
.hw-hero-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hw-hero-buttons .btn { padding: 11px 4px; font-size: .92rem; min-width: 0; line-height: 1.2; }
.hw-hero-note { color: var(--muted); }
.hw-kids { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.hw-kid { display: grid; grid-template-columns: auto 1fr auto 12px; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.hw-kid-text { display: flex; flex-direction: column; min-width: 0; }
.hw-kid-text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-pill { padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.hw-pill.retry { background: var(--sun-soft); color: var(--sun); }
.hw-pill.review { background: var(--primary-soft); color: var(--primary); }
.hw-pill.done { background: var(--go-soft); color: var(--go); }
.hw-pill.none { background: var(--bg); color: var(--muted); }
#home-actions button { padding: 12px 4px 10px; font-weight: 800; }
#home-actions .qa-hw { background: #e9f8ef; color: #166534; }
#home-actions .qa-free { background: #fff6e0; color: #92400e; }
#home-actions .qa-help { background: #fff0e3; color: #c2410c; }
#home-actions .qa-cal { background: #f1ecff; color: #5b21b6; }
@media (max-width: 380px) {
  .hw-hero-top { grid-template-columns: 56px 1fr; }
  .hw-art { font-size: 2.8rem; }
  .today-row { grid-template-columns: 4.2em 8px 22px 1fr 12px; gap: 6px; }
}
/* 🌙 dark */ html.dark .hw-hero { background: linear-gradient(160deg, #13284a, var(--card)); border-color: #23406e; }
  html.dark #home-actions .qa-hw { background: #12301f; color: #86efac; }
  html.dark #home-actions .qa-free { background: #33270c; color: #fcd34d; }
  html.dark #home-actions .qa-help { background: #3a1f0e; color: #fdba74; }
  html.dark #home-actions .qa-cal { background: #241a3d; color: #c4b5fd; }
/* 🏠 Home, a size down (more fits on the first screen) */
#tab-free { gap: 10px; }
#tab-free .greeting h2 { font-size: 1.3rem; }
#tab-free .greeting p { font-size: .92rem; }
#tab-free .card { padding: 12px 14px; }
.today-head { gap: 10px; padding-bottom: 6px; }
.today-head strong { font-size: 1.08rem; }
.today-badge { width: 36px; border-radius: 8px; }
.today-badge small { font-size: .55rem; }
.today-badge b { font-size: 1.1rem; }
.today-row { padding: 6px 0; font-size: .92rem; grid-template-columns: 4.2em 8px 22px 1fr 12px; gap: 6px; }
.today-time { font-size: .8rem; }
.today-icon { font-size: 1.05rem; }
.hw-hero { gap: 8px; }
.hw-hero-top { grid-template-columns: 52px 1fr; gap: 10px; }
.hw-art { font-size: 2.6rem; padding-top: 2px; }
.hw-spark { font-size: .85rem; }
.hw-hero-text h3 { font-size: 1.08rem; margin-bottom: 2px; }
.hw-hero-text p { font-size: .84rem; line-height: 1.3; }
.hw-hero-buttons .btn { padding: 8px 4px; font-size: .86rem; }
.hw-hero-note { font-size: .78rem; }
.hw-kid { padding: 6px 10px; gap: 8px; }
.hw-kid .kid-avatar { width: 30px; height: 30px; font-size: 1rem; }
.hw-kid-text b { font-size: .92rem; }
.hw-kid-text small { font-size: .78rem; }
.hw-pill { font-size: .72rem; padding: 2px 8px; }
#home-actions { gap: 6px; }
#home-actions button { min-height: 64px; padding: 8px 2px 6px; gap: 4px; font-size: .72rem; }
#home-actions button span { font-size: 1.3rem; }
/* Front page: the one-line promise and four reasons */
.welcome h2 { font-size: 1.6rem; line-height: 1.15; }
.welcome .tagline { color: var(--muted); font-weight: 500; font-size: 1.02rem; line-height: 1.4; max-width: 24em; margin: 0 auto 12px; }
.welcome-list { list-style: none; padding: 0; margin: 0 auto; max-width: 24em; display: grid; gap: 6px; text-align: left; font-weight: 600; font-size: .98rem; }
.welcome-list li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; font-size: .92rem; }
/* 👪 Family tab */
.fam-hero { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; }
.fam-icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; background: var(--primary-soft); }
.fam-hero-text { display: flex; flex-direction: column; min-width: 0; }
.fam-hero-text strong { font-size: 1.2rem; }
.fam-hero-text small { color: var(--muted); }
#kids-card h3, #groups-card h3 { margin: 0; font-size: 1.1rem; }
.kid-row { border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.kid-row-main { display: grid; grid-template-columns: auto 1fr 12px; gap: 10px; align-items: center; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.kid-row-name { display: flex; flex-direction: column; min-width: 0; }
.kid-row-name small { color: var(--muted); font-size: .8rem; }
.kid-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.kid-chip { border: 0; border-radius: 999px; padding: 7px 4px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-hw { background: var(--primary-soft); color: var(--primary); }
.kc-groups { background: var(--go-soft); color: var(--go); }
.kc-act { background: #f1ecff; color: #6d28d9; }
.kc-chores { background: #fff3dc; color: #b45309; }
.fam-connect-top { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; }
.fam-connect-top .fam-icon { width: 44px; height: 44px; font-size: 1.3rem; }
.fam-connect-text { display: flex; flex-direction: column; }
.fam-connect-text strong { font-size: 1.05rem; }
.fam-connect-text small { color: var(--muted); }
#invite-more .card { box-shadow: none; border: 1px solid var(--line); margin: 0; }
#settings-help > h3 .muted { flex: 1; min-width: 0; }
#settings-help .card { box-shadow: none; border: 1px solid var(--line); margin: 0; }
#tab-people > .card { border-top: 0; }
/* 🌙 dark */ html.dark .kc-act { background: #241a3d; color: #c4b5fd; } html.dark .kc-chores { background: #3a2a10; color: #fcd34d; }
@media (max-width: 420px) { #settings-help > h3 .muted { display: none; } }
/* 🧠 Practice: levels, stars and rewards */
.kid-stats { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 0 auto 10px; max-width: 520px; }
.kid-stats span { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 6px 10px; border-radius: 16px; background: rgba(255,255,255,.85); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.kid-stats b { font-size: 1.15rem; color: #0f2a4a; }
.kid-stats small { font-size: .75rem; color: #3b5068; font-weight: 700; }
.kid-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 520px; margin: 0 auto 8px; }
.kid-level { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 3px solid transparent; border-radius: 18px; background: #fff; color: #0f2a4a; font: inherit; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.kid-level-emoji { font-size: 1.6rem; }
.kid-level b { font-size: 1rem; }
.kid-level small { font-size: .72rem; color: #3b5068; font-weight: 700; text-align: center; }
.kid-level.on.lv-warmup { border-color: #22c55e; background: #ecfdf3; }
.kid-level.on.lv-practice { border-color: #3b82f6; background: #eef5ff; }
.kid-level.on.lv-challenge { border-color: #a855f7; background: #f6efff; }
.kid-rewards { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-weight: 800; font-size: 1.1rem; }
.kid-reward-badge { color: #7c3aed; }
.progress-badges { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .85rem; font-weight: 700; }
.rewards-card summary, .lifeskills-card summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; }
.rewards-card summary::-webkit-details-marker, .lifeskills-card summary::-webkit-details-marker { display: none; }
/* ✨ Final polish */
/* Front page: the homework feature stands out */
.welcome-list li.welcome-star { border-color: #b9d4f7; background: linear-gradient(135deg, #e8f2ff, var(--card)); color: var(--primary); }
/* Home: the four quick actions are a size smaller than the main sections */
#home-actions { gap: 6px; }
#home-actions button { min-height: 52px; padding: 6px 2px; gap: 2px; font-size: .7rem; border-radius: 14px; box-shadow: none; border: 1px solid var(--line); }
#home-actions button span { font-size: 1.1rem; }
/* 🚀 Get started */
.notify-ask { display: flex; flex-direction: column; gap: 6px; border: 1px solid #f3d27a; background: #fff9e6; padding: 6px 10px; }
.notify-ask p { margin: 0; }
.whatsnew-card { display: flex; flex-direction: column; gap: 8px; border: 1px solid #cfe0f8; background: #f4f8ff; padding: 10px 12px; }
.whatsnew-card[hidden] { display: none; }
.whatsnew-card .btn { align-self: flex-start; }
.whatsnew-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.95em; }
.whatsnew-list li { display: flex; gap: 8px; align-items: flex-start; }
.notify-ask-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notify-ask-row { gap: 6px; }
.notify-ask-row > p { flex: 1 1 140px; min-width: 0; }
.notify-ask-how summary { cursor: pointer; }
.first-win { display: flex; flex-direction: column; gap: 6px; border: 1px solid #cfe0f8; }
.win-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.win-bar span { display: block; height: 100%; background: var(--go); border-radius: 6px; }
.win-step { display: grid; grid-template-columns: 30px 1fr 12px; align-items: center; gap: 10px; width: 100%; padding: 8px 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.win-step.done { color: var(--muted); text-decoration: line-through; cursor: default; }
.win-check { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.win-step.done .win-check { background: var(--go-soft); color: var(--go); font-weight: 800; text-decoration: none; }
/* Plans: three clearly different actions */
.plan-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.plan-action { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); font: inherit; color: inherit; cursor: pointer; text-align: center; }
.plan-action span { font-size: 1.5rem; }
.plan-action b { font-size: .85rem; }
.plan-action small { font-size: .7rem; color: var(--muted); line-height: 1.2; }
.pa-invite { background: #fdf0f6; border-color: #f7cfe2; }
.pa-free { background: #fff6e0; border-color: #f6dfa3; }
.pa-help { background: #fff0e3; border-color: #f8d2b0; }
/* 💬 Messages: what goes here */
.messages-hint { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.messages-hint.empty { padding: 28px 16px; }
.messages-hint p { margin: 0; }
/* ☰ Tools: a link looks like the buttons */
a.tool { text-decoration: none; color: inherit; }
/* 🌙 dark */ html.dark .pa-invite { background: #3a1626; border-color: #5a2440; } html.dark .pa-free { background: #33270c; border-color: #4d3b12; } html.dark .pa-help { background: #3a1f0e; border-color: #5a3216; }
  html.dark .welcome-list li.welcome-star { background: #13284a; border-color: #23406e; }
.home-contact { border: 1px solid #cfe0f8; }
.home-contact p { margin: 0; }
.messages-hint .big-emoji { font-size: 2.6rem; }
/* ✓ Today's Plan check-offs */
.today-line { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.today-line:last-child { border-bottom: 0; }
.today-line .today-row { flex: 1; min-width: 0; border-bottom: 0; }
.today-check { flex: 0 0 26px; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid #c9d3e3; background: var(--card); color: var(--go); font: 800 .9rem/1 inherit; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.today-check.on { background: var(--go-soft); border-color: var(--go); }
.today-check.auto { border-style: dashed; cursor: default; }
.today-check.auto.on { border-style: solid; }
.today-line.done .today-text, .today-line.done .today-time { color: var(--muted); text-decoration: line-through; }
.today-line.done .today-icon { opacity: .5; }
.today-count { margin-left: auto; font-size: .8rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.today-count.all { color: var(--go); }
.today-bar { margin: 2px 0 4px; }
/* 🏫 A new group: get started, then ＋ Add something */
#group-start, #group-invite-menu { gap: 2px; }
.win-step .stack-0 { display: flex; flex-direction: column; gap: 1px; }
.win-step .stack-0 small { font-size: .8rem; }
.add-something-menu { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 8px 40px; }
#group-more .win-step { border-top: 0; border: 1px dashed var(--line); border-radius: 14px; padding: 10px 12px; background: var(--card); }
#group-settings > .stack { margin-top: 10px; }
#group-admin { border-top: 1px solid var(--line); padding-top: 12px; }
#group-dialog .stack > div:empty { display: none; }
#group-start #group-invite-menu { padding: 0 0 6px 40px; }
#group-start #group-invite-menu > strong { display: none; }
/* Front page: "Start my family" + small "Free to get started" */
.free-note { margin: -4px 0 4px; }
/* Front page: everything flows into one family calendar */
.cal-story { text-align: center; }
.cal-sources { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.cal-sources span { padding: 6px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; }
.cal-arrow { font-size: 1.4rem; color: var(--muted); margin: 4px 0; }
.cal-one { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px; padding: 12px 18px; border-radius: 16px; background: #1e88f5; color: #fff; font-size: 1.1rem; }
.cal-one small { opacity: .85; font-size: .85rem; }
.cal-story p { margin: 12px auto 0; max-width: 30em; }
.demo-fill video { object-fit: cover; }
/* 🔤 This week's spelling words */
.spelling-words { display: flex; flex-wrap: wrap; gap: 6px; }
.spelling-words span { padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; }
.spelling-card textarea, .spelling-card input { width: 100%; }
/* ✏️ Hear it, spell it */
.kid-say.big { font-size: 1.15rem; padding: 12px 22px; }
.kid-say-row { justify-content: center; gap: 10px; }
.kid-say.slow { background: #dcfce7; color: #166534; }
.kid-spell-sentence { margin: 0; font-size: 1.25rem; font-weight: 700; text-align: center; color: #0f2a4a; }
.kid-spell { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.kid-spell-input { font: 800 1.8rem/1.2 ui-rounded, "Nunito", system-ui, sans-serif; text-align: center; letter-spacing: .06em; padding: 14px; border-radius: 18px; border: 2px solid #c9d3e3; background: #fff; }
.kid-spell-input:focus { border-color: var(--primary, #1e88f5); outline: none; }
.kid-spell-answer { font: 800 2rem/1.2 ui-rounded, "Nunito", system-ui, sans-serif; letter-spacing: .08em; margin: 6px 0; }
/* ✏️ Kids' own messages, and a grown-up messaging their kid */
.kid-type { display: flex; gap: 8px; width: 100%; flex: 0 0 100%; box-sizing: border-box; padding: 0 4px; }
.kid-type input { flex: 1 1 auto; width: auto; min-width: 0; font-size: 1.1rem; font-weight: 600; padding: 12px 14px; border-radius: 16px; border: 2px solid #c9d3e3; background: #fff; box-sizing: border-box; }
.kid-phrases .kid-type button.kid-yes { flex: 0 0 auto; width: auto; margin: 0; padding: 10px 20px; border-radius: 999px; background: #1a8f4a; color: #fff; font-weight: 800; }
.family-send input { flex: 1; min-width: 0; }
.family-thread { max-height: 55vh; overflow: auto; }
/* 📋 My Day (kid mode) */
.kid-day-btn { display: block; width: 100%; max-width: 420px; margin: 0 auto 12px; border: 0; border-radius: 22px; padding: 16px; font: inherit; font-size: 1.35rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #1e88f5, #12aeb3); box-shadow: 0 6px 18px rgba(30, 136, 245, .3); }
.kid-day-card { text-align: left; }
.kid-day-card h3 { margin: 0 0 8px; }
.kid-day-sched { display: flex; flex-direction: column; gap: 6px; }
.kid-day-item { display: grid; grid-template-columns: 5.2em 1fr; gap: 8px; align-items: baseline; font-size: 1.05rem; }
.kid-day-time { color: #3b5a55; font-weight: 700; font-size: .95rem; }
.kid-day-head { display: flex; justify-content: space-between; align-items: center; }
.kid-day-count { font-weight: 800; color: #3b5a55; }
.kid-day-count.all { color: #15803d; }
.kid-task { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 6px; border: 0; border-bottom: 1px solid #e3e9f2; background: none; font: inherit; font-size: 1.15rem; text-align: left; color: inherit; cursor: pointer; }
.kid-task-check { flex: 0 0 34px; height: 34px; border-radius: 50%; border: 3px solid #b8c6da; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #15803d; background: #fff; }
.kid-task.done .kid-task-check { border-color: #15803d; background: #dcfce7; }
.kid-task.done .kid-task-text { text-decoration: line-through; color: #6b7c93; }
.kid-day-add { margin-top: 10px; }
/* 📋 Chores & tasks (parent) */
.chore-row { padding: 8px 0; border-bottom: 1px solid var(--line); gap: 8px; }
.chore-form .row { gap: 8px; }
.chore-form input[name=text] { flex: 1; min-width: 0; }
.chore-form select[name=repeat] { flex: 1; min-width: 0; }
.chore-emoji { width: 4.2em; flex: 0 0 auto; }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.day-chip { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 6px 10px; font: inherit; font-size: .85rem; color: inherit; cursor: pointer; }
.day-chip[aria-pressed=true] { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); font-weight: 700; }
/* ✉️ Note to school */
.note-kid { border: 1px solid var(--line); background: none; color: inherit; border-radius: 999px; padding: 7px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.note-kid.on { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.note-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.note-kind { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: none; color: inherit; border-radius: 12px; padding: 9px 10px; font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.note-kind.on { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); font-weight: 700; }
.note-dates, .note-names { gap: 8px; align-items: flex-end; }
.note-dates label, .note-names label { flex: 1; min-width: 0; }
.note-edit { width: 100%; font: inherit; font-weight: 400; }
.note-wording { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.note-paper { background: #fffdf6; color: #1f2937; border: 1px solid #e8dfc4; border-radius: 6px; padding: 18px 20px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.02rem; line-height: 1.5; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.note-paper p { margin: 0 0 10px; }
.note-paper .note-date { text-align: right; color: #555; }
.note-paper .note-sign { margin-bottom: 0; font-weight: 700; }
.note-paper .note-line { color: #444; font-size: .92rem; margin-bottom: 4px; }
.note-paper .note-sig { margin-top: 18px; }
.note-actions .btn { flex: 1; text-align: center; }
#print-sheet { display: none; }
@media print {
  html:has(body.printing-note), body.printing-note { background: #fff !important; }
  body.printing-note > *:not(#print-sheet) { display: none !important; }
  body.printing-note #print-sheet { display: block; }
  body.printing-note #print-sheet, body.printing-note #print-sheet * { visibility: visible !important; }
  #print-sheet .note-paper { border: 0; box-shadow: none; background: #fff; color: #000; font-size: 14pt; padding: 1.5cm; }
}
/* 🔎 Search everything */
.search-btn { margin-left: 6px; font-size: 1.1rem; }
.search-head { gap: 8px; align-items: center; }
.search-head input { flex: 1; min-width: 0; font-size: 1.05rem; }
.search-dialog { align-self: start; margin-top: max(12px, env(safe-area-inset-top)); }
.search-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.search-icon { flex: 0 0 32px; height: 32px; border-radius: 10px; background: var(--primary-soft); display: grid; place-items: center; font-size: 1.1rem; }
.search-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.search-text small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ☀️ 3-day weather on Home */
.weather-home { padding: 12px 14px; }
.weather-days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; }
.weather-day { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.weather-day small { font-size: .78rem; }
.weather-big { font-size: 1.8rem; line-height: 1.1; }
.weather-day .rainy { color: var(--primary); font-weight: 700; }
.weather-foot { margin-top: 4px; gap: 8px; }
/* ✏️ Customize Home */
.home-off { display: none !important; }
.home-customize { align-self: center; margin: 4px 0 12px; }
.homecard-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.weather-ask { display: flex; align-items: center; gap: 8px; }
.weather-ask-text { flex: 1; min-width: 0; font-size: .95rem; }
.weather-ask .btn { flex: none; white-space: nowrap; }
/* My Day: the "add my own" box in kid mode */
.kid-day-add input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 2px solid #cfe0f5; font: inherit; font-size: 1.05rem; }
.kid-day-add button.kid-yes { flex: 0 0 auto; width: auto; margin: 0; padding: 10px 18px; border-radius: 999px; font-size: 1rem; }
.weather-ask .link { flex: none; margin: 0; align-self: center; }
.weather-ask-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ⋮⋮ Drag to reorder */
.drag-handle { flex: 0 0 auto; padding: 10px 8px; margin-right: 4px; color: var(--muted); font-weight: 900; letter-spacing: -2px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.dragging { opacity: .85; background: var(--primary-soft); border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.chore-row { justify-content: flex-start; }
.chore-row .chore-text { flex: 1; min-width: 0; }
.kid-task-row { display: flex; align-items: center; border-bottom: 1px solid #e3e9f2; }
.kid-task-row .kid-task { border-bottom: 0; flex: 1; min-width: 0; }
.kid-task-row .drag-handle { color: #9aa9be; font-size: 1.2rem; }
/* ✏️ Medicine: change the time it was given */
.med-change-time, .med-earlier { white-space: nowrap; display: block; padding: 2px 0; text-align: left; }
.med-time-edit { gap: 6px; align-items: center; margin-top: 4px; }
.med-dose .med-time-input { width: 132px; flex: 0 0 132px; min-width: 132px; padding: 6px 8px; }
.med-time-edit { flex-wrap: wrap; }
/* 📍 Weather by zip code */
.weather-zip { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.weather-zip input { flex: 1; min-width: 0; max-width: 9em; }
.weather-zip .btn { flex: none; white-space: nowrap; margin: 0; }
.weather-links { gap: 12px; flex: none; }

/* 🏠🏠 A friend's kid at their other home (their parent chose to share it). */
.away-line { display: block; margin-top: 4px; padding: 6px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); line-height: 1.35; }

/* 🧩 Puzzles: Sudoku, crossword, word search, memory match, word guess */
.kid-puzzles-btn { background: #0d9488 !important; color: #fff !important; }
.pz {
  --pz-card: #fff; --pz-ink: #0f2742; --pz-muted: #5a6b84; --pz-line: #c9d6e8; --pz-strong: #0f2742;
  --pz-sel: #fde68a; --pz-near: #eef4fc; --pz-same: #dbeafe; --pz-go: #15803d; --pz-bad: #dc2626; --pz-btn: #eef2f8;
  max-width: 480px; margin: 0 auto; text-align: left; color: var(--pz-ink);
}
/* 🌙 dark */ html.dark dialog .pz {
    --pz-card: #121c2e; --pz-ink: #e6eef9; --pz-muted: #93a3bb; --pz-line: #2c3e5c; --pz-strong: #93a3bb;
    --pz-sel: #6b5512; --pz-near: #17243a; --pz-same: #1e3a66; --pz-go: #22a052; --pz-bad: #f87171; --pz-btn: #1c2a42;
  }
.kid-mode .pz { font-size: 1rem; }
.pz-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.pz-title { font-size: 1.4rem !important; margin: 0 !important; flex: 1; }
.pz-back { border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--pz-muted); padding: 6px 4px; cursor: pointer; }
.pz-level-tag { flex: 1; font-size: 0.85rem; color: var(--pz-muted); text-align: center; }
.pz-time { font-variant-numeric: tabular-nums; font-weight: 800; background: var(--pz-btn); border-radius: 999px; padding: 4px 12px; }
.pz-muted { color: var(--pz-muted) !important; }
.pz .small, .pz p.small { font-size: 0.85rem; }
.kid-mode .pz p { font-size: 1rem; }
.pz-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.pz-btn { border: 0; border-radius: 999px; padding: 10px 16px; font: inherit; font-weight: 700; background: var(--pz-btn); color: var(--pz-ink); cursor: pointer; }
.pz-btn.small { padding: 8px 12px; font-size: 0.9rem; }
.pz-btn.pz-go { background: var(--pz-go); color: #fff; }
.pz-btn.pz-on { background: #2563eb; color: #fff; }
.pz-wide { display: block; width: 100%; margin: 12px 0; padding: 14px; }
.pz-games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pz-game { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; border-radius: 20px; padding: 16px 8px; background: var(--pz-card); color: var(--pz-ink); font: inherit; box-shadow: 0 4px 12px rgba(15, 39, 66, 0.1); cursor: pointer; }
.pz-game:last-child:nth-child(odd) { grid-column: span 2; }
.pz-game-emoji { font-size: 2.2rem; }
.pz-game-name { font-weight: 800; font-size: 1.1rem; }
.pz-game-blurb { font-size: 0.8rem; color: var(--pz-muted); text-align: center; }
.pz-levels { display: flex; flex-direction: column; gap: 8px; }
.pz-level { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--pz-card); border-radius: 16px; padding: 10px 12px; box-shadow: 0 2px 8px rgba(15, 39, 66, 0.08); }
.pz-level-name small { color: var(--pz-muted); }
.pz-level-btns { display: flex; gap: 6px; flex-shrink: 0; }
.pz-result { text-align: center; background: var(--pz-card); border-radius: 18px; padding: 14px; margin: 12px 0; box-shadow: 0 4px 14px rgba(15, 39, 66, 0.12); }
.pz-party { font-size: 3rem; animation: kid-pop 0.5s ease-out; }
.pz-card { background: var(--pz-card); border-radius: 16px; padding: 12px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(15, 39, 66, 0.08); }
.pz-board { list-style: none; padding: 0; margin: 8px 0 0; }
.pz-board li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-top: 1px solid var(--pz-line); }
.pz-board li.me { font-weight: 800; }
.pz-place { width: 2em; }
.pz-who { flex: 1; }
.pz-secs { font-variant-numeric: tabular-nums; }

/* Sudoku */
.pz-sudoku { display: grid; width: min(100%, 420px); margin: 0 auto; border: 2px solid var(--pz-strong); background: var(--pz-card); }
.pz-cell { aspect-ratio: 1; border: 0; border-right: 1px solid var(--pz-line); border-bottom: 1px solid var(--pz-line); background: var(--pz-card); color: #2563eb; font: inherit; font-size: clamp(1rem, 5vw, 1.5rem); font-weight: 600; padding: 0; display: grid; place-items: center; cursor: pointer; }
.pz-sudoku.n4 .pz-cell, .pz-sudoku.n6 .pz-cell { font-size: clamp(1.4rem, 8vw, 2.2rem); }
.pz-cell.given { color: var(--pz-ink); font-weight: 800; }
.pz-cell.near { background: var(--pz-near); }
.pz-cell.same { background: var(--pz-same); }
.pz-cell.sel { background: var(--pz-sel); }
.pz-cell.bad { color: var(--pz-bad); }
.pz-cell.br { border-right: 2px solid var(--pz-strong); }
.pz-cell.bb { border-bottom: 2px solid var(--pz-strong); }
.pz-notes { display: grid; width: 100%; height: 100%; font-size: clamp(0.5rem, 2.2vw, 0.7rem); color: var(--pz-muted); line-height: 1; place-items: center; }
.pz-pad { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; width: min(100%, 420px); margin: 10px auto 0; }
.pz-pad.n4 { grid-template-columns: repeat(4, 1fr); } .pz-pad.n6 { grid-template-columns: repeat(6, 1fr); }
.pz-padkey { border: 0; border-radius: 10px; padding: 12px 0; font: inherit; font-size: 1.3rem; font-weight: 800; background: var(--pz-btn); color: var(--pz-ink); cursor: pointer; }
.pz-padkey.used { opacity: 0.35; }

/* Crossword */
.pz-clue { display: flex; align-items: center; gap: 6px; background: #dbeafe; color: #0f2742; border-radius: 12px; padding: 8px; margin-bottom: 8px; min-height: 3.2em; }
.pz-clue span { flex: 1; text-align: center; }
.pz-arrow { border: 0; background: rgba(255, 255, 255, 0.7); border-radius: 8px; font: inherit; font-size: 1.4rem; font-weight: 800; padding: 2px 10px; cursor: pointer; color: #0f2742; }
.pz-cross { display: grid; gap: 2px; margin: 0 auto; }
.pz-xblock { aspect-ratio: 1; }
.pz-xcell { position: relative; aspect-ratio: 1; border: 1.5px solid var(--pz-strong); border-radius: 4px; background: var(--pz-card); color: var(--pz-ink); font: inherit; font-size: clamp(0.9rem, 4.5vw, 1.4rem); font-weight: 800; padding: 0; display: grid; place-items: center; cursor: pointer; }
.pz-xcell.word { background: var(--pz-same); }
.pz-xcell.sel { background: var(--pz-sel); }
.pz-xcell.bad { color: var(--pz-bad); text-decoration: line-through; }
.pz-num { position: absolute; top: 1px; left: 2px; font-size: 0.55rem; font-weight: 600; line-height: 1; }
.pz-clues { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
@media (min-width: 520px) { .pz-clues { grid-template-columns: 1fr 1fr; } }
.pz-clues ul { list-style: none; padding: 0; margin: 4px 0 0; }
.pz-clues li { padding: 5px 6px; border-radius: 8px; cursor: pointer; font-size: 0.92rem; }
.pz-clues li.on { background: var(--pz-same); }
.pz-clues li.done { opacity: 0.5; }
.pz-keys { display: flex; flex-direction: column; gap: 5px; margin: 10px 0 0; }
.pz-keyrow { display: flex; gap: 4px; justify-content: center; }
.pz-key { flex: 1; max-width: 42px; border: 0; border-radius: 6px; padding: 13px 0; font: inherit; font-size: 1rem; font-weight: 800; background: var(--pz-btn); color: var(--pz-ink); cursor: pointer; }
.pz-key.wide { flex: 1.5; max-width: 64px; font-size: 0.8rem; }
.pz-key.g { background: #16a34a; color: #fff; } .pz-key.y { background: #ca8a04; color: #fff; } .pz-key.x { opacity: 0.35; }

/* Word search */
.pz-ws { display: grid; width: min(100%, 440px); margin: 0 auto; background: var(--pz-card); border-radius: 12px; padding: 4px; touch-action: none; user-select: none; -webkit-user-select: none; }
.pz-wcell { aspect-ratio: 1; display: grid; place-items: center; font-weight: 800; font-size: clamp(0.85rem, 4.2vw, 1.4rem); border-radius: 50%; cursor: pointer; }
.pz-wcell.found { background: hsl(var(--hue) 85% 78%); color: #0f2742; border-radius: 6px; }
.pz-wcell.sel { background: #fde047; color: #0f2742; }
.pz-wlist { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-weight: 700; }
.pz-wlist li.done { text-decoration: line-through; opacity: 0.45; }

/* Memory match */
.pz-mem { display: grid; gap: 8px; width: min(100%, 420px); margin: 0 auto; }
.pz-card-flip { aspect-ratio: 3 / 4; border: 0; border-radius: 12px; background: linear-gradient(135deg, #6366f1, #0d9488); color: #fff; font-size: clamp(1.2rem, 7vw, 2.2rem); cursor: pointer; padding: 0; box-shadow: 0 3px 8px rgba(15, 39, 66, 0.15); }
.pz-card-flip.up { background: var(--pz-card); color: inherit; }
.pz-card-flip.got { background: #dcfce7; }

/* Word guess */
.pz-wg { display: flex; flex-direction: column; gap: 6px; width: min(100%, 300px); margin: 0 auto; }
.pz-wg-row { display: grid; gap: 6px; }
.pz-tile { aspect-ratio: 1; display: grid; place-items: center; border: 2px solid var(--pz-line); border-radius: 6px; font-size: 1.6rem; font-weight: 800; background: var(--pz-card); }
.pz-tile.typed { border-color: var(--pz-strong); }
.pz-tile.g { background: #16a34a; border-color: #16a34a; color: #fff; }
.pz-tile.y { background: #ca8a04; border-color: #ca8a04; color: #fff; }
.pz-tile.x { background: #6b7280; border-color: #6b7280; color: #fff; }
.pz-msg { text-align: center; }
.pz-share { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--pz-muted); margin-top: 10px; }
.pz-close { float: right; margin: 0 0 6px 8px; }
.pz .pz-share { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.pz .pz-share input { width: auto; margin: 0; flex: none; }
.pz-over .pz-pad, .pz-over > .pz-row, .pz-over .pz-keys { display: none; }
.pz-head { flex-wrap: nowrap; }
.pz-head .pz-back { white-space: nowrap; }
.pz-level-tag { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-card-flip:not(.up) { font-weight: 800; color: rgba(255, 255, 255, 0.85); }
.pz-level-tag { text-align: left; font-size: 0.9rem; } .pz-level-tag b { color: var(--pz-ink); }
.pz-level-tag { white-space: normal; line-height: 1.25; }

/* 🐣 Little ones: big pictures, said out loud */
.pz-section { font-size: 1.05rem; margin: 14px 0 8px; }
.pz-section small { font-weight: 500; font-size: 0.8rem; }
.pz-little { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pz-little-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; border-radius: 18px; padding: 10px 4px; background: #fef3c7; color: #0f2742; font: inherit; font-size: 0.78rem; font-weight: 800; line-height: 1.15; cursor: pointer; box-shadow: 0 3px 10px rgba(15, 39, 66, 0.1); }
.pz-little-btn .pz-game-emoji { font-size: 1.9rem; }
.pz-little-btn:nth-child(4n+2) { background: #dcfce7; } .pz-little-btn:nth-child(4n+3) { background: #e0e7ff; } .pz-little-btn:nth-child(4n+4) { background: #fce7f3; }
.pz-stars { display: block; text-align: center; font-size: 1.3rem; letter-spacing: 2px; margin-bottom: 6px; }
.pz-stars-left { opacity: 0.2; filter: grayscale(1); }
.pz-stars.done { font-size: 1.8rem; }
.pz-say { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; border: 0; border-radius: 16px; padding: 12px; background: #dbeafe; color: #0f2742; font: inherit; font-size: 1.15rem; font-weight: 800; cursor: pointer; margin-bottom: 12px; }
.pz-show { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; background: var(--pz-card); border-radius: 20px; padding: 14px; margin-bottom: 14px; font-size: 2.6rem; line-height: 1.1; box-shadow: 0 3px 10px rgba(15, 39, 66, 0.08); }
.pz-show.picture { font-size: 5.5rem; }
.pz-show.sum b { font-size: 2.4rem; margin: 0 6px; }
.pz-group { display: inline-flex; flex-wrap: wrap; gap: 2px; max-width: 40%; justify-content: center; font-size: 2.1rem; }
.pz-show.pattern { font-size: 2.1rem; gap: 4px; }
.pz-q { display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; border: 3px dashed #94a3b8; border-radius: 12px; font-size: 1.6rem; font-weight: 800; color: #64748b; }
.pz-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pz-choices.n4 { grid-template-columns: repeat(2, 1fr); }
.pz-choice { border: 0; border-radius: 24px; background: var(--pz-card); color: var(--pz-ink); min-height: 96px; padding: 10px; display: grid; place-items: center; cursor: pointer; box-shadow: 0 5px 14px rgba(15, 39, 66, 0.12); transition: transform 0.12s; font: inherit; }
.pz-choice:active { transform: scale(0.94); }
.pz-choice.right { background: #bbf7d0; animation: pz-bounce 0.5s; }
.pz-choice.wrong { opacity: 0.35; animation: pz-shake 0.4s; }
@keyframes pz-bounce { 30% { transform: scale(1.15); } 60% { transform: scale(0.95); } }
@keyframes pz-shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pz-blob { width: 76px; height: 76px; border-radius: 50%; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.12); }
.pz-shape { width: 84px; height: 84px; display: block; }
.pz-numchoice { font-size: 3rem; font-weight: 900; }
.pz-txtchoice { font-size: 2.2rem; font-weight: 800; }
.pz-txtchoice.letter { font-size: 3.2rem; }
.pz-little-party { text-align: center; padding: 20px 0; }
.pz-party.big { font-size: 5rem; }
.pz-sky { position: relative; height: min(62vh, 520px); overflow: hidden; border-radius: 24px; background: linear-gradient(180deg, #bae6fd, #e0f2fe 70%, #fef9c3); touch-action: manipulation; }
.pz-bubble { position: absolute; bottom: -110px; width: var(--size); height: var(--size); border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.9); background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(186, 230, 253, 0.55) 40%, rgba(147, 197, 253, 0.35)); font-size: calc(var(--size) * 0.45); display: grid; place-items: center; padding: 0; cursor: pointer; animation: pz-float linear forwards; }
.pz-bubble.popped { animation-play-state: paused; scale: 1.6; opacity: 0; transition: scale 0.25s, opacity 0.25s; }
@keyframes pz-float { from { transform: translateY(0); } to { transform: translateY(calc(-1 * min(62vh, 520px) - 140px)); } }
/* 🌱 Life Skills */
.kid-lifeskills-btn { color: #15803d; }
#kid-lifeskills-top { font-weight: 800; font-size: 1.1rem; color: #0f2a4a; }
.ls-list { display: flex; flex-direction: column; gap: 10px; max-width: 560px; margin: 0 auto; width: 100%; }
.ls-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-radius: 18px; background: #fff; color: #0f2a4a; font: inherit; font-size: 1.05rem; font-weight: 700; text-align: left; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.ls-row.done { background: #f0fdf4; }
.ls-row-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #dcfce7; color: #15803d; display: grid; place-items: center; font-weight: 800; }
.ls-lesson .ls-tryit { background: #fef9c3; border-radius: 14px; padding: 10px 12px; font-weight: 800; text-align: center; }
.ls-situation { font-size: 1.45rem !important; }
.ls-ask { margin: 0; text-align: center; font-weight: 800; color: #6d28d9; font-size: 1.15rem; }
.ls-choices { display: flex; flex-direction: column; gap: 10px; max-width: 560px; margin: 0 auto; width: 100%; }
.ls-choice { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border: 3px solid transparent; border-radius: 20px; background: #fff; color: #0f2a4a; font: inherit; font-size: 1.15rem; font-weight: 800; text-align: left; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.ls-num { flex: none; font-size: 1.5rem; }
.ls-choice.tried { background: #f1f5f9; color: #64748b; opacity: .8; }
.ls-choice.best { background: #dcfce7; border-color: #16a34a; }
.ls-choice:disabled { cursor: default; }
.ls-hint { font-weight: 800; color: #6d28d9; }
.ls-talk { background: #e0f2fe; border-radius: 14px; padding: 10px 12px; }
.lifeskills-card { border-left: 4px solid #16a34a; }
.lifeskills-row { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.feature-off { display: none !important; }
.homecard-row.locked { opacity: .6; }
.kid-off { display: none !important; }
.fav-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.fav-row .fav-star { font-size: 1.3rem; color: var(--muted); }
.fav-row.on { font-weight: 700; }
.favs-pick summary { cursor: pointer; }

/* 📥 Email to calendar · ☀️ Morning message */
.inbox-address .code { word-break: break-all; }
.inbox-item.new { border-color: var(--primary, #3b5bdb); }
.morning-line { display: block; margin: 6px 0 0; text-align: left; }
.morning-preview { background: var(--bg); }
/* 📸 Family moments */
button.chip[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.moment-ask { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--primary-soft); color: var(--primary); font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.moment-line { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; width: 100%; padding: 6px 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.moment-line > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.moment-thumb, .moment-thumb-empty { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--line); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.moment-photo { display: block; width: 100%; max-height: 60vh; object-fit: cover; border-radius: 12px; background: var(--line); }
.moment-text { margin: 0; font-size: 1.05rem; }
.moment-card { box-shadow: none; border: 1px solid var(--line); margin: 0; }
.moment-form textarea { width: 100%; }
.gp-link { display: block; padding: 8px 10px; border-radius: 10px; background: var(--primary-soft); word-break: break-all; font-size: .9rem; }
.kid-moments-btn { color: #be185d; }
.kid-moment-starters { display: flex; flex-wrap: wrap; gap: 8px; }
.kid-moment-starter { border: 2px solid #f3d0e1; border-radius: 999px; padding: 10px 14px; background: #fff; font: inherit; font-size: 1.05rem; font-weight: 700; color: #14233b; cursor: pointer; }

.gp-pin { background: rgba(234, 88, 12, .1); border-radius: 12px; padding: 8px 12px; align-items: center; }
.gp-pin-digits { font-size: 1.3rem; letter-spacing: .25em; margin-left: 4px; }

/* 🔟 Top 10 cards on the front page: a swipeable row */
.top10 { gap: 10px; }
.top10-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; -webkit-overflow-scrolling: touch; }
.top10-row img { flex: 0 0 82%; width: 82%; max-width: 420px; height: auto; aspect-ratio: 1; border-radius: 18px; scroll-snap-align: center; box-shadow: 0 6px 18px rgba(15, 42, 74, .14); }

/* ✅ ReadyCheck */
.scan-ready { border-top: 1px solid var(--line); padding-top: 10px; }
.ready-head { display: flex; flex-direction: column; gap: 2px; }
.ready-row .check-row { align-items: center; }
.ready-emoji { font-size: 1.1rem; }
.ready-owner { max-width: 170px; }
.ready-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; }
.ready-item .today-check { flex: 0 0 auto; margin-top: 2px; }
.ready-item.done .ready-text { text-decoration: line-through; opacity: .6; }
.ready-item.late { border-color: #e57373; }
.ready-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ready-text { font-weight: 600; }
.ready-actions { gap: 6px; align-items: center; }
.ready-who { color: var(--primary, #3b5bdb); font-weight: 600; }
.ready-late { color: #c62828; }
.ready-summary { margin: 0; font-weight: 600; }
.dot-red { background: #e53935; }
.ready-row .scan-when { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: center; }
.ready-row .scan-when input, .ready-row .ready-owner { min-width: 0; width: 100%; max-width: none; }
.ready-actions .ready-owner { flex: 0 1 160px; }

/* 🧘 One suggestion at a time on Home */
.nudge-wait { display: none !important; }

/* 🔎 Search, front and center on Home */
.home-search { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; border-radius: 999px; border: 2px solid var(--primary, #3b5bdb); background: var(--card, #fff); color: var(--muted, #5b6b7f); font-size: 1rem; text-align: left; cursor: pointer; box-shadow: 0 2px 8px rgba(21, 101, 192, .12); }
.home-search span:first-child { font-size: 1.2rem; }
.home-search:active { transform: scale(.99); }
.scan-allday { justify-self: start; padding: 6px 0; white-space: nowrap; grid-column: 1 / -1; text-align: left; }
.scan-when input[hidden] { display: none; }

/* ---------- Check-in entry, chips ---------- */
.checkin-entry { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.stale-pill { margin-left: 6px; background: var(--line); color: var(--muted); }
.chip.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.emoji-chips { gap: 6px; } .emoji-chips .chip { padding: 4px 8px; min-width: 0; font-size: 1.15rem; }

/* ---------- 🏫 School Center & 📚 Study Center ---------- */
.school-kids .chip { display: inline-flex; align-items: center; gap: 4px; }
.school-section h4 { margin: 0; }
.school-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.school-list li { line-height: 1.35; }
.school-when { font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.school-tomorrow summary { cursor: pointer; color: var(--muted); }
.school-tools { justify-content: center; }
.study-section { border-color: #e9d5ff; }
.study-row, .study-shared { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.study-shared { cursor: default; background: var(--sun-soft); }
.study-row-main { display: grid; flex: 1; min-width: 0; }
.ready-meter { position: relative; flex: none; width: 74px; height: 22px; border-radius: 999px; background: #e2e8f0; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; }
.ready-meter i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #f59e0b, #16a34a); }
.ready-meter b { position: relative; font-size: .78rem; color: #10203a; font-variant-numeric: tabular-nums; }
.study-ready { gap: 10px; align-items: center; justify-content: space-between; }
.study-edit { gap: 12px; }
.study-edit input { width: auto; }
.study-key li { margin-bottom: 6px; }
.study-maker textarea { width: 100%; }
.kid-study-btn { background: #ede9fe; color: #4c1d95; }
.kid-ideas { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 1.15rem; text-align: left; }
.flashcard { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; max-width: 520px; min-height: 230px; margin: 0 auto; padding: 24px; border: 0; border-radius: 28px; background: #fff; color: #0f2a4a; font: inherit; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.12); transition: transform .25s; }
.flashcard.flipped { background: #fef9c3; }
.flashcard-side { font-size: 1.7rem; font-weight: 800; line-height: 1.25; text-align: center; word-break: break-word; }
.flashcard small { color: #64748b; font-weight: 700; }
.flashcard-nav { justify-content: space-between; max-width: 520px; margin: 12px auto 0; width: 100%; gap: 12px; }
.flashcard-nav .kid-yes { flex: 1; }
@media (prefers-reduced-motion: reduce) { .flashcard { transition: none; } }

/* ---------- 📖 Memory Lane ---------- */
.mem-cover { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 22px 16px 18px; border-radius: 22px; color: #3b2a1a;
  background: radial-gradient(120% 90% at 50% 0%, #fff7e6 0%, #fde9c8 55%, #f6d7a7 100%); box-shadow: inset 0 0 0 1px rgba(146, 96, 40, .18); }
.mem-cover .kid-avatar.lg { width: 76px; height: 76px; font-size: 2.4rem; box-shadow: 0 0 0 4px #fff, 0 6px 16px rgba(120, 70, 20, .25); }
.mem-cover h2 { margin: 2px 0 0; font-family: Georgia, 'Times New Roman', serif; font-size: 1.75rem; letter-spacing: .2px; }
.mem-cover-sub { margin: 0; font-weight: 700; color: #7a5532; }
.mem-years { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding: 2px; }
.mem-year { display: grid; flex: none; padding: 6px 12px; border: 1px solid rgba(122, 85, 50, .3); border-radius: 12px; background: rgba(255, 255, 255, .55); color: #5b3d22; font: inherit; font-weight: 800; cursor: pointer; }
.mem-year small { font-weight: 600; font-size: .72rem; }
.mem-year.on { background: #7a5532; color: #fff; border-color: #7a5532; }
.mem-stats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.mem-stats span { display: grid; justify-items: center; min-width: 70px; padding: 6px 10px; border-radius: 14px; background: rgba(255, 255, 255, .7); }
.mem-stats small { font-size: .72rem; color: #7a5532; }
.mem-friends { margin: 0; color: #5b3d22; }
.mem-actions { justify-content: center; }
.mem-month { margin: 6px 0 0; font-family: Georgia, 'Times New Roman', serif; font-size: 1.1rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.mem-entry { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.mem-emoji { font-size: 1.5rem; line-height: 1.2; text-align: center; }
.mem-main { display: grid; gap: 3px; min-width: 0; }
.mem-main p { margin: 0; }
.mem-date { color: var(--muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.mem-photo img { width: 100%; max-height: 280px; object-fit: cover; border-radius: 12px; margin-top: 4px; }
.mem-milestone { background: #fffbeb; border-color: #fde68a; color: #10203a; }
.mem-school { background: #f5f3ff; border-color: #e9d5ff; color: #10203a; }
.mem-milestone .mem-date, .mem-school .mem-date { color: #7a5532; }
.mem-letters { background: #fff1f2; border-color: #fecdd3; color: #3b1220; }
.mem-letter summary { cursor: pointer; }
.mem-letter-text { white-space: pre-wrap; font-family: Georgia, 'Times New Roman', serif; line-height: 1.55; margin: 8px 0 0; }
.mem-empty { text-align: center; }
.checkin-entry-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.checkin-entry-icon { font-size: 1.6rem; }

/* ---------- 📱 Kid mode home screen ---------- */
/* The regular buttons stay (they say what's on); the app icons stand in for them. */
.sb-on > .kid-day-btn, .sb-on > .kid-foods-btn, .sb-on > .kid-homework-bar { display: none !important; }
.kid-mode[data-home="1"] { transition: background .4s; }
.kid-mode[data-home="1"][data-wall="ocean"] { background: linear-gradient(170deg, #0ea5e9 0%, #2563eb 55%, #1e3a8a 100%); }
.kid-mode[data-home="1"][data-wall="space"] { background: radial-gradient(120% 70% at 70% 10%, #4338ca 0%, #1e1b4b 55%, #0b0a24 100%); }
.kid-mode[data-home="1"][data-wall="candy"] { background: linear-gradient(160deg, #fbcfe8 0%, #e9d5ff 50%, #bfdbfe 100%); }
.kid-mode[data-home="1"][data-wall="jungle"] { background: linear-gradient(165deg, #16a34a 0%, #15803d 55%, #14532d 100%); }
.kid-mode[data-home="1"][data-wall="sunset"] { background: linear-gradient(170deg, #f97316 0%, #e11d48 55%, #9d174d 100%); }
.kid-mode[data-home="1"][data-wall="space"]::before { content: ""; position: fixed; inset: 0; pointer-events: none;
  background-image: radial-gradient(2px 2px at 20% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 20%, #fff, transparent), radial-gradient(2px 2px at 40% 70%, #fff, transparent),
    radial-gradient(1px 1px at 85% 60%, #fff, transparent), radial-gradient(1.5px 1.5px at 10% 85%, #fff, transparent), radial-gradient(1px 1px at 55% 45%, #fff, transparent); opacity: .8; }
.kid-sb-head { position: relative; display: grid; justify-items: center; gap: 2px; margin: -18px auto 14px; max-width: 640px; }
.kid-sb-clock { display: grid; justify-items: center; line-height: 1; }
.kid-sb-time { font-size: 3.2rem; font-weight: 300; letter-spacing: -1px; color: var(--kid-ink, #0f2742); font-variant-numeric: tabular-nums; }
.kid-sb-clock small { font-weight: 700; color: var(--kid-ink-soft, #3b5a55); margin-top: 4px; }
.kid-sb-name { margin: 8px 0 0; font-size: min(clamp(2.4rem, 11vw, 3.6rem), calc(min(100vw, 560px) * 1.05 / var(--n, 6))); white-space: nowrap; line-height: 1; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
.kid-sb-name span { display: inline-block; color: var(--c); -webkit-text-stroke: 2px #fff; paint-order: stroke fill; text-shadow: 0 4px 0 rgba(0,0,0,.12); animation: kid-bob 3s ease-in-out infinite; animation-delay: var(--d); }
@keyframes kid-bob { 50% { transform: translateY(-5px) rotate(-3deg); } }
.kid-sb-wall { position: absolute; left: 0; top: 0; width: 44px; height: 44px; border: 0; border-radius: 14px; background: rgba(255,255,255,.75); font-size: 1.4rem; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.kid-sb { max-width: 640px; margin: 0 auto; }
.kid-apps { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 10px; padding: 6px 4px 18px; }
.kid-apps .kid-app { flex: 0 0 calc((100% - 30px) / 4); }
@media (min-width: 600px) { .kid-apps .kid-app { flex-basis: calc((100% - 50px) / 6); } }
.kid-app { display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.kid-app-icon { position: relative; display: grid; place-content: center; width: 64px; height: 64px; border-radius: 18px; font-size: 2.1rem;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 70%, #fff) 0%, var(--c) 100%); box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 45%, transparent), inset 0 2px 0 rgba(255,255,255,.45); transition: transform .15s; }
.kid-app:active .kid-app-icon, .kid-app.pop .kid-app-icon { transform: scale(.86); }
.kid-app:focus-visible .kid-app-icon { outline: 3px solid #fff; outline-offset: 3px; }
.kid-app-name { font-size: .82rem; font-weight: 800; color: var(--kid-ink, #0f2742); line-height: 1.15; max-width: 82px; }
.kid-app-badge { position: absolute; top: -6px; right: -6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .82rem; font-weight: 900; line-height: 24px; box-shadow: 0 0 0 2px #fff; }
.kid-dock { display: flex; justify-content: space-around; gap: 8px; margin: 4px auto 18px; padding: 12px 14px; border-radius: 28px; background: rgba(255,255,255,.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
.kid-dock .kid-app-icon { width: 60px; height: 60px; }
.kid-dock .kid-app { flex: 1 1 0; }
/* Dark wallpapers: light text. */
.kid-mode[data-home="1"][data-wall="space"], .kid-mode[data-home="1"][data-wall="ocean"], .kid-mode[data-home="1"][data-wall="jungle"], .kid-mode[data-home="1"][data-wall="sunset"] { --kid-ink: #fff; --kid-ink-soft: rgba(255,255,255,.85); }
.kid-mode[data-home="1"][data-wall="space"] .kid-app-name, .kid-mode[data-home="1"][data-wall="ocean"] .kid-app-name, .kid-mode[data-home="1"][data-wall="jungle"] .kid-app-name, .kid-mode[data-home="1"][data-wall="sunset"] .kid-app-name { text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.kid-mode[data-home="1"][data-wall="space"] .kid-dock { background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
@media (prefers-reduced-motion: reduce) { .kid-sb-name span { animation: none; } .kid-mode[data-home="1"] { transition: none; } }

/* ---------- 📷 Camera: like the iPhone Camera app ---------- */
body.cam-open { overflow: hidden; }
.cam { position: fixed; inset: 0; z-index: 3000; background: #000; color: #fff; display: grid; grid-template-rows: auto 1fr auto;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif; -webkit-user-select: none; user-select: none; }
.cam-view { grid-row: 1 / 4; grid-column: 1; width: 100%; height: 100%; object-fit: cover; background: #000; }
.cam-view.mirror { transform: scaleX(-1); }
.cam-top { grid-row: 1; grid-column: 1; z-index: 1; display: flex; align-items: center; justify-content: center; position: relative;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(0,0,0,.55); min-height: 44px; }
.cam-close { position: absolute; left: 14px; bottom: 10px; border: 0; background: none; color: #ffd60a; font: 600 17px/1 inherit; cursor: pointer; padding: 8px 4px; }
.cam-rec { padding: 4px 10px; border-radius: 6px; background: #ff3b30; color: #fff; font: 500 17px/1.2 ui-monospace, 'SF Mono', Menlo, monospace; font-variant-numeric: tabular-nums; }
.cam-rec[hidden] { display: none; }
.cam-zoom { grid-row: 2; grid-column: 1; z-index: 1; align-self: end; justify-self: center; margin-bottom: 14px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #ffd60a; font: 600 13px/38px inherit; text-align: center; }
.cam-msg { grid-row: 2; grid-column: 1; z-index: 2; align-self: center; justify-self: center; display: grid; gap: 14px; justify-items: center; max-width: 300px; padding: 20px; border-radius: 18px; background: rgba(28,28,30,.92); text-align: center; }
.cam-msg[hidden] { display: none; }
.cam-msg p { margin: 0; color: #fff; font-size: 16px; }
.cam-bottom { grid-row: 3; grid-column: 1; z-index: 1; display: grid; gap: 14px; padding: 12px 22px calc(26px + env(safe-area-inset-bottom)); background: rgba(0,0,0,.6); }
.cam-modes { display: flex; justify-content: center; gap: 26px; }
.cam-modes.busy { visibility: hidden; }
.cam-mode { border: 0; background: none; color: #fff; font: 500 14px/1 inherit; letter-spacing: 1.2px; cursor: pointer; padding: 6px 2px; }
.cam-mode.on { color: #ffd60a; }
.cam-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.cam-thumb { justify-self: start; width: 50px; height: 50px; border-radius: 8px; border: 1.5px solid rgba(255,255,255,.9); background: #1c1c1e; overflow: hidden; padding: 0; cursor: pointer; display: grid; place-content: center; font-size: 22px; }
.cam-thumb img { width: 50px; height: 50px; object-fit: cover; display: block; }
.cam-thumb.pop { animation: cam-pop .35s ease-out; }
.cam-thumb.saving { opacity: .6; }
@keyframes cam-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.cam-shutter { width: 78px; height: 78px; border-radius: 50%; border: 0; padding: 0; background: none; box-shadow: inset 0 0 0 4px #fff; display: grid; place-content: center; cursor: pointer; }
.cam-shutter span { display: block; width: 64px; height: 64px; border-radius: 50%; background: #fff; transition: transform .1s, width .2s, height .2s, border-radius .2s, background .2s; }
.cam-shutter:active span { transform: scale(.9); }
.cam-shutter.video span { background: #ff3b30; }
.cam-shutter.recording span { width: 30px; height: 30px; border-radius: 7px; background: #ff3b30; }
.cam-round { justify-self: end; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(60,60,67,.6); color: #fff; font-size: 20px; display: grid; place-content: center; cursor: pointer; }
.cam-flash { grid-row: 1 / 4; grid-column: 1; z-index: 2; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: cam-flash .25s ease-out; }
@keyframes cam-flash { 0% { opacity: .9; } 100% { opacity: 0; } }
.cam-pill { border: 0; border-radius: 999px; padding: 10px 18px; background: #ffd60a; color: #000; font: 600 16px/1.2 inherit; cursor: pointer; }
.cam-pill.danger { background: rgba(255,59,48,.2); color: #ff453a; }
.cam-pill.done { background: rgba(255,255,255,.15); color: #fff; }
/* Camera roll */
.cam-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; border-radius: 14px; overflow: hidden; }
@media (min-width: 600px) { .cam-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.cam-tile { position: relative; aspect-ratio: 1; max-width: 100%; border: 0; padding: 0; background: #1f2937; cursor: pointer; overflow: hidden; }
.cam-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-tile.video { background: linear-gradient(135deg, #334155, #0f172a); }
.cam-tile-play { position: absolute; inset: 0; display: grid; place-content: center; color: #fff; font-size: 26px; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.cam-tile-kept { position: absolute; right: 4px; bottom: 4px; font-size: 14px; }
.cam-empty { text-align: center; padding: 24px 8px; }
.cam-viewer { position: fixed; inset: 0; z-index: 3100; background: #000; display: grid; grid-template-rows: auto 1fr auto; color: #fff; }
.cam-viewer img, .cam-viewer video { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.cam-viewer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; }
.cam-viewer-top small { color: rgba(255,255,255,.8); }
.cam-viewer-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px calc(18px + env(safe-area-inset-bottom)); }
#kid-photos-body { display: grid; gap: 14px; max-width: 640px; margin: 0 auto; }

/* ---------- 💛 Today's affirmation ---------- */
.affirm { position: fixed; inset: 0; z-index: 2600; display: grid; place-items: center; padding: 24px 18px; overflow-y: auto;
  background: radial-gradient(120% 80% at 50% 0%, #fff7ed 0%, #fde2e4 45%, #e9d5ff 100%); animation: affirm-in .35s ease-out; }
.affirm.kid { background: radial-gradient(120% 80% at 50% 0%, #fef9c3 0%, #fbcfe8 50%, #bfdbfe 100%); }
.affirm.bye { animation: affirm-out .25s ease-in forwards; }
@keyframes affirm-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@keyframes affirm-out { to { opacity: 0; transform: scale(.98); } }
.affirm-card { display: grid; justify-items: center; gap: 16px; width: 100%; max-width: 440px; text-align: center; color: #3b1a2e; }
.affirm-label { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; color: #9d174d; }
.affirm.kid .affirm-label { text-transform: none; letter-spacing: 0; font-size: 1.2rem; color: #7c2d12; }
.affirm-emoji { font-size: 4.5rem; line-height: 1; animation: affirm-float 3s ease-in-out infinite; }
@keyframes affirm-float { 50% { transform: translateY(-6px) rotate(-4deg); } }
.affirm-text { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.7rem, 7vw, 2.3rem); line-height: 1.25; font-weight: 700; color: #3b1a2e; text-wrap: balance; }
.affirm.kid .affirm-text { font-family: inherit; font-weight: 900; color: #1e1b4b; }
.affirm-say { border: 0; border-radius: 999px; padding: 10px 18px; background: rgba(255,255,255,.75); color: #1e1b4b; font: inherit; font-weight: 800; cursor: pointer; }
.affirm-save { border: 2px solid #f472b6; border-radius: 999px; padding: 12px 20px; background: #fff; color: #9d174d; font: inherit; font-weight: 800; cursor: pointer; }
.affirm-save.on { background: #fce7f3; }
.affirm-save.pop { animation: affirm-pop .4s ease-out; }
@keyframes affirm-pop { 40% { transform: scale(1.08); } }
.affirm-go { border: 0; border-radius: 999px; padding: 14px 28px; background: #9d174d; color: #fff; font: inherit; font-size: 1.1rem; font-weight: 800; cursor: pointer; box-shadow: 0 8px 20px rgba(157,23,77,.3); }
.affirm.kid .affirm-go { background: #2563eb; box-shadow: 0 8px 20px rgba(37,99,235,.3); }
.affirm-today { display: grid; justify-items: center; gap: 8px; padding: 18px; border-radius: 20px; text-align: center; background: linear-gradient(160deg, #fff7ed, #fce7f3); color: #3b1a2e; }
.affirm-today strong { font-family: Georgia, 'Times New Roman', serif; font-size: 1.3rem; line-height: 1.3; }
.affirm-today small { font-weight: 800; color: #9d174d; }
.affirm-today-emoji { font-size: 1.8rem; }
.affirm-list { display: grid; gap: 8px; }
.affirm-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.kid-mode .affirm-item { background: #fff; color: #1e1b4b; font-weight: 700; }
.affirm-x { border: 0; background: none; color: var(--muted); font-size: 1rem; cursor: pointer; padding: 6px; }
.affirm-empty { text-align: center; }
#kid-affirm-body { max-width: 560px; margin: 0 auto; }
@media (prefers-reduced-motion: reduce) { .affirm, .affirm-emoji { animation: none; } }
.kid-mode .affirm .affirm-text { font-size: clamp(1.9rem, 8vw, 2.5rem); line-height: 1.2; color: #1e1b4b; }

/* ---------- 🎮 Game Room ---------- */
.ks-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: rgba(255,255,255,.92); border-radius: 14px; padding: 8px 10px; font: inherit; color: #14233b; }
.dialog .ks-row, dialog .ks-row { background: var(--card, #fff); color: inherit; border: 1px solid var(--line, rgba(0,0,0,.08)); }
.ks-row img, .ks-row > span:first-child { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; display: grid; place-items: center; font-size: 1.4rem; }
.ks-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ks-row-main strong, .ks-row-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kid-ask-btn { border: 0; border-radius: 999px; background: #7c3aed; color: #fff; font: inherit; font-weight: 800; padding: 8px 14px; white-space: nowrap; cursor: pointer; }
.arc-h { margin: 6px 0 0; color: #1e1b4b; }
.arc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.arc-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; border-radius: 22px; padding: 16px 10px; font: inherit; color: #fff; cursor: pointer; text-align: center;
  background: linear-gradient(150deg, #8b5cf6, #6d28d9); box-shadow: 0 8px 20px rgba(109, 40, 217, .3); transition: transform .15s; }
.arc-tile:nth-child(5n+2) { background: linear-gradient(150deg, #f472b6, #db2777); box-shadow: 0 8px 20px rgba(219, 39, 119, .3); }
.arc-tile:nth-child(5n+3) { background: linear-gradient(150deg, #38bdf8, #0284c7); box-shadow: 0 8px 20px rgba(2, 132, 199, .3); }
.arc-tile:nth-child(5n+4) { background: linear-gradient(150deg, #fb923c, #ea580c); box-shadow: 0 8px 20px rgba(234, 88, 12, .3); }
.arc-tile:nth-child(5n+5) { background: linear-gradient(150deg, #4ade80, #16a34a); box-shadow: 0 8px 20px rgba(22, 163, 74, .3); }
.arc-tile.puzzles { background: linear-gradient(150deg, #fb923c, #c2410c); }
.arc-tile:active { transform: scale(.95); }
.arc-tile b { font-size: 1.05rem; }
.arc-tile small { opacity: .92; font-size: .8rem; }
.arc-tile.locked { background: rgba(255,255,255,.92); color: #1e1b4b; box-shadow: 0 4px 14px rgba(0,0,0,.08); cursor: default; }
.arc-tile.locked .arc-emoji { filter: grayscale(.2); }
.arc-emoji { font-size: 2.8rem; line-height: 1; filter: drop-shadow(0 3px 4px rgba(0,0,0,.2)); }
.arc-emoji.sm { font-size: 1.6rem; width: 44px; text-align: center; }
.arc-wait { color: #7c3aed; font-weight: 700; }
.arc-top { display: flex; justify-content: space-between; gap: 10px; flex: 1; }
.arc-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0 20px; user-select: none; -webkit-user-select: none; touch-action: none; }
.arc-over { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; background: rgba(255,255,255,.94); border-radius: 24px; color: #1e1b4b; animation: kid-pop .3s ease-out; }
.arc-over .kid-party { margin: 0; }
.ar-clock, .ar-msg { font-weight: 800; font-size: 1.2rem; color: #1e1b4b; }
.ar-holes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: min(100%, 360px); }
.ar-hole { aspect-ratio: 1; border: 0; border-radius: 50%; background: radial-gradient(circle at 50% 70%, #3f2a14 0 45%, #7c5a2c 46% 100%); overflow: hidden; position: relative; cursor: pointer; box-shadow: inset 0 -6px 0 rgba(0,0,0,.25); }
.ar-mole { position: absolute; left: 0; right: 0; bottom: -70%; font-size: 3rem; transition: bottom .12s ease-out; }
.ar-hole.up .ar-mole { bottom: 12%; }
.ar-hole.bonk .ar-mole { bottom: 12%; transform: scale(.8) rotate(-15deg); filter: saturate(.3); }
.ar-pads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(100%, 340px); }
.ar-pad { aspect-ratio: 1; border: 0; background: var(--c); color: var(--c); border-radius: 28px; opacity: .55; cursor: pointer; transition: opacity .1s, transform .1s; font-size: 2.4rem; }
.ar-pad.lit { opacity: 1; transform: scale(1.05); box-shadow: 0 0 30px currentColor; }
.ar-canvas { width: min(100%, 360px); height: auto; border-radius: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.15); background: #fff; touch-action: none; }
.ar-arrows { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 56px); gap: 8px; }
.ar-arrow { border: 0; border-radius: 16px; background: rgba(255,255,255,.92); font-size: 1.5rem; box-shadow: 0 4px 10px rgba(0,0,0,.12); cursor: pointer; }
.ar-arrow:active { transform: scale(.92); }
.ar-2048 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: min(100%, 340px); aspect-ratio: 1; padding: 8px; border-radius: 18px; background: #bbada0; touch-action: none; }
.ar-tile { display: grid; place-items: center; border-radius: 10px; background: rgba(238, 228, 218, .35); font-weight: 900; font-size: 1.6rem; color: #776e65; }
.ar-tile.t2 { background: #eee4da; } .ar-tile.t4 { background: #ede0c8; }
.ar-tile.t8 { background: #f2b179; color: #fff; } .ar-tile.t16 { background: #f59563; color: #fff; }
.ar-tile.t32 { background: #f67c5f; color: #fff; } .ar-tile.t64 { background: #f65e3b; color: #fff; }
.ar-tile.t128, .ar-tile.t256 { background: #edcf72; color: #fff; font-size: 1.3rem; }
.ar-tile.t512, .ar-tile.t1024 { background: #edc850; color: #fff; font-size: 1.15rem; }
.ar-tile.t2048, .ar-tile.t4096 { background: #edc22e; color: #fff; font-size: 1.1rem; box-shadow: 0 0 20px #edc22e; }

/* 🫧 Squishy Surprise */
.sq-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 420px; }
.sq-name { display: flex; gap: 8px; align-items: center; font-size: 1.2rem; color: #1e1b4b; }
.sq-stage { height: 280px; width: 100%; display: grid; place-items: center; }
.sq-blob { --c: #60a5fa; width: 200px; height: 200px; border-radius: 50%; display: grid; place-items: center; cursor: grab; touch-action: none;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.85) 0 9%, transparent 10%), radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 60%, color-mix(in srgb, var(--c) 75%, #000));
  box-shadow: inset -14px -18px 30px rgba(0,0,0,.15), inset 10px 12px 24px rgba(255,255,255,.4), 0 18px 30px rgba(0,0,0,.18);
  transition: transform .55s cubic-bezier(.3, 1.9, .45, 1), border-radius .4s; animation: sq-wobble 3.5s ease-in-out infinite; }
.sq-blob.held { transition: transform .08s ease-out; animation: none; cursor: grabbing; border-radius: 46% 54% 50% 50% / 55% 50% 50% 45%; }
.sq-blob:focus-visible { outline: 4px solid #7c3aed; outline-offset: 6px; }
.sq-face { font-size: 92px; line-height: 1; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(0,0,0,.15)); }
.sq-blob.r-sparkly { box-shadow: inset -14px -18px 30px rgba(0,0,0,.12), 0 0 0 4px rgba(255,255,255,.5), 0 0 34px color-mix(in srgb, var(--c) 80%, #fff), 0 18px 30px rgba(0,0,0,.18); }
.sq-blob.r-glow { animation: sq-wobble 3.5s ease-in-out infinite, sq-glow 1.6s ease-in-out infinite alternate; }
@keyframes sq-wobble { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .97); } }
@keyframes sq-glow { from { filter: drop-shadow(0 0 6px #fde047); } to { filter: drop-shadow(0 0 26px #facc15) brightness(1.1); } }
.sq-meter { width: 100%; height: 16px; border-radius: 999px; background: rgba(255,255,255,.75); overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,.1); }
.sq-meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #f472b6, #a78bfa, #60a5fa); transition: width .25s; }
.sq-capsules { min-height: 48px; display: grid; place-items: center; color: #1e1b4b; text-align: center; }
.sq-capsule { border: 0; border-radius: 999px; padding: 12px 22px; font: inherit; font-weight: 800; font-size: 1.1rem; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #f472b6, #8b5cf6); box-shadow: 0 8px 20px rgba(139, 92, 246, .4); animation: sq-bounce 1s ease-in-out infinite; }
.sq-egg { display: inline-block; animation: sq-rock .8s ease-in-out infinite; }
@keyframes sq-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes sq-rock { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
.sq-shelf-h { align-self: flex-start; font-weight: 800; color: #1e1b4b; }
.sq-shelf { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; width: 100%; }
.sq-mini { position: relative; aspect-ratio: 1; border: 0; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; cursor: pointer;
  background: radial-gradient(circle at 38% 32%, color-mix(in srgb, var(--c) 50%, #fff), var(--c)); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.sq-mini.on { outline: 3px solid #7c3aed; outline-offset: 2px; }
.sq-mini.locked { background: rgba(255,255,255,.55); font-size: 1.1rem; opacity: .7; cursor: default; }
.sq-mini small { position: absolute; right: -4px; bottom: -4px; font-size: .65rem; font-weight: 800; background: #fff; color: #1e1b4b; border-radius: 999px; padding: 1px 5px; }
.sq-tag { font-size: .8rem; font-weight: 800; border-radius: 999px; padding: 3px 10px; background: #e0e7ff; color: #3730a3; }
.sq-tag.r-sparkly { background: #fae8ff; color: #a21caf; }
.sq-tag.r-glow { background: #fef9c3; color: #a16207; }
.sq-reveal { position: absolute; inset: -8px; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border-radius: 28px; cursor: pointer; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #fff, #f5f3ff 60%, #ede9fe); color: #1e1b4b; text-align: center; animation: kid-pop .3s ease-out; }
.sq-reveal h3 { margin: 4px 0 0; font-size: 1.5rem; }
.sq-reveal.r-glow { background: radial-gradient(circle at 50% 40%, #fffbeb, #fef3c7 60%, #fde68a); }
.sq-reveal.r-sparkly { background: radial-gradient(circle at 50% 40%, #fff, #fdf4ff 55%, #f5d0fe); }
.sq-egg-big { font-size: 8rem; line-height: 1; filter: drop-shadow(0 12px 14px rgba(0,0,0,.2)); }
.sq-egg-big.shake { animation: sq-shake .45s ease-in-out; }
@keyframes sq-shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-16deg) scale(1.05); } 40% { transform: rotate(14deg); } 60% { transform: rotate(-10deg) scale(1.08); } 80% { transform: rotate(6deg); } }
.sq-hint { font-weight: 700; opacity: .7; }
.sq-reveal.open .sq-blob { animation: sq-pop .6s cubic-bezier(.3, 1.8, .5, 1); }
.sq-blob.big { width: 170px; height: 170px; }
@keyframes sq-pop { from { transform: scale(.1) rotate(-30deg); } to { transform: scale(1) rotate(0); } }
.sq-burst { position: absolute; top: 40%; left: 50%; width: 0; height: 0; pointer-events: none; }
.sq-burst i { position: absolute; width: 12px; height: 12px; border-radius: 3px; background: hsl(calc(var(--a) * 1.4), 90%, 60%); animation: sq-fly 1s ease-out forwards; animation-delay: calc(var(--d) * 60ms); }
@keyframes sq-fly { from { transform: rotate(var(--a)) translateX(0) scale(1); opacity: 1; } to { transform: rotate(var(--a)) translateX(170px) scale(.4) rotate(200deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sq-blob, .sq-capsule, .sq-egg, .sq-blob.r-glow { animation: none; } }

.ks-row.ask { flex-wrap: wrap; }
.ks-row.ask .ks-row-main { flex: 1 1 calc(100% - 60px); }
.ks-row.ask .ks-row-main strong, .ks-row.ask .ks-row-main small { white-space: normal; }
.ks-row.ask .btn { margin-left: auto; }
.ks-row.ask .btn ~ .btn { margin-left: 0; }

/* ⏳ Screen time */
.kid-time-pill { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 12px; z-index: 3; border-radius: 999px; padding: 6px 12px; font-size: .85rem; font-weight: 800; background: rgba(255,255,255,.8); color: #1e1b4b; box-shadow: 0 2px 8px rgba(0,0,0,.08); pointer-events: none; }
.kid-time-pill.low { background: #fde68a; color: #92400e; animation: sq-bounce 1s ease-in-out infinite; }
.kid-timeup { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, #1e1b4b, #4c1d95 55%, #7c3aed); }
.kid-timeup-card { width: min(100%, 400px); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: rgba(255,255,255,.96); color: #1e1b4b; border-radius: 28px; padding: 28px 22px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.kid-timeup-card h2 { margin: 0; font-size: 1.6rem; }
.kid-timeup-card p { margin: 0; color: #3f3a6b; }
.kid-timeup-emoji { font-size: 5rem; line-height: 1; animation: kid-pop .5s ease-out; }
.kid-timeup-buy { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 6px 18px rgba(217,119,6,.35); font-size: 1.15rem; }
.kid-timeup-buy:disabled { opacity: .5; }
.kid-timeup-grownup { opacity: .7; margin-top: 6px; }
body.in-kid-mode .kid-exit { z-index: 60; }
.st-head h4 { margin: 0; }
.st-head input { width: 22px; height: 22px; }
.st-today { display: flex; flex-direction: column; gap: 6px; background: var(--soft, rgba(124,58,237,.06)); border-radius: 14px; padding: 10px 12px; }
.st-bar { height: 8px; border-radius: 999px; background: rgba(124,58,237,.15); overflow: hidden; }
.st-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #f59e0b, #ef4444); background-size: 300px 100%; }
.st-plan { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line, rgba(0,0,0,.08)); padding-top: 10px; }
.st-plan label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .95rem; }
.st-plan select, .st-plan input[type=time] { padding: 6px 8px; border-radius: 10px; font: inherit; }
#screentime-body .st-plan label, #screentime-body .st-head { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; text-align: left; margin: 0; }
#screentime-body .st-head { justify-content: space-between; }
#screentime-body .st-plan select, #screentime-body .st-plan input { width: auto; flex: 0 0 auto; margin: 0; }
#screentime-body .st-head input { width: 22px; height: 22px; margin: 0; }

/* 🧪 Testing tags */
.beta-tag { position: absolute; top: 6px; right: 6px; font-size: .62rem; font-weight: 800; letter-spacing: .02em; border-radius: 999px; padding: 2px 7px; background: #ede9fe; color: #6d28d9; }
.tool { position: relative; }
.kid-app-icon { position: relative; }
.kid-app-beta { position: absolute; top: -5px; right: -8px; font-size: .55rem; font-weight: 900; letter-spacing: .04em; padding: 2px 5px; border-radius: 6px; background: #7c3aed; color: #fff; box-shadow: 0 0 0 2px #fff; transform: rotate(8deg); }
.beta-note { margin: 0; font-size: .85rem; border-radius: 12px; padding: 8px 12px; background: #f5f3ff; color: #5b21b6; }
/* 🌙 dark */ html.dark:not([data-theme="light"]) .beta-note, html.dark:not([data-theme="light"]) .beta-tag { background: #2e1065; color: #ddd6fe; }
:root[data-theme="dark"] .beta-note, :root[data-theme="dark"] .beta-tag { background: #2e1065; color: #ddd6fe; }

/* 👀 Peek inside */
.peek-btn { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: left; border: 2px solid #f5a623; background: linear-gradient(135deg, #fff7e0, #ffe8b8); color: #7a3e00; box-shadow: 0 6px 18px rgba(245,166,35,.35); }
.peek-btn[hidden] { display: none; }
.peek-btn b { display: block; font-size: 1.08rem; }
.peek-btn small { display: block; font-weight: 600; font-size: .82rem; opacity: .85; }
.peek-btn .peek-eyes { font-size: 1.6rem; display: inline-block; animation: peek-look 3s ease-in-out infinite; }
.peek-btn:hover { background: linear-gradient(135deg, #ffefc4, #ffdd94); }
@keyframes peek-look { 0%, 70%, 100% { transform: translateX(0); } 78% { transform: translateX(-4px); } 88% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .peek-btn .peek-eyes { animation: none; } }
/* 🌙 dark */ html.dark:not([data-theme="light"]) .peek-btn { background: linear-gradient(135deg, #3b2a06, #4a3207); color: #ffd98a; }
:root[data-theme="dark"] .peek-btn { background: linear-gradient(135deg, #3b2a06, #4a3207); color: #ffd98a; }
.peek-bar { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0 auto; max-width: 560px; width: calc(100% - 24px); padding: 10px 14px; border-radius: 18px; background: linear-gradient(135deg, #1e1b4b, #6d28d9); color: #fff; font-weight: 700; font-size: .92rem; box-shadow: 0 10px 30px rgba(30,27,75,.35); }
.peek-bar[hidden] { display: none; }
.peek-bar .link { color: #e9d5ff; }
body.in-kid-mode .peek-bar { display: none; }
body.peeking main#app { padding-bottom: 150px; }
.school-grid { grid-template-columns: repeat(2, 1fr); }
.school-badge { background: rgba(255,255,255,.9); color: #b91c1c; border-radius: 999px; padding: 2px 8px; font-weight: 800; }

/* 🎓 Show me how */
.tour-pick { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--line, rgba(0,0,0,.08)); border-radius: 16px; padding: 12px 14px; background: var(--card, #fff); color: inherit; font: inherit; cursor: pointer; }
.tour-pick b { flex: 1; }
.tour-pick-emoji { font-size: 1.6rem; }
.tour-layer { position: fixed; inset: 0; z-index: 2000; }
.tour-layer.dim { background: rgba(15, 23, 42, .55); }
.tour-spot { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(15, 23, 42, .6), 0 0 0 3px #facc15, 0 0 24px #facc15; pointer-events: none; transition: all .25s; animation: tour-pulse 1.4s ease-in-out infinite; }
@keyframes tour-pulse { 50% { box-shadow: 0 0 0 9999px rgba(15, 23, 42, .6), 0 0 0 5px #facc15, 0 0 34px #facc15; } }
.tour-bubble { position: fixed; left: 50%; transform: translateX(-50%); width: min(92vw, 380px); background: #fff; color: #0f172a; border-radius: 18px; padding: 14px 16px; box-shadow: 0 16px 40px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 8px; }
.tour-bubble.center { top: 50%; transform: translate(-50%, -50%); }
.tour-bubble p { margin: 0; font-size: 1.02rem; line-height: 1.4; color: #0f172a; }
.tour-count { color: #6d28d9; font-weight: 800; }
.peek-bar .peek-tours { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.35); }
@media (prefers-reduced-motion: reduce) { .tour-spot { animation: none; transition: none; } }

/* ▦ Home as app icons */
.home-style { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border-radius: 999px; background: var(--soft, rgba(15,23,42,.06)); margin-top: -6px; }
.home-style-btn { border: 0; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .85rem; font-weight: 700; background: transparent; color: var(--muted, #475569); cursor: pointer; }
.home-style-btn[aria-pressed="true"] { background: var(--card, #fff); color: var(--ink, #0f172a); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
body.home-apps-on #tab-free > :not(.greeting):not(.home-style):not(#home-search):not(#home-today):not(#home-pending):not(#home-meds):not(#home-note):not(#home-attn):not(#home-apps):not(#home-kidlaunch):not(#home-favs) { display: none !important; }
.home-apps { display: flex; flex-direction: column; gap: 18px; }
.home-apps[hidden] { display: none; }
.home-app-head { margin: 0 0 8px 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #64748b); }
.home-app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px; }
.home-app { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.home-app-icon { position: relative; width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; font-size: 1.9rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.4); }
.home-app-name { font-size: .74rem; font-weight: 600; line-height: 1.15; text-align: center; max-width: 76px; }
.home-app.pop .home-app-icon { transform: scale(.88); transition: transform .12s; }
@media (min-width: 560px) { .home-app-grid { grid-template-columns: repeat(6, 1fr); } }
body.home-apps-on #home-apps { order: 10; }
.home-style-btn[aria-pressed="true"] { background: #2563eb; color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.3); }

/* 📅 Today's Plan: minimize / pin */
.today-top { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.today-top .today-head { border-bottom: 0; flex: 1; min-width: 0; }
.today-ctrls { display: inline-flex; gap: 2px; padding-bottom: 6px; }
.today-ctrl { width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; font-size: 1rem; color: var(--muted, #64748b); cursor: pointer; filter: grayscale(1); opacity: .6; }
.today-ctrl:hover, .today-ctrl:focus-visible { background: var(--soft, rgba(15,23,42,.06)); opacity: 1; }
.today-ctrl.on { filter: none; opacity: 1; background: var(--soft, rgba(37,99,235,.1)); }
.today-card.min .today-top { border-bottom: 0; }
.today-card.min .today-top .today-head { padding-bottom: 0; }
.today-card.min .today-ctrls { padding-bottom: 0; }
.today-card.min > :not(.today-top) { display: none !important; }
.today-card.pinned { position: sticky; top: calc(74px + env(safe-area-inset-top)); z-index: 4; box-shadow: 0 10px 24px rgba(15,23,42,.14); }

/* 📁 App folders */
.folder-icon { background: color-mix(in srgb, var(--card, #fff) 55%, #cbd5e1) !important; box-shadow: inset 0 0 0 1px rgba(15,23,42,.08), 0 4px 10px rgba(15,23,42,.12) !important; }
.folder-minis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 6px; width: 100%; height: 100%; box-sizing: border-box; }
.folder-minis i { font-style: normal; font-size: .95rem; display: grid; place-items: center; background: rgba(255,255,255,.6); border-radius: 6px; }
/* 🌙 dark */ html.dark:not([data-theme="light"]) .folder-icon { background: #334155 !important; } html.dark:not([data-theme="light"]) .folder-minis i { background: rgba(255,255,255,.12); }
:root[data-theme="dark"] .folder-icon { background: #334155 !important; }
.folder-grid { margin: 8px 0 12px; }
.folder-emojis { display: flex; flex-wrap: wrap; gap: 6px; }
.folder-emojis .chip { font-size: 1.2rem; padding: 4px 10px; }
.folder-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.folder-pick { font-size: .92rem; }
.tabbar { grid-template-columns: repeat(7, 1fr); }
.tabbar button { font-size: 0.62rem; padding-left: 1px; padding-right: 1px; }
.tabbar .tab-logout span { filter: none; opacity: .75; }
.today-head .today-badge { flex: 0 0 auto; }
.today-top .today-head strong { flex: 0 1 auto; min-width: 0; }
.today-top .today-go { display: none; }
.today-top .today-head { gap: 8px; }
.today-top .today-count { margin-left: auto; font-size: .78rem; white-space: nowrap; }
.today-ctrl { width: 30px; }

/* 🧒 Tap a child's name for kid mode */
.kid-launch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kid-launch[hidden] { display: none; }
.kid-launch-label { font-weight: 800; font-size: .9rem; color: var(--muted, #475569); }
.kid-launch-kids { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
/* On a phone the kids stay on one line that scrolls sideways, so the row stays short. */
@media (max-width: 699px) { .kid-launch-kids { flex-wrap: nowrap; overflow-x: auto; min-width: 0; max-width: 100%; scrollbar-width: none; padding: 2px 2px 6px; margin: -2px -2px -6px; } .kid-launch-kids::-webkit-scrollbar { display: none; } .kid-launch-btn { flex: none; } }
.kid-launch-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 5px 14px 5px 5px; font: inherit; font-weight: 700; cursor: pointer;
  background: linear-gradient(135deg, #fef3c7, #fce7f3); color: #1e1b4b; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.kid-launch-btn:active { transform: scale(.96); }
/* 🌙 dark */ html.dark:not([data-theme="light"]) .kid-launch-btn { background: linear-gradient(135deg, #3b2f1a, #3d1f33); color: #fff; }
:root[data-theme="dark"] .kid-launch-btn { background: linear-gradient(135deg, #3b2f1a, #3d1f33); color: #fff; }

/* Group folders, like the kids' My School and Game Center */
.home-app-grid.folders { grid-template-columns: repeat(3, 1fr); gap: 18px 10px; }
.home-app.folder .home-app-icon { width: 82px; height: 82px; border-radius: 22px; }
.home-app.folder.builtin .folder-icon { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 30%, #fff), color-mix(in srgb, var(--c) 55%, #fff)) !important; box-shadow: 0 8px 18px color-mix(in srgb, var(--c) 30%, transparent) !important; }
.home-app.folder .folder-minis { gap: 4px; padding: 9px; }
.home-app.folder .folder-minis i { font-size: 1.25rem; border-radius: 8px; }
.folder-count { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--c, #64748b); color: #fff; font-size: .72rem; font-weight: 800; line-height: 22px; box-shadow: 0 0 0 2px var(--card, #fff); }
.home-app.folder .home-app-name { font-size: .8rem; font-weight: 700; max-width: 100px; }
/* 🌙 dark */ html.dark:not([data-theme="light"]) .home-app.folder.builtin .folder-icon { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 45%, #1e293b), color-mix(in srgb, var(--c) 25%, #0f172a)) !important; }
:root[data-theme="dark"] .home-app.folder.builtin .folder-icon { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 45%, #1e293b), color-mix(in srgb, var(--c) 25%, #0f172a)) !important; }

/* 👋 Who's free?: see, or let them know */
.free-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.free-choice { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; border: 2px solid var(--line, #e2e8f0); border-radius: 16px; padding: 10px 12px; background: var(--card, #fff); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.free-choice.on { border-color: #16a34a; background: color-mix(in srgb, #16a34a 8%, var(--card, #fff)); }
.free-choice small { color: var(--muted, #64748b); }
.free-h { margin: 6px 0 0; }
.free-match { text-align: left; font: inherit; font-weight: 700; color: #7c3aed; cursor: pointer; }
.empty-free { text-align: center; padding: 10px 0; }

.kid-launch-kids.big { gap: 12px; }
.kid-launch-kids.big .kid-launch-btn { font-size: 1.1rem; padding: 8px 18px 8px 8px; }

/* 🧒 Kid confirm, first-use help, game start */
.kid-confirm { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(30,27,75,.45); }
.kid-confirm-card { position: relative; width: min(100%, 380px); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: #fff; color: #1e1b4b; border-radius: 28px; padding: 26px 20px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.3); animation: kid-pop .3s ease-out; }
.kid-confirm-card h3 { margin: 0; font-size: 1.4rem; }
.kid-confirm-card p { margin: 0; font-size: 1.05rem; color: #3f3a6b; }
.kid-confirm-emoji { font-size: 4rem; line-height: 1; }
.kid-confirm-card .kid-yes { margin: 8px auto 0; font-size: 1.2rem; padding: 16px; }
.kid-confirm-card .kid-back { margin-top: 0; }
.kid-say { position: absolute; top: 12px; right: 12px; border: 0; border-radius: 50%; width: 42px; height: 42px; background: #ede9fe; font-size: 1.2rem; cursor: pointer; }
.arc-intro { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; width: min(100%, 380px); background: rgba(255,255,255,.94); border-radius: 28px; padding: 28px 20px 20px; color: #1e1b4b; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.arc-intro h3 { margin: 0; font-size: 1.5rem; }
.arc-intro p { margin: 0; font-size: 1.05rem; }
.arc-emoji.big { font-size: 4.5rem; }
.app-fold-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft, rgba(15,23,42,.06)); }
.app-fold-switch button { border: 0; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .8rem; font-weight: 700; background: transparent; color: var(--muted, #475569); cursor: pointer; }
.app-fold-switch button[aria-pressed="true"] { background: #2563eb; color: #fff; }
.today-more { align-self: flex-start; margin: 2px 0 0 4px; }
.today-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 2px 4px 0; }
.today-foot .today-more { margin: 0; }
.today-viewall { margin-left: auto; }
.fold-hidden { display: none !important; }
.today-coming { border-top: 1px dashed var(--line, #e2e8f0); margin-top: 4px; padding-top: 4px; }
.today-coming-h { display: block; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .68rem; color: var(--muted, #64748b); margin: 2px 0 0 4px; }

/* Four tabs, Favorites on Home, profile menu */
.tabbar { grid-template-columns: repeat(4, 1fr); }
.tabbar button { font-size: 0.7rem; }
.tabbar button[hidden] { display: none; }
.folder-apps { font-size: .7rem; color: var(--muted, #64748b); margin-top: -2px; }
.folder-count { display: none; }
.home-favs { display: flex; flex-direction: column; gap: 6px; }
.home-favs[hidden] { display: none; }
.home-favs-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: .9rem; color: var(--muted, #475569); }
.home-favs-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 10px; }
.home-fav { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.home-fav-icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 1.6rem; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); box-shadow: 0 5px 12px color-mix(in srgb, var(--c) 30%, transparent); }
.home-fav-name { font-size: .72rem; font-weight: 600; text-align: center; line-height: 1.15; }
.home-favs-row { grid-template-columns: repeat(4, 1fr); }
.home-fav { position: relative; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.home-fav.add .home-fav-icon { background: transparent; border: 2px dashed var(--line, #cbd5e1); box-shadow: none; color: var(--muted, #475569); }
.home-favs.editing .home-fav[data-fav] { touch-action: none; cursor: grab; animation: fav-wiggle .28s ease-in-out infinite alternate; }
.home-favs.editing .home-fav[data-fav]:nth-child(2n) { animation-delay: -.14s; }
.home-fav.dragging { animation: none !important; z-index: 5; cursor: grabbing; filter: drop-shadow(0 10px 14px rgba(15, 23, 42, .25)); }
.home-fav-x { position: absolute; top: -6px; left: calc(50% - 34px); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #334155; color: #fff; font-size: .7rem; font-weight: 800; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.home-favs-tip { margin: 0; }
@keyframes fav-wiggle { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
@media (prefers-reduced-motion: reduce) { .home-favs.editing .home-fav[data-fav] { animation: none; outline: 2px dashed var(--line, #cbd5e1); outline-offset: 2px; border-radius: 14px; } }
button.whoami { border: 0; background: rgba(255,255,255,.14); color: inherit; font: inherit; border-radius: 12px; padding: 4px 10px; cursor: pointer; text-align: right; white-space: nowrap; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
.profile-menu { position: fixed; top: calc(62px + env(safe-area-inset-top)); right: 10px; z-index: 50; display: flex; flex-direction: column; min-width: 230px; background: var(--card, #fff); color: var(--ink, #0f172a); border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.25); overflow: hidden; border: 1px solid var(--line, #e2e8f0); }
.profile-menu .pm-who { display: flex; flex-direction: column; padding: 12px 16px; border-bottom: 1px solid var(--line, #e2e8f0); }
.profile-menu .pm-who small { color: var(--muted, #64748b); }
.profile-menu button, .profile-menu a { border: 0; background: none; text-align: left; padding: 12px 16px; font: inherit; color: inherit; text-decoration: none; cursor: pointer; }
.profile-menu button:hover, .profile-menu a:hover { background: var(--soft, #f1f5f9); }
.profile-menu .pm-out { color: #dc2626; font-weight: 700; border-top: 1px solid var(--line, #e2e8f0); }

/* 🌱 Homepage promise: the core message + three pillars */
.welcome .welcome-promise { font-size: 1.75rem; line-height: 1.15; max-width: 16em; margin: 4px auto 8px; }
.welcome .welcome-promise em { font-style: normal; color: var(--primary); }
.welcome-pillars { list-style: none; padding: 0; margin: 0 auto; max-width: 26em; display: grid; gap: 8px; text-align: left; }
.welcome-pillars li { display: grid; grid-template-columns: 40px 1fr; column-gap: 10px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.welcome-pillars .wp-icon { grid-row: span 2; font-size: 1.6rem; line-height: 40px; text-align: center; background: var(--bg); border-radius: 12px; }
.welcome-pillars b { font-size: 1rem; }
.welcome-pillars small { color: var(--muted); font-size: .88rem; line-height: 1.35; }
.pending-card.pending-clear { border-top-width: 2px; padding-top: 10px; padding-bottom: 10px; }

/* 👆 The kids' shared iPad: "Who's using KiddoCue?" */
.kid-hub { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, #fff7d6, #ffe1f0 45%, #dcefff); }
.kid-hub-card { width: 100%; max-width: 560px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; color: #0f172a; }
.kid-hub-card h2 { font-size: 1.8rem; margin: 4px 0 0; }
.kid-hub-card p { margin: 0; }
.kid-hub-card .muted { color: #475569; }
.kid-hub-logo { width: 64px; height: 64px; }
.kid-hub-kids { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 12px 0; }
.kid-hub-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 130px; padding: 18px 16px; border: 0; border-radius: 24px; background: #fff; font: inherit; font-size: 1.3rem; color: #0f172a; cursor: pointer; box-shadow: 0 10px 24px rgba(15,23,42,.12); }
.kid-hub-btn:active { transform: scale(.96); }
.kid-hub-btn:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.kid-hub-wait { font-size: 1.2rem; font-weight: 700; }
.kid-hub-dots { display: inline-block; animation: hubdots 1.2s steps(4) infinite; overflow: hidden; vertical-align: bottom; width: 1.2em; text-align: left; }
@keyframes hubdots { from { width: 0; } to { width: 1.2em; } }
@media (prefers-reduced-motion: reduce) { .kid-hub-dots { animation: none; } }
.kid-hub-grownup { margin-top: 18px; color: #475569; }
.hub-ask-sheet { display: flex; flex-direction: column; gap: 10px; text-align: center; padding: 6px 4px; }
.hub-ask-icon { font-size: 2.6rem; }
.hub-ask-sheet h3 { margin: 0; }
body.kid-hub-on .topbar { display: none; }
.wordmark .tm { font-size: .35em; font-weight: 700; vertical-align: super; margin-left: 2px; opacity: .7; }
.legal-mark { opacity: .8; }
.snack-head { margin: 18px 0 10px; }

/* 🧱 Block Drop · 🍬 Sweet Swap · 🐠 Aquarium */
.ar-blockpad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; width: 100%; max-width: 380px; }
.ar-blockpad button { border: 0; border-radius: 16px; padding: 12px 0; font-size: 1.6rem; background: #fff; box-shadow: 0 4px 10px rgba(15,23,42,.12); cursor: pointer; touch-action: manipulation; }
.ar-blockpad button:active { transform: scale(.94); }
.ar-swap { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 4px; width: 100%; max-width: 380px; padding: 8px; border-radius: 18px; background: linear-gradient(160deg, #fce7f3, #e0e7ff); }
.ar-candy { aspect-ratio: 1; border: 0; border-radius: 12px; background: rgba(255,255,255,.7); font-size: clamp(1.2rem, 6vw, 1.8rem); line-height: 1; cursor: pointer; touch-action: manipulation; transition: transform .12s; }
.ar-candy.on { outline: 3px solid #db2777; transform: scale(1.08); background: #fff; }
.ar-candy.pop { animation: candypop .26s ease-in forwards; }
@keyframes candypop { to { transform: scale(1.4); opacity: 0; } }
.aq-tank { position: relative; width: 100%; max-width: 420px; height: 280px; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #7dd3fc 0%, #38bdf8 45%, #0369a1 100%); box-shadow: inset 0 0 0 4px rgba(255,255,255,.4); }
.aq-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; background: linear-gradient(180deg, #fde68a, #d6a24c); }
.aq-decor { position: absolute; bottom: 18px; font-size: 2rem; transform: translateX(-50%); }
.aq-fish { position: absolute; left: 0; top: 0; font-size: 2.1rem; will-change: transform; }
.aq-food { position: absolute; top: 0; color: #92400e; font-size: 1.4rem; animation: aqfood 2.4s linear forwards; }
@keyframes aqfood { to { transform: translateY(210px); opacity: .3; } }
.aq-tools { display: flex; gap: 8px; justify-content: center; margin: 10px 0 4px; flex-wrap: wrap; }
.aq-picker { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.aq-choices { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.aq-choice { border: 0; border-radius: 14px; background: #fff; font-size: 1.8rem; padding: 6px 10px; box-shadow: 0 3px 8px rgba(15,23,42,.12); cursor: pointer; position: relative; }
.aq-choice.small { font-size: 1.3rem; padding: 4px 8px; }
.aq-choice i { position: absolute; top: -6px; right: -6px; font-style: normal; font-size: .7rem; background: #ef4444; color: #fff; border-radius: 999px; width: 16px; height: 16px; line-height: 16px; }
@media (prefers-reduced-motion: reduce) { .ar-candy.pop, .aq-food { animation: none; } }
.aq-btn { border: 0; border-radius: 999px; padding: 12px 18px; font: inherit; font-size: 1.05rem; font-weight: 800; background: #fff; color: #0f172a; box-shadow: 0 4px 10px rgba(15,23,42,.12); cursor: pointer; }

/* 📴 Offline: kid mode's games with no internet */
.offline-mode #updating, .offline-mode #kid-exit { display: none !important; }
#kid-offline { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; text-align: center; }
#kid-offline h2 { margin: 6px 0; }
.off-banner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 10px 14px; border-radius: 16px; background: rgba(255,255,255,.92); color: #1e1b4b; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.off-banner.back { background: #dcfce7; color: #14532d; }
.off-banner .off-reload { width: auto; margin: 0; padding: 8px 16px; font-size: 1rem; }
.off-head { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.off-time:empty { display: none; }
.off-time { font-weight: 700; }
.off-locked { margin: 10px auto; }
.off-pin-sheet .off-pin { font-size: 1.6rem; text-align: center; letter-spacing: .3em; width: 9em; padding: 10px; border-radius: 14px; border: 2px solid #c4b5fd; }
/* 🎨 Game Center tiles: a little softer than full-strength color, easier on the eyes */
.arc-tile:not(.locked) { filter: saturate(.82); }

/* 💡 Have you tried these yet? */
.tryit-card { position: relative; }
.tryit-card h3 { margin: 0 36px 2px 0; }
.tryit-row { display: flex; flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.tryit-go { flex: 1; display: flex; align-items: center; gap: 12px; text-align: left; background: none; border: 0; padding: 4px 0; font: inherit; color: inherit; cursor: pointer; }
.tryit-icon { font-size: 1.5rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); flex: none; }
.tryit-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.tryit-text small { color: var(--muted); font-size: .85rem; }
.tryit-no { align-self: flex-start; margin-left: 56px; color: var(--muted); font-size: .8rem; padding: 2px 0; }

/* 🎁 Founding family reward */
.reward-card { position: relative; background: linear-gradient(135deg, #fff7e0, #fdecc8); border-color: #f5c46b; }
.reward-card h3 { margin: 0 36px 4px 0; }
.reward-dots { display: flex; align-items: center; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.reward-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #fff; border: 2px dashed #e0a43a; color: #9a5b00; }
.reward-dot.on { background: #f5a623; border-style: solid; color: #fff; }
.reward-dots small { font-weight: 700; color: #7a3e00; }
/* 🌙 dark */ html.dark:not([data-theme="light"]) .reward-card { background: linear-gradient(135deg, #3b2a06, #2d2108); border-color: #7a5410; }
:root[data-theme="dark"] .reward-card { background: linear-gradient(135deg, #3b2a06, #2d2108); border-color: #7a5410; }

/* 📄 Printable flyer */
.flyer-print { position: fixed; inset: 0; z-index: 3000; background: #e9eef6; overflow: auto; padding: 16px; }
.flyer-bar { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.flyer-sheet { background: #fff; color: #0f2742; max-width: 760px; margin: 0 auto; padding: 36px 40px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.12); font-family: inherit; }
.flyer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.4rem; color: #2f49b5; }
.flyer-brand img { width: 44px; height: 44px; border-radius: 22%; }
.flyer-sheet h1 { font-size: 2.1rem; line-height: 1.15; margin: 18px 0 8px; }
.flyer-lead { font-size: 1.1rem; margin: 0 0 18px; color: #36506e; }
.flyer-main { display: grid; grid-template-columns: 1fr 260px; gap: 24px; align-items: center; }
.flyer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 1.08rem; }
.flyer-qr { text-align: center; display: grid; gap: 6px; justify-items: center; }
.flyer-qr-code { width: 240px; height: 240px; }
.flyer-qr-code svg { width: 100%; height: 100%; }
.flyer-qr small { color: #5a6b84; word-break: break-all; font-size: .72rem; }
.flyer-foot { margin: 22px 0 0; text-align: center; font-weight: 700; color: #36506e; border-top: 2px dashed #dfe7f3; padding-top: 14px; }
@media (max-width: 600px) { .flyer-sheet { padding: 22px 18px; } .flyer-main { grid-template-columns: 1fr; } .flyer-sheet h1 { font-size: 1.6rem; } }
@media print {
  /* Only while a flyer is open: otherwise other printouts (school notes, care sheets) came out blank. */
  body:has(#flyer-print) > *:not(#flyer-print) { display: none !important; }
  #flyer-print, #flyer-print * { visibility: visible !important; }
  html:has(#flyer-print), body:has(#flyer-print) { background: #fff !important; }
  .flyer-print { position: static; background: #fff; padding: 0; overflow: visible; }
  .flyer-print .no-print { display: none !important; }
  .flyer-sheet { box-shadow: none; max-width: none; border-radius: 0; padding: 0.4in; }
  .flyer-main { grid-template-columns: 1fr 3in; }
  .flyer-qr-code { width: 3in; height: 3in; }
  @page { size: letter; margin: 0.4in; }
}
.flyer-kind { background: #fff; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); display: inline-flex; }
.flyer-kind .seg-btn { border: 0; background: none; padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer; color: #0f2742; }
.flyer-kind .seg-btn.on { background: var(--primary); color: #fff; }
.flyer-hint { text-align: center; color: #36506e; margin: -4px 0 12px; font-size: .9rem; }

/* 🏠 Just me / my household: kid things tucked away */
.mode-seg { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mode-seg .seg-btn { flex: 1 1 50%; border: 0; background: var(--card); color: var(--text); font: inherit; font-weight: 700; padding: 12px 10px; cursor: pointer; }
.mode-seg .seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.mode-seg .seg-btn.on { background: var(--primary); color: var(--primary-ink); }
.win-mode { display: block; margin: 6px 0 2px; text-align: left; }
body.household #kids-card, body.household #home-kidlaunch, body.household #home-whocanplay,
body.household #home-playdates, body.household #home-requests, body.household #home-hw,
body.household #home-daysoff, body.household #tool-kidmode,
body.household #tool-screentime, body.household #tool-kidstore { display: none !important; }
.inbox-tip { background: #fffbea; border-color: #f5d77a; }
.inbox-held { border-color: var(--primary); }
.inbox-senders form input { flex: 1; min-width: 0; }

/* 🧪 Founding Families */
.testers-entry { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; background: linear-gradient(135deg, #f6f2ff, #ece4ff); border-color: #c4b5fd; }
.testers-entry small { display: block; }
/* 🌙 dark */ html.dark .testers-entry { background: linear-gradient(135deg, #2e2350, #3b2a66); border-color: #6d5bb8; color: #f1ecff; } html.dark .testers-entry small { color: #c9bdf5; }
.testers-entry-icon { font-size: 1.6rem; }
.testers-tabs { display: flex; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.testers-tabs .seg-btn { flex: 1; border: 0; background: var(--card); color: var(--text); font: inherit; font-weight: 700; padding: 10px 8px; cursor: pointer; }
.testers-tabs .seg-btn.on { background: var(--primary); color: var(--primary-ink); }
.testers-post h4 { margin: 0; font-size: 1.1rem; }
.testers-text { white-space: pre-wrap; line-height: 1.5; }
.testers-comment { border-top: 1px solid var(--line); padding: 8px 0; }
.testers-comments form input, .testers-compose input, .testers-compose textarea, .testers-compose select { width: 100%; }
.testers-comments form input { flex: 1; min-width: 0; }
.testers-reply { background: var(--primary-soft); border-radius: 10px; padding: 8px 10px; font-size: .92rem; }
.testers-idea.done { opacity: .75; }

/* 🍎 Teacher tools & classwork */
.classwork-row { display: flex; align-items: flex-start; gap: 10px; }
.classwork-emoji { font-size: 1.4rem; }
.classwork-row .block { display: block; }
.teacher-tools { border-color: #c4b5fd; background: #faf7ff; }
.teacher-tools h5 { margin: 10px 0 4px; }
.teacher-tools input, .teacher-tools textarea, .teacher-tools select { width: 100%; }
.teacher-tools .row > * { flex: 1; }

/* 🔒 App lock */
.app-lock { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(170deg, #eaf3ff 0%, #f3f7fd 55%, #e6fbf8 100%); overflow-y: auto; }
.app-lock[hidden] { display: none; }
body.app-locked { overflow: hidden; }
.app-lock-inner { width: min(340px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.app-lock-logo { width: 64px; height: 64px; border-radius: 22%; box-shadow: 0 6px 16px rgba(11, 78, 162, .2); }
.app-lock h2 { margin: 0; font-size: 1.2rem; color: var(--text, #0f2742); }
.app-lock-dots { display: flex; gap: 16px; margin: 4px 0; }
.app-lock-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand-navy, #2f49b5); transition: background .12s; }
.app-lock-dots i.on { background: var(--brand-navy, #2f49b5); }
.app-lock-dots.shake { animation: lock-shake .35s; }
@keyframes lock-shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.app-lock-msg { min-height: 1.3em; margin: 0; color: #b91c1c; font-size: .9rem; }
.app-lock-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px 22px; }
.app-lock-key { width: 72px; height: 72px; border-radius: 50%; border: 0; background: #fff; color: var(--text, #0f2742); font: inherit; font-size: 1.7rem; font-weight: 600; box-shadow: 0 2px 8px rgba(15, 39, 66, .12); cursor: pointer; }
.app-lock-key:active { background: #dbeafe; transform: scale(.95); }
.app-lock-key.alt { background: transparent; box-shadow: none; font-size: 1.5rem; }
.app-lock-forgot { margin-top: 6px; align-self: center; text-align: center; }
:root[data-theme="dark"] .app-lock { background: linear-gradient(170deg, #0b1626, #0f1d33); }
:root[data-theme="dark"] .app-lock h2 { color: #e6eefb; }
:root[data-theme="dark"] .app-lock-key { background: #1b2a42; color: #e6eefb; }
:root[data-theme="dark"] .app-lock-dots i { border-color: #93c5fd; }
:root[data-theme="dark"] .app-lock-dots i.on { background: #93c5fd; }

/* 📊 Class trouble spots */
.spot-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline; }
/* 🍎 Teacher view */
.scroll-x { overflow-x: auto; max-width: 100%; }
.teacher-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.teacher-table th { text-align: left; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.teacher-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.teacher-table td:nth-child(6) { min-width: 170px; }

.spot-count { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.spot-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #f59e0b var(--p), var(--line, #dfe7f3) var(--p)); }
.spots-note { margin-top: 6px; }

/* 📋 Care Instructions: a shared link's card. */
.care-link { display: block; padding: 8px 10px; border-radius: 10px; background: var(--bg, #f3f7fd); font-size: .8rem; overflow-wrap: anywhere; }

/* 👀 Peek: a calm Home (today, your kids, the four everyday buttons, favorites, friends) */
body.peeking #tab-free > :not(.greeting):not(#home-today):not(#home-kidlaunch):not(#home-actions):not(#home-favs) { display: none !important; }
.tour-explore { display: block; margin: 8px auto 0; }

/* 🗂️ Everything KiddoCue does, by category */
.features-all { display: flex; flex-direction: column; gap: 10px; }
.feat-cat { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 14px; overflow: hidden; }
.feat-cat summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.feat-cat summary::-webkit-details-marker { display: none; }
.feat-cat summary::after { content: '›'; font-size: 1.4rem; color: var(--muted); transition: transform .15s; margin-left: 4px; }
.feat-cat[open] summary::after { transform: rotate(90deg); }
.feat-cat-emo { font-size: 1.6rem; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); flex: none; }
.feat-cat-head { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.feat-cat-head b { font-size: 1.05rem; }
.feat-cat-head small { color: var(--muted); line-height: 1.3; font-weight: 400; }
.feat-count { font-size: .75rem; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border-radius: 999px; padding: 2px 9px; }
.feat-list { list-style: none; margin: 0; padding: 0 14px 12px; display: grid; gap: 10px; }
.feat-list li { display: grid; grid-template-columns: 1.8em 1fr; gap: 8px; align-items: start; border-top: 1px solid var(--line); padding-top: 10px; }
.feat-list li > span { font-size: 1.25rem; line-height: 1.3; }
.feat-list strong { display: block; }
.feat-list small { color: var(--muted); line-height: 1.4; display: block; }
@media (min-width: 720px) { .feat-list { grid-template-columns: 1fr 1fr; column-gap: 18px; } }

/* Calmer front page: one accent per category, plain bullets in the lists */
.feat-list li { grid-template-columns: 10px 1fr; }
.feat-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); margin-top: .55em; }
.welcome .peek { margin: 14px auto 4px; }

/* 📷 Memory Lane: a bunch of photos on one memory */
.mem-photo { border: 0; padding: 0; background: none; display: block; width: 100%; cursor: zoom-in; }
.mem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 6px; border-radius: 12px; overflow: hidden; }
.mem-grid-cell { position: relative; border: 0; padding: 0; aspect-ratio: 1; background: var(--line, #dfe7f3); cursor: zoom-in; overflow: hidden; }
.mem-grid-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mem-grid-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15, 23, 42, .55); color: #fff; font-weight: 800; font-size: 1.3rem; }
.mem-viewer { position: fixed; inset: 0; z-index: 3200; background: rgba(0, 0, 0, .92); display: grid; place-items: center; }
.mem-viewer img { max-width: 100vw; max-height: 86vh; object-fit: contain; }
.mem-viewer-x { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 1.2rem; }
.mem-viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 2rem; border-radius: 12px; }
.mem-viewer-nav.prev { left: 8px; } .mem-viewer-nav.next { right: 8px; }
.mem-viewer-count { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); color: #fff; font-weight: 700; font-size: .9rem; }

/* 📣 Share a memory */
.share-sheet { position: fixed; inset: 0; z-index: 3200; background: rgba(15, 23, 42, .6); display: grid; place-items: end center; }
.share-sheet-inner { width: min(560px, 100%); max-height: 94vh; overflow-y: auto; background: var(--card, #fff); border-radius: 22px 22px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.share-canvas { width: 100%; max-width: 380px; height: auto; aspect-ratio: 4 / 5; align-self: center; border-radius: 14px; box-shadow: 0 8px 24px rgba(15, 23, 42, .18); background: #f1f5f9; }
.mem-share { margin-left: 8px; }

.mem-viewer-tools { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 12px; display: flex; gap: 8px; }
.mem-viewer-tools .btn { background: rgba(255,255,255,.92); color: #0f172a; border: 0; }
.mem-viewer-tools .ghost-dark { background: rgba(255,255,255,.18); color: #fff; }
.mem-viewer:has(.mem-viewer-tools) .mem-viewer-count { bottom: calc(18px + env(safe-area-inset-bottom)); }

.mem-grid-cell:first-child { grid-column: span 2; grid-row: span 2; }
.mem-actions { gap: 4px 14px; margin-top: 4px; }
.mem-actions .mem-share { margin-left: 0; }

.share-ready-img { width: 100%; max-width: 420px; align-self: center; border-radius: 14px; box-shadow: 0 8px 24px rgba(15, 23, 42, .18); -webkit-touch-callout: default; user-select: auto; }
.share-how { margin: 0; font-size: 1rem; line-height: 1.45; background: #eff6ff; border-radius: 12px; padding: 10px 12px; color: #0b3a75; }

.share-picks { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; }
.share-pick { position: relative; flex: 0 0 64px; height: 64px; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; background: var(--line, #dfe7f3); opacity: .45; }
.share-pick.on { border-color: #1e88f5; opacity: 1; }
.share-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-pick-check { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #1e88f5; color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.share-pick:not(.on) .share-pick-check { background: rgba(255,255,255,.85); border: 2px solid #94a3b8; }

#tools-dialog .tool { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

.mem-family-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem; background: rgba(255,255,255,.75); margin: 0 auto; }

.cover-canvas { width: 100%; height: auto; border-radius: 12px; cursor: crosshair; touch-action: manipulation; }
.mem-viewer-tools { flex-wrap: wrap; right: 70px; }

/* 🎓 How this works: a small button that follows you to each screen */
.how-fab:not(.how-inline) { position: fixed; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 1500; border: 0; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: .82rem; font-weight: 700; color: #1e3a5f; background: rgba(255,255,255,.92); box-shadow: 0 4px 14px rgba(15,23,42,.18); cursor: pointer; }
dialog .how-fab { bottom: calc(16px + env(safe-area-inset-bottom)); }
/* 🌙 dark */ html.dark .how-fab { background: rgba(30,41,59,.92); color: #e2e8f0; }

/* 📚 Book ideas (kid Reading) */
.kid-book { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 2px 8px rgba(0,0,0,.06); color: #1d2a44; text-align: left; }
.kid-book-emoji { font-size: 2rem; line-height: 1; }
.kid-book-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.kid-book-main b { font-size: 1.05rem; }
.kid-book-main small { color: #5b6b85; }
.kid-book-main p { margin: 4px 0; font-size: .95rem; }
.kid-book-tag { font-weight: 600; }
.kid-book-ask { margin-top: 6px; align-self: flex-start; padding: 8px 14px; font-size: .95rem; }
.kid-book-ideas { margin-top: 4px; }

/* 📖 Read now */
.kid-classic { border: 0; width: 100%; font: inherit; cursor: pointer; }
.kid-reader { background: #fffdf7; color: #2a2a2a; border-radius: 18px; padding: 18px 18px 8px; box-shadow: 0 2px 10px rgba(0,0,0,.07); text-align: left; font-family: Georgia, 'Iowan Old Style', serif; font-size: 1.2rem; line-height: 1.6; }
.kid-reader p { margin: 0 0 .9em; white-space: pre-line; }
.kid-reader-title { font-family: inherit; font-size: 1.35rem; margin: 4px 0 12px; color: #1d2a44; }
.kid-reader-chapters { width: 100%; font-size: .95rem; padding: 8px; border-radius: 10px; border: 1px solid #d9e2ef; background: #fff; margin-bottom: 10px; font-family: system-ui, sans-serif; }
.kid-reader-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.kid-reader-nav small { color: #5b6b85; text-align: center; flex: 1; }
.kid-reader-nav button { min-width: 90px; }

/* 📝 Homework results: what needs a look comes first */
.homework-verdict { margin-left: 8px; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #fdecec; color: #b42318; vertical-align: middle; }
.homework-verdict.v-incomplete { background: #fff4d6; color: #8a5a00; }
.homework-verdict.v-unsure, .homework-verdict.v-blank { background: #eef2f7; color: #36507a; }
.homework-right-list > summary { cursor: pointer; padding: 8px 2px; font-weight: 600; }
.kid-homework-finish { display: block; color: #8a5a00; font-weight: 700; }

/* 🧒 Your kids: a status under each name */
.kid-launch-name { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.kid-launch-status { font-size: .72rem; font-weight: 600; color: #5b6b85; white-space: nowrap; }
.kid-launch-status:empty { display: none; }
.kid-launch-status.needs { color: #b45309; }

/* ⏳ Nothing waiting: one small line, not a whole card */
.pending-card.pending-clear { padding: 8px 14px; }
.pending-caughtup { color: #16794a; font-weight: 700; font-size: .9rem; }
.homework-verdict { display: inline-block; white-space: nowrap; }
.kid-launch:has(.kid-launch-status:not(:empty)) { flex-direction: column; align-items: stretch; }
.kid-launch-kids .kid-launch-btn:has(.kid-launch-status:not(:empty)) { border-radius: 18px; padding-right: 16px; }

/* Plans: past and canceled fold away */
.plans-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
.plans-fold > summary::-webkit-details-marker { display: none; }
.plans-fold > summary::after { content: '›'; margin-left: auto; transition: transform .15s; font-size: 1.3em; }
.plans-fold[open] > summary::after { transform: rotate(90deg); }

/* 🎉 Invites & plans, from 📅 Calendar */
.cal-invites { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 10px 14px; }
.cal-invites > span:first-child { font-size: 1.4rem; }
.cal-invites small { display: block; }
.cal-invites .badge { position: static; }
.fs-badge { background: var(--danger, #d32f2f); color: #fff; border-radius: 9px; font-size: .7rem; padding: 0 6px; margin-left: 4px; }
.tabbar .badge:not([hidden]) + .badge.msg { left: calc(50% + 30px); }
/* 🧒 Kids tab */
.kt-kids .chip { display: inline-flex; align-items: center; gap: 4px; }
.kt-head h3 { margin: 0; }
.kt-head-actions { flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.kt-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kt-tile { border: 0; background: var(--bg-soft, #f3f7fc); border-radius: 14px; padding: 12px 4px; font: inherit; font-size: .85rem; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; color: inherit; }
.kt-icon { font-size: 1.6rem; }
@media (min-width: 700px) { .kt-tiles { grid-template-columns: repeat(6, 1fr); } }
#kids-tab .card > h4 { margin: 0 0 4px; }
#kids-tab .card.stack.tight { padding-top: 12px; }

/* 📋 Care Instructions */
.care-card .care-updated { display: block; }
.care-alert { color: #b42318; font-weight: 700; }
.care-secret { background: #fff8e6; }
.care-sheet { background: #fff; color: #1a1a1a; border: 1px solid #e3e8f0; border-radius: 12px; padding: 16px; font-size: .95rem; }
.care-sheet h2 { font-size: 1.25rem; margin: 0 0 2px; }
.care-sheet h3 { font-size: 1.02rem; margin: 0 0 6px; }
.cs-head { border-bottom: 2px solid #1a1a1a; padding-bottom: 8px; margin-bottom: 10px; }
.cs-emergency { border: 2px solid #c62828; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; background: #fff5f5; }
.cs-allergy { color: #b42318; font-weight: 800; margin-top: 6px; }
.cs-section { margin: 12px 0; page-break-inside: avoid; }
.cs-row { display: grid; grid-template-columns: 11em 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px solid #eef1f5; }
.cs-row span { white-space: pre-line; }
.cs-foot { color: #666; font-size: .8rem; margin-top: 12px; }
@media (max-width: 480px) { .cs-row { grid-template-columns: 1fr; gap: 0; } }
@media print { #print-sheet .care-sheet { border: 0; font-size: 11pt; padding: 0; } }

/* 💡 Suggestion box */
.suggest-reply { background: var(--primary-soft, #e8f1fd); border-radius: 10px; padding: 8px 10px; }
.care-link .link { align-self: flex-start; }
.care-link .btn.ghost.small { white-space: nowrap; }
.care-link > small { display: block; }

/* 🧒 Kids tab: wide row buttons (School overview, Care instructions) */
.kt-wide { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: var(--bg-soft, #f3f7fc); border-radius: 14px; padding: 12px; font: inherit; color: inherit; cursor: pointer; }
.kt-wide > span:first-child { font-size: 1.6rem; }
.kt-wide b, .kt-wide small { display: block; }
.kt-wide small { color: var(--muted, #5b6b85); }
/* 🏠 Just me / my household: no Kids tab */
body.household #tabbar [data-tab="tab-kids"] { display: none; }
#tab-free > .home-style { display: none; }

/* 👋 Welcome page: who it's for, a small Log in up top, a compact log-in / sign-up screen */
.tagline-wide { font-size: .98rem; }
.who-for { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 8px; padding: 0; }
.who-for span { background: #fff; border: 1px solid var(--line, #e2e8f0); border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 700; }
.welcome-top { display: flex; justify-content: flex-end; }
.peek-toast-2 { margin-top: 6px; }
.auth-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.auth-logo { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1.15rem; }
.auth-logo img { width: 28px; height: 28px; }
#login-form .kid-device-btn { margin-top: 6px; }
.welcome-top { gap: 8px; }
#kid-form .check-row.full { flex-basis: 100%; }
.home-bottom-links { justify-content: center; gap: 18px; }
/* 👀 Sneak peek bar: the sign-up button stands out; on a phone it takes its own line. */
.peek-bar .peek-cta { background: #fbbf24; color: #1e1b4b; border: 0; font-weight: 800; }
/* Two rows on a phone: what this is + Exit, then the big button + Tour. */
.peek-bar .peek-what { order: 0; } .peek-bar #peek-exit { order: 1; } .peek-bar .peek-cta { order: 2; } .peek-bar .peek-tours { order: 3; }
@media (max-width: 520px) { .peek-bar { padding: 8px 12px; gap: 6px 8px; } .peek-bar .peek-what { flex: 1 1 auto; font-size: .82rem; } .peek-bar .peek-cta { flex: 1 1 auto; } }
body.peeking .how-fab { display: none; }
.scan-row.scan-dup { background: #fff8e1; border-radius: 10px; }
.scan-dup-note { display: block; color: #8a5a00; font-weight: 600; }
/* 🌙 dark */ html.dark .scan-row.scan-dup { background: rgba(251,191,36,.12); } html.dark .scan-dup-note { color: #fcd34d; }
/* ⚙️ Settings is its own screen now: no second title, no box around the boxes. */
#tab-settings .settings-top h2 { margin: 0; }
#tab-settings #settings-help, #tab-settings #settings-card { background: transparent; box-shadow: none; border: 0; padding: 0; }
#tab-settings #settings-card > h3 { display: none; }
#tab-settings #settings-card .card, #tab-settings #settings-help > .card { background: var(--card, #fff); }
/* 🗂️ Tools inside a hub (Tasks, Games & puzzles, Help) or another tool (Memory Lane) open from there, not their own tile. */
#tools-dialog .tool.in-hub { display: none; }
/* ❓ Help: ✨ Ask Cue as one big button above the rest. */
.hub-ask-cue { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 4px; }
.hub-ask-cue small { font-size: .82rem; font-weight: 500; opacity: .9; }

/* 🎨 One tile style for parent screens (Today, Kids, ☰ All tools, App icons): a rounded colored
   square, calmer colors, a thin outline, a soft shadow, the same sizes, and labels that wrap. */
:root {
  --tile-icon: 50px; --tile-radius: 14px; --tile-emoji: 1.55rem; --tile-label: .8rem;
  --tile-outline: color-mix(in srgb, var(--text) 10%, transparent);
  --tile-shadow: 0 1px 2px rgba(15, 39, 66, .08);
}
.home-fav-icon, .home-app-icon, #tools-dialog .tool-icon, .kt-icon {
  --tile-c: var(--c, var(--primary));
  width: var(--tile-icon); height: var(--tile-icon); border-radius: var(--tile-radius);
  display: grid; place-items: center; font-size: var(--tile-emoji); line-height: 1;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tile-c) 22%, var(--card)), color-mix(in srgb, var(--tile-c) 42%, var(--card)));
  border: 1px solid var(--tile-outline); box-shadow: var(--tile-shadow);
}
.home-fav-name, .home-app-name, #tools-dialog .tool-name, .kt-tile > span:last-child {
  font-size: var(--tile-label); font-weight: 650; line-height: 1.2; text-align: center;
  max-width: 100%; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: visible;
}
.home-fav-name, .home-app-name { max-width: 84px; }
#tools-dialog .tool { min-height: 104px; gap: 8px; padding: 12px 6px; border-radius: var(--radius); background: var(--card); box-shadow: none; }
.kt-tile { gap: 8px; padding: 12px 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.home-fav.add .home-fav-icon { background: transparent; border: 2px dashed var(--line); box-shadow: none; }
/* The bigger App icons view keeps its size, with the same look. */
.home-app-icon { --tile-icon: 58px; --tile-emoji: 1.8rem; }
.home-app.folder .home-app-icon { --tile-icon: 82px; }
/* 🌙 dark */ html.dark { --tile-shadow: none; }

/* 🧒 Kids page feature cards: crisp white rounded squares (blue-gray border, soft shadow) on the
   page background, a pastel icon square above the label, two equal columns on phones. */
:root { --kt-border: #b4c6dd; --kt-shadow: 0 1px 2px rgba(15, 39, 66, .1), 0 6px 16px rgba(15, 39, 66, .11); }
html.dark { --kt-border: var(--line); --kt-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.kt-sec { padding: 4px 2px 6px; }
.kt-sec > h4 { margin: 0 2px 2px; }
.kt-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .kt-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .kt-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kt-tile, .kt-wide { background: var(--card); border: 1px solid var(--kt-border); border-radius: 18px; box-shadow: var(--kt-shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease; }
.kt-tile { min-height: 116px; padding: 16px 10px 14px; gap: 10px; justify-content: center; }
.kt-tile .kt-icon { --tile-icon: 48px; --tile-radius: 13px; box-shadow: none; }
.kt-tile > span:last-child { font-size: .88rem; font-weight: 700; }
.kt-wide { padding: 14px 16px; }
@media (hover: hover) { .kt-tile:hover, .kt-wide:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15, 39, 66, .08), 0 10px 22px rgba(15, 39, 66, .12); border-color: color-mix(in srgb, var(--primary) 35%, var(--kt-border)); } }
.kt-tile:focus-visible, .kt-wide:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.kt-tile:active, .kt-wide:active, .kt-tile[aria-pressed="true"], .kt-tile.on { border-color: var(--primary); background: var(--primary-soft); transform: none; }
@media (prefers-reduced-motion: reduce) { .kt-tile, .kt-wide { transition: none; } .kt-tile:hover, .kt-wide:hover { transform: none; } }

/* 🖥️ On a computer: Today uses the width (two columns of cards), Calendar gets room for the week,
   and everything else stays a comfortable reading width in the middle. */
/* 💻 On a computer: the same one column as the phone, in the same order (just a little wider),
   centered. The calendar gets the full width. */
@media (min-width: 1000px) {
  main#app.screen { max-width: 1040px; margin-left: auto; margin-right: auto; }
  main#app > .tab:not(#tab-week) { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }
  /* Settings → 💻 Computer layout: two columns on Today, for whoever prefers it. */
  body.two-columns main#app > #tab-free { max-width: 1000px; }
  body.two-columns #tab-free:not([hidden]) { display: block; column-count: 2; column-gap: 20px; }
  body.two-columns #tab-free > * { break-inside: avoid; margin: 0 0 16px; }
  body.two-columns #tab-free > .greeting { column-span: all; }
}
/* The layout choice only means something on a big screen. */
@media (max-width: 999px) { .wide-only { display: none !important; } }
/* 🧒 My Day and My School lead the child's screen: two big tiles at the top. */
.kid-lead { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 8px 14px; }
.kid-lead .kid-app { flex: none; width: 100%; }
.kid-lead .kid-app-icon { width: 92px; height: 92px; font-size: 3rem; border-radius: 26px; }
.kid-lead .kid-app-name { font-size: 1.05rem; font-weight: 800; }
.scan-who { display: inline-flex; align-items: center; gap: 6px; } .scan-who select { width: auto; padding: 4px 8px; font-size: .85rem; }
.noschool-clash { margin: 4px 0; padding: 6px 10px; border-radius: 10px; background: var(--sun-soft); color: var(--sun); font-weight: 600; }
.import-box > summary { font-size: .88rem; font-weight: 600; color: var(--primary); cursor: pointer; list-style: none; } .import-box > summary::-webkit-details-marker { display: none; } .import-box[open] > summary { margin-bottom: 8px; }
.signup-mode { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; } .signup-mode legend { font-weight: 700; margin-bottom: 4px; }
.grocery-ideas > summary { cursor: pointer; } .grocery-ideas[open] > summary { margin-bottom: 8px; }

/* ♿ Arrows drawn by CSS are decoration: don't read them aloud (browsers that don't know the "/ ''" form keep the line above). */
.fold > h3::after, .feat-cat summary::after, .plans-fold > summary::after { content: '›' / ''; }
.foods-drop > summary::after { content: '▾' / ''; }
/* Keyboard users can see where they are. */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* 📍 A place's welcome page (kiddocue.com/at/<code>): welcome, a short demo, one button. */
.spot-welcome { position: fixed; inset: 0; z-index: 900; overflow-y: auto; background: linear-gradient(170deg, #0b3a5c, #0b8f94); color: #fff; }
.spot-inner { max-width: 460px; margin: 0 auto; padding: 20px 16px 32px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.spot-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.05rem; }
.spot-brand img { width: 28px; height: 28px; border-radius: 22%; }
.spot-inner h1 { font-size: 1.45rem; line-height: 1.2; margin: 6px 0 0; color: #fff; }
.spot-inner h2 { font-size: 1.1rem; margin: 0; color: #fff; font-weight: 700; }
.spot-sub { margin: 0; opacity: .9; }
.spot-phone { all: unset; cursor: pointer; box-sizing: border-box; width: min(290px, 82vw); height: 270px; margin-top: 6px; border-radius: 30px; padding: 14px 12px; background: #f8fafc; color: #0f172a; box-shadow: 0 0 0 7px #0f172a, 0 16px 40px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 12px; text-align: left; position: relative; }
.spot-phone:focus-visible { outline: 3px solid #fff; outline-offset: 10px; }
.spot-phone.paused::after { content: '❚❚' / 'Paused'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; color: rgba(15,23,42,.45); }
.spot-bars { display: flex; gap: 4px; }
.spot-bars span { flex: 1; height: 4px; border-radius: 4px; background: #e2e8f0; overflow: hidden; }
.spot-bars i { display: block; height: 100%; width: 0; background: #0b8f94; }
.spot-bars .done i { width: 100%; }
.spot-bars .now i { animation: spot-fill 9s linear forwards; }
.spot-phone.paused .spot-bars .now i { animation-play-state: paused; }
@keyframes spot-fill { to { width: 100%; } }
.spot-screen { flex: 1; display: flex; align-items: center; }
.spot-mock { width: 100%; background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 0 0 1px rgba(15,23,42,.08), 0 6px 16px rgba(15,23,42,.08); display: flex; flex-direction: column; gap: 10px; animation: spot-in .4s ease-out both; }
.spot-mock-title { font-size: 1.05rem; }
.spot-mock-row { display: flex; gap: 10px; align-items: center; font-size: .98rem; animation: spot-in .4s ease-out both; }
.spot-mock-event { align-items: flex-start; padding-top: 8px; border-top: 1px solid #e2e8f0; }
.spot-mock-event > small { min-width: 48px; color: #0b8f94; font-weight: 700; padding-top: 2px; }
.spot-mock-event > span { display: flex; flex-direction: column; }
.spot-ping { gap: 4px; }
.spot-ping-app { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: #64748b; margin-bottom: 4px; }
.spot-ping-app img { width: 18px; height: 18px; border-radius: 50%; }
@keyframes spot-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.spot-caption { min-height: 2.6em; margin: 8px 0 0; font-size: 1.15rem; font-weight: 700; }
.spot-welcome .link { color: #fff; text-decoration: underline; }
.spot-start { width: 100%; max-width: 340px; font-size: 1.15rem; padding: 14px 20px; background: #fff !important; color: #0b3a5c !important; margin-top: 6px; }
.spot-start.pulse { animation: spot-pulse 1.6s ease-in-out 3; }
@keyframes spot-pulse { 50% { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(255,255,255,.25); } }
.spot-note { font-size: .85rem; opacity: .85; margin: 6px 0 0; }
@media (prefers-reduced-motion: reduce) { .spot-mock, .spot-mock-row, .spot-start.pulse { animation: none; } }
.spot-welcome .link { align-self: center; }
.spot-snap-box { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 4px; width: 100%; max-width: 340px; }
.spot-snap { width: 100%; background: rgba(255,255,255,.14) !important; color: #fff !important; border: 2px solid rgba(255,255,255,.7) !important; }
.spot-snap-box small { opacity: .9; }
.spot-reading { flex-direction: row; gap: 12px; align-items: center; justify-content: center; min-height: 120px; color: #475569; }

/* 🛠️ Admin page shortcut (admins only). */
.admin-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; border: 2px solid var(--primary); }
.admin-link > span:first-child { font-size: 1.6rem; }
.admin-link .grow { display: flex; flex-direction: column; }
.admin-tools-link { align-self: flex-start; text-decoration: none; }
/* 🦷 Appointment pages (dentist, barber): a calm, clean office look instead of the playful one. */
.spot-welcome.pro { background: linear-gradient(180deg, #f5f9ff 0%, #eaf3fb 100%); color: #0f2742; }
.spot-welcome.pro .spot-inner h1, .spot-welcome.pro .spot-inner h2 { color: #0b3a6e; }
.spot-welcome.pro .spot-inner h1 { font-size: 1.6rem; }
.spot-welcome.pro .spot-brand { color: #0b3a6e; font-size: .95rem; opacity: .85; }
.spot-welcome.pro .spot-brand img { box-shadow: 0 1px 4px rgba(15,39,66,.15); }
.spot-welcome.pro .spot-sub { color: #475569; }
.spot-welcome.pro .spot-phone { background: #fff; box-shadow: 0 0 0 1px #d6e2f0, 0 14px 34px rgba(15,39,66,.14); }
.spot-welcome.pro .spot-bars span { background: #e2e8f0; }
.spot-welcome.pro .spot-bars i { background: #3b5bdb; }
.spot-welcome.pro .spot-mock { box-shadow: 0 0 0 1px #e2e8f0; }
.spot-welcome.pro .spot-mock-event > small { color: #3b5bdb; }
.spot-welcome.pro .spot-caption { color: #0b3a6e; }
.spot-welcome.pro .link { color: #3b5bdb; }
.spot-welcome.pro .spot-snap { background: #3b5bdb !important; color: #fff !important; border: 0 !important; font-size: 1.12rem; padding: 14px 20px; }
.spot-welcome.pro .spot-snap-box small { color: #475569; opacity: 1; }
.spot-welcome.pro .spot-start { background: #fff !important; color: #3b5bdb !important; border: 2px solid #3b5bdb !important; }
.spot-welcome.pro .spot-start.pulse { animation: none; }
.spot-welcome.pro .spot-note { color: #64748b; opacity: 1; }
.spot-welcome.pro .spot-phone:focus-visible { outline-color: #3b5bdb; }

/* 🏠 Calm Home: Today, Needs attention, Your kids, Quick actions, All tools. Fewer boxes and shadows, more room. */
#tab-free { gap: 18px; }
#tab-free .card { box-shadow: none; border: 1px solid var(--line); }
.home-sec { margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.home-attn { display: flex; flex-direction: column; gap: 8px; }
.home-attn[hidden] { display: none; }
.home-attn .card { border-top-width: 1px; border-left: 3px solid #f59e0b; padding: 10px 14px; }
.home-attn .pending-row { background: transparent; padding: 8px 0; border-radius: 0; }
.home-attn .pending-row + .pending-row { border-top: 1px solid var(--line); }
.kid-launch-btn { box-shadow: none; }
/* ⚡ Quick actions: 4 across, phone and computer alike. */
#home-favs { gap: 8px; }
#home-favs .home-favs-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
#home-favs .home-fav { gap: 6px; padding: 10px 4px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; min-height: 0; }
#home-favs .home-fav-icon { width: 40px; height: 40px; border-radius: 12px; font-size: 1.25rem; box-shadow: none; }
#home-favs .home-fav-text { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
#home-favs .home-fav-name { max-width: none; font-size: .78rem; font-weight: 700; line-height: 1.2; }
#home-favs .home-fav-status { font-size: .68rem; color: var(--muted); text-align: center; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
#home-favs .home-fav-status.hot { color: #b45309; font-weight: 700; }
#home-favs .home-fav.add { border: 2px dashed var(--line); background: transparent; }
#home-favs .home-fav-x { top: -6px; right: -6px; left: auto; }
.home-fav-wrap { display: flex; flex-direction: column; gap: 4px; }
.home-fav-move { display: flex; justify-content: center; gap: 2px; }
.home-alltools { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 2px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.home-alltools-text { display: flex; flex-direction: column; flex: 1; }
.home-alltools-text small { color: var(--muted); font-size: .8rem; }
/* 💡 Get started, once most steps are done: one small line. */
.first-win.small { padding: 8px 12px; }
.win-mini { display: flex; align-items: center; gap: 10px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 0; min-width: 0; }
.win-mini small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-ring { flex: none; width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(var(--go, #16a34a) var(--p), var(--line) 0); -webkit-mask: radial-gradient(circle, transparent 8px, #000 9px); mask: radial-gradient(circle, transparent 8px, #000 9px); }
.first-win .win-step.done { opacity: .6; } .first-win .win-step.done span:nth-child(2) { text-decoration: line-through; }
.first-win .win-more { margin: 2px 0 0; }
/* Calm Today: promo cards and big call-to-action buttons stay in ☰ All tools, not on Today. */
#tab-free > .cta, #home-tryit, #home-reward, #home-contact { display: none !important; }
#tab-free .kid-launch { flex-direction: column; align-items: stretch; gap: 8px; }
#tab-free .kid-launch-label { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
#home-favs .home-favs-row { align-items: stretch; }
.home-fav-wrap > .home-fav { flex: 1; }
/* Edit quick actions: ◀ ▶ only appear when moving with a keyboard. */
.home-fav-move.kbd-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.home-fav-move.kbd-only:focus-within { position: static; width: auto; height: auto; clip: auto; }
.home-fav-swap { align-self: center; }
#home-favs.editing .home-fav[data-fav] { animation: none; outline: 2px dashed var(--line); outline-offset: 2px; }
/* 💊 A dose due, as one tidy row in Needs attention. */
.home-attn .meds-card { gap: 4px; }
.home-attn .meds-card .med-dose { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 10px; padding: 6px 0 0; border: 0; background: none; }
.home-attn .meds-card .med-time { font-size: .85rem; font-weight: 700; }
.home-attn .meds-card .med-what b { font-size: .95rem; }
.home-attn .meds-card .med-what { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.home-attn .meds-card .med-dose > .btn { white-space: nowrap; }
.med-attn { display: flex; align-items: center; gap: 10px; }
.med-attn-open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 0; }
.med-attn .btn { flex: none; white-space: nowrap; }
/* ⇄ Add or swap: 3 roomy columns on a phone so "Care Instructions" and "After-school activities" wrap between words. */
.add-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; }
@media (min-width: 560px) { .add-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.add-grid .home-app-name { max-width: none; font-size: .82rem; overflow-wrap: normal; word-break: normal; hyphens: manual; -webkit-hyphens: manual; }
body.editing-favs .how-fab { display: none !important; }

/* 🎓 How this works: a small ? in the top bar, or a plain link at the bottom of a window. Never over content. */
.how-fab.how-inline { position: static; display: block; margin: 14px auto 4px; box-shadow: none; background: none; border: 0; color: var(--primary); font-size: .85rem; font-weight: 700; padding: 6px 10px; }
.home-bottom-links .how-fab.how-inline { margin: 0; padding: 0; display: inline; font-size: inherit; }
.home-bottom-links { row-gap: 4px; flex-wrap: wrap; }
/* 📅 Month: event names in each day (like Google Calendar). */
#cal-days { gap: 0; border-top: 1px solid var(--line); }
#cal-days .cal-day { align-items: stretch; justify-content: flex-start; gap: 2px; min-height: 84px; padding: 3px 1px 4px; border-radius: 0; border-bottom: 1px solid var(--line); min-width: 0; }
#cal-days .cal-day + .cal-day:not(:nth-child(7n + 1)) { border-left: 1px solid var(--line); }
#cal-days .cal-num { align-self: center; width: 24px; height: 24px; font-size: .8rem; font-weight: 600; }
#cal-days .cal-day.today .cal-num { background: var(--primary); color: #fff; }
#cal-days .cal-day.selected { background: var(--primary-soft); color: inherit; }
#cal-days .cal-day.selected .cal-num { color: var(--primary); }
#cal-days .cal-day.today.selected .cal-num { color: #fff; background: var(--primary); }
.cal-chips { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-chip { display: block; font-size: .62rem; font-weight: 600; line-height: 1.4; padding: 0 3px; border-radius: 3px; color: #fff; background: var(--k, #64748b);
  white-space: nowrap; overflow: hidden; text-overflow: clip; text-align: left; }

.cal-more { font-size: .62rem; font-weight: 700; color: var(--muted); text-align: left; padding-left: 3px; }
@media (min-width: 700px) {
  #cal-days .cal-day { min-height: 108px; padding: 4px 3px 6px; }
  .cal-chip, .cal-more { font-size: .74rem; padding: 1px 5px; }
}

#cal-kid-legend { margin-top: 2px; } #cal-kid-legend[hidden] { display: none; }
/* 📅 Month extras: Today button, a folded color key, a quieter calendars link, and a centered bottom bar on a computer. */
.cal-head-right { gap: 4px; flex-wrap: nowrap; }
.cal-today { font-weight: 700; }
.cal-key { margin-top: 8px; }
.cal-key > summary { cursor: pointer; font-size: .78rem; font-weight: 700; color: var(--muted); list-style: none; }
.cal-key > summary::-webkit-details-marker { display: none; }
.cal-key > summary::after { content: ' ›'; }
.cal-key[open] > summary::after { content: ' ⌄'; }
p.cal-private.small { font-size: .74rem; line-height: 1.4; margin: 0; }
.cal-private #cal-feeds { font-size: inherit; font-weight: 600; }
#cal-day-title { scroll-margin-top: 80px; }
@media (min-width: 900px) { .tabbar { padding-left: max(0px, calc((100% - 760px) / 2)); padding-right: max(0px, calc((100% - 760px) / 2)); } }
/* 📝 Note to self: a small pill on Today and in Calendar, a quick box, gray on the calendar. */
.greeting { position: relative; }
.quick-note { position: absolute; top: 2px; right: 0; border: 1px solid var(--line); background: var(--card); color: var(--ink, inherit); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.quick-note:active { transform: scale(.96); }
.k-note { --k: #64748b; }
.cal-chip.done { opacity: .5; text-decoration: line-through; }
.selfnote-dialog { width: min(440px, calc(100vw - 24px)); border: 0; border-radius: 20px; padding: 16px; margin: auto auto 12px; }
@media (min-width: 700px) { .selfnote-dialog { margin: auto; } }
.selfnote-text { font-size: 1.1rem; padding: 12px 14px; }
.selfnote-days { display: flex; gap: 6px; flex-wrap: wrap; }
.selfnote-days .chip { cursor: pointer; }
.selfnote-days .chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.selfnote-other { position: relative; overflow: hidden; }
.selfnote-other input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.selfnote-remind { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.selfnote-remind input { width: auto; }
.selfnote-actions { justify-content: flex-end; gap: 8px; }
.selfnote-private { margin: 0; }
.greeting h2 { padding-right: 96px; }
.selfnote-dialog .selfnote-days { flex-wrap: nowrap; }
.selfnote-dialog .selfnote-days .chip { white-space: nowrap; padding: 7px 12px; font-size: .9rem; }
.selfnote-dialog label.selfnote-remind { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; font-weight: 600; text-align: left; margin: 0; }
.selfnote-dialog label.selfnote-remind input { width: 8.5em; flex: none; margin: 0; padding: 6px 8px; }

/* 🧒 Kids: one child's space. Compact cards, one line-icon family, calm colors (KiddoCue blue,
   small teal/purple/gold accents), clear sections, parent tools labeled and kept at the bottom. */
.kx { --kx-ink: #13213a; --kx-sub: #5b6b85; --kx-line: #d5e0ee; display: flex; flex-direction: column; gap: 22px; color: var(--kx-ink); }
html.dark .kx { --kx-ink: var(--text); --kx-sub: var(--muted); --kx-line: var(--line); }
.kx-top { display: flex; flex-direction: column; gap: 12px; }
.kx-who { display: flex; align-items: center; gap: 12px; }
.kx-who h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.01em; }
.kx-status { margin: 2px 0 0; font-size: .85rem; color: var(--kx-sub); }
.kx-switch { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.kx-kid { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--kx-line); background: var(--card); font: inherit; font-size: .9rem; font-weight: 600; color: var(--kx-ink); cursor: pointer; flex: none; }
.kx-kid.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.kx-sec { display: flex; flex-direction: column; gap: 10px; }
.kx-h { margin: 0 2px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--kx-sub); }
/* Folded sections (Memories, Parent controls): one tap opens them. */
details.kx-fold > summary.kx-h { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--kx-line); border-radius: 14px; background: var(--card); }
details.kx-fold > summary.kx-h::-webkit-details-marker { display: none; }
details.kx-fold > summary.kx-h::after { content: '▾'; margin-left: auto; font-size: 1rem; transition: transform .15s; }
details.kx-fold[open] > summary.kx-h { border-color: transparent; background: none; padding: 0 2px; min-height: 28px; }
details.kx-fold[open] > summary.kx-h::after { transform: rotate(180deg); }
details.kx-fold > summary.kx-h > span { white-space: nowrap; flex: none; }
.kx-fold-hint { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: .82rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.kx-fold[open] .kx-fold-hint { display: none; }
/* Icons: one family (2px line), small tinted square */
.kx-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: inline-grid; place-items: center; }
.kx-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.kx-ico.lg { width: 48px; height: 48px; border-radius: 13px; }
.kx-ico.lg svg { width: 26px; height: 26px; }
.kx-ico.blue { background: #e6efff; color: #1d5fd1; }
.kx-ico.teal { background: #e1f5f2; color: #0f8a7c; }
.kx-ico.purple { background: #efe9fe; color: #6d4ad8; }
.kx-ico.gold { background: #fdf3d8; color: #b7791f; }
.kx-ico.plain { background: #eef2f7; color: #475569; }
html.dark .kx-ico { background: rgba(255,255,255,.08); color: var(--text); }
.kx-chev { width: 18px; height: 18px; color: #9aa8bd; flex: none; display: inline-grid; place-items: center; }
.kx-chev svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Shared card surface: white, hairline border, barely-there shadow */
.kx-feature, .kx-mini, .kx-list, .kx-progress { background: var(--card); border: 1px solid var(--kx-line); border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 39, 66, .05); }
.kx button { font: inherit; color: inherit; text-align: left; cursor: pointer; }
.kx button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
/* Featured: Homework check */
.kx-feature { display: flex; align-items: center; gap: 14px; padding: 14px; width: 100%; border-color: color-mix(in srgb, var(--primary) 30%, var(--kx-line)); background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 6%, var(--card)), var(--card)); }
.kx-feature-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kx-feature-text b { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kx-feature-text small, .kx-mini small, .kx-row-text small, .kx-progress small { color: var(--kx-sub); font-size: .82rem; line-height: 1.3; }
.kx-cta { flex: none; background: var(--primary); color: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: .9rem; }
.kx-badge { background: #fde68a; color: #7c4a03; border-radius: 999px; padding: 1px 8px; font-size: .72rem; font-weight: 800; }
.kx-badge[hidden] { display: none; }
/* Supporting cards: compact, equal */
.kx-group { margin: 6px 2px -2px; font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.kx-group:first-of-type { margin-top: 0; }
.hub-group { margin: 8px 2px 0; }
.kx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .kx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .kx-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kx-mini { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; min-height: 0; }
.kx-mini b { font-size: .95rem; line-height: 1.2; }
/* Rows */
.kx-list { display: flex; flex-direction: column; overflow: hidden; }
.kx-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: none; border: 0; border-top: 1px solid var(--kx-line); width: 100%; }
.kx-row:first-child { border-top: 0; }
.kx-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.kx-row-text b { font-size: .95rem; font-weight: 650; }
/* Progress cards */
.kx-progress { display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.kx-progress-top { display: flex; align-items: center; gap: 10px; }
.kx-progress-top b { font-size: .95rem; }
.kx-bar { display: block; height: 6px; border-radius: 999px; background: #e7edf5; overflow: hidden; }
.kx-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #14b8a6, #22c55e); }
.kx-big { font-size: 1.25rem; }
@media (hover: hover) { .kx-feature:hover, .kx-mini:hover, .kx-progress:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--kx-line)); box-shadow: 0 4px 12px rgba(15, 39, 66, .08); } .kx-row:hover { background: color-mix(in srgb, var(--primary) 4%, transparent); } }
.kx-mini:active, .kx-row:active, .kx-progress:active, .kx-feature:active { background: var(--primary-soft); }

/* 🧭 Bottom navigation: line icons; the current tab gets KiddoCue blue and a soft pill */
.tabbar button .tab-ico { width: 46px; height: 28px; border-radius: 999px; display: grid; place-items: center; filter: none; opacity: 1; font-size: 0; transition: background .15s; }
.tabbar button .tab-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.active .tab-ico { background: var(--primary-soft); }
/* 🔎 A proper search icon in the header; a slimmer header */
.topbar { padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: 8px; }
.topbar h1 .logo-tile { width: 26px; height: 26px; }
.search-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; display: block; }
.topbar .menu-btn { width: 36px; height: 36px; border-radius: 10px; font-size: 1.2rem; }
.topbar h1 { font-size: 1.15rem; }

/* 👀 Virtual tour bar: one slim line pinned just above the tabs, with room saved for it so it never
   covers a card or the tab bar. */
.peek-bar { flex-wrap: nowrap; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 14px; border-radius: 999px; max-width: 520px; bottom: calc(70px + env(safe-area-inset-bottom)); }
.peek-bar .peek-what { order: 0; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .85rem; }
.peek-bar .peek-tours { order: 1; flex: none; padding: 6px 10px; }
.peek-bar .peek-cta { order: 2; flex: none; padding: 6px 14px; }
.peek-bar #peek-exit { order: 3; flex: none; white-space: nowrap; color: #e9d5ff; padding: 0 4px; margin: 0; line-height: 1.2; align-self: center; }
body.peeking main#app { padding-bottom: 130px; }
@media (max-width: 520px) { .peek-bar { padding: 5px 6px 5px 12px; gap: 6px; } .peek-bar .peek-what-more { display: none; } .peek-bar .peek-cta, .peek-bar .peek-tours { flex: none; } }

/* ⭐ Kid home: "Next for you" and progress toward the reward they're saving for */
.kid-next { display: flex; flex-direction: column; gap: 8px; margin: 0 4px 12px; }
.kid-next-go { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 22px; background: rgba(255,255,255,.94); color: #10203f; text-align: left; font: inherit; cursor: pointer; box-shadow: 0 8px 22px rgba(15,23,42,.18); }
.kid-next-icon { font-size: 2rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: #fef3c7; flex: none; }
.kid-next-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.kid-next-text small { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #b45309; }
.kid-next-text b { font-size: 1.08rem; }
.kid-next-text span { font-size: .85rem; color: #475569; }
.kid-next-arrow { font-size: 1.8rem; color: #94a3b8; }

/* ➕ "More options" in Add event: the extras, tucked away */
.more-box { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--card); }
.more-box > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.more-box > summary::-webkit-details-marker { display: none; }
.more-box > summary::before { content: '＋'; display: none; }
.more-box[open] > summary { margin-bottom: 10px; }

/* ⋯ More: less-used actions tucked into a small menu */
.more-menu { position: relative; display: inline-block; }
.more-menu > summary { list-style: none; cursor: pointer; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu-list { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 20; min-width: 220px; display: flex; flex-direction: column; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(15,39,66,.18); }
.more-menu-list button { text-align: left; padding: 10px 12px; border: 0; border-radius: 10px; background: none; font: inherit; color: inherit; cursor: pointer; }
.more-menu-list button:hover, .more-menu-list button:focus-visible { background: var(--bg); }
.more-menu-list .danger-text { color: #b91c1c; }

/* 📺 Family TV setup: a summary, then four sections */
.tv-summary-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tv-summary-chips span { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: .85rem; font-weight: 600; }
.tv-tabs { display: flex; flex-wrap: wrap; }
.tv-tabs button { flex: 1 1 auto; white-space: nowrap; }

/* 🎨 KiddoCue's own icons: each picture is a whole tile, so it replaces the emoji and its square. */
[data-rc] { background: var(--rc) center / 100% no-repeat !important; border-color: transparent !important; box-shadow: none !important; }
[data-rc] > .rc-emoji { visibility: hidden; }
.folder-minis > i[data-rc] { border-radius: 22%; }

/* 👋 Welcome top bar: tour on the left, Log in and Create account on the right */
.welcome-top { justify-content: space-between; align-items: center; flex-wrap: wrap; }
.welcome-top .welcome-tour[hidden] + .welcome-top-auth { margin-left: auto; }
.welcome-top-auth { display: inline-flex; gap: 8px; margin-left: auto; }
/* A plan card */
.plan { background: var(--card); border: 1px solid var(--line, #e2e8f0); border-radius: 16px; padding: 14px 16px; text-align: left; }
.plan h3 { margin: 0 0 4px; font-size: 1.05rem; }
.plan .check-list { margin: 8px 0 0; }
/* ▾ More for today: the folded meal, discovery and feedback cards */
.home-extras { background: none; border: 1px dashed var(--line, #e2e8f0); border-radius: 14px; padding: 10px 14px; color: var(--muted); font-weight: 700; font-size: .9rem; text-align: left; cursor: pointer; }
.home-extras:hover { color: var(--primary); border-color: var(--primary); }
.plan { display: block; }
@media (max-width: 420px) {
  .welcome-top { flex-wrap: nowrap; gap: 6px; }
  .welcome-top-auth { gap: 6px; }
  .welcome-top .btn.small { padding: 6px 10px; font-size: .82rem; white-space: nowrap; }
}
@media (max-width: 380px) { .welcome-top .btn.small { padding: 6px 8px; font-size: .78rem; } }

/* ✨ Ask Cue: the floating button, the chat, and the walk-through */
.cue-fab { position: fixed; right: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 1500; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 10px 15px 10px 12px; font: inherit; font-size: .9rem; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #2563eb); box-shadow: 0 8px 22px rgba(79, 70, 229, .4); }
.cue-fab span { font-size: 1.1rem; }
.cue-fab:focus-visible { outline: 3px solid #facc15; outline-offset: 2px; }
.cue-fab.cue-in-window { position: static; flex: none; width: 36px; height: 36px; padding: 0; justify-content: center; margin-left: auto; margin-right: 6px; box-shadow: 0 3px 10px rgba(79, 70, 229, .3); }
.cue-fab.cue-in-window b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cue-fab.cue-in-window span { font-size: 1rem; }
.cue-fab.cue-by-x { position: absolute; top: 14px; right: 58px; margin: 0; z-index: 5; }
dialog:has(> .dialog-x):has(> .cue-by-x) > :nth-child(2) > :first-child, dialog:has(> .dialog-x):has(> .cue-by-x) > :nth-child(2):is(h2, h3) { padding-right: 86px; }
@media (min-width: 900px) { .cue-fab { bottom: 24px; } }
/* On a phone it's a small round ✨, so it never covers a row, a quick action or a toast. */
@media (max-width: 899px) {
  .cue-fab:not(.cue-in-window):not(.cue-by-x) { width: 44px; height: 44px; padding: 0; justify-content: center; bottom: calc(80px + env(safe-area-inset-bottom)); right: 10px; box-shadow: 0 4px 12px rgba(79, 70, 229, .35); }
  .cue-fab:not(.cue-in-window):not(.cue-by-x) b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  body:has(#cue-fab) { padding-bottom: calc(136px + env(safe-area-inset-bottom)); }
}
.cue-dialog { width: min(96vw, 460px); max-height: min(88vh, 720px); }
.cue-log { display: flex; flex-direction: column; gap: 10px; max-height: 56vh; overflow-y: auto; padding: 2px; }
.cue-msg { display: flex; gap: 8px; align-items: flex-start; }
.cue-msg p { margin: 0; line-height: 1.4; }
.cue-me { justify-content: flex-end; }
.cue-me p { background: #2563eb; color: #fff; padding: 9px 13px; border-radius: 16px 16px 4px 16px; max-width: 85%; }
.cue-face { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.cue-said { display: flex; flex-direction: column; gap: 8px; background: #f3f0ff; color: #1e1b4b; padding: 10px 13px; border-radius: 4px 16px 16px 16px; max-width: 88%; }
.cue-thinking .cue-said { opacity: .7; }
.cue-also { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cue-also small { width: 100%; }
.cue-chip { border: 1px solid #c4b5fd; background: #fff; color: #4c1d95; border-radius: 999px; padding: 6px 11px; font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; text-align: left; }
.cue-form { display: flex; gap: 6px; align-items: flex-end; }
.cue-form textarea { flex: 1; resize: none; min-height: 44px; font: inherit; border-radius: 14px; padding: 10px 12px; }
.cue-send { min-height: 44px; }
.cue-status:empty { display: none; }
.cue-layer { pointer-events: none; }
.cue-layer .tour-bubble { pointer-events: auto; }
.cue-layer .tour-bubble:not(.center) { transform: translateX(-50%); }
.cue-spot { box-shadow: 0 0 0 9999px rgba(15, 23, 42, .5), 0 0 0 3px #a78bfa, 0 0 24px #8b5cf6; animation: cue-pulse 1.3s ease-in-out infinite; }
@keyframes cue-pulse { 50% { box-shadow: 0 0 0 9999px rgba(15, 23, 42, .5), 0 0 0 6px #a78bfa, 0 0 36px #8b5cf6; } }
.cue-finger { position: absolute; right: -6px; bottom: -26px; font-size: 1.7rem; animation: cue-tap 1.1s ease-in-out infinite; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
@keyframes cue-tap { 50% { transform: translate(-4px, -8px); } }
.cue-bubble .tour-count { color: #6d28d9; }
@media (prefers-reduced-motion: reduce) { .cue-spot, .cue-finger { animation: none; } }
html.dark .cue-said { background: #2e2a4f; color: #ede9fe; }
html.dark .cue-chip { background: #1e1b4b; color: #ddd6fe; border-color: #5b21b6; }
#kid-grownup-check { z-index: 60; }
.kid-app-lock { position: absolute; left: -6px; top: -6px; font-size: .9rem; background: #fff; border-radius: 999px; padding: 1px 3px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.fun-gate { z-index: 55; }
.fun-read-clock { font-size: 3.4rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #1e1b4b; }
.kid-read-pill { position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 800; background: #fff; color: #1e1b4b; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.fun-ask-sheet .btn small { font-weight: 400; }

/* ✨ Cue Ahead */
.today-dot.dot-pink { background: #ec4899; }
.cue-intro { margin: 0 0 4px; }
.cue-list { padding: 4px 14px; display: block; margin: 6px 0 0; }
#inbox-body .cue-list { margin-top: -4px; }
#inbox-body .cue-intro + .cue-list { margin-top: 0; }
.cue-item { display: flex; gap: 8px; align-items: flex-start; padding: 10px 0; }
.cue-item + .cue-item, .cue-tomorrow + .cue-tomorrow { border-top: 1px solid rgba(0,0,0,.08); }
.cue-item.done { opacity: .7; }
.cue-icon { font-size: 1.3rem; line-height: 1.4; flex: none; }
.cue-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.cue-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.cue-actions .btn { padding: 4px 9px; min-height: 34px; font-size: .8rem; width: auto; }
.cue-row .today-text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cue-note { margin-top: 6px; gap: 6px; flex-wrap: nowrap; }
.cue-note input { flex: 1; min-width: 0; }
.cue-tomorrow { display: block; text-align: left; font: inherit; color: inherit; width: 100%; padding: 10px 0; background: none; border: 0; }
button.cue-tomorrow { cursor: pointer; }
#alerts-form label.nudge-hour { display: flex; flex-direction: row; justify-content: flex-start; gap: 8px; align-items: center; margin: -4px 0 0 34px; font-weight: 400; text-align: left; }
.nudge-hour select { width: auto; }
.cue-done summary { cursor: pointer; font-weight: 600; margin: 12px 0 6px; }

/* ✏️ Do my homework: one problem at a time, with Professor Hoot's hints */
.ws-snap { font-size: 1.25rem; padding: 16px; }
.ws-intro p { margin: 0; font-size: 1.05rem; line-height: 1.45; text-align: center; }
.ws-intro h3 { text-align: center; margin: 0; }
.ws-row { border: 0; font: inherit; text-align: left; cursor: pointer; }
.ws-row small { color: #475569; font-weight: 700; }
.ws-row.done { opacity: .85; }
.ws-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.ws-dot { width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; display: inline-block; }
.ws-dot.right { background: #16a34a; }
.ws-dot.paper { background: #0ea5e9; }
.ws-dot.help { background: #f59e0b; }
.ws-dots.big { justify-content: center; gap: 6px; max-width: 560px; margin: 0 auto; width: 100%; }
.ws-dots.big .ws-dot { width: 34px; height: 34px; border: 3px solid transparent; font: 800 .85rem/1 ui-rounded, "Nunito", system-ui, sans-serif; color: #334155; background: rgba(255,255,255,.85); cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.ws-dots.big .ws-dot.right { background: #dcfce7; }
.ws-dots.big .ws-dot.paper { background: #e0f2fe; }
.ws-dots.big .ws-dot.help { background: #fef3c7; }
.ws-dots.big .ws-dot.on { border-color: #ea580c; transform: scale(1.12); }
.ws-directions { max-width: 560px; margin: 0 auto; background: rgba(255,255,255,.85); border-radius: 14px; padding: 8px 12px; font-weight: 700; color: #14233b; }
.ws-label { align-self: center; font-weight: 800; color: #ea580c; font-size: 1rem; }
.ws-open { font: 600 1.1rem/1.4 ui-rounded, "Nunito", system-ui, sans-serif; padding: 12px 14px; border-radius: 18px; border: 2px solid #c9d3e3; background: #fff; resize: vertical; }
.ws-hoot { text-align: left; display: flex; gap: 10px; align-items: flex-start; max-width: 560px; margin: 0 auto; width: 100%; box-sizing: border-box; background: #fff7ed; border: 2px solid #fdba74; border-radius: 20px; padding: 12px 14px; color: #7c2d12; }
.ws-hoot-owl { font-size: 2rem; line-height: 1; }
.ws-hoot p { margin: 4px 0 0; font-size: 1.05rem; line-height: 1.4; }
.ws-help { text-align: center; max-width: 560px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.ws-help .kid-homework-help { border: 0; border-radius: 999px; font: inherit; font-size: 1rem; font-weight: 800; padding: 10px 16px; cursor: pointer; background: #ffedd5; color: #9a3412; }
.ws-more { gap: 14px; }
.ws-more .link { color: #1e293b; font-weight: 700; background: rgba(255,255,255,.75); border-radius: 999px; padding: 8px 14px; text-decoration: none; }
.ws-hint-btn { border: 0; border-radius: 999px; padding: 10px 18px; background: #fef3c7; color: #92400e; font: inherit; font-weight: 800; cursor: pointer; }
.ws-help .link { color: #0f2a4a; text-shadow: none; }
.ws-answers { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.ws-answer { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 8px 10px; border-radius: 12px; background: #f1f5f9; }
.ws-answer b { grid-row: span 2; color: #ea580c; }
.ws-answer-q { color: #475569; font-size: .95rem; }
.ws-answer-mine { font: 800 1.2rem/1.3 ui-rounded, "Nunito", system-ui, sans-serif; color: #14532d; }
.ws-answer.help .ws-answer-mine { color: #b45309; font-size: 1rem; }
.ws-answer.paper .ws-answer-mine { color: #0369a1; font-size: 1rem; }
.ws-parent { display: block; cursor: default; }
.ws-parent > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.ws-parent > summary::-webkit-details-marker { display: none; }
.ws-parent[open] > summary { margin-bottom: 8px; }
.ws-key { display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.ws-key small { display: block; }

/* 📇 Which calendar each thing is from: dots, legend, filters, and the details inside an event */
.src-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--src, #94a3b8); align-self: center; }
.src-dot.big { width: 14px; height: 14px; }
.cal-item .src-dot, .week-item .src-dot { margin-right: 2px; }
.cal-filters { display: flex; flex-direction: column; gap: 8px; }
.cal-filters:empty { display: none; }
.cal-legend { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.cal-legend::-webkit-scrollbar { display: none; }
.cal-legend-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .82rem; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border, #e2e8f0); background: var(--card, #fff); color: inherit; cursor: pointer; white-space: nowrap; }
.cal-legend-chip.on { border-color: var(--src-on, #2563eb); background: #eef4ff; font-weight: 700; }
.cal-filter-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cal-filter-select { width: auto; min-width: 0; max-width: 46vw; padding: 5px 8px; font-size: .85rem; border-radius: 10px; }
.cal-filters.filtering .cal-filter-select { border-color: #2563eb; }
.cal-legend .cal-manage { padding: 5px 9px; }
.cal-chip { box-shadow: inset 4px 0 0 var(--src, transparent); }
.cal-src-list { display: block; padding: 4px 14px; }
.cal-src-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.cal-src-row + .cal-src-row { border-top: 1px solid rgba(0,0,0,.08); }
.cal-src-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.src-box { border: 1px solid var(--border, #e2e8f0); border-radius: 14px; padding: 8px 12px; background: var(--card, #fff); }
.src-box > summary { cursor: pointer; display: flex; gap: 8px; align-items: center; font-size: .9rem; list-style: none; }
.src-box > summary::-webkit-details-marker { display: none; }
.src-box > summary::after { content: '›'; margin-left: auto; color: var(--muted); transition: transform .15s; }
.src-box[open] > summary::after { transform: rotate(90deg); }
.src-lines { display: grid; gap: 4px; margin: 10px 0 8px; font-size: .9rem; }
.src-line { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 8px; }
.src-history ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-size: .88rem; }
.src-history li { display: flex; flex-direction: column; padding-left: 10px; border-left: 3px solid #2563eb; }
.src-history li.from-source { border-left-color: #94a3b8; }
.edited-note { background: #fff7ed; border-color: #fdba74; }
.warn-text { color: #b45309; }
.feed-when { margin: 0; }
.scan-doc-dialog { max-width: min(96vw, 720px); padding: 12px; display: grid; gap: 10px; }
.scan-doc-dialog img { max-width: 100%; max-height: 75vh; object-fit: contain; border-radius: 10px; }
.toast.with-act { pointer-events: auto; display: flex; align-items: center; gap: 12px; width: max-content; max-width: 92vw; text-align: left; }
.toast-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast-act { font: inherit; font-weight: 800; background: none; border: 0; color: #93c5fd; cursor: pointer; padding: 4px 6px; text-decoration: underline; }
@media (prefers-color-scheme: dark) { .cal-legend-chip.on { background: #1e293b; } .edited-note { background: #3b2a12; } }
.toast.with-act { z-index: 60; bottom: calc(150px + env(safe-area-inset-bottom)); }

/* 🔔 Updates and notification setup */
.updates-btn { position: relative; margin-left: auto; font-size: 1.05rem; }
.updates-btn + .search-btn { margin-left: 6px; }
.updates-list { display: block; padding: 2px 10px; }
.update-row { display: flex; align-items: flex-start; gap: 4px; }
.update-row + .update-row { border-top: 1px solid rgba(0,0,0,.08); }
.update-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: start; text-align: left; font: inherit; color: inherit; background: none; border: 0; padding: 10px 2px; cursor: pointer; }
.update-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: transparent; }
.update-row.unread .update-dot { background: #2563eb; }
.update-row:not(.unread) .update-text b { font-weight: 600; opacity: .85; }
.update-text { display: flex; flex-direction: column; min-width: 0; }
.update-when { white-space: nowrap; }
.update-x { border: 0; background: none; color: var(--muted); font-size: 1.2rem; padding: 8px 6px; cursor: pointer; }
.notify-off-note { margin: 0; background: #fff7ed; }
.notify-dev { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.notify-dev + .notify-dev { border-top: 1px solid rgba(0,0,0,.08); }
.notify-dev-icon { font-size: 1.3rem; }
.notify-dev-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.notify-this { margin-left: 6px; font-size: .72rem; vertical-align: middle; }
.notify-dev-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.notify-dev-actions .btn { width: auto; }
.notify-arrived { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.notify-arrived .btn { width: auto; }
.notify-fix { background: #eff6ff; border-radius: 10px; padding: 8px 10px; }
.notify-group { display: block; margin-top: 6px; }
@media (prefers-color-scheme: dark) { .notify-off-note { background: #3b2a12; } .notify-fix { background: #1e293b; } }
@media (max-width: 420px) {
  .topbar .menu-btn { width: 34px; height: 34px; }
  .updates-btn + .search-btn { margin-left: 4px; }
  .topbar { gap: 6px; padding-left: 12px; padding-right: 12px; }
  .topbar h1 { min-width: 0; font-size: 1.25rem; }
  .topbar .whoami { flex-shrink: 0; }
}

/* 🧸 Fallback icon when an image won't load (the app lock logo uses it). */
.toy-img-none { width: 56px; height: 56px; flex: none; border-radius: 12px; background: var(--bg-soft); display: grid; place-items: center; font-size: 1.6rem; }

/* The title beside the pinned ✕ (and ✨) is at least as tall as those buttons, so the line under a
   short title ("📋 Chores") no longer runs under them. */
dialog:has(> .dialog-x) > :nth-child(2) > :first-child:is(h2, h3), dialog:has(> .dialog-x) > :nth-child(2):is(h2, h3) { min-height: 32px; }
/* 🧩 Puzzles: its own ✕ floats right; the ✨ floats beside it instead of sitting above the title. */
.puzzles-dialog > .cue-fab.cue-in-window { float: right; margin: 0 6px 6px 0; }

/* 📱 Narrow phones (360px Android and smaller) */
@media (max-width: 400px) {
  /* The name gives way instead of running under the 🔔. */
  .topbar h1 { font-size: 1.05rem; white-space: nowrap; overflow: hidden; }
  .topbar .whoami { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Times and dates side by side ("From / Until") show in full: "03:00 PM", not "03:00 PI". */
  input[type="time"], input[type="date"] { padding-left: 8px; padding-right: 4px; min-width: 0; }
}

/* 🎬 How-to video tiles: the cover shown clean (sharp, nothing over its title), name underneath. */
.vid-tile { aspect-ratio: auto; display: flex; flex-direction: column; background: var(--card); text-align: left; font: inherit; color: var(--ink); }
.vid-cover { position: relative; display: block; aspect-ratio: 720 / 1100; overflow: hidden; background: #e8eefb; }
.vid-tile .vid-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; image-rendering: auto; }
.vid-tile .vid-play, .vid-hero-thumb .vid-play { top: auto; left: auto; right: 8px; bottom: 8px; width: 34px; height: 34px; margin: 0; font-size: .85rem; }
.vid-tile .vid-name { position: static; display: flex; gap: 6px; align-items: flex-start; padding: 9px 10px 11px; color: var(--ink); font-size: .88rem; }
.vid-tile .vid-emoji { display: inline; font-size: 1rem; margin: 0; }

/* 📱 No surprise zooming on phones:
   - iPhones zoom in when you tap a box whose text is under 16px, so every box stays at 16px or more
     (a later, smaller style can't undo it).
   - A quick double tap no longer zooms the page; pinch-to-zoom still works for anyone who needs it. */
input, select, textarea { font-size: max(16px, 1em) !important; }
html { touch-action: manipulation; }

/* 📱 The App Store / Google Play app (html.native-app, from Capacitor): signed out, it's just the logo,
   one line and Log in / Create account. The website's landing page, tour, videos and FAQ stay on the website. */
html:not(.native-app) .native-start { display: none !important; }
html.native-app #auth-choose > :not(.native-start),
html.native-app .welcome > :not(.wordmark):not(.welcome-promise),
html.native-app [data-peek],
html.native-app #peek-bar { display: none !important; }
html.native-app .welcome { padding-top: 48px; }
html.native-app .native-start { max-width: 420px; width: 100%; margin: 8px auto 0; }
.whoami:empty { visibility: hidden; }
.noschool-clash strong { display: block; margin-bottom: 4px; }
.noschool-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; padding: 4px 0; font-weight: 500; color: var(--ink, inherit); }
.noschool-acts { gap: 6px; flex-wrap: wrap; }
.noschool-row .btn { flex: none; }

/* 🎨 Calm and consistent (Jason, 2026-10-10). Same palette, one meaning per color:
   blue = navigation and main actions, purple = ✨ Ask Cue, yellow = warnings and stars,
   green = done, kids' avatars stay colorful. Grown-up screens get white cards, light shadows
   and flat fills; kid mode (games, walls, star jar) keeps its color and depth on purpose. */
:root { --shadow: 0 1px 2px rgba(15, 39, 66, 0.05); --kt-shadow: 0 1px 2px rgba(15, 39, 66, .06); --cue: #7c3aed; --cue-soft: #f1eafe; }
html.dark { --cue: #a78bfa; --cue-soft: #2a1f47; }
/* Blue header and big blue buttons: one flat blue, no sheen. */
.topbar, .cta { background: var(--header-from); }
.cta-party { background: #e0457b; }
/* ✨ Ask Cue is always purple, flat. */
.cue-fab, .cue-fab.cue-in-window, .cue-fab:not(.cue-in-window):not(.cue-by-x) { background: var(--cue); box-shadow: 0 2px 6px rgba(76, 29, 149, .22); }
/* Tool icons: one flat tint of the tool's color, no gradient or glow. */
body:not(.in-kid-mode) .home-fav-icon, body:not(.in-kid-mode) .home-app-icon, #tools-dialog .tool-icon, .kt-icon {
  background: color-mix(in srgb, var(--tile-c) 26%, var(--card)); box-shadow: none; }
body:not(.in-kid-mode) .home-app.folder.builtin .folder-icon { background: color-mix(in srgb, var(--c) 34%, #fff) !important; box-shadow: none !important; }
html.dark body:not(.in-kid-mode) .home-app.folder.builtin .folder-icon { background: color-mix(in srgb, var(--c) 45%, #1e293b) !important; }
/* Kid chips on Today: white card, the avatar carries the color. */
.kid-launch-btn { background: var(--card); border: 1px solid var(--line); box-shadow: none; color: var(--text); }
html.dark .kid-launch-btn, :root[data-theme="dark"] .kid-launch-btn { background: var(--card); color: var(--text); }
/* Grown-up cards that used tinted gradients: white, with their color kept as the top/side stripe. */
.note-card, .joined-card, .beta-card, .hw-hero, .welcome-list li.welcome-star, .kx-feature, .testers-entry { background: var(--card); box-shadow: var(--shadow); }
.hw-hero { border-color: var(--line); }
.reward-card { background: var(--sun-soft); }
html.dark .reward-card, :root[data-theme="dark"] .reward-card { background: var(--sun-soft); }
.peek-btn, html.dark:not([data-theme="light"]) .peek-btn, :root[data-theme="dark"] .peek-btn { background: var(--sun-soft); }
.peek-btn:hover { background: color-mix(in srgb, var(--sun-soft) 80%, #f5a623); }
.vid-hero { background: var(--header-from); }
.cta.cta-help { background: #f5a623; }
/* Hub windows draw their own ✕ in the title row, so the pinned one stays hidden there and ✨ Ask Cue sits beside the real one. */
#folder-dialog:has(#folder-body > .row.between > button[aria-label="Close"]) > .dialog-x { display: none; }

/* 📖 Read my book: every word is a button; tap one for 🔊, parts to sound out, and 🦉 Hoot's meaning. */
.rp-tip { margin: 0; text-align: center; font-weight: 800; color: #4338ca; }
.rp-text p { margin: 0 0 .9em; }
.rp-word { all: unset; cursor: pointer; border-radius: 6px; padding: 0 1px; -webkit-tap-highlight-color: transparent; }
.rp-word:hover, .rp-word:focus-visible { background: #e0e7ff; }
.rp-word.tapped { text-decoration: underline dotted #a5b4fc 2px; text-underline-offset: 4px; }
.rp-word.on { background: #fde68a; color: #1f2937; }
.rp-help { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; width: min(calc(100% - 24px), 520px); max-height: 60vh; overflow: auto; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 10px; padding: 16px; background: #fff; color: #1f2937; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; border-radius: 22px; box-shadow: 0 10px 40px rgba(15,23,42,.3); border: 3px solid #c7d2fe; text-align: center; }
.kid-reader:has(.rp-help) { margin-bottom: 50vh; }
.rp-close { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: #64748b; }
.rp-word-big { font-family: Georgia, 'Iowan Old Style', serif; font-size: 2.4rem; font-weight: 700; line-height: 1.1; }
.rp-parts { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 1.5rem; font-weight: 800; color: #4338ca; }
.rp-parts[hidden] { display: none; }
.rp-part { background: #eef2ff; border-radius: 10px; padding: 2px 10px; }
.rp-dot { color: #94a3b8; }
.rp-say { border: 0; border-radius: 999px; padding: 10px 18px; background: #e0e7ff; color: #3730a3; font: inherit; font-weight: 800; cursor: pointer; }
.rp-help .ws-hoot .rp-say { margin-top: 8px; padding: 6px 14px; background: #ffedd5; color: #7c2d12; }
.rp-example { font-style: italic; }
/* ▶ Read along: the sentence being read gets a soft glow, the word being said lights up yellow. */
.ra-bar { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; margin: 0 0 14px; }
.ra-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.ra-row .kid-yes.ra-go { flex: 1 1 110px; max-width: 260px; width: auto; margin: 0; padding: 13px 18px; font-size: 1.15rem; background: #2563eb; box-shadow: 0 4px 12px rgba(37, 99, 235, .3); }
.ra-slow, .ra-stop { flex: 0 0 auto; border: 2px solid #bfdbfe; border-radius: 999px; padding: 10px 14px; background: #fff; color: #1e40af; font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer; }
.ra-slow.on { background: #dbeafe; border-color: #2563eb; }
.ra-note { margin: 8px 0 0; text-align: center; font-size: .9rem; color: #475569; }
.rp-word.ra-line { box-shadow: inset 0 -3px 0 #bfdbfe; border-radius: 0; }
.rp-word.rm-done { color: #15803d; }
.rp-word.rm-skip { color: #c2410c; box-shadow: inset 0 -3px 0 #fdba74; border-radius: 0; }
.rp-word.rm-stuck { animation: rm-pulse 1s ease-in-out infinite; }
.ra-row .ra-mic { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.ra-row .kid-yes.ra-go.rm-on { background: #dc2626; box-shadow: 0 4px 12px rgba(220, 38, 38, .3); }
@keyframes rm-pulse { 50% { box-shadow: 0 0 0 5px rgba(251, 191, 36, .55); border-radius: 6px; } }
@media (prefers-reduced-motion: reduce) { .rp-word.rm-stuck { animation: none; box-shadow: 0 0 0 3px #fbbf24; border-radius: 6px; } }
.rp-word.ra-on { background: #fde68a; color: #1f2937; box-shadow: 0 0 0 2px #fde68a; border-radius: 6px; }
.rp-row-words { color: #4338ca !important; }
@media (prefers-color-scheme: dark) {
  .rp-help { background: #1e293b; color: #f1f5f9; border-color: #4338ca; }
  .rp-part { background: #312e81; color: #e0e7ff; }
  .rp-parts { color: #c7d2fe; }
  .rp-tip { color: #a5b4fc; }
}

/* 🖥️ On a computer: KiddoCue looks like a website.
   Only in a regular browser, on a wide screen with a mouse or trackpad. The iPhone/iPad app
   (html.native-app), phones and touch tablets keep the app look exactly as it is. */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  /* Signed in: the tabs become a menu down the left side, and the page gets wider. */
  html:not(.native-app) body:has(#tabbar:not([hidden])) { --side: 232px; }
  html:not(.native-app) .tabbar {
    top: 58px; bottom: 0; right: auto; width: var(--side, 232px);
    display: flex; flex-direction: column; gap: 4px; padding: 18px 12px !important;
    border-top: 0; border-right: 1px solid var(--line); background: var(--card);
  }
  html:not(.native-app) .tabbar button {
    flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px;
    border-radius: 12px; font-size: 1rem; font-weight: 600; text-align: left; position: relative;
  }
  html:not(.native-app) .tabbar button:hover { background: var(--bg); }
  html:not(.native-app) .tabbar button.active { background: var(--primary-soft); }
  html:not(.native-app) .tabbar button.active .tab-ico { background: none; }
  html:not(.native-app) .tabbar button .tab-ico { width: 28px; height: 28px; }
  html:not(.native-app) .tabbar .badge { position: static; margin-left: auto; transform: none; }
  html:not(.native-app) body:has(#tabbar:not([hidden])) main#app { margin-left: var(--side); max-width: none; padding: 24px 40px 60px; }
  html:not(.native-app) main#app > .tab:not(#tab-week) { max-width: 860px; }
  html:not(.native-app) main#app > #tab-week { max-width: 1100px; margin: 0 auto; }
  html:not(.native-app) .cue-fab:not(.cue-in-window) { bottom: 28px; right: 28px; }

  /* Signed out: the front page as a website, with the words beside the app preview. */
  html:not(.native-app) #onboarding.screen { max-width: 1160px; padding: 0 40px 60px; }
  html:not(.native-app) #onboarding .welcome {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); column-gap: 64px; align-items: center;
    text-align: left; padding: 24px 0 36px;
  }
  html:not(.native-app) #onboarding .welcome > * { grid-column: 1; }
  html:not(.native-app) #onboarding .welcome-top { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 18px; }
  html:not(.native-app) #onboarding .welcome .peek { grid-column: 2; grid-row: 2 / span 6; margin: 0; max-width: 460px; justify-self: center; }
  html:not(.native-app) #onboarding .wordmark { justify-content: flex-start; }
  html:not(.native-app) #onboarding .welcome .welcome-promise { font-size: 2.9rem; max-width: 13em; margin: 10px 0 14px; }
  html:not(.native-app) #onboarding .welcome p { margin-left: 0; max-width: 34em; font-size: 1.12rem; }
  html:not(.native-app) #onboarding .who-for { justify-content: flex-start; }
  html:not(.native-app) #onboarding #auth-choose { max-width: 1160px; }
  html:not(.native-app) #onboarding #auth-choose > :not(.site-section):not(.native-start) { max-width: 460px; margin-left: auto; margin-right: auto; width: 100%; }
  html:not(.native-app) #onboarding .site-section { max-width: 1000px; margin-left: auto; margin-right: auto; padding-top: 40px; margin-top: 40px; }
  html:not(.native-app) #onboarding .site-section h2 { font-size: 2rem; }
  html:not(.native-app) #onboarding .features-all { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  html:not(.native-app) #onboarding .features-all > h2, html:not(.native-app) #onboarding .features-all > p { grid-column: 1 / -1; }
  html:not(.native-app) #onboarding .demo-row { overflow: visible; justify-content: center; gap: 20px; }
}
/* 🔒 Leaving kid mode with the account password (no grown-up code on this device). */
.off-pin-sheet .off-pin.off-pass { letter-spacing: normal; width: min(16em, 100%); font-size: 1.15rem; }
.off-pin-sheet .kid-pass-error, .kid-pass-error { min-height: 1.2em; margin: 6px 0 0; color: #b91c1c; font-weight: 700; }

/* ---------- 🧒 Simpler kids section (usability review + Jason, 2026-10-21) ---------- */
/* Kid mode sits on the app's own light blue (not its own sunny gradient or wallpapers). Always light,
   like before, so the kid colors and dark text stay readable. */
.kid-mode, .kid-mode[data-home="1"] { background: #e8f0fb; }
.kid-mode[data-home="1"]::before { display: none; }
/* Grown-up check and Ask a grown-up: the same light blue behind a white card. */
.kid-timeup { background: rgba(232, 240, 251, .97); }
.kid-timeup-card { box-shadow: 0 8px 28px rgba(15, 39, 66, .14); }

/* Kid home: four big doors, two by two. */
.kid-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 6px 4px 10px; }
.kid-door { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 150px; padding: 16px 10px;
  border: 0; border-radius: 26px; background: #fff; color: #0f2742; font: inherit; cursor: pointer; text-align: center;
  box-shadow: 0 1px 2px rgba(15, 39, 66, .06), inset 0 -5px 0 color-mix(in srgb, var(--c) 85%, #fff); transition: transform .15s; }
.kid-door:active, .kid-door.pop { transform: scale(.96); }
.kid-door:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; }
.kid-door-icon { position: relative; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 22px; font-size: 2.4rem;
  background: color-mix(in srgb, var(--c) 16%, #fff); }
.kid-door-name { font-size: 1.15rem; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.kid-door-line { font-size: .82rem; font-weight: 600; color: #475569; line-height: 1.25; }
.kid-next-wait .kid-next-go { cursor: default; }
.kid-next-wait .kid-next-text b { color: #64748b; }

/* 📚 Learning / 🎮 Fun / 🌈 World: labeled parts of big tiles, each in its own color. */
.kid-hub-h { margin: 10px 4px 2px; font-size: 1.05rem; font-weight: 900; text-align: left; color: #0f2742; }
.arc-tile.hub-tile, .arc-tile.hub-tile:nth-child(n) { background: var(--c); box-shadow: 0 2px 6px color-mix(in srgb, var(--c) 35%, transparent); }
.arc-tile.hub-tile small { font-weight: 700; opacity: .95; }
.arc-tile.hub-tile.is-locked { filter: saturate(.75); }
.arc-tile.hub-tile .school-badge { background: rgba(255, 255, 255, .92); color: #0f2742; border-radius: 999px; padding: 2px 8px; }

/* Grown-up Kids tab: 📲 Open <name>'s Kid Mode, first. */
.kx-handoff { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; border-radius: 18px;
  background: var(--primary, #3b5bdb); color: #fff; font: inherit; text-align: left; cursor: pointer; }
.kx-handoff:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary, #3b5bdb) 45%, #fff); outline-offset: 2px; }
.kx-handoff-icon { font-size: 1.7rem; }
.kx-handoff-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kx-handoff-text b { font-size: 1.05rem; }
.kx-handoff-text small { opacity: .9; }
.kx-handoff-go { font-size: 1.6rem; opacity: .8; }
.kx .kx-handoff, .kx .kx-handoff b, .kx .kx-handoff small { color: #fff; }
