/* Rosie: Atomic Modern. Midcentury graphic design: linen and walnut,
   a color field per person, Bricolage Grotesque headlines, starbursts
   for stars. See DESIGN.md. */

@font-face { font-family: 'Bricolage Grotesque'; src: url('/fonts/bricolage-grotesque-latin-opsz.woff2') format('woff2-variations'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('/fonts/jost-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('/fonts/jost-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('/fonts/jost-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('/fonts/jost-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --linen: #EFEEE9;
  --paper: #FFFFFF;
  --ink: #2A211C;
  --ink-2: #6A5D54;
  --ink-3: #7A6E66;
  --rule: rgba(42, 33, 28, .1);
  --rule-2: rgba(42, 33, 28, .18);
  --turquoise: #13787B;
  --persimmon: #D9532A;
  --cobalt: #2B53A3;
  --mustard: #E2A12B;
  --mustard-soft: #F7E7C2;
  --late: #B2431F;
  --late-soft: #F8E1D8;
  --display: 'Bricolage Grotesque', 'Jost', system-ui, sans-serif;
  --text: 'Jost', 'Futura', 'Avenir Next', system-ui, sans-serif;
  --r-panel: 22px;
  --r-card: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--linen); color: var(--ink);
  font: 400 16px/1.45 var(--text); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--turquoise); }
img, svg { display: block; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; border-radius: 12px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.display { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; }

.boot { display: grid; place-items: center; align-content: center; gap: 12px; min-height: 100dvh; font: 800 40px var(--display); letter-spacing: -.02em; }
.boot-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--mustard); animation: bob 1.2s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-8px); } }

/* ---------------------------------------------------------------- shell */

.app { min-height: 100dvh; padding-bottom: calc(150px + var(--safe-b)); }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: color-mix(in srgb, var(--linen) 94%, transparent);
}
.wordmark { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 800 26px/1 var(--display); letter-spacing: -.02em; }
.top .spacer { flex: 1; }
.icon-btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--paper); color: var(--ink); text-decoration: none;
}
.icon-btn:hover { background: #F8F7F3; }
.icon-btn .count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center;
  border-radius: 10px; background: var(--persimmon); color: #fff; font: 700 12px/1 var(--text); border: 2px solid var(--linen);
}

