/* Luxe. PWA — the only place colours live (more.css styles chat/profile with
   these tokens). Premium and calm: Marcellus everywhere ("Luxe Serif", with Jost
   digits so 0 never reads as O), the wordmark's orange as the accent, plain
   line icons with no coloured backgrounds, and only solid fills. Phone first. */

/* ── Fonts ──────────────────────────────────────────────────────────────── */

/* Jost: numbers, prices, references and times. */
@font-face {
  font-family: Jost; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/jost-latin-wght.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Jost; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/jost-latin-ext-wght.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Marcellus: the wordmark. */
@font-face {
  font-family: Marcellus; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/marcellus-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Marcellus; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/marcellus-latin-ext-400.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Luxe Serif: Marcellus letters + Jost digits, for all text. */
@font-face {
  font-family: 'Luxe Serif'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/jost-latin-wght.woff2) format('woff2'); unicode-range: U+0030-0039;
}
@font-face {
  font-family: 'Luxe Serif'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/marcellus-latin-400.woff2) format('woff2');
  unicode-range: U+0000-002F, U+003A-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Luxe Serif'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/marcellus-latin-ext-400.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Tokens (dark default; boot.js sets data-theme) ─────────────────────── */

:root {
  color-scheme: dark;
  --bg: #0F0F14; --surface: #1A1A22; --surface2: #24242E;
  --line: #2A2A35; --line2: #383846; --dashed: #4A4A5A;
  --text: #F5F4FA; --muted: #A09EAD; --faint: #75737F;
  --note-text: #D9D7E3; --swatch-text: #F5F4FA;

  /* Accent: a deeper take on the wordmark's orange, with white text on it. */
  --accent-fill: #F2652E; --accent-text: #FF9A70; --on-accent: #FFFFFF;
  --brand-orange: #FF6A3D; /* the wordmark dot — also unread/live dots only */
  --accent-soft: #3A2218; --accent-soft-ink: #FFB898;
  --accent-ring: rgba(255, 106, 61, .35);

  --success: #3DD9A0; --error: #FF7A6B; --mint: #3DD9A0; --coral: #FF8A5C;
  --scrim: rgba(5, 5, 10, .6); --glass: rgba(15, 15, 20, .82);
  --card-border: 1px solid var(--line); --shadow: none;
  /* Light mode outlines surfaces with a hairline; dark keeps its fills, no extra edges. */
  --hairline: var(--line); --edge: inset 0 0 0 0 transparent; --input-border: transparent;
  --ph: #1A1A22; --thumb: #0F0F14; --track: #1A1A22; --in-card: #0F0F14;
  --banner: #1F1B2E; --pager-dot: rgba(255, 255, 255, .45);

  /* Soft tints for STATUS PILLS only (1 = the accent's soft pair). */
  --tint-1: var(--accent-soft); --tint-ink-1: var(--accent-soft-ink);
  --tint-2: #3D1E2D; --tint-ink-2: #FFB3CD;
  --tint-3: #172D40; --tint-ink-3: #A9D8FF;
  --tint-4: #3A3018; --tint-ink-4: #FFE29E;
  --tint-5: #14352B; --tint-ink-5: #9DEFCB;
  --tint-6: #3E2419; --tint-ink-6: #FFC1A6;

  --body: 'Luxe Serif', Georgia, serif;
  --display: 'Luxe Serif', Georgia, serif;
  --brand: Marcellus, Georgia, serif;
  --num: Jost, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --code: ui-monospace, 'SF Mono', 'Roboto Mono', Menlo, Consolas, monospace;

  /* Size and space: one compact scale, so the whole app tightens or loosens together.
     Controls look small but every one keeps a --tap hit area (see "Hit areas"). */
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 20px; --pill: 999px;
  --gutter: 20px;
  --control-h: 48px;    /* buttons, inputs, selects */
  --control-sm: 44px;   /* compact buttons, the search bar, attachment buttons */
  --chip-h: 36px;       /* chips, line chips (segmented buttons sit 2px under it) */
  --icon-btn: 40px;     /* round icon buttons (their hit area stays --tap) */
  --tap: 44px;          /* the smallest hit area anywhere */
  --card-pad: 16px;     /* cards, list cards, sheets' inner blocks */
  --row-card-pad: 12px 14px; /* cards that read as one row: pieces, the chat peek, pinned threads */
  --row-y: 10px;        /* vertical padding of list rows (two lines ≈ 58px) */
  --gap-sm: 10px; --gap: 14px; --section-gap: 18px;
  --fs-display: 28px;   /* Home's question */
  --fs-h1: 25px;        /* page titles */
  --fs-h2: 21px;        /* sheet titles, the big card titles */
  --fs-h3: 18px;        /* section titles, card titles */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: calc(56px + var(--safe-bottom));

  /* Motion with weight: things start gently, travel, then settle — never snap,
     never bounce about. The two springs are damped-spring step responses from
     rest, x(t) = 1 − e^(−ζωt)(cos ω_d t + ζω/ω_d · sin ω_d t), sampled into linear().
       --spring       ζ .8, ω 8: quick, ≤ 1.5 % overshoot. Things that enter or pop
                      (sheets, toasts, popovers, badges, bubbles) and press release.
       --spring-soft  ζ 1 (critically damped), ω 7.5: no overshoot, heavy long settle.
                      Page entrances, lists, progress, photo reveals, hover lifts.
       --glide        gentle start, long tail: things travelling across distance.
       --ease-exit    short accelerate-away: anything leaving.
     Older engines get cubic-bezier stand-ins (@supports block below). */
  --spring: linear(0, .0059 1.4%, .0245 2.9%, .0556 4.6%, .1008 6.5%, .1435 8%, .1979 9.7%, .4288 16.6%, .5322 19.9%, .6302 23.3%, .7121 26.5%, .78 29.6%, .8376 32.9%, .8858 36.1%, .9253 39.6%, .9582 43.5%, .983 47.6%, 1 52.3%, 1.0101 57.5%, 1.0138 62.2%, 1.0139 68%, 1);
  --spring-soft: linear(0, .0051 1.4%, .0205 2.9%, .0465 4.5%, .0831 6.3%, .1182 7.8%, .1628 9.6%, .3591 16.8%, .4511 20.3%, .5385 24.1%, .6149 27.7%, .6787 31.2%, .7344 34.8%, .7835 38.5%, .826 42.3%, .8682 47%, .9033 52.2%, .9317 57.8%, .9543 64%, .9715 71%, .9843 78.9%, .9935 88.3%, 1);
  --glide: cubic-bezier(.32, .72, 0, 1);
  --ease-exit: cubic-bezier(.4, 0, 1, 1);
  --ease-out: var(--spring-soft); /* older name, kept for existing rules */
  --t-fast: .2s; --t-base: .45s; --t-slow: .8s;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A09EAD' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface2: #F4F4F6;
  --line: #EBEBF0; --line2: #DCDCE4; --dashed: #C9C9D4;
  --text: #121217; --muted: #6E6E7A; --faint: #9A9AA6;
  --note-text: #3A3A44; --swatch-text: #121217;

  --accent-fill: #E4511B; --accent-text: #C2410C; --on-accent: #FFFFFF;
  --brand-orange: #FF6A3D;
  --accent-soft: #FFEDE5; --accent-soft-ink: #B8431B;
  --accent-ring: rgba(255, 106, 61, .3);

  --success: #149266; --error: #D93F2B; --mint: #16B67E; --coral: #FF6A3D;
  --scrim: rgba(18, 18, 23, .32); --glass: rgba(255, 255, 255, .86);
  --hairline: #E6E6EC; --edge: inset 0 0 0 1px var(--hairline); --input-border: var(--hairline);
  --card-border: 1px solid var(--hairline); --shadow: 0 1px 2px rgba(18, 18, 23, .04), 0 6px 20px rgba(18, 18, 23, .05);
  --ph: #F4F4F6; --thumb: #F4F4F6; --track: #F4F4F6; --in-card: #F4F4F6;
  --banner: #15121E; --pager-dot: rgba(18, 18, 23, .25);

  --tint-2: #FFE8F0; --tint-ink-2: #C02866;
  --tint-3: #E3F2FF; --tint-ink-3: #1A68B5;
  --tint-4: #FFF3D4; --tint-ink-4: #8F6200;
  --tint-5: #DDF6EC; --tint-ink-5: #0F7A54;
  --tint-6: #FFEAE1; --tint-ink-6: #B8431B;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6E7A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* Studio (body.ops, web/static/ops) builds on this file but keeps its own, roomier
   scale: the client app's compact values stop at its door (see also "Studio keeps
   its scale" at the end of this file). */
body.ops {
  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 24px;
  --control-h: 54px; --control-sm: 48px; --chip-h: 38px; --icon-btn: 44px;
  --card-pad: 18px; --row-card-pad: 14px 16px; --row-y: 14px;
  --gap-sm: 12px; --gap: 16px; --section-gap: 24px;
  --fs-display: 34px; --fs-h1: 30px; --fs-h2: 25px; --fs-h3: 21px;
}
@media (min-width: 600px) { body.ops { --gutter: 28px; } }
@media (min-width: 960px) { body.ops { --gutter: 40px; --fs-display: 50px; --fs-h1: 38px; --fs-h3: 21px; --section-gap: 24px; } }

/* No linear() easing (Safari < 17.2 and friends): closest cubic-bezier fits. */
@supports not (transition-timing-function: linear(0, 1)) {
  :root { --spring: cubic-bezier(.42, .8, .02, 1); --spring-soft: cubic-bezier(.26, .28, .12, 1); }
}

/* ── Base ───────────────────────────────────────────────────────────────── */

/* Scrollbars: thin and quiet, inside their container (client app + Studio). */
* { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--faint); }
::-webkit-scrollbar-corner { background: transparent; }

*, *::before, *::after { box-sizing: border-box; }
/* Marcellus has one weight; never let the browser fake a bold. */
html { -webkit-text-size-adjust: 100%; background: var(--bg); font-synthesis-weight: none; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.45 var(--body); letter-spacing: .005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; font-weight: inherit; }
:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Type ───────────────────────────────────────────────────────────────── */

.micro { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.micro.sm { font-size: 12px; }
.micro.accent { color: var(--accent-text); }
.brand-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.accent { color: var(--accent-text); }
.success { color: var(--success); }
.strike { text-decoration: line-through; color: var(--faint); }
.wordmark { font-family: var(--brand); line-height: 1; letter-spacing: .02em; color: var(--text); }
.wordmark .dot { color: var(--brand-orange); }
.help { font-size: 13px; line-height: 1.45; color: var(--muted); }
.foot-note { font-size: 12px; color: var(--faint); text-align: center; }

/* Headings: Luxe Serif at its one weight, sized for hierarchy. */
.home-q, .header h1, .section-title, .product-body h1, .sheet .sheet-head h2, .state h3, .drop-card .title {
  font-family: var(--display); font-weight: 400; letter-spacing: 0;
}
.section-title { font-size: var(--fs-h3); }

/* Numbers in Jost; payment codes (.bank-val.code) in a face with a distinct zero. */
.money, .ticket-amt, .split-amt, .need-amt, .tl-when, .peek-time, .voice-time, .ref, .input.code {
  font-family: var(--num); letter-spacing: 0;
}
.money { white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.bank-val { white-space: nowrap; }
.bank-val.code { font-family: var(--code); font-size: .95em; }

/* ── Shell ──────────────────────────────────────────────────────────────── */

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; background: var(--bg); }
.app.has-tabs { padding-bottom: calc(var(--tabbar-h) + 8px); }
.main { min-width: 0; }
.screen { display: flex; flex-direction: column; min-height: 100%; }
.sidenav { display: none; }
.pad { padding-left: var(--gutter); padding-right: var(--gutter); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; gap: 8px; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: var(--gap-sm); } .gap-16 { gap: var(--gap); } .gap-22 { gap: var(--section-gap); }
.spread { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cols { display: flex; flex-direction: column; gap: var(--gap); }

.header { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-top) + 12px) var(--gutter) 10px; }
.header h1 {
  font-size: var(--fs-h1); line-height: 1.15; min-width: 0;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.header h1.ref { font-family: var(--num); font-size: 22px; font-weight: 500; letter-spacing: .01em; }
.header .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* ── Icons ──────────────────────────────────────────────────────────────── */

svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.xs { width: 13px; height: 13px; stroke-width: 2.25; }
svg.i.lg { width: 22px; height: 22px; }
/* A plain line icon in the accent — never a coloured disc. */
.badge-ic { width: 32px; height: 32px; flex: none; border-radius: var(--pill); display: inline-flex; align-items: center; justify-content: center; color: var(--accent-text); }

.icon-btn {
  width: var(--icon-btn); height: var(--icon-btn); flex: none; border-radius: var(--pill); border: 0; padding: 0;
  background: var(--surface); color: var(--text); position: relative; box-shadow: var(--edge);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn.on-photo { background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.icon-btn.accent { background: var(--accent-fill); color: var(--on-accent); box-shadow: none; }
.icon-btn .badge-dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 5px; background: var(--brand-orange); box-shadow: 0 0 0 2px var(--surface); }

/* ── Buttons, links ─────────────────────────────────────────────────────── */

.btn {
  height: var(--control-h); width: 100%; padding: 0 18px; border: 0; border-radius: var(--r);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 15px/1 var(--body); letter-spacing: .02em;
  transition: transform var(--t-base) var(--spring), opacity .15s, background-color .15s, filter .15s;
}
.btn.primary { background: var(--accent-fill); color: var(--on-accent); }
.btn.secondary { background: var(--surface); color: var(--text); box-shadow: var(--edge); }
.btn.ink { background: var(--text); color: var(--bg); }
.btn:disabled { opacity: .4; }
.btn.busy { opacity: .7; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); font-size: 14px; font-weight: 550; letter-spacing: .02em; }

/* ── Chips, segmented ───────────────────────────────────────────────────── */

/* A scrolling row would clip the chips' hit areas (4px over and under each chip), so the
   row pads itself by that much and takes it back with its margin — important, because some
   rows set their own padding or margin inline and the two must always cancel out. */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter); scroll-padding: 0 var(--gutter); }
