/* Sparklins membership: login, parent dashboard, admin dashboard, membership page (v3.0). High contrast:
   plum ink on cream or white, cream on plum; no light-on-light text. */
.app [hidden] { display: none !important; }
.app { --side: 260px; }
.app-demo { background: var(--tangerine-soft); color: #5A2208; font-weight: 800; font-size: 0.86rem; text-align: center; padding: 8px 16px; }
.app-demo button { background: none; border: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- login */
.auth { min-height: calc(100vh - var(--hdr-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth__art { background: var(--plum); color: var(--on-plum); display: grid; align-content: center; justify-items: center; gap: 18px; padding: 40px; text-align: center; position: relative; overflow: hidden; }
.auth__art img { width: min(320px, 70%); height: auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,0.35)); }
.auth__art h2 { color: var(--on-plum); font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.6rem); max-width: 16ch; }
.auth__art p { margin: 0; max-width: 40ch; color: var(--night-ink-muted); font-weight: 600; line-height: 1.55; }
.auth__art ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; text-align: left; font-weight: 700; }
.auth__art li::before { content: "★ "; color: var(--star); }
.auth__main { display: grid; align-content: center; padding: clamp(24px, 5vw, 64px); }
.auth__card { width: min(460px, 100%); justify-self: center; display: grid; gap: 16px; }
.auth__card h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); }
.auth__card p { margin: 0; line-height: 1.55; }
.auth__hint { background: #FFF6D6; border: 1px dashed var(--honey); border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 0.9rem; }
.auth__or { display: flex; align-items: center; gap: 12px; color: var(--ink-muted); font-weight: 800; font-size: 0.85rem; }
.auth__or::before, .auth__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn--google { --b: #fff; --t: var(--ink); box-shadow: inset 0 0 0 2px var(--line-strong); }
.btn--google svg { width: 20px; height: 20px; }
.auth__err { margin: 0; background: var(--tangerine-soft); color: #6B2A0B; border-radius: 12px; padding: 10px 12px; font-weight: 700; font-size: 0.92rem; }
.auth__fine { font-size: 0.85rem; color: var(--ink-muted); }
.code-in { letter-spacing: 0.5em; font-size: 1.6rem; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.consent { display: grid; gap: 10px; }
.consent label { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-weight: 600; line-height: 1.45; font-size: 0.95rem; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--plum); }
.avatars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.avatars button { aspect-ratio: 1; border: 2px solid var(--line); border-radius: 14px; background: #fff; padding: 4px; cursor: pointer; }
.avatars button img { width: 100%; height: 100%; object-fit: contain; }
.avatars button[aria-pressed="true"] { border-color: var(--ink); background: #FFF6D6; box-shadow: var(--sticker); }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth__art { padding: 28px 20px; } .auth__art img { width: 140px; } .auth__art ul { display: none; } .avatars { grid-template-columns: repeat(4, 1fr); } }

/* ---------- shared form bits */
.fld { display: grid; gap: 6px; font-weight: 800; font-size: 0.92rem; }
.fld small { font-weight: 600; color: var(--ink-muted); }
.in, .sel, .ta { width: 100%; min-height: 46px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 1rem; font-weight: 600; padding: 9px 12px; }
.ta { min-height: 96px; resize: vertical; line-height: 1.45; }
.in:focus, .sel:focus, .ta:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(252,204,48,0.55); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .row2, .row3 { grid-template-columns: 1fr; } }
.btn--danger { --b: #B42318; --t: #fff; }
.btn--xs { min-height: 36px; padding: 4px 12px; font-size: 0.85rem; box-shadow: none; }

/* ---------- dashboard shell */
.dash { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - var(--hdr-h)); background: var(--paper); }
.dash__side { background: var(--plum); color: var(--on-plum); padding: 20px 14px; position: sticky; top: var(--hdr-h); height: calc(100vh - var(--hdr-h)); overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.dash__who { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; padding: 6px 8px 14px; border-bottom: 1px solid rgba(255,242,223,0.16); }
.dash__who img, .dash__who b { width: 44px; height: 44px; border-radius: 50%; background: var(--star); display: grid; place-items: center; color: var(--on-star); font-weight: 800; object-fit: contain; }
.dash__who strong { display: block; font-size: 1rem; line-height: 1.2; }
.dash__who span { font-size: 0.8rem; color: var(--night-ink-muted); font-weight: 700; }
.dash__kids { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px; }
.kidchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: var(--r-pill); border: 1.5px solid rgba(255,242,223,0.3); background: transparent; color: var(--on-plum); font: inherit; font-weight: 800; font-size: 0.85rem; cursor: pointer; }
.kidchip img { width: 26px; height: 26px; object-fit: contain; border-radius: 50%; background: rgba(255,255,255,0.12); }
.kidchip[aria-pressed="true"] { background: var(--star); color: var(--on-star); border-color: var(--star); }
.dash__nav { display: grid; gap: 2px; }
.dash__nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--on-plum); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.dash__nav a:hover { background: rgba(255,242,223,0.08); }
.dash__nav a[aria-current="page"] { background: var(--star); color: var(--on-star); }
.dash__nav a i { width: 22px; text-align: center; font-style: normal; }
.dash__nav .navsep { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--night-ink-muted); padding: 12px 12px 4px; font-weight: 800; }
.dash__out { margin-top: auto; }
.dash__out button { width: 100%; background: transparent; color: var(--on-plum); border: 1.5px solid rgba(255,242,223,0.3); border-radius: 12px; min-height: 42px; font: inherit; font-weight: 800; cursor: pointer; }
.dash__main { padding: clamp(18px, 3vw, 36px); min-width: 0; display: grid; gap: 20px; align-content: start; }
.dash__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
.dash__head h1 { font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.4rem); }
.dash__head p { margin: 4px 0 0; color: var(--ink-muted); font-weight: 600; }
.dash__menu { display: none; }
@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
  .dash__side { position: fixed; z-index: 120; inset: var(--hdr-h) auto 0 0; width: min(300px, 86vw); height: auto; transform: translateX(-102%); transition: transform 240ms var(--sc-ease-drawer); }
  .dash.is-open .dash__side { transform: none; box-shadow: var(--sc-e3); }
  .dash__menu { display: inline-flex; }
}

