:root {
  --bg: #FFF9EF; --card: #ffffff; --ink: #2B2A33; --soft: #6E6A74; --line: #EFE3CF;
  --sun: #F6C343; --a: #3E7CB1; --a-soft: #E1ECF6; --b: #EE8434; --b-soft: #FDE7D3;
  --ok: #3f8f5a; --warn: #B35A15; --radius: 16px; --butter: #FFF1C7;
  --shadow: 2px 2px 0 var(--ink); --edge: 2px solid var(--ink);
  --font: "DM Sans", -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#1F1E24; --card:#2B2A33; --ink:#FFF9EF; --soft:#B8B3BD; --line:#3D3B45;
          --a-soft:#22354A; --b-soft:#4A3220; --butter:#3A331C; }
}
/* the person looking always sees their own home in blue */
body.me-b { --a: #EE8434; --b: #3E7CB1; --a-soft: #FDE7D3; --b-soft: #E1ECF6; }
@media (prefers-color-scheme: dark) { body.me-b { --a-soft:#4A3220; --b-soft:#22354A; } }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
body { font-family: var(--font); font-size: 16px; line-height: 1.45;
       max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line);
       border-radius: 12px; padding: 12px; width: 100%; }
textarea { min-height: 110px; resize: vertical; }
label { display: block; font-size: .85rem; color: var(--soft); margin: 14px 0 6px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
       padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.brand svg { width: 34px; }
.who { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--card);
       box-shadow: var(--shadow); font-size: .85rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.a { background: var(--a); } .dot.b { background: var(--b); }

main { padding: 4px 16px 16px; }
h1 { font-size: 1.6rem; letter-spacing: -.02em; margin: 8px 0 4px; }
h2 { font-size: 1.05rem; margin: 22px 0 10px; }
.sub { color: var(--soft); }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--soft); font-size: .9rem; }
.small { font-size: .8rem; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.pill.a { background: var(--a-soft); color: var(--a); } .pill.b { background: var(--b-soft); color: var(--b); }
.pill.pending { background: #f5ead4; color: var(--warn); } .pill.ok { background: #dcefe2; color: var(--ok); }
.pill.no { background: var(--line); color: var(--soft); }

.hero { border-radius: 24px; padding: 20px; color: #fff; margin-bottom: 14px; }
.hero.a { background: linear-gradient(135deg, #3f8f8a, #57a59e); }
.hero.b { background: linear-gradient(135deg, #c9735a, #d98d70); }
.hero .big { font-size: 1.5rem; font-weight: 700; margin: 4px 0; }
.hero .muted { color: rgba(255,255,255,.85); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; border-radius: 14px;
       font-weight: 600; background: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.soft { background: var(--a-soft); color: var(--a); }
.btn.full { width: 100%; margin-top: 10px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btns .btn { flex: 1; }

.bridgy { display: flex; gap: 12px; align-items: flex-start; background: #fdf4e3; border-radius: var(--radius); padding: 14px; margin: 12px 0; color: #3a2f1c; }
@media (prefers-color-scheme: dark) { .bridgy { background: #2e2717; color: #f3e6c9; } }
.bridgy .face { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; color: #fff; font-weight: 700; }
.bridgy b { display: block; margin-bottom: 2px; }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 10px; }
.cal-head button { padding: 8px 12px; border-radius: 10px; background: var(--card); box-shadow: var(--shadow); }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.grid .dow { text-align: center; font-size: .72rem; color: var(--soft); padding: 4px 0; }
.day { aspect-ratio: 1 / 1.1; border-radius: 10px; padding: 4px; font-size: .8rem; position: relative; display: flex; flex-direction: column; }
.day.a { background: var(--a-soft); } .day.b { background: var(--b-soft); }
.day.out { opacity: .35; }
.day.today { outline: 2px solid var(--ink); }
.day .n { font-weight: 600; }
.day .marks { margin-top: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.day .ev { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: .6; }
.day .sw { font-size: .6rem; font-weight: 700; }
.day.change::after { content: ""; position: absolute; top: 3px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--sun); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 12px 0; font-size: .85rem; color: var(--soft); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.list .item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list .item:last-child { border-bottom: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: .9rem; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; margin: 6px 0; }
.msg.mine { margin-left: auto; background: var(--a-soft); border-bottom-right-radius: 4px; }
.msg.theirs { background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 4px; }
.msg .meta { font-size: .72rem; color: var(--soft); margin-top: 4px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; justify-content: center; gap: 2px;
        background: var(--card); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.tabs button { flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem;
               color: var(--soft); padding: 6px 0; border-radius: 12px; position: relative; }
.tabs button span { font-size: 1.2rem; line-height: 1; }
.tabs button.on { color: var(--ink); font-weight: 600; }
.tabs .badge { position: absolute; top: 2px; right: 22%; background: var(--sun); color: #fff; font-size: .65rem; border-radius: 999px; padding: 0 6px; }

.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 560px; margin: 0 auto; background: var(--bg);
         border-radius: 24px 24px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); max-height: 88vh; overflow: auto; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 30;
         background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .9rem; max-width: 90%; }
.clause { padding: 12px 0; border-bottom: 1px solid var(--line); }
.clause:last-child { border-bottom: 0; }
.diff del { color: var(--soft); } .diff ins { text-decoration: none; font-weight: 600; }
.kv { display: grid; grid-template-columns: 40% 60%; gap: 6px 10px; font-size: .92rem; }
.kv div:nth-child(odd) { color: var(--soft); }
.meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--sun); }
.tabs button[hidden] { display: none; }
.day.one { background: var(--card); box-shadow: var(--shadow); }

/* sign-in / onboarding */
body.gate .tabs, body.gate #whoBtn { display: none; }
.gatebox { padding-top: 18px; }
.center { text-align: center; }
.center svg { color: var(--ink); }
.warnline { color: #b04a3a; margin-top: 10px; font-size: .9rem; }
select { appearance: auto; }
.oauthbtn { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 8px; }
.oauthbtn:last-child { margin-bottom: 0; }
.day .nt, .legend .nt { width: 6px; height: 6px; border-radius: 1px; background: var(--sun); }
.item.tap { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
.item.tap .chev { color: var(--soft); font-size: 1.3rem; }
.refchip { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font: inherit; font-size: .78rem; color: inherit; cursor: pointer; }

/* schedule, money, balance */
.opts { display: grid; gap: 8px; margin-bottom: 12px; }
.opt { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); border: 2px solid transparent; }
.opt.on { border-color: var(--ink); }
.grid.mini .day { aspect-ratio: 1 / .8; font-size: .72rem; }
.grid.cyc .day { aspect-ratio: 1 / 1.1; font-size: .7rem; align-items: center; justify-content: center; border: 0; }
.grid.cyc .day .small { font-size: .62rem; overflow: hidden; max-width: 100%; }
.day.hol { box-shadow: inset 0 -3px 0 var(--sun); }
.day .star { font-size: .55rem; margin-left: 2px; color: var(--warn); vertical-align: top; }
.legend .holbar { display: inline-block; width: 12px; height: 3px; background: var(--sun); border-radius: 2px; }
.item.past { opacity: .5; }
.savebar { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 4; background: var(--card); border-radius: var(--radius); padding: 12px 14px; margin-top: 16px; box-shadow: 0 6px 24px rgba(31,42,51,.18); border: 1px solid var(--line); }
.split { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--line); }
.split i { display: block; height: 100%; }
.split i.a { background: var(--a); } .split i.b { background: var(--b); }
.stat { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 8px 8px; font-size: .88rem; align-items: center; }
.stat div:nth-child(3n+1) { color: var(--soft); }
.stat div:nth-child(-n+3) { font-weight: 600; color: var(--ink); }
.tabs button { min-width: 0; }

/* ---- trust and family features (features.js) ---- */
.good { border-radius: var(--radius); padding: 16px; margin: 12px 0; color: #4a3410; background: linear-gradient(135deg, #fff1cf, #fde3b3); box-shadow: var(--shadow); }
.good.big { padding: 18px; }
.good .small { opacity: .8; }
.goodgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.goodgrid div { display: flex; flex-direction: column; background: rgba(255,255,255,.55); border-radius: 12px; padding: 10px; font-size: .85rem; }
.goodgrid .gn { font-size: 1.6rem; font-weight: 700; color: #b06f12; line-height: 1.1; }
@media (prefers-color-scheme: dark) { .good { background: linear-gradient(135deg, #3a2c12, #4a3613); color: #f7e6c4; } .goodgrid div { background: rgba(0,0,0,.18); } .goodgrid .gn { color: var(--sun); } }
.promise { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.promise:last-child { border-bottom: 0; }
.picon { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--a-soft); display: grid; place-items: center; font-size: .85rem; }
.chapterbar, .calmline { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .85rem; color: var(--soft); margin-top: 10px; }
.msg .mactions { display: flex; gap: 12px; margin-top: 6px; }
.msg .mactions button { font-size: .75rem; color: var(--soft); text-decoration: underline; }
.msg .fu { font-size: .75rem; color: var(--ok); margin-top: 4px; }
.msg .facts { background: #eef6f0; color: #24402c; border-radius: 10px; padding: 8px 10px; margin: 4px 0 6px; font-size: .88rem; }
.msg .facts button { text-decoration: underline; margin-top: 4px; }
@media (prefers-color-scheme: dark) { .msg .facts { background: #1f3326; color: #d6efdd; } }
.msg.calm .body, .msg.calm .refchip { display: none; }
.msg.calm.full .body, .msg.calm.full .refchip { display: block; }
.msg.calm.full .facts button { display: none; }
.safety { display: flex; flex-direction: column; gap: 4px; background: #f3e9f7; color: #3d2647; border-radius: var(--radius); padding: 14px; margin: 12px 0; font-size: .9rem; }
@media (prefers-color-scheme: dark) { .safety { background: #2f2236; color: #ecdcf2; } }
.moment { display: flex; gap: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; margin-bottom: 10px; }
.moment img.ph { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; flex: 0 0 96px; background: var(--line); }
.moment.small img.ph { width: 72px; height: 72px; flex-basis: 72px; }
.moment .mtext { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.heart { align-self: flex-start; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; color: var(--b); }
.heart.on { background: var(--b-soft); border-color: var(--b-soft); }
.tick { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); flex: 0 0 26px; font-weight: 700; color: #fff; }
.tick.on { background: var(--ok); border-color: var(--ok); }
.list .item.row { gap: 10px; }
img.docimg { width: 100%; border-radius: 12px; margin-top: 10px; background: var(--line); min-height: 120px; }
#printview { display: none; }
body.printing > *:not(#printview) { display: none !important; }
body.printing #printview { display: block; background: #fff; color: #111; padding: 16px; min-height: 100vh; }
.pv-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.pv h1 { font-size: 1.4rem; } .pv h2 { margin-top: 18px; border-bottom: 1px solid #ddd; padding-bottom: 4px; } .pv h3 { font-size: .95rem; margin: 10px 0 4px; }
.pv p { margin: 6px 0; font-size: .92rem; } .pv .small { color: #666; font-size: .78rem; }
.pv-head { border: 2px solid #1f2a33; border-radius: 12px; padding: 12px; }
@media print { .pv-bar { display: none; } body.printing #printview { padding: 0; } }
.safety.slim { flex-direction: row; justify-content: space-between; align-items: center; padding: 8px 12px; margin: 0 0 8px; font-size: .8rem; }
.qexit { background: #3d2647; color: #fff; border-radius: 10px; padding: 6px 10px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .qexit { background: #ecdcf2; color: #2f2236; } }
.bridgy.private { background: #eef1f8; color: #25304a; }
@media (prefers-color-scheme: dark) { .bridgy.private { background: #222a3b; color: #dfe6f5; } }
.bridgy.respect { background: #fbe9e4; color: #4a2418; }
@media (prefers-color-scheme: dark) { .bridgy.respect { background: #3b231c; color: #f6ddd5; } }
ol.rules { padding-left: 20px; } ol.rules li { margin: 8px 0; }
.sysmsg { text-align: center; font-size: .82rem; color: var(--soft); margin: 10px auto; max-width: 90%; }
.msg .held { font-size: .85rem; color: var(--soft); }
/* Ask Orbit */
.askfab { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 7; width: 56px; height: 56px; border-radius: 50%; background: var(--sun); color: #fff; font-weight: 800; font-size: 1.2rem; box-shadow: 0 6px 18px rgba(0,0,0,.2); display: grid; place-items: center; }
.askfab span { position: absolute; right: -2px; bottom: -2px; font-size: .8rem; background: var(--card); border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
body.gate .askfab, body.printing .askfab { display: none; }
@media (min-width: 600px) { .askfab { right: calc(50% - 264px); } }
.askrow { display: flex; gap: 8px; align-items: flex-start; }
.askrow textarea { min-height: 90px; }
.mic { flex: 0 0 52px; height: 52px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); font-size: 1.4rem; }
.mic.on { background: #f6d6cc; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.bcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin: 10px 0; }
.bcard.extra { border: 1px dashed var(--sun); }
.bcard .btext { margin-top: 6px; }
.bcard .btext.editing { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--bg); }
.bcard.answer { background: none; box-shadow: none; padding: 0; }

/* agreement import */
.card.imp.off { opacity: .55; }
.card.imp textarea { font-size: .95rem; }

/* The Village */
.card.vq h2 { font-size: 1.15rem; line-height: 1.35; }
.card.vans p { line-height: 1.5; }

/* nudges */
.why { background: none; border: 0; padding: 0; font: inherit; font-size: .75rem; color: var(--soft); text-decoration: underline; cursor: pointer; margin-top: 6px; }
.intent { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--a-soft); font-size: .9rem; }
.bridgy.nudge .btns { margin-top: 10px; }

/* sheets: slide down to close, a close button, and the page behind stays still */
.sheet { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; animation: sheetIn .22s ease; }
@keyframes sheetIn { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet .grabzone { position: sticky; top: -18px; margin: -18px -16px 8px; padding: 12px 16px 6px; background: var(--bg); z-index: 2; touch-action: none; cursor: grab; }
.sheet .grabzone .grab { margin: 0 auto; width: 44px; height: 5px; }
.sheet .sheetx { position: absolute; right: 10px; top: 6px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--line); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
body.sheet-open { overflow: hidden; }

/* Orbit's suggested wording */
.rwbox .card.rwopt { margin: 10px 0 0; }
.rwbox .card.rwopt .btns { margin-top: 8px; }

.rwwhy { display: inline; margin: 0; }


/* ================= Drawn by Leo (redesign 23 Nov 2026) ================= */
h1 { font-weight: 800; letter-spacing: -.025em; }
h2 { font-weight: 800; letter-spacing: -.01em; }
.hl { font-family: var(--hand); font-weight: 700; font-size: 1.25em; color: var(--b); letter-spacing: 0; line-height: 1; }
body.me-b .hl { color: var(--a); }
.card, .opt, .bcard, .moment, .savebar { border: var(--edge); box-shadow: var(--shadow); }
.card .card { box-shadow: none; }
.btn { border-radius: 14px; border: var(--edge); box-shadow: var(--shadow); font-weight: 700; }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ghost { border: 2px solid var(--ink); background: var(--card); }
.btn.soft { background: var(--a-soft); color: var(--ink); }
.chip { border: 2px solid var(--line); font-weight: 600; }
.chip.on { border-color: var(--ink); }
input, textarea, select { border: 2px solid var(--ink); }
.pill.a { color: var(--ink); } .pill.b { color: var(--ink); }
.bridgy { background: var(--butter); color: var(--ink); border-radius: var(--radius); }
.bridgy .face { background: var(--sun); color: var(--ink); font-weight: 800; }
@media (prefers-color-scheme: dark) { .bridgy { background: var(--butter); color: var(--ink); } }

/* header */
.top .brand svg { width: 34px; height: 34px; }
.top .brand span { font-weight: 800; letter-spacing: -.02em; font-size: 1.2rem; }
.who { border: var(--edge); box-shadow: none; font-weight: 600; }

/* hero */
.hero { border: var(--edge); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); position: relative; overflow: hidden; }
.hero.a, .hero.b, .hero.one { background: var(--a-soft); }
.hero.b { background: var(--b-soft); }
.hero .muted { color: var(--soft); }
.hero .big { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.hero .lab { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
.hero .deco { position: absolute; right: 12px; top: 10px; width: 46px; height: 46px; }
.hero .hand { margin-top: 8px; font-size: .92rem; }

/* week strip */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 10px 0 4px; }
.week button { border-radius: 12px; padding: 6px 0 7px; font-size: .7rem; text-align: center; position: relative; color: var(--ink); }
.week button b { display: block; font-size: 1rem; }
.week .a { background: var(--a-soft); } .week .b { background: var(--b-soft); } .week .one { background: var(--card); border: 2px solid var(--line); }
.week .today { box-shadow: inset 0 0 0 2px var(--ink); }
.week .change::before { content: ""; position: absolute; left: -4px; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: var(--sun); }
.week .ev::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--ink); transform: translateX(-50%); opacity: .6; }

/* calendar days */
.day { border-radius: 10px; }
.day.today { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.day.change::after { top: auto; bottom: auto; left: -3px; right: auto; top: 6px; width: 3px; height: auto; bottom: 6px; border-radius: 3px; background: var(--sun); }
.day.one { border: 2px solid var(--line); box-shadow: none; }

/* tabs: a floating drawn pill */
.tabs { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); max-width: 540px; margin: 0 auto; border-radius: 999px; border: var(--edge);
        box-shadow: 3px 3px 0 var(--ink); padding: 5px 6px; background: var(--card); }
.tabs button { padding: 5px 0; border-radius: 999px; font-weight: 700; font-size: .7rem; }
.tabs button svg { width: 22px; height: 22px; }
.tabs button.on { background: var(--a-soft); color: var(--ink); }
.tabs .kidav { width: 22px; height: 22px; border-radius: 50%; background: var(--sun); color: var(--ink); display: grid; place-items: center; font-size: .72rem; font-weight: 800; border: 2px solid var(--ink); }
.tabs .kidname { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs .badge { background: var(--b); color: #fff; right: 18%; border: 2px solid var(--card); }
body { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(140px + env(safe-area-inset-bottom)); border-radius: 14px; }

/* Orbit bar (replaces the round button) */
.askfab { display: none !important; }
.bbar { position: fixed; left: 14px; right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 6; max-width: 532px; margin: 0 auto; height: 48px; border-radius: 999px;
        background: var(--card); border: var(--edge); box-shadow: 2px 2px 0 var(--ink); display: flex; align-items: center; gap: 10px; padding: 0 6px 0 7px; color: var(--soft); font-size: .92rem; text-align: left; }
.bbar .face { width: 34px; height: 34px; border-radius: 50%; background: var(--sun); color: var(--ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.bbar .t { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bbar .mi { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; flex: none; }
body.gate .bbar, body.printing .bbar, body.nobar .bbar { display: none; }
body.nobar { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.savebar { bottom: calc(140px + env(safe-area-inset-bottom)); }

/* child page and tools */
.kidhead { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; }
.kidhead .av { width: 64px; height: 64px; border-radius: 50%; background: var(--butter); border: var(--edge); display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; flex: none; }
.kidhead h1 { margin: 0; }
.kidtabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.tool { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.tool:last-child { border-bottom: 0; }
.tool .ti { width: 34px; height: 34px; border-radius: 11px; background: var(--bg); display: grid; place-items: center; font-size: 1rem; flex: none; }
.tool .tt { flex: 1; min-width: 0; }
.tool .tt b { display: block; }
.tool .tt span { color: var(--soft); font-size: .85rem; }
.tool .chev { color: var(--soft); font-size: 1.3rem; }
details.sleep summary { cursor: pointer; font-weight: 700; color: var(--soft); padding: 10px 0; list-style: none; }
details.sleep summary::-webkit-details-marker { display: none; }
details.sleep .tool { opacity: .75; }
.gear { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }

/* change request: day picker */
.pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pick .dow { text-align: center; font-size: .7rem; color: var(--soft); font-weight: 700; }
.pick button { aspect-ratio: 1 / 1; border-radius: 10px; font-size: .85rem; font-weight: 600; position: relative; color: var(--ink); }
.pick button.a { background: var(--a-soft); } .pick button.b { background: var(--b-soft); }
.pick button.on { background: var(--sun); box-shadow: inset 0 0 0 2px var(--ink); }
.pick button.past { opacity: .3; }
.pick button.today { box-shadow: inset 0 0 0 2px var(--line); }
.opt { flex-direction: row; align-items: center; gap: 12px; }
.opt .oi { width: 36px; height: 36px; border-radius: 11px; background: var(--a-soft); display: grid; place-items: center; flex: none; font-size: 1rem; }
.opt .ot { display: flex; flex-direction: column; gap: 2px; }
.opt.on { box-shadow: inset 0 0 0 2px var(--ink), var(--shadow); background: var(--butter); }
.minipat { display: flex; gap: 2px; margin-top: 6px; }
.minipat i { width: 12px; height: 8px; border-radius: 2px; display: block; }
.minipat i.a { background: #3E7CB1; } .minipat i.b { background: #EE8434; }

/* setup wizard */
.prog { display: flex; gap: 6px; margin: 4px 0 18px; }
.prog i { flex: 1; height: 5px; border-radius: 4px; background: var(--line); }
.prog i.on { background: var(--ink); }
.wiz h1 { font-size: 1.75rem; line-height: 1.12; }
.wiz .sub { margin: 6px 0 16px; }
.wiz label { font-weight: 700; color: var(--ink); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.wiz input.big { font-size: 1.2rem; font-weight: 700; }

/* jobs */
.job { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.job:last-child { border-bottom: 0; }
.job .jt { flex: 1; }
.job .jt span { display: block; color: var(--soft); font-size: .85rem; }
.who2 { padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: .8rem; border: 2px solid var(--ink); }
.who2.a { background: var(--a-soft); } .who2.b { background: var(--b-soft); } .who2.open { background: var(--butter); }

/* other families strip */
.fams { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.fam { display: flex; align-items: center; gap: 10px; }
.kd { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; border: 2px solid var(--ink); background: var(--sun); color: var(--ink); flex: none; }
.wgrid { display: grid; grid-template-columns: 52px repeat(7, 1fr); gap: 4px; align-items: center; }
.wgrid .dw { text-align: center; font-size: .7rem; color: var(--soft); font-weight: 700; }
.wgrid .dw b { display: block; color: var(--ink); font-size: .9rem; }
.wgrid .kn { font-size: .8rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wgrid i { height: 30px; border-radius: 8px; display: block; }
.wgrid i.a { background: #3E7CB1; } .wgrid i.b { background: #EE8434; } .wgrid i.c { background: #9B7BC4; }
.tabs button span.tl, .tabs button .kidname { font-size: .7rem; line-height: 1.2; }
.tabs button .kidav { font-size: .72rem; }
.cal-head button[disabled] { pointer-events: none; }

/* ring charts (27 Nov 2026): the logo mark as the dashboard */
.ring { display: block; flex: none; }
.ringrow { display: flex; align-items: center; justify-content: center; gap: 10px; }
.rside { display: flex; flex-direction: column; min-width: 70px; gap: 1px; }
.rside.l { text-align: right; } .rside.r { text-align: left; }
.rside b { font-size: 1.6rem; line-height: 1.1; }
.ringhero { padding-top: 14px; }
.mrings { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px 2px; }
.mring { display: flex; flex-direction: column; align-items: center; font-size: .72rem; color: var(--soft); background: none; border: 0; padding: 0; cursor: pointer; }
.minirs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.minir { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.minir b { font-size: .85rem; }
.minir .small { font-size: .7rem; line-height: 1.25; }
.ringcard { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer; }
.calring { display: flex; align-items: center; gap: 8px; margin: -4px auto 8px; background: none; border: 0; cursor: pointer; color: var(--ink); }
@media (max-width: 360px) { .rside { min-width: 56px; } .rside b { font-size: 1.3rem; } }
.rslide { margin-top: 6px; }
.rslide input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 7px; margin: 12px 0 6px; padding: 0; border: 0;
  background: linear-gradient(to right, var(--a) 0, var(--a) var(--p), var(--b) var(--p), var(--b) 100%); }
body.me-b .rslide input[type=range] { background: linear-gradient(to right, var(--b) 0, var(--b) var(--p), var(--a) var(--p), var(--a) 100%); }
.rslide input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); border: 3px solid var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: grab; }
.rslide input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--sun); border: 3px solid var(--card); cursor: grab; }
.asks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; text-align: center; }
.asks div { display: flex; flex-direction: column; }
.perpick { display: flex; align-items: center; gap: 10px; margin: 10px 0 12px; flex-wrap: wrap; }
.perpick select { width: auto; flex: none; font-weight: 800; padding: 8px 12px; border-radius: 12px; }
.ontrack { border-top: 1px dashed var(--line); margin-top: 12px; }
.mhead, .mrow { display: grid; grid-template-columns: 52px 30px 1fr 30px; align-items: center; gap: 8px; }
.mhead { font-size: .72rem; color: var(--soft); font-weight: 800; margin-bottom: 4px; }
.mhead span:nth-child(2) { text-align: right; }
.mrow { width: 100%; background: none; border: 0; padding: 7px 0; cursor: pointer; color: var(--ink); text-align: left; border-bottom: 1px solid var(--line); }
.mrow:last-of-type { border-bottom: 0; }
.mrow .ml { font-size: .85rem; font-weight: 700; }
.mrow b { font-size: .85rem; } .mrow b:nth-of-type(1) { text-align: right; }
.mrow.plan { opacity: .5; }
.sbar { position: relative; display: flex; height: 12px; border-radius: 6px; }
.sbar i:first-child { border-radius: 6px 0 0 6px; } .sbar i:nth-child(2) { border-radius: 0 6px 6px 0; }
.sbar em { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--sun); border: 2px solid var(--card); }
.week button.past { opacity: .55; }
.sbar s.mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 0; border-left: 1px solid var(--card); opacity: .85; }
.mhead span { white-space: nowrap; } .mhead span:last-child { text-align: right; direction: rtl; overflow: visible; }
.msum { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 8px; } .msum > :nth-child(4n+1) { grid-column: 1 / -1; margin-top: 8px; color: var(--soft); } .msum > :nth-child(1) { display: none; } .msum > :not(:nth-child(4n+1)) { white-space: nowrap; text-align: center; }
.mrow.mtotal { border-top: 2px solid var(--line); margin-top: 4px; padding-top: 9px; cursor: default; }
.msum { display: grid; grid-template-columns: 1.3fr 1fr 1fr .8fr; gap: 6px 8px; margin-top: 12px; font-size: .78rem; align-items: center; }
.msum > :nth-child(4n+2), .msum > :nth-child(4n+3), .msum > :nth-child(4n+4) { text-align: right; }
.msum > :nth-child(4n+1) { color: var(--soft); }
.minir .mnums { display: flex; gap: 6px; font-size: 1rem; }
.minir .mnums b { font-size: 1.05rem; }

/* ---------- Talk as a chat (28 Nov 2026): familiar messenger layout ---------- */
body.chat { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
body.chat main { padding-top: 0; }
.chead { position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 4; display: flex; align-items: center; gap: 10px; margin: 0 -16px; padding: 8px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.cav { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; }
.cav.a { background: #3E7CB1; } .cav.b { background: #EE8434; }
.cwho { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.cwho b { font-size: 1rem; } .cwho span { font-size: .75rem; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmore { width: 38px; height: 38px; border-radius: 50%; font-size: 1.3rem; font-weight: 800; color: var(--soft); }
.cpin { display: flex; align-items: center; gap: 10px; width: calc(100% + 32px); margin: 0 -16px; padding: 10px 16px; background: var(--butter); border-bottom: 1px solid var(--line); text-align: left; font-size: .9rem; }
.cpin span:first-of-type { flex: 1; }
.cpin i { width: 8px; height: 8px; border-radius: 50%; background: var(--b); flex: none; }
.cpin.soft { background: var(--bg); color: var(--soft); font-size: .82rem; padding: 7px 16px; }
.cthread { display: flex; flex-direction: column; gap: 3px; padding: 10px 0 4px; }
.cday { align-self: center; font-size: .75rem; color: var(--soft); background: var(--card); border-radius: 999px; padding: 3px 12px; margin: 10px 0 6px; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.cnote { align-self: center; max-width: 86%; text-align: center; font-size: .82rem; background: var(--card); border-radius: 12px; padding: 7px 12px; margin: 6px 0; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.cb { max-width: 80%; padding: 7px 11px 6px; border-radius: 18px; font-size: .97rem; line-height: 1.38; position: relative; cursor: pointer; overflow-wrap: anywhere; }
.cb.them { align-self: flex-start; background: var(--card); border-bottom-left-radius: 5px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.cb.me { align-self: flex-end; background: #3E7CB1; color: #fff; border-bottom-right-radius: 5px; }
body.me-b .cb.me { background: #D9722B; }
.cb .body { white-space: pre-wrap; }
.cb .ct { float: right; font-size: .68rem; margin: 6px 0 -2px 10px; opacity: .7; white-space: nowrap; }
.cb .fu { clear: both; font-size: .72rem; opacity: .8; }
.cb .cacts { display: none; clear: both; gap: 12px; padding-top: 6px; }
.cb.open .cacts { display: flex; flex-wrap: wrap; }
.cb .cacts button { font-size: .75rem; text-decoration: underline; color: inherit; opacity: .85; }
.cb .facts { color: #24402c; }
.cb .refchip { display: block; margin-top: 4px; font-size: .8rem; text-decoration: underline; color: inherit; }
#chatbar { position: fixed; left: 8px; right: 8px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 6; max-width: 544px; margin: 0 auto; display: flex; align-items: flex-end; gap: 6px; }
#chatbar[hidden] { display: none; }
#chatbar .cin, #chatbar .crec { flex: 1; min-height: 46px; background: var(--card); border-radius: 24px; display: flex; align-items: flex-end; padding: 0 8px 0 4px; box-shadow: 0 2px 10px rgba(0,0,0,.12); border: 1px solid var(--line); }
#chatbar .crec { display: none; align-items: center; gap: 10px; padding: 0 14px 0 6px; overflow: hidden; }
#chatbar.rec .cin { display: none; } #chatbar.rec .crec { display: flex; }
#chatbar .cplus { width: 38px; height: 44px; font-size: 1.6rem; line-height: 1; color: var(--soft); flex: none; }
#chatIn { flex: 1; border: 0; background: transparent; padding: 12px 4px; min-height: 0; height: 44px; max-height: 140px; resize: none; border-radius: 0; line-height: 1.35; outline: none; }
#chatbar .cgo { width: 46px; height: 46px; border-radius: 50%; background: #3E7CB1; color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
#chatbar.rec .cgo { box-shadow: 0 0 0 7px rgba(62,124,177,.2); }
#chatbar .rdot { width: 10px; height: 10px; border-radius: 50%; background: #D64545; flex: none; animation: rblink 1s infinite; }
@keyframes rblink { 50% { opacity: .3; } }
#chatbar .cx { width: 34px; height: 34px; color: var(--soft); flex: none; }
#chatHeard { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--soft); font-size: .88rem; }
.chk { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 10px 12px; margin-top: 10px; font-size: .88rem; }
.chk .face { width: 26px; height: 26px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; color: #2B2A33; }
.chk b { display: block; }
.chk.ok { background: #dcefe2; color: #24402c; } .chk.warm { background: #FFF1C7; color: #4A3B0A; } .chk.bad { background: #F6DADA; color: #5c1d1d; }
@media (prefers-color-scheme: dark) { .chk.ok { background: #1f3326; color: #d6efdd; } .chk.warm { background: #3A331C; color: #f3e6c9; } .chk.bad { background: #3d2020; color: #f3d6d6; } }
.sickrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: var(--card); border: var(--edge); box-shadow: var(--shadow); border-radius: var(--radius); padding: 12px 14px; margin: -4px 0 12px; }
.sickrow b { display: block; font-size: .92rem; }

/* back button (28 Nov 2026): looks like a button, chevron in a drawn circle + where it goes */
.backbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 4px; margin: 2px 0 6px -4px; border-radius: 999px; font-weight: 700; font-size: .95rem; color: var(--ink); background: var(--card); border: var(--edge); box-shadow: var(--shadow); max-width: 100%; }
.backbtn::before { content: ""; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--a-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232B2A33' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 6l-6 6 6 6'/%3E%3C/svg%3E") center / 20px no-repeat; }
.backbtn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
@media (prefers-color-scheme: dark) { .backbtn::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFF9EF' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 6l-6 6 6 6'/%3E%3C/svg%3E"); } }
#sheet .backbtn { box-shadow: none; }
/* settings button (28 Nov 2026): a real button with a clear icon and a word, same drawn style as Back */
.setbtn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 4px 14px 4px 6px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--ink); background: var(--card); border: var(--edge); box-shadow: var(--shadow); flex: none; }
.setbtn svg { width: 32px; height: 32px; padding: 6px; border-radius: 50%; background: var(--a-soft); box-sizing: border-box; }
.setbtn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
@media (max-width: 360px) { .setbtn { font-size: 0; gap: 0; padding: 4px; } }

/* overflow guard (28 Nov 2026): iPhone date/time fields have a built-in min width that pushed past the screen */
input, select, textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }
input[type="date"], input[type="time"], input[type="month"], input[type="datetime-local"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-height: 48px; text-align: left; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
img, svg, video, canvas, table { max-width: 100%; }
main, #sheet, .card { overflow-wrap: anywhere; min-width: 0; }
.row > *, .btns > * { min-width: 0; }

/* growing text boxes + sizes + activities (28 Nov 2026) */
textarea.grow { min-height: 48px; overflow: hidden; resize: none; line-height: 1.4; }
.sizegrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.szf { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: .85rem; color: var(--soft); }
.szin { position: relative; display: block; }
.szin input { padding-right: 38px; }
.szin i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--soft); font-size: .85rem; pointer-events: none; }
/* For you: hide + bell */
.fyhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fyhide { font-size: .82rem; font-weight: 700; color: var(--soft); padding: 8px 4px; text-decoration: underline; }
.fybell { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--card); border: var(--edge); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--ink); flex: none; margin-right: 8px; }
.fybell i { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--b); color: #fff; font-style: normal; font-size: .7rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--card); }
/* Ask Orbit on Talk (28 Nov 2026): a sun bubble floating above the mic, like the AI bubble in WhatsApp; a different colour and a label so it's never mistaken for "talk to the other parent" */
#chatbar .cbridgy { position: absolute; right: 0; bottom: 58px; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 4px; border-radius: 999px; background: var(--sun); color: #2B2A33; border: 2px solid #2B2A33; box-shadow: 2px 2px 0 #2B2A33; font-size: .82rem; }
#chatbar .cbridgy span { width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; }
#chatbar.rec .cbridgy, body.typing #chatbar .cbridgy { display: none; }
body.chat { padding-bottom: calc(200px + env(safe-area-inset-bottom)); }
/* per-card Later (28 Nov 2026) */
.bridgy[data-k], #view > .card[data-k] { position: relative; }
.fylater { position: absolute; top: 6px; right: 8px; z-index: 1; font-size: .75rem; font-weight: 700; color: var(--soft); padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { .fylater { background: rgba(0,0,0,.25); } }
.bridgy[data-k] > div:last-child > b:first-child { padding-right: 64px; }
#sheet .fylater { background: var(--ink); color: var(--bg); border: 0; }
.hocard { margin: 4px 0 12px; }
.hocard .row { flex-wrap: wrap; }
.horow { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.horow:first-of-type { margin-top: 8px; }

/* Our plan (28 Nov 2026) */
.covbar { height: 12px; border-radius: 8px; background: var(--line); overflow: hidden; margin: 12px 0 6px; border: 2px solid var(--ink); }
.covbar i { display: block; height: 100%; background: var(--a); }
.topic { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); }
.topic:last-child { border-bottom: 0; }
.topic .tick { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; border: 2px solid var(--ink); }
.topic.ok .tick { background: #dcefe2; color: #24402c; }
.topic.wait .tick { background: var(--butter); }
.topic.none .tick { background: var(--card); color: var(--soft); border-style: dashed; }
.topic .tt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topic .tt span { font-size: .82rem; color: var(--soft); }
.exlist { display: flex; flex-direction: column; gap: 8px; }
.exrule { text-align: left; padding: 10px 12px; border-radius: 14px; border: 2px dashed var(--line); background: var(--card); font-size: .92rem; }
.exrule:active { border-color: var(--ink); }
.sech { font-size: .9rem; color: var(--soft); margin: 14px 0 6px; }

/* schedule page (28 Nov 2026): clear edit rows and pattern pictures */
.setrow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.setrow .ti { width: 36px; height: 36px; border-radius: 50%; background: var(--a-soft); display: grid; place-items: center; flex: none; }
.setrow .tt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.setrow .tt span { font-size: .82rem; color: var(--soft); }
.editpill { flex: none; padding: 7px 12px; border-radius: 999px; border: 2px solid var(--ink); font-weight: 700; font-size: .85rem; background: var(--card); }
.popt { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--card); border: var(--edge); box-shadow: var(--shadow); }
.popt.on { outline: 3px solid var(--a); outline-offset: 1px; }
.popt .ph { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.popt .ph b { font-size: 1rem; }
.pstrip { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.pstrip .pw { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.pstrip i { height: 14px; border-radius: 3px; display: block; }
.pstrip i.a { background: var(--a); } .pstrip i.b { background: var(--b); }
.pstrip.custom { font-size: .8rem; color: var(--soft); border: 2px dashed var(--line); border-radius: 10px; padding: 8px; text-align: center; }

/* pattern cards: header only, open to see and tap the nights (28 Nov 2026) */
.popt { padding: 0; gap: 0; }
.popt .ph { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; text-align: left; padding: 14px; min-height: 52px; }
.popt .pchev { margin-left: auto; color: var(--soft); font-size: .9rem; }
.popt .pbody { display: flex; flex-direction: column; gap: 6px; padding: 0 14px 14px; }
.pstrip .pc { height: 34px; border-radius: 8px; font-size: .68rem; font-weight: 800; color: #fff; padding: 0; min-width: 0; }
.pstrip .pc.a { background: var(--a); } .pstrip .pc.b { background: var(--b); }
.pstrip .pc:disabled { opacity: .85; cursor: default; }
.pstrip .pc:not(:disabled):active { transform: scale(.94); }
.linkbtn { text-decoration: underline; font-weight: 700; color: var(--ink); font-size: inherit; }
.patsel { font-weight: 700; font-size: 1rem; min-height: 50px; -webkit-appearance: none; appearance: none; padding-right: 40px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6A74' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 20px no-repeat; }

/* schedule: try-out mode + split comparison (28 Nov 2026) */
.trybar { background: var(--butter); border: var(--edge); box-shadow: var(--shadow); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; font-size: .9rem; }
.trybar .btns .btn { flex: 1; }
.splitrow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.splitbar { position: relative; display: flex; height: 18px; border-radius: 10px; overflow: visible; border: 2px solid var(--ink); margin-top: 6px; }
.splitbar i { display: block; height: 100%; }
.splitbar i:first-child { border-radius: 8px 0 0 8px; } .splitbar i:last-of-type { border-radius: 0 8px 8px 0; }
.splitbar i.a { background: var(--a); } .splitbar i.b { background: var(--b); }
.splitbar em { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; background: var(--ink); border-radius: 2px; }
.savebar { position: fixed; left: 10px; right: 10px; max-width: 540px; margin: 0 auto; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 7; }

/* How Orbit nudges (28 Nov 2026): one clean row per nudge, text left, a real switch right */
.nlist { padding: 4px 14px; }
.nrow { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.nrow:last-child { border-bottom: 0; }
.ntxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ntxt b { font-size: .98rem; line-height: 1.3; }
.nlock, .nset { font-size: .8rem; font-weight: 700; color: var(--ok); }
.nset { color: var(--ink); }
.nsw { flex: none; width: 52px; height: 32px; border-radius: 999px; background: var(--line); border: 2px solid var(--ink); position: relative; margin-top: 2px; transition: background .15s; }
.nsw i { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); transition: left .15s; box-sizing: border-box; }
.nsw.on { background: var(--ok); } .nsw.on i { left: 22px; }
.nsw.locked { opacity: .55; cursor: default; }
.wklab { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); margin: 10px 0 4px; }
.wklab + .week { margin-top: 0; }
.weekscard { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; }
.weekscard .pstrip .pc { height: 28px; display: grid; place-items: center; font-style: normal; }
.weekscard .horow:first-of-type { margin-top: 4px; }
/* joining an existing child (28 Nov 2026) */
.welc { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--butter); }
.welc .face { width: 34px; height: 34px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; font-weight: 800; flex: none; }
.welc > span:nth-child(2) { flex: 1; min-width: 0; }
.rvw.done { opacity: .75; }
details.card summary { cursor: pointer; list-style: none; }
details.card summary::after { content: " ▾"; color: var(--soft); }
/* multi-pick plan rules */
.expick { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -4px 0 8px; font-size: .85rem; }
.expick .linkbtn { background: none; border: 0; font-weight: 700; color: var(--blue, #3E7CB1); font-size: .9rem; padding: 4px 0; }
.exrule { display: flex; gap: 10px; align-items: flex-start; }
.exrule .exbox { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line); margin-top: 1px; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.exrule.on { border-style: solid; border-color: var(--ink); background: #E1ECF6; }
.exrule.on .exbox { background: var(--ink); border-color: var(--ink); color: #fff; }
.exrule.on .exbox::after { content: "✓"; }
/* handover kit: bag list + notes with the handovers */
.kitcard { padding: 4px 14px 10px; }
.kitrow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; }
.kitrow:last-of-type { border-bottom: 0; }
.kitrow .ti { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--bg, #FFF9EF); display: grid; place-items: center; font-size: 17px; }
.kitrow .tt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kitrow .tt span { font-size: .85rem; color: var(--muted, #6E6A74); }
.kitsep { margin-top: 8px; border-top: 1px dashed var(--line); }
/* share choices: kid's view and carers */
.swrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .95rem; margin: 0; color: var(--ink); }
.swrow:last-child { border-bottom: 0; }
.swrow input[type=checkbox] { width: 22px; height: 22px; flex: none; accent-color: var(--ink); margin: 0; }
.swrow.lock { color: var(--muted, #6E6A74); }
.aboutmore { margin-top: 6px; border-top: 1px dashed var(--line); }
/* About card: tap any line to edit it */
.abouthead { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: none; border: 0; padding: 2px 0 8px; color: inherit; font: inherit; }
.tool .tt .addhint { opacity: .6; font-style: italic; }
/* money: where you stand, then a clean history */
.mhero { text-align: center; padding: 18px 16px 14px; }
.mhero.even { background: #dcefe2; }
.mhero.owed { background: #E1ECF6; }
.mhero.owe { background: #FFF1C7; }
.mhero .mstat { font-weight: 700; font-size: 1.05rem; }
.mhero .mbig { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 4px 0 6px; white-space: nowrap; }
.mhero .btns { justify-content: center; margin-top: 12px; }
.mhow { margin-top: 10px; text-align: left; background: rgba(255,255,255,.6); border-radius: 12px; padding: 8px 12px; }
.mhow summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.mgrid { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 14px; margin-top: 10px; font-size: .88rem; }
.mgrid > :nth-child(3n+2), .mgrid > :nth-child(3n) { text-align: right; white-space: nowrap; }
.mlist { padding-top: 4px; padding-bottom: 4px; }
.mmonth { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #6E6A74); padding: 12px 0 2px; }
.mlist .mrow { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit; cursor: pointer; }
.mlist .mrow:last-child { border-bottom: 0; }
.mlist .mrow .mic { flex: none; width: 36px; height: 36px; border-radius: 12px; background: var(--bg, #FFF9EF); display: grid; place-items: center; font-size: 17px; }
.mlist .mrow .mtt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mlist .mrow .mtt b { font-size: .98rem; line-height: 1.3; overflow-wrap: anywhere; }
.mlist .mrow .mamt { flex: none; white-space: nowrap; font-weight: 800; font-size: 1rem; padding-top: 2px; font-variant-numeric: tabular-nums; }
.mlist .mrow .mamt.mv { color: var(--muted, #6E6A74); }
.mpill { align-self: flex-start; display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-top: 3px; }
.mpill.ok { background: #dcefe2; color: #2f6b45; }
.mpill.check { background: #FFF1C7; color: #7a5a10; }
.mpill.wait { background: #EFE9DF; color: #6E6A74; }
.mlist .mrow .mtt b, .mlist .mrow .mtt span { text-align: left; margin: 0; float: none; }
/* the child's lists: schools, health, doctors */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grid2 label { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.grid2 input { width: 100%; box-sizing: border-box; }
.ptag { align-self: flex-start; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-top: 3px; }
.ptag.now { background: #dcefe2; color: #2f6b45; }
.ptag.next { background: #E1ECF6; color: #2C5F8C; }
.ptag.soon { background: #FFF1C7; color: #7a5a10; }
.ptag.past { background: #EFE9DF; color: #6E6A74; }
.ppast summary { cursor: pointer; font-size: .85rem; color: var(--muted, #6E6A74); padding: 8px 0; }
.ppast .mrow { opacity: .65; }
#sheet .mrow .chev { align-self: center; color: var(--soft); }
/* moments in Talk and on the calendar */
.day .mo { width: 6px; height: 6px; border-radius: 50%; background: #EE8434; }
.cb.cmo { padding: 6px; max-width: 78%; }
.cb.cmo .mph, .daymo .mph { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; margin-bottom: 6px; }
.cmo .mlab { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .03em; opacity: .75; padding: 0 6px; }
.cmo .body { display: block; padding: 2px 6px 4px; }
.cmo .mfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 2px 6px 2px; font-size: .8rem; }
.cmo .heart { font-size: .8rem; }
.daymo { padding: 8px; }
.ptags { display: flex; flex-wrap: wrap; gap: 4px; }
.ptag.plan { background: #F3E8FF; color: #5b3a8a; }
.plancard { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }

/* Talk: ⋯ menu (how this conversation works) and + sheet (things you add), 29 Nov 2026 */
.cpop { position: absolute; right: 12px; top: calc(100% + 6px); width: min(300px, calc(100vw - 24px)); background: var(--card); border: var(--edge); box-shadow: 3px 3px 0 var(--ink); border-radius: 16px; padding: 2px 0; z-index: 8; }
.cpi { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 13px 14px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.cpi:last-child { border-bottom: 0; }
.cpi .ctt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cpi .ctt span { color: var(--soft); font-size: .82rem; }
.cpi .chev { color: var(--soft); font-size: 1.2rem; }
.tog { position: relative; flex: none; width: 42px; height: 26px; border-radius: 999px; background: var(--line); }
.tog i { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.tog.on { background: var(--a); } .tog.on i { left: 19px; }
.ptiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.ptile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border-radius: var(--radius); background: var(--card); border: var(--edge); box-shadow: var(--shadow); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ptile .pic { width: 44px; height: 44px; border-radius: 14px; background: var(--a-soft); display: grid; place-items: center; font-size: 1.3rem; }
.ptile .pd { color: var(--soft); font-size: .85rem; line-height: 1.35; }

/* ---- Breathing room + buttons that never split (approved 29 Nov 2026) ---- */
main { padding: 8px 20px 24px; }
h1 { margin: 10px 0 8px; }
.sub { line-height: 1.5; margin: 0 0 6px; }
h2 { margin: 34px 0 14px; }
.card { padding: 18px; margin-bottom: 16px; }
.card .row + .row, .card p + .btns, .card .muted + .btns { margin-top: 6px; }
.hero { padding: 22px; margin-bottom: 20px; }
.week { gap: 6px; margin: 12px 0 10px; }
.btns { gap: 10px; margin-top: 16px; }
.btn { white-space: nowrap; }
.btns .btn { flex: 1 1 auto; }
.btn.full { margin-top: 14px; }
.bridgy { padding: 16px; gap: 14px; margin: 16px 0; }
.bridgy b { margin-bottom: 4px; }
.opts { gap: 12px; margin-bottom: 16px; }
.opt { padding: 14px 16px; }
.chips { gap: 10px; }
.chip { white-space: nowrap; }
label { margin: 18px 0 8px; }
.moment { padding: 14px; margin-bottom: 14px; }
.tool { padding: 14px 0; gap: 14px; }
.list .item { padding: 14px 0; }
.kidhead { margin: 8px 0 18px; }
.muted.small, .small { line-height: 1.45; }
.sendrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 0; }
.sendrow .btn { padding: 12px 4px; font-size: .95rem; }
.invlink { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 12px; padding: 8px 8px 8px 12px; }
.invlink span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.invlink .btn { padding: 8px 14px; }
.invqr { display: flex; justify-content: center; } .invqr svg { width: 168px; height: 168px; background: #fff; padding: 10px; border-radius: 12px; box-sizing: content-box; }
.invcode { text-align: center; font-size: 1.8rem; font-weight: 800; letter-spacing: .2em; padding: 10px 0; background: var(--bg); border-radius: 12px; }

/* Kids tab and your own page (29 Nov 2026) */
.who.on { background: var(--a-soft); }
.kidseg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 0 4px; }
.kidseg .chip { justify-content: center; }
.kidgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.kidtile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border-radius: var(--radius); background: var(--card); border: var(--edge); box-shadow: var(--shadow); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.kidtile .kav { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; border: var(--edge); }
.kidtile span { color: var(--soft); font-size: .85rem; line-height: 1.35; }
.kidtile.add { justify-content: center; align-items: center; border-style: dashed; box-shadow: none; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: .88rem; font-weight: 700; color: var(--soft); text-decoration: underline; cursor: pointer; }

/* 29 Nov 2026: while typing in Talk the menu hides and the composer sits on the keyboard */
body.kbd .tabs { display: none; }
body.kbd #chatbar { bottom: 8px; }
body.kbd #chatbar .cbridgy { display: none; }

/* 29 Nov 2026: Ask Orbit is the same small sun pill everywhere (matches Talk), floating bottom right above the menu */
.bbar { left: auto; right: max(14px, calc(50% - 266px)); width: auto; max-width: none; height: 40px; gap: 6px; padding: 0 12px 0 4px;
        background: var(--sun); color: #2B2A33; border: 2px solid #2B2A33; box-shadow: 2px 2px 0 #2B2A33; font-size: .82rem; font-weight: 700; }
.bbar .face { width: 30px; height: 30px; background: #fff; color: #2B2A33; }
.bbar .t { flex: none; overflow: visible; }
.bbar .mi { display: none; }
body { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
