/* foodstand — owner app.
   Design language lifted from reference/after-hours.html; see reference/DESIGN.md.
   Every colour resolves through a custom property. --accent is the only one a
   seller controls; it is set at runtime from shops.accent. The purple ramp is
   app chrome and is never derived from the accent. */

/* ------------------------------------------------------------------ fonts */
/* Self-hosted. No third-party request at runtime. See fonts/OFL.txt. */

@font-face {
  font-family: 'Anton';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/anton-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Anton';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/anton-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'DM Mono';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/dmmono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/dmmono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('/fonts/dmmono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('/fonts/dmmono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/inter-400-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/inter-400-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ----------------------------------------------------------------- tokens */

:root {
  /* -- the one seller-controlled value. JS overwrites both at runtime. ---- */
  --accent: #ffb02e;
  --accent-ink: #2a1605;
  /* The accent as text on --surface. Identical to --accent for any accent
     that already reads there; lightened by JS for ones that do not. */
  --accent-text: #ffb02e;

  /* Everything accent-derived goes through color-mix, so a red, green or blue
     accent produces its own glow and washes without touching the palette. */
  --accent-glow: color-mix(in srgb, var(--accent) 30%, transparent);
  --accent-glow-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --accent-ring: color-mix(in srgb, var(--accent) 22%, transparent);

  /* -- purple ramp: app chrome, never accent-derived --------------------- */
  --backdrop: #0d0813;
  --ink: #181020;
  --surface: #211630;
  --panel: #2a1c39;
  --heroglow: #3a2350;
  --disc1: #3c2752;
  --disc2: #281836;

  --line: rgba(247, 239, 227, 0.10);
  --line2: rgba(247, 239, 227, 0.16);

  /* -- text -------------------------------------------------------------- */
  --cream: #f7efe3;
  --mauve: #b7a4c7;
  --mauve2: #8a78a0;

  /* -- status ------------------------------------------------------------ */
  --coral: #ff5b52;
  --lime: #bfe45a;
  --fresh: #46d17e;

  /* -- receipt stock ----------------------------------------------------- */
  --paper: #f4e9d6;
  --paperink: #26182f;
  --paperline: #cdbfa6;

  /* -- type -------------------------------------------------------------- */
  --font-display: 'Anton', 'Arial Narrow', Impact, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-hero: 40px;
  --fs-title: 26px;
  --fs-head: 22px;
  --fs-item: 17px;
  --fs-body: 15px;
  --fs-sm: 13px;
  --fs-desc: 12.5px;
  --fs-label: 11px;
  --fs-tag: 10px;

  --track-label: 0.14em;
  --track-cap: 0.1em;
  --track-receipt: 0.06em;

  /* -- radii ------------------------------------------------------------- */
  --r-pill: 999px;
  --r-sheet: 26px;
  --r-card: 18px;
  --r-tile: 16px;
  --r-control: 14px;
  --r-input: 12px;

  /* -- elevation --------------------------------------------------------- */
  --shadow-frame: 0 30px 80px rgba(0, 0, 0, 0.6);
  --shadow-float: 0 18px 40px rgba(0, 0, 0, 0.45);
  --shadow-cta: 0 10px 28px var(--accent-glow);
  --drop-ticket: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.22));

  /* -- metrics ----------------------------------------------------------- */
  --tap: 52px;
  --pad: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* ------------------------------------------------------------------ base */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--backdrop);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button { font-family: inherit; }
p { margin: 0; }
[hidden] { display: none !important; }

/* The app frame: a centred 430px column on the purple backdrop. */
#app {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  background: var(--ink);
  box-shadow: var(--shadow-frame);
  padding-top: var(--safe-t);
}

/* -------------------------------------------------------------- type roles */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0;
}

.mono { font-family: var(--font-mono); }

/* The most repeated pattern in the reference — every section and field label. */
.label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--mauve2);
  line-height: 1;
}

.label em { font-style: normal; letter-spacing: 0.04em; opacity: 0.65; }

.cap {
  font-family: var(--font-mono);
  font-size: var(--fs-tag);
  letter-spacing: var(--track-cap);
  color: var(--mauve2);
}

.muted { color: var(--mauve); font-size: var(--fs-sm); }

.scroll::-webkit-scrollbar { display: none; }
.scroll { -ms-overflow-style: none; scrollbar-width: none; }

/* ---------------------------------------------------------------- layout */

.view { min-height: 100dvh; }

.view.center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px var(--pad) calc(28px + var(--safe-b));
  /* The purple bloom, exactly as the reference hero: heroglow out of the top
     edge into ink by 62%. */
  background: radial-gradient(120% 80% at 50% -10%, var(--heroglow) 0%, var(--ink) 62%);
}