/* cards and grids */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(16px, 2.2vw, 24px); box-shadow: var(--sc-e1); display: grid; gap: 12px; align-content: start; min-width: 0; }
.card h2 { font-size: 1.25rem; }
.card h3 { font-size: 1.05rem; }
.card p { margin: 0; line-height: 1.5; }
.card--plum { background: var(--plum); color: var(--on-plum); border-color: var(--plum); }
.card--plum h2, .card--plum h3 { color: var(--on-plum); }
.card--plum .muted { color: var(--night-ink-muted); }
.card--star { background: #FFF6D6; border-color: var(--star); }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 4px; }
.kpi span { font-size: 0.8rem; font-weight: 800; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi b { font-family: var(--sc-font-display); font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.kpi small { font-weight: 700; color: var(--meadow); }
.kpi--warn small { color: var(--tangerine); }
.empty { text-align: center; padding: 28px 16px; color: var(--ink-muted); font-weight: 700; display: grid; justify-items: center; gap: 10px; }
.empty img { width: 90px; height: auto; }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: var(--r-pill); font-size: 0.78rem; font-weight: 800; background: var(--paper-sunk); color: var(--ink); white-space: nowrap; }
.pill--free { background: #EDE8E1; }
.pill--plus { background: var(--star); color: var(--on-star); }
.pill--family { background: var(--plum); color: var(--on-plum); }
.pill--good { background: var(--meadow-soft); color: #1D4F33; }
.pill--warn { background: var(--tangerine-soft); color: #6B2A0B; }
.pill--bad { background: #FDE2DF; color: #8A1C12; }

/* tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tbl th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); padding: 10px 12px; background: var(--paper-raised); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid #F1E6D3; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.is-click { cursor: pointer; }
.tbl tr.is-click:hover td { background: #FFFBF0; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .in, .toolbar .sel { width: auto; min-width: 180px; flex: 1 1 180px; min-height: 42px; }

/* today and progress */
.todo { display: grid; gap: 8px; }
.todo a, .todo button.todo__b { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-decoration: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.todo a:hover, .todo button.todo__b:hover { border-color: var(--ink); }
.todo img { width: 52px; height: 52px; object-fit: contain; }
.todo strong { display: block; font-size: 1rem; }
.todo span { font-size: 0.85rem; color: var(--ink-muted); font-weight: 600; }
.todo i { font-style: normal; font-weight: 800; }
.wheel { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: center; }
.wheel svg { width: 100%; height: auto; }
.wheel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wheel li { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; font-weight: 700; font-size: 0.92rem; }
.wheel li i { width: 12px; height: 12px; border-radius: 3px; }
@media (max-width: 640px) { .wheel { grid-template-columns: 1fr; } .wheel svg { max-width: 220px; justify-self: center; } }
.bars { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; align-items: end; height: 120px; padding-top: 8px; }
.bars span { background: var(--star); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; }
.bars span[data-n="0"] { background: var(--paper-sunk); }
.bars__axis { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--ink-muted); font-weight: 700; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.feed li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--paper-raised); font-size: 0.92rem; }
.feed li b { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #fff; font-size: 0.95rem; }
.feed li span { color: var(--ink-muted); font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.meter { height: 12px; border-radius: 99px; background: var(--paper-sunk); overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--star), var(--honey)); border-radius: inherit; }
.card--plum .meter { background: rgba(255,242,223,0.15); }

/* kits, creations, stickers */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.tilec { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 8px; justify-items: start; }
.tilec img { width: 100%; height: 120px; object-fit: contain; background: var(--paper); border-radius: 12px; }
.tilec strong { font-size: 1rem; line-height: 1.25; }
.tilec span { font-size: 0.82rem; color: var(--ink-muted); font-weight: 700; }
.stkbook { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.stkbook div { aspect-ratio: 1; background: #fff; border: 2px dashed var(--line); border-radius: 18px; display: grid; place-items: center; padding: 10px; text-align: center; font-size: 0.75rem; font-weight: 800; color: var(--ink-muted); }
.stkbook div.is-got { border-style: solid; border-color: var(--star); background: #FFF6D6; color: var(--ink); }
.stkbook img { width: 70%; height: auto; }
.stkbook div:not(.is-got) img { filter: grayscale(1); opacity: 0.25; }

/* plans (pricing) */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; } }
.plan { background: #fff; border: 2px solid var(--line); border-radius: var(--r-xl); padding: 26px 22px; display: grid; gap: 14px; align-content: start; position: relative; }
.plan--hi { border-color: var(--ink); box-shadow: var(--sc-e3); }
.plan--hi::before { content: "Most loved"; position: absolute; top: -14px; left: 22px; background: var(--star); color: var(--on-star); font-weight: 800; font-size: 0.8rem; padding: 4px 12px; border-radius: var(--r-pill); }
.plan h3 { font-size: 1.6rem; }
.plan__price b { font-family: var(--sc-font-display); font-size: 2.4rem; line-height: 1; }
.plan__price span { color: var(--ink-muted); font-weight: 700; }
.plan__year { font-weight: 700; color: var(--meadow); font-size: 0.92rem; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan li { padding-left: 26px; position: relative; font-weight: 600; line-height: 1.4; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--meadow); font-weight: 800; }
.plan li.no { color: var(--ink-muted); }
.plan li.no::before { content: "–"; color: var(--ink-muted); }
.plan--current { border-color: var(--meadow); }
.cycle { display: inline-flex; gap: 4px; background: var(--paper-sunk); padding: 4px; border-radius: var(--r-pill); }
.cycle button { border: 0; background: transparent; font: inherit; font-weight: 800; padding: 8px 16px; border-radius: var(--r-pill); cursor: pointer; color: var(--ink); }
.cycle button[aria-pressed="true"] { background: #fff; box-shadow: var(--sc-e1); }

/* modal */
.mdl { position: fixed; inset: 0; z-index: 190; display: grid; place-items: center; padding: 16px; }
.mdl__scrim { position: absolute; inset: 0; background: rgba(30,23,41,0.6); }
.mdl__panel { position: relative; width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); border-radius: var(--r-lg); padding: clamp(18px, 3vw, 28px); display: grid; gap: 14px; box-shadow: var(--sc-e3); }
.mdl__panel--wide { width: min(980px, 100%); }
.mdl__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mdl__head h2 { font-size: 1.4rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 0.92rem; }
.kv dt { font-weight: 800; color: var(--ink-muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.codes { font-family: ui-monospace, Menlo, monospace; font-size: 0.9rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; max-height: 240px; overflow: auto; white-space: pre; }
.chart-line { width: 100%; height: 160px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--plum); }
.note { font-size: 0.85rem; color: var(--ink-muted); font-weight: 600; line-height: 1.45; margin: 0; }
.loading { padding: 40px; text-align: center; color: var(--ink-muted); font-weight: 800; }
/* v3.0 additions: admin bars, form grids, WhatsApp button, FAQ */
.hbar { display: grid; grid-template-columns: minmax(90px, 30%) 1fr 44px; align-items: center; gap: 10px; margin: 8px 0; font-weight: 700; font-size: .92rem; }
.hbar > div { height: 12px; border-radius: 99px; background: var(--paper-sunk); overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 99px; background: var(--plum); }
.hbar i.hbar--plus { background: var(--star); } .hbar i.hbar--family { background: var(--meadow); } .hbar i.hbar--free { background: #B9AEC4; }
.hbar b { text-align: right; }
.formgrid { display: grid; gap: 12px; align-content: start; }
.formgrid h3 { margin: 8px 0 0; }
.formgrid .btn { justify-self: start; }
.btn--wa { --b: #1F7A4D; --t: #fff; }
.textbtn { font-weight: 800; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-size: .92rem; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq summary { font-weight: 800; cursor: pointer; }
.faq details p { margin: 8px 0 0; color: var(--ink-muted); }
code.small { font-size: .74rem; word-break: break-all; }
.tbl tr.is-click { cursor: pointer; } .tbl tr.is-click:hover td, .tbl tr.is-click:focus td { background: var(--paper-sunk); }
/* membership (pricing) page */
.mship { background: var(--paper); padding-bottom: 72px; }
.mship__hero { background: var(--star); color: var(--on-star); padding: 28px 0 40px; }
.mship__hero .crumbs, .mship__hero .crumbs a, .mship__hero .note { color: var(--on-star); }
.mship__intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; margin-top: 18px; }
.mship__intro h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.05; margin: 6px 0 14px; }
.mship__lede { font-size: 1.15rem; line-height: 1.5; max-width: 34em; }
.mship__art { width: 100%; max-width: 380px; height: auto; justify-self: center; filter: drop-shadow(0 18px 24px rgba(53,42,70,.22)); }
.mship__hero .btn--ghost { --t: var(--on-star); box-shadow: inset 0 0 0 2px var(--on-star); }
.mship__sec { margin-top: 56px; }
.mship__sec > h2, .mship__sec .card__head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.mship__feats .card img { width: 72px; height: 72px; object-fit: contain; }
.mship__feats .card h3 { margin: 8px 0 4px; }
.mship__feats .card p { margin: 0; color: var(--ink-muted); line-height: 1.5; }
@media (max-width: 760px) { .mship__intro { grid-template-columns: 1fr; } .mship__art { max-width: 220px; order: -1; } }
body:has(.dash) .wa { display: none; }
main.app, main.mship { padding-top: var(--hdr-h); }
.card > .btn, .card > a.btn { justify-self: start; }
.mdl__panel h3 { margin: 14px 0 6px; }
.mship__hero .eyebrow { color: var(--on-star); }
.mship__hero .crumbs { display: flex; gap: 8px; align-items: center; }
.mship__sec > h2 { margin-bottom: 18px; } .mship__sec .card__head { margin-bottom: 18px; }
.mship__hero .toolbar { margin: 18px 0 10px; }