.tabs {
  position: fixed; z-index: 30; left: 14px; right: 14px; bottom: calc(12px + var(--safe-b));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px;
  background: var(--paper); border-radius: 36px; box-shadow: 0 6px 22px rgba(42, 33, 28, .13);
}
.tab {
  display: grid; justify-items: center; align-content: center; gap: 2px; padding: 7px 2px 6px; min-height: 56px;
  border-radius: 30px; text-decoration: none; color: var(--ink-2); font: 600 12px/1.1 var(--text);
}
.tab[aria-current='page'] { background: var(--ink); color: #fff; }

main.view { max-width: 1240px; margin: 0 auto; padding: 14px 16px 24px; }
main.view:focus { outline: none; }

.ask-fab {
  position: fixed; z-index: 31; right: 16px; bottom: calc(92px + var(--safe-b));
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 58px; height: 58px; padding: 0;
  border-radius: 29px; border: 2px solid var(--ink); background: var(--mustard); color: var(--ink);
  font: 600 16px var(--text); box-shadow: 0 6px 16px rgba(42, 33, 28, .18);
}
.ask-fab span { display: none; }

@media (min-width: 960px) {
  .app { padding-bottom: 40px; }
  .top { padding: 16px 28px; gap: 18px; }
  .wordmark { font-size: 30px; }
  .tabs { position: static; display: flex; gap: 2px; padding: 5px; border-radius: 30px; box-shadow: none; }
  .tab { grid-auto-flow: column; gap: 8px; min-height: 44px; padding: 0 18px; font-size: 15px; }
  main.view { padding: 22px 28px 40px; }
  .ask-fab { width: auto; padding: 0 20px 0 14px; bottom: 28px; right: 28px; }
  .ask-fab span { display: inline; }
}

/* ---------------------------------------------------------------- type */

.day-head { display: flex; flex-direction: column; margin: 4px 0 18px; }
.day-head .hello { font: 500 16px var(--text); color: var(--ink-2); }
.day-head h1 { margin: 0; font: 800 clamp(52px, 11vw, 76px)/.95 var(--display); letter-spacing: -.035em; }
.day-head .date { font: 500 20px/1.3 var(--text); }
h2.sec { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 700 22px/1.15 var(--display); letter-spacing: -.01em; }
h2.sec .n { font: 500 15px var(--text); color: var(--ink-2); letter-spacing: 0; }
h2.sec .act { margin-left: auto; }
h3 { margin: 0; font: 600 17px/1.25 var(--text); }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
p { margin: 0 0 10px; }

/* ---------------------------------------------------------------- surfaces */

.panel { background: var(--paper); border-radius: var(--r-panel); padding: 18px 20px; }
.panel + .panel { margin-top: 16px; }
.grid-2 > .panel + .panel, .grid-3 > .panel + .panel { margin-top: 0; }
.grid-3 { display: grid; gap: 16px; }
@media (max-width: 959px) { .grid-2 > * + * { margin-top: 16px; } }
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: 1.1fr 1.15fr .95fr; align-items: start; gap: 22px; }
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 23px; border: 2px solid var(--ink); background: transparent; color: var(--ink);
  font: 600 16px/1 var(--text); text-decoration: none; white-space: nowrap; transition: transform .08s;
}
.btn:active { transform: scale(.97); }
.btn .i { width: 18px; height: 18px; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.sun { background: var(--mustard); border-color: var(--mustard); }
.btn.danger { border-color: var(--late); color: var(--late); }
.btn.small { min-height: 38px; padding: 0 15px; font-size: 14px; border-radius: 19px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link-btn { border: 0; background: none; padding: 6px 2px; font: 600 15px var(--text); color: var(--turquoise); text-decoration: underline; text-underline-offset: 3px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px 0 6px;
  border-radius: 20px; border: 0; background: var(--paper); color: var(--ink); font: 500 15px var(--text);
}
.panel .chip, .sheet .chip { background: var(--linen); }
.chip.plain { padding: 0 15px; }
.chip[aria-pressed='true'], .chip.on { background: var(--ink); color: #fff; }
.chip[aria-pressed='true'] .av { box-shadow: 0 0 0 2px #fff; border-radius: 50%; }
.scroll-x { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 10px; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { flex: 0 0 auto; }

.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; background: var(--linen); color: var(--ink-2); font: 600 13px/1 var(--text); white-space: nowrap; }
.pill .i { width: 15px; height: 15px; }
.pill.stars { background: var(--mustard-soft); color: var(--ink); }
.pill.late { background: var(--late-soft); color: var(--late); }

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

.av { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--pc); color: var(--on); }
.av b { font-family: var(--display); font-weight: 800; line-height: 1; letter-spacing: -.02em; }

/* ---------------------------------------------------------------- rows */

.list { display: grid; }
.row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.row:first-child { border-top: 0; }
.row .body { min-width: 0; }
.row .title { font: 500 17px/1.3 var(--text); overflow-wrap: anywhere; }
.row.done .title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(42, 33, 28, .35); }
.row .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.row .who { display: flex; gap: 4px; }
.row button.body { text-align: left; border: 0; background: none; padding: 0; color: inherit; }

.lamp-check { --pc: var(--ink); --on: #fff; display: grid; place-items: center; width: 44px; height: 44px; margin: -4px; border: 0; background: none; border-radius: 50%; position: relative; }
.lamp-check span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--pc); background: var(--paper); transition: background .15s, transform .15s; }
.lamp-check .i { width: 17px; height: 17px; opacity: 0; color: var(--on); }
.lamp-check[aria-checked='true'] span { background: var(--pc); }
.lamp-check[aria-checked='true'] .i { opacity: 1; }
.lamp-check:active span { transform: scale(.88); }
.multi-check { display: flex; gap: 2px; }
.multi-check .lamp-check { width: 40px; margin: -4px -3px; }
.multi-check .lamp-check b { position: absolute; font: 700 11px var(--text); color: var(--pc); }

.group-head { display: flex; align-items: center; gap: 10px; margin: 16px 0 2px; font: 600 16px var(--text); }
.group-head:first-child { margin-top: 0; }
.group-head.late { color: var(--late); }
.empty { padding: 10px 0 4px; color: var(--ink-2); }

/* ---------------------------------------------------------------- events */

.ev { --pc: var(--ink); display: grid; grid-template-columns: 12px 72px 1fr; gap: 12px; align-items: baseline; width: 100%; padding: 10px 0; border: 0; border-top: 1px solid var(--rule); background: none; text-align: left; color: inherit; }
.ev:first-child { border-top: 0; }
.ev::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--pc); align-self: center; }
.ev .t { font: 600 14px/1.3 var(--text); color: var(--ink-2); }
.ev .cap { font: 500 17px/1.3 var(--text); }
.ev .cap small { display: block; color: var(--ink-2); font-size: 14px; font-weight: 400; }
.ev.past { color: var(--ink-3); }
.ev.past .cap, .ev.past .t { color: var(--ink-3); }
.ev.now .t { color: var(--late); }
.allday { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.allday .tag { --pc: var(--ink); display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px 0 8px; border-radius: 17px; border: 0; background: var(--linen); color: var(--ink); font: 500 15px var(--text); }
.allday .tag::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--pc); }

