/* SHOPFRONT — app.css (shell). Single source of tokens, page frame, atmosphere, borders, chrome and motion.
   Scale (LUAT 50): 1 unit = --u. 1280–2560: --u = 100vw / 1920 (1920 = mockup 1:1). <1280: phone layout, --u fixed.
   Route bodies: use the classes below. Never write border/outline, max-width, side padding or page background in a route. */

/* ---------- 1. tokens ---------- */
:root {
  --u: calc(100vw / 1920);
  /* colour (DESIGN.md §3) */
  --paper: #21173D;
  --chrome: #1B1631;
  --chrome-foot: #18142C;
  --surface: #291E48;
  --surface-deep: #211A40;
  --surface-card: #251F3F;
  --text: #F7F0FA;
  --cream: #FFF8EB;
  --muted: #B8ADCC;
  --lilac: #E5CBFF;
  --hairline: #4A4270;
  --action: #E052FC;
  --on-action: #17142A;
  --paid: #FF7BAD;
  --riso-yellow: #FFC857;
  --cream-card: #FDF2E1;
  --note-yellow: #F7CF2F;
  --token-deep: #330B71;
  --navy: #000036;
  --shadow-panel: 0 calc(12 * var(--u)) calc(32 * var(--u)) rgba(8, 6, 20, .45);

  /* fonts (DESIGN.md §2) */
  --f-display: 'Rubik', 'Arial Black', system-ui, sans-serif;
  --f-body: 'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Roboto Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* type sizes @1920 (never below 12 px) */
  --fs-hero: calc(64 * var(--u));
  --fs-title: calc(56 * var(--u));
  --fs-section: calc(44 * var(--u));
  --fs-panel: calc(30 * var(--u));
  --fs-panel-s: calc(26 * var(--u));
  --fs-eyebrow: max(12px, calc(22 * var(--u)));
  --fs-th: max(12px, calc(16 * var(--u)));
  --fs-lede: max(14px, calc(22 * var(--u)));
  --fs-body: max(13px, calc(17 * var(--u)));
  --fs-small: max(12px, calc(14 * var(--u)));
  --fs-num: max(13px, calc(19 * var(--u)));
  --fs-code: max(12px, calc(15 * var(--u)));
  --fs-nav: max(12px, calc(14 * var(--u)));
  --fs-card: max(12px, calc(14 * var(--u)));
  --fs-card2: max(12px, calc(12 * var(--u)));
  --fs-foot: max(12px, calc(12 * var(--u)));

  /* page frame (DESIGN.md §0: one 36 px gutter container, 1848 @1920) */
  --gutter: calc(36 * var(--u));
  --nav-h: calc(154 * var(--u));
  --sec-gap: calc(72 * var(--u));      /* section gap 48–96 */
  --gap: calc(24 * var(--u));
  --pad-panel: calc(28 * var(--u));

  /* radii (DESIGN.md §4) */
  --r-panel: calc(14 * var(--u));
  --r-row: calc(10 * var(--u));
  --r-btn: calc(10 * var(--u));
  --r-pill: 999px;

  /* rules (BORDER_TABLE.md; every width max(1px, …) so no hairline vanishes 1280–2560) */
  --rule-panel: max(1px, calc(2.3 * var(--u))) solid #6A5590;
  --rule-input: max(1px, calc(2.3 * var(--u))) solid #8370A7;
  --rule-row: max(1px, calc(1.1 * var(--u))) solid var(--hairline);
  --rule-chip: max(1px, calc(1.3 * var(--u))) solid #8F78BA;
  --rule-card: max(1px, calc(2.3 * var(--u))) solid #3E375F;
  --rule-selected: max(2px, calc(3.4 * var(--u))) solid var(--action);
  --rule-action: max(1px, calc(2.3 * var(--u))) solid #EE63F4;
  --rule-code: max(1px, calc(2.3 * var(--u))) solid #664E88;
  --rule-error: max(1px, calc(1.7 * var(--u))) solid #E76496;
  --rule-howto: max(1px, calc(2.3 * var(--u))) solid var(--navy);
  --rule-check: max(1px, calc(2.1 * var(--u))) solid #16004B;
  --rule-strip: max(1px, calc(1.1 * var(--u))) solid #B495CC;
  --rule-div: max(1px, calc(1.1 * var(--u))) solid #6E5A97;
  --rule-nav: max(1px, calc(2.2 * var(--u))) solid #453D6A;
  --rule-focus: max(2px, calc(2.5 * var(--u))) solid var(--action);

  /* motion (DESIGN.md §10) */
  --ease-shop: cubic-bezier(.2, .8, .2, 1);
  --t-quick: 160ms;
  --t-base: 240ms;
  --t-slow: 360ms;
  --rt-nudge: 24px;
  --rt-dur: 200ms;

  /* native mechanics on a dark ground */
  color-scheme: dark;
  --native-accent: var(--action);
  --native-scroll-thumb: #5E4C88;
  --native-scroll-track: var(--chrome);
}
html[data-rt-dir=back] { --rt-nudge: -24px; }

