/* PawKeep — the native app's look (Support/Theme.swift: warm paper, forest green, a coral for anything that needs
   attention; New York serif titles) on iOS 26 system controls (glass toolbar buttons, insetGrouped lists with large
   corner radii, capsule switches/steppers/segments). Colours are Theme.swift exactly; system colours are UIKit's.
   Follows the system appearance and the store's data-theme override set by /mobile.js. */
:root {
  --canvas: rgb(246, 242, 233);            /* Theme.canvas light (0.965, 0.949, 0.914) */
  --card: #fff;                             /* Theme.card */
  --forest: rgb(19, 74, 48);                /* Theme.forest (0.075, 0.29, 0.19) = AccentColor */
  --forest-deep: rgb(10, 51, 33);           /* Theme.forestDeep */
  --cream: rgb(250, 243, 226);              /* Theme.cream */
  --coral: rgb(219, 92, 61);                /* Theme.coral (0.86, 0.36, 0.24) */
  --tint: var(--forest);
  --text: #000;
  --text2: rgba(60, 60, 67, 0.6);
  --text3: rgba(60, 60, 67, 0.3);
  --grouped: #f2f2f7;                       /* systemGroupedBackground */
  --row: #fff;                              /* secondarySystemGroupedBackground */
  --sep: rgba(60, 60, 67, 0.22);
  --hairline: rgba(0, 0, 0, 0.08);          /* Theme.hairline */
  --fill: rgba(120, 120, 128, 0.16);
  --fill2: rgba(118, 118, 128, 0.12);
  --green: rgb(52, 199, 89); --red: rgb(255, 59, 48); --orange: rgb(255, 149, 0);
  --glass: rgba(255, 255, 255, 0.82);
  --glass-edge: rgba(0, 0, 0, 0.05);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Charter", Georgia, "Times New Roman", serif;
  --rounded: ui-rounded, "SF Pro Rounded", var(--sys);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: rgb(14, 19, 17); --card: rgb(28, 34, 31); --forest: rgb(117, 199, 153); --coral: rgb(250, 133, 102);
    --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.55); --hairline: rgba(255, 255, 255, 0.08);
    --fill: rgba(120, 120, 128, 0.32); --fill2: rgba(118, 118, 128, 0.24);
    --green: rgb(48, 209, 88); --red: rgb(255, 69, 58); --orange: rgb(255, 159, 10);
    --glass: rgba(44, 44, 46, 0.78); --glass-edge: rgba(255, 255, 255, 0.08); --shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: rgb(14, 19, 17); --card: rgb(28, 34, 31); --forest: rgb(117, 199, 153); --coral: rgb(250, 133, 102);
  --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.55); --hairline: rgba(255, 255, 255, 0.08);
  --fill: rgba(120, 120, 128, 0.32); --fill2: rgba(118, 118, 128, 0.24);
  --green: rgb(48, 209, 88); --red: rgb(255, 69, 58); --orange: rgb(255, 159, 10);
  --glass: rgba(44, 44, 46, 0.78); --glass-edge: rgba(255, 255, 255, 0.08); --shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--canvas); 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; }
ul { margin: 0; padding: 0; list-style: none; }
hr.divider { border: 0; border-top: 0.5px solid var(--sep); margin: 0; }
.inset18 { margin: 0 18px !important; } .inset50 { margin-left: 50px !important; } .inset62 { margin-left: 62px !important; }

/* ---------- type (Dynamic Type "Large") ---------- */
.t-34 { font-size: 34px; line-height: 1.12; } .t-32 { font-size: 32px; line-height: 1.12; } .t-28 { font-size: 28px; line-height: 1.15; }
.t-26 { font-size: 26px; line-height: 1.15; } .t-22 { font-size: 22px; line-height: 1.2; }
.serif { font-family: var(--serif); font-weight: 600; letter-spacing: -0.005em; }
.t-title { font-size: 28px; line-height: 34px; } .t-title2 { font-size: 22px; line-height: 28px; }
.t-headline { font-size: 17px; line-height: 22px; font-weight: 600; }
.body { font-size: 17px; line-height: 22px; }
.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-2 { color: var(--text2); } .c-3 { color: var(--text3); } .c-red { color: var(--red); } .c-green { color: var(--green); } .c-orange { color: var(--orange); }
.tint { color: var(--tint); } .coral { color: var(--coral); } .o8 { opacity: 0.8; }
.center { text-align: center; } .pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vstack { display: flex; flex-direction: column; min-width: 0; }
.hstack { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hstack.top { align-items: flex-start; } .center-items { align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; } .full { width: 100%; }
.gap1 { gap: 1px; } .gap2 { gap: 2px; } .gap3 { gap: 3px; } .gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; } .gap14 { gap: 14px; }
.mt4 { margin-top: 4px; } .mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .pv4 { padding: 4px 0; }
.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; }
.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); }
.big-sym { font-size: 22px; display: grid; place-items: center; }

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