:where(body:not(.ops)) .chips { padding-top: 4px !important; padding-bottom: 4px !important; margin-top: -4px !important; margin-bottom: -4px !important; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  height: var(--chip-h); flex: none; padding: 0 14px; border: 0; border-radius: var(--pill);
  background: var(--surface); color: var(--text); white-space: nowrap; box-shadow: var(--edge);
  font: 500 14px/1 var(--body); letter-spacing: .02em; display: inline-flex; align-items: center; gap: 6px;
}
.chip.on { background: var(--text); color: var(--bg); box-shadow: none; }
.chip.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.chip:disabled { opacity: .35; text-decoration: line-through; }
.line-chip svg { width: 15px; height: 15px; color: var(--accent-text); }
.chip.on.line-chip svg { color: inherit; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 3px; border-radius: var(--pill); background: var(--track); }
.seg button { height: calc(var(--chip-h) - 2px); border: 0; border-radius: var(--pill); background: transparent; font-size: 14px; font-weight: 550; letter-spacing: .02em; color: var(--muted); }
.seg button.on { background: var(--bg); color: var(--text); box-shadow: var(--edge), 0 1px 3px rgba(0, 0, 0, .08); }
.seg.seg-sm { padding: 3px; }
.seg.seg-sm button { height: 28px; padding: 0 12px; font-size: 13px; }
.seg-inline { align-self: stretch; }