/* phone layout 360–1279 (LUAT 71): one layout, reading column 720 centred, ground + art full-bleed */
@media (max-width: 1279.98px) {
  :root {
    --u: 0.8px;
    --gutter: max(16px, calc((100vw - 720px) / 2));
    --nav-h: auto;
    --sec-gap: 48px;
    --fs-hero: 40px; --fs-title: 34px; --fs-section: 28px; --fs-panel: 22px; --fs-panel-s: 20px;
    --fs-eyebrow: 13px; --fs-th: 12px; --fs-lede: 17px; --fs-body: 15px; --fs-small: 13px;
    --fs-num: 15px; --fs-code: 13px; --fs-nav: 14px; --fs-card: 14px; --fs-card2: 12px; --fs-foot: 12px;
  }
}

/* ---------- 2. reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
:where(button, input, select, textarea) { border: 0; font: inherit; color: inherit; background: none; }
:where(button) { cursor: pointer; padding: 0; }
:where(button:disabled, [aria-disabled="true"]) { cursor: not-allowed; }
:where(img, svg, video) { display: block; max-width: 100%; }
:where(h1, h2, h3, h4, p, ul, ol, figure, dl, dd) { margin: 0; }
:where(ul, ol) { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
:focus { outline: none; }
:focus-visible { outline: var(--rule-focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--action); color: var(--on-action); }
[hidden] { display: none !important; }

html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; position: relative; overflow-x: clip;
  font: 400 var(--fs-body)/1.45 var(--f-body); color: var(--text);
  font-feature-settings: "kern";
  /* ---------- 3. page atmosphere (DESIGN.md §3b, shared by every route) ---------- */
  background:
    radial-gradient(calc(1400 * var(--u)) calc(900 * var(--u)) at 73% calc(420 * var(--u)), rgba(97, 46, 142, .55) 0%, rgba(58, 31, 78, .45) 38%, rgba(49, 29, 83, 0) 72%),
    radial-gradient(calc(1100 * var(--u)) calc(700 * var(--u)) at 30% calc(1250 * var(--u)), rgba(58, 31, 78, .35) 0%, rgba(49, 29, 83, 0) 70%),
    linear-gradient(180deg, #21173D 0%, #2B1D47 45%, #241845 100%) var(--paper);
}
/* riso grain on the ground — whole page, scrolls with it, never catches clicks */
body::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .05; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
/* token route: deeper violet body (same family as paper) */
body[data-route="token"] {
  background:
    radial-gradient(calc(1300 * var(--u)) calc(850 * var(--u)) at 70% calc(480 * var(--u)), rgba(97, 46, 142, .45) 0%, rgba(49, 29, 83, 0) 70%),
    linear-gradient(180deg, #251051 0%, #330B71 48%, #2A0E5D 100%) var(--paper);
}
body > header, body > main, body > footer { position: relative; z-index: 1; }

/* ---------- 4. page frame (one container for every route) ---------- */
main {
  display: block; min-height: 60vh;
  padding-inline: var(--gutter);
  padding-block: calc(56 * var(--u)) var(--sec-gap);
}
main:focus { outline: none; }
/* full-bleed art / band inside a route: escape the gutters, keep the frame */
.bleed { margin-inline: calc(-1 * var(--gutter)); }
.bleed-right { margin-right: calc(-1 * var(--gutter)); }
.sec + .sec { margin-top: var(--sec-gap); }
.sec-tight + .sec-tight { margin-top: calc(40 * var(--u)); }
@media (max-width: 1279.98px) { main { padding-block: 28px 48px; } }

/* ---------- 5. type ---------- */
.t-hero { font: 700 var(--fs-hero)/1.02 var(--f-display); letter-spacing: -0.036em; color: var(--cream); }
.t-title { font: 700 var(--fs-title)/1.05 var(--f-display); letter-spacing: -0.02em; color: var(--text); }
.t-section { font: 700 var(--fs-section)/1.1 var(--f-display); letter-spacing: -0.02em; }
.t-panel { font: 700 var(--fs-panel)/1.2 var(--f-display); }
.t-panel-s { font: 700 var(--fs-panel-s)/1.2 var(--f-display); }
.t-eyebrow { font: 500 var(--fs-eyebrow)/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--lilac); }
.t-th { font: 500 var(--fs-th)/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--lilac); }
.t-lede { font: 400 var(--fs-lede)/1.4 var(--f-body); text-wrap: pretty; }
.t-body { font: 400 var(--fs-body)/1.45 var(--f-body); text-wrap: pretty; }
.t-small { font: 400 var(--fs-small)/1.45 var(--f-body); }
.t-muted { color: var(--muted); }
.t-mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.t-num { font: 600 var(--fs-num)/1 var(--f-mono); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.t-code { font: 400 var(--fs-code)/1.55 var(--f-mono); }
.t-paid { color: var(--paid); }
.t-action { color: var(--action); }
.t-lilac { color: var(--lilac); }
.t-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--action); text-decoration-thickness: max(1px, calc(2 * var(--u))); text-underline-offset: .25em; }

