/* Tend: the native app's look. System grouped backgrounds and the system blue tint (the screenshots show the default
   accent), the system colours HomeCategory uses, iOS 26 controls (glass toolbar buttons, the floating glass tab bar,
   capsule buttons, insetGrouped lists with large corner radii), large titles that move into the bar on scroll, sheets,
   menus, action sheets and the onboarding pager. On wide windows the iPad's NavigationSplitView: a sidebar and the
   detail. Follows the system appearance and the store's data-theme override (/mobile.js). Adapted from
   src/daily-receipt/daily-receipt.css and src/pawkeep/pawkeep.css. */
:root {
  --tint: rgb(0, 122, 255);
  --text: #000;
  --text2: rgba(60, 60, 67, 0.6);
  --text3: rgba(60, 60, 67, 0.3);
  --grouped: #f2f2f7;
  --row: #fff;
  --sep: rgba(60, 60, 67, 0.22);
  --fill: rgba(120, 120, 128, 0.16);
  --fill2: rgba(118, 118, 128, 0.12);
  --blue: rgb(0, 122, 255); --indigo: rgb(88, 86, 214); --orange: rgb(255, 149, 0); --yellow: rgb(255, 204, 0); --purple: rgb(175, 82, 222);
  --red: rgb(255, 59, 48); --teal: rgb(48, 176, 199); --green: rgb(52, 199, 89); --gray: rgb(142, 142, 147); --mint: rgb(0, 199, 190); --pink: rgb(255, 45, 85);
  --glass: rgba(255, 255, 255, 0.8);
  --glass-edge: rgba(0, 0, 0, 0.06);
  --material: rgba(255, 255, 255, 0.78);
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --tabbar-space: calc(var(--sab) + 108px);
  --side: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tint: rgb(10, 132, 255);
    --text: #fff; --text2: rgba(235, 235, 245, 0.6); --text3: rgba(235, 235, 245, 0.3);
    --grouped: #000; --row: #1c1c1e; --sep: rgba(84, 84, 88, 0.6);
    --fill: rgba(120, 120, 128, 0.36); --fill2: rgba(118, 118, 128, 0.24);
    --blue: rgb(10, 132, 255); --indigo: rgb(94, 92, 230); --orange: rgb(255, 159, 10); --yellow: rgb(255, 214, 10); --purple: rgb(191, 90, 242);
    --red: rgb(255, 69, 58); --teal: rgb(64, 200, 224); --green: rgb(48, 209, 88); --gray: rgb(142, 142, 147); --mint: rgb(99, 230, 226); --pink: rgb(255, 55, 95);
    --glass: rgba(40, 40, 42, 0.78); --glass-edge: rgba(255, 255, 255, 0.1); --material: rgba(44, 44, 46, 0.82);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --tint: rgb(10, 132, 255);
  --text: #fff; --text2: rgba(235, 235, 245, 0.6); --text3: rgba(235, 235, 245, 0.3);
  --grouped: #000; --row: #1c1c1e; --sep: rgba(84, 84, 88, 0.6);
  --fill: rgba(120, 120, 128, 0.36); --fill2: rgba(118, 118, 128, 0.24);
  --blue: rgb(10, 132, 255); --indigo: rgb(94, 92, 230); --orange: rgb(255, 159, 10); --yellow: rgb(255, 214, 10); --purple: rgb(191, 90, 242);
  --red: rgb(255, 69, 58); --teal: rgb(64, 200, 224); --green: rgb(48, 209, 88); --gray: rgb(142, 142, 147); --mint: rgb(99, 230, 226); --pink: rgb(255, 55, 95);
  --glass: rgba(40, 40, 42, 0.78); --glass-edge: rgba(255, 255, 255, 0.1); --material: rgba(44, 44, 46, 0.82);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--grouped); color: var(--text); font: 17px/1.29 var(--sys); -webkit-font-smoothing: antialiased; letter-spacing: -0.01em; }
body { overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; letter-spacing: inherit; }
button:disabled { cursor: default; }
input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }
.nav-title:focus { outline: none; }
[hidden] { display: none !important; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: inherit; }
hr { border: 0; margin: 0; }
img { -webkit-user-drag: none; }