/* ---------- screens + nav bar ---------- */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--grouped); padding-top: var(--sat); will-change: transform; }
.screen.canvas, .screen.home { background: var(--canvas); }
.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::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; pointer-events: none; background: linear-gradient(var(--bar-fade, transparent), transparent); opacity: 0; transition: opacity 0.2s; }
.navbar.scrolled::after { opacity: 1; }
.screen { --bar-fade: color-mix(in srgb, var(--grouped) 85%, transparent); }
.screen.canvas, .screen.home { --bar-fade: color-mix(in srgb, var(--canvas) 85%, transparent); }
.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; }
.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; }

/* 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: 21px; }
.glass-bold { font-weight: 600; }
.glass-subtle { color: var(--text2); }
.glass-subtle .sf { font-size: 19px; }
.ob-store { position: absolute; top: calc(var(--sat) + 8px); left: 16px; z-index: 2; }
.glass:active:not(:disabled) { transform: scale(0.94); }
.glass:disabled { color: var(--text3); }
.nav-back .sf { font-size: 19px; margin-left: -2px; }

/* ---------- content columns ---------- */
.col { display: flex; flex-direction: column; gap: 16px; padding: 4px 16px 16px; max-width: 720px; margin: 0 auto; width: 100%; }
.home-col { padding-top: 0; }
.home-head { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.eyebrow { font-size: 11px; line-height: 13px; font-weight: 700; letter-spacing: 1.1px; color: var(--forest); }
.col > .eyebrow { margin-top: 4px; margin-bottom: -4px; }

/* Theme.Card */
.card { background: var(--card); border-radius: 24px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); width: 100%; text-align: left; overflow: hidden; }
.card-link { display: flex; align-items: center; gap: 12px; padding: 18px; transition: transform 0.15s var(--ease); }
.card-link:active { transform: scale(0.985); }
.tile-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--forest) 11%, transparent); color: var(--forest); font-size: 20px; flex: none; }
.row-chevron { color: var(--text3); font-size: 13px; display: grid; place-items: center; flex: none; }
.row-chevron .sf { stroke-width: 3; }

/* PetAvatar */
.pet-avatar { position: relative; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; background: color-mix(in srgb, var(--forest) 12%, var(--card)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7); }
.pet-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pa-glyph { color: var(--forest); display: grid; place-items: center; }

