:root{color-scheme:light;--bg:#F4F2ED;--surface:#FBFAF7;--surface-2:#ECE9E3;--ink:#171716;--ink-2:#66635E;--ink-3:#A6A29B;--rule:#DAD6CE;--inv:#1A1A19;--on-inv:#F4F2ED;--on-inv-2:#8D8A84;--accent:#C9483A;--accent-tint:#F3DDD8;--warn:#B0802A;--warn-tint:#F1E6CF;--ok:#5F7D5C;--paper:#FFFEFB;--paper-ink:#2A2926;--faint:#E9E5DD;--cherry:#C2364A;--tape:rgba(236, 222, 186, 0.82);--p-me:#171716;--p-fog:#6F8DA6;--p-sage:#7F9877;--p-oat:#BC9A6A;--p-rose:#C2878D;--p-lilac:#9C93B5}
.paper{--bg:#F4F2ED;--surface:#FBFAF7;--surface-2:#ECE9E3;--ink:#171716;--ink-2:#66635E;--ink-3:#A6A29B;--rule:#DAD6CE;--inv:#1A1A19;--on-inv:#F4F2ED;--on-inv-2:#8D8A84;--accent:#C9483A;--accent-tint:#F3DDD8;--warn:#B0802A;--warn-tint:#F1E6CF;--ok:#5F7D5C;--paper:#FFFEFB;--paper-ink:#2A2926;--faint:#E9E5DD;--cherry:#C2364A;--tape:rgba(236, 222, 186, 0.82);--p-me:#171716;--p-fog:#6F8DA6;--p-sage:#7F9877;--p-oat:#BC9A6A;--p-rose:#C2878D;--p-lilac:#9C93B5}
@media (prefers-color-scheme:dark){:root{color-scheme:dark;--bg:#181816;--surface:#22211F;--surface-2:#2D2C29;--ink:#EEECE7;--ink-2:#A29E96;--ink-3:#6F6B64;--rule:#363431;--inv:#36332D;--on-inv:#EEECE7;--on-inv-2:#A39D92;--accent:#E0644F;--accent-tint:#3A221D;--warn:#D2A04A;--warn-tint:#362C1A;--ok:#8BAA86;--paper:#2F2D29;--paper-ink:#ECE9E2;--faint:#393733;--cherry:#E2566A;--tape:rgba(120, 108, 82, 0.55);--p-me:#EEECE7;--p-fog:#86A3BB;--p-sage:#97B08E;--p-oat:#CFAE7E;--p-rose:#D59BA1;--p-lilac:#ADA5C6}.paper{--paper:#2F2D29;--paper-ink:#ECE9E2}}
/* Chit website. Colour variables (--bg, --ink, --accent, --p-fog …) are generated from
   packages/ui/src/tokens.ts by build.mjs and prepended to this file; light by default, dark by
   system setting. Thermal paper, dot-matrix numbers, one red accent for "needs attention". */

:root {
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 1px 0 rgba(0, 0, 0, .03), 0 8px 24px rgba(40, 36, 30, .06);
  --paper-shadow: rgba(40, 36, 30, .16);
}
@media (prefers-color-scheme: dark) {
  :root { --shadow: 0 0 0 1px #262624; --paper-shadow: rgba(0, 0, 0, .5); }
}
:root:lang(zh) { --sans: "Inter", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; }
:root:lang(ja) { --sans: "Inter", system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans CJK JP", "Yu Gothic", Meiryo, sans-serif; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { display: block; }
a { color: inherit; text-decoration-color: var(--ink-3); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right)); }
.wrap.narrow { max-width: 760px; }

.skip { position: absolute; left: 12px; top: -60px; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); z-index: 10; }
.skip:focus { top: 12px; }

/* dot-matrix text: SVG circles from the app's 5x7 glyph table */
.dm { display: inline-block; line-height: 1; white-space: nowrap; }
.dm svg { fill: currentColor; overflow: visible; vertical-align: baseline; }

/* ───────── header & footer ───────── */
.top { position: sticky; top: 0; z-index: 20; padding: 14px 0 12px; }
/* frosted strip that fades out downwards instead of ending in a hard edge */
.top::before {
  content: ""; position: absolute; inset: 0 0 -28px 0; z-index: -1; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.top-left { display: flex; align-items: center; gap: 14px; }
.brand { display: block; padding: 6px 0; }
.brand img { height: 26px; width: auto; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; flex: none;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  transition: transform .15s var(--ease);
}
.icon-btn svg { fill: currentColor; }
.icon-btn:active { transform: scale(.94); }
.icon-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ───────── menu: a frosted panel that slides in from the left ───────── */
/* Native popover. Every style lives on .menu itself (not only on :popover-open), so the closing
   animation keeps its look instead of falling back to the browser's default popover box.
   Without popover support the menu stays hidden and the footer links remain. */
.menu {
  position: fixed; inset: 0 auto 0 0; margin: 0; border: 0; padding: 0;
  width: min(400px, 88vw); height: 100dvh; max-height: none; overflow: hidden auto;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  backdrop-filter: blur(30px) saturate(170%);
  box-shadow: 1px 0 0 color-mix(in srgb, var(--ink) 8%, transparent), 24px 0 60px rgba(20, 18, 14, .10);
  display: none; transform: translateX(-100%); opacity: 0;
  transition: transform .42s var(--ease), opacity .3s var(--ease), overlay .42s allow-discrete, display .42s allow-discrete;
}
.menu:popover-open { display: block; transform: none; opacity: 1; }
.menu::backdrop {
  background: rgba(18, 18, 16, .18);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .3s var(--ease), overlay .42s allow-discrete, display .42s allow-discrete;
}
.menu:popover-open::backdrop { opacity: 1; }
@starting-style {
  .menu:popover-open { transform: translateX(-100%); opacity: 0; }
  .menu:popover-open::backdrop { opacity: 0; }
}

.menu-in { min-height: 100%; display: flex; flex-direction: column; padding: 22px max(22px, env(safe-area-inset-left)) max(28px, env(safe-area-inset-bottom)); }
.menu-top { display: flex; align-items: center; justify-content: space-between; }
.menu-list { list-style: none; margin-top: 44px; display: grid; gap: 4px; }
.menu-list.minor { margin-top: 24px; padding-top: 22px; border-top: 1px dashed var(--rule); }
.menu-list a {
  display: grid; grid-template-columns: 34px auto 1fr; align-items: baseline; column-gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink);
  transition: background .2s;
}
.menu-list a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.menu-num { font-size: 13px; color: var(--ink-3); }
.menu-label { font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.menu-dots { font-size: 13px; color: var(--ink-3); }
:root:lang(en) .menu-dots { font-size: 22px; color: var(--ink); grid-column: 2 / 4; }
.menu-list.minor .menu-label { font-size: 17px; font-weight: 500; }
:root:lang(en) .menu-list.minor .menu-dots { font-size: 16px; }
.menu-list a[aria-current] { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.menu-list a[aria-current] .menu-num { color: var(--ink); }
.menu-list li { transition: transform .5s var(--ease), opacity .4s var(--ease); }
.menu:popover-open .menu-list li { transform: none; opacity: 1; }
@starting-style { .menu:popover-open .menu-list li { transform: translateX(-14px); opacity: 0; } }
.menu-list li:nth-child(2) { transition-delay: .04s; } .menu-list li:nth-child(3) { transition-delay: .08s; }
.menu-list li:nth-child(4) { transition-delay: .12s; }
.menu-list.minor li { transition-delay: .1s; } .menu-list.minor li:nth-child(n+2) { transition-delay: .14s; }
.menu-foot { margin-top: auto; padding-top: 32px; display: grid; gap: 14px; justify-items: start; }
.menu-foot p { font-size: 12px; color: var(--ink-3); }
:root:has(.menu:popover-open) { overflow: hidden; }
.menu-label { white-space: nowrap; }
@media (max-width: 480px) {
  /* dots move under the native label */
  :root:not(:lang(en)) .menu-list a { grid-template-columns: 34px 1fr; row-gap: 2px; }
  :root:not(:lang(en)) .menu-dots { grid-column: 2; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .menu, .menu::backdrop, .menu-list li { transition: none; }
}

.lang { display: flex; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.lang a {
  padding: 5px 12px; border-radius: 999px; font-size: 13px; line-height: 1.4;
  color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { background: var(--ink); color: var(--bg); }

.foot { margin-top: 96px; }
.foot-in { border-top: 1px dashed var(--rule); padding-top: 28px; padding-bottom: max(40px, env(safe-area-inset-bottom)); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-made { margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.foot-made a { color: inherit; }

/* ───────── home ───────── */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center; gap: 56px; padding-top: 48px;
}
.kicker { font-size: 13px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.hero h1 {
  margin-top: 18px;
  font-size: clamp(36px, 5.4vw, 58px); line-height: 1.06; font-weight: 600; letter-spacing: -.025em;
}
/* CJK headlines: break only at punctuation, never inside a phrase */
:root:lang(zh) .hero h1, :root:lang(ja) .hero h1 { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: 0; line-height: 1.22; }
:root:lang(zh) :is(h1, h2, h3), :root:lang(ja) :is(h1, h2, h3) { word-break: keep-all; overflow-wrap: anywhere; }
.lede { margin-top: 20px; max-width: 32em; font-size: 18px; color: var(--ink-2); }

.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 52px; padding: 6px 24px; border-radius: 26px; line-height: 1.25;
  background: var(--ink); color: var(--bg); text-decoration: none;
}
.store-name { font-weight: 600; font-size: 15px; }
.store.soon { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.store-note { font-size: 12px; color: var(--ink-3); }

.section { padding-top: 88px; }
.section-title { font-size: clamp(24px, 3vw, 30px); line-height: 1.2; font-weight: 600; letter-spacing: -.015em; text-wrap: balance; }
.section-sub { margin-top: 8px; color: var(--ink-2); max-width: 36em; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.card { background: var(--surface); border-radius: var(--r-lg); padding: 26px 24px 28px; box-shadow: var(--shadow); }
.card .num { font-size: 17px; color: var(--ink-3); }
.card h3 { margin-top: 16px; font-size: 18px; line-height: 1.3; font-weight: 600; }
.card p { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.card code { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.section-more { margin-top: 18px; font-size: 15px; }
.section-more a::after { content: " →"; }

.band { border-radius: var(--r-lg); background: var(--inv); color: var(--on-inv); padding: 40px 36px; }
.band .section-sub { color: var(--on-inv-2); }
.band ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; margin-top: 26px; }
.band li { position: relative; padding-left: 20px; }
.band li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--on-inv); }
.band li span { display: block; font-size: 14px; color: var(--on-inv-2); }
.band .more { margin-top: 28px; font-size: 15px; }

.price { display: grid; grid-template-columns: auto 1fr; gap: 6px 28px; align-items: baseline; }
.price .big { font-size: 44px; line-height: 1; grid-row: span 2; }

/* ───────── example receipt ───────── */
.receipt { justify-self: center; width: min(100%, 360px); transform: rotate(-2deg); filter: drop-shadow(0 16px 26px var(--paper-shadow)); }
.paper {
  --z: 14px;
  background: var(--paper); color: var(--paper-ink);
  padding: 24px 22px 36px; font-size: 14px; line-height: 1.4;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--z) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--z) 100%;
}
.paper ul { list-style: none; }
.r-head { text-align: center; font-size: 17px; padding-top: 2px; }
.sep { border: 0; border-top: 1px dashed var(--rule); margin: 14px 0; }
.r-line { display: grid; grid-template-columns: minmax(0, 1fr) auto 72px; grid-template-areas: "raw raw raw" "name who amt"; align-items: center; column-gap: 10px; padding: 5px 0; }
.r-raw { grid-area: raw; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--ink-3); }
.r-name { grid-area: name; }
.r-who { grid-area: who; display: flex; gap: 3px; }
.r-who i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.r-amt { text-align: right; font-size: 15px; }
.r-line .r-amt { grid-area: amt; }
.r-total { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label big" "check big"; align-items: end; }
.r-total > span:first-child { grid-area: label; font-weight: 600; }
.r-check { grid-area: check; font-size: 12px; color: var(--ok); }
.r-check::before { content: "✓ "; }
.r-big { grid-area: big; font-size: 30px; }
.r-share { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 72px; align-items: center; gap: 10px; padding: 4px 0; }
.av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--paper); font-size: 12px; font-weight: 600; }
.pill { height: 22px; padding: 0 9px; border-radius: 11px; display: inline-flex; align-items: center; font-size: 11.5px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill.paid { background: var(--paper-ink); color: var(--paper); }
.pill.confirmed::before { content: "✓ "; white-space: pre; color: var(--ok); }
.pill.waiting { background: var(--accent-tint); color: var(--accent); }
.tone-me { --c: var(--p-me); } .tone-fog { --c: var(--p-fog); } .tone-sage { --c: var(--p-sage); }
.tone-oat { --c: var(--p-oat); } .tone-rose { --c: var(--p-rose); } .tone-lilac { --c: var(--p-lilac); }

/* ───────── documents ───────── */
.doc { padding-top: 36px; }
.doc h1 { font-size: clamp(30px, 4.2vw, 42px); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
.updated { margin-top: 8px; font-size: 14px; color: var(--ink-3); }
.notice { margin-top: 14px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.notice.draft { background: var(--warn-tint); color: var(--ink); position: relative; padding-left: 34px; }
.notice.draft::before { content: ""; position: absolute; left: 16px; top: 1.1em; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }

.toc { margin-top: 28px; padding: 18px 22px 20px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); font-size: 14px; }
.toc p { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.toc ol { margin-top: 8px; padding-left: 1.6em; columns: 2; column-gap: 32px; }
.toc li { margin: 3px 0; break-inside: avoid; color: var(--ink-3); }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }

.prose { margin-top: 12px; }
.prose > :first-child { margin-top: 28px; }
.prose h2 { margin: 44px 0 12px; padding-top: 24px; border-top: 1px dashed var(--rule); font-size: 20px; line-height: 1.35; font-weight: 600; scroll-margin-top: 88px; }
.prose h3 { margin: 26px 0 8px; font-size: 16.5px; font-weight: 600; }
.prose p, .prose ul, .prose ol, .prose .table { margin-bottom: 14px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-3); }
.prose strong { font-weight: 600; }
.prose .table { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.prose .callout { padding: 16px 20px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.prose .path { font-weight: 600; white-space: nowrap; }

/* ───────── guides ───────── */
.crumbs { font-size: 14px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a::after { content: " ›"; color: var(--ink-3); }
.guide h1 { margin-top: 10px; }
/* Illustrations inside a guide: the home page's demos, centred, and a still grid of report pages. */
.prose .demo { margin: 36px auto; }
.rgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 36px 0; }
.rgrid .rcard { width: auto; margin: 0; }
@media (max-width: 640px) { .rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .rgrid .rcard:nth-child(n + 6) { display: none; } }

.doc .lede { margin-top: 14px; font-size: 18px; color: var(--ink-2); }
.guide-group { margin-top: 40px; }
.group-title { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
:root:lang(zh) .group-title, :root:lang(ja) .group-title { letter-spacing: .02em; }
.guide-cards { list-style: none; display: grid; gap: 10px; margin-top: 14px; }
.guide-cards a {
  display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; row-gap: 4px;
  padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); transition: transform .2s var(--ease);
}
.guide-cards a:hover { transform: translateY(-1px); }
.guide-cards .num { grid-row: span 2; font-size: 16px; color: var(--ink-3); padding-top: 3px; }
.g-title { font-weight: 600; font-size: 17px; line-height: 1.35; }
.g-desc { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.more { margin-top: 56px; padding-top: 28px; border-top: 1px dashed var(--rule); }
.more-title { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.more-all { margin-top: 16px; font-size: 15px; }
.get { margin-top: 40px; padding: 26px 24px; border-radius: var(--r-lg); background: var(--inv); color: var(--on-inv); }
.get-title { font-size: 20px; font-weight: 600; }
.get .stores { margin-top: 16px; }
.get .store.soon { background: color-mix(in srgb, var(--on-inv) 10%, transparent); color: var(--on-inv); box-shadow: none; }
.get .store-note { color: var(--on-inv-2); }

.lost { text-align: center; padding-top: 64px; }
.lost-code { font-size: 72px; color: var(--ink-3); }
.lost-list { list-style: none; margin-top: 28px; display: grid; gap: 8px; }
.lost-list a { margin-left: 8px; color: var(--ink-2); }

/* ───────── phones ───────── */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-top: 28px; }
  .receipt { transform: rotate(-1.5deg); }
  .section { padding-top: 64px; }
  .band { padding: 30px 22px; }
  .band ul { grid-template-columns: minmax(0, 1fr); }
  .toc ol { columns: 1; }
  .price { grid-template-columns: minmax(0, 1fr); }
  .price .big { grid-row: auto; }
}
@media (max-width: 600px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .top-in { flex-wrap: wrap; }
  .lang a { padding: 5px 10px; }
  .lede { font-size: 17px; }
  .paper { padding: 22px 16px 34px; }
}

/* Invite page (/<lang>/join/<code>) */
.join-kicker { color: var(--ink-3); font-size: 15px; margin-bottom: 14px; }
.join-card { margin-top: 28px; padding: 22px 24px; border-radius: 22px; background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow); display: grid; gap: 10px; justify-items: start; }
.join-label { font-size: 13px; color: var(--ink-2); }
.join-code { font-size: 40px; line-height: 1; }
.join-copy { font: inherit; font-size: 14px; padding: 8px 16px; border-radius: 18px; border: 1px solid var(--rule); background: transparent; color: inherit; cursor: pointer; }
.join-steps { list-style: none; padding: 0; margin-top: 30px; display: grid; gap: 26px; }
.join-steps strong { display: block; margin-bottom: 10px; }
.join-steps .stores { margin-top: 14px; }
.join-manual { margin-top: 30px; color: var(--ink-3); font-size: 14px; }

/* ───────── home: feature sections with illustrations ───────── */
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: 56px; padding-top: 128px;
}
.feature.flip .f-text { order: 2; }
.f-text .kicker { margin-bottom: 14px; }
.f-text .section-sub { font-size: 17px; }
.f-points { list-style: none; margin-top: 22px; display: grid; gap: 12px; max-width: 34em; }
.f-points li { position: relative; padding-left: 20px; font-size: 15px; color: var(--ink-2); }
.f-points li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }

/* A phone, drawn in CSS. Every illustration runs one loop of --dur. */
.demo { --dur: 12s; justify-self: center; width: min(100%, 300px); margin: 0; }
.phone {
  position: relative; aspect-ratio: 1 / 2; padding: 9px; border-radius: 46px;
  background: #121211; box-shadow: 0 30px 70px var(--paper-shadow), inset 0 0 0 1.5px #3A3936;
}
.screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 37px;
  background: var(--bg); color: var(--ink); font-size: 12.5px; line-height: 1.4;
  display: flex; flex-direction: column;
}
.screen .av { width: 24px; height: 24px; font-size: 11px; flex: none; }
.bubble { max-width: 82%; padding: 8px 11px; border-radius: 16px 16px 16px 5px; background: var(--surface); box-shadow: var(--shadow); }
.bubble.me { margin-left: auto; border-radius: 16px 16px 5px 16px; background: var(--ink); color: var(--bg); }
.cd-btn { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 14px; border-radius: 15px; background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: 12px; }
.cd-btn.dark { background: var(--ink); color: var(--bg); }
.cd-btn.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.cd-group { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--c); color: var(--paper); font-size: 12px; flex: none; }

/* scanning */
.cam .screen { background: #0E0E0D; color: #F4F2ED; align-items: center; }
.cam-hint { position: relative; margin-top: 42px; height: 30px; min-width: 120px; }
.cam-hint span { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 14px; border-radius: 15px; background: rgba(244, 242, 237, .14); font-weight: 600; white-space: nowrap; }
.cam-hint .got { background: #F4F2ED; color: #121211; }
.cam-view { position: relative; margin-top: 26px; width: 84%; padding: 14px 10px; }
.cnr { position: absolute; width: 22px; height: 22px; border: 2.5px solid #F4F2ED; }
.cnr.tl { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.cnr.tr { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.cnr.bl { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.cnr.br { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.sd-paper { background: var(--paper); color: var(--paper-ink); padding: 16px 14px 18px; transform: rotate(-1.2deg); font-size: 12px; }
.sd-head { text-align: center; font-size: 13px; padding-bottom: 10px; border-bottom: 1px dashed var(--rule); }
.sd-lines { list-style: none; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.sd-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 30px; }
.sd-raw, .sd-name { grid-area: 1 / 1; }
.sd-raw { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--ink-3); }
.sd-amt { font-size: 12px; }
.sd-total { display: grid; grid-template-columns: 1fr auto; align-items: end; padding-top: 10px; }
.sd-total > span:first-child { font-weight: 600; }
.sd-ok { grid-row: 2; font-size: 10.5px; color: var(--ok); }
.sd-ok::before { content: "✓ "; }
.sd-big { grid-row: span 2; grid-column: 2; font-size: 20px; }
.scanline { position: absolute; left: 6px; right: 6px; top: 0; height: 3px; border-radius: 2px; background: #F4F2ED; box-shadow: 0 0 18px 4px rgba(244, 242, 237, .5); opacity: 0; animation: scan-sweep var(--dur) linear infinite; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; animation: flash var(--dur) linear infinite; }
.cam-shutter { margin-top: auto; margin-bottom: 30px; width: 58px; height: 58px; border-radius: 50%; border: 3px solid #F4F2ED; display: grid; place-items: center; }
.cam-shutter i { width: 44px; height: 44px; border-radius: 50%; background: #F4F2ED; animation: press-shutter var(--dur) linear infinite; }
@keyframes scan-sweep { 0% { top: 4%; opacity: 1; } 14% { top: 92%; opacity: 1; } 15%, 100% { top: 92%; opacity: 0; } }
@keyframes flash { 0%, 15% { opacity: 0; } 16% { opacity: .7; } 21%, 100% { opacity: 0; } }

/* group conversation */
.cd-head { display: flex; align-items: center; gap: 9px; padding: 40px 14px 12px; background: var(--surface); box-shadow: var(--shadow); }
.cd-back { font-size: 22px; line-height: 1; color: var(--ink-2); }
.cd-title { display: grid; line-height: 1.25; }
.cd-title small { color: var(--ink-3); font-size: 11px; }
.cd-feed { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 12px; }
.cd-row { display: flex; align-items: flex-end; gap: 7px; }
.cd-card { flex: 1; max-width: 84%; padding: 12px; border-radius: 16px 16px 16px 5px; background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow); display: grid; gap: 6px; }
.cd-shop { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.cd-sub { font-size: 11.5px; color: var(--ink-2); }
.cd-mine { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; border-top: 1px dashed var(--rule); font-size: 12px; }
.cd-card .cd-btn { grid-area: 4 / 1; justify-self: start; }
.cd-card.pay { grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; border-radius: 16px; }
.tick { font-style: normal; color: var(--ok); font-weight: 700; }
.cd-event { display: grid; justify-items: center; gap: 8px; padding: 6px 0 2px; font-size: 11px; color: var(--ink-3); }
.stamp { --from: scale(1.8) rotate(-14deg); padding: 6px 12px; border: 2px solid var(--cherry); border-radius: 8px; color: var(--cherry); font-size: 15px; transform: rotate(-6deg); --rest: rotate(-6deg); }
.cd-compose { display: flex; justify-content: space-between; align-items: center; margin: 0 12px 22px; padding: 9px 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink-3); }
.cd-compose i { font-style: normal; font-size: 18px; line-height: 1; color: var(--ink-2); }

/* asking Dot */
.dot-mark .disc { fill: var(--ink); }
.dot-mark .pap { fill: var(--bg); opacity: .4; }
.dot-mark .eye { fill: var(--bg); }
.dd-home { padding: 44px 14px 0; display: grid; gap: 10px; }
.dd-mark { font-size: 15px; }
.dd-month { display: grid; gap: 4px; padding: 14px; border-radius: 18px; background: var(--inv); color: var(--on-inv); font-size: 24px; }
.dd-month small { font-size: 11px; color: var(--on-inv-2); }
.dd-month svg { width: 100%; margin-top: 6px; }
.dd-month svg circle[fill="var(--faint)"] { fill: color-mix(in srgb, var(--on-inv) 14%, transparent); }
.dd-month svg circle[fill="var(--paper-ink)"] { fill: var(--on-inv); }
.dd-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.dd-amt { display: grid; justify-items: end; font-size: 13px; }
.dd-amt small { font-size: 10px; color: var(--ink-3); }
.dd-fab { position: absolute; right: 16px; bottom: 26px; width: 50px; height: 50px; animation: press-fab var(--dur) linear infinite; }
.dd-fab .dot-mark { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 12px var(--paper-shadow)); }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ink); opacity: 0; animation: ring var(--dur) linear infinite; }
.dd-sheet {
  --from: translateY(105%);
  position: absolute; left: 0; right: 0; bottom: 0; height: 80%; padding: 8px 14px 18px;
  border-radius: 26px 26px 37px 37px; background: var(--surface); box-shadow: 0 -10px 40px rgba(20, 18, 14, .18);
  display: flex; flex-direction: column; gap: 9px;
}
.dd-grab { width: 38px; height: 4px; border-radius: 2px; background: var(--rule); align-self: center; }
.dd-who { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; }
.dot-mark.small { width: 20px; height: 20px; flex: none; }
.dd-sheet .bubble { background: var(--bg); box-shadow: none; }
.dd-sheet .bubble.me { background: var(--ink); }
.dd-think { display: flex; gap: 4px; padding: 10px 12px; width: max-content; border-radius: 14px; background: var(--bg); opacity: 0; animation: think var(--dur) linear infinite; margin-top: -9px; height: 0; padding-block: 0; overflow: hidden; }
.dd-think i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: bob 1s ease-in-out infinite; }
.dd-think i:nth-child(2) { animation-delay: .15s; } .dd-think i:nth-child(3) { animation-delay: .3s; }
.dd-card { display: grid; gap: 7px; padding: 12px; border-radius: 16px; background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow); }
.dd-card small { font-size: 10.5px; color: var(--ink-3); }
.dd-rec { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.dd-split { display: grid; gap: 5px; font-size: 11.5px; }
.dd-split span { display: flex; align-items: center; gap: 6px; }
.dd-split .av { width: 18px; height: 18px; font-size: 9px; }
.dd-card .cd-btn { grid-area: 4 / 1; }
@keyframes ring { 0%, 3% { opacity: 0; transform: scale(1); } 5% { opacity: .5; } 13%, 100% { opacity: 0; transform: scale(1.9); } }
@keyframes press-shutter { 0%, 13% { transform: none; } 15% { transform: scale(.82); } 18%, 100% { transform: none; } }
@keyframes press-fab { 0%, 3% { transform: none; } 6% { transform: scale(.84); } 10%, 100% { transform: none; } }
@keyframes think { 0%, 31% { opacity: 0; height: 0; padding-block: 0; margin-top: -9px; } 32%, 37% { opacity: 1; height: 26px; padding-block: 10px; margin-top: 0; } 38%, 100% { opacity: 0; height: 0; padding-block: 0; margin-top: -9px; } }
@keyframes bob { 0%, 100% { transform: none; } 50% { transform: translateY(-3px); } }

/* Steps of a loop: an element with in-N appears at step N, one with out-N goes at step N; both
   reset at the end of the loop. --from is where an appearing element comes from. */
.demo [class*="in-"] { --from: translateY(8px); }
.demo .in-1 { animation: in-1 var(--dur) var(--ease) infinite; } .demo .out-1 { animation: out-1 var(--dur) linear infinite; }
.demo .in-2 { animation: in-2 var(--dur) var(--ease) infinite; } .demo .out-2 { animation: out-2 var(--dur) linear infinite; }
.demo .in-3 { animation: in-3 var(--dur) var(--ease) infinite; } .demo .out-3 { animation: out-3 var(--dur) linear infinite; }
.demo .in-4 { animation: in-4 var(--dur) var(--ease) infinite; } .demo .out-4 { animation: out-4 var(--dur) linear infinite; }
.demo .in-5 { animation: in-5 var(--dur) var(--ease) infinite; } .demo .out-5 { animation: out-5 var(--dur) linear infinite; }
.demo .in-6 { animation: in-6 var(--dur) var(--ease) infinite; } .demo .out-6 { animation: out-6 var(--dur) linear infinite; }
.demo .in-7 { animation: in-7 var(--dur) var(--ease) infinite; } .demo .out-7 { animation: out-7 var(--dur) linear infinite; }
.dd-sheet.in-2 { --from: translateY(105%); }
.stamp.in-7 { --from: scale(1.8) rotate(-14deg); }
@keyframes in-1 { 0%, 6% { opacity: 0; transform: var(--from); } 10%, 93% { opacity: 1; transform: var(--rest, none); } 98%, 100% { opacity: 0; } }
@keyframes in-2 { 0%, 16% { opacity: 0; transform: var(--from); } 20%, 93% { opacity: 1; transform: var(--rest, none); } 98%, 100% { opacity: 0; } }
@keyframes in-3 { 0%, 28% { opacity: 0; transform: var(--from); } 32%, 93% { opacity: 1; transform: var(--rest, none); } 98%, 100% { opacity: 0; } }
@keyframes in-4 { 0%, 38% { opacity: 0; transform: var(--from); } 42%, 93% { opacity: 1; transform: var(--rest, none); } 98%, 100% { opacity: 0; } }
@keyframes in-5 { 0%, 48% { opacity: 0; transform: var(--from); } 52%, 93% { opacity: 1; transform: var(--rest, none); } 98%, 100% { opacity: 0; } }
@keyframes in-6 { 0%, 58% { opacity: 0; transform: var(--from); } 62%, 93% { opacity: 1; transform: var(--rest, none); } 98%, 100% { opacity: 0; } }
@keyframes in-7 { 0%, 70% { opacity: 0; transform: var(--from); } 74%, 93% { opacity: 1; transform: var(--rest, none); } 98%, 100% { opacity: 0; } }
@keyframes out-1 { 0%, 6% { opacity: 1; } 9%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes out-2 { 0%, 16% { opacity: 1; } 19%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes out-3 { 0%, 28% { opacity: 1; } 31%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes out-4 { 0%, 38% { opacity: 1; } 41%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes out-5 { 0%, 48% { opacity: 1; } 51%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes out-6 { 0%, 58% { opacity: 1; } 61%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes out-7 { 0%, 70% { opacity: 1; } 73%, 97% { opacity: 0; } 100% { opacity: 1; } }
.scan-demo { --dur: 10s; }
.chat-demo { --dur: 13s; }
.dot-demo { --dur: 15s; }

/* ───────── home: the report wall ───────── */
.reports { position: relative; margin-top: 128px; padding: 120px 0; overflow: hidden; }
.wall {
  position: absolute; inset: -60px -10%; display: grid; align-content: center; gap: 18px;
  transform: rotate(-4deg); pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.wall-defs { position: absolute; }
.wall-track { display: flex; align-items: flex-start; width: max-content; animation: marquee 70s linear infinite; }
.r2 .wall-track { animation-duration: 84s; animation-direction: reverse; }
.r3 .wall-track { animation-duration: 76s; }
@keyframes marquee { to { transform: translateX(-50%); } }
.rcard { flex: none; width: 232px; margin-right: 18px; padding: 14px 14px 16px; border-radius: 18px; background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow); }
.rc-top { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--ink-3); min-height: 14px; }
.rc-title { margin-top: 6px; font-size: 13.5px; font-weight: 600; }
.rc-chart { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.rc-chart text, .wall-defs text { font-family: var(--mono); }
.rc-total { margin-top: 12px; font-size: 18px; }
.rc-tape { margin-top: 12px; display: flex; gap: 7px; align-items: flex-start; padding: 7px 9px; background: var(--tape); font-size: 11px; line-height: 1.4; transform: rotate(-1.2deg); }
.pro-badge { display: inline-flex; padding: 3px 7px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 8px; }
.reports-in { position: relative; z-index: 1; display: flex; justify-content: center; }
.reports-card {
  max-width: 560px; text-align: center; padding: 38px 36px 40px; border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  box-shadow: var(--shadow);
}
.reports-card .kicker { justify-content: center; margin-bottom: 14px; }
.reports-card .section-sub { margin: 10px auto 0; font-size: 17px; }

/* Scroll-linked motion where the browser supports it: sections rise in, the report rows drift. */
@supports (animation-timeline: view()) {
  .feature > * { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
  .wall-row { animation: drift linear both; animation-timeline: view(); }
  .wall-row.r2 { --d: -10%; }
  @keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
  @keyframes drift { from { transform: translateX(var(--d, 10%)); } to { transform: translateX(calc(var(--d, 10%) * -1)); } }
}

@media (max-width: 800px) {
  .feature { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 88px; }
  .feature.flip .f-text { order: 0; }
  .feature .price-grid { order: 2; }
  .demo { width: min(100%, 264px); }
  .reports { margin-top: 88px; padding: 190px 0; }
  .wall { transform: rotate(-4deg) scale(.72); inset: -120px -40%; }
  .reports-card { padding: 28px 22px 30px; }
  .reports-card .section-sub { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .demo *, .wall-track, .wall-row, .feature > *, .pc-chart .pt { animation: none !important; }
  .demo [class*="out-"], .dd-think, .scanline, .flash, .ring { display: none; }
}

/* ───────── home: the top as a receipt ───────── */
/* The header and hero sit on one strip of receipt paper that ends in a torn edge; the page
   continues below it. The strip reaches up behind the sticky header. */
.hero-band {
  --z: 22px; --top-h: 66px;
  margin-top: calc(var(--top-h) * -1); padding: var(--top-h) 0 84px;
  background: var(--paper);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--z) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--z) 100%;
}
.hero-wrap { filter: drop-shadow(0 8px 14px var(--paper-shadow)); }
:root:has(.hero-band) .top::before { background: color-mix(in srgb, var(--paper) 74%, transparent); }
.hero-band .receipt { filter: drop-shadow(0 0 1px color-mix(in srgb, var(--ink) 22%, transparent)) drop-shadow(0 18px 30px var(--paper-shadow)); }
.hero-band .store.soon { background: var(--bg); }
.hero-wrap + .feature { padding-top: 104px; }

/* ───────── home: prices over time ───────── */
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 520px; justify-self: center; }
.pcard { --c: var(--accent); padding: 16px 16px 14px; border-radius: var(--r-md); background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow); }
.pcard.down { --c: var(--ok); }
.pc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; line-height: 1.3; }
.pc-chg { flex: none; font-size: 12px; color: var(--c); }
.pc-where { margin-top: 2px; font-size: 12px; color: var(--ink-3); }
.pc-chart { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.pc-now { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 10px; font-size: 20px; }
.pc-now small { font-size: 12px; color: var(--ink-3); }
/* Each point drifts a little, out of step with its neighbours; the latest one breathes. */
.pc-chart .pt { transform-box: fill-box; transform-origin: center; animation: drift-y 3.8s ease-in-out infinite; }
.pc-chart .pt:nth-child(3n) { animation-duration: 4.6s; animation-delay: -1.3s; }
.pc-chart .pt:nth-child(3n + 1) { animation-duration: 3.2s; animation-delay: -2.1s; }
.pcard:nth-child(2) .pt { animation-delay: -.7s; } .pcard:nth-child(3) .pt { animation-delay: -1.9s; } .pcard:nth-child(4) .pt { animation-delay: -2.8s; }
.pc-chart .pt.now { animation: breathe 2.6s ease-in-out infinite; }
@keyframes drift-y { 0%, 100% { transform: none; } 35% { transform: translateY(-2.2px); } 70% { transform: translateY(1.4px); } }
@keyframes breathe { 0%, 100% { transform: none; } 50% { transform: scale(1.35); } }

@media (max-width: 800px) {
  .hero-band { padding-bottom: 64px; --z: 18px; }
  .hero-wrap + .feature { padding-top: 72px; }
}
@media (max-width: 480px) {
  .price-grid { gap: 10px; }
  .pcard { padding: 13px 12px 12px; }
  .pc-top { font-size: 13px; }
  .pc-now { font-size: 17px; }
}