/* The next thing on the calendar: a color field in that person's color. */
.next-up {
  --pc: var(--cobalt); --on: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 150px; padding: 18px 20px; margin-bottom: 14px; border-radius: 22px; background: var(--pc); color: var(--on);
  border: 0; width: 100%; text-align: left;
}
.next-up .disc { position: absolute; right: -42px; bottom: -66px; width: 164px; height: 164px; border-radius: 50%; background: var(--mustard); }
.next-up.mustard .disc { background: var(--persimmon); }
.next-up .orbit { position: absolute; right: 14px; top: 14px; opacity: .75; }
.next-up .lead { position: relative; font: 500 15px var(--text); }
.next-up .when { position: relative; font: 800 44px/1 var(--display); letter-spacing: -.03em; margin-top: 18px; }
.next-up .what { position: relative; font: 500 18px/1.3 var(--text); }
.next-up .what small { display: block; font-size: 15px; opacity: .9; }

/* ---------------------------------------------------------------- stars */

.meter { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 4px; width: 100%; max-width: 280px; }
.meter i { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--rule-2); }
.meter i.on { background: var(--mustard); border-color: var(--mustard); }
.meter.bar { display: block; height: 10px; border-radius: 5px; background: var(--linen); overflow: hidden; }
.meter.bar b { display: block; height: 100%; border-radius: 5px; background: var(--mustard); }

.kid-stars { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--rule); }
.kid-stars:first-of-type { border-top: 0; }
.kid-stars .count { display: flex; align-items: center; gap: 8px; font: 800 34px/1 var(--display); letter-spacing: -.03em; }
.kid-stars .goal { grid-column: 1 / -1; display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; }
.kid-stars .goal b { color: var(--ink); font-weight: 600; }