/* ---------- 6. border classes — the ONLY place borders are drawn (BORDER_TABLE.md / DESIGN.md §4b) ---------- */
.rule-panel { border: var(--rule-panel); border-radius: var(--r-panel); }
.rule-input { border: var(--rule-input); border-radius: var(--r-row); }
.rule-chip { border: var(--rule-chip); border-radius: var(--r-btn); }
.rule-chip.is-pill, .rule-pill { border: var(--rule-chip); border-radius: var(--r-pill); }
.rule-card { border: var(--rule-card); border-radius: var(--r-panel); }
.rule-selected { border: var(--rule-selected); border-radius: var(--r-row); }
.rule-action { border: var(--rule-action); border-radius: var(--r-pill); }
.rule-code { border: var(--rule-code); border-radius: var(--r-row); }
.rule-error { border: var(--rule-error); border-radius: var(--r-row); }
.rule-howto { border: var(--rule-howto); border-radius: var(--r-row); }
.rule-check { border: var(--rule-check); border-radius: var(--r-row); }
/* rows: ONE shared edge between neighbours — the list draws it, never both rows */
.rule-rows > * + * { border-top: var(--rule-row); }
.rule-row { border-bottom: var(--rule-row); }
.rule-row:last-child { border-bottom: 0; }
.rule-top { border-top: var(--rule-row); }
.rule-bottom { border-bottom: var(--rule-row); }
.rule-strip { border-top: var(--rule-strip); }
.rule-div > * + * { border-left: var(--rule-div); }
.rule-div-l { border-left: var(--rule-div); }
/* a selected row keeps its frame inside its own box (no doubled edge with its neighbours) */
.rule-rows > .is-selected, .rule-rows > .is-selected + * { border-top-color: transparent; }
.is-selected.rule-selected-on, .rule-selected-on.is-selected { border: var(--rule-selected); border-radius: var(--r-row); }

/* ---------- 7. materials & shared components ---------- */
.panel { background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--shadow-panel); padding: var(--pad-panel); }
.panel-deep { background: var(--surface-deep); border-radius: var(--r-row); }
.cols { display: grid; gap: var(--gap); }
.row { display: flex; align-items: center; gap: calc(12 * var(--u)); }
.between { display: flex; align-items: center; justify-content: space-between; gap: calc(12 * var(--u)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: calc(8 * var(--u));
  min-height: max(40px, calc(46 * var(--u))); padding: 0 calc(22 * var(--u));
  border-radius: var(--r-btn); font: 700 max(14px, calc(18 * var(--u)))/1.1 var(--f-body); white-space: nowrap;
  transition: transform var(--t-quick) var(--ease-shop), background-color var(--t-quick) var(--ease-shop), color var(--t-quick);
}
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-secondary { background: var(--surface); color: var(--text); border: var(--rule-chip); }
.btn:disabled, .btn[aria-disabled="true"] { background: #3A2F5C; color: #9D92B6; }
.btn-secondary:disabled { background: transparent; }
.btn-buy[data-launch-done] { background: var(--action); color: var(--on-action); cursor: pointer; }
.chip {
  display: inline-flex; align-items: center; min-height: max(32px, calc(37 * var(--u))); padding: 0 calc(16 * var(--u));
  background: var(--surface-card); color: var(--text); font: 500 var(--fs-small)/1.1 var(--f-mono); white-space: nowrap;
  transition: transform var(--t-quick) var(--ease-shop), background-color var(--t-quick);
}
.chip[aria-pressed="true"], .chip.is-on { background: var(--action); color: var(--on-action); }
.input {
  width: 100%; min-height: max(44px, calc(55 * var(--u))); padding: 0 calc(18 * var(--u));
  background: var(--surface-deep); font: 400 max(14px, calc(20 * var(--u)))/1.2 var(--f-mono); color: var(--text);
}
.input::placeholder { color: #8F84A8; }
.toggle { position: relative; width: max(34px, calc(40 * var(--u))); height: max(20px, calc(22 * var(--u))); border-radius: var(--r-pill); background: #3A2F5C; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: calc(100% / 2 - 3px); aspect-ratio: 1; border-radius: 50%; background: var(--text); transition: transform var(--t-quick) var(--ease-shop); }
.toggle[aria-checked="true"], .toggle[aria-pressed="true"] { background: var(--action); }
.toggle[aria-checked="true"]::after, .toggle[aria-pressed="true"]::after { transform: translateX(calc(100% - 0px)); }
.badge { display: inline-flex; align-items: center; padding: calc(3 * var(--u)) calc(10 * var(--u)); border-radius: var(--r-pill); font: 500 var(--fs-small)/1.2 var(--f-mono); }
.code { background: var(--surface-deep); padding: calc(16 * var(--u)) calc(18 * var(--u)); font: 400 var(--fs-code)/1.55 var(--f-mono); overflow-x: auto; white-space: pre; tab-size: 2; }
.table { width: 100%; border-collapse: collapse; font: 500 var(--fs-body)/1.3 var(--f-mono); font-variant-numeric: tabular-nums; }
.table th { text-align: left; font: 500 var(--fs-th)/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--lilac); padding: calc(18 * var(--u)) calc(16 * var(--u)); }
.table td { padding: 0 calc(16 * var(--u)); height: calc(54 * var(--u)); }
.live-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0; font: 400 var(--fs-body)/1.2 var(--f-body); }
.live-strip > * { display: inline-flex; align-items: baseline; gap: calc(22 * var(--u)); padding: calc(14 * var(--u)) calc(38 * var(--u)); }
.live-strip > :first-child { padding-left: calc(6 * var(--u)); }
.live-strip .lbl { color: var(--lilac); }
.live-strip .val { font: 500 var(--fs-num)/1 var(--f-mono); font-variant-numeric: tabular-nums; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.art { pointer-events: none; user-select: none; }
.art img, img.art { width: 100%; height: auto; }

/* ---------- 8. nav N2 (masthead) — mockup/v1/chrome/nav.html, scaled ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: linear-gradient(180deg, #17142A 0%, var(--chrome) 60%, #20183A 100%);
  border-bottom: var(--rule-nav);
  display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto 1fr; align-items: start;
  padding: calc(20 * var(--u)) calc(48 * var(--u)) 0;
}
.site-nav .social { font: 500 var(--fs-nav)/1 var(--f-body); color: var(--text); padding-top: calc(14 * var(--u)); transition: color var(--t-quick); }
.site-nav .social.x { justify-self: start; }
.site-nav .social.tg { justify-self: end; grid-column: 3; grid-row: 1; }
.site-nav .social[aria-disabled="true"] { color: var(--text); opacity: .85; }
.brand { display: inline-flex; align-items: center; gap: calc(12 * var(--u)); grid-column: 2; grid-row: 1; justify-self: center; padding: calc(4 * var(--u)) calc(14 * var(--u)); }
.brand img { width: auto; height: calc(44 * var(--u)); min-height: 36px; }
.brand span { font: 800 calc(34 * var(--u))/1 var(--f-display); letter-spacing: .02em; color: var(--text); }
.routes { grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: center; align-items: stretch; gap: calc(70 * var(--u)); height: calc(57 * var(--u)); align-self: end; }
.routes a {
  position: relative; display: inline-flex; align-items: center; font: 600 var(--fs-nav)/1 var(--f-body); color: var(--text);
  transition: color var(--t-quick) var(--ease-shop);
}
.routes a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(10 * var(--u)); height: max(2px, calc(3 * var(--u))); background: var(--action);
  transform: scaleX(0); transform-origin: left center; transition: transform var(--t-base) var(--ease-shop);
}
.routes a.is-active, .routes a[aria-current="page"] { color: var(--action); }
.routes a.is-active::after, .routes a[aria-current="page"]::after { transform: scaleX(1); }
.routes a:hover { color: var(--lilac); }
.routes a.is-active:hover { color: var(--action); }

@media (max-width: 1279.98px) {
  .site-nav { position: sticky; padding: 12px var(--gutter) 0; grid-template-rows: auto auto; }
  .site-nav .social { padding-top: 12px; }
  .brand img { height: 38px; }
  .brand span { font-size: 22px; }
  .routes { height: auto; flex-wrap: wrap; justify-content: center; gap: 4px 18px; padding: 10px 0 6px; }
  .routes a { min-height: 34px; }
  .routes a::after { bottom: 2px; height: 2px; }
}
@media (max-width: 400px) { .brand span { font-size: 19px; } .routes { gap: 2px 14px; } }

/* ---------- 9. footer F9 — mockup/v1/chrome/footer.html, scaled ---------- */
.site-footer {
  background: linear-gradient(180deg, #21183D 0%, var(--chrome-foot) 100%);
  border-top: var(--rule-row);
  padding: calc(32 * var(--u)) var(--gutter) calc(28 * var(--u));
}
.foot-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: calc(38 * var(--u)); }
.foot-card {
  display: block; min-height: calc(95 * var(--u)); padding: calc(26 * var(--u)) calc(20 * var(--u)) calc(18 * var(--u));
  background: var(--surface-card); border-radius: var(--r-panel); color: var(--text);
  transition: transform var(--t-base) var(--ease-shop), border-color var(--t-quick);
}
.foot-card strong { display: block; font: 700 var(--fs-card)/1.3 var(--f-body); margin-bottom: calc(8 * var(--u)); }
.foot-card span { display: block; font: 400 var(--fs-card2)/1.3 var(--f-body); color: var(--muted); }
.foot-card:hover, .foot-card.is-active, .foot-card[aria-current="page"] { border-color: var(--action); }
.foot-bottom {
  display: flex; align-items: center; flex-wrap: wrap; gap: calc(14 * var(--u)) calc(32 * var(--u));
  margin-top: calc(34 * var(--u)); padding-top: calc(22 * var(--u));
  font: 400 var(--fs-foot)/1.4 var(--f-mono); color: var(--muted);
}
.foot-ca { display: inline-flex; align-items: center; flex-wrap: wrap; gap: calc(10 * var(--u)) calc(14 * var(--u)); margin-left: auto; }
.foot-ca img { width: auto; height: max(24px, calc(28 * var(--u))); }
.foot-ca .ca-label { color: var(--lilac); }
.foot-ca code { font: 500 var(--fs-foot)/1 var(--f-mono); color: var(--text); white-space: nowrap; }
.foot-ca .btn { min-height: max(30px, calc(34 * var(--u))); padding: 0 calc(14 * var(--u)); font-size: var(--fs-foot); }
.foot-socials { display: inline-flex; gap: calc(38 * var(--u)); }
.foot-socials a { color: var(--text); }
.foot-socials a:last-child { text-decoration: underline; text-decoration-color: var(--action); text-underline-offset: 4px; }
.foot-socials a[aria-disabled="true"] { opacity: .85; }
@media (max-width: 1279.98px) {
  .site-footer { padding: 28px var(--gutter) 28px; }
  .foot-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  .foot-card { min-height: 0; padding: 14px 14px; }
  .foot-bottom { margin-top: 24px; padding-top: 18px; gap: 14px; }
  .foot-ca { margin-left: 0; }
  .foot-src { flex: 1 1 100%; overflow-wrap: anywhere; }
}

/* ---------- 10. motion (DESIGN.md §10 — "night street": signs flicker on, doors swing open, receipts print) ---------- */
/* reveal: content is visible without JS; html.sf-motion arms the start state, .is-in (or the 2 s safety timer) ends it */
html.sf-motion [data-reveal]:not(.is-in) { opacity: 0; }
html.sf-motion [data-reveal="door"]:not(.is-in) { transform: perspective(calc(900 * var(--u))) rotateY(-14deg) translateX(calc(-6 * var(--u))); transform-origin: left center; }
html.sf-motion [data-reveal="print"]:not(.is-in) { transform: translateY(calc(-8 * var(--u))); }
html.sf-motion [data-reveal="rise"]:not(.is-in) { transform: translateY(calc(10 * var(--u))); }
html.sf-motion [data-reveal].is-in { transition: opacity var(--t-slow) var(--ease-shop), transform var(--t-slow) var(--ease-shop); transition-delay: calc(var(--i, 0) * 60ms); transform-origin: left center; }
html.sf-motion [data-reveal="sign"].is-in { animation: sf-sign 520ms steps(1, end) calc(var(--i, 0) * 70ms) both; }
@keyframes sf-sign {            /* a neon tube catching: on, stutter, settle */
  0% { opacity: 0; } 18% { opacity: .75; } 30% { opacity: .2; } 44% { opacity: .95; } 56% { opacity: .5; } 70%, 100% { opacity: 1; }
}
/* live tick: a till-bell underline when a live value changes */
.sf-tick { position: relative; }
.sf-tick::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.2em; height: max(1px, calc(2 * var(--u))); background: var(--paid);
  transform: scaleX(0); transform-origin: left center; opacity: 0; pointer-events: none;
}
.sf-tick.is-ticking::after { animation: sf-bell 900ms var(--ease-shop) both; }
@keyframes sf-bell { 0% { transform: scaleX(0); opacity: 1; } 45% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
/* hover: buttons/cards step up like a shop step; the press sinks back */
@media (hover: hover) {
  .btn:not(:disabled):hover, .chip:hover, .foot-card:hover, .lift:hover { transform: translateY(calc(-2 * var(--u) - 1px)); }
}
.btn:not(:disabled):active, .chip:active { transform: translateY(1px); }
/* grow-in (bars, splits): scale from the hinge */
html.sf-motion [data-grow]:not(.is-in) { transform: scaleX(0); }
html.sf-motion [data-grow] { transform-origin: left center; transition: transform var(--t-slow) var(--ease-shop); }
/* art sway while it crosses the screen — decoration only (LUAT 67 rule a) */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  html.sf-motion .sf-sway { animation: sf-sway linear both; animation-timeline: view(); animation-range: cover; }
  @keyframes sf-sway { from { translate: calc(var(--sway, 18) * -1 * var(--u)) 0; } to { translate: calc(var(--sway, 18) * var(--u)) 0; } }
}
/* route change: kit router v3 View Transition, tuned to a short sideways nudge */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--rt-dur); animation-timing-function: var(--ease-shop); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  html.sf-motion [data-reveal], html.sf-motion [data-grow] { opacity: 1 !important; transform: none !important; }
  .sf-sway { animation: none !important; translate: none !important; }
}