/* ---------- type (Dynamic Type "Large") ---------- */
.t-title3 { font-size: 20px; line-height: 25px; }
.t-headline { font-size: 17px; line-height: 22px; font-weight: 600; }
.t-subheadline { font-size: 15px; line-height: 20px; }
.t-footnote { font-size: 13px; line-height: 18px; }
.t-caption { font-size: 12px; line-height: 16px; letter-spacing: 0; }
.t-caption2 { font-size: 11px; line-height: 13px; letter-spacing: 0.01em; }
.w-medium { font-weight: 500; } .w-semibold { font-weight: 600; } .w-bold { font-weight: 700; }
.c-1 { color: var(--text); } .c-2 { color: var(--text2); } .c-3 { color: var(--text3); } .c-red { color: var(--red); } .c-green { color: var(--green); } .c-orange { color: var(--orange); } .c-yellow { color: var(--yellow); }
.tint { color: var(--tint); }
.tint-soft { color: color-mix(in srgb, var(--tint) 25%, transparent); }
.center { text-align: center; }
.nowrap { white-space: nowrap; flex: none; }
.tnum { font-variant-numeric: tabular-nums; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vstack { display: flex; flex-direction: column; min-width: 0; }
.vstack.trailing { align-items: flex-end; text-align: right; }
.hstack { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hstack.top { align-items: flex-start; }
.grow { flex: 1 1 auto; min-width: 0; }
.gap1 { gap: 1px; } .gap2 { gap: 2px; } .gap3 { gap: 3px; } .gap4 { gap: 4px; } .gap5 { gap: 5px; } .gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; } .gap14 { gap: 14px; }
.pad22 { padding-left: 22px; }
.sf { display: inline-block; vertical-align: -0.125em; flex: none; overflow: visible; }
.label { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.label > .sf { font-size: 1.05em; }
.t-caption.label { gap: 4px; }

/* ---------- app frame ---------- */
#app { position: fixed; inset: 0; overflow: hidden; }
#stack { position: absolute; inset: 0 0 0 var(--side); }
#sheets { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
#sheets > * { pointer-events: auto; }
.tab-pane { position: absolute; inset: 0; overflow: hidden; }
#banner { position: absolute; left: 0; right: 0; top: 0; z-index: 45; pointer-events: none; display: flex; justify-content: center; }
#overlays { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
#overlays > * { pointer-events: auto; }
#toast { position: absolute; left: var(--side); right: 0; bottom: calc(var(--sab) + 100px); z-index: 50; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.covered { visibility: hidden; }

/* ---------- screens + nav bar ---------- */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--grouped); padding-top: var(--sat); will-change: transform; }
.screen.in-sheet { padding-top: 0; }
.navbar { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; align-items: center; gap: 8px; min-height: 60px; padding: 8px 16px; flex: none; }
.navbar::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: calc(-1 * var(--sat)); bottom: -18px; pointer-events: none;
  background: linear-gradient(var(--grouped) calc(var(--sat) + 40%), color-mix(in srgb, var(--grouped) 70%, transparent) 75%, transparent);
  opacity: 0; transition: opacity 0.2s; }
