/* Ward Family Hub: running low, meals, routines, kitchen display, info vault, update banner. */
label.chip { min-height: var(--tap); cursor: pointer; }
label.chip input { width: 20px; height: 20px; accent-color: #7C3AED; }
.for-line { font-size: .82rem; }

/* ── update banner ─────────────────────────────────────────── */
#update-banner { position: fixed; left: 12px; right: 12px; top: calc(var(--safe-t) + 8px); z-index: 200; display: flex; gap: 8px; justify-content: center; }
#update-banner .update-btn { flex: 0 1 460px; min-height: 48px; border: 0; border-radius: 999px; padding: 0 18px; font-weight: 700; color: #fff; background: var(--grad, #5B21B6); box-shadow: 0 10px 24px rgba(76,29,149,.35); }
#update-banner .update-x { width: 48px; min-height: 48px; border: 0; border-radius: 999px; background: var(--elev); color: var(--ink); box-shadow: var(--shadow); }

/* ── running low ────────────────────────────────────────────── */
.sup-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.sup-pill { padding: 8px 14px; border-radius: 999px; font-size: .92rem; background: var(--elev); box-shadow: var(--shadow); }
.sup-pill b { font-size: 1.1rem; margin-right: 2px; }
.sup-pill.low b { color: #B91C1C; } .sup-pill.due b { color: #9A3412; } .sup-pill.ok b { color: #15803D; }
html[data-theme="dark"] .sup-pill.low b { color: #FCA5A5; } html[data-theme="dark"] .sup-pill.due b { color: #FDBA74; } html[data-theme="dark"] .sup-pill.ok b { color: #86EFAC; }
.sup-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.card h3 + .sup-row { border-top: 0; }
.sup-emoji { font-size: 1.8rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--tone, #16A34A) 14%, var(--elev)); flex: none; }
.sup-main { flex: 1; min-width: 0; }
.sup-main strong { display: block; }
.sup-btns { display: flex; gap: 6px; flex: none; align-items: center; }
.sup-btns .btn { min-width: 56px; min-height: 48px; padding: 10px 12px; box-sizing: border-box; flex: none; }
.btn.sup-low { background: #FEF3C7; color: #7C2D12; border-color: #FCD34D; }
.btn.sup-out { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
.btn.sup-ok { background: #DCFCE7; color: #14532D; border-color: #86EFAC; }
html[data-theme="dark"] .btn.sup-low { background: #422006; color: #FDE68A; border-color: #92400E; }
html[data-theme="dark"] .btn.sup-out { background: #450A0A; color: #FECACA; border-color: #991B1B; }
html[data-theme="dark"] .btn.sup-ok { background: #052E16; color: #BBF7D0; border-color: #166534; }
.btn.sup-suggest { margin-top: 6px; min-height: var(--tap); font-size: .9rem; background: #FFF7ED; color: #7C2D12; border-color: #FDBA74; }
html[data-theme="dark"] .btn.sup-suggest { background: #431407; color: #FED7AA; border-color: #9A3412; }
.sup-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.sup-badge.ok { background: #DCFCE7; color: #14532D; } .sup-badge.low { background: #FEF3C7; color: #7C2D12; } .sup-badge.out { background: #FEE2E2; color: #991B1B; } .sup-badge.new { background: #EDE9FE; color: #4C1D95; }
.sup-row.due .sup-badge.ok { background: #FFEDD5; color: #7C2D12; }
.sup-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.sup-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sup-chip { padding: 6px 12px; border-radius: 999px; font-weight: 650; font-size: .92rem; background: #FEF3C7; color: #7C2D12; }
.sup-chip.out { background: #FEE2E2; color: #991B1B; } .sup-chip.due { background: #FFEDD5; color: #7C2D12; }
html[data-kid="true"] .sup-btns .btn { min-width: 72px; min-height: 52px; font-size: 1.1rem; }
html[data-kid="true"] .sup-emoji { width: 56px; height: 56px; font-size: 2.2rem; }
@media (max-width: 420px) { .sup-row { flex-wrap: wrap; } .sup-btns { width: 100%; padding-left: 54px; } .sup-btns .btn { flex: 1; } html[data-kid="true"] .sup-btns { padding-left: 0; } }

/* ── meals ──────────────────────────────────────────────────── */
.meal-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.meal-cta > div { flex: 1 1 220px; }
.meal-cta .btn { flex: 1 1 220px; }
.meal-slot { min-height: var(--tap); }
.meal-slot.breakfast { border-left: 4px solid #F59E0B; } .meal-slot.lunch { border-left: 4px solid #10B981; } .meal-slot.dinner { border-left: 4px solid #EC4899; }
.meal-slot.empty-slot div { color: var(--muted); }
.meal-day.is-today { box-shadow: 0 0 0 2px #EC4899 inset; }
.meal-day strong .pill-count { font-size: .75rem; }
.merge-list { list-style: none; margin: 8px 0; padding: 0; max-height: 50vh; overflow: auto; }
.merge-list li { padding: 8px 0; border-top: 1px solid var(--line); }
@media (min-width: 800px) { .meal-grid-3 { grid-template-columns: repeat(4, 1fr); } }

/* ── routines ───────────────────────────────────────────────── */
.rt-tabs { display: flex; gap: 8px; margin: 0 0 12px; }
.rt-tab { flex: 1; min-height: 52px; border-radius: 16px; border: 2px solid var(--line); background: var(--elev); color: var(--ink); font-weight: 700; font-size: 1.05rem; }
.rt-tab.morning[aria-pressed="true"] { background: linear-gradient(120deg, #FDE68A, #FDBA74); border-color: #F59E0B; color: #431407; }
.rt-tab.bedtime[aria-pressed="true"] { background: linear-gradient(120deg, #4338CA, #7C3AED); border-color: #4338CA; color: #fff; }
.rt-card { border-radius: 26px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); background: linear-gradient(160deg, #FFF7ED, #FDF2F8); color: #1F1235; }
.rt-card.bedtime { background: linear-gradient(160deg, #1E1B4B, #3B0764); color: #F5F3FF; }
.rt-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rt-bar { flex: 1; height: 18px; border-radius: 999px; background: rgba(124,58,237,.15); overflow: hidden; }
.rt-card.bedtime .rt-bar { background: rgba(255,255,255,.18); }
.rt-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #F59E0B, #EC4899, #8B5CF6); transition: width .5s; }
.rt-count { font-weight: 700; white-space: nowrap; font-size: .95rem; }
.rt-steps { display: grid; gap: 10px; }
@media (min-width: 640px) { .rt-steps { grid-template-columns: 1fr 1fr; } }
.rt-step { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 10px 14px; border-radius: 20px; border: 3px solid rgba(124,58,237,.25); background: #fff; color: #1F1235; text-align: left; font-size: 1.15rem; font-weight: 700; }
.rt-card.bedtime .rt-step { background: rgba(255,255,255,.1); color: #F5F3FF; border-color: rgba(255,255,255,.3); }
.rt-step .rt-emoji { font-size: 2.1rem; width: 52px; height: 52px; display: grid; place-items: center; flex: none; border-radius: 16px; background: #FEF3C7; }
.rt-card.bedtime .rt-step .rt-emoji { background: rgba(255,255,255,.15); }
.rt-step .rt-text { flex: 1; }
.rt-step .rt-check { width: 40px; height: 40px; border-radius: 50%; border: 3px solid currentColor; display: grid; place-items: center; font-size: 1.4rem; flex: none; opacity: .55; }
.rt-step.on { background: linear-gradient(120deg, #DCFCE7, #BBF7D0); border-color: #22C55E; color: #14532D; }
.rt-card.bedtime .rt-step.on { background: linear-gradient(120deg, #065F46, #047857); border-color: #34D399; color: #ECFDF5; }
.rt-step.on .rt-text { text-decoration: line-through; text-decoration-thickness: 3px; }
.rt-step.on .rt-check { background: #16A34A; color: #fff; border-color: #16A34A; opacity: 1; }
.rt-step.pending { border-style: dashed; }
.rt-step.pending .rt-check { border-style: dashed; opacity: 1; }
.rt-card .win-box { margin-top: 12px; }
html[data-kid="true"] .rt-step { min-height: 88px; font-size: 1.3rem; }
html[data-kid="true"] .rt-step .rt-emoji { width: 64px; height: 64px; font-size: 2.6rem; }
.rt-board { display: grid; gap: 8px; }
.rt-board-row { display: grid; grid-template-columns: 28px 1fr auto auto; align-items: center; gap: 8px; }
.rt-cell { min-height: var(--tap); min-width: 84px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--elev); color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; justify-content: center; }
.rt-cell.done { background: #DCFCE7; color: #14532D; border-color: #86EFAC; }
html[data-theme="dark"] .rt-cell.done { background: #052E16; color: #BBF7D0; border-color: #166534; }
.rt-cell.none { color: var(--muted); }
.rt-edit-row, .vault-edit-row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.rt-edit-row input, .vault-edit-row input, .vault-edit-row select { min-height: var(--tap); border-radius: 10px; border: 1px solid var(--line); background: var(--bg); padding: 0 10px; min-width: 0; }
.rt-edit-row input.rt-e { width: 56px; text-align: center; font-size: 1.3rem; flex: none; }
.rt-edit-row input:not(.rt-e) { flex: 1; }
.vault-edit-row { flex-wrap: wrap; }
.vault-edit-row input[name^=l] { flex: 1 1 110px; }
.vault-edit-row select { flex: 0 1 140px; }
.vault-edit-row input[name^=v] { flex: 2 1 180px; }

/* ── info vault ─────────────────────────────────────────────── */
.vault-warn { font-size: .95rem; }
.vault-cat { margin-bottom: 12px; }
.vault-cat h3 .vault-add { margin-left: auto; min-height: var(--tap); padding: 0 12px; }
.vault-entry { padding: 10px 0; border-top: 1px solid var(--line); }
.card h3 + .vault-entry { border-top: 0; }
.vault-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.vault-head strong { flex: 1; min-width: 0; }
.chip.mini { min-height: 26px; font-size: .78rem; padding: 0 8px; background: color-mix(in srgb, var(--chip) 18%, var(--elev)); border-color: transparent; }
.vault-field { display: grid; gap: 2px; padding: 6px 0; }
.vault-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.vault-val { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vault-val > :first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.vault-link { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 650; text-decoration: none; }
.vault-text { padding: 10px 0; }
.vault-secret { min-height: var(--tap); border: 1px dashed var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); padding: 0 12px; text-align: left; display: inline-flex; align-items: center; gap: 8px; }
.vault-dots { letter-spacing: .15em; font-weight: 700; }
.vault-shown { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
.vault-copy { min-height: var(--tap); padding: 0 12px; flex: none; }
.vault-notes { white-space: pre-wrap; }
.vault-err { color: var(--danger); font-weight: 650; min-height: 1em; }

/* ── kitchen display ────────────────────────────────────────── */
body.kitchen-on { overflow: hidden; }
body.kitchen-on .app-header, body.kitchen-on .top-nav, body.kitchen-on main, body.kitchen-on .bottom-nav, body.kitchen-on .fab, body.kitchen-on #changes-banner { display: none !important; }
#kitchen { position: fixed; inset: 0; z-index: 150; overflow: auto; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.kd { --kd-bg: #FFF8F1; --kd-card: #FFFFFF; --kd-ink: #1F1235; --kd-muted: #5B4F73; --kd-line: #EDE3F6;
  min-height: 100%; padding: calc(var(--safe-t, 0px) + 12px) 16px calc(var(--safe-b, 0px) + 12px); background: radial-gradient(900px 400px at 100% -10%, #FBCFE8, transparent 60%), radial-gradient(700px 360px at -10% 0%, #FDE68A, transparent 60%), var(--kd-bg); color: var(--kd-ink);
  display: flex; flex-direction: column; gap: 14px; font-size: 18px; }
.kd[data-night="true"] { --kd-bg: #0B0A18; --kd-card: #17142B; --kd-ink: #EDE9FE; --kd-muted: #B7AED6; --kd-line: #2C2650;
  background: radial-gradient(900px 400px at 100% -10%, rgba(124,58,237,.25), transparent 60%), var(--kd-bg); }
.kd-top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.kd-clock { font-size: 88px; font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kd-clock small { font-size: 30px; margin-left: 8px; font-weight: 700; color: var(--kd-muted); }
.kd-date { font-size: 28px; font-weight: 700; line-height: 1.2; }
.kd-sub { font-size: 18px; color: var(--kd-muted); font-weight: 600; }
.kd-wx { margin-left: auto; display: flex; align-items: center; gap: 12px; background: var(--kd-card); border-radius: 22px; padding: 10px 16px; box-shadow: 0 8px 24px rgba(76,29,149,.12); max-width: 420px; }
.kd-wx-i { font-size: 52px; }
.kd-wx-t { font-size: 40px; font-weight: 800; line-height: 1; }
.kd-wx-t small { font-size: 20px; font-weight: 700; color: var(--kd-muted); }
.kd-wx-s { font-size: 17px; color: var(--kd-muted); margin-top: 4px; }
.kd-grid { flex: 1; display: grid; grid-template-columns: 1.5fr 1fr; grid-template-rows: auto auto; gap: 14px; }
.kd-card { background: var(--kd-card); border-radius: 24px; padding: 14px 18px; box-shadow: 0 8px 24px rgba(76,29,149,.10); border-top: 8px solid var(--t, #7C3AED); min-width: 0; }
.kd-card h2 { margin: 0 0 8px; font-size: 24px; }
.kd-events { grid-row: span 2; --t: #7C3AED; }
.kd-chores { --t: #16A34A; } .kd-dinner { --t: #F59E0B; } .kd-low { --t: #DC2626; grid-column: 1 / -1; }
.kd-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.kd-person { border-radius: 18px; padding: 10px 12px; background: color-mix(in srgb, var(--m) 12%, var(--kd-card)); border-left: 6px solid var(--m); }
.kd-name { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; margin-bottom: 4px; }
.kd-person ul, .kd-list { list-style: none; margin: 0; padding: 0; }
.kd-person li { padding: 5px 0; font-size: 19px; font-weight: 600; line-height: 1.25; }
.kd-time { display: block; font-size: 15px; color: var(--kd-muted); font-weight: 700; }
.kd-list li { padding: 6px 0; font-size: 20px; font-weight: 600; border-top: 1px solid var(--kd-line); }
.kd-list li:first-child { border-top: 0; }
.kd-list li.done { color: var(--kd-muted); text-decoration: line-through; }
.kd-list small, .kd-chips small { color: var(--kd-muted); font-weight: 700; margin-left: 6px; font-size: 15px; }
.kd-routines { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.kd-rt { padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, #F59E0B 16%, var(--kd-card)); font-size: 18px; font-weight: 700; }
.kd-rt.done { background: color-mix(in srgb, #16A34A 20%, var(--kd-card)); }
.kd-big { font-size: 32px; font-weight: 800; margin: 4px 0; line-height: 1.15; }
.kd-small { font-size: 16px; color: var(--kd-muted); margin: 0; }
.kd-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.kd-chips li { padding: 10px 16px; border-radius: 999px; font-size: 22px; font-weight: 700; background: #FEF3C7; color: #7C2D12; }
.kd-chips li.out { background: #FEE2E2; color: #991B1B; } .kd-chips li.due { background: #FFEDD5; color: #7C2D12; }
.kd-chips li small { color: inherit; opacity: .75; }
.kd-empty { color: var(--kd-muted); font-size: 20px; margin: 4px 0; }
.kd-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--kd-muted); font-size: 15px; }
.kd-exit { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 44px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--kd-line); background: var(--kd-card); color: var(--kd-ink); font-weight: 700; font-size: 16px; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.kd-ring { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: color-mix(in srgb, #7C3AED 45%, transparent); pointer-events: none; z-index: 0; }
.kd-exit.holding .kd-ring { width: 100%; transition: width var(--kd-hold, 1s) linear; }
.kd-exit-label { position: relative; z-index: 1; }
.kd-pin { position: fixed; inset: 0; background: rgba(15,10,35,.6); display: grid; place-items: center; z-index: 5; }
.kd-pin-box { background: var(--kd-card); color: var(--kd-ink); border-radius: 24px; padding: 20px; width: min(360px, 90vw); }
.kd-pin-box h2 { margin: 0 0 10px; }
.kd-pin-box input { width: 100%; min-height: 56px; font-size: 28px; text-align: center; letter-spacing: .3em; border-radius: 14px; border: 2px solid var(--kd-line); background: var(--kd-bg); color: var(--kd-ink); }
.kd-pin-msg { color: #DC2626; min-height: 1.2em; font-weight: 700; }
@media (max-width: 760px) { .kd-grid { grid-template-columns: 1fr; } .kd-events { grid-row: auto; } .kd-clock { font-size: 64px; } .kd-wx { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .kd-exit.holding .kd-ring { transition: width var(--kd-hold, 1s) linear; } }

/* ── reward / savings-goal product picture ──────────────────── */
.goal-card { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; margin: 10px 0 12px; background: var(--elev); box-shadow: 0 0 0 2px color-mix(in srgb, #22C55E 35%, transparent) inset, var(--shadow); }
.prize-card { box-shadow: 0 0 0 2px color-mix(in srgb, #F59E0B 40%, transparent) inset, var(--shadow); }
.goal-img { display: block; width: 100%; aspect-ratio: 4 / 3; max-height: 320px; object-fit: contain; background: #fff; border-bottom: 1px solid var(--line); }
.goal-img-missing { display: grid; place-items: center; font-size: 3rem; background: var(--bg-2); }
.goal-card-body { padding: 12px 14px 14px; display: grid; gap: 8px; }
.goal-card-body .prize-line { margin: 0; }
.goal-card-head { display: flex; align-items: center; gap: 8px; }
.goal-card-head strong { flex: 1; font-size: 1.08rem; }
.goal-bar.big { height: 20px; margin: 0; }
.goal-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.btn.see-it { background: var(--grad); color: #fff; border: 0; text-decoration: none; min-height: var(--tap); padding: 0 18px; box-shadow: 0 6px 16px rgba(157,23,77,.25); }
html[data-kid="true"] .btn.see-it { font-size: 1.15rem; min-height: 56px; padding: 0 22px; }
html[data-kid="true"] .goal-img { max-height: 380px; }
.pp { border: 1px dashed var(--line); border-radius: 16px; padding: 10px 12px 12px; margin: 0 0 12px; }
.pp legend { padding: 0 6px; }
.pp-row { display: flex; gap: 8px; }
.pp-row input { flex: 1; min-width: 0; min-height: var(--tap); border-radius: 12px; border: 1px solid var(--line); background: var(--bg); padding: 0 12px; }
.pp-row .btn { flex: none; }
.pp-msg { min-height: 1.2em; margin: 4px 0 8px; }
.pp-preview { display: grid; place-items: center; min-height: 120px; border-radius: 14px; background: var(--bg-2); overflow: hidden; margin-bottom: 10px; }
.pp-preview img { width: 100%; max-height: 220px; object-fit: contain; background: #fff; display: block; }
.pp-empty { color: var(--muted); font-weight: 600; }
.pp-file { cursor: pointer; }
.pp-file:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ── allowance & missed chores ──────────────────────────────── */
.al-form fieldset { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.al-form legend { margin-bottom: 6px; }
.al-form label.chip { margin: 0 6px 10px 0; }
.al-form label.chip input[type=radio] { width: 20px; height: 20px; accent-color: #7C3AED; }
.al-h { margin: 14px 0 8px; font-size: 1rem; }
.week-box .remind-line, .remind-line { background: #FEF3C7; color: #7C2D12; border-radius: 12px; padding: 8px 12px; margin: 0 0 8px; font-weight: 600; }
html[data-theme="dark"] .remind-line { background: #422006; color: #FDE68A; }
.remind-line.sm { font-size: .88rem; padding: 6px 10px; margin: 6px 0 0; }
.deduct-row { align-items: center; }
.deduct-row .amt { margin-left: auto; }
.btn.undo-btn { min-height: var(--tap); padding: 0 12px; margin-left: 8px; background: #EDE9FE; color: #4C1D95; border-color: #C4B5FD; }
html[data-theme="dark"] .btn.undo-btn { background: #2E1065; color: #DDD6FE; border-color: #6D28D9; }
html[data-kid="true"] .week-box .deduct-row { font-size: 1.05rem; }
/* ── Demo mode ─────────────────────────────────────────────────────────── */
.demo-try { padding: 12px; background: linear-gradient(135deg, #FEF3C7, #FCE7F3); border: 2px solid #F59E0B; }
.demo-try .event-meta { margin: 8px 2px 0; color: #4A3B12; }
.btn.demo-btn { background: #B45309; color: #fff; border-color: transparent; text-decoration: none; font-size: 1.15rem; }
.btn.demo-btn:hover, .btn.demo-btn:focus-visible { background: #92400E; }
#demo-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; background: #FEF3C7; color: #3B2A05; border-bottom: 2px solid #F59E0B; font-size: .92rem; }
#demo-banner p { margin: 0; flex: 1 1 200px; }
#demo-banner .demo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#demo-banner .btn { min-height: 44px; padding: 6px 12px; background: #fff; color: #3B2A05; border-color: #B45309; }
#demo-banner .btn.primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
body.gated #demo-banner { display: none; }
.sync-pill.demo::before { background: #F59E0B; }
.demo-card { border: 2px solid #F59E0B; }
.demo-note { margin-top: 8px; }
[data-theme="dark"] #demo-banner { background: #3B2A05; color: #FEF3C7; }
[data-theme="dark"] #demo-banner .btn { background: #1F1A10; color: #FEF3C7; border-color: #F59E0B; }
[data-theme="dark"] #demo-banner .btn.primary { background: #F59E0B; color: #1F1A10; }
[data-theme="dark"] .demo-try { background: linear-gradient(135deg, #3B2A05, #3B0A2A); }
[data-theme="dark"] .demo-try .event-meta { color: #FDE68A; }

/* ── v11: directions, leave-by, heads-ups, kid voice, pickup board, memory jar, smart shopping, recap, email import ── */
.btn.dir-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; min-height: 44px; }
.btn.dir-btn.sm { min-height: 40px; padding: 6px 12px; font-size: .95rem; }
.ev-dir { margin: 4px 0 10px 56px; display: flex; gap: 8px; flex-wrap: wrap; }
.kd-dir { margin-left: 8px; text-decoration: none; font-size: 1.1em; display: inline-block; min-width: 32px; min-height: 32px; text-align: center; }
.ev-where { margin: 10px 0 14px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); }
.ev-where-line { margin: 0 0 8px; font-weight: 600; overflow-wrap: anywhere; }
.osm-map { display: block; width: 100%; height: 170px; border: 0; border-radius: 12px; margin-top: 10px; background: var(--bg); }
.osm-credit { margin: 4px 0 0; font-size: .8rem; }
.leave-line { margin: 8px 0 0; font-weight: 600; }
.leave-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.leave-row:first-of-type { border-top: 0; }
.leave-txt { flex: 1 1 200px; min-width: 0; }
.heads-up .hu-line { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; font-weight: 600; }
.hu-icon { font-size: 1.4rem; line-height: 1.2; }
.voice-card { text-align: center; }
.voice-mic { width: 100%; min-height: 120px; border: 0; border-radius: 24px; background: linear-gradient(135deg, #7C3AED, #DB2777); color: #fff; font-size: 1.35rem; font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; box-shadow: 0 6px 18px rgba(124,58,237,.3); }
.voice-mic.listening { animation: wfhPulse 1.1s ease-in-out infinite; }
@keyframes wfhPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .voice-mic.listening { animation: none; outline: 4px solid #FBBF24; } }
.voice-emoji { font-size: 3rem; line-height: 1; }
.voice-hint { margin: 10px 0 0; color: var(--muted); }
.voice-confirm { text-align: center; }
.voice-heard { color: var(--muted); font-style: italic; }
.voice-big { font-size: 5rem; line-height: 1.1; margin: 8px 0; }
.voice-label { font-size: 1.5rem; font-weight: 800; margin: 0 0 14px; }
.btn.voice-yes { width: 100%; min-height: 72px; font-size: 1.6rem; font-weight: 800; }
.voice-others { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.btn.voice-alt { min-height: 48px; }
.ho-nav { align-items: center; justify-content: space-between; margin: 10px 0; }
.ho-day { margin-top: 12px; }
.ho-day.today { outline: 2px solid var(--accent); }
.ho-kid { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.ho-kid:first-of-type { border-top: 0; }
.ho-name { font-weight: 700; min-width: 54px; }
.ho-legs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1 1 220px; }
.ho-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ho-leg { font-size: .85rem; color: var(--muted); }
.ho-cell select { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: inherit; padding: 4px 8px; font: inherit; }
.btn.ho-swap { min-height: 40px; padding: 4px 10px; font-size: .9rem; }
.ho-pend { font-size: .85rem; color: #B45309; font-weight: 700; }
.ho-today { display: flex; align-items: center; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
.swap-alert { margin: 10px 0 0; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.swap-row { gap: 8px; flex-wrap: wrap; }
.mem { margin: 0; border-radius: 14px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.mem img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg); }
.mem figcaption { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; position: relative; padding-right: 44px; }
.mem.big { margin: 8px 0; }
.mem-del { position: absolute; right: 4px; top: 4px; }
.mem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mem-pick { width: 100%; justify-content: center; }
.mem-prev img { display: block; max-width: 100%; max-height: 260px; margin: 10px auto; border-radius: 12px; }
.smart-shop .sg-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip.sg-chip { min-height: 44px; }
.chip.sg-chip small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.aisle-order { list-style: none; padding: 0; margin: 10px 0; }
.aisle-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin: 6px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); touch-action: none; user-select: none; }
.aisle-item.dragging { opacity: .7; outline: 2px dashed var(--accent); }
.aisle-item .drag { cursor: grab; font-size: 1.3rem; padding: 4px 8px; color: var(--muted); }
.aisle-txt { flex: 1; font-weight: 600; }
.ov-line { margin: 6px 0; }
.ov-line.conflict { color: #B91C1C; font-weight: 600; }
.rc-person { padding: 8px 0; border-top: 1px solid var(--line); }
.rc-person:first-of-type { border-top: 0; }
.rc-person summary { cursor: pointer; display: flex; align-items: center; gap: 6px; min-height: 40px; }
.rc-person ul { margin: 6px 0 0; padding-left: 22px; }
.rc-kid { padding: 8px 0; border-top: 1px solid var(--line); }
.rc-kid:first-of-type { border-top: 0; }
.rc-goal { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: .95rem; }
.rc-goal .bar { display: inline-block; width: 90px; height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.rc-goal .bar i { display: block; height: 100%; background: #16A34A; }
.pend-row { gap: 8px; flex-wrap: wrap; }
.email-card { margin-top: 12px; }
.email-card .btn.big { width: 100%; }
html[data-theme="dark"] .ho-pend { color: #FCD34D; }
html[data-theme="dark"] .ov-line.conflict { color: #FCA5A5; }

/* v12: recurring events, Google Calendar copies, admin roles */
.gcal-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #E8F0FE; color: #174EA6; vertical-align: middle; }
[data-theme="dark"] .gcal-badge { background: #1E3A8A; color: #DBEAFE; }
.repeat-badge { color: var(--muted); font-size: .85rem; margin-left: 2px; }
.series-note { background: var(--surface-2, rgba(91,33,182,.07)); border-radius: 10px; padding: 8px 10px; margin: 0 0 10px; font-size: .92rem; }
.inline-unit { display: flex; align-items: center; gap: 8px; }
.inline-unit input { max-width: 6em; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent, #5B21B6); text-decoration: underline; font: inherit; cursor: pointer; min-height: 0; }
.choose-row { flex-wrap: wrap; }
.danger-zone { border: 2px solid #B91C1C; }
.role-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.gcal-status { font-size: .9rem; }

.rt-step.has-photo { flex-wrap: wrap; }
.rt-step .rt-pic { width: 100%; height: 140px; object-fit: cover; border-radius: 16px; display: block; }
.rt-steps.picture-first { grid-template-columns: 1fr; }
@media (min-width: 640px) { .rt-steps.picture-first { grid-template-columns: 1fr 1fr; } }
.rt-steps.picture-first .rt-step { flex-direction: column; align-items: stretch; min-height: 180px; }
.rt-steps.picture-first .rt-emoji, .rt-steps.picture-first .rt-pic { width: 100%; height: 140px; font-size: 4rem; border-radius: 16px; }
.rt-edit-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rt-edit-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; }

/* +/- steppers on star and money fields */
.num-stepper { display: flex; align-items: center; gap: 8px; max-width: 280px; }
.num-stepper-btn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; border-radius: 12px; border: 2px solid var(--line, #D1D5DB); background: var(--surface, #fff); font-size: 1.4rem; font-weight: 700; line-height: 1; cursor: pointer; }
.num-stepper-btn:focus-visible { outline: 3px solid var(--accent, #5B21B6); outline-offset: 2px; }
.num-stepper input[type=number] { flex: 1; min-width: 0; text-align: center; font-size: 1.15rem; font-weight: 700; height: 44px; }
.num-stepper-prefix { font-weight: 700; color: var(--muted, #6B7280); }
.earn-preview { background: #ECFDF5; color: #065F46; border-radius: 12px; padding: 10px 12px; font-weight: 650; margin: 0 0 8px; }
[data-theme="dark"] .earn-preview { background: #064E3B; color: #D1FAE5; }
.rt-tab.afterschool { --tab: #0EA5E9; }

/* Reading games (School view). Original in-page play; emoji/CSS only. */
.rg-card { margin-top: 14px; }
.rg-lobby, .rg-choices, .rg-pics, .rg-bank { display: grid; gap: 10px; }
.rg-lobby { grid-template-columns: 1fr; }
.rg-game-btn, .rg-choice, .rg-tile, .rg-slot, .rg-back, .rg-pic-choice {
  min-height: 44px; min-width: 44px;
}
.rg-game-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left; padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink);
  font: inherit; cursor: pointer;
}
.rg-game-btn strong { font-size: 1.05rem; }
.rg-toolbar { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
.rg-prompt { font-size: 1.15rem; font-weight: 650; color: var(--ink); margin: 0 0 12px; line-height: 1.35; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rg-word { font-size: 1.4rem; letter-spacing: .02em; }
.rg-pic { font-size: 3rem; line-height: 1; }
.rg-choices { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
.rg-choice, .rg-tile, .rg-slot {
  display: grid; place-items: center; border-radius: 16px;
  border: 2px solid var(--line); background: var(--elev); color: var(--ink);
  font: inherit; font-weight: 800; font-size: 1.25rem; cursor: pointer; padding: 8px;
}
.rg-bubble { border-radius: 999px; background: color-mix(in srgb, #93C5FD 35%, var(--elev)); }
.rg-pic-choice { min-height: 88px; }
.rg-slots { display: flex; gap: 10px; justify-content: center; margin: 0 0 14px; }
.rg-slot { width: 64px; height: 64px; font-size: 1.6rem; text-transform: uppercase; background: var(--bg-2); }
.rg-slot.filled { background: color-mix(in srgb, #FDE68A 70%, var(--elev)); }
.rg-bank { grid-template-columns: repeat(6, minmax(44px, 1fr)); justify-items: center; }
.rg-tile.is-empty { min-height: 44px; visibility: hidden; }
.rg-play.is-shake .rg-choices, .rg-play.is-shake .rg-build { animation: rg-shake .4s ease; }
.rg-play.is-correct .rg-choice, .rg-play.is-correct .rg-slot.filled { border-color: #16A34A; box-shadow: 0 0 0 2px #86EFAC; }
@keyframes rg-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .rg-play.is-shake .rg-choices, .rg-play.is-shake .rg-build { animation: none; outline: 2px solid #B45309; border-radius: 16px; }
}
@media (min-width: 600px) {
  .rg-lobby { grid-template-columns: 1fr 1fr; }
  .rg-game-btn, .rg-choice, .rg-tile, .rg-slot, .rg-back, .rg-pic-choice { min-height: 64px; min-width: 64px; }
  .rg-bank { grid-template-columns: repeat(6, minmax(64px, 1fr)); }
  .rg-pic { font-size: 4rem; }
}
html[data-theme="dark"] .rg-bubble { background: color-mix(in srgb, #1D4ED8 35%, var(--elev)); }
html[data-theme="dark"] .rg-slot.filled { background: color-mix(in srgb, #92400E 50%, var(--elev)); }

.rg-level { margin: 4px 0 0; font-weight: 800; color: var(--ink); }
.rg-level-up { margin: 0 0 8px; font-size: 1.25rem; font-weight: 800; color: #B45309; }
html[data-theme="dark"] .rg-level-up { color: #FCD34D; }
.rg-start { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.rg-start-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.rg-start-btn {
  min-height: 44px; min-width: 44px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink);
  font: inherit; font-weight: 700; cursor: pointer;
}
.rg-start-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--brand) 16%, var(--elev)); border-color: var(--brand); color: var(--brand); }
.rg-sentence { font-weight: 650; }
.rg-blank { display: inline-block; min-width: 3ch; border-bottom: 2px solid var(--ink); }
.rg-slots { flex-wrap: wrap; }
@media (min-width: 600px) {
  .rg-start-btn { min-height: 64px; min-width: 64px; }
}

.rt-time, input.rt-time { flex: none; min-width: 7.5rem; font-variant-numeric: tabular-nums; }
.rt-step .rt-time { display: block; font-weight: 800; font-size: .85rem; opacity: .85; }
.run-time { margin: 0; font-weight: 800; }
.rt-days { border: 0; padding: 0; margin: 0 0 12px; }
.rt-day-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-template { margin: 0 0 16px; }
.rt-tpl-preview { margin: 12px 0; }
.rt-tpl-preview ul { margin: 0 0 12px; padding-left: 1.2em; }
@media (min-width: 600px) {
  input.rt-time { min-height: 64px; }
}

/* Keep the activity text readable at 390px; time and seconds stay on the row. */
.rt-edit-row input[name^="t"] { flex: 1 1 160px; min-width: 140px; }
.rt-edit-row input.rt-time { flex: 0 0 auto; width: 7.8rem; min-width: 7.5rem; }
.rt-edit-row input.rt-sec { flex: 0 0 auto; width: 4.2rem; min-width: 3.6rem; }
.rt-edit-row .icon-btn { flex: none; }

.rt-other-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.rt-other-row + .rt-other-row { border-top: 1px solid var(--line); }

.member-pick-label { margin: 12px 0 6px; font-weight: 650; }
.push-ready { margin: 8px 0 0; }