.stack { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.row { display: flex; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.narrow { flex: 0 0 92px; }

.brand { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }

.brand-mark {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: var(--r-tile);
  background: var(--accent);
  box-shadow: var(--shadow-cta);
}

.brand-mark svg { width: 40px; height: 40px; fill: var(--accent-ink); }
.brand h1 { font-size: var(--fs-hero); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--pad);
}

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 14px var(--pad);
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.topbar-id { flex: 1; min-width: 0; }
.topbar-id h2 { font-size: var(--fs-head); }
.topbar-id h2,
.topbar-id .cap { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-id .cap { margin-top: 3px; }

/* Open/closed pill reads status, so it uses status colours, not the accent. */
.pill {
  position: relative;
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--mauve);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-cap);
  text-transform: uppercase;
  cursor: pointer;
}

.pill .dot { width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--mauve2); }

.pill[aria-pressed="true"] {
  color: var(--fresh);
  border-color: color-mix(in srgb, var(--fresh) 45%, transparent);
  background: color-mix(in srgb, var(--fresh) 12%, var(--panel));
}

.pill[aria-pressed="true"] .dot { background: var(--fresh); box-shadow: 0 0 8px var(--fresh); }

/* ------------------------------------------------------------------ tabs */

.tab {
  padding: var(--pad);
  padding-bottom: calc(104px + var(--safe-b));
  display: flex; flex-direction: column; gap: 12px;
}

.listhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.listhead h3 { font-size: var(--fs-head); }

.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30;
  width: 100%; max-width: 430px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding-bottom: var(--safe-b);
  background: var(--ink);
  border-top: 1px solid var(--line);
}

.tabbtn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-height: 60px; padding: 10px 0 8px;
  border: 0; background: none;
  color: var(--mauve2);
  font-family: var(--font-mono);
  font-size: var(--fs-tag);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  cursor: pointer;
}

.tabbtn svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.tabbtn.on { color: var(--accent-text); }

/* ------------------------------------------------------- category rail */

.rail {
  display: flex; gap: 8px;
  overflow-x: auto;
  margin: 0 calc(var(--pad) * -1);
  padding: 2px var(--pad) 10px;
}

/* Active chip is inverted cream, as in the reference — the rail stays legible
   whatever the accent is, and never competes with the price colour. */
.chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center;
  padding: 0 18px;
  /* A real 52px box rather than an expanded hit area: these rails scroll, and
     a pseudo-element overlay inside an overflow:auto container gets clipped
     unpredictably once the content is actually wider than the rail. */
  min-height: var(--tap);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  background: var(--panel);
  color: var(--mauve);
  border: 1px solid var(--line);
  transition: transform 0.12s ease;
}

.pill { position: relative; }

/* The status pill is not inside a scroller, so an expanded hit area is safe
   there and keeps the header compact. */
.pill::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: var(--tap);
}

.chip:active { transform: scale(0.94); }
.chip[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }

/* ------------------------------------------------------------- item list */

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: border-color 0.18s ease;
}

.item.off { opacity: 0.55; }
.item:focus-within { border-color: var(--line2); }

/* Photo tile — the reference's radial disc, with the item initial standing in
   when there is no photo, which is the common case for a new stand. */
.item-tile {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border-radius: var(--r-tile);
  display: grid; place-items: center;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--mauve);
  background: radial-gradient(70% 70% at 50% 35%, var(--disc1) 0%, var(--disc2) 100%);
  border: 1px solid var(--line2);
}

.item-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item.off .item-tile { filter: grayscale(1); }

.item-main { flex: 1; min-width: 0; }
.item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }

.item-name {
  font-family: var(--font-display);
  font-size: var(--fs-item);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--cream);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Price in accent, mono — the reference's one accent moment in a list row. */
.item-price {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-text);
}

.item-desc {
  margin: 4px 0 8px;
  color: var(--mauve);
  font-size: var(--fs-desc);
  line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.item-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}

.item-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-width: 0; }

/* Outline-only tags; the colour carries the meaning. */
.tag {
  font-family: var(--font-mono);
  font-size: var(--fs-tag);
  line-height: 1;
  opacity: 0.95;
  border-radius: var(--r-pill);
  padding: 4px 8px;
  border: 1px solid currentColor;
  color: var(--mauve2);
  white-space: nowrap;
}

.tag.on { color: var(--lime); }
.tag.offsale { color: var(--coral); }

/* This is an editing surface, so every row carries explicit affordances. */
.item-acts { display: flex; gap: 8px; flex-shrink: 0; }

