/* Receipts: pastel-consumer app style (tasteskill seed 887431187).
   Neutral chrome; each company's colour lives on its one filled action and on
   pale tiles with the dark of its own hue as ink. One large card radius (20)
   stepping down inside (12, 8, 6). Flat surfaces: a 1px border, no shadows on
   anything at rest. Type: Manrope, sizes 12 / 14 / 16 / 24. */

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  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;
}

:root {
  --ground: #f6f7f8;  --surface: #ffffff;  --raised: #f4f5f6;  --active: #eceef0;
  --border: #e6e7ea;  --rule: #eff0f2;     --control: #d3d6db;
  --text: #111214;    --muted: #5d6066;    --faint: #6b6e73;
  --positive: #247b50;  --negative: #c4242a;
  --notice-bg: #fffbeb; --notice-line: #fde68a; --notice-ink: #92400e;
  --brand: #1d1f20;  --brand-tint: #eceef0;  --brand-ink: #1d1f20;   /* set per company by app.js */
  --radius-card: 20px;  --radius-inner: 12px;  --radius-small: 8px;  --radius-chip: 6px;
  --pad: 20px;  --gap: 16px;  --margin: 16px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (min-width: 600px) { :root { --margin: 24px; } }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 400 16px/1.5 var(--font);
  background: var(--ground);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 16px; line-height: 1.4; font-weight: 600; }