/* Theme buttons */
.btn-primary, .btn-secondary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 0 14px; border-radius: 16px; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; transition: opacity 0.12s, transform 0.15s var(--ease); }
.btn-primary { --btn: var(--coral); background: var(--btn); color: #fff; }
.btn-primary:active { opacity: 0.8; }
.btn-secondary { background: color-mix(in srgb, var(--forest) 11%, transparent); color: var(--forest); }
.btn-secondary:active { background: color-mix(in srgb, var(--forest) 20%, transparent); }
.btn-primary .label, .btn-secondary .label { gap: 6px; min-width: 0; }
.btn-primary .label-text, .btn-secondary .label-text { overflow: hidden; text-overflow: ellipsis; }
.btn-bordered { --btn: var(--tint); display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 999px; color: var(--btn); background: color-mix(in srgb, var(--btn) 14%, transparent); white-space: nowrap; font-weight: 500; transition: opacity 0.12s; }
.btn-bordered.size-regular { min-height: 34px; padding: 0 14px; font-size: 15px; }
.btn-bordered.size-small { min-height: 28px; padding: 0 11px; font-size: 13px; }
.btn-bordered.size-large { min-height: 50px; padding: 0 20px; font-size: 17px; font-weight: 600; width: 100%; }
.btn-bordered.t-caption { font-size: 12px; min-height: 30px; padding: 0 11px; font-weight: 500; }
.btn-bordered.prominent { background: var(--btn); color: #fff; }
.btn-bordered:active { opacity: 0.7; }
.btn-bordered.plainish { background: transparent; }
.text-btn { color: var(--tint); min-height: 30px; }
.text-btn:active { opacity: 0.4; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; font-size: 19px; margin: -6px -6px -6px 0; }
.icon-btn.tint { color: var(--tint); }
.icon-btn:active { opacity: 0.4; }
.plain { display: block; }

/* ---------- home ---------- */
.welcome { display: flex; flex-direction: column; gap: 18px; padding-top: 40px; }
.welcome-icon { font-size: 44px; color: var(--coral); line-height: 1; }
.welcome .btn-secondary { margin-top: 0; }
.pet-card { padding: 0 !important; }
.phc-head { display: flex; align-items: center; gap: 14px; padding: 18px; width: 100%; text-align: left; }
.phc-head:active, .phc-diary:active { background: var(--hairline); }
.phc-diary { display: block; width: 100%; padding: 14px 18px; text-align: left; }
.kind-dot { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-size: 13px; flex: none; }
.kind-dot .sf { font-size: 14px; }
.mini-bars { display: flex; align-items: flex-end; gap: 2px; height: 24px; flex: none; }
.mini-bars > span { width: 4px; border-radius: 1.5px; }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 0 18px 14px; scrollbar-width: none; }
.chip-scroll::-webkit-scrollbar { display: none; }
.due-chip { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 7px 10px; border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0; color: var(--forest); background: color-mix(in srgb, var(--forest) 11%, transparent); white-space: nowrap; }
.due-chip.over { color: var(--coral); background: color-mix(in srgb, var(--coral) 11%, transparent); }
.phc-actions { display: flex; gap: 10px; padding: 0 18px 18px; }
.sync-status { display: flex; align-items: center; justify-content: center; gap: 6px; padding-top: 4px; }
.search-field { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 20px; background: var(--fill2); color: var(--text2); }
.search-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: 17px; color: var(--text); -webkit-appearance: none; appearance: none; }
.search-input::placeholder { color: var(--text2); }
.pressed-long { transform: scale(0.97); transition: transform 0.2s var(--ease); }