/* ── Inputs ─────────────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, textarea.input {
  height: var(--control-h); width: 100%; min-width: 0; padding: 0 14px; border-radius: var(--r); border: 1.5px solid var(--input-border);
  background: var(--surface); color: var(--text); font: 500 16px var(--body); appearance: none;
  transition: border-color .15s, background-color .15s;
}
textarea.input { height: auto; min-height: 88px; padding: 12px 14px; line-height: 1.45; resize: vertical; }
.input::placeholder { color: var(--faint); opacity: 1; }
.input:focus { outline: none; border-color: var(--accent-fill); background-color: var(--bg); }
.input.invalid { border-color: var(--error); }
.input.code { font-size: 22px; font-weight: 550; letter-spacing: .45em; text-align: center; font-variant-numeric: tabular-nums; padding-left: calc(14px + .45em); }
select.input { padding-right: 36px; background: var(--surface) var(--chevron) no-repeat right 14px center / 14px 14px; }
.prefix-select { width: auto; flex: none; font-weight: 550; font-size: 16px; padding: 0 32px 0 14px; background-position: right 12px center; }
.field-error { font-size: 12px; color: var(--error); }

.search-bar {
  display: flex; align-items: center; gap: 10px; width: 100%; height: var(--control-sm); padding: 0 14px; border-radius: var(--pill);
  background: var(--surface); color: var(--muted); font-size: 15px; box-shadow: var(--edge);
}
.search-bar input { flex: 1; min-width: 0; border: 0; padding: 0; background: transparent; color: var(--text); font: 500 16px var(--body); outline: none; }
.search-bar input::placeholder { color: var(--faint); }
.search-bar .clear { border: 0; background: none; color: var(--muted); padding: 4px; display: inline-flex; }

/* ── Cards, lists ───────────────────────────────────────────────────────── */

.card { background: var(--surface); border: var(--card-border); border-radius: var(--r-lg); padding: var(--card-pad); }
.list-card { border-radius: var(--r-lg); background: var(--surface); padding: 2px var(--card-pad); box-shadow: var(--edge); }
/* Inside a card the card's edge closes the list: no hairline under the last row. */
:where(body:not(.ops)) :is(.card, .list-card) > :is(.list-row, .kv, .check-row, .note-row, .pay-row, .bank-row, .reward-row, .earn-row):last-child { border-bottom: 0; }

.list-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: var(--row-y) 0; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 550; line-height: 1.3;
}
:where(body:not(.ops)) .list-row .stack { gap: 2px; }
.list-row .sub { font-size: 13px; color: var(--muted); font-weight: 500; }
.list-row > svg { color: var(--faint); margin-left: auto; }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: var(--row-y) 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { text-align: right; font-weight: 600; overflow-wrap: anywhere; }

.check-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: var(--row-y) 0; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; line-height: 1.3;
}
:where(body:not(.ops)) .check-row .stack { gap: 2px; }
.check-row .box { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 2px solid var(--line2); display: flex; align-items: center; justify-content: center; color: var(--on-accent); }
.check-row .radio { border-radius: var(--pill); }
.check-row.on .box { background: var(--accent-fill); border-color: var(--accent-fill); }

.note-row { display: flex; gap: 12px; padding: var(--row-y) 0; border-bottom: 1px solid var(--line); line-height: 1.35; }
:where(body:not(.ops)) .note-row .stack { gap: 2px; }
.note-row .dot { width: 8px; height: 8px; flex: none; margin-top: 6px; border-radius: 4px; background: transparent; }
.note-row.unread .dot { background: var(--accent-fill); }
.note-row .t { font-size: 15px; font-weight: 600; }
.note-row .b { font-size: 13px; color: var(--muted); line-height: 1.4; }
.note-row .w { font-size: 12px; color: var(--faint); margin-top: 2px; }

/* Avatars are neutral: an initial on a quiet disc. */
.avatar {
  width: 56px; height: 56px; flex: none; border-radius: var(--pill); background: var(--surface2); color: var(--text);
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 400; font-size: 22px;
}
.avatar.sm { width: var(--icon-btn); height: var(--icon-btn); font-size: 16px; }
.c-avatar {
  position: relative; width: 40px; height: 40px; flex: none; border-radius: var(--pill); background: var(--surface2); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 400; font-size: 17px;
}
.c-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.c-avatar.sm { width: 32px; height: 32px; font-size: 14px; }
.c-avatar.lg { width: 48px; height: 48px; font-size: 20px; }
.c-online { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 6px; background: var(--mint); box-shadow: 0 0 0 2.5px var(--bg); }

/* ── Pills, tags ────────────────────────────────────────────────────────── */

.pill {
  height: 26px; padding: 0 10px; border: 0; border-radius: var(--pill); background: var(--track); color: var(--text);
  font-size: 12px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.pill i { width: 7px; height: 7px; border-radius: 4px; background: currentColor; }
.pill.accent { background: var(--accent-soft); color: var(--accent-soft-ink); }
.pill.success { background: var(--tint-5); color: var(--tint-ink-5); }
.pill.sky { background: var(--tint-3); color: var(--tint-ink-3); }
.pill.coral { background: var(--tint-6); color: var(--tint-ink-6); }
.pill.muted { background: var(--track); color: var(--muted); }
.item-card .pill:not(.accent):not(.success):not(.coral):not(.sky):not(.muted) { background: var(--in-card); }
.starts-chip {
  height: 26px; padding: 0 10px; border-radius: var(--pill); background: var(--track); color: var(--muted);
  font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}

.tag { position: relative; padding: 5px 10px; border-radius: var(--pill); background: var(--bg); color: var(--text); font-size: 11px; font-weight: 600; letter-spacing: .02em; line-height: 1.2; }
.tag.gold { background: var(--accent-fill); color: var(--on-accent); }

/* ── States, sheets, toasts ─────────────────────────────────────────────── */

.skel { background: var(--surface2); border-radius: var(--r-lg); animation: pulse 1.4s ease-in-out infinite; }
.skel.line { height: 12px; border-radius: 6px; }
.state { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: calc(var(--card-pad) + 2px); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--edge); }
.state.center { align-items: center; text-align: center; padding: 26px 18px; }
.state h3 { font-size: var(--fs-h3); }
.state p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line2); border-top-color: var(--accent-fill); animation: spin .8s linear infinite; }
.more-row { display: flex; justify-content: center; padding: 18px 0 6px; min-height: 56px; }
.more-row .micro { color: var(--faint); }
/* Pull-to-refresh: follows the finger (no transition), springs home on release. */
.ptr { height: 0; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; transition: height var(--t-base) var(--spring); }
.ptr .spinner { margin-bottom: 10px; }
.ptr.pulling { transition: none; }

/* Sheets rise in on a spring and drop away quickly (Sheet in ui-core.js adds
   .leaving, then calls onClose). On phones the grab handle and header drag the
   sheet down; it follows the finger and is let go with its own momentum. */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); backdrop-filter: blur(2px); animation: fade var(--t-base) var(--spring-soft); }
.scrim.leaving { animation: fade-out var(--t-fast) var(--ease-exit) forwards; pointer-events: none; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 41; width: 100%; max-width: 480px;
  max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column;
  --sheet-pad: var(--gutter);
  padding: 8px var(--sheet-pad) calc(var(--safe-bottom) + 16px); border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--bg); box-shadow: 0 -10px 40px rgba(0, 0, 0, .12);
  animation: rise var(--t-base) var(--spring);
}
.sheet.leaving { animation: sink var(--t-fast) var(--ease-exit) forwards; pointer-events: none; }
/* Dragged up past its rest, the sheet stretches its own ground under itself. */
.sheet::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 96px; background: var(--bg); pointer-events: none; }
.sheet .grab { width: 36px; height: 4px; flex: none; margin: 0 auto 10px; border-radius: 2px; background: var(--line2); }
.sheet .grab, .sheet .sheet-head { touch-action: none; }
.sheet .grab { position: relative; }
.sheet .grab::before { content: ''; position: absolute; inset: -10px -64px -12px; } /* a thumb-sized handle */
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex: none; }
.sheet .sheet-head h2 { font-size: var(--fs-h2); }
.sheet .sheet-head .icon-btn { width: 32px; height: 32px; }
/* The sheet takes focus when it opens (for screen readers); only its controls show a ring. */
.sheet:focus, .sheet:focus-visible { outline: none; }
.sheet .sheet-body { flex: 1; min-height: 0; overflow-y: auto; margin: 0 calc(var(--sheet-pad) * -1); padding: 0 var(--sheet-pad); scrollbar-gutter: stable; }
.sheet .sheet-foot { display: flex; gap: 10px; padding-top: 12px; flex: none; }