.iconbtn {
  position: relative;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--mauve);
  cursor: pointer;
  transition: transform 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.iconbtn svg {
  width: 19px; height: 19px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.iconbtn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: var(--tap); height: var(--tap);
}

.iconbtn:active { transform: scale(0.94); }
.iconbtn.edit:hover, .iconbtn.edit:focus-visible { color: var(--accent); border-color: var(--accent-line); }
.iconbtn.del:hover, .iconbtn.del:focus-visible { color: var(--coral); border-color: color-mix(in srgb, var(--coral) 45%, transparent); }
.iconbtn.del[data-armed="1"] { color: var(--coral); border-color: var(--coral); background: color-mix(in srgb, var(--coral) 15%, var(--panel)); }

.empty {
  text-align: center;
  color: var(--mauve2);
  font-size: 14px;
  padding: 40px 22px;
  border: 1px dashed var(--line2);
  border-radius: var(--r-card);
  line-height: 1.6;
}

/* ---------------------------------------------------------------- forms */

.field { display: flex; flex-direction: column; gap: 7px; }

input, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: var(--panel);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px; /* keeps iOS from auto-zooming on focus */
  outline: none;
}

textarea { min-height: 80px; resize: vertical; line-height: 1.4; }

input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

input::placeholder, textarea::placeholder { color: var(--mauve2); opacity: 0.7; }

.code-input {
  font-family: var(--font-mono);
  font-size: 28px;
  letter-spacing: 0.3em;
  text-align: center;
  padding-left: calc(14px + 0.3em); /* optical: absorbs the trailing letter-space */
}

.prefixed { position: relative; display: flex; align-items: center; }

.prefixed .prefix {
  position: absolute; left: 14px;
  font-family: var(--font-mono);
  color: var(--mauve2);
  pointer-events: none;
}

.prefixed input { padding-left: 32px; }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap);
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none; /* .btn is used on <a> too */
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:active { transform: scale(0.96); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn.block { width: 100%; }

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-cta);
}

.btn.ghost {
  background: var(--panel);
  color: var(--mauve);
  border-color: var(--line);
  font-weight: 600;
}

.btn.danger {
  background: transparent;
  color: var(--coral);
  border-color: color-mix(in srgb, var(--coral) 40%, transparent);
  font-weight: 600;
}

/* --------------------------------------------------------------- swatches */

.swatches { display: flex; flex-wrap: wrap; gap: 14px; padding: 3px 0; }

.swatch {
  width: 44px; height: 44px;
  border: 0; border-radius: var(--r-pill);
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.swatch:active { transform: scale(0.94); }
.swatch[aria-pressed="true"] { outline: 2px solid var(--cream); outline-offset: 3px; }
.swatch:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

/* ---------------------------------------------------------------- switch */

.switch {
  display: flex; align-items: center; gap: 12px;
  min-height: var(--tap);
  font-size: var(--fs-body);
  cursor: pointer;
}

.switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.switch .track {
  flex: none;
  width: 52px; height: 32px;
  border-radius: var(--r-pill);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 3px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.switch .knob {
  display: block;
  width: 24px; height: 24px;
  border-radius: var(--r-pill);
  background: var(--mauve2);
  transition: transform 0.15s ease, background 0.15s ease;
}

.switch input:checked + .track { background: var(--accent-glow-soft); border-color: var(--accent); }
.switch input:checked + .track .knob { transform: translateX(20px); background: var(--accent); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-ring); }

/* ----------------------------------------------------------------- sheet */

.sheet-wrap {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
}

.scrim {
  position: absolute; inset: 0;
  background: rgba(10, 6, 16, 0.62);
  animation: fade 0.25s ease;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 430px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 30px var(--pad) calc(24px + var(--safe-b));
  background: var(--surface);
  border: 1px solid var(--line2);
  border-bottom: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  animation: sheet 0.34s var(--ease);
}

.sheet h3 { font-size: var(--fs-head); }

.grabber {
  position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 4px;
  border-radius: var(--r-pill);
  background: var(--line2);
}

.sheet-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--r-pill);
  background: var(--panel);
  color: var(--cream);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.sheet-close:active { transform: scale(0.94); }
.sheet-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* ---------------------------------------------------------------- ticket */

/* Receipt stock with the reference's sawtooth edge. The zigzag is an inline
   SVG so the drop-shadow follows the torn silhouette. */
.ticket { filter: var(--drop-ticket); margin: 2px 0 4px; }

.ticket-edge { display: block; width: 100%; height: 7px; }
.ticket-edge path { fill: var(--paper); }
.ticket-edge.flip { transform: scaleY(-1); }