.navbar.scrolled::before { opacity: 1; }
.screen.in-sheet .navbar::before { top: 0; }
.nav-title { grid-column: 2; max-width: 240px; min-width: 0; font: 600 17px/22px var(--sys); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-title.hidden-title { visibility: hidden; }
.navbar.has-large .nav-title { opacity: 0; transition: opacity 0.18s; }
.navbar.has-large.show-title .nav-title { opacity: 1; }
.nav-leading { grid-column: 1; display: flex; align-items: center; justify-self: start; gap: 8px; }
.nav-trailing { grid-column: 3; display: flex; align-items: center; justify-self: end; gap: 8px; }
.screen-body { position: relative; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-bottom: calc(var(--sab) + 24px); scrollbar-width: thin; }
#stack .screen-body { padding-bottom: var(--tabbar-space); }
#stack .screen.has-free-banner .screen-body { padding-bottom: calc(var(--tabbar-space) + 72px); }
.large-title { font: 700 34px/41px var(--sys); letter-spacing: 0.01em; padding: 0 20px 6px; max-width: 720px; margin: 0 auto; overflow-wrap: anywhere; }
@media (min-width: 700px) { #stack .navbar { padding-left: max(16px, calc((100% - 720px) / 2)); padding-right: max(16px, calc((100% - 720px) / 2)); } }

/* iOS 26 glass toolbar buttons */
.glass { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; min-width: 44px; padding: 0 16px; border-radius: 22px; font-size: 17px; color: var(--text);
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.8); backdrop-filter: blur(16px) saturate(1.8);
  box-shadow: 0 0 0 0.5px var(--glass-edge), 0 4px 16px rgba(0, 0, 0, 0.08); transition: transform 0.15s var(--ease), opacity 0.15s; white-space: nowrap; }
.glass-icon { padding: 0; width: 44px; font-size: 21px; }
.glass .sf { font-size: 20px; }
.glass-bold { font-weight: 600; }
.glass-prominent { background: var(--tint); color: #fff; box-shadow: 0 4px 16px color-mix(in srgb, var(--tint) 30%, transparent); }
.glass-subtle { color: var(--text2); }
.glass-subtle .sf { font-size: 18px; }
.glass:active:not(:disabled) { transform: scale(0.94); }
.glass:disabled { color: var(--text3); }
.glass-prominent:disabled { background: var(--fill); color: var(--text3); box-shadow: none; }
.nav-back .sf { font-size: 19px; margin-left: -2px; }

/* ---------- buttons ---------- */
.btn-bordered { --btn: var(--tint); display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; color: var(--btn); background: var(--fill2); white-space: nowrap; font-weight: 500; transition: opacity 0.12s, transform 0.15s var(--ease); }
.btn-bordered.size-regular { min-height: 34px; padding: 0 14px; font-size: 15px; }
.btn-bordered.size-large { min-height: 50px; padding: 0 20px; font-size: 17px; font-weight: 600; width: 100%; }
.btn-bordered.prominent { background: var(--btn); color: #fff; }
.btn-bordered:active:not(:disabled) { opacity: 0.7; }
.btn-bordered:disabled { opacity: 0.5; }
.text-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--tint); min-height: 30px; }
.text-btn:disabled { color: var(--text3); }
.text-btn:active { opacity: 0.4; }
.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2.2px solid var(--fill); border-top-color: var(--text2); animation: spin 0.8s linear infinite; }
.spinner.light { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- insetGrouped list / form ---------- */
.form { padding: 4px 16px 24px; max-width: 720px; margin: 0 auto; width: 100%; }
.group { margin-top: 26px; }
.form > .group:first-child, .form > .child-legend + .group { margin-top: 8px; }
.group-header { display: flex; align-items: center; padding: 0 20px 8px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text2); }
.group-footer { padding: 8px 20px 0; font-size: 13px; line-height: 18px; color: var(--text2); }
.group-rows { background: var(--row); border-radius: 26px; overflow: hidden; }
.row { position: relative; display: flex; align-items: center; width: 100%; min-height: 52px; padding: 11px 20px; text-align: left; color: var(--text); gap: 10px; }
.group-rows > .row + .row::before { content: ""; position: absolute; left: 20px; right: 0; top: 0; border-top: 0.5px solid var(--sep); z-index: 2; }
.group-rows > .row:has(.label) + .row::before, .group-rows > .row + .row:has(> .row-main > .label)::before { left: 52px; }
.group-rows > .rec-row + .row::before, .group-rows > .swipeable + .swipeable::before { left: 40px; }
.row-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.row-btn { transition: background 0.15s; }
.row-btn:active { background: var(--fill2); }
.row-tint, .row-tint .label { color: var(--tint); }
.row-green, .row-green .label { color: var(--green); }
.row-destructive, .row-destructive .label { color: var(--red); }
.row .label > .sf, .row .label > .tint > .sf { font-size: 20px; width: 24px; }
.row-chevron { color: var(--text3); font-size: 13px; display: grid; place-items: center; flex: none; margin-right: -4px; }
.row-chevron .sf { stroke-width: 3; }
.labeled { justify-content: space-between; }
.lc-label { flex: none; max-width: 62%; }
.lc-value { color: var(--text2); text-align: right; min-width: 0; }
.lc-value.c-1 { color: var(--text); } .lc-value.c-red { color: var(--red); }
.notes-row { font-size: 17px; line-height: 22px; }
.field { flex: 1; width: 100%; min-width: 0; border: 0; outline: none; background: none; padding: 0; font-size: 17px; line-height: 22px; color: var(--text); -webkit-appearance: none; appearance: none; }
.field::placeholder { color: var(--text3); }
.field-trailing { text-align: right; }
.field-multi { resize: none; overflow: hidden; display: block; min-height: 22px; }
.picker-row { position: relative; cursor: pointer; }
.picker-value { display: inline-flex; align-items: center; gap: 5px; color: var(--text2); text-align: right; min-width: 0; }
.picker-value .sf { font-size: 13px; }
.picker-select { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 17px; }
.toggle-row { justify-content: space-between; gap: 12px; cursor: pointer; }
.toggle-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 63px; height: 28px; margin: 0; border-radius: 14px; background: var(--fill); cursor: pointer; transition: background 0.25s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 37px; height: 24px; border-radius: 12px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16), 0 0 0 0.5px rgba(0, 0, 0, 0.04); transition: transform 0.3s var(--ease); }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(22px); }
.stepper-row { justify-content: space-between; }
.stepper { display: inline-flex; align-items: center; height: 32px; border-radius: 16px; background: var(--fill2); flex: none; }
.stepper-btn { width: 50px; height: 32px; display: grid; place-items: center; font-size: 18px; color: var(--text); }
.stepper-btn:disabled { color: var(--text3); }
.stepper-btn:active:not(:disabled) { opacity: 0.4; }
.minus-bar { width: 14px; height: 2px; border-radius: 1px; background: currentColor; }
.stepper-sep { width: 1px; height: 18px; background: var(--sep); }
.date-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.date-pill { position: relative; display: inline-flex; align-items: center; height: 34px; padding: 0 11px; border-radius: 999px; background: var(--fill2); font-size: 17px; white-space: nowrap; }
.pill-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.pill-input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.label-block { display: flex; align-items: flex-start; gap: 14px; min-width: 0; text-align: left; }
.lb-icon { width: 24px; display: grid; place-items: center; font-size: 19px; color: var(--tint); padding-top: 1px; flex: none; }
.lb-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--text); }
.row-tint .lb-title { color: var(--tint); }
.unavailable { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 22px 12px; text-align: center; }
.un-icon { font-size: 44px; color: var(--text2); margin-bottom: 6px; line-height: 1; }
.un-title { font-size: 22px; line-height: 28px; font-weight: 700; }
.un-desc { font-size: 15px; line-height: 20px; color: var(--text2); max-width: 440px; }
.hdr-split { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.hdr-count { font-size: 12px; line-height: 16px; font-weight: 400; color: var(--text2); }

/* swipe actions */
.swipeable { padding: 0 !important; overflow: hidden; display: block; }
.swipe-inner { position: relative; z-index: 1; background: var(--row); display: flex; align-items: center; min-width: 0; }
.swipe-inner > .row { flex: 1; }
.swipe-side { position: absolute; top: 0; bottom: 0; width: 0; display: flex; overflow: hidden; z-index: 0; }
.swipe-side.lead { left: 0; } .swipe-side.trail { right: 0; justify-content: flex-end; }
.swipe-act { flex: 1 0 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.swipe-act .sf { font-size: 20px; }

/* ---------- Home ---------- */
.home-header { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text2); }
.hh-icon { display: inline-grid; place-items: center; font-size: 12px; }
.hh-icon .sf { stroke-width: 2.4; }
.group-header:has(.home-header) { padding-bottom: 6px; font-size: 12px; }
.overdue-pill { font-size: 11px; line-height: 13px; font-weight: 700; color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); padding: 2px 5px; border-radius: 999px; }
.att-icon, .nudge-icon { display: grid; place-items: center; font-size: 17px; flex: none; }
.nudge-icon { font-size: 22px; align-self: flex-start; }
.nudge-row { align-items: flex-start; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.nudge-x { color: var(--text3); font-size: 12px; width: 28px; height: 28px; display: grid; place-items: center; flex: none; margin: -4px -8px 0 0; }
.inbox-tile { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 15px; flex: none;
  background: linear-gradient(color-mix(in srgb, var(--tint) 80%, #fff), var(--tint)); }
.cost-row { gap: 24px; padding-top: 10px; padding-bottom: 10px; }
.cost-stat { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.cs-label { font-size: 11px; line-height: 13px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text3); }
.cs-value { font-size: 20px; line-height: 25px; font-weight: 700; }
.record-row { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; padding: 2px 0; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rr-name { font-size: 17px; line-height: 22px; }
.rr-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-home { justify-content: center; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 8px; text-align: center; width: 100%; }
.es-icon { font-size: 56px; line-height: 1; }
.center-empty { min-height: 60vh; display: grid; place-items: center; padding: 32px; max-width: 520px; margin: 0 auto; }
.free-banner { position: absolute; z-index: 5; left: calc(16px + var(--side-banner, 0px)); right: 16px; bottom: calc(var(--sab) + 96px); max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 16px; text-align: left;
  background: var(--material); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); box-shadow: 0 0 0 0.5px var(--glass-edge), 0 6px 24px rgba(0, 0, 0, 0.1); }
.fb-lock { color: var(--orange); font-size: 15px; display: grid; place-items: center; }

/* ---------- Record detail ---------- */
.cat-label .sf { font-size: 20px; }
.thumbs-row { padding: 8px 16px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 0; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: none; width: 88px; height: 88px; border-radius: 8px; overflow: hidden; }
.att-thumb { display: block; width: 100%; height: 100%; }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-thumb.doc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--fill2); }
.att-doc-icon { font-size: 26px; display: grid; place-items: center; }
.att-ext { font-size: 11px; font-weight: 700; color: var(--text2); }
.timeline-row { align-items: stretch; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.timeline-row .swipe-inner, .swipeable .swipe-inner > .timeline-row { align-items: stretch; }
.tl-rail { width: 8px; flex: none; display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tint); margin-top: 6px; flex: none; }
.tl-line { width: 2px; flex: 1; background: color-mix(in srgb, var(--tint) 20%, transparent); margin-bottom: -15px; }
.tl-body { padding-bottom: 14px; }
.timeline-row.last .tl-body { padding-bottom: 0; }
.group-rows > .swipeable:has(.timeline-row) + .swipeable::before, .group-rows > .swipeable:has(.timeline-row) + .row::before { display: none; }
.group-rows > .swipeable:has(.timeline-row.last) + .row::before { display: block; left: 20px; }
.empty-history { gap: 14px; padding-top: 14px; padding-bottom: 14px; }
.eh-icon { font-size: 24px; color: color-mix(in srgb, var(--tint) 50%, transparent); display: grid; place-items: center; }
.viewer .screen-body { padding-bottom: 0; }
.viewer-image { position: absolute; inset: 0; background: #000; display: grid; place-items: center; }
.viewer-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-doc { position: absolute; inset: 0; display: flex; }
.pdf-frame { flex: 1; border: 0; width: 100%; height: 100%; background: #fff; }
.viewer-missing { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; text-align: center; }
.screen.viewer { background: var(--grouped); }

/* ---------- Search ---------- */
.search-form { padding-top: 0; }
.search-bar { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 14px; margin: 2px 0 14px; border-radius: 22px; background: var(--fill2); }
.sb-glass { color: var(--text2); font-size: 17px; display: grid; place-items: center; }
.search-input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 17px; color: var(--text); -webkit-appearance: none; appearance: none; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-input::placeholder { color: var(--text2); }
.search-clear { color: var(--text3); font-size: 17px; display: grid; place-items: center; }
.search-results > .group:first-child { margin-top: 4px; }
.nl-header { display: inline-flex; align-items: center; gap: 4px; }
.nl-icon { width: 30px; font-size: 20px; display: grid; place-items: center; flex: none; align-self: flex-start; padding-top: 2px; }
.nl-icon20 { width: 20px; display: grid; place-items: center; font-size: 17px; flex: none; }
.nl-icon16 { width: 16px; display: grid; place-items: center; font-size: 15px; flex: none; }
.nl-last-row { align-items: flex-start; gap: 12px; }
.status-badge { font-size: 11px; line-height: 13px; font-weight: 700; padding: 2px 6px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.try-asking { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 12px; background: color-mix(in srgb, var(--text2) 8%, transparent); margin-top: 8px; }
.ta-title { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text2); }
.ta-row { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text2); }
.ta-icon { width: 18px; display: grid; place-items: center; }
.no-results { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 64px 16px; }

/* ---------- Inbox ---------- */
.capture-row { align-items: flex-end; gap: 8px; padding-top: 13px; padding-bottom: 13px; }
.capture-field { flex: 1; max-height: 90px; overflow-y: auto; }
.cap-btn { font-size: 24px; width: 28px; height: 28px; display: grid; place-items: center; flex: none; margin-bottom: -3px; transition: transform 0.25s var(--ease); }
.cap-btn.recording { color: var(--red); animation: bounce 0.4s var(--ease); }
@keyframes bounce { 50% { transform: scale(1.18); } }
.smart-row { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.inbox-photo { width: 100%; object-fit: cover; display: block; }
.teaser { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 22px; }
.teaser .sf { font-size: 12px; }
.suggest-card { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 10px; background: color-mix(in srgb, var(--tint) 7%, transparent); text-align: left; }
.suggest-card:active { opacity: 0.7; }
.sc-plus { font-size: 22px; display: grid; place-items: center; flex: none; }
.cat-tile { display: grid; place-items: center; flex: none; font-size: 15px; background: color-mix(in srgb, var(--c) 12%, transparent); }
.activity-row .cat-tile { background: color-mix(in srgb, var(--c) 10%, transparent); }
.dedup .t-caption2 .sf, .suggest-card .t-caption2 .sf { font-size: 10px; }
.create-instead { align-self: flex-start; padding-left: 4px; min-height: 22px; }
.file-manually { min-height: 22px; }
.nowrap-row { flex-wrap: nowrap; overflow: hidden; }
.sug-icon { width: 20px; display: grid; place-items: center; font-size: 18px; }

/* ---------- Lists ---------- */
.lists-empty { min-height: 62vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; }
.le-icon { font-size: 52px; line-height: 1; }
.le-text { max-width: 320px; }
.list-emoji { font-size: 22px; line-height: 28px; width: 30px; text-align: center; flex: none; }
.list-row { padding-top: 13px; padding-bottom: 13px; }
.item-row { gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.check-btn { font-size: 22px; width: 26px; height: 26px; display: grid; place-items: center; color: var(--text2); flex: none; transition: transform 0.25s var(--ease); }
.check-btn.on { color: var(--tint); }
.check-btn:active { transform: scale(0.85); }
.item-text { font-size: 17px; line-height: 22px; }
.item-row.checked .item-text { color: var(--text2); text-decoration: line-through; }
.item-more { color: var(--text3); font-size: 20px; width: 28px; height: 28px; display: grid; place-items: center; flex: none; }
.assignee { flex: none; }
.pts-chip { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--orange); background: color-mix(in srgb, var(--yellow) 18%, transparent); padding: 2px 6px; border-radius: 999px; flex: none; }
.pts-chip .sf { font-size: 10px; }
.approve-btn { font-size: 12px; font-weight: 600; color: #fff; background: var(--tint); border-radius: 999px; padding: 3px 10px; flex: none; }
.approve-line { flex-wrap: wrap; }
.add-item-row { gap: 10px; }
.add-plus { font-size: 20px; display: grid; place-items: center; }
.checked-toggle { display: flex; align-items: center; gap: 6px; width: 100%; color: var(--text2); font-weight: 600; }
.checked-toggle .sf { font-size: 12px; }
.group.collapsed .group-rows { display: none; }
.clear-checked { color: var(--red); }

/* ---------- Family calendar ---------- */
.child-legend { display: flex; gap: 12px; padding: 4px 20px 0; flex-wrap: wrap; }
.child-legend .sf { font-size: 10px; }
.family-row { padding-top: 14px; padding-bottom: 14px; }
.fam-icon { font-size: 19px; width: 24px; display: grid; place-items: center; flex: none; }
.rsvp { display: flex; gap: 8px; flex-wrap: wrap; }
.rsvp-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 5px 8px; border-radius: 999px; background: var(--fill2); color: var(--text); }
.rsvp-btn.on { background: var(--tint); color: #fff; }
.rsvp-btn .sf { font-size: 12px; }
.child-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }

/* ---------- Settings ---------- */
.privacy-row { gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.pr-icon { font-size: 24px; display: grid; place-items: center; flex: none; }

/* ---------- Paywall ---------- */
.paywall .screen-body { padding-bottom: calc(var(--sab) + 32px); }
.paywall-col { display: flex; flex-direction: column; align-items: stretch; max-width: 520px; margin: 0 auto; padding: 0 20px; }
.pw-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 4px 4px 28px; }
.pw-badge { width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; font-size: 44px; color: var(--tint); background: color-mix(in srgb, var(--tint) 12%, transparent); }
.pw-title { font: 700 34px/41px var(--sys); }
.pw-features { display: flex; flex-direction: column; gap: 14px; padding: 0 4px 28px; }
.pw-feature { display: flex; align-items: flex-start; gap: 14px; }
.pw-sym { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-size: 15px; flex: none; background: color-mix(in srgb, var(--c) 12%, transparent); }
.pw-plans { display: flex; flex-direction: column; gap: 10px; padding-bottom: 24px; }
.plan-card { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--row); box-shadow: inset 0 0 0 2px transparent; }
.plan-card.selected { background: color-mix(in srgb, var(--tint) 8%, var(--row)); box-shadow: inset 0 0 0 2px var(--tint); }
.plan-badge { font-size: 11px; font-weight: 700; color: #fff; background: var(--tint); padding: 2px 6px; border-radius: 999px; }
.pw-cta { display: grid; place-items: center; height: 52px; border-radius: 14px; background: var(--tint); color: #fff; font-size: 17px; font-weight: 600; }
.pw-cta:active { opacity: 0.8; }
.pw-owned { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; color: var(--green); font-weight: 600; }
.pw-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 16px; }

/* ---------- TabView (iOS 26 floating glass tab bar) ---------- */
.tabbar { position: absolute; z-index: 10; left: 50%; bottom: calc(var(--sab) + 18px); transform: translateX(-50%); width: min(calc(100% - 32px), 440px); display: grid; grid-template-columns: repeat(6, 1fr); padding: 4px; border-radius: 34px;
  background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: 0 0 0 0.5px var(--glass-edge), 0 8px 30px rgba(0, 0, 0, 0.12); --i: 0; }
.tab-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 6); border-radius: 30px; background: var(--fill); transform: translateX(calc(var(--i) * 100%)); transition: transform 0.38s var(--ease); }
.tab-item { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 54px; border-radius: 30px; color: var(--text); min-width: 0; }
.tab-item.on { color: var(--tint); }
.tab-icon { position: relative; font-size: 22px; height: 26px; display: grid; place-items: center; }
.tab-label { font-size: 10px; line-height: 12px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.tab-item:active .tab-icon { transform: scale(0.92); }
.tab-badge { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 17px; font-weight: 600; text-align: center; }
html.onboarding-open .tabbar { visibility: hidden; }

/* ---------- NavigationSplitView sidebar (wide windows) ---------- */
.sidebar { display: none; }
@media (min-width: 900px) {
  :root { --side: 300px; --tabbar-space: calc(var(--sab) + 32px); }
  .tabbar { display: none; }
  .sidebar { display: flex; flex-direction: column; position: absolute; z-index: 11; left: 0; top: 0; bottom: 0; width: var(--side); padding: calc(var(--sat) + 10px) 12px 16px; background: var(--grouped); border-right: 0.5px solid var(--sep); }
  .side-head { padding: 52px 8px 12px; }
  .side-title { font: 700 34px/41px var(--sys); letter-spacing: 0.01em; }
  .side-list { display: flex; flex-direction: column; gap: 2px; }
  .side-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 12px; font-size: 17px; color: var(--text); }
  .side-item:hover { background: var(--fill2); }
  .side-item.on { background: var(--tint); color: #fff; }
  .side-icon { width: 24px; display: grid; place-items: center; font-size: 19px; color: var(--tint); }
  .side-item.on .side-icon { color: #fff; }
  .side-badge { font-size: 15px; color: var(--text2); }
  .side-item.on .side-badge { color: rgba(255, 255, 255, 0.85); }
  .free-banner { bottom: calc(var(--sab) + 20px); }
  #toast { bottom: calc(var(--sab) + 24px); }
}

/* ---------- sheets ---------- */
.sheet-wrap { position: absolute; inset: 0; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.25); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--sat) + 10px); display: flex; flex-direction: column; background: var(--grouped); border-radius: 38px 38px 0 0; overflow: hidden; box-shadow: 0 -2px 30px rgba(0, 0, 0, 0.12); transition: top 0.4s var(--ease); }
.sheet[data-detent="medium"] { top: 50%; }
.sheet-grabber { display: none; }
.sheet-stack { position: relative; flex: 1; }
.sheet .navbar { padding-top: 14px; }
.sheet .screen-body { padding-bottom: calc(var(--sab) + 32px); }
.sheet .form > .group:first-child { margin-top: 4px; }
@media (min-width: 700px) {
  .sheet { top: 50% !important; left: 50%; right: auto; bottom: auto; width: min(580px, calc(100% - 48px)); height: min(820px, calc(100% - 64px)); translate: -50% -50%; border-radius: 32px; }
  .sheet .navbar { padding-top: 10px; }
}

/* ---------- toast, banner, alert, action sheet, menu ---------- */
.toast { display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(560px, 100%); padding: 12px 18px; border-radius: 999px; color: #fff; background: rgba(0, 0, 0, 0.86); font-size: 16px; pointer-events: auto; opacity: 0; transform: translateY(20px); transition: opacity 0.25s, transform 0.35s var(--ease); }
.toast.on { opacity: 1; transform: none; }
.toast-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast > .grow { display: none; }
.toast-undo { font-weight: 600; color: #fff; }
.banner { pointer-events: auto; position: relative; width: calc(100% - 16px); max-width: 520px; margin-top: calc(var(--sat) + 8px); padding: 12px 14px; border-radius: 24px; background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); box-shadow: 0 0 0 0.5px var(--glass-edge), 0 12px 36px rgba(0, 0, 0, 0.18); transform: translateY(-140%); transition: transform 0.4s var(--ease); }
.banner.on { transform: none; }
.banner-main { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding-right: 26px; }
.banner-icon { width: 38px; height: 38px; border-radius: 9px; overflow: hidden; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 20px; flex: none; }
.banner-icon img { width: 100%; height: 100%; display: block; }
.banner-x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; display: grid; place-items: center; color: var(--text2); font-size: 13px; }
.alert-wrap { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.3); padding: 24px; }
.alert { width: 300px; max-width: 100%; border-radius: 30px; overflow: hidden; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); padding: 22px 18px 16px; text-align: left; }
.alert-title { font-weight: 600; font-size: 17px; }
.alert-message { font-size: 15px; line-height: 20px; margin-top: 6px; color: var(--text); }
.alert-field { display: block; width: 100%; margin-top: 14px; padding: 10px 14px; border-radius: 14px; border: 0; outline: none; background: var(--fill2); font-size: 17px; color: var(--text); }
.alert-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.alert-buttons.two { flex-direction: row; }
.alert-btn { flex: 1; min-height: 48px; border-radius: 24px; background: var(--fill2); font-size: 17px; font-weight: 500; text-align: center; color: var(--text); }
.alert-btn:not(.cancel):not(.destructive) { background: var(--tint); color: #fff; font-weight: 600; }
.alert-buttons:not(.two) .alert-btn.cancel:only-child { background: var(--tint); color: #fff; font-weight: 600; }
.alert-btn.destructive { color: var(--red); }
.alert-btn:active { opacity: 0.7; }
.as-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; background: rgba(0, 0, 0, 0.3); padding: 8px 8px calc(var(--sab) + 8px); }
.action-sheet { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 8px; }
.as-group { border-radius: 28px; overflow: hidden; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 0 0 0.5px var(--glass-edge); }
.as-head { padding: 14px 18px 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.as-title { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--text2); }
.as-message { font-size: 13px; line-height: 18px; color: var(--text2); }
.as-btn { display: block; width: 100%; min-height: 57px; font-size: 20px; text-align: center; color: var(--tint); border-top: 0.5px solid var(--sep); }
.as-group > .as-btn:first-child { border-top: 0; }
.as-btn.destructive { color: var(--red); }
.as-cancel { font-weight: 600; border-top: 0; }
.as-btn:active { background: var(--fill2); }
.menu-scrim { position: absolute; inset: 0; }
.menu { position: fixed; min-width: 230px; max-width: 300px; border-radius: 22px; overflow: hidden; padding: 6px 0; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 0 0 0.5px var(--glass-edge), 0 16px 48px rgba(0, 0, 0, 0.22); transform-origin: top right; }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 44px; padding: 10px 18px; font-size: 17px; }
.menu-item .sf { font-size: 18px; }
.menu-item:active, .menu-item:focus-visible { background: var(--fill2); outline: none; }
.menu-item.destructive { color: var(--red); }
.menu-divider { height: 8px; background: var(--fill2); margin: 4px 0; }