.toast-wrap {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 12px); transform: translateX(-50%); z-index: 60;
  width: calc(100% - 2 * var(--gutter)); max-width: 440px; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r);
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 550; line-height: 1.4;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18); animation: rise-t var(--t-base) var(--spring) both;
}
.toast.leaving { animation: drop-t var(--t-fast) var(--ease-exit) forwards; pointer-events: none; }
.toast button { margin-left: auto; padding: 0; border: 0; background: none; color: var(--accent-fill); font-size: 14px; font-weight: 600; }

/* ── Tab bar ────────────────────────────────────────────────────────────── */

.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 20; width: 100%; max-width: 480px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  height: var(--tabbar-h); padding: 4px 8px var(--safe-bottom);
  background: var(--glass); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--hairline);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.tabbar a svg { transition: transform var(--t-base) var(--spring); }
.tabbar a.on { color: var(--accent-text); }
.tabbar a.on svg { transform: translateY(-1px); stroke-width: 2.1; }
.tabbar a .tab-ic { position: relative; display: inline-flex; }
.tab-dot { position: absolute; top: -2px; right: -4px; width: 9px; height: 9px; border-radius: 5px; background: var(--brand-orange); box-shadow: 0 0 0 2px var(--bg); }

/* ── Sign in ────────────────────────────────────────────────────────────── */

.signin { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 var(--gutter) calc(var(--safe-bottom) + 20px); }
.signin .hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: calc(var(--safe-top) + 48px) 0 40px; text-align: center; }
.signin .hero .wordmark { font-size: 64px; }
.signin .tagline { font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.signin .dots { display: none; }
.signin form { display: flex; flex-direction: column; gap: var(--gap-sm); }
.signin form .spread { align-items: center; }
.signin .legal { display: flex; justify-content: center; gap: 20px; margin-top: 18px; font-size: 12px; font-weight: 550; }
.signin .legal a { color: var(--muted); }

/* ── Home: the concierge desk ───────────────────────────────────────────── */

.desk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(var(--safe-top) + 10px) var(--gutter) 4px; }
.desk-mark { font-size: 23px; }
.home-grid { display: flex; flex-direction: column; gap: calc(var(--section-gap) + 4px); padding-top: 12px; padding-bottom: 24px; }
.home-main, .home-side { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.home-hello { font-size: 14px; font-weight: 500; color: var(--accent-text); }
.home-q { font-size: var(--fs-display); line-height: 1.14; margin-top: -8px; }
.home-sec { display: flex; flex-direction: column; gap: var(--gap-sm); margin-top: 4px; }

.ask-box {
  display: flex; flex-direction: column; gap: 8px; padding: 14px 12px 12px 16px; border-radius: var(--r-xl);
  background: var(--surface); border: 1.5px solid transparent; box-shadow: var(--edge); transition: border-color .2s, box-shadow .3s;
}
.ask-box:hover { border-color: var(--line2); }
.ask-box-ph { font-size: 16px; color: var(--faint); padding: 2px 0 12px; }
.ask-box-bar { display: flex; align-items: center; gap: 8px; }
.cmp-btn { width: 38px; height: 38px; border-radius: var(--pill); background: var(--bg); color: var(--accent-text); box-shadow: var(--edge); display: inline-flex; align-items: center; justify-content: center; transition: transform var(--t-base) var(--spring), color .2s; }
.cmp-go {
  margin-left: auto; width: 42px; height: 42px; border-radius: var(--pill); background: var(--accent-fill); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(255, 106, 61, .3); transition: transform var(--t-base) var(--spring);
}

.line-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -6px calc(var(--gutter) * -1) -4px; padding: 4px var(--gutter); scroll-padding: 0 var(--gutter); }
.line-chips::-webkit-scrollbar { display: none; }
.line-chip-a {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: var(--chip-h); padding: 0 13px 0 5px; border-radius: var(--pill);
  border: 1px solid var(--hairline); font-size: 14px; font-weight: 500; color: var(--text); transition: background-color .2s, border-color .2s;
}
.line-chip-a:hover { background: var(--track); }
.line-chip-a .dot { width: 22px; height: 28px; display: inline-flex; align-items: center; justify-content: center; color: var(--accent-text); }

.need-row { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text); line-height: 1.3; }
.need-row .stack { gap: 2px; }
.need-row:last-child { border-bottom: 0; }
.need-row b { font-size: 15px; font-weight: 600; }
.need-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.need-amt { font-size: 15px; font-weight: 600; }

.cc-status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cc-status-pill.on { color: var(--success); }
.cc-status-pill.on::before { content: ''; width: 7px; height: 7px; border-radius: 4px; background: var(--mint); animation: blink 2.4s ease-in-out infinite; }
.chat-peek { display: flex; align-items: center; gap: 12px; padding: var(--row-card-pad); border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--edge); transition: transform var(--t-base) var(--spring); }
.chat-peek b { font-size: 15px; font-weight: 600; }
.peek-time { font-size: 12px; color: var(--faint); white-space: nowrap; }
.peek-text { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peek-text.unread { color: var(--text); font-weight: 500; }
.peek-badge {
  min-width: 22px; height: 22px; flex: none; padding: 0 7px; border-radius: var(--pill); background: var(--accent-fill); color: var(--on-accent);
  font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; animation: pop-in var(--t-base) var(--spring) both;
}
.prog-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: var(--row-y) 0; border-bottom: 1px solid var(--line); color: var(--text); line-height: 1.3; }
.prog-row:last-child { border-bottom: 0; }
.prog-title { min-width: 0; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.prog-bar { width: 64px; height: 4px; flex: none; border-radius: 2px; background: var(--surface2); overflow: hidden; }
.prog-bar i { display: block; height: 100%; border-radius: 2px; background: var(--accent-fill); transform-origin: left; animation: grow var(--t-slow) var(--spring-soft) .2s both; }

/* ── Discover: categories, the drop banner, filters ─────────────────────── */

.filters { padding: 2px 0 14px; }
.browse-search { padding: 0 var(--gutter) 10px; }
.price-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.cats { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px var(--gutter); scroll-padding: 0 var(--gutter); }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; width: 60px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text); }
.cat span.ic { width: 54px; height: 54px; border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center; color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--line2); }
.cat span.ic svg { width: 24px; height: 24px; }

