/* ---------- calm pastel neumorphism (loaded last) ----------
   Surfaces sit on the same warm ivory as the page and are lifted by a soft light/shadow pair (--raise);
   inputs and "on" states are pressed in (--press). Colour comes from pastel fills, never from borders. */

body { background: var(--bg); font-size: 15.5px; }
h1 { font-size: 2rem; letter-spacing: -.015em; }

/* shell */
.side { background: var(--bg); border-right: 0; padding: 22px 16px; }
.logo .dot { border-radius: 14px; color: var(--brand-ink); box-shadow: var(--raise-sm); }
.nav { display: grid; gap: 4px; }
.nav a { border-radius: 16px; padding: 11px 14px; }
.nav a:hover { background: var(--surface); box-shadow: var(--raise-sm); color: var(--ink); }
.nav a.on { background: var(--surface); color: var(--brand-strong); box-shadow: var(--press); }
.nav a .icon { color: var(--muted); } .nav a.on .icon, .nav a:hover .icon { color: var(--brand-strong); }
.kid-switch { border-bottom: 0; }
.kid-switch .cur { border-radius: 18px; }
.kid-switch .cur:hover { background: var(--surface); box-shadow: var(--raise-sm); }
.theme-btn { border: 0; background: var(--surface); box-shadow: var(--raise-sm); }
.theme-btn:hover { box-shadow: var(--press); }

/* surfaces */
.card { background: var(--surface); border: 0; border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--raise); }
.card.flat { box-shadow: var(--press); background: var(--surface-2); }
.grid { gap: 20px; }
.hero { box-shadow: var(--raise); }
.tile { padding: 0; }
.tile:hover { transform: translateY(-3px); }
.tile .thumb { background: var(--surface-2); }
.empty { box-shadow: var(--press); background: var(--surface-2); }
.page-head h1 { margin-bottom: 4px; }

/* buttons: raised, press in when tapped */
.btn { border: 0; box-shadow: var(--raise-sm); padding: 10px 18px; transition: box-shadow .15s ease, transform .1s ease; }
.btn:hover { filter: none; transform: translateY(-1px); }
.btn:active { box-shadow: var(--press); transform: none; }
.btn.lg { padding: 14px 24px; }
.btn.ghost { background: var(--surface); color: var(--brand-strong); border: 0; }
.btn.ghost:hover { background: var(--surface); }
.btn.soft { background: var(--mint); color: var(--brand-strong); }
.btn.danger { background: var(--blush); color: var(--err); }
.link-btn { color: var(--brand-strong); }

/* inputs: pressed wells */
input, select, textarea { background: var(--surface-2); border: 0; box-shadow: var(--press); border-radius: var(--radius-sm); padding: 11px 14px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 2px; }
input[type=checkbox], input[type=radio] { box-shadow: none; width: auto; accent-color: var(--brand); }
fieldset { border: 0; background: var(--surface-2); box-shadow: var(--press); border-radius: var(--radius); }
details.more { border: 0; background: var(--surface-2); box-shadow: var(--press); border-radius: 18px; padding: 12px 16px; }

/* choices, chips, segmented */
.choice { border: 0; background: var(--surface); box-shadow: var(--raise-sm); border-radius: 20px; }
.choice:hover { border: 0; }
.choice:has(input:checked) { border: 0; background: var(--mint); box-shadow: var(--press); }
.choice .tick { border: 0; background: var(--surface); box-shadow: var(--press); }
.choice:has(input:checked) .tick, .show-pick:has(input:checked) .tick { background: var(--brand); color: var(--brand-ink); box-shadow: none; }
.show-pick { border: 0; background: var(--surface); box-shadow: var(--raise-sm); border-radius: 20px; }
.show-pick:has(input:checked) { background: var(--mint); box-shadow: var(--press); }
.chip { border: 0; background: var(--surface); box-shadow: var(--raise-sm); }
.chip:has(input:checked) { background: var(--mint); box-shadow: var(--press); }
.seg { background: var(--surface-2); box-shadow: var(--press); padding: 4px; }
.seg label:has(input:checked) { background: var(--surface); box-shadow: var(--raise-sm); }
.game-picks label { border: 0; background: var(--surface); box-shadow: var(--raise-sm); }
.game-picks label:has(input:checked) { background: var(--mint); box-shadow: var(--press); }
.pick { border: 0; background: var(--surface); box-shadow: var(--raise-sm); }
.pick:has(input:checked) { background: var(--mint); box-shadow: var(--press); }
.tags .tag { background: var(--mint); color: var(--brand-strong); }
.tags .tag:nth-child(2) { background: var(--sky); color: var(--ink); } .tags .tag:nth-child(3) { background: var(--peach); color: var(--ink); }

/* status + banners: pastel fills */
.pill { box-shadow: none; }
.pill::before { opacity: .55; }
.banner { border-radius: 18px; box-shadow: var(--raise-sm); }
.banner.work { background: var(--sky); color: var(--ink); }
.banner.warn { background: var(--butter); color: var(--ink); }
.banner.err { background: var(--blush); color: var(--err); }
.reassure { background: var(--mint); color: var(--brand-strong); border-radius: 16px; }
.bar { background: var(--surface-2); box-shadow: var(--press); height: 10px; }
mark { background: var(--butter); color: var(--ink); }

/* steps */
.steps-bar span { background: var(--surface-2); box-shadow: var(--press); height: 8px; }
.steps-bar span.done { background: var(--brand); box-shadow: none; }
.steps-bar span.now { background: var(--butter); box-shadow: var(--raise-sm); }
.stepper .st { border: 0; background: var(--surface); box-shadow: var(--raise-sm); }
.stepper .st.on { background: var(--mint); box-shadow: var(--press); }