/* ---------- insetGrouped list / form ---------- */
.list { padding-top: 4px; }
.list.col { gap: 0; }
.form { padding: 4px 16px 24px; max-width: 720px; margin: 0 auto; width: 100%; }
.group { margin-top: 24px; }
.list > .group:first-child, .form > .group:first-child, .form > .scan-pages + .group { margin-top: 8px; }
.group-header { padding: 0 20px 8px; font-size: 17px; line-height: 22px; 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; }
.screen.canvas .group-rows { background: var(--row); }
.row { position: relative; display: flex; align-items: center; width: 100%; min-height: 52px; padding: 12px 20px; text-align: left; color: var(--text); gap: 10px; }
.group-rows > .row + .row::before, .group-rows > .row + .swipeable::before { content: ""; position: absolute; left: 20px; right: 0; top: 0; border-top: 0.5px solid var(--sep); z-index: 1; }
.group-rows > .row + .row::before, .group-rows > .row + .swipeable::before { right: 20px; }
.group-rows > .row:has(> .row-main > .label-block, > .row-main > .label, > .label-block, > .label) + .row::before { left: 58px; }
.row > .hstack, .row > .vstack, .row > .label-block { flex: 1 1 auto; }
.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-destructive { color: var(--red); }
.row-badge { color: var(--text2); font-size: 17px; }
.labeled { justify-content: space-between; }
.lc-label { flex: none; max-width: 60%; }
.lc-value { color: var(--text2); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.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, .q-input::placeholder { color: var(--text3); }
.field-multi { resize: none; overflow: hidden; display: block; min-height: 22px; }
.field-trailing { text-align: right; }
.field-row { padding-top: 15px; padding-bottom: 15px; }
.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; }
.toggle-text .label { color: var(--text); }
.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.orange:checked { background: var(--orange); }
.switch:checked::after { transform: translateX(22px); }
.switch:active::after { width: 41px; }
.switch:checked:active::after { transform: translateX(18px); }
.date-row { padding-top: 8px; padding-bottom: 8px; }
.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: 36px; padding: 0 12px; 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; }
.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); }
.segmented { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); width: 100%; height: 34px; padding: 2px; border-radius: 17px; background: var(--fill2); isolation: isolate; }
.seg { position: relative; z-index: 1; display: grid; place-items: center; line-height: 1; font-size: 14px; font-weight: 500; text-align: center; border-radius: 15px; }
.seg.on { font-weight: 600; }
.seg-thumb { position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / var(--n)); border-radius: 15px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); transform: translateX(calc(var(--i) * 100%)); transition: transform 0.32s var(--ease); }
:root[data-theme="dark"] .seg-thumb { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg-thumb { background: #636366; } }
.unavailable { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 22px 12px; text-align: center; }
.un-icon { font-size: 40px; 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; }
.un-actions { margin-top: 12px; }
.center-fill { min-height: 70%; display: grid; place-items: center; padding: 24px; }
.chip-row-wrap { padding: 6px 12px; min-height: 0; }
.quick-picks { padding: 0; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0; }
.mono-text { font: 12px/1.45 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text2); white-space: pre-wrap; user-select: text; }

/* swipe to delete */
.swipeable { padding: 0 !important; overflow: hidden; }
.swipe-inner { flex: 1; display: flex; align-items: center; min-width: 0; padding: 12px 20px; background: var(--row); position: relative; z-index: 1; min-height: 52px; }
.swipe-delete { position: absolute; right: 0; top: 0; bottom: 0; width: 0; background: var(--red); color: #fff; font-size: 15px; font-weight: 500; overflow: hidden; white-space: nowrap; display: grid; place-items: center; }

/* ---------- pet detail ---------- */
.detail-header { margin-top: 4px; padding: 4px 0; }
.avatar-btn { position: relative; display: inline-block; flex: none; }
.camera-badge { position: absolute; right: 0; bottom: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--forest); color: #fff; display: grid; place-items: center; font-size: 11px; }
.summary-row { padding-top: 14px; padding-bottom: 14px; }
.facts { display: flex; flex-direction: column; gap: 4px; }
.facts li { display: flex; gap: 6px; }
.fact-dot { color: var(--tint); }
.overdue-tag { font-size: 11px; font-weight: 700; color: var(--red); }
.med-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 2px; }
.med-actions .text-btn { font-size: 12px; min-height: 28px; }
.med-actions .label { gap: 4px; }
.prev-sub { display: flex; flex-direction: column; gap: 3px; padding-left: 38px; margin-top: 3px; }
.group-rows > .row:has(.prev-sub) { flex-direction: column; align-items: stretch; gap: 0; }
.chart-row { padding-top: 10px; padding-bottom: 10px; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis { font: 11px var(--sys); fill: var(--text2); letter-spacing: 0; }
.chart .grid { stroke: var(--hairline); stroke-width: 1; }
.chart .grid.dashed { stroke: var(--sep); stroke-dasharray: 2 3; stroke-width: 0.6; }
.weight-chart .line { fill: none; stroke: var(--tint); stroke-width: 2.4; stroke-linecap: round; }
.weight-chart .point { fill: var(--tint); }
.group > .questions-card { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); }

/* ---------- diary / patterns ---------- */
.big-icon { font-size: 34px; line-height: 1; }
.kind-tile { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 20px; flex: none; }
.pattern-chart-wrap { margin: 0 -2px; }
.stats { display: flex; gap: 8px; }
.stat { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--k) 9%, transparent); }
.pattern-card .text-btn { align-self: flex-start; }
.timeline .tl-row { padding: 12px 16px; }
.timeline .tl-row:active { background: var(--hairline); }
.severe-tag { font-size: 11px; font-weight: 700; color: var(--coral); background: color-mix(in srgb, var(--coral) 12%, transparent); padding: 2px 6px; border-radius: 999px; }
.video-thumb { position: relative; display: inline-grid; place-items: center; flex: none; overflow: hidden; background: color-mix(in srgb, var(--forest-deep) 85%, transparent) center / cover no-repeat; }
.vt-play { display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, 0.45); border-radius: 50%; line-height: 1; }
.vt-play.big { background: none; font-size: 30px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4)); }