/* The sale banner: one solid colour, white text. */
.drop-card {
  position: relative; overflow: hidden; margin: 0 var(--gutter); min-height: 148px; padding: 46px var(--card-pad) var(--card-pad); border-radius: var(--r-xl);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; background: var(--banner); color: #fff;
}
:root:not([data-theme="light"]) .drop-card { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.drop-card .live {
  position: absolute; top: 14px; left: var(--card-pad); display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px;
  border-radius: var(--pill); background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .14);
  font-size: 12px; font-weight: 600; backdrop-filter: blur(6px);
}
.drop-card .live i { width: 7px; height: 7px; border-radius: 4px; background: var(--brand-orange); animation: blink 1.6s ease-in-out infinite; }
.drop-card .title { position: relative; font-size: 23px; line-height: 1.12; }
.drop-card .blurb { position: relative; font-size: 13px; opacity: .72; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.drop-foot { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.drop-go { width: 38px; height: 38px; flex: none; border-radius: var(--pill); background: #fff; color: #15121E; display: flex; align-items: center; justify-content: center; transition: transform var(--t-base) var(--spring-soft); }
.discover-drop { margin-bottom: var(--section-gap); }

/* ── Product tiles ──────────────────────────────────────────────────────── */

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--text); }
.tile .photo {
  position: relative; overflow: hidden; height: 172px; margin-bottom: 2px; padding: 8px; border-radius: var(--r-lg);
  background: var(--ph); color: var(--muted); display: flex; align-items: flex-start; justify-content: space-between;
}
.tile.compact .photo { height: 156px; }
.tile .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .photo .ph-mark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.tile .photo .ph-mark svg { width: 46px; height: 46px; stroke-width: 1.1; opacity: .7; }
.tile .heart { position: relative; width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--pill); background: var(--bg); color: var(--text); display: flex; align-items: center; justify-content: center; }
.tile .heart.on { color: var(--accent-fill); }
.tile .heart.on svg { fill: currentColor; }
.tile .brand-label { margin-top: 2px; }
.tile .name { font-size: 14px; font-weight: 500; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile .price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.tile .price .now { font-size: 15px; font-weight: 600; }
.tile .price .was { font-size: 13px; }
.tile .approx { font-size: 12px; color: var(--muted); }
.tile .avail { font-size: 13px; font-weight: 600; }

/* ── Product page ───────────────────────────────────────────────────────── */

.gallery { position: relative; overflow: hidden; height: 340px; border-radius: 0 0 var(--r-xl) var(--r-xl); background: var(--ph); color: var(--muted); }
.gallery .track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .track::-webkit-scrollbar { display: none; }
.gallery .slide { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.gallery .slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery .slide .ph { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 44px; text-align: center; font-size: 13px; font-weight: 600; line-height: 1.5; opacity: .8; }
.gallery .slide .ph .ph-icon { width: 84px; height: 84px; stroke-width: .9; opacity: .75; }
.gallery .slide .ph b { display: block; margin: 6px 0 0; color: var(--text); font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.gallery .top { position: absolute; top: calc(var(--safe-top) + 12px); left: 14px; right: 14px; display: flex; justify-content: space-between; pointer-events: none; }
.gallery .top > * { pointer-events: auto; }
.gallery .dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gallery .dots i { width: 7px; height: 7px; border-radius: 4px; background: var(--pager-dot); transition: width var(--t-base) var(--spring), background-color var(--t-fast); }
.gallery .dots i.on { width: 20px; background: var(--text); }
.wish-on { color: var(--accent-fill); }
.wish-on svg { fill: currentColor; }

.product-body { display: flex; flex-direction: column; gap: var(--gap); padding: 16px var(--gutter) 20px; }
.product-body h1 { font-size: calc(var(--fs-h1) - 2px); line-height: 1.18; }
.product-body .price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.product-body .price-row .now { font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.product-body .price-row .sub { font-size: 13px; color: var(--muted); }
.avail-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.avail-row .note { font-size: 13px; color: var(--muted); }
.variants { display: flex; flex-wrap: wrap; gap: 8px; }
.prov { display: flex; flex-direction: column; gap: 12px; }
.prov .verified { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent-text); }
.prov dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.prov dl div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prov dt { font-size: 12px; font-weight: 500; color: var(--muted); }
.prov dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.desc { font-size: 15px; line-height: 1.55; color: var(--muted); white-space: pre-line; }

.sticky-foot {
  position: sticky; bottom: 0; z-index: 10; display: flex; gap: 10px; padding: 10px var(--gutter) calc(var(--safe-bottom) + 12px);
  background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--hairline);
}
.sticky-foot .grow1 { flex: 1; }
.sticky-foot .grow16 { flex: 1.8; }

/* ── Ask: attachments and voice notes ───────────────────────────────────── */

.attach-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.drop-btn {
  flex: 1; height: var(--control-h); border-radius: var(--r); border: 1.5px dashed var(--dashed); background: transparent; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 600;
}
.drop-btn svg { color: var(--accent-text); }
.drop-btn.on { border-color: var(--accent-fill); }
.drop-btn:disabled { opacity: .4; }
.attach-row .drop-btn { height: var(--control-sm); gap: 6px; font-size: 14px; white-space: nowrap; }
.nudge, .nudge-wrap .drop-btn { border-color: var(--accent-fill); animation: nudge 1.6s ease-in-out 3; }

.drop-zone {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: var(--r-lg);
  border: 1.5px dashed var(--dashed); background: transparent; color: var(--text); font-size: 15px;
  transition: border-color .2s, background-color .2s;
}
.drop-zone b { font-weight: 600; }

.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.thumb { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: var(--r); background: var(--ph); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-doc { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; color: var(--muted); }
.thumb-doc small { max-width: 100%; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-cover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--glass); }
.thumb-cover.err { color: var(--error); }
.thumb-x { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--pill); background: var(--text); color: var(--bg); display: flex; align-items: center; justify-content: center; }

.voice { display: inline-flex; align-items: center; gap: 10px; min-width: 210px; }
.voice-btn { width: 36px; height: 36px; flex: none; padding: 0; border: 0; border-radius: var(--pill); background: var(--accent-fill); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }
.voice-btn svg { fill: currentColor; }
.voice-wave { flex: 1; height: 24px; display: flex; align-items: center; gap: 2px; }
.voice-wave i { width: 3px; border-radius: 2px; background: var(--line2); transition: background-color .15s; }
.voice-wave i.on { background: var(--accent-fill); }
.voice-time { min-width: 32px; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.voice.on-dark .voice-btn { background: var(--on-accent); color: var(--accent-fill); }
.voice.on-dark .voice-wave i { background: var(--on-accent); opacity: .35; }
.voice.on-dark .voice-wave i.on { opacity: 1; }
.voice.on-dark .voice-time { color: var(--on-accent); }
.rec-live { border-style: solid; border-color: var(--accent-fill); color: var(--text); }
.rec-dot { width: 10px; height: 10px; border-radius: 5px; background: var(--accent-fill); animation: blink 1s ease-in-out infinite; }
.rec-done { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 12px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--edge); }
.rec-done .icon-btn { width: 36px; height: 36px; background: var(--bg); }

/* ── My pieces and other item cards ─────────────────────────────────────── */

.item-card { display: flex; align-items: center; gap: 12px; padding: var(--row-card-pad); border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--edge); }
.item-card.flat { padding: var(--card-pad); }
.item-card > svg:last-child { flex: none; }
.item-thumb { width: 52px; height: 52px; flex: none; overflow: hidden; border-radius: var(--r); background: var(--thumb); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.item-thumb.lg { width: 64px; height: 64px; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-thumb svg { width: 22px; height: 22px; }
.item-title { font-size: 15px; font-weight: 550; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.item-card.piece { flex-direction: column; align-items: stretch; gap: 10px; }
.piece-top { display: flex; align-items: center; gap: 12px; }
.piece-progress { height: 4px; overflow: hidden; border-radius: 2px; background: var(--surface2); }
.piece-progress i { display: block; height: 100%; border-radius: 2px; background: var(--accent-fill); transform-origin: left; animation: grow var(--t-slow) var(--spring-soft) .15s both; }
.piece-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.piece-next b { font-size: 15px; font-weight: 600; }
.piece-cta { height: 32px; flex: none; padding: 0 13px; border-radius: var(--pill); background: var(--accent-fill); color: var(--on-accent); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }

/* ── Quote ──────────────────────────────────────────────────────────────── */

.lock { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-lg); background: var(--accent-soft); color: var(--accent-soft-ink); font-size: 14px; line-height: 1.4; }
.lock .badge-ic { color: inherit; }
.lock.off { background: var(--surface); color: var(--muted); box-shadow: var(--edge); }
.lines { display: flex; flex-direction: column; }
.lines .line { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 15px; color: var(--muted); }
.lines .line span:last-child { color: var(--text); font-weight: 600; }
.lines .line.total { align-items: baseline; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text); font-weight: 600; }
.lines .line.total span:last-child { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.split .card { display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.split-amt { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r); background: var(--ph); }

/* ── Order ──────────────────────────────────────────────────────────────── */

.notice { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 550; box-shadow: var(--edge); }
.notice.coral { background: var(--tint-6); color: var(--tint-ink-6); box-shadow: none; }

.paybar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px var(--card-pad); border-radius: var(--r-lg);
  background: var(--accent-soft); color: var(--accent-soft-ink);
}
.paybar b { color: var(--text); font-size: 18px; font-weight: 600; }
.paybar .badge-ic { color: var(--accent-text); }
.paybar-go { height: 36px; padding: 0 16px; border-radius: var(--pill); background: var(--accent-fill); color: var(--on-accent); display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; }
.paybar.checking { justify-content: flex-start; background: var(--surface); color: var(--text); box-shadow: var(--edge); }
.paybar.checking b { font-size: 15px; }

.tl { list-style: none; margin: 4px 0 0; padding: 0; }
.tl-step { display: flex; gap: 12px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; flex: none; width: 22px; }
.tl-dot { width: 22px; height: 22px; flex: none; border-radius: var(--pill); background: var(--surface2); color: var(--bg); display: flex; align-items: center; justify-content: center; }
.tl-line { flex: 1; width: 2px; min-height: 14px; margin: 3px 0; border-radius: 1px; background: var(--line2); }
.tl-step.done .tl-dot { background: var(--text); }
.tl-step.done .tl-line { background: var(--text); }
.tl-step.current .tl-dot { background: var(--bg); box-shadow: inset 0 0 0 3px var(--accent-fill); }
.tl-step.current .tl-dot::after { content: ''; width: 8px; height: 8px; border-radius: 4px; background: var(--accent-fill); }
.tl-body { flex: 1; min-width: 0; padding: 1px 0 14px; display: flex; flex-direction: column; gap: 2px; }
.tl-label { font-size: 15px; font-weight: 550; }
.tl-step.todo .tl-label { color: var(--faint); }
.tl-step.current .tl-label { color: var(--accent-text); }
.tl-when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tl-note { font-size: 13px; color: var(--muted); line-height: 1.45; }
.tl-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tl-photos img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-sm); }