/* week + pages */
.day { border: 0; background: var(--surface); box-shadow: var(--raise-sm); border-radius: 20px; }
.day.done { background: var(--mint); } .day.next { border: 0; background: var(--butter); box-shadow: var(--raise); }
.weekend { border: 0; background: var(--lilac); }
.spec { background: var(--surface-2); box-shadow: var(--press); }
.page-img img, .preview-img { border: 0; border-radius: 14px; box-shadow: var(--raise-sm); }
.st-approved { border: 0; }
.placeholder { box-shadow: var(--press); border-radius: 14px; }
.community-pages img { border: 0; box-shadow: var(--raise-sm); border-radius: 16px; }

/* tables */
.tbl th, .tbl td { border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); }

/* admin */
.adm-kpi { border: 0; background: var(--sky); box-shadow: var(--raise); border-radius: 22px; }
.adm-kpi:nth-child(2) { background: var(--peach); } .adm-kpi:nth-child(3) { background: var(--butter); }
.adm-kpi:nth-child(4) { background: var(--mint); } .adm-kpi:nth-child(5) { background: var(--blush); } .adm-kpi:nth-child(6) { background: var(--lilac); }
.adm-kpi span { color: var(--ink); } .adm-kpi small { color: var(--ink-2); }
.adm-bars { border-bottom: 0; padding: 8px; border-radius: 16px; background: var(--surface-2); box-shadow: var(--press); }
.adm-bars span { background: var(--brand); border-radius: 6px 6px 2px 2px; }

/* phone tab bar: floating soft dock */
@media (max-width: 900px) {
  .tabbar { background: var(--surface); border-top: 0; box-shadow: 0 -6px 20px rgba(120, 105, 85, .14); border-radius: 22px 22px 0 0; }
  .tabbar a { border-radius: 14px; }
  .tabbar a.on { background: var(--mint); color: var(--brand-strong); }
  .card { padding: 18px; }
}

/* plain pages (sign in, invites) */
.plain { background: var(--bg); }
.auth-card .card, .onb .card { box-shadow: var(--raise); }

/* coloured cards keep their pastel fill over the plain .card surface */
.card.hero { background: linear-gradient(135deg, var(--mint), var(--sky)); }
.card.auto-card { background: linear-gradient(135deg, var(--mint), var(--sky) 60%, var(--lilac)); }
.card.auto-card .btn { background: var(--brand); color: var(--brand-ink); }

/* ---------- clarity pass (Sue, round 1 of the new look) ---------- */
/* selected = solid forest green, white text: never "slightly greener" */
.chip:has(input:checked) { background: var(--brand); color: var(--brand-ink); box-shadow: var(--raise-sm); }
.chip:has(input:checked)::before { content: "✓"; font-weight: 800; margin-left: 4px; }
.chip:has(input:checked) em { color: var(--brand-ink); }
.chip { box-shadow: var(--raise-sm), inset 0 0 0 1px var(--line-2); }
.choice:has(input:checked), .show-pick:has(input:checked), .game-picks label:has(input:checked), .pick:has(input:checked) {
  box-shadow: var(--press); outline: 2px solid var(--brand); outline-offset: -2px; }
.choice input[type=radio], .choice input[type=checkbox] { width: 20px; height: 20px; }
.show-pick .tick, .choice .tick { border: 2px solid var(--muted); background: var(--surface); box-shadow: var(--raise-sm); }
.show-pick:has(input:checked) .tick, .choice:has(input:checked) .tick { border-color: var(--brand); }

/* "Change…" / "Filter" openers are buttons, not wells */
details.more { background: transparent; box-shadow: none; padding: 0; }
details.more > summary { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: var(--surface);
  box-shadow: var(--raise-sm); color: var(--brand-strong); margin: 0; }
details.more > summary::before { content: ""; }
details.more > summary::after { content: "⌄"; font-size: 1.1em; line-height: 1; margin-top: -4px; }
details.more[open] > summary::after { content: "⌃"; margin-top: 4px; }
details.more[open] { padding: 0 0 4px; }

/* where am I: current step is solid green, done steps lighter green */
.steps-bar span.done { background: color-mix(in srgb, var(--brand) 45%, var(--surface)); }
.steps-bar span.now { background: var(--brand); box-shadow: var(--raise-sm); }

/* word chips are labels, not buttons */
.wchip { box-shadow: none; background: var(--surface-2); }

/* charts readable on phones; empty grid cells visible */
.chart .axis text { font-size: 13px; }
.chart .end { font-size: 13px; }
.heat .c { background: var(--q0); box-shadow: inset 0 0 0 1px var(--line-2); }

/* empty picture slots say so */
.recent .th:not([style])::after, .tile .thumb:empty::after { content: "📖  Picture coming…"; color: var(--muted); font-size: .85rem; }
.recent .th:not([style]) { display: grid; place-items: center; }

/* "next" day tile is labelled in the template; tone it as an invitation, not a warning */
.wday.next { background: var(--mint); box-shadow: var(--raise); outline: 2px solid var(--brand); outline-offset: -2px; }

/* dark mode: secondary buttons and the active menu item need an edge */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.ghost, :root:not([data-theme="light"]) .btn.hud-ghost { box-shadow: var(--raise-sm), inset 0 0 0 1px var(--line-2); }
  :root:not([data-theme="light"]) .nav a.on { background: var(--mint); color: var(--brand-strong); } }
:root[data-theme="dark"] .btn.ghost, :root[data-theme="dark"] .btn.hud-ghost { box-shadow: var(--raise-sm), inset 0 0 0 1px var(--line-2); }
:root[data-theme="dark"] .nav a.on { background: var(--mint); color: var(--brand-strong); }