/* ---------- AddEventSheet ---------- */
.kind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 0; }
.kind-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 14px; color: var(--k); background: color-mix(in srgb, var(--k) 12%, transparent); transition: transform 0.15s var(--ease), background 0.2s; }
.kind-btn .sf { font-size: 20px; height: 24px; }
.kind-btn.on { background: var(--k); color: #fff; }
.kind-btn:active { transform: scale(0.95); }
.kind-name { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.timer-row { padding-top: 18px; padding-bottom: 18px; }
.timer-clock { font: 600 56px/1 var(--rounded); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.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.big { width: 28px; height: 28px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- vet brief ---------- */
.brief-head { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 26px; color: var(--cream); background: linear-gradient(var(--forest-deep), rgb(23, 84, 54)); }
.brief-head .pet-avatar { background: rgba(255, 255, 255, 0.12); }
.brief-head .pa-glyph { color: var(--cream); }
.next-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); font-size: 13px; font-weight: 600; }
.brief-facts { display: flex; flex-direction: column; gap: 7px; }
.brief-facts li { display: flex; align-items: baseline; gap: 8px; }
.bf-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.7; flex: none; transform: translateY(-2px); }
.video-strip { display: flex; gap: 12px; overflow-x: auto; padding: 0 2px; scrollbar-width: none; }
.video-card { display: flex; flex-direction: column; gap: 6px; text-align: left; flex: none; }
.questions { display: flex; flex-direction: column; }
.q-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; }
.q-check, .q-plus { font-size: 21px; color: var(--forest); line-height: 1; flex: none; display: grid; place-items: center; height: 20px; }
.q-plus { color: var(--coral); }
.q-text { flex: 1; text-align: left; }
.q-input { flex: 1; min-width: 0; border: 0; outline: none; background: none; resize: none; font-size: 15px; line-height: 20px; padding: 0; overflow: hidden; color: var(--text); }
.q-asked { padding: 12px 16px; }
.disclosure { display: flex; align-items: center; width: 100%; gap: 6px; min-height: 22px; }
.disc-chev { color: var(--tint); font-size: 12px; transition: transform 0.25s var(--ease); display: grid; place-items: center; }
.disc-chev .sf { stroke-width: 3; }
.disc-chev.open { transform: rotate(90deg); }
.q-asked-item { display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%; }
.q-asked-item .label .sf { color: var(--text2); }
.q-answer { padding-left: 30px; }