.ticket-body {
  font-family: var(--font-mono);
  background: var(--paper);
  color: var(--paperink);
  padding: 14px 18px;
  font-size: var(--fs-label);
  letter-spacing: var(--track-receipt);
}

.ticket-row { display: flex; justify-content: space-between; gap: 12px; }
.ticket-row + .ticket-row { margin-top: 8px; }

.ticket-head {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1.5px dashed var(--paperline);
  text-transform: uppercase;
}

.ticket-total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1.5px solid var(--paperink);
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
}

.ticket-row .v { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ----------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%; top: calc(72px + var(--safe-t));
  transform: translateX(-50%);
  z-index: 80;
  /* Purely informational: it floats over the chip rails and the order list,
     and must never swallow a tap meant for what is underneath it. */
  pointer-events: none;
  max-width: min(90vw, 400px);
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--panel);
  border: 1px solid var(--line2);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-align: center;
  box-shadow: var(--shadow-float);
  animation: drop 0.18s ease-out;
}

.toast.bad { border-color: color-mix(in srgb, var(--coral) 55%, transparent); color: var(--coral); }

/* ---------------------------------------------------------------- motion */

@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { transform: translateY(100%); } }
@keyframes drop { from { transform: translate(-50%, -10px); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.rise { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.001s !important;
  }
}

/* ==========================================================================
   Storefront + order loop.
   No new colours: everything below resolves to tokens already declared above.
   ========================================================================== */

/* ------------------------------------------------------------ store header */

.store-head {
  padding: 20px var(--pad) 16px;
  background: radial-gradient(120% 80% at 50% -10%, var(--heroglow) 0%, var(--ink) 62%);
  border-bottom: 1px solid var(--line);
}

.store-head h1 { font-size: var(--fs-title, 26px); }

.store-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-top: 10px;
}

/* Open/closed badge. Status colours, never the accent. */
.state {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: var(--fs-tag);
  letter-spacing: var(--track-cap);
  text-transform: uppercase;
  color: var(--mauve2);
}

.state .dot { width: 7px; height: 7px; border-radius: var(--r-pill); background: currentColor; }
.state.open { color: var(--fresh); }
.state.shut { color: var(--coral); }

.closed-banner {
  margin: 12px var(--pad) 0;
  padding: 12px 14px;
  border-radius: var(--r-input);
  border: 1px solid color-mix(in srgb, var(--coral) 30%, transparent);
  background: color-mix(in srgb, var(--coral) 10%, var(--surface));
  color: var(--coral);
  font-size: var(--fs-sm);
}

/* ------------------------------------------------------------- menu rows */

/* Same card as the owner list; the trailing control is an add button rather
   than edit/delete. */
.item.pick { cursor: pointer; }
.item.pick:active { transform: scale(0.985); }

.item-add {
  flex-shrink: 0; align-self: center;
  position: relative;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--accent-line);
  background: var(--accent-glow-soft);
  color: var(--accent-text);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.item-add::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: var(--tap); height: var(--tap);
}

.item-add:active { transform: scale(0.94); }
.item-add svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

.item-sold { color: var(--coral); }

/* -------------------------------------------------------------- qty stepper */

.stepper {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--panel);
}

.stepper button {
  position: relative;
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border: 0; border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--cream);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.stepper button::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: var(--tap); height: var(--tap);
}

.stepper button:active { transform: scale(0.94); }
.stepper button[disabled] { opacity: 0.35; pointer-events: none; }
.stepper svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

.stepper .qty {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.02em;
  min-width: 40px;
  text-align: center;
}

/* --------------------------------------------------------------- cart bar */

/* Fixed to the bottom of the storefront, above the safe area. */
.cartbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30;
  width: 100%; max-width: 430px;
  padding: 12px var(--pad) calc(12px + var(--safe-b));
  background: var(--ink);
  border-top: 1px solid var(--line);
}

.cartbar .btn { width: 100%; justify-content: space-between; }
.cartbar .count {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  opacity: 0.85;
}

/* ------------------------------------------------------------ cart lines */

.line {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
}

.line + .line { border-top: 1px dashed var(--paperline); }
.line-main { flex: 1; min-width: 0; }
.line-name { font-weight: 500; }
.line-note { font-size: var(--fs-tag); opacity: 0.75; margin-top: 2px; }
.line-cost { flex-shrink: 0; text-align: right; }

/* Stepper sized down for use inside the receipt. */
.line-qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.line-qty button {
  position: relative;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--paperline);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--paperink);
  cursor: pointer;
}

.line-qty button::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: var(--tap); height: var(--tap);
}

.line-qty svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.line-qty .n { min-width: 20px; text-align: center; font-weight: 500; }