/* ── Pay ────────────────────────────────────────────────────────────────── */

.ticket { position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--edge); }
.ticket-top { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; }
.ticket-amt { font-size: 38px; font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.ticket-cut { position: relative; height: 0; margin: 0 18px; border-top: 2px dashed var(--line2); }
.ticket-cut::before, .ticket-cut::after { content: ''; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); box-shadow: var(--edge); }
.ticket-cut::before { left: -30px; }
.ticket-cut::after { right: -30px; }
.ticket-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px 14px; font-size: 13px; color: var(--muted); }
.meter { display: flex; gap: 3px; height: 6px; margin-top: 6px; overflow: hidden; border-radius: 3px; background: var(--surface2); }
.meter i { display: block; height: 100%; border-radius: 3px; transform-origin: left; animation: grow var(--t-slow) var(--spring-soft) .2s both; }
.meter .paid { background: var(--text); }
.meter .now { background: var(--accent-fill); }

.step-h { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.step-h .seg { margin-left: auto; }
.step-n { width: 24px; height: 24px; flex: none; border-radius: var(--pill); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--line2); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }

.bank { padding: 4px var(--card-pad); }
.bank-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 46px; border-bottom: 1px solid var(--line); font-size: 15px; }
.bank-row:last-child { border-bottom: 0; }
.bank-row > span:first-child { color: var(--muted); white-space: nowrap; }
.bank-row .bank-val { display: inline-flex; align-items: center; gap: 8px; font-weight: 550; text-align: right; }
.bank-row.hi { margin: 6px -10px; padding: 0 10px; border-radius: var(--r); border-bottom: 0; background: var(--accent-soft); }
.bank-row.hi > span:first-child { color: var(--accent-soft-ink); }
.bank-row.hi .bank-val { color: var(--accent-soft-ink); font-size: 16px; letter-spacing: .02em; }
.copy-pill { height: 28px; flex: none; padding: 0 10px; border: 0; border-radius: var(--pill); background: var(--bg); color: var(--text); box-shadow: var(--edge); font-family: var(--body); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; transition: transform var(--t-base) var(--spring); }

/* ── Info pages ─────────────────────────────────────────────────────────── */

.steps { list-style: none; margin: 2px 0 20px; padding: 0; display: flex; flex-direction: column; }
.steps li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps b { font-family: var(--display); font-size: 17px; font-weight: 400; }
.steps .stack span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.info-cta { display: flex; flex-direction: column; gap: 8px; }
.info-cta b { font-family: var(--display); font-size: 17px; font-weight: 400; }
.info-cta .btn { margin-top: 6px; }
.info-list { margin: 4px 0 0; display: flex; flex-direction: column; }
.info-list div { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-list dt { font-size: 15px; font-weight: 600; }
.info-list dd { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ── Shared with more.css (chat/profile): keep their icons plain too ────── */

.app .ico-badge { background: transparent; color: var(--accent-text); }
.app .wa-btn { background: var(--surface); color: var(--text); }

/* ── ≥ 520 px: the phone column floats on a soft ground ─────────────────── */

@media (min-width: 520px) {
  body { background: var(--surface); }
  .app { box-shadow: 0 0 0 1px var(--line); }
}

/* ── Tablet ≥ 600 px: wider column, bottom tabs ─────────────────────────── */

@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .app, .tabbar { max-width: 760px; }
  .sheet { max-width: 560px; }
  .grid2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-sm); }
  .card-list > :not(.item-card):not(.card-skel) { grid-column: 1 / -1; }
}

/* ── Laptop ≥ 960 px: side nav, centred content, dialogs ────────────────── */

@media (min-width: 960px) {
  :root { --gutter: 32px; --fs-display: 42px; --fs-h1: 32px; --fs-h2: 22px; --fs-h3: 19px; --section-gap: 20px; }
  body { background: var(--bg); }
  .app { max-width: none; display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: start; box-shadow: none; }
  .app.bare { display: block; }
  .app.has-tabs { padding-bottom: 0; }
  .tabbar { display: none; }

  .sidenav {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
    padding: 24px 14px 18px; border-right: 1px solid var(--line); background: var(--bg);
  }
  .sidenav-brand { padding: 4px 12px 20px; }
  .sidenav-brand .wordmark { font-size: 27px; }
  .sidenav-cta { height: var(--control-sm); margin: 0 0 14px; font-size: 14px; }
  .sidenav-links { display: flex; flex-direction: column; gap: 2px; }
  .sidenav-links a {
    display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--r-sm);
    color: var(--muted); font-size: 15px; font-weight: 500; transition: background-color .2s, color .2s;
  }
  .sidenav-links a:hover { background: var(--track); color: var(--text); }
  .sidenav-links a.on { background: var(--accent-soft); color: var(--accent-soft-ink); }
  .sidenav-links a .nav-count {
    min-width: 22px; height: 22px; margin-left: auto; padding: 0 6px; border-radius: var(--pill); background: var(--accent-fill); color: var(--on-accent);
    font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
  }
  .sidenav-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r); transition: background-color .2s; }
  .sidenav-me:hover, .sidenav-me.on { background: var(--track); }
  .sidenav-me b { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidenav-me .stack span { font-size: 12px; color: var(--muted); }

  .screen { width: 100%; max-width: 1160px; margin: 0 auto; }
  .screen.mid { max-width: 1040px; }
  .screen.narrow { max-width: 760px; }
  .header { padding-top: 28px; }
  .chips { flex-wrap: wrap; overflow: visible; }

  .desk-head { padding-top: 22px; }
  .desk-head .me-avatar, .desk-mark { display: none; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 32px; align-items: start; max-width: 1080px; padding-top: 6px; }
  .home-main { gap: 16px; }
  .home-side { position: sticky; top: 24px; gap: 20px; padding-top: 28px; }
  .home-hello { font-size: 16px; }
  .ask-box-ph { font-size: 18px; }
  .line-chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }

  .grid2 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 16px; }
  .tile .photo { height: 232px; }
  .tile.compact .photo { height: 212px; }
  .cats { flex-wrap: wrap; gap: 14px; overflow: visible; }
  .cat { width: 76px; font-size: 13px; }
  .cat span.ic { width: 68px; height: 68px; border-radius: var(--r-xl); }
  .drop-card { min-height: 208px; padding: 60px 30px 26px; }
  .drop-card .live { left: 30px; top: 22px; }
  .drop-card .title { font-size: 34px; }
  .drop-card .blurb { font-size: 15px; max-width: 520px; }

  .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .cols .col-b { position: sticky; top: 20px; }

  .screen.product-screen {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 40px; align-items: start;
    padding: 28px var(--gutter) 0;
  }
  .product-screen .gallery { grid-row: 1 / span 2; position: sticky; top: 28px; height: min(640px, calc(100vh - 56px)); border-radius: var(--r-xl); }
  .product-screen .gallery .top { top: 16px; }
  .product-screen .product-body { padding: 8px 0 0; }
  .product-screen .product-body h1 { font-size: var(--fs-h1); }
  .product-screen .sticky-foot { position: static; padding: 10px 0 32px; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }

  .sheet {
    --sheet-pad: 24px;
    top: 50%; bottom: auto; max-width: 520px; max-height: min(760px, 86vh); padding: 18px var(--sheet-pad) 22px; border-radius: var(--r-xl); overflow: hidden;
    transform: translate(-50%, -50%); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); animation: pop var(--t-base) var(--spring);
  }
  .sheet.leaving { animation: unpop var(--t-fast) var(--ease-exit) forwards; }
  .sheet .grab { display: none; }
  .toast-wrap { bottom: 24px; }
  .app:not(.bare) .toast-wrap { left: calc(50% + 116px); }

  .signin {
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto auto 1fr; column-gap: 72px;
    max-width: 1080px; min-height: 100vh; margin: 0 auto; padding: 0 56px;
  }
  .signin .hero { grid-column: 1; grid-row: 1 / -1; align-items: flex-start; padding: 0; text-align: left; }
  .signin .hero .wordmark { font-size: 112px; }
  .signin form { grid-column: 2; grid-row: 2; width: 100%; max-width: 420px; }
  .signin .legal { grid-column: 2; grid-row: 3; justify-content: flex-start; max-width: 420px; }
}