.big-kid { display: grid; gap: 14px; padding: 0; overflow: hidden; }
.big-kid .field-top { --pc: var(--cobalt); --on: #fff; position: relative; overflow: hidden; padding: 20px 22px; background: var(--pc); color: var(--on); display: flex; align-items: center; gap: 14px; }
.big-kid .field-top::after { content: ''; position: absolute; right: -60px; top: -70px; width: 170px; height: 170px; border-radius: 50%; border: 2px solid currentColor; opacity: .3; }
.big-kid .name { font: 800 34px/1 var(--display); letter-spacing: -.02em; }
.big-kid .bal { margin-left: auto; display: flex; align-items: center; gap: 8px; font: 800 54px/1 var(--display); letter-spacing: -.03em; position: relative; z-index: 1; }
.big-kid .goal-line, .big-kid .acts { padding: 0 22px; }
.big-kid .goal-line { display: grid; gap: 8px; }
.big-kid .goal-line .txt { font-size: 15px; color: var(--ink-2); }
.big-kid .goal-line .txt b { color: var(--ink); font-weight: 600; }
.big-kid .acts { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 20px; }
.ledger .row { grid-template-columns: auto 1fr auto auto; }
.delta { font: 700 17px var(--display); }
.delta.plus { color: #1D6B3A; }
.delta.minus { color: var(--late); }
.reward { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.reward:first-child { border-top: 0; }
.reward .em { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--mustard-soft); font-size: 22px; }
.reward .cost { display: flex; align-items: center; gap: 4px; font: 700 18px var(--display); }

/* ---------------------------------------------------------------- calendar */

.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.cal-bar h1 { margin: 0 auto 0 4px; font: 800 clamp(30px, 6vw, 44px)/1.05 var(--display); letter-spacing: -.03em; }
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 24px; background: var(--paper); }
.seg button { border: 0; background: none; padding: 8px 14px; border-radius: 20px; font: 600 14px var(--text); color: var(--ink-2); }
.seg button[aria-pressed='true'] { background: var(--ink); color: #fff; }
.cal-nav { display: inline-flex; gap: 6px; align-items: center; }
.cal-nav .btn { border-width: 0; background: var(--paper); }

.week { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); background: var(--paper); border-radius: var(--r-panel); overflow: hidden; }
.week .dh { padding: 10px 6px 8px; text-align: center; border-left: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font: 500 13px var(--text); color: var(--ink-2); }
.week .dh b { display: grid; place-items: center; width: 38px; height: 38px; margin: 2px auto 0; border-radius: 50%; font: 800 20px/1 var(--display); color: var(--ink); }
.week .dh.today b { background: var(--ink); color: #fff; }
.week .corner, .week .ad-label { border-bottom: 1px solid var(--rule); }
.week .ad-label { font: 500 11px var(--text); color: var(--ink-3); padding: 6px 4px; text-align: right; }
.week .ad { min-height: 10px; padding: 4px; border-left: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; gap: 3px; align-content: start; }
.week .scroller { grid-column: 1 / -1; display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); max-height: 62vh; overflow-y: auto; }
.week .hours { position: relative; }
.week .hours span { position: absolute; right: 6px; transform: translateY(-50%); font: 500 11px var(--text); color: var(--ink-3); }
.week .col { position: relative; border-left: 1px solid var(--rule); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, var(--rule) 47px, var(--rule) 48px); }
.week .col.today { background-color: rgba(226, 161, 43, .07); }
.blk {
  --pc: var(--ink); position: absolute; overflow: hidden; padding: 4px 7px; border: 0; text-align: left;
  border-radius: 10px; background: color-mix(in srgb, var(--pc) 20%, #fff); color: var(--ink); font: 500 12.5px/1.25 var(--text);
  box-shadow: 0 0 0 1.5px #fff;
}
.blk small { display: block; color: var(--ink-2); font-size: 11.5px; }
.blk.todo { background: #fff; box-shadow: inset 0 0 0 1.5px var(--pc); }
.tagmini { --pc: var(--ink); display: block; width: 100%; padding: 2px 7px; border: 0; border-radius: 8px; text-align: left; background: color-mix(in srgb, var(--pc) 20%, #fff); color: var(--ink); font: 500 12px/1.35 var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nowline { position: absolute; left: -1px; right: 0; height: 2px; background: var(--persimmon); z-index: 3; pointer-events: none; }
.nowline::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--persimmon); }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--paper); border-radius: var(--r-panel); overflow: hidden; }
.month .wd { padding: 10px 6px; text-align: center; font: 600 13px var(--text); color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.month .cell { min-height: 108px; padding: 6px; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); display: grid; align-content: start; gap: 3px; text-align: left; }
.month .cell:nth-child(7n + 1) { border-left: 0; }
.month .cell.out { background: #FAF9F6; }
.month .cell.out .num { color: var(--ink-3); }
.month .num { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; background: none; border-radius: 50%; font: 700 15px var(--display); color: var(--ink); }
.month .cell.today .num { background: var(--ink); color: #fff; }
.month .more { font: 600 12px var(--text); color: var(--ink-2); padding-left: 4px; }
.month .dots { display: none; gap: 3px; flex-wrap: wrap; }
.month .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); }
@media (max-width: 700px) {
  .month .cell { min-height: 64px; padding: 4px; }
  .month .cell .tagmini, .month .cell .more { display: none; }
  .month .dots { display: flex; padding-left: 4px; }
}