/* --------------------------------------------------------- pickup slots */

.slots { display: flex; flex-wrap: wrap; gap: 8px; }

.slot {
  position: relative;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--mauve);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.slot::after {
  content: '';
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  height: var(--tap);
}

.slot:active { transform: scale(0.94); }
.slot[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }

/* ------------------------------------------------------------ order code */

.code-badge {
  font-family: var(--font-display);
  font-size: 52px;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--paperink);
  line-height: 1.1;
}

/* -------------------------------------------------------------- statuses */

/* Status colours are fixed tokens so they mean the same thing in every shop. */
.st-pending { color: var(--lime); }
.st-confirmed { color: var(--accent-text); }
.st-ready { color: var(--fresh); }
.st-picked_up { color: var(--mauve2); }
.st-cancelled { color: var(--coral); }

.status-line {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.status-line .dot {
  width: 9px; height: 9px; border-radius: var(--r-pill);
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* Progress rail on the customer status page. */
.track { display: flex; flex-direction: column; gap: 0; margin: 4px 0; }

.step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 0 0 18px;
  position: relative;
}

.step:last-child { padding-bottom: 0; }

.step .bead {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: var(--r-pill);
  border: 2px solid var(--line2);
  background: var(--surface);
  margin-top: 1px;
}

/* The connector between beads. */
.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 8px; top: 20px; bottom: 4px;
  width: 2px;
  background: var(--line2);
}

.step.done .bead { border-color: var(--fresh); background: var(--fresh); }
.step.done:not(:last-child)::before { background: var(--fresh); }
.step.at .bead { border-color: var(--fresh); background: var(--surface); box-shadow: 0 0 10px var(--fresh); }
.step .what { font-size: var(--fs-body); color: var(--mauve2); }
.step.done .what, .step.at .what { color: var(--cream); }
.step .when { font-size: var(--fs-tag); font-family: var(--font-mono); color: var(--mauve2); margin-top: 2px; }

/* ------------------------------------------------------- owner order rail */

.order-card { margin-bottom: 12px; }

.order-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px;
}

.order-code {
  font-family: var(--font-display);
  font-size: var(--fs-head);
  letter-spacing: 0.05em;
  color: var(--paperink);
}

.order-when { font-family: var(--font-mono); font-size: var(--fs-tag); color: var(--paperink); opacity: 0.7; }

.order-who {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: var(--fs-label);
  margin-top: 2px;
}

/* The .st-* colours above are tuned for the dark surface and wash out on cream
   receipt stock, so on paper each one is mixed down toward --paperink. Same
   tokens, same meaning, legible on both grounds. */
.order-state.st-pending { color: color-mix(in srgb, var(--lime) 40%, var(--paperink)); }
.order-state.st-confirmed { color: color-mix(in srgb, var(--accent) 45%, var(--paperink)); }
.order-state.st-ready { color: color-mix(in srgb, var(--fresh) 40%, var(--paperink)); }
.order-state.st-picked_up { color: var(--paperink); opacity: 0.55; }
.order-state.st-cancelled { color: color-mix(in srgb, var(--coral) 55%, var(--paperink)); }

.order-state {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 1.5px solid currentColor;
  font-size: var(--fs-tag);
  letter-spacing: var(--track-cap);
  text-transform: uppercase;
}

.order-acts { display: flex; gap: 10px; margin-top: 12px; }
.order-acts .btn { flex: 1; font-size: var(--fs-body); }
.order-acts .btn.ghost { flex: 0 0 auto; padding: 0 16px; }

.rail-filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(var(--pad) * -1); padding: 2px var(--pad) 10px; }

/* A quiet dot next to the Orders tab when something new lands. */
.tabbtn { position: relative; }

.tabbtn .badge {
  position: absolute;
  top: 6px; left: 50%;
  margin-left: 10px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 18px;
  text-align: center;
}

/* ------------------------------------------------------------ pay notice */

.notice {
  padding: 14px 16px;
  border-radius: var(--r-input);
  border: 1px dashed var(--line2);
  background: var(--panel);
  color: var(--mauve);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.notice b { color: var(--cream); font-weight: 600; }

/* Receipt footnote for the seller-side fee. */
.ticket-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--paperline);
  font-size: var(--fs-tag);
  letter-spacing: var(--track-cap);
  opacity: 0.75;
}

/* ==========================================================================
   Photos: item tile, shop logo, upload progress, drag handle.
   No new colours. The empty tile is the same radial disc as .item-tile.
   ========================================================================== */

