/* The Reflection Detail owner dashboard. Phone first (390 px), no sideways scroll at 320 px.
   Text is solid #000 or #fff only (no gray, no fades on text). Red #C02A2C = the one main button per screen and the New pill.
   Card anatomy and motion follow the Y&W lead dashboard: 18 px cards, one ease-out curve, chips, bottom tabs, toasts. */
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(hanken-grotesk-latin-v1.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
:root {
  --ink: #000;
  --paper: #f3f2ef;
  --card: #fff;
  --line: #dedad3;
  --line-strong: #b9b3a9;
  --track: #e6e2db;
  --red: #c02a2c;
  --red-press: #9c1f21;
  --radius: 18px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --tabs-h: 72px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink);
  font: 16px/1.45 "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-wrap: anywhere;
}
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: var(--ink); }
::placeholder { color: var(--ink); opacity: 1; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.top :focus-visible, .login-hero :focus-visible { outline-color: #fff; }

.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 16px; border: 1.5px solid var(--line-strong); border-radius: 14px;
  background: var(--card); color: var(--ink); font-size: 16px; font-weight: 800; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 120ms var(--ease-out), background-color 120ms var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn-primary { width: 100%; min-height: 58px; border-color: var(--red); background: var(--red); color: #fff; font-size: 18px; }
.btn-primary:active { background: var(--red-press); }
.btn-primary:disabled { background: var(--red-press); cursor: progress; }
.btn-dark { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn-wide { width: 100%; }
.btn-link { min-height: 48px; padding: 8px 4px; border: 0; background: none; color: var(--ink); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.icon-btn { width: 48px; height: 48px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn .i { width: 24px; height: 24px; }
.btn-back { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 12px 0 4px; margin-left: -4px; border: 0; background: none; font-size: 16px; font-weight: 800; cursor: pointer; }

/* Call / Text / Directions: icon over label, three across */
.acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.acts .btn { flex-direction: column; gap: 4px; min-height: 66px; padding: 8px 4px; font-size: 15px; }
.acts .i { width: 22px; height: 22px; }
.acts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.acts-1 { grid-template-columns: minmax(0, 1fr); }

/* ---------- header and tabs ---------- */
.top { position: sticky; top: 0; z-index: 20; background: #000; color: #fff; padding-top: env(safe-area-inset-top); }
.top-in { max-width: 760px; margin: 0 auto; padding: 8px 16px; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 48px; color: #fff; text-decoration: none; }
.brand img { width: 44px; height: 44px; flex: none; border-radius: 50%; }
.brand span { font-size: 17px; font-weight: 800; line-height: 1.15; color: #fff; }
.acct { position: relative; flex: none; }
.acct-btn { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; border-radius: 50%; background: #000; color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(260px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 10px; padding: 14px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
  transform-origin: top right; transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}
@starting-style { .acct-menu:not([hidden]) { opacity: 0; transform: scale(.96); } }
.acct-menu p { font-size: 16px; font-weight: 600; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 4px env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--line);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--tabs-h); padding: 6px 2px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 700; -webkit-tap-highlight-color: transparent;
}
.tab-ic { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.tab .i { width: 24px; height: 24px; }
.tab[aria-current="page"] { font-weight: 800; }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 4px; border-radius: 0 0 4px 4px; background: var(--ink); }
.tab-add .plus { border-radius: 50%; background: var(--red); color: #fff; }
.tab-add .plus .i { width: 24px; height: 24px; stroke-width: 2.6; }
.tab-add[aria-current="page"]::before { left: 30%; right: 30%; }

/* ---------- page ---------- */
.app #root { display: block; max-width: 760px; margin: 0 auto; padding: 4px 16px calc(var(--tabs-h) + env(safe-area-inset-bottom) + 32px); }
.h1 { margin: 18px 0 2px; font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.sub { font-size: 16px; font-weight: 600; }
.sec { margin-top: 26px; }
.sec-h { margin: 0 0 10px; font-size: 20px; font-weight: 800; line-height: 1.25; }
.sec-h3 { margin: 18px 0 8px; font-size: 17px; font-weight: 800; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: #000; color: #fff; font-size: 15px; font-weight: 800; vertical-align: 2px; font-variant-numeric: tabular-nums; }
.loading { margin-top: 28px; font-size: 17px; font-weight: 700; }
.empty { padding: 18px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); font-size: 16px; font-weight: 600; }
.empty .btn { margin-top: 12px; }
.err-box { margin-top: 24px; padding: 18px 16px; border: 2px solid var(--red); border-radius: var(--radius); background: var(--card); font-weight: 700; }
.err-box .btn { margin-top: 12px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.next-card { border: 2px solid #000; padding: 18px 16px 16px; }
.next-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 800; }
.when-big { margin-top: 10px; font-size: 26px; line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; }
.nm-big { margin-top: 2px; font-size: 21px; font-weight: 800; line-height: 1.25; }
.facts { display: grid; gap: 10px; margin-top: 14px; }
.facts li { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; font-weight: 600; line-height: 1.35; }
.facts li .i { margin-top: 1px; }
.facts b { font-weight: 800; }
.addr { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; min-height: 56px; border: 1.5px solid var(--line-strong); border-radius: 14px; color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 700; line-height: 1.3; }
.addr > span:not(.go) { flex: 1; min-width: 0; }
.addr .go { flex: none; }
.addr .go { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.notes { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--paper); font-size: 16px; font-weight: 600; }
.notes b { display: block; font-weight: 800; }
.next-card .btn-primary { margin-top: 16px; }
.next-card .acts { margin-top: 10px; }
.next-card .btn-link { display: block; width: 100%; margin-top: 4px; }

/* ---------- status pills: shape and icon, never colour only ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 3px 11px 3px 9px; border: 2px solid #000; border-radius: 999px; background: #fff; color: #000;
  font-size: 14px; font-weight: 800; line-height: 1.3; white-space: nowrap;
}
.pill .i { width: 15px; height: 15px; stroke-width: 2.6; }
.pill-new { border-color: var(--red); background: var(--red); color: #fff; }
.pill-new::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.pill-booked { border-color: #000; }
.pill-unpaid { border-color: var(--red); }
.pill-paid { border-color: #000; background: #000; color: #fff; }
.pill-closed { border-style: dashed; text-decoration: line-through; text-decoration-thickness: 2px; }

/* ---------- job rows ---------- */
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line); }
.job-row {
  width: 100%; min-height: 76px; display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 0; background: transparent;
  color: var(--ink); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 120ms var(--ease-out);
}
.job-row:active { background: var(--paper); }
.job-time { width: 92px; flex: none; display: flex; flex-direction: column; font-size: 15px; font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; }
.job-time b { font-weight: 800; }
.job-time b + span { font-weight: 600; }
.job-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.job-nm { font-size: 17px; font-weight: 800; line-height: 1.25; }
.job-what { font-size: 15px; font-weight: 600; line-height: 1.35; }
.job-main .pill { align-self: flex-start; margin-top: 4px; }
.job-go { flex: none; align-self: center; }
.day-h { margin: 22px 0 8px; font-size: 17px; font-weight: 800; }
.day-h:first-child { margin-top: 16px; }

.lead { display: flex; flex-direction: column; gap: 10px; }
.lead-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.lead .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards { display: grid; gap: 10px; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 16px;
  border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--ink);
  font-size: 16px; font-weight: 700; line-height: 1.2; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms var(--ease-out), transform 120ms var(--ease-out);
}
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { border-color: #000; background: #000; color: #fff; }
.chip .i { width: 16px; height: 16px; stroke-width: 2.8; }
.chip:not([aria-pressed="true"]) .on-mark { display: none; }
.chip small { font-size: 14px; font-weight: 600; }
/* tidy grids instead of a ragged wrap */
.chips-fill { display: grid; grid-template-columns: repeat(auto-fit, minmax(98px, 1fr)); max-width: 620px; }
.chips-range { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 480px; }
.chips-fill .chip, .chips-2 .chip, .chips-3 .chip, .chips-5 .chip { padding: 4px 8px; }
.chips-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chips-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chips-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 360px) { .chips-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.opts { display: grid; grid-template-columns: minmax(0, 1fr); }
.opts .chip { justify-content: space-between; min-height: 54px; padding: 8px 16px; border-radius: 14px; text-align: left; }
.opt-price { flex: none; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; overflow-wrap: normal; }
.opts .chip > span:first-child { min-width: 0; }

/* ---------- sheet ---------- */
dialog { color: var(--ink); }
.sheet {
  width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; padding: 0;
  border: 0; border-radius: 24px 24px 0 0; background: var(--card); overflow: auto; overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(0, 0, 0, .6); }
.sheet[open] { animation: sheet-up 240ms var(--ease-out); }
@keyframes sheet-up { from { transform: translateY(40px); } }
.sheet-in { padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -16px; padding: 10px 8px 8px 16px; background: var(--card); }
.sheet-head h2 { font-size: 22px; font-weight: 800; line-height: 1.2; }
.sheet-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 16px; font-weight: 700; }
.sheet .btn-primary { margin-top: 18px; }
.sheet .acts { margin-top: 12px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.sec-h3 + .row2 { margin-top: 0; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.row1 { display: grid; margin-top: 10px; }
.note-line { margin-top: 14px; padding: 12px 14px; border: 2px solid #000; border-radius: 14px; font-size: 16px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.note-line .i { flex: none; }
.paid-line + .btn-wide { margin-top: 8px; }
.dl { margin-top: 18px; border-top: 1px solid var(--line); }
.dl > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.dl dt { font-weight: 800; }
.dl dd { font-weight: 600; }
.dl dd a { color: var(--ink); font-weight: 800; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 48px; min-width: 48px; margin: -11px 0; }
.paid-line { margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: #000; color: #fff; font-size: 17px; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.confirm { margin-top: 12px; padding: 14px; border: 2px solid #000; border-radius: 14px; }
.confirm p { font-size: 16px; font-weight: 700; }
.history { margin-top: 6px; }
.history li { position: relative; padding: 8px 0 8px 22px; font-size: 16px; font-weight: 600; }
.history li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 9px; height: 9px; border-radius: 50%; background: #000; }
.history li + li::after { content: ""; position: absolute; left: 8px; top: -6px; height: 20px; border-left: 2px solid var(--line-strong); }
.history time { display: block; font-size: 15px; font-weight: 600; }
.history b { font-weight: 800; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.field > label, .label { font-size: 16px; font-weight: 800; }
.hint { font-size: 15px; font-weight: 600; }
.input {
  width: 100%; min-height: 54px; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--card);
  font-size: 18px; font-weight: 600; appearance: none; -webkit-appearance: none;
}
.input:focus { border-color: #000; outline: 2px solid #000; outline-offset: 0; }
select.input { padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, #000 50%), linear-gradient(135deg, #000 50%, transparent 50%); background-position: right 20px center, right 14px center; background-size: 6px 6px; background-repeat: no-repeat; }
input[type="date"].input { min-height: 54px; display: block; }
.money { position: relative; }
.money .input { padding-left: 32px; font-variant-numeric: tabular-nums; }
.money::before { content: "$"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 18px; font-weight: 800; color: var(--ink); }
.field .chips { margin: 2px 0 0; }
.msg { margin-top: 14px; padding: 12px 14px; border: 2px solid var(--red); border-radius: 12px; background: #fff; font-size: 16px; font-weight: 700; }
.total { margin-top: 16px; display: flex; justify-content: space-between; gap: 12px; padding: 14px 0 0; border-top: 2px solid #000; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.found { margin-top: 10px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 2px solid #000; border-radius: 14px; font-size: 16px; font-weight: 700; }
.or { display: flex; align-items: center; gap: 12px; margin: 22px 0 4px; font-size: 16px; font-weight: 800; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1.5px solid var(--line-strong); }
.pick-time { width: 100%; min-height: 64px; flex-direction: column; gap: 2px; border-radius: 14px; }
.pick-time small { font-size: 15px; font-weight: 600; }
.pick-time[aria-pressed="true"] small { color: #fff; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.pair .field { margin-top: 10px; }
.form-end { margin-top: 26px; }

/* ---------- numbers ---------- */
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.fig { display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.fig-label { font-size: 15px; font-weight: 700; line-height: 1.3; }
.fig-value { font-size: 34px; font-weight: 800; line-height: 1.05; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.fig-sub { font-size: 14px; font-weight: 600; }
.fig-wide { grid-column: 1 / -1; }
.fig-small { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; padding: 10px 14px; }
.fig-small .fig-value { font-size: 26px; }
.fig-small .fig-sub { flex-basis: 100%; }
.capped { margin-top: 14px; }
.visits-note { margin-top: 12px; font-size: 16px; font-weight: 600; }
.funnel { display: grid; gap: 14px; }
.bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 16px; font-weight: 700; }
.bar-top b { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar { height: 14px; margin-top: 6px; border-radius: 7px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; min-width: 4px; border-radius: 7px; background: #000; transform-origin: left; animation: grow 520ms var(--ease-out) both; }
.bar-row.last .bar i { background: var(--red); }
@keyframes grow { from { transform: scaleX(0); } }
.src li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 700; }
.src li:last-child { border-bottom: 0; }
.src b { font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 14px); z-index: 40;
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px); padding: 8px 8px 8px 18px; min-height: 56px;
  border-radius: 14px; background: #000; color: #fff; font-size: 16px; font-weight: 700; box-shadow: 0 10px 28px rgba(0, 0, 0, .3);
  transform: translateX(-50%); transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.toast span { padding: 6px 10px 6px 0; }
.toast .btn { min-height: 48px; min-width: 48px; padding: 8px 14px; border-color: #fff; background: #fff; color: #000; font-size: 15px; }
@starting-style { .toast:not([hidden]) { opacity: 0; transform: translate(-50%, 10px); } }
.toast.out { opacity: 0; transform: translate(-50%, 10px); transition-duration: 150ms; }
dialog .toast { position: fixed; }

/* ---------- sign in ---------- */
.login { background: #000; }
.login #root { display: block; max-width: 440px; margin: 0 auto; padding: calc(36px + env(safe-area-inset-top)) 16px 40px; }
.login-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fff; text-align: center; margin-bottom: 24px; }
.login-hero img { width: 120px; height: 120px; border-radius: 50%; }
.login-hero h1 { font-size: 26px; font-weight: 800; line-height: 1.2; color: #fff; }
.login-hero p { font-size: 17px; font-weight: 600; color: #fff; }
.login-card { background: var(--card); border-radius: 24px; padding: 22px 18px 20px; }
.login-card h2 { font-size: 21px; font-weight: 800; }
.login-card p { font-size: 16px; font-weight: 600; margin-top: 6px; }
.login-card .field { margin-top: 16px; }
.login-card .btn-primary { margin-top: 18px; }
#code { font-size: 28px; letter-spacing: .3em; font-variant-numeric: tabular-nums; text-align: center; }

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .sheet { max-width: 540px; max-height: 88vh; margin: auto; border-radius: 24px; }
  .sheet[open] { animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateY(16px) scale(.98); } }
  .figs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fig-wide, .fig-small { grid-column: auto; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 4px; padding: 14px; }
  .fig-small .fig-value { font-size: 34px; }
  .fig-small .fig-sub { flex-basis: auto; }
  .fig-wide .fig-value { font-size: 34px; }
  .opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  :root { --tabs-h: 0px; }
  .brand span { white-space: nowrap; }
  .top-in { max-width: 1120px; padding-left: 24px; padding-right: 24px; }
  .app #root { max-width: 1120px; padding-left: 24px; padding-right: 24px; }
  .tabs {
    position: static; flex: none; width: max-content; margin: 0 auto;
    display: flex; gap: 6px; align-items: center; padding: 0; background: transparent; border: 0;
  }
  .tab { white-space: nowrap; flex-direction: row; gap: 6px; min-height: 48px; padding: 0 16px 0 10px; border-radius: 999px; color: #fff; font-size: 16px; }
  .tab-ic { width: 24px; height: 24px; }
  .tab .i { width: 20px; height: 20px; }
  .tab[aria-current="page"] { background: #fff; color: #000; }
  .tab[aria-current="page"]::before { display: none; }
  .tab-add { background: var(--red); color: #fff; margin-left: 6px; }
  .tab-add[aria-current="page"] { background: var(--red); color: #fff; box-shadow: 0 0 0 3px #fff; }
  .tab-add .plus { width: auto; height: auto; background: none; }
  .tab-add .plus .i { width: 20px; height: 20px; }
  .top-in { min-height: 80px; }
  .toast { bottom: calc(env(safe-area-inset-bottom) + 24px); }
  .today-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .today-grid > .col > .sec:first-child { margin-top: 18px; }
  .narrow { max-width: 760px; }
  .num-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .log-form { max-width: 640px; }
}

@media (prefers-reduced-motion: reduce) {
  /* gentler, not zero: fades stay, nothing moves, grows or scales */
  *, *::before, *::after { animation: none !important; transition-property: opacity !important; }
  .btn:active, .chip:active { transform: none; }
  .toast.out { transform: translateX(-50%); }
  @starting-style { .toast:not([hidden]) { transform: translateX(-50%); } .acct-menu:not([hidden]) { transform: none; } }
}
@media (min-width: 1100px) {
  .figs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