/* ---------- onboarding (TabView .page) ---------- */
.onboarding { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--row); padding-top: var(--sat); }
.ob-store { position: absolute; top: calc(var(--sat) + 8px); left: 16px; z-index: 2; }
.ob-pager { flex: 1; overflow: hidden; touch-action: pan-y; }
.ob-track { display: flex; height: 100%; transition: transform 0.45s var(--ease); }
.ob-page { flex: 0 0 100%; display: flex; flex-direction: column; align-items: center; gap: 32px; padding: 16px 16px calc(var(--sab) + 56px); overflow-y: auto; -webkit-user-select: none; user-select: none; }
.ob-spacer { flex: 1 1 0; min-height: 8px; }
.ob-symbol { font-size: 72px; line-height: 1; display: grid; place-items: center; }
.ob-text { display: flex; flex-direction: column; gap: 12px; text-align: center; max-width: 440px; padding: 0 8px; }
.ob-title { font: 700 22px/28px var(--sys); }
.ob-message { font-size: 15px; line-height: 20px; color: var(--text2); }
.ob-fields { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 440px; padding: 0 16px; }
.ob-field { width: 100%; height: 36px; padding: 0 10px; border-radius: 6px; border: 0.5px solid var(--sep); background: var(--row); font-size: 17px; color: var(--text); outline: none; -webkit-user-select: text; user-select: text; }
.ob-field:focus { border-color: var(--tint); }
.ob-field::placeholder { color: var(--text3); }
.ob-button { width: calc(100% - 32px); max-width: 440px; min-height: 50px; border-radius: 999px; background: var(--tint); color: #fff; font-size: 17px; font-weight: 600; text-align: center; flex: none; transition: transform 0.15s var(--ease), opacity 0.15s; }
.ob-button:active { transform: scale(0.97); opacity: 0.9; }
.ob-dots { position: absolute; left: 0; right: 0; bottom: calc(var(--sab) + 18px); display: flex; justify-content: center; gap: 9px; }
.ob-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text3); transition: background 0.25s; }
.ob-dot.on { background: var(--text); }

/* mobile.js gives touch buttons a 40 px minimum; these compact iOS controls keep their own size */
html.touch #app .stepper-btn, html.touch #app .tab-item, html.touch #app .check-btn, html.touch #app .item-more, html.touch #app .nudge-x, html.touch #app .cap-btn,
html.touch #app .approve-btn, html.touch #app .rsvp-btn, html.touch #app .teaser, html.touch #app .file-manually, html.touch #app .create-instead, html.touch #app .ob-dot,
html.touch #app .banner-x, html.touch #app .search-clear, html.touch #app .text-btn, html.touch #app .checked-toggle, html.touch #app .clear-checked, html.touch #app .swipe-act { min-height: 0; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }
.group-rows > .row + :is(.att-row, .task-row)::before { left: 48px; }
.group-rows > .row + .nudge-row::before { left: 54px; }
.act-when { white-space: nowrap; flex: none; text-align: right; }