/* report (printable vet brief) */
.screen.report-cover { background: var(--grouped); }
.report-scroll { padding: 8px 16px 32px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.paper { width: 100%; max-width: 612px; background: #fff; color: #111; padding: 32px 28px; border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12); font-size: 13px; line-height: 1.4; }
.paper h1 { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.paper h3 { font-size: 13px; font-weight: 700; color: #ff9500; margin: 16px 0 5px; }
.paper ul { padding-left: 1.1em; list-style: disc; }
.paper li { margin-bottom: 3px; }
.paper .muted { font-size: 12px; color: #6b6b70; margin: 6px 0 14px; }
.paper .attachment { margin-top: 24px; border-top: 1px dashed #ccc; padding-top: 18px; }
.paper .attachment img { max-width: 100%; display: block; margin: 12px auto 0; }
.report-actions { width: 100%; max-width: 612px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- documents ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 16px; max-width: 980px; margin: 0 auto; }
.doc-tile { display: flex; flex-direction: column; gap: 4px; text-align: left; min-width: 0; }
.doc-thumb { display: block; height: 170px; border-radius: 10px; overflow: hidden; background: var(--fill2); }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doc-detail .screen-body { background: color-mix(in srgb, var(--text) 4%, var(--grouped)); }
.zoom-wrap { overflow: auto; padding: 16px; height: 100%; touch-action: pan-x pan-y; }
.doc-full { display: block; width: 100%; max-width: none; margin: 0 auto; border-radius: 4px; transition: width 0.25s var(--ease); }

/* ---------- scan ---------- */
.scan-choose { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 28px 24px; max-width: 520px; margin: 0 auto; }
.scan-icon { font-size: 56px; line-height: 1; }
.scan-icon .sf { stroke-width: 1.2; }
.scan-buttons { width: 100%; }
.scan-pages { display: flex; gap: 10px; overflow-x: auto; padding: 8px 4px 0; }
.scan-pages img { height: 120px; border-radius: 10px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15); flex: none; }
.scan-vaccine .date-row, .scan-vaccine .picker-row, .scan-vaccine .labeled { padding: 0; min-height: 32px; }
.scan-vaccine .labeled { font-size: 15px; }
.reading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 70%; padding: 24px; }
.reading-page { max-height: 260px; max-width: 80%; border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }

/* ---------- Today's care ---------- */
.care-icon { width: 24px; display: grid; place-items: center; font-size: 17px; padding-top: 2px; flex: none; }
.care-row { padding-top: 12px; padding-bottom: 12px; }
.care-actions { flex-wrap: wrap; padding-left: 32px; }
.care-row > .vstack { width: 100%; }
.care-row .care-actions + * { margin-left: 32px; }
.care-row .vstack > .btn-bordered { align-self: flex-start; margin-left: 32px; }

/* ---------- paywall ---------- */
.paywall-col { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 24px 16px 24px; max-width: 520px; margin: 0 auto; text-align: center; min-height: 100%; }
.pw-icon { font-size: 50px; line-height: 1; }
.pw-features { display: flex; flex-direction: column; gap: 14px; text-align: left; padding: 0 8px; }
.pw-feature { display: flex; align-items: flex-start; gap: 12px; }
.pw-sym { width: 28px; display: grid; place-items: center; font-size: 19px; flex: none; padding-top: 1px; }
.pw-spacer { flex: 1; min-height: 8px; }
.pw-owned { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-weight: 600; }
.pw-buy { width: 100%; align-items: center; }
.pw-buy .btn-bordered { min-height: 58px; }
.pw-fine { padding: 0 8px; }

/* ---------- 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 { position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--text3); z-index: 5; opacity: 0.6; }
.sheet-stack { position: relative; flex: 1; }
.sheet .navbar { padding-top: 14px; }
.cover { position: absolute; inset: 0; background: var(--grouped); }
.cover-stack { position: absolute; inset: 0; }
.screen.video-cover { background: #000; color: #fff; }
.screen.video-cover .screen-body { display: grid; place-items: center; padding: 0; }
.screen.video-cover .nav-title { color: #fff; }
.screen.video-cover .glass { background: rgba(60, 60, 60, 0.7); color: #fff; }
.player { width: 100%; max-height: 100%; background: #000; }
@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-grabber { display: none; }
  .sheet .navbar { padding-top: 10px; }
  .sheet-wrap .sheet { animation: none; }
}

/* ---------- toast, banner, alert, menu ---------- */
.toast { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 560px; padding: 12px 16px; border-radius: 999px; color: #fff; background: rgba(0, 0, 0, 0.86); font-size: 17px; 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-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: 10px; background: var(--forest); color: #fff; display: grid; place-items: center; font-size: 20px; flex: none; }
.banner-x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; display: grid; place-items: center; color: var(--text2); font-size: 13px; }
.banner-actions { display: flex; gap: 8px; margin-top: 10px; }
.banner-act { flex: 1; text-align: center; padding: 0 6px; min-height: 34px; border-radius: 17px; background: var(--fill2); font-size: 14px; font-weight: 600; color: var(--tint); }
.banner-act.destructive { color: var(--red); }
.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-btn.destructive { color: var(--red); }
.alert-btn:active { opacity: 0.7; }
.menu-scrim { position: absolute; inset: 0; }
.menu { position: fixed; min-width: 240px; 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 center; }
.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:active, .menu-item:focus-visible { background: var(--fill2); outline: none; }
.menu-item.destructive { color: var(--red); }

/* ---------- onboarding ---------- */
.onboarding { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--canvas); padding-top: var(--sat); padding-bottom: var(--sab); }
.ob-pager { flex: 1; overflow: hidden; touch-action: pan-y; outline: none; }
.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; justify-content: center; gap: 18px; padding: 24px 0; user-select: none; -webkit-user-select: none; }
.ob-icon { font-size: 56px; color: var(--coral); line-height: 1; }
.ob-text { padding: 0 32px; max-width: 560px; }
.ob-dots { align-self: center; display: flex; gap: 9px; padding: 6px 10px; border-radius: 999px; background: var(--fill2); margin-bottom: 12px; }
html.touch #app .ob-dots button, html.touch #app .q-check, html.touch #app .stepper-btn, html.touch #app .seg, html.touch #app .disclosure, html.touch #app .icon-btn, html.touch #app .banner-x, html.touch #app .kind-btn { min-height: 0; }
.ob-dots button { width: 8px; height: 8px; border-radius: 50%; background: var(--text3); transition: background 0.2s; }
.ob-dots button[aria-selected="true"] { background: var(--text); }
.ob-bottom { padding: 16px; max-width: 560px; width: 100%; margin: 0 auto; }

/* ---------- motion, print ---------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }
#print-root { display: none; }
@media print {
  @page { size: letter; margin: 0; }
  html, body { height: auto; overflow: visible; background: #fff; }
  #app { display: none !important; }
  #print-root { display: block !important; color: #111; padding: 42px; }
  #print-root h1 { font-size: 22pt; font-weight: 700; margin: 0 0 6px; }
  #print-root h3 { font-size: 13pt; font-weight: 700; margin: 16px 0 5px; }
  #print-root ul { list-style: disc; padding-left: 1.1em; }
}