a { color: var(--brand-ink); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.icon { width: 20px; height: 20px; flex: none; }
.icon.inline { width: 16px; height: 16px; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; border-radius: 4px; }

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

.topbar {
  position: sticky; top: 0; z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.topbar-row, .company-toggle { max-width: 1100px; margin: 0 auto; padding: 0 var(--margin); }
.topbar-row { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.wordmark img { width: 28px; height: 28px; border-radius: 8px; }
.avatar-btn { background: none; border: 0; padding: 4px; margin-right: -4px; cursor: pointer; }
.avatar {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand-ink); font-weight: 700; font-size: 14px; flex: none;
}
.avatar.large { width: 44px; height: 44px; font-size: 16px; }

.company-toggle { display: flex; gap: 4px; padding-bottom: 12px; }
.company-toggle button {
  flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; background: var(--raised); cursor: pointer;
  font-weight: 600; font-size: 14px; color: var(--muted);
}
.company-toggle button span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-toggle button.active { background: var(--surface); border-color: var(--control); color: var(--text); }
@media (min-width: 600px) { .company-toggle { justify-content: flex-start; } .company-toggle button { flex: 0 1 240px; } }

.content { max-width: 1100px; margin: 0 auto; padding: 24px var(--margin) 120px; display: flex; flex-direction: column; gap: var(--gap); }

.title-row { display: flex; align-items: center; gap: 14px; justify-content: space-between; }
.title-row > div:first-of-type { flex: 1; min-width: 0; }
.title-row .title-logo + div { flex: 1; }
.subline { color: var(--muted); font-size: 14px; margin-top: 2px; }
.path-inline { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.path-inline.missing { color: var(--notice-ink); font-weight: 600; }

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background-color .12s, border-color .12s, transform .08s;
}
.btn:active { transform: scale(.98); }
.btn.big { height: 56px; font-size: 16px; width: 100%; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.primary:disabled { background: var(--active); color: var(--muted); }
.btn.secondary { background: var(--surface); border-color: var(--control); color: var(--text); }
.btn.secondary:hover { border-color: var(--muted); }
.btn.link { background: none; height: 44px; padding: 0 8px; color: var(--brand-ink); }
.btn.link:hover { text-decoration: underline; }
.btn.back { padding-left: 0; color: var(--text); gap: 4px; }
.btn.danger { color: var(--negative); }
.btn.dropbox { background: #0061fe; color: #fff; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Panels, banners, chips ────────────────────────────────────────────── */

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.panel.pad { padding: var(--pad); display: flex; flex-direction: column; gap: 14px; overflow: visible; }
.panel.pad > .btn { align-self: flex-start; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px var(--pad) 6px; }
.panel-meta { color: var(--muted); font-size: 14px; }
.empty { padding: 8px var(--pad) 22px; color: var(--muted); font-size: 14px; }

.banner { border-radius: var(--radius-inner); padding: 12px 14px; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px solid transparent; }
.banner.info { background: var(--raised); color: var(--text); }
.banner.ok { background: #e9f6ef; color: #155b37; }
.banner.warn { background: var(--notice-bg); border-color: var(--notice-line); color: var(--notice-ink); }
.banner.warn a { color: var(--notice-ink); text-decoration: underline; }
.banner.error { background: #ffedea; color: #831c1e; }

.job-chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--radius-chip);
  background: var(--chip-bg, var(--brand-tint)); color: var(--chip-ink, var(--brand-ink));
  font-size: 12px; font-weight: 700; white-space: nowrap; flex: none; font-variant-numeric: tabular-nums;
}
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.pill.warn { background: var(--notice-bg); color: var(--notice-ink); border: 1px solid var(--notice-line); }
.pill.neutral { background: var(--active); color: #3a3c40; }
.warn-text { color: var(--notice-ink); font-weight: 600; font-size: 14px; }

/* Logos sit on white tiles so any logo reads on any background */
.logo-chip, .toggle-logo, .title-logo, .logo-tile { display: inline-grid; place-items: center; flex: none; background: #fff; overflow: hidden; }
.logo-chip img, .toggle-logo img, .title-logo img, .logo-tile img { width: 100%; height: 100%; object-fit: contain; }
.logo-chip { width: 44px; height: 44px; border-radius: var(--radius-inner); padding: 5px; border: 1px solid var(--border); }
.toggle-logo { width: 24px; height: 24px; border-radius: var(--radius-chip); padding: 2px; }
.title-logo { width: 52px; height: 52px; border-radius: 14px; padding: 6px; border: 1px solid var(--border); }

/* ── Home ──────────────────────────────────────────────────────────────── */

.home-grid { display: grid; gap: 24px; align-items: start; }
.home-main { display: flex; flex-direction: column; gap: var(--gap); }
.actions { display: flex; flex-direction: column; gap: 10px; }
.install { color: var(--muted); font-size: 14px; }
@media (min-width: 880px) {
  .home-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

.r-list { list-style: none; margin: 0; padding: 0 0 6px; }
.r-row { padding: 14px var(--pad); border-top: 1px solid var(--rule); }
.r-row:first-child { border-top: 0; }
.r-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.r-line.sub { margin-top: 4px; flex-wrap: wrap; row-gap: 6px; }
.r-vendor { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.r-amount { font-weight: 700; flex: none; }
.r-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; min-width: 0; flex: 1 1 auto; }
.r-meta > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── New receipt ───────────────────────────────────────────────────────── */

.receipt-grid { display: grid; gap: 20px; align-items: start; }
.receipt-side { display: flex; flex-direction: column; gap: var(--gap); }
@media (min-width: 880px) {
  .receipt-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; }
  .receipt-side { position: sticky; top: 140px; }
}
.pages { display: flex; gap: 10px; overflow-x: auto; padding: 8px 8px 4px 0; margin-top: -8px; }
.page-thumb { position: relative; flex: none; }
.page-thumb img { height: 180px; border-radius: var(--radius-small); display: block; border: 1px solid var(--border); background: #fff; }
.thumb-x { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ground); background: var(--text); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.add-page {
  flex: none; width: 112px; height: 180px; border-radius: var(--radius-small); border: 1px dashed var(--control); background: transparent;
  color: var(--muted); font-size: 14px; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
}
.add-page:hover { border-color: var(--muted); color: var(--text); }
@media (min-width: 880px) { .page-thumb img, .add-page { height: 300px; } .add-page { width: 150px; } }

form.panel.pad { gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > span, .field > label { font-weight: 600; font-size: 14px; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 4px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type=text], input[type=date], input[type=email] {
  font: inherit; font-size: 16px; /* 16px stops iOS zooming in */
  height: 48px; padding: 0 14px; border: 1px solid var(--control); border-radius: var(--radius-inner);
  background: #fff; color: var(--text); width: 100%; min-width: 0; -webkit-appearance: none; appearance: none;
}
input::placeholder { color: var(--faint); }
input:focus { outline: 2px solid var(--brand-ink); outline-offset: -1px; border-color: transparent; }
.money { display: flex; align-items: center; border: 1px solid var(--control); border-radius: var(--radius-inner); padding-left: 14px; background: #fff; }
.money:focus-within { outline: 2px solid var(--brand-ink); outline-offset: -1px; border-color: transparent; }
.money input { border: 0; outline: 0 !important; padding-left: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.money > span { color: var(--muted); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--control); background: #fff; font-size: 14px; font-weight: 500;
}
.chip:hover span { border-color: var(--muted); }
.chip input:checked + span { background: var(--brand-tint); border-color: var(--brand-tint); color: var(--brand-ink); font-weight: 700; }
.chip input:focus-visible + span { outline: 2px solid var(--brand-ink); outline-offset: 2px; }

.project-field { position: relative; }
.suggestions {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 4; list-style: none; margin: 6px 0 0; padding: 4px 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-inner);
  box-shadow: 0 10px 28px rgba(0,0,0,.08); /* taste-skill-ignore: floating menu */ max-height: 300px; overflow-y: auto;
}
.suggestions li { padding: 12px 14px; font-size: 14px; cursor: pointer; }
.suggestions li + li { border-top: 1px solid var(--rule); }
.suggestions li:hover, .suggestions li:active { background: var(--raised); }
.suggestions li b { margin-right: 6px; font-variant-numeric: tabular-nums; }
.pstatus { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--active); color: #3a3c40; font-size: 12px; font-weight: 600; white-space: nowrap; }
.suggestions li.free, .suggestions li.clear { color: var(--brand-ink); font-weight: 600; }
.suggestions li.empty { color: var(--muted); cursor: default; }

.filename-preview { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.filename-preview b { color: var(--text); font-weight: 600; }
.save { position: sticky; bottom: calc(env(safe-area-inset-bottom) + 12px); }

/* ── Admin ─────────────────────────────────────────────────────────────── */

.saved-stamp { color: var(--muted); font-size: 14px; flex: none; }
@media (max-width: 599px) { .saved-stamp { display: none; } }
.setting { display: grid; gap: 14px; padding-top: 28px; margin-top: 12px; border-top: 1px solid var(--border); }
.setting-label p { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 46ch; }
@media (min-width: 880px) {
  .setting { grid-template-columns: 300px minmax(0, 1fr); gap: 40px; }
}
.kv { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.kv > span:first-child { color: var(--muted); }
.kv > :last-child { text-align: right; overflow-wrap: anywhere; }

.add-row { display: flex; gap: 8px; padding: 16px var(--pad); border-bottom: 1px solid var(--rule); }
.add-row input { height: 44px; }

.people, .companies { list-style: none; margin: 0; padding: 0; }
.person { border-top: 1px solid var(--rule); }
.person:first-child { border-top: 0; }
.person-head {
  width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 20px; grid-template-areas: "av text access chev";
  align-items: center; column-gap: 12px; padding: 14px var(--pad); background: none; border: 0; text-align: left; cursor: pointer;
}
.person-head:hover { background: var(--raised); }
.person-avatar {
  grid-area: av; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--chip-bg); color: var(--chip-ink); font-weight: 700; font-size: 14px;
}
.person-text { grid-area: text; display: flex; flex-direction: column; min-width: 0; }
.person-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.person-sub { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-access { grid-area: access; display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.person-head .chev { grid-area: chev; color: var(--faint); transition: transform .15s; }
.person.open .chev { transform: rotate(90deg); }
@media (max-width: 599px) {
  .person-head { grid-template-columns: 40px minmax(0, 1fr) 20px; grid-template-areas: "av text chev" "av access chev"; row-gap: 6px; }
  .person-access { justify-content: flex-start; }
}
.person-body { padding: 0 var(--pad) 18px calc(var(--pad) + 52px); display: flex; flex-direction: column; gap: 14px; }
.person-body > .btn { align-self: flex-start; padding-left: 0; }
.access { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; min-height: 32px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--text); margin: 0; }
.folder-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; padding-left: 30px; }
.folder-line .btn { flex: none; }

.company-row { padding: 16px var(--pad); border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.company-row:first-child { border-top: 0; }
.company-row .folder-line { padding-left: 54px; }
.company-name-row { display: flex; gap: 10px; align-items: center; }
.company-name-row input[type=text] { height: 44px; font-weight: 600; }
.company-name-row input[type=color] { width: 44px; height: 44px; border: 0; padding: 0; background: none; }
.small-action { align-self: flex-start; margin-left: 46px; font-size: 14px; }
.add-company { margin: 4px calc(var(--pad) - 8px) 12px; }

.savebar {
  position: sticky; bottom: calc(env(safe-area-inset-bottom) + 16px); z-index: 6; align-self: center;
  width: min(100%, 520px); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 6px 6px 20px;
  box-shadow: 0 10px 28px rgba(0,0,0,.08); /* taste-skill-ignore: sticky save bar floats over the page */ font-weight: 600; font-size: 14px;
}
.savebar[hidden], .saved-stamp[hidden] { display: none; }

/* ── Sign-in and message screens ───────────────────────────────────────── */

.center-screen {
  min-height: 100vh; max-width: 420px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 32px) var(--margin) 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center;
}
.center-screen .btn.big { max-width: 360px; }
.lede { color: var(--muted); font-size: 16px; max-width: 32ch; }
.logo-row { display: flex; gap: 14px; margin-bottom: 8px; }
.logo-tile { width: 88px; height: 88px; border-radius: var(--radius-card); padding: 10px; border: 1px solid var(--border); }
.hero-icon { width: 72px; height: 72px; border-radius: 18px; }

/* ── Sheets: account menu and Dropbox picker ───────────────────────────── */

.backdrop { position: fixed; inset: 0; background: rgba(17,18,20,.4); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--surface); width: 100%; max-width: 560px; max-height: 85vh; overflow-y: auto;
  border-radius: var(--radius-card) var(--radius-card) 0 0; padding: 20px var(--pad) calc(env(safe-area-inset-bottom) + 20px);
  animation: up .2s ease-out;
}
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { margin-bottom: 12px; font-weight: 600; }
.menu-head { display: flex; align-items: center; gap: 12px; }
.menu-name { font-weight: 600; }
.menu-sub { color: var(--muted); font-size: 14px; }
.menu-companies { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.menu-list { list-style: none; margin: 12px 0 0; padding: 0; }
.menu-list li { border-top: 1px solid var(--rule); }
.menu-list button {
  width: 100%; text-align: left; background: none; border: 0; padding: 14px 0; cursor: pointer;
  font-weight: 600; display: flex; flex-direction: column; gap: 2px;
}
.menu-list button span { color: var(--muted); font-size: 14px; font-weight: 400; }
.menu-list button.danger { color: var(--negative); }
.crumb { color: var(--muted); font-size: 14px; margin-bottom: 10px; overflow-wrap: anywhere; }
.browser { list-style: none; margin: 0 0 12px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-inner); overflow: hidden; }
.browser li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-top: 1px solid var(--rule); cursor: pointer; font-size: 14px; }
.browser li:first-child { border-top: 0; }
.browser li:hover { background: var(--raised); }
.sheet .btn.primary.full { width: 100%; }

/* Scanner */
body.scanning { overflow: hidden; }
.scanner {
  position: fixed; inset: 0; z-index: 40; background: #000; color: #fff;
  display: flex; flex-direction: column; touch-action: none; user-select: none; -webkit-user-select: none;
}
.scanner video, .scan-overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner.flash::after { content: ''; position: absolute; inset: 0; background: #fff; animation: flash .25s ease-out forwards; pointer-events: none; }
@keyframes flash { to { opacity: 0; } }
.scan-top {
  position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: calc(env(safe-area-inset-top) + .5rem) .75rem .6rem; background: linear-gradient(rgba(0,0,0,.6), transparent); /* taste-skill-ignore: neutral scrim over the live camera */
}
.scan-top button { justify-self: start; background: none; border: 0; color: #fff; font: inherit; font-weight: 600; padding: .4rem; }
.scan-top button.toggle { justify-self: end; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; opacity: .7; }
.scan-top button.toggle.on { background: #fff; color: #000; opacity: 1; }
.scan-title { font-weight: 600; text-align: center; }
.scan-hint {
  position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 130px); transform: translateX(-50%); z-index: 2;
  background: rgba(0,0,0,.6); padding: .5rem .9rem; border-radius: 999px; font-size: .92rem; text-align: center; max-width: 90%; width: max-content;
}
.scan-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center;
  padding: 1rem 1rem calc(env(safe-area-inset-bottom) + 1.25rem); background: linear-gradient(transparent, rgba(0,0,0,.65)); /* taste-skill-ignore: neutral scrim over the live camera */
}
.scan-bottom.single { grid-template-columns: 1fr; }
.scan-small { background: rgba(255,255,255,.15); border: 0; color: #fff; border-radius: 12px; padding: .45rem .7rem; font: inherit; font-size: .78rem; line-height: 1.15; }
.scan-small.on { background: #fde047; color: #000; }
.shutter { width: 78px; height: 78px; border-radius: 50%; border: 0; padding: 0; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.35); /* taste-skill-ignore: camera shutter ring */ }
.shutter svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.shutter .ring-bg { fill: none; stroke: #e5e7eb; stroke-width: 6; }
.shutter .ring { fill: none; stroke: #2bb673; stroke-width: 6; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .12s linear; }
.shutter:active { transform: scale(.94); }
.scanner.no-camera .shutter { opacity: .3; pointer-events: none; }
.scanner.no-camera [data-s="camera-app"] { background: #fff; color: #000; font-size: .95rem; padding: .7rem 1rem; }

.scanner.review { background: #111; }
.review-stage { position: relative; flex: 1; margin: 0 .5rem calc(env(safe-area-inset-bottom) + 100px); }
.review-img, .review-lines { position: absolute; inset: 0; }
.handle {
  position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; touch-action: none;
  background: rgba(255,255,255,.25); border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.5); /* taste-skill-ignore: drag handle over a photo */
}
.handle.drag { background: rgba(255,255,255,.5); transform-origin: center; }
.use-btn { width: 100%; max-width: 360px; padding: 1rem; border: 0; border-radius: 12px; background: #fff; color: #000; font: inherit; font-weight: 700; font-size: 1.05rem; }
.use-btn:disabled { opacity: .7; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 20px); transform: translate(-50%, 150%);
  background: #1d1f20; color: #fff; padding: 12px 16px; border-radius: var(--radius-inner); z-index: 30; max-width: calc(100% - 32px);
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 28px rgba(0,0,0,.16); /* taste-skill-ignore: toast floats */ transition: transform .25s ease;
}
.toast.error { background: var(--negative); }
.toast.show { transform: translate(-50%, 0); }

.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }