/*
 * The storefront, in the dashboard's world: warm paper or charcoal, ink for action, ember for "here" and "look".
 * One idea carries it: the receipt. It docks at the thumb, opens into the cart, becomes the checkout and then the
 * order's proof. The serrated edge belongs to receipts alone. Direction-sensitive spacing uses logical properties,
 * so RTL needs no overrides.
 *
 * Contents: fonts · tokens · base · shell · header band · lists · product · receipt · forms · orders · account ·
 * overlays · states · wide screens · motion.
 */

/* ================================================================ fonts */

@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/app/fonts/IBMPlexSansArabic-Regular.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00FF, U+0600-06FF, U+0750-077F, U+08A0-08FF, U+2010-2015, U+2018-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+20AC, U+2122, U+2190-2199, U+2212, U+221E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("/app/fonts/IBMPlexSansArabic-Medium.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00FF, U+0600-06FF, U+0750-077F, U+08A0-08FF, U+2010-2015, U+2018-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+20AC, U+2122, U+2190-2199, U+2212, U+221E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("/app/fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00FF, U+0600-06FF, U+0750-077F, U+08A0-08FF, U+2010-2015, U+2018-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+20AC, U+2122, U+2190-2199, U+2212, U+221E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/app/fonts/IBMPlexSans-Regular-Latin1.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("/app/fonts/IBMPlexSans-Medium-Latin1.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("/app/fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }

/* ================================================================ tokens */

:root {
  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, "SF Pro Text", "SF Arabic",
          "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

  --ground: #f6f5f2;
  --surface: #ffffff;
  --sunken: #f0eeea;
  --line: #e5e2dc;
  --line-strong: #cfcbc2;
  --ink: #181715;
  --ink-2: #3d3a35;
  --muted: #5f5b54;
  --inverse: #181715;
  --inverse-press: #3a3731;
  --on-inverse: #faf9f7;
  --band: #181715;
  --on-band: #faf9f7;
  --on-band-muted: #c9c4bb;
  --band-field: #2a2825;
  --band-chip: #2a2825;

  --accent: #e2561b;
  --accent-ink: #a8390b;
  --accent-soft: #fcece2;
  --star: #e7a100;

  --good: #116b3f;
  --good-soft: #e2f4ea;
  --good-mark: #1a9a5b;
  --warn: #855600;
  --warn-soft: #fcf3d6;
  --warn-mark: #d99a14;
  --bad: #b32222;
  --bad-soft: #fce6e5;
  --bad-mark: #d93333;
  --info: #1f55b3;
  --info-soft: #e3edfc;
  --idle-mark: #a8a299;

  /* One hue per aisle, so a category is recognised before it is read. */
  --aisle-0: #fcece2; --aisle-0-ink: #a8390b;
  --aisle-1: #e3edfc; --aisle-1-ink: #1f55b3;
  --aisle-2: #e2f4ea; --aisle-2-ink: #116b3f;
  --aisle-3: #fcf3d6; --aisle-3-ink: #855600;
  --aisle-4: #f1e8f6; --aisle-4-ink: #6a3a86;
  --aisle-5: #dff1f0; --aisle-5-ink: #12645f;

  --shadow-dock: 0 10px 24px rgba(24, 23, 21, 0.22);
  --shadow-pop: 0 1px 2px rgba(24, 23, 21, 0.05), 0 12px 32px -8px rgba(24, 23, 21, 0.24);
  --scrim: rgba(24, 23, 21, 0.46);
  --selection: rgba(226, 86, 27, 0.2);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --gutter: 16px;
  --tabs-h: 60px;
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --safe-top: var(--tg-content-safe-area-inset-top, 0px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 140ms;
  --med: 220ms;
  --tooth: 7px;
  --page: 720px;
  color-scheme: light;
}

:root[lang="ar"] {
  --font: "IBM Plex Sans Arabic", "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "SF Arabic",
          "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

:root[data-theme="dark"] {
  --ground: #100f0e;
  --surface: #191816;
  --sunken: #141312;
  --line: #2c2a27;
  --line-strong: #45413c;
  --ink: #eeebe5;
  --ink-2: #d2cdc5;
  --muted: #aaa49b;
  --inverse: #eeebe5;
  --inverse-press: #d6d2ca;
  --on-inverse: #161513;
  --band: #1b1a18;
  --on-band: #eeebe5;
  --on-band-muted: #aaa49b;
  --band-field: #292724;
  --band-chip: #292724;

  --accent: #f06e36;
  --accent-ink: #f89264;
  --accent-soft: #381e13;
  --star: #f4bb3a;

  --good: #5cce8e;
  --good-soft: #142c1f;
  --good-mark: #50c684;
  --warn: #e9b949;
  --warn-soft: #30260f;
  --warn-mark: #e0ad3c;
  --bad: #f28b82;
  --bad-soft: #3a1a18;
  --bad-mark: #ec6e64;
  --info: #8ab4f8;
  --info-soft: #17263f;
  --idle-mark: #6f6a62;

  --aisle-0: #381e13; --aisle-0-ink: #f89264;
  --aisle-1: #17263f; --aisle-1-ink: #8ab4f8;
  --aisle-2: #142c1f; --aisle-2-ink: #5cce8e;
  --aisle-3: #30260f; --aisle-3-ink: #e9b949;
  --aisle-4: #2c1f36; --aisle-4-ink: #cda6e8;
  --aisle-5: #122c2b; --aisle-5-ink: #6fd0c9;

  --shadow-dock: 0 10px 24px rgba(0, 0, 0, 0.6);
  --shadow-pop: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -8px rgba(0, 0, 0, 0.7);
  --scrim: rgba(0, 0, 0, 0.6);
  --selection: rgba(240, 110, 54, 0.32);
  color-scheme: dark;
}

/* ================================================================ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ground); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--ground); color: var(--ink);
  font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}
@media (pointer: fine) { html { overscroll-behavior: none; } }
::selection { background: var(--selection); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1 { font-size: 22px; line-height: 1.3; font-weight: 600; text-wrap: balance; }
h2 { font-size: 17px; line-height: 1.35; font-weight: 600; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
svg { display: block; flex: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; direction: ltr; display: inline-block; }
.muted { color: var(--muted); }
.meta { font-size: 13px; line-height: 1.45; color: var(--muted); }
.icon { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 18px; height: 18px; }
.icon--lg { width: 30px; height: 30px; stroke-width: 1.5; }
.flip-rtl { transform: none; }
:root[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.star { color: var(--star); fill: currentColor; stroke: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* ================================================================ shell */

#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: clip; }
#view:focus-visible { outline: none; }
#view {
  flex: 1; width: 100%; max-width: var(--page); margin-inline: auto;
  padding-bottom: calc(var(--tabs-h) + var(--safe-bottom) + 24px);
}
.is-docked #view { padding-bottom: calc(var(--tabs-h) + var(--safe-bottom) + 84px); }
.is-focus #view { padding-bottom: calc(var(--safe-bottom) + 112px); }
.in-telegram.is-focus #view { padding-bottom: calc(var(--safe-bottom) + 28px); }

.tabs {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  padding-bottom: var(--safe-bottom); background: var(--surface); border-top: 1px solid var(--line);
}
.tabs[hidden], .is-typing .tabs, .is-typing .dock { display: none; }
.tabs__link {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; height: var(--tabs-h);
  color: var(--muted); font-size: 12px; font-weight: 500;
}
.tabs__link[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tabs__link[aria-current="page"]::before {
  content: ""; position: absolute; top: -1px; inset-inline: 30%; height: 2px; border-radius: 0 0 2px 2px;
  background: var(--accent);
}
.tabs__count {
  position: absolute; top: 8px; inset-inline-start: calc(50% + 8px); min-width: 17px; height: 17px; padding-inline: 4px;
  border-radius: 9px; background: var(--accent); color: #fff; font-size: 12px; line-height: 17px; font-weight: 600; text-align: center;
}
:root[data-theme="dark"] .tabs__count { color: #1c0d05; }

.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; min-height: 56px;
  padding: calc(var(--safe-top) + 8px) var(--gutter) 8px; background: var(--ground);
}
.topbar h1 { flex: 1; font-size: 19px; min-width: 0; }
.topbar__tool { display: grid; place-items: center; width: 44px; height: 44px; margin-inline: -10px 0; border-radius: var(--radius-md); }
.has-native-back .topbar__back { display: none; }

.section { padding: 20px var(--gutter) 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.section__link { color: var(--accent-ink); font-size: 13px; font-weight: 500; white-space: nowrap; padding-block: 8px; margin-block: -8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px;
  border-radius: var(--radius-md); background: var(--inverse); color: var(--on-inverse); font-weight: 600;
  transition: background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:active { background: var(--inverse-press); transform: scale(0.985); }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--sunken); color: var(--muted); cursor: not-allowed; transform: none; }
.btn--quiet { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--quiet:active { background: var(--sunken); }
.btn--small { min-height: 40px; padding: 6px 14px; font-size: 13px; }
.btn--block { width: 100%; }
.btn--danger { color: var(--bad); }

.actionbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30; padding: 10px var(--gutter) calc(var(--safe-bottom) + 10px);
  background: var(--surface); border-top: 1px solid var(--line);
}
.actionbar__inner { display: flex; align-items: center; gap: 12px; max-width: calc(var(--page) - 2 * var(--gutter)); margin-inline: auto; }
.actionbar .btn { flex: 1; }
.actionbar[hidden], .in-telegram .actionbar { display: none; }

/* ================================================================ header band */

.band {
  background: var(--band); color: var(--on-band); padding: calc(var(--safe-top) + 14px) var(--gutter) 16px;
  border-radius: 0 0 22px 22px;
}
.band__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.band__store { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--on-band-muted); }
.band__mark { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.band h1 { margin-top: 6px; color: var(--on-band); }
.search-field {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; margin-top: 14px; padding-inline: 14px;
  border-radius: var(--radius-md); background: var(--band-field); color: var(--on-band-muted); text-align: start;
}
.aisles {
  display: flex; gap: 8px; margin: 12px calc(var(--gutter) * -1) 0; padding-inline: var(--gutter); overflow-x: auto;
  scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
}
.aisles::-webkit-scrollbar { display: none; }
.aisle {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding-inline: 12px;
  border-radius: 20px; background: var(--band-chip); color: var(--on-band); font-size: 13px; font-weight: 500;
  scroll-snap-align: start; white-space: nowrap;
}
.aisle::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--idle-mark)); }

.aisle-0 { --tile: var(--aisle-0); --tile-ink: var(--aisle-0-ink); --dot: #f06e36; }
.aisle-1 { --tile: var(--aisle-1); --tile-ink: var(--aisle-1-ink); --dot: #6d9eeb; }
.aisle-2 { --tile: var(--aisle-2); --tile-ink: var(--aisle-2-ink); --dot: #4cc38a; }
.aisle-3 { --tile: var(--aisle-3); --tile-ink: var(--aisle-3-ink); --dot: #e0ad3c; }
.aisle-4 { --tile: var(--aisle-4); --tile-ink: var(--aisle-4-ink); --dot: #b98ad9; }
.aisle-5 { --tile: var(--aisle-5); --tile-ink: var(--aisle-5-ink); --dot: #4fbdb5; }

/* ================================================================ lists */

.offers {
  display: flex; gap: 10px; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 4px; overflow-x: auto;
  scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  filter: drop-shadow(0 1px 1px rgba(24, 23, 21, 0.16));
}
.offers::-webkit-scrollbar { display: none; }
.offer {
  --cut: 38px;
  position: relative; flex: none; width: 176px; border-radius: var(--radius-lg); background: var(--surface); scroll-snap-align: start;
  -webkit-mask: radial-gradient(circle 7px at 0 var(--cut), #0000 6.5px, #000 7px) left / 51% 100% no-repeat,
                radial-gradient(circle 7px at 100% var(--cut), #0000 6.5px, #000 7px) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 7px at 0 var(--cut), #0000 6.5px, #000 7px) left / 51% 100% no-repeat,
                radial-gradient(circle 7px at 100% var(--cut), #0000 6.5px, #000 7px) right / 51% 100% no-repeat;
}
.offer__link { display: grid; gap: 6px; height: 100%; padding: 0 12px 12px; }
.offer__link:focus-visible { outline-offset: -4px; }
.offer__stub {
  display: flex; align-items: center; height: var(--cut); margin-inline: -12px; padding-inline: 14px; background: var(--tile); color: var(--tile-ink);
  border-bottom: 2px dotted var(--ground); font-size: 13px; font-weight: 600;
}
.offer__name { margin-top: 4px; font-weight: 500; line-height: 1.4; min-height: 2.8em; text-wrap: balance; }
.offer__price { display: grid; justify-items: start; padding-inline-end: 46px; font-size: 17px; line-height: 1.3; font-weight: 600; }
.offer .plus { position: absolute; inset-inline-end: 12px; bottom: 12px; }
.was { color: var(--muted); font-size: 13px; font-weight: 400; text-decoration: line-through; }
.tag { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.5; }
.tag--sale { background: var(--accent-soft); color: var(--accent-ink); }

.rows { display: grid; }
.row {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding-block: 12px;
  border-bottom: 1px dashed var(--line-strong);
}
.row__body::after { content: ""; position: absolute; inset: 0; }
.row__end { position: relative; z-index: 1; pointer-events: none; }
.row__end .plus { pointer-events: auto; }
.rows > :last-child { border-bottom: 0; }
.tile {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-md); overflow: hidden;
  background: var(--tile, var(--sunken)); color: var(--tile-ink, var(--ink-2)); font-weight: 600; font-size: 15px; line-height: 1;
}
.row__body { min-width: 0; display: grid; gap: 2px; }
/* A Latin name on an Arabic page still starts at the page's edge. match-parent cannot do this inside a line clamp. */
:root[dir="rtl"] :is(.row__name, .offer__name, .line__name, .order-row__name, .paper__title, .product__head h1) { text-align: right; }
:root[dir="ltr"] :is(.row__name, .offer__name, .line__name, .order-row__name, .paper__title, .product__head h1) { text-align: left; }
.row__name { font-weight: 500; line-height: 1.4; }
.row__end { display: flex; align-items: center; gap: 10px; }
.row__price { display: grid; justify-items: end; font-weight: 600; line-height: 1.3; }
.row__price .was { font-size: 12px; }
.row--out { color: var(--muted); }
.row--out .tile { filter: grayscale(1); opacity: 0.7; }

.signal { display: inline-flex; align-items: center; gap: 5px; }
.signal::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mark, var(--idle-mark)); }
.signal--good { --mark: var(--good-mark); }
.signal--warn { --mark: var(--warn-mark); color: var(--warn); }
.signal--bad { --mark: var(--bad-mark); color: var(--bad); }
.signal--idle { --mark: var(--idle-mark); }

.plus {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--inverse); color: var(--on-inverse); transition: transform var(--fast) var(--ease);
}
.plus::after { content: ""; position: absolute; inset: -4px; }
.plus:active { transform: scale(0.9); }
.plus[disabled] { background: var(--sunken); color: var(--muted); }

.tools { position: sticky; top: 0; z-index: 15; background: var(--ground); padding: calc(var(--safe-top) + 10px) var(--gutter) 8px; }
.filters { padding-inline: var(--gutter); }
.filters .chips:first-child { margin-top: 2px; }
.field-search {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding-inline: 12px; border-radius: var(--radius-md);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted);
}
.field-search:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.field-search input { flex: 1; min-width: 0; height: 46px; border: 0; background: none; color: var(--ink); font-size: 16px; }
.field-search input::placeholder { color: var(--muted); opacity: 1; }
.field-search input::-webkit-search-cancel-button { display: none; }
.chips { display: flex; gap: 8px; margin: 10px calc(var(--gutter) * -1) 0; padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding-inline: 12px; border-radius: 20px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--inverse); color: var(--on-inverse); box-shadow: none; }
.chip--aisle::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.count-line { padding: 4px var(--gutter) 0; }
.more { padding: 16px var(--gutter); text-align: center; }

/* ================================================================ product */

.product { padding: 4px var(--gutter) 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.product__head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; }
.product__head .tile { width: 64px; height: 64px; font-size: 20px; border-radius: var(--radius-lg); }
.product__head--plain { grid-template-columns: minmax(0, 1fr); }
.product__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 28px; line-height: 1.2; font-weight: 600; }
.facts { display: grid; gap: 0; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.fact { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.fact:last-child { border-bottom: 0; }
.fact .icon { color: var(--muted); margin-top: 1px; }
.prose { white-space: pre-line; line-height: 1.7; color: var(--ink-2); }
.stepper { display: inline-flex; align-items: center; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--surface); }
.stepper button { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink); }
.stepper button[disabled] { color: var(--idle-mark); cursor: not-allowed; }
.stepper output { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.stepper--small button { width: 40px; height: 40px; }
.input-box { display: grid; gap: 6px; }
.input-box label { font-weight: 500; }
.input {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 0; border-radius: var(--radius-md); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 16px;
}
.input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.field-error { color: var(--bad); font-size: 13px; }
.review { display: grid; gap: 2px; padding-block: 10px; border-bottom: 1px dashed var(--line-strong); }
.review:last-child { border-bottom: 0; }

/* ================================================================ receipt */

.dock {
  position: fixed; inset-inline: 0; bottom: calc(var(--tabs-h) + var(--safe-bottom) + 1px); z-index: 25; padding-inline: 12px;
  pointer-events: none; filter: drop-shadow(var(--shadow-dock));
}
.dock[hidden] { display: none; }
.dock__paper {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; width: 100%; max-width: calc(var(--page) - 24px);
  min-height: 62px; margin-inline: auto; padding: calc(var(--tooth) + 6px) 14px 8px; background: var(--surface); color: var(--ink);
  view-transition-name: receipt;
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--tooth)) var(--tooth) repeat-x,
                linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--tooth)) no-repeat;
          mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--tooth)) var(--tooth) repeat-x,
                linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--tooth)) no-repeat;
}
.dock__count { font-size: 13px; color: var(--muted); }
.dock__label { font-weight: 600; line-height: 1.25; }
.dock__text { flex: 1; min-width: 0; display: grid; }
.dock__total { font-size: 17px; font-weight: 600; }
.dock__paper:focus-visible { outline-offset: -5px; }
.dock.is-printing .dock__paper { animation: print 320ms var(--ease); }

.paper {
  position: relative; background: var(--surface); padding: 18px 16px calc(var(--tooth) + 18px);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--tooth)) var(--tooth) repeat-x,
                linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--tooth)) var(--tooth) repeat-x,
                linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat;
}
.paper-wrap { margin: 4px 12px 0; filter: drop-shadow(0 1px 1px rgba(24, 23, 21, 0.22)); }
.paper-wrap--receipt { view-transition-name: receipt; }
:root[data-theme="dark"] .paper-wrap { filter: none; }
.paper-wrap .paper { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.paper__head { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px dashed var(--line-strong); }
.paper__title { font-weight: 600; }
.line { padding-block: 12px; border-bottom: 1px dashed var(--line-strong); }
.line__top { display: flex; align-items: flex-end; gap: 6px; }
.line__name { font-weight: 500; line-height: 1.4; min-width: 0; }
.line__leader { flex: 1; min-width: 16px; margin-bottom: 0.42em; border-bottom: 2px dotted var(--line-strong); }
.line__total { font-weight: 600; white-space: nowrap; }
.line__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.line__note { margin-top: 4px; font-size: 13px; }
.line--problem .line__name { color: var(--muted); }
.link-quiet { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-inline: 6px; color: var(--muted); font-size: 13px; }
.sum { display: grid; gap: 6px; padding-top: 12px; }
.sum__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sum__row--total { font-size: 15px; font-weight: 600; }
.sum__row--total .num { font-size: 24px; line-height: 1.2; }
.notice { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; margin: 12px 12px 0; padding: 12px 14px; border-radius: var(--radius-md); background: var(--sunken); }
.notice--warn { background: var(--warn-soft); color: var(--warn); }
.notice--bad { background: var(--bad-soft); color: var(--bad); }
.notice--good { background: var(--good-soft); color: var(--good); }
.notice--info { background: var(--info-soft); color: var(--info); }
.notice p + .btn { margin-top: 8px; }
.notice__title { font-weight: 600; }

/* ================================================================ checkout */

.block { margin: 16px 12px 0; }
.block__title { margin-bottom: 8px; padding-inline: 4px; }
.method {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 60px; padding: 10px 14px;
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer;
}
.method + .method { margin-top: 8px; }
.method:has(input:checked) { box-shadow: inset 0 0 0 2px var(--inverse); }
.method input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.method[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.method__amount { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.consent { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 4px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.consent a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ================================================================ orders */

.tabs-inline { display: flex; gap: 8px; padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; }
.order-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding-block: 12px; }
#order-rows li + li { border-top: 1px dashed var(--line-strong); }
.order-row__name { font-weight: 500; line-height: 1.4; }
.order-row__total { font-weight: 600; }
.status {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--tone, var(--muted));
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mark, var(--idle-mark)); }
.status--good { --tone: var(--good); --mark: var(--good-mark); }
.status--warn { --tone: var(--warn); --mark: var(--warn-mark); }
.status--bad { --tone: var(--bad); --mark: var(--bad-mark); }
.status--live { --tone: var(--info); --mark: var(--accent); }
.status--idle { --tone: var(--muted); --mark: var(--idle-mark); }

.stations { display: grid; padding-top: 12px; }
.station { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.station:last-child { padding-bottom: 0; }
.station::before { content: ""; position: absolute; inset-inline-start: 8px; top: 16px; bottom: -2px; width: 2px; background: var(--line-strong); }
.station:last-child::before { display: none; }
.station__dot { width: 12px; height: 12px; margin: 5px 3px 0; border-radius: 50%; background: var(--line-strong); }
.station--done .station__dot { background: var(--ink-2); }
.station--now .station__dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.station--now .station__name { font-weight: 600; }

.slip { margin: 14px 12px 0; }
.slip__paper {
  background: var(--surface); padding: calc(var(--tooth) + 14px) 16px 16px; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--tooth)) var(--tooth) repeat-x,
                linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--tooth)) no-repeat;
          mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--tooth)) var(--tooth) repeat-x,
                linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--tooth)) no-repeat;
}
#delivery .btn { margin-top: 12px; }
.secret { display: grid; gap: 8px; margin-top: 10px; }
.secret__value {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 12px;
  border-radius: var(--radius-md); background: var(--sunken); font: 500 14px/1.5 var(--font-mono); direction: ltr; text-align: left;
  user-select: all; -webkit-user-select: all; white-space: pre-wrap;
}
.copy { display: grid; place-items: center; width: 44px; height: 44px; margin: -6px; color: var(--ink-2); border-radius: var(--radius-sm); user-select: none; -webkit-user-select: none; }

/* ================================================================ account */

.profile { display: flex; align-items: center; gap: 14px; padding: calc(var(--safe-top) + 14px) var(--gutter) 6px; }
.profile__badge { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--inverse); color: var(--on-inverse); font-size: 20px; font-weight: 600; }
.menu { margin: 12px 12px 0; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.menu__row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 14px; border-bottom: 1px solid var(--line); text-align: start; }
.menu__row:last-child { border-bottom: 0; }
.menu__row:active { background: var(--sunken); }
.menu__label { flex: 1; min-width: 0; }
.menu__value { color: var(--muted); font-size: 13px; }
.segments { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--sunken); }
.segments button { min-height: 40px; min-width: 44px; padding-inline: 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.segments button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(24, 23, 21, 0.12); }
.history { padding-inline: var(--gutter); }
.history__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; border-bottom: 1px dashed var(--line-strong); }
.history__row:last-child { border-bottom: 0; }
.plus-amount { color: var(--good); font-weight: 600; }
.prose-page { padding: 8px var(--gutter); white-space: pre-line; line-height: 1.75; }

/* ================================================================ overlays */

.toasts {
  position: fixed; inset-inline: 12px; top: calc(var(--safe-top) + 10px); z-index: 60; display: grid; gap: 8px; justify-items: center; pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 460px; min-height: 44px; padding: 8px 14px;
  border-radius: var(--radius-md); background: var(--inverse); color: var(--on-inverse); font-weight: 500; box-shadow: var(--shadow-pop);
  animation: toast-in var(--med) var(--ease);
}
.toast button { min-height: 32px; padding-inline: 8px; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.sheet {
  width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; color: inherit;
  background: var(--scrim); overscroll-behavior: contain;
}
.sheet[open] { display: flex; align-items: flex-end; justify-content: center; animation: fade-in var(--fast) var(--ease); }
.sheet::backdrop { background: transparent; }
.sheet__panel {
  width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto; padding: 8px var(--gutter) calc(var(--safe-bottom) + 16px);
  border-radius: 20px 20px 0 0; background: var(--surface); box-shadow: var(--shadow-pop); animation: sheet-in var(--med) var(--ease);
}
.sheet__grip { width: 36px; height: 4px; margin: 4px auto 12px; border-radius: 2px; background: var(--line-strong); }
.sheet__panel h2 { margin-bottom: 6px; }
.sheet__actions { display: grid; gap: 8px; margin-top: 16px; }
.option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 50px; padding-inline: 4px; border-bottom: 1px solid var(--line); text-align: start; }
.option:last-child { border-bottom: 0; }
.option[aria-checked="true"] { font-weight: 600; }

/* ================================================================ states */

.empty { display: grid; justify-items: center; gap: 8px; padding: 48px 24px; text-align: center; }
.empty .icon { color: var(--muted); margin-bottom: 4px; }
.empty .btn { margin-top: 8px; }
.empty__title { font-size: 17px; font-weight: 600; }
.bone { display: block; border-radius: 6px; background: var(--sunken); animation: pulse 1.4s ease-in-out infinite; }
.bone--text { height: 14px; margin-block: 4px; }
.bone--tile { width: 44px; height: 44px; border-radius: var(--radius-md); }
.preview-note { padding: 4px var(--gutter); background: var(--warn-soft); color: var(--warn); font-size: 12px; text-align: center; }
.gate { display: grid; place-content: center; justify-items: center; gap: 10px; min-height: 70vh; padding: 32px; text-align: center; }
.gate .icon { color: var(--muted); }

/* ================================================================ wide screens */

@media (hover: hover) {
  .btn:not([disabled]):hover { background: var(--inverse-press); }
  .btn--quiet:not([disabled]):hover { background: var(--sunken); }
  .chip:hover, .aisle:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
  .menu__row:hover, .option:hover { background: var(--sunken); }
  .tabs__link:hover { color: var(--ink); }
  .row__body:hover .row__name, .order-row:hover .order-row__name { text-decoration: underline; text-underline-offset: 3px; }
}