.photo-tile,
.logo-tile {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  color: var(--mauve2);
  background: radial-gradient(70% 70% at 50% 35%, var(--disc1) 0%, var(--disc2) 100%);
  border: 1px solid var(--line2);
  border-radius: var(--r-tile);
  transition: transform 0.12s ease, border-color 0.18s ease;
}

/* Wide enough to judge a photo of a plate by, short enough that the rest of
   the editor is still on screen under it. */
.photo-tile { width: 100%; aspect-ratio: 16 / 10; }
.logo-tile { flex: none; width: 84px; height: 84px; }

.photo-tile:active,
.logo-tile:active { transform: scale(0.98); }
.photo-tile:hover, .photo-tile:focus-visible,
.logo-tile:hover, .logo-tile:focus-visible { border-color: var(--accent-line); }

.photo-tile img,
.logo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-tag);
  letter-spacing: var(--track-cap);
  text-transform: uppercase;
}

.photo-empty svg {
  width: 26px; height: 26px;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Upload progress, pinned to the bottom edge of the tile it belongs to. */
.photo-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 5px;
  background: rgba(10, 6, 16, 0.62);
}

.photo-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.18s ease;
}

.logo-row { display: flex; align-items: center; gap: 14px; }
.logo-row .muted { flex: 1; min-width: 0; }

/* Drag handle. touch-action is what stops the page scrolling instead of the
   row moving once a finger is down on it. */
.iconbtn.grip { cursor: grab; touch-action: none; }
.iconbtn.grip:active { cursor: grabbing; }

.list li.dragging { position: relative; z-index: 5; }

.list li.dragging .item {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-float);
}

/* ------------------------------------------------------- install steps */

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }

.steps li {
  display: flex; align-items: center; gap: 10px;
  color: var(--mauve);
  font-size: var(--fs-sm);
}

.step-n {
  flex: none;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: var(--fs-tag);
}

.inline-glyph {
  width: 16px; height: 16px;
  vertical-align: -3px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* --------------------------------------------------------- store logo */

.store-id { display: flex; align-items: center; gap: 12px; }

.store-logo {
  flex: none;
  width: 46px; height: 46px;
  border-radius: var(--r-tile);
  object-fit: cover;
  border: 1px solid var(--line2);
}

/* ==========================================================================
   Marketing site. Same language as the app: Anton display, purple bloom,
   receipt tickets, marigold accent. Mobile first, then a real desktop layout.
   Every value below resolves to a token already declared at the top.
   ========================================================================== */

.site { background: var(--ink); min-height: 100dvh; }

.wrap { width: 100%; max-width: 1060px; margin: 0 auto; padding: 0 var(--pad); }
.wrap-narrow { max-width: 720px; }

/* The nav is sticky, so an anchor jump has to stop short of it or the section
   heading lands underneath. */
.band[id] { scroll-margin-top: 72px; }

/* Grid children default to min-width:auto, which lets a wide child (the demo
   phone, a long word) hold the column open and push the page sideways. */
.hero-grid > *,
.demo-grid > *,
.plans > *,
.steps-grid > *,
.pains > * { min-width: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* -------------------------------------------------------------- site nav */

.site-nav {
  position: sticky; top: 0; z-index: 40;
  padding-top: var(--safe-t);
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--cream);
  text-decoration: none;
  font-size: 22px;
}

.nav-mark {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent);
}

.nav-mark svg { width: 21px; height: 21px; fill: var(--accent-ink); }

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-links a {
  display: inline-flex; align-items: center;
  min-height: var(--tap);
  padding: 0 12px;
  color: var(--mauve);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.nav-links a:hover { color: var(--cream); }

/* Written as a descendant so it outweighs the plain nav link above it without
   reaching for !important. */
.nav-links a.nav-cta {
  color: var(--accent-ink);
  font-size: var(--fs-sm);
  padding: 0 20px;
}

/* On a phone the two text links crowd the button out, so the button stays. */
@media (max-width: 460px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: 44px 0 52px;
  /* The house bloom, same radial as every other hero in the product. */
  background: radial-gradient(120% 80% at 50% -10%, var(--heroglow) 0%, var(--ink) 62%);
}

.hero-grid { display: grid; gap: 36px; align-items: center; }

.hero-h1 {
  font-size: clamp(40px, 8.5vw, 64px);
  margin: 14px 0 0;
  max-width: 12ch;
}

.lede {
  margin-top: 16px;
  max-width: 46ch;
  color: var(--mauve);
  font-size: 17px;
  line-height: 1.55;
}

.hero-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 26px; }
.hero-cta .btn { padding: 0 34px; }

/* Free-standing printed receipt, per the reference: tilt plus a real shadow. */
.hero-art { display: flex; justify-content: center; }