.agenda-day { margin-top: 18px; }
.agenda-day:first-child { margin-top: 0; }
.agenda-day h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 8px; font: 800 26px/1.05 var(--display); letter-spacing: -.02em; }
.agenda-day h3 span { font: 500 15px var(--text); color: var(--ink-2); letter-spacing: 0; }
.agenda-day.today h3::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--mustard); align-self: center; }

/* ---------------------------------------------------------------- sheets */

.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(42, 33, 28, .4); display: grid; align-items: end; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
.sheet { max-height: 92dvh; overflow-y: auto; background: var(--paper); border-radius: 28px 28px 0 0; padding: 10px 20px calc(22px + var(--safe-b)); animation: up .22s cubic-bezier(.2, .9, .3, 1); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--rule-2); margin: 0 auto 10px; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; flex: 1; font: 800 28px/1.1 var(--display); letter-spacing: -.02em; }
.sheet-head .icon-btn { background: var(--linen); }
@media (min-width: 700px) {
  .scrim { align-items: center; justify-items: center; padding: 24px; }
  .sheet { width: min(580px, 100%); border-radius: 28px; padding-bottom: 22px; box-shadow: 0 24px 60px rgba(42, 33, 28, .25); }
  .sheet .grab { display: none; }
}

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span, .field legend { font: 600 15px var(--text); }
fieldset.field { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.field .hint { font-size: 14px; color: var(--ink-2); }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid #CFC7BE; background: #fff; font: 500 17px var(--text); }
.input:focus { outline: 3px solid var(--mustard); outline-offset: 0; border-color: var(--ink); }
textarea.input { min-height: 84px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.days7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days7 .chip { justify-content: center; padding: 0; }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper .btn { width: 44px; padding: 0; }
.stepper output { min-width: 64px; display: flex; align-items: center; justify-content: center; gap: 6px; font: 800 28px var(--display); }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.sheet-actions .grow { flex: 1; }
.err { color: var(--late); font-weight: 600; margin: 0 0 10px; }

/* ---------------------------------------------------------------- assistant */

.chat { display: grid; grid-template-rows: 1fr auto auto; height: min(78dvh, 720px); }
.chat .msgs { overflow-y: auto; display: grid; align-content: start; gap: 10px; padding: 4px 2px 12px; }
.bubble { max-width: 86%; padding: 11px 15px; border-radius: 20px; font-size: 16px; line-height: 1.4; white-space: pre-wrap; }
.bubble.me { justify-self: end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.bubble.rosie { justify-self: start; background: var(--linen); border-bottom-left-radius: 6px; }
.act-chip { justify-self: start; display: flex; gap: 8px; align-items: flex-start; max-width: 92%; padding: 9px 13px; border-radius: 14px; background: var(--mustard-soft); font: 500 14px/1.35 var(--text); }
.act-chip .i { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.chat form { display: flex; gap: 8px; align-items: flex-end; }
.chat textarea { min-height: 50px; max-height: 140px; }
.chat form .icon-btn { background: var(--linen); flex: 0 0 auto; }
.chat form .icon-btn.go { background: var(--mustard); }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.typing { display: inline-flex; gap: 5px; padding: 14px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; } }
.mic.on { background: var(--persimmon) !important; color: #fff; }

/* ---------------------------------------------------------------- settings */

.code-box { display: flex; gap: 8px; justify-content: center; margin: 8px 0 12px; }
.code-box b { display: grid; place-items: center; width: 48px; height: 62px; border-radius: 14px; background: var(--linen); font: 800 36px var(--display); }
.switch { position: relative; width: 52px; height: 30px; flex: 0 0 auto; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 15px; background: #D8D2C9; transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(42, 33, 28, .3); transition: transform .15s; }
.switch input:checked + span { background: var(--turquoise); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 3px solid var(--mustard); outline-offset: 2px; }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.toggle-row:first-child { border-top: 0; }
.toggle-row .grow { flex: 1; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--c); }
.swatches button[aria-pressed='true'] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #2E8B57; margin-right: 6px; vertical-align: 0; }
.status-dot.bad { background: var(--persimmon); }
.status-dot.wait { background: #CFC7BE; }
.set-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 10px 0; border: 0; border-top: 1px solid var(--rule); background: none; text-align: left; color: inherit; }
.set-row:first-child { border-top: 0; }
.set-row .body { display: grid; gap: 2px; min-width: 0; }
.set-row .title { font: 500 17px/1.3 var(--text); }
.set-row .meta { font-size: 14px; color: var(--ink-2); }

/* ---------------------------------------------------------------- sign-in */

.signin { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.signin .card { width: min(440px, 100%); text-align: center; }
.signin .big { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 6px 0 2px; font: 800 80px/1 var(--display); letter-spacing: -.04em; }
.signin .tag { font: 500 19px var(--text); color: var(--ink-2); margin-bottom: 22px; }
.signin .or { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--ink-3); font-weight: 600; }
.signin .or::before, .signin .or::after { content: ''; flex: 1; height: 1px; background: var(--rule-2); }
.signin form { display: flex; gap: 8px; }
.signin .gbtn { min-height: 44px; display: flex; justify-content: center; }
.code-input { text-align: center; letter-spacing: .3em; font: 800 26px var(--display); }

/* ---------------------------------------------------------------- toast */

#toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 26px;
  background: var(--ink); color: #fff; font: 500 15px var(--text); box-shadow: 0 8px 24px rgba(42, 33, 28, .25); transition: transform .2s, opacity .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast .toast-act { border: 0; background: var(--mustard); color: var(--ink); border-radius: 14px; padding: 6px 12px; font: 700 14px var(--text); }
@media (min-width: 960px) { #toast { bottom: 32px; } }

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

.fs {
  --fs-panel: var(--paper); --fs-text: var(--ink); --fs-sub: var(--ink-2); --fs-rule: var(--rule);
  position: relative; min-height: 100dvh; padding: clamp(16px, 2.2vw, 30px); padding-top: calc(clamp(16px, 2.2vw, 30px) + var(--safe-t));
  background: var(--linen); color: var(--fs-text); display: grid; grid-template-rows: auto 1fr auto; gap: clamp(14px, 1.8vw, 24px);
}
.fs.night { --fs-panel: #2E2520; --fs-text: #F4EEE7; --fs-sub: #CBBDAF; --fs-rule: rgba(255, 255, 255, .1); background: #1E1814; }
.fs-back { position: fixed; bottom: calc(12px + var(--safe-b)); left: 12px; z-index: 5; background: var(--paper); border-width: 0; }

.fs-top { display: flex; align-items: center; gap: clamp(16px, 2vw, 30px); }
.fs-clock { display: flex; align-items: flex-start; gap: 6px; font: 800 clamp(70px, 8.6vw, 128px)/.92 var(--display); letter-spacing: -.045em; }
.fs-clock .ap { font: 600 clamp(16px, 1.7vw, 24px)/1 var(--text); letter-spacing: 0; margin-top: .45em; color: var(--fs-sub); }
.fs-date { display: grid; line-height: 1.05; }
.fs-date b { font: 700 clamp(28px, 3vw, 44px)/1 var(--display); letter-spacing: -.02em; }
.fs-date span { font: 500 clamp(18px, 1.9vw, 26px)/1.3 var(--text); color: var(--fs-sub); }
.fs-brand { margin-left: auto; display: flex; align-items: center; gap: 10px; font: 800 clamp(24px, 2.4vw, 34px)/1 var(--display); letter-spacing: -.02em; }
.fs.night .fs-brand .mark line { stroke: #F4EEE7; }

.fs-grid { display: grid; gap: clamp(12px, 1.6vw, 20px); align-items: start; }
@media (min-width: 980px) { .fs-grid { grid-template-columns: minmax(250px, .75fr) 2.6fr; } }

.fs-cal { background: var(--fs-panel); border-radius: 26px; padding: clamp(16px, 1.7vw, 24px); }
.fs-cal h2 { margin: 0 0 6px; font: 700 clamp(22px, 2.1vw, 30px)/1 var(--display); letter-spacing: -.01em; }
.fs-cal h2.tom { margin-top: 18px; font-size: clamp(18px, 1.7vw, 24px); color: var(--fs-sub); }
.fs-ev { --pc: var(--ink); display: grid; grid-template-columns: 14px 1fr; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--fs-rule); }
.fs-ev:first-of-type { border-top: 0; }
.fs-ev::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--pc); margin-top: 4px; }
.fs.night .fs-ev::before { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .5); }
.fs-ev .t { font: 600 clamp(15px, 1.4vw, 19px)/1.3 var(--text); color: var(--fs-sub); }
.fs-ev .cap { grid-column: 2; font: 500 clamp(19px, 1.8vw, 25px)/1.2 var(--text); }
.fs-ev .cap small { display: block; font-size: .7em; color: var(--fs-sub); }
.fs-ev .soon { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 12px; background: var(--pc); color: var(--on); font: 600 13px/1.5 var(--text); vertical-align: 2px; }
.fs-ev.compact .cap { font-size: clamp(16px, 1.4vw, 19px); }
.fs-empty { color: var(--fs-sub); font-size: clamp(16px, 1.5vw, 20px); margin: 6px 0; }

.fs-kids { display: grid; gap: clamp(12px, 1.5vw, 18px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); align-items: start; }
.kid-col { --pc: var(--ink); --on: #fff; background: var(--fs-panel); border-radius: 28px; overflow: hidden; }
.kid-top { position: relative; overflow: hidden; padding: 20px 20px 18px; background: var(--pc); color: var(--on); display: grid; gap: 10px; }
.kid-top::after { content: ''; position: absolute; right: -54px; top: -64px; width: 156px; height: 156px; border-radius: 50%; border: 2px solid currentColor; opacity: .3; }
.kid-name { position: relative; font: 800 clamp(30px, 2.8vw, 40px)/1 var(--display); letter-spacing: -.02em; }
.kid-meter { position: relative; display: flex; align-items: center; gap: 10px; }
.kid-count { display: flex; align-items: center; gap: 8px; font: 800 clamp(44px, 4.2vw, 58px)/1 var(--display); letter-spacing: -.03em; }
.kid-goal { font: 500 clamp(14px, 1.2vw, 16px)/1.25 var(--text); }
.kid-col.grown .kid-top { background: var(--ink); color: #fff; }
.fs.night .kid-col.grown .kid-top { background: #463A33; }
.chores { display: grid; padding: 4px 18px 10px; }
.chore {
  --pc: var(--ink); --on: #fff; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  min-height: 78px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--fs-rule); background: none; color: var(--fs-text);
  text-align: left; font: 500 clamp(19px, 1.7vw, 23px)/1.2 var(--text); touch-action: manipulation;
}
.chore:first-child { border-top: 0; }
.chore .tick { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--pc); transition: background .18s, transform .12s; }
.chore .tick svg { width: 21px; height: 21px; opacity: 0; color: var(--on); }
.chore.pressing .tick, .chore:active .tick { transform: scale(.88); }
.chore.done .tick { background: var(--pc); }
.chore.done .tick svg { opacity: 1; }
.chore .ct small { display: block; font: 500 .68em/1.3 var(--text); color: var(--fs-sub); margin-top: 3px; }
.chore.done .tt { color: var(--fs-sub); text-decoration: line-through; text-decoration-color: currentColor; }
.chore.late .ct small { color: var(--late); font-weight: 600; }
.fs.night .chore.late .ct small { color: #F3A587; }
.fs.night .chore.anyone { --pc: #F4EEE7 !important; --on: #2A211C !important; }
.chore .cs { font: 700 clamp(18px, 1.6vw, 22px)/1 var(--display); color: var(--fs-sub); }
.chore .who-dot { display: none; }
.kid-col.grown .chore { grid-template-columns: auto auto 1fr; }
.kid-col.grown .who-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--pc); color: var(--on); font: 800 15px var(--display); }
.all-done { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 18px 18px; padding: 12px; border-radius: 18px; background: var(--mustard-soft); color: var(--ink); font: 700 clamp(18px, 1.6vw, 22px)/1 var(--display); }
.fs-status { margin: 0; text-align: right; font-size: 13px; color: var(--fs-sub); }
.fs-status.warn { color: var(--persimmon); font-weight: 600; }

.fs-overlay { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(42, 33, 28, .5); }
.fs-overlay[hidden] { display: none; }
.fs-dialog { width: min(720px, 100%); background: var(--paper); color: var(--ink); border-radius: 32px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); padding: 28px; text-align: center; }
.fs-dialog h2 { margin: 0 0 6px; font: 800 42px/1.05 var(--display); letter-spacing: -.02em; }
.fs-dialog p { font-size: 22px; color: var(--ink-2); }
.fs-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 18px 0; }
.fs-pick button { display: grid; justify-items: center; gap: 8px; padding: 16px 18px 14px; min-width: 132px; border: 0; border-radius: 24px; background: var(--linen); font: 800 24px var(--display); color: var(--ink); }
.fs-pick button:active { transform: scale(.96); }
.fs-actions { display: flex; justify-content: center; gap: 12px; margin-top: 10px; }
.fs-dialog .btn { min-height: 58px; font-size: 20px; padding: 0 28px; border-radius: 29px; }

.fly { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; will-change: transform; }

@media (max-width: 979px) { .fs-top { flex-wrap: wrap; } .fs-brand { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------ money chores */
.pill.money { background: #DCEBDD; color: #1D4D2B; }
.pill.ok { background: #DCEBDD; color: #1D4D2B; }
.big-kid > .list, .big-kid > .empty, .big-kid > .pay-recent { padding: 0 22px; }
.big-kid > .list:last-child, .big-kid > .empty:last-child, .big-kid > .pay-recent:last-child { padding-bottom: 18px; }
.big-kid .bal.money { flex-direction: column; align-items: flex-end; gap: 4px; font-size: 44px; }
.big-kid .bal.money span { font: 600 14px/1 var(--text); letter-spacing: 0; opacity: .85; }
.pay-job { width: 100%; border: 0; border-top: 1px solid var(--rule); background: none; text-align: left; color: inherit; font: inherit; }
.pay-job:first-child { border-top: 0; }
.pay-job .body { display: grid; gap: 2px; }
.pay-thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--linen); display: grid; place-items: center; }
.pay-thumb.none .i { width: 24px; height: 24px; color: var(--ink-2); }
.pay-photo { display: block; width: 100%; max-height: 56vh; object-fit: contain; border-radius: 16px; background: var(--linen); margin-bottom: 14px; }
.pay-recent summary { cursor: pointer; font: 600 15px var(--text); color: var(--ink-2); padding: 6px 0; }
.money-input { display: flex; align-items: center; gap: 6px; }
.money-input > span { font: 700 20px var(--display); }
.toggle-row .i { width: 16px; height: 16px; vertical-align: -2px; }

/* ------------------------------------------------------------ a kid's phone */
.kid-app { min-height: 100dvh; padding-bottom: calc(24px + var(--safe-b, 0px)); }
.kid-head { --pc: var(--cobalt); --on: #fff; position: relative; overflow: hidden; padding: calc(16px + var(--safe-t, 0px)) 22px 24px; background: var(--pc); color: var(--on); }
.kid-head::after { content: ''; position: absolute; right: -70px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 2px solid currentColor; opacity: .28; }
.kid-brand { display: flex; align-items: center; gap: 8px; font: 800 20px/1 var(--display); letter-spacing: -.02em; }
.kid-brand .mark { background: var(--paper); border-radius: 50%; padding: 2px; }
.kid-head h1 { margin: 18px 0 0; font: 800 clamp(48px, 15vw, 72px)/.95 var(--display); letter-spacing: -.035em; position: relative; z-index: 1; }
.kid-money { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; position: relative; z-index: 1; }
.kid-money > div { display: grid; gap: 4px; }
.kid-money .amt { font: 800 34px/1 var(--display); letter-spacing: -.03em; }
.kid-money .lbl { font: 500 14px/1.2 var(--text); opacity: .9; }
.kid-main { display: grid; gap: 14px; max-width: 640px; margin: -10px auto 0; padding: 0 14px; position: relative; z-index: 2; }
.kid-main .row { grid-template-columns: 1fr auto; }
.kid-main .row .btn .i { width: 18px; height: 18px; }
.kid-note { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; background: var(--late-soft); color: var(--ink); }
.kid-note p { margin: 4px 0 0; }
.kid-coin .i { width: 26px; height: 26px; color: #1D4D2B; }
.kid-preview { display: block; width: 100%; max-height: 50vh; object-fit: contain; border-radius: 16px; background: var(--linen); margin-bottom: 12px; }