@media (max-width: 350px) {
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row .tile { display: none; }
}

@media (min-width: 720px) {
  :root { --gutter: 20px; }
  .rows--grid { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .rows--grid > :nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .paper-wrap, .slip, .block, .notice, .menu { margin-inline: var(--gutter); }
  .band { margin-inline: calc(50% - 50vw); padding-inline: max(var(--gutter), calc(50vw - var(--page) / 2 + var(--gutter))); }
  .tabs { padding-inline: calc((100% - var(--page)) / 2); }
}

/* ================================================================ store (client review, phase 2)
 * The store as the client asked, in the store's own materials: a header that says who is shopping and what they
 * hold, aisles with their icon and count, and products as cards with their picture, stock and delivery marks. */

.icon--xs { width: 14px; height: 14px; stroke-width: 2; }
.storehead { padding: calc(var(--safe-top) + 12px) var(--gutter) 4px; }
.storehead__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }
.storehead__store { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.storehead__tools { display: flex; align-items: center; gap: 8px; }
.langs { display: inline-flex; padding: 3px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.langs button { min-width: 38px; min-height: 32px; padding-inline: 8px; border-radius: 16px; font-size: 12px; font-weight: 600; color: var(--muted); }
.langs button[aria-pressed="true"] { background: var(--inverse); color: var(--on-inverse); }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding-inline: 12px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.storehead__hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 14px; }
.storehead__hello h1 { font-size: 21px; }
.bag { position: relative; display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent-ink); }
.bag__count { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding-inline: 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; line-height: 20px; font-weight: 600; text-align: center; }
:root[data-theme="dark"] .bag__count { color: #1c0d05; }
.storehead__search { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-top: 14px; }
.switch, .square { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding-inline: 12px; border-radius: var(--radius-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 13px; font-weight: 600; white-space: nowrap; }
.square { width: 48px; padding: 0; }
.switch .icon { color: var(--idle-mark); }
.switch[aria-pressed="true"] { background: var(--good-soft); color: var(--good); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 35%, transparent); }
.switch[aria-pressed="true"] .icon { color: var(--good-mark); }
.aisles-row { padding-inline: var(--gutter); }
.chips--aisles { margin-top: 12px; padding-bottom: 2px; }
.chip--count { padding-inline: 10px 8px; }
.chip__emoji { font-size: 17px; line-height: 1; }
.chip__n { min-width: 22px; padding: 1px 6px; border-radius: 10px; background: var(--sunken); color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
.chip[aria-pressed="true"] .chip__n { background: color-mix(in srgb, var(--on-inverse) 18%, transparent); color: var(--on-inverse); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cards--row { display: flex; gap: 12px; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
.cards--row::-webkit-scrollbar { display: none; }
.cards--row .card { flex: none; width: 156px; scroll-snap-align: start; }
.card { position: relative; display: grid; grid-template-rows: auto 1fr auto; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.card__link { display: grid; grid-template-rows: auto 1fr; }
.card__link::after { content: ""; position: absolute; inset: 0; }
.card__link:focus-visible { outline-offset: -3px; border-radius: var(--radius-lg); }
.art { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--tile, var(--sunken)); color: var(--tile-ink, var(--ink-2)); font-weight: 600; }
.art img { width: 100%; height: 100%; object-fit: cover; }
.art__emoji { font-size: 44px; line-height: 1; }
.card__art { aspect-ratio: 1 / 0.82; font-size: 24px; }
.card__marks { position: absolute; top: 8px; inset-inline: 8px; display: flex; justify-content: space-between; pointer-events: none; }
.mark { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding-inline: 7px; border-radius: 12px; background: rgba(24, 23, 21, 0.62); color: #fff; font-size: 12px; font-weight: 600; }
.mark--bolt { margin-inline-start: auto; padding-inline: 5px; }
.card__name { padding: 10px 12px 0; font-weight: 600; line-height: 1.4; min-height: calc(2.8em + 10px); }
.card__foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px 12px; pointer-events: none; }
.card__foot .plus, .card__foot a { pointer-events: auto; }
.card__price { display: grid; font-size: 16px; font-weight: 600; line-height: 1.25; }
.card__price .was { font-size: 12px; }
.card--out .card__art { filter: grayscale(1); opacity: 0.7; }
.card--out .card__name { color: var(--muted); }
:root[dir="rtl"] .card__name { text-align: right; }
:root[dir="ltr"] .card__name { text-align: left; }
.product__art { width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); }

/* ---------------- balance */
.purse { display: grid; justify-items: center; gap: 4px; margin: calc(var(--safe-top) + 14px) 12px 0; padding: 22px 16px 18px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.purse__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 16px; background: var(--info-soft); color: var(--info); }
.purse__amount { font-size: 38px; line-height: 1.15; font-weight: 600; }
.idchip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; margin-top: 6px; padding-inline: 12px; border-radius: 17px; background: var(--sunken); color: var(--ink-2); font: 500 13px/1 var(--font-mono); }
.purse__actions { display: flex; justify-content: center; gap: 22px; margin-top: 16px; }
.purse__action { display: grid; justify-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.purse__round { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--sunken); color: var(--ink-2); }
.purse__round--main { background: var(--inverse); color: var(--on-inverse); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 12px 0; }
.stat { display: grid; gap: 2px; padding: 12px; border-radius: var(--radius-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.stat__label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.stat strong { font-size: 16px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--idle-mark); flex: none; }
.dot--good { background: var(--good-mark); }
.dot--bad { background: var(--bad-mark); }
.dot--info { background: var(--info); }
.balance-note { padding: 10px var(--gutter) 0; text-align: center; }
.history--flush { padding-inline: 0; }

/* ---------------- profile */
.profile--center { flex-direction: column; text-align: center; gap: 6px; padding-top: calc(var(--safe-top) + 20px); }
.profile--center .profile__badge { width: 72px; height: 72px; font-size: 26px; }
.linked { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 10px; border-radius: 14px; background: var(--good-soft); color: var(--good); font-size: 13px; font-weight: 500; }
.stats .stat { color: inherit; }

/* ---------------- developer API */
.devapi { display: grid; justify-items: center; gap: 10px; margin: calc(var(--safe-top) + 14px) 12px 0; padding: 22px 16px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.devapi__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--info-soft); color: var(--info); }
.devapi h1 { font-size: 24px; }
.devapi__lead { color: var(--ink-2); line-height: 1.65; white-space: pre-line; }
.devapi__features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; margin-block: 6px; text-align: start; }
.devapi__features li { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border-radius: var(--radius-md); background: var(--sunken); font-size: 13px; font-weight: 500; line-height: 1.45; }
.devapi__features .icon { width: 18px; height: 18px; color: var(--accent-ink); }
.devapi .btn { margin-top: 4px; }
.devapi__note { margin-top: 2px; }
.calls { display: grid; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.call { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.call:last-child { border-bottom: 0; }
.call__method { min-width: 52px; padding: 4px 8px; border-radius: 8px; font: 600 12px/1.4 var(--font-mono); text-align: center; }
.call__method--get { background: var(--good-soft); color: var(--good); }
.call__method--post { background: var(--info-soft); color: var(--info); }
.call__method--put { background: var(--warn-soft); color: var(--warn); }
.call__body { display: grid; gap: 2px; min-width: 0; text-align: start; }
.call__body code { font: 600 14px/1.4 var(--font-mono); }

/* ---------------- join first */
.gate__links { display: grid; gap: 8px; width: min(320px, 100%); margin-top: 8px; }

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .purse, .stats, .devapi { margin-inline: var(--gutter); }
}
@media (max-width: 350px) {
  .storehead__search { grid-template-columns: minmax(0, 1fr) auto; }
  .storehead__search .square { display: none; }
}

/* ---------------- automatic offers (client review, phase 3) */
.offers-box { display: grid; gap: 6px; }
.offers-box li { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; line-height: 1.45; }
.offers-box .icon { margin-top: 2px; }
.offers-box .meta { color: var(--accent-ink); font-weight: 500; }
.line__offer { display: flex; align-items: center; gap: 6px; color: var(--good); }
.d-block { display: block; }

/* ---------------- merchants' keys (client review, phase 4) */
.stats--flush { width: 100%; margin: 4px 0 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.key-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ---------------- languages the owner added (client review, phase 4) */
.langs a { display: inline-grid; place-items: center; min-width: 38px; min-height: 32px; padding-inline: 8px; border-radius: 16px; font-size: 12px; font-weight: 600; background: var(--inverse); color: var(--on-inverse); text-decoration: none; }
.menu__select { margin-inline-start: auto; min-height: 36px; max-width: 55%; padding: 4px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }

/* ================================================================ motion */

@keyframes print { from { transform: translateY(16px); } to { transform: translateY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0.6; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pulse { 50% { opacity: 0.55; } }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: 160ms; animation-timing-function: var(--ease); }
::view-transition-group(receipt) { animation-duration: 260ms; animation-timing-function: var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