/* A drop-shadow rather than a box-shadow, so it follows the torn edge instead
   of drawing a rectangle behind it. Same blacks as --shadow-float. */
.ticket-tilt {
  max-width: 340px;
  width: 100%;
  transform: rotate(-1.5deg);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
}

/* ----------------------------------------------------------------- bands */

.band { padding: 56px 0; border-top: 1px solid var(--line); }

.sec-h2 {
  font-size: clamp(26px, 5vw, 40px);
  margin: 12px 0 26px;
  max-width: 18ch;
}

.band-note {
  margin-top: 22px;
  color: var(--mauve2);
  font-size: var(--fs-sm);
  max-width: 52ch;
}

/* --------------------------------------------------------------- problem */

.pains { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.pain {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  color: var(--mauve);
  font-size: var(--fs-body);
  line-height: 1.5;
}

.pain-n {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-cap);
  color: var(--coral);
  padding-top: 3px;
}

/* ---------------------------------------------------------- how it works */

.steps-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.step-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.step-num {
  display: block;
  font-size: 40px;
  color: var(--accent-text);
  line-height: 1;
}

.step-h3 { font-size: var(--fs-head); margin: 12px 0 8px; }
.step-card .muted { line-height: 1.55; }

/* ------------------------------------------------------------------ demo */

.band-demo { background: var(--backdrop); }
.demo-grid { display: grid; gap: 34px; align-items: center; }
.demo-copy .btn { margin-top: 6px; }