@media (min-width: 1400px) {
  .grid2 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

/* ── Hit areas ──────────────────────────────────────────────────────────── */

/* Small controls look small but answer a --tap square (44 px): an invisible
   ::after grows each one out to it, never shrinking a control already bigger.
   Client app only (Studio keeps its own sizes). */
:where(body:not(.ops)) :is(.chip, .line-chip-a, .cmp-btn, .cmp-go, .piece-cta, .paybar-go, .reward-go, .copy-pill, .seg button, .switch, .drop-go) { position: relative; }
:where(body:not(.ops)) :is(.icon-btn, .chip, .line-chip-a, .cmp-btn, .cmp-go, .tile .heart, .piece-cta, .paybar-go, .reward-go, .copy-pill,
  .seg button, .switch, .drop-go, .thumb-x)::after {
  content: ''; position: absolute; pointer-events: auto;
  top: min(0px, calc(50% - var(--tap) / 2)); bottom: min(0px, calc(50% - var(--tap) / 2));
  left: min(0px, calc(50% - var(--tap) / 2)); right: min(0px, calc(50% - var(--tap) / 2));
}

/* ── Motion: inviting, never in the way ─────────────────────────────────── */

/* Page changes (View Transitions): fade through — the old page steps back
   quickly, the new one settles in with a short, heavy lift. The router waits
   briefly for the new page's data, so what arrives is the real page, not a skeleton. */
::view-transition-old(root) { animation: vt-out var(--t-fast) var(--ease-exit) both; }
::view-transition-new(root) { animation: vt-in .6s var(--spring-soft) .1s both; }
/* Shared elements glide: the tapped photo into the gallery, the Ask box into the
   form — a gentle start, then a long, unhurried arrival. */
::view-transition-group(hero), ::view-transition-group(ask-box) {
  animation-duration: .6s; animation-timing-function: var(--glide);
}
::view-transition-old(hero), ::view-transition-new(hero) { animation-duration: .6s; animation-timing-function: var(--glide); height: 100%; object-fit: cover; }
::view-transition-old(ask-box) { animation-duration: var(--t-fast); animation-timing-function: var(--ease-exit); }
::view-transition-new(ask-box) { animation-duration: var(--t-base); animation-timing-function: var(--spring-soft); animation-delay: .08s; }
::view-transition-old(ask-box), ::view-transition-new(ask-box) { height: 100%; object-fit: none; object-position: top left; }
/* Fixed chrome stays put while pages move underneath. */
.tabbar { view-transition-name: tabbar; }
.sidenav { view-transition-name: sidenav; }
::view-transition-old(tabbar), ::view-transition-new(tabbar), ::view-transition-old(sidenav), ::view-transition-new(sidenav) { animation: none; }
/* Browsers without View Transitions still get a gentle entrance. */
@supports not (view-transition-name: none) {
  .screen { animation: vt-in .6s var(--spring-soft) backwards; }
}

/* Things rise in, lists one after another. The gaps shrink as the list goes on
   (40, 75, 105, 130 … capped at 175 ms), so a long list never crawls. */
.grid2 > .tile, .card-list > .item-card, .cats > .cat, .tl > .tl-step, .steps li { animation: rise-in var(--t-slow) var(--spring-soft) backwards; }
.grid2 > :nth-child(2), .card-list > :nth-child(2), .cats > :nth-child(2), .tl > :nth-child(2), .steps li:nth-child(2) { animation-delay: 40ms; }
.grid2 > :nth-child(3), .card-list > :nth-child(3), .cats > :nth-child(3), .tl > :nth-child(3), .steps li:nth-child(3) { animation-delay: 75ms; }
.grid2 > :nth-child(4), .card-list > :nth-child(4), .cats > :nth-child(4), .tl > :nth-child(4), .steps li:nth-child(4) { animation-delay: 105ms; }
.grid2 > :nth-child(5), .card-list > :nth-child(5), .cats > :nth-child(5), .tl > :nth-child(5), .steps li:nth-child(5) { animation-delay: 130ms; }
.grid2 > :nth-child(6), .card-list > :nth-child(6), .cats > :nth-child(6), .tl > :nth-child(6), .steps li:nth-child(6) { animation-delay: 150ms; }
.grid2 > :nth-child(7), .card-list > :nth-child(7), .cats > :nth-child(7), .tl > :nth-child(7), .steps li:nth-child(7) { animation-delay: 165ms; }
.grid2 > :nth-child(n+8), .card-list > :nth-child(n+8), .cats > :nth-child(n+8), .tl > :nth-child(n+8), .steps li:nth-child(n+8) { animation-delay: 175ms; }
.drop-card, .ticket, .paybar, .lock, .chat-peek { animation: rise-in var(--t-slow) var(--spring-soft) backwards; }
.home-q { animation: rise-in var(--t-slow) var(--spring-soft) backwards; }
/* (.ask-box glides into the Ask form, so it carries no entrance of its own.) */
.line-chips { animation: rise-in var(--t-slow) var(--spring-soft) .1s backwards; }
.need-row { animation: rise-in var(--t-slow) var(--spring-soft) backwards; }

/* Back shows the page as it was left: nothing replays its entrance. */
html[data-nav="back"] :is(.grid2 > .tile, .card-list > .item-card, .cats > .cat, .tl > .tl-step, .steps li,
  .drop-card, .ticket, .paybar, .lock, .chat-peek, .line-chips, .need-row, .home-q) { animation: none; }
/* The first slide waits on the tile's thumbnail while the full photo develops. */
.gallery .slide { background-size: cover; background-position: center; }

/* Photos develop in, with a slow settle. */
.tile .photo img, .gallery .slide img { opacity: 0; transform: scale(1.04); transition: opacity var(--t-slow) var(--spring-soft), transform 1.2s var(--spring-soft); }
.tile .photo img.in, .gallery .slide img.in { opacity: 1; transform: none; }

/* The current step rings a few times when the page opens, then rests. */
.tl-step.current .tl-dot { animation: ring 2.6s ease-out .4s 3; }
.tabbar a.on svg { animation: tab-pop var(--t-base) var(--spring); }

@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes rise { from { transform: translate(-50%, 16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes sink { to { transform: translate(-50%, 16px); opacity: 0; } }
@keyframes pop { from { transform: translate(-50%, calc(-50% + 12px)) scale(.97); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
@keyframes unpop { to { transform: translate(-50%, calc(-50% + 8px)) scale(.98); opacity: 0; } }
@keyframes pop-in { from { transform: scale(.6); opacity: 0; } }
@keyframes rise-t { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drop-t { to { transform: translateY(6px) scale(.98); opacity: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes tab-pop { from { transform: translateY(1px) scale(.88); } }
@keyframes nudge { 50% { box-shadow: 0 0 0 5px var(--accent-ring); } }
@keyframes ring {
  0% { box-shadow: inset 0 0 0 3px var(--accent-fill), 0 0 0 0 var(--accent-ring); }
  70%, 100% { box-shadow: inset 0 0 0 3px var(--accent-fill), 0 0 0 10px rgba(255, 106, 61, 0); }
}

/* Surfaces that lift or give under a press carry a spring: they settle, never snap. */
.tile .photo, .item-card, .cat span.ic, .drop-card, a.card {
  transition: transform var(--t-base) var(--spring), box-shadow var(--t-base) var(--spring-soft);
}
.icon-btn, .chip, .tile .heart, .piece-cta, .paybar-go { transition: transform var(--t-base) var(--spring); }

/* Pointer devices: things respond to hover (colour only when motion is reduced). */
@media (hover: hover) {
  .btn.primary:hover:not(:disabled) { filter: brightness(1.05); }
  .cmp-btn:hover { color: var(--accent-fill); }
  .drop-zone:hover { border-color: var(--accent-fill); background: var(--track); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tile:hover .photo { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(18, 18, 23, .10); }
  .tile:hover .photo img.in { transform: scale(1.04); }
  .item-card:hover { transform: translateY(-2px); box-shadow: var(--edge), 0 10px 26px rgba(18, 18, 23, .08); }
  .cat:hover span.ic { transform: translateY(-3px) scale(1.04); }
  .drop-card:hover { transform: translateY(-2px); }
  .drop-card:hover .drop-go { transform: translateX(3px); }
  .chat-peek:hover { transform: translateY(-2px); }
}

/* Press: buttons, tiles and cards give a little under the finger (quick, no
   overshoot), then spring back on release (each rule's own transition). */
@media (prefers-reduced-motion: no-preference) {
  :is(.btn, a.item-card, button.item-card, .chat-peek, a.card):active:not(:disabled),
  .tile > a:active .photo { transform: scale(.97); transition-duration: var(--t-fast); transition-timing-function: var(--spring-soft); }
  .drop-card:active { transform: scale(.98); transition-duration: var(--t-fast); transition-timing-function: var(--spring-soft); }
  :is(.icon-btn, .chip, .tile .heart, .cmp-btn, .cmp-go, .copy-pill, .piece-cta, .paybar-go):active:not(:disabled),
  .cat:active span.ic { transform: scale(.94); transition-duration: var(--t-fast); transition-timing-function: var(--spring-soft); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .tile .photo img, .gallery .slide img { opacity: 1; transform: none; }
  /* Sheets, toasts and popovers only fade; the tab icon stays still. */
  .sheet, .toast { animation-name: fade !important; }
  .sheet.leaving, .toast.leaving, .scrim.leaving { animation-name: fade-out !important; }
  .tabbar a.on svg { animation: none; }
}

/* Auto-growing composers: no scrollbar until they reach their max height. */
textarea.chat-input, textarea.oc-input { overflow-y: hidden; }

/* Screens with an action bar fill the viewport, so a short screen keeps its main
   button at the bottom (where the thumb is) instead of floating mid-page. */
.screen:has(> .sticky-foot) { min-height: 100dvh; }
.screen > .sticky-foot { margin-top: auto; }

/* ── Studio keeps its scale ─────────────────────────────────────────────── */

/* Studio (body.ops) shares these components but not the client app's compact
   pass: it gets its earlier values back here (the tokens at the top do the rest).
   :where() adds no specificity, so each rule weighs exactly what the original
   did and ops.css still wins wherever it already won. */
:where(body.ops) .help { line-height: 1.5; }
:where(body.ops) .icon-btn .badge-dot { top: 10px; right: 10px; width: 9px; height: 9px; }
:where(body.ops) .btn { padding: 0 20px; font: 500 16px/1 var(--body); }
:where(body.ops) .chip { padding: 0 16px; font: 500 15px/1 var(--body); }
:where(body.ops) .chip.sm { height: 32px; padding: 0 13px; font-size: 14px; }
:where(body.ops) .seg { padding: 4px; }
:where(body.ops) .seg button { height: 38px; }
:where(body.ops) .seg.seg-sm button { height: 30px; }
:where(body.ops) .field { gap: 8px; }
:where(body.ops) .field > label, :where(body.ops) .field > .label { font-size: 14px; }
:where(body.ops) .input, :where(body.ops) textarea.input { padding: 0 16px; }
:where(body.ops) textarea.input { min-height: 104px; padding: 14px 16px; }
:where(body.ops) .input.code { font-size: 24px; padding-left: calc(16px + .45em); }
:where(body.ops) .prefix-select { padding: 0 34px 0 16px; }
:where(body.ops) .field-error { font-size: 13px; }
:where(body.ops) .search-bar { padding: 0 16px; }
:where(body.ops) .kv { padding: 13px 0; }
:where(body.ops) .check-row { gap: 14px; min-height: auto; padding: 14px 0; font-size: 16px; line-height: inherit; }
:where(body.ops) .check-row .box { width: 22px; height: 22px; border-radius: 7px; }
:where(body.ops) .check-row .radio { border-radius: var(--pill); }
:where(body.ops) .avatar { width: 64px; height: 64px; font-size: 26px; }
:where(body.ops) .avatar.sm { width: 40px; height: 40px; font-size: 16px; }
:where(body.ops) .pill { height: 28px; padding: 0 11px; }
:where(body.ops) .state { gap: 10px; padding: 22px; }
:where(body.ops) .state.center { padding: 32px 22px; }
:where(body.ops) .state p { font-size: 14px; }
:where(body.ops) .more-row { padding: 24px 0 8px; min-height: 70px; }
:where(body.ops) .sheet { padding: 10px var(--sheet-pad) calc(var(--safe-bottom) + 20px); }
:where(body.ops) .sheet .grab { width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 3px; }
:where(body.ops) .sheet .sheet-head { margin-bottom: 14px; }
:where(body.ops) .sheet .sheet-head .icon-btn { width: 36px; height: 36px; }
:where(body.ops) .sheet .sheet-foot { padding-top: 16px; }
:where(body.ops) .toast { padding: 14px 16px; }
:where(body.ops) .lines .line { padding: 9px 0; }
:where(body.ops) .lines .line.total { margin-top: 6px; padding-top: 14px; }
:where(body.ops) .lines .line.total span:last-child { font-size: 24px; }
:where(body.ops) .notice { padding: 12px 14px; }
:where(body.ops) .drop-btn { height: 56px; }
:where(body.ops) .attach-row .drop-btn { height: 52px; }
:where(body.ops) .drop-zone { gap: 14px; padding: 16px; }
:where(body.ops) .rec-done { padding: 10px 10px 10px 12px; }
:where(body.ops) .rec-done .icon-btn { width: 38px; height: 38px; }
@media (min-width: 960px) {
  :where(body.ops) .cols { gap: 28px; }
  :where(body.ops) .cols .col-b { top: 24px; }
  :where(body.ops) .sheet { --sheet-pad: 28px; max-width: 540px; padding: 22px var(--sheet-pad) 26px; }
}