.ticks { list-style: none; margin: 18px 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.ticks li {
  position: relative;
  padding-left: 26px;
  color: var(--mauve);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

/* A tick drawn in CSS: no icon font, no extra request. */
.ticks li::before {
  content: '';
  position: absolute;
  left: 4px; top: 5px;
  width: 6px; height: 11px;
  border: solid var(--accent-text);
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

.phone-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* The demo runs at real phone width so the tap targets are honestly sized. */
.phone {
  width: 100%;
  max-width: min(380px, 100%);
  height: clamp(480px, 72vh, 640px);
  border-radius: 30px;
  border: 1px solid var(--line2);
  background: var(--ink);
  box-shadow: var(--shadow-frame);
  overflow: hidden;
}

.phone-screen { position: relative; height: 100%; overflow: hidden; }
.demo-cap { color: var(--mauve2); }

.demo-view { display: flex; flex-direction: column; height: 100%; min-height: 0; }

.demo-head {
  flex: none;
  padding: 18px 16px 14px;
  background: radial-gradient(120% 80% at 50% -10%, var(--heroglow) 0%, var(--ink) 62%);
  border-bottom: 1px solid var(--line);
}

.demo-name { font-size: 24px; }

.demo-logo {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-tile);
  font-size: 20px;
  color: var(--accent-ink);
  background: var(--accent);
}

.demo-tagline { margin-top: 6px; }
.demo-head .store-meta { margin-top: 10px; }

.demo-top {
  flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.demo-top h3 { font-size: var(--fs-head); }

.demo-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}

/* The frame has a fixed height, so its children would otherwise flex-shrink to
   fit instead of letting the column scroll. The chip rail is the one that
   notices first: it gets squashed to a sliver. */
.demo-scroll > * { flex: none; }

/* The rail bleeds to the frame edge, matching the storefront. */
.demo-scroll .rail { margin: 0 -14px; padding: 2px 14px 6px; }
.demo-scroll .list { gap: 10px; }

.demo-bar {
  flex: none;
  padding: 12px 14px calc(12px + var(--safe-b));
  background: var(--ink);
  border-top: 1px solid var(--line);
}

.demo-bar .btn { width: 100%; justify-content: space-between; }
.demo-bar .count { font-family: var(--font-mono); font-size: var(--fs-sm); opacity: 0.85; }

.demo-sheet-wrap { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; }
.demo-sheet { max-height: 88%; padding: 30px 16px 20px; }
.demo-code-note { text-align: center; border: 0; margin: 2px 0 12px; padding: 0; }

/* --------------------------------------------------------------- pricing */

.plans { display: grid; gap: 14px; }

.plan {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  display: flex; flex-direction: column;
}

/* The paid plan is outlined in the accent rather than filled: the page keeps
   exactly one lit thing per screenful, and that is the button. */
.plan-up { border-color: var(--accent-line); }

.plan-price { font-size: 52px; margin: 12px 0 0; display: flex; align-items: baseline; gap: 10px; }

.plan-per {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: var(--track-cap);
  color: var(--mauve2);
  text-transform: none;
}

.plan-take {
  margin-top: 8px;
  font-size: var(--fs-body);
  color: var(--accent-text);
  letter-spacing: 0.02em;
}

.plan .ticks { flex: 1 1 auto; }
.pay-note { margin-top: 22px; }
.pay-note b { display: block; margin-bottom: 4px; }

/* ------------------------------------------------------------------- faq */

.faq { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: var(--tap);
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
  color: var(--cream);
  font-size: 17px;
  font-weight: 600;
}

.faq summary::-webkit-details-marker { display: none; }

.faq-chevron {
  flex: none;
  width: 20px; height: 20px;
  fill: none; stroke: var(--mauve2); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.18s ease;
}

.faq[open] .faq-chevron { transform: rotate(180deg); }
.faq p { padding: 0 0 18px; max-width: 62ch; line-height: 1.6; }

/* --------------------------------------------------------------- closing */

.band-close {
  background: radial-gradient(120% 90% at 50% 110%, var(--heroglow) 0%, var(--ink) 62%);
}

.closer { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.closer .sec-h2 { max-width: 20ch; margin-bottom: 8px; }
.closer .btn { margin-top: 20px; padding: 0 34px; }

/* ---------------------------------------------------------------- footer */

.site-foot {
  padding: 32px 0 calc(32px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--backdrop);
}

.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.foot-id { display: flex; align-items: center; gap: 12px; }
.foot-name { font-size: 20px; }
.foot-id .cap { display: block; margin-top: 4px; }

.foot-links { display: flex; flex-wrap: wrap; gap: 4px; }

.foot-links a {
  display: inline-flex; align-items: center;
  min-height: var(--tap);
  padding: 0 12px;
  color: var(--mauve2);
  text-decoration: none;
  font-size: var(--fs-sm);
}

.foot-links a:hover { color: var(--cream); }

/* ------------------------------------------------------------- desktop */

@media (min-width: 720px) {
  .band { padding: 76px 0; }
  .hero { padding: 64px 0 76px; }
  .pains { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 940px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
  .demo-grid { grid-template-columns: 0.95fr 1.05fr; gap: 56px; }
  .hero { padding: 84px 0 96px; }
  /* The first pain reads as the headline of the list on a wide screen. */
  .pain:first-child { grid-column: 1 / -1; }
}

/* ==========================================================================
   Share kit. The link, the QR, the post image, the words. Existing tokens
   only; the only new shapes are the paper frames the code and image sit in.
   ========================================================================== */

/* The link, big enough to read across a kitchen and tappable anywhere. */
.linkbox {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  width: 100%;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  color: var(--cream);
  background: var(--surface);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-card);
  transition: transform 0.12s ease, border-color 0.18s ease;
}

.linkbox:active { transform: scale(0.985); }

.linkbox-url {
  font-size: 22px;
  line-height: 1.25;
  color: var(--accent-text);
  word-break: break-all;
}

.linkbox-hint {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono);
  font-size: var(--fs-tag);
  letter-spacing: var(--track-cap);
  text-transform: uppercase;
  color: var(--mauve2);
}

.linkbox-hint svg {
  width: 14px; height: 14px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Receipt stock again: paper is where printable things live in this product. */
.qr-frame {
  display: grid; place-items: center;
  padding: 14px;
  background: var(--paper);
  border-radius: var(--r-tile);
}

/* The canvas is drawn at print size and shown small. */
.qr-frame canvas {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  image-rendering: pixelated;   /* keeps the modules square when scaled down */
}

.shot-frame {
  display: grid; place-items: center;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-tile);
}

.shot-frame canvas {
  width: auto;
  max-width: 100%;
  max-height: 380px;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* ------------------------------------------------------------ post text */

.post {
  border: 1px dashed var(--line2);
  border-radius: var(--r-input);
  padding: 14px;
  background: var(--panel);
}

.post-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

/* A real 52px box rather than an expanded hit area. There is no shortage of
   room in this card, so the button is simply the size it should be. */
.post-copy {
  min-height: var(--tap);
  padding: 0 18px;
  font-size: var(--fs-sm);
}

.post-body {
  margin: 0;
  font-size: var(--fs-desc);
  line-height: 1.6;
  color: var(--mauve);
  white-space: pre-wrap;
  word-break: break-word;
}

/* --------------------------------------------------- order from an email */

/* The order the seller tapped through to from an email, ringed for a few
   seconds so they can pick it out of the rail without reading every code. */
.spot {
  border-radius: var(--r-card);
  animation: spot 4s ease;
}

@keyframes spot {
  0%, 70% { box-shadow: 0 0 0 4px var(--accent-line), 0 0 28px var(--accent-glow); }
  100% { box-shadow: 0 0 0 4px transparent, 0 0 28px transparent; }
}
