/* Makit shared styles. Tokens first, then components. Keep selectors shallow to avoid specificity fights.
   Text colours are only paired as the Makit token file allows; see docs/DESIGN.md before adding a new one. */

:root {
  /* Brand tokens */
  --green: #0E7C4A;
  --green-deep: #0A6139;
  --green-soft: #E4F2EB;
  --ink: #14201A;
  --ink-muted: #56625B;
  --paper: #FFF8EE;
  --white: #FFFFFF;
  --line: #E6DCCB;
  --orange: #F5822A;
  --burnt: #C8551A;
  --amber: #FFC53D;
  --error: #B42318;

  /* Working roles and tints */
  --surface: var(--white);
  --focus: var(--ink);
  --amber-soft: #FFF1CC;
  --error-soft: #FBE7E4;
  --error-deep: #8E1B12;
  --rail-text: #C9D3CC;
  --table-hover: #F6F0E4;
  --skeleton: #EDE5D5;
  --skeleton-hi: #F8F3E9;

  /* Radius: 8 for small inputs and badges, 16 for cards and tiles, 28 for large tiles, 999 for buttons and chips */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* Spacing: 4, 8, 12, 16, 24, 32, 48 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* Type scale: label 12, small 14, body 16, heading 22, title up to 36, display up to 56 */
  --step--2: 0.75rem;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.375rem;
  --step-2: clamp(1.875rem, 1.5rem + 1.5vw, 2.25rem);
  --step-3: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);

  --font-display: 'Figtree', 'Helvetica Neue', Arial, sans-serif;
  --font-text: 'Figtree', 'Helvetica Neue', Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0) / 1.5 var(--font-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  letter-spacing: -0.005em;
}
h1 { font-size: var(--step-2); font-weight: 700; line-height: 1.11; letter-spacing: -0.015em; }
h2 { font-size: var(--step-1); font-weight: 600; line-height: 1.27; }
h3 { font-size: var(--step-0); font-weight: 700; line-height: 1.5; }

p { margin: 0 0 var(--space-3); max-width: 64ch; }
a { color: var(--green-deep); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
code { font-size: 0.92em; background: var(--green-soft); padding: 1px 6px; border-radius: var(--radius-sm); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.muted { color: var(--ink-muted); }
.num { font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: var(--space-3); }
.row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.grow { flex: 1; min-width: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

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

/* ---------- buttons: pill shaped, one green primary action ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0 var(--space-5);
  border: 2px solid var(--green); border-radius: var(--radius-pill);
  background: var(--green); color: var(--white); font-weight: 700; text-decoration: none;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #2B3832; border-color: #2B3832; }
.btn-line { background: var(--white); border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--green-soft); }
.btn-danger { background: var(--error); border-color: var(--error); color: var(--white); }
.btn-danger:hover { background: var(--error-deep); border-color: var(--error-deep); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--green-deep); padding: 0 var(--space-2); }
.btn-quiet:hover { background: var(--green-soft); }
.btn-sm { min-height: 40px; padding: 0 var(--space-4); font-size: var(--step--1); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: var(--space-4); }
.field > span:not(.hint) { font-weight: 700; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid var(--ink-muted); border-radius: var(--radius-sm); background: var(--surface);
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; min-height: 0; accent-color: var(--green); }
.check { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; font-weight: 700; }
.hint { font-size: var(--step--1); color: var(--ink-muted); }
.error { color: var(--error); font-weight: 700; }
.form-grid { display: grid; gap: 0 var(--space-4); }
@media (min-width: 720px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }

.choice { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--ink); border-radius: var(--radius-pill); overflow: hidden; margin-bottom: var(--space-4); }
.choice label { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: grid; place-items: center; min-height: 48px; padding: 0 var(--space-2); font-weight: 700; color: var(--ink); text-align: center; }
.choice input:checked + span { background: var(--green); color: var(--white); }
.choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: -6px; }

.option {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: start;
  padding: var(--space-3); margin-bottom: var(--space-2);
  border: 1.5px solid var(--line); border-radius: var(--radius-md); background: var(--surface); cursor: pointer;
}
.option:has(input:checked) { border-color: var(--green); box-shadow: inset 4px 0 0 var(--green); }
.option input { margin-top: 2px; }

/* ---------- signboards: initials on a palette colour ---------- */
.sign {
  display: inline-grid; place-items: center; flex: none;
  width: 64px; height: 64px;
  background: var(--sign-bg); color: var(--sign-fg);
  border-radius: var(--radius-md);
  font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.01em;
}
.sign-sm { width: 44px; height: 44px; font-size: 16px; border-radius: var(--radius-sm); }
.sign-lg { display: grid; width: 100%; height: 168px; font-size: 56px; border-radius: var(--radius-lg); }

/* ---------- status: a coloured dot and a label, never colour alone ---------- */
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--step--1); color: var(--ink); }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); }
.status-amber { --dot: var(--amber); }
.status-green { --dot: var(--green); }
.status-ink { --dot: var(--ink); }
.status-error { --dot: var(--error); color: var(--error); }
.status-muted { --dot: var(--ink-muted); color: var(--ink-muted); }
.open-state { font-weight: 700; color: var(--green-deep); }
.closed-state { font-weight: 700; color: var(--error); }

/* ---------- app shell (phones) ---------- */
.phone { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding-bottom: 104px; }
.screen { padding: 0 var(--space-4) var(--space-6); }
.screen-head { padding: var(--space-4) 0 var(--space-3); display: grid; gap: var(--space-2); }
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 2px;
  min-height: 60px; padding: 8px 4px; color: var(--ink-muted); font-size: var(--step--1); text-decoration: none;
}
.bottom-nav a[aria-current="page"] { color: var(--green-deep); font-weight: 700; }
.bottom-nav a[aria-current="page"]::before {
  content: ""; position: absolute; top: -1px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--green);
}
.nav-count {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--error); color: var(--white); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}

/* customer top bar: Makit lockup on the left, orders, alerts and account icons on the right.
   The awning runs along the bottom edge, once, as the brand asks. */
.customer-app { --appbar-h: 56px; }
.appbar {
  position: sticky; top: 0; z-index: 30;
  padding-top: env(safe-area-inset-top);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.appbar::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; pointer-events: none;
  background: url("brand/makit-awning.svg") repeat-x left top / auto 14px;
}
.appbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  max-width: 560px; height: var(--appbar-h); margin: 0 auto; padding: 0 var(--space-2) 0 var(--space-4);
}
.appbar-brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.appbar-brand img { height: 30px; width: auto; }
.appbar-actions { display: flex; align-items: center; gap: 2px; }
.appbar-icon {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: var(--radius-pill);
  color: var(--ink); text-decoration: none;
}
.appbar-icon .icon { width: 24px; height: 24px; }
.appbar-icon:hover { background: var(--green-soft); }
.appbar-icon[aria-current="page"] { color: var(--green-deep); background: var(--green-soft); }
.appbar-icon .nav-count { top: 2px; right: 0; left: auto; box-shadow: 0 0 0 2px var(--surface); }
.customer-app .phone { padding-bottom: 96px; }
.customer-app .phone > .screen:first-child { padding-top: var(--space-3); }

/* ---------- search and filter chips ---------- */
.search-field { position: relative; }
.search-field .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-muted); }
.search-field input { padding-left: 44px; }
.chips { display: flex; gap: var(--space-2); overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 var(--space-4);
  border: 1.5px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); font-weight: 700;
}
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--white); }

/* ---------- store page ---------- */
/* The details are small and regular weight, like the printed menu of a restaurant. Only the store name is a heading. */
.store-head { display: grid; gap: var(--space-3); padding: 0 var(--space-4); }
.store-intro { display: grid; gap: var(--space-2); align-content: start; min-width: 0; }
.store-type, .store-desc, .store-rating, .store-open { margin: 0; font-size: var(--step--1); font-weight: 400; }
.store-type, .store-desc { color: var(--ink-muted); }
.store-open { display: flex; align-items: center; gap: var(--space-2); color: var(--ink); }
.store-open::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.store-open.is-closed::before { background: var(--error); }
.store-star { color: var(--amber); letter-spacing: 1px; }
.store-facts {
  display: grid; gap: 4px; margin: var(--space-2) 0 0; padding-top: var(--space-3);
  border-top: 1px solid var(--line); font-size: var(--step--1); line-height: 1.45;
}
.store-facts > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: var(--space-3); }
.store-facts dt { margin: 0; color: var(--ink-muted); font-weight: 400; }
.store-facts dd { margin: 0; color: var(--ink); font-weight: 400; overflow-wrap: anywhere; }
.menu-groups { display: grid; }
.menu-group { padding-top: var(--space-5); scroll-margin-top: 140px; }
.menu-group > h2 { font-size: var(--step-1); margin-bottom: var(--space-2); }
.dish {
  display: grid; grid-template-columns: 1fr auto; gap: var(--space-3); align-items: center;
  padding: var(--space-3) 0; border-bottom: 1px solid var(--line);
}
.dish-head { display: flex; justify-content: space-between; align-items: baseline; column-gap: var(--space-3); }
.dish-name { font-weight: 600; min-width: 0; }
.dish-desc { font-size: var(--step--1); color: var(--ink-muted); margin-top: 2px; }
.dish-price { font-weight: 400; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dish-tax { font-size: 12px; color: var(--ink-muted); font-weight: 400; }
.dish.is-off .dish-name, .dish.is-off .dish-price { color: var(--ink-muted); text-decoration: line-through; }
.dish-photo { width: 76px; height: 76px; object-fit: cover; border-radius: var(--radius-md); }
.dish-side { display: grid; justify-items: end; gap: var(--space-2); }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1.5px solid var(--green); border-radius: var(--radius-pill); background: var(--surface); color: var(--green-deep);
}
.stepper button.add { background: var(--green); border-color: var(--green); color: var(--white); }
.stepper output { min-width: 32px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.basket-bar {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 25;
  width: min(536px, calc(100% - 24px)); transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: 12px 12px 12px 22px; border-radius: var(--radius-pill);
  background: var(--orange); color: var(--ink); text-decoration: none;
  box-shadow: 0 10px 24px rgba(20, 32, 26, 0.24);
  animation: basket-rise 240ms ease-out both;
}
.basket-bar strong { font-family: var(--font-display); font-weight: 700; font-size: var(--step-0); }
@keyframes basket-rise {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- basket and checkout ---------- */
.line-item { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); align-items: center; }
.totals { display: grid; gap: 8px; padding: var(--space-4) 0; }
.totals div { display: flex; justify-content: space-between; gap: var(--space-3); font-variant-numeric: tabular-nums; }
.totals .grand {
  padding-top: var(--space-2); border-top: 2px solid var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); color: var(--ink);
}
.notice {
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: var(--green-soft); box-shadow: inset 5px 0 0 var(--green);
  display: grid; gap: 4px; margin-bottom: var(--space-4);
}
.notice-warn { background: var(--amber-soft); box-shadow: inset 5px 0 0 var(--amber); }
.notice-error { background: var(--error-soft); box-shadow: inset 5px 0 0 var(--error); }

/* ---------- orders and timelines ---------- */
.order-row {
  display: grid; gap: 4px; padding: var(--space-4) 0 var(--space-4) var(--space-3);
  border-bottom: 1px solid var(--line); border-left: 4px solid var(--edge, transparent);
  color: inherit; text-decoration: none;
}
.order-title { font-weight: 700; font-size: var(--step-0); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 var(--space-5) 32px; color: var(--ink-muted); }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--paper);
}
.timeline li::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { background: var(--green); border-color: var(--green); }
.timeline li.done::after { background: var(--green); }
.timeline li.current { color: var(--ink); font-weight: 700; }
.timeline li.current::before { background: var(--white); border-color: var(--green); box-shadow: 0 0 0 5px rgba(14, 124, 74, 0.18); }
.timeline time { display: block; font-size: var(--step--1); font-weight: 400; color: var(--ink-muted); }

/* ---------- sheets and toasts ---------- */
dialog.sheet {
  width: min(560px, 100%); max-height: 88dvh; margin: auto auto 0; padding: 0;
  border: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--surface); color: var(--ink);
}
dialog.sheet::backdrop { background: rgba(20, 32, 26, 0.45); }
.sheet-body { padding: var(--space-4) var(--space-4) var(--space-6); overflow: auto; max-height: 88dvh; }
.sheet-grip { width: 44px; height: 4px; margin: 10px auto 0; border-radius: 2px; background: var(--ink-muted); opacity: 0.4; }
#toasts {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 60;
  display: grid; gap: 8px; width: min(520px, calc(100% - 24px)); pointer-events: none;
}
.toast { padding: 12px 16px; border-radius: var(--radius-md); background: var(--ink); color: var(--paper); font-weight: 700; box-shadow: 0 8px 20px rgba(20, 32, 26, 0.2); }
.toast-ok { background: var(--green); color: var(--white); }
.toast-error { background: var(--error); color: var(--white); }

.empty { display: grid; gap: var(--space-3); justify-items: start; padding: var(--space-6) 0; }
.skeleton {
  height: 64px; margin: var(--space-3) 0; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--skeleton) 25%, var(--skeleton-hi) 50%, var(--skeleton) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- sign-in ---------- */
.auth { display: grid; min-height: 100dvh; align-content: start; max-width: 560px; margin: 0 auto; background: var(--surface); }
.auth-hero {
  position: relative; display: grid; gap: var(--space-3); padding: var(--space-7) var(--space-4) var(--space-6);
  background: var(--green); color: var(--paper);
}
.auth-hero::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; pointer-events: none;
  background: url("brand/makit-awning-reversed.svg") repeat-x left top / auto 14px;
}
.auth-hero h1 { color: var(--paper); font-size: var(--step-3); }
.auth-hero p { color: var(--green-soft); margin: 0; }
.brand-logo { height: 64px; width: auto; margin-left: -6px; }
.auth-body { padding: var(--space-5) var(--space-4) var(--space-7); }
.auth-switch { margin-top: var(--space-4); }

/* ---------- supplier ---------- */
.banner {
  display: grid; gap: 6px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: var(--green-soft); box-shadow: inset 6px 0 0 var(--green); margin-bottom: var(--space-4);
}
.banner-amber { background: var(--amber); color: var(--ink); box-shadow: inset 6px 0 0 var(--ink); }
.banner-amber h2, .banner-amber h3 { color: var(--ink); }
.banner-pulse { animation: amber-pulse 0.9s ease-out 1; }
@keyframes amber-pulse {
  from { box-shadow: 0 0 0 0 rgba(255, 197, 61, 0.75); }
  to { box-shadow: 0 0 0 18px rgba(255, 197, 61, 0); }
}
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.board { display: grid; gap: var(--space-5); }
/* One column on a phone, two from 720 px (an iPad in portrait), three from 1180 px (an iPad in landscape and wider) */
@media (min-width: 720px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
@media (min-width: 1180px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } }
.column-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.count {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--paper); font-family: var(--font-display); font-weight: 700; line-height: 28px; text-align: center;
}
.ticket {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4); margin-bottom: var(--space-3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: inset 6px 0 0 var(--edge, var(--ink-muted));
}
.ticket-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); align-items: baseline; }
.ticket-items { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.ticket-items li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 4px; }
.ticket-items b { font-variant-numeric: tabular-nums; }
.ticket-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-2); }
.ticket-actions .btn { min-height: 52px; }
.kpi-strip {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; margin-bottom: var(--space-5);
}
.kpi-strip > div { background: var(--surface); padding: var(--space-3) var(--space-4); }
.kpi-strip b { display: block; font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-strip span { font-size: var(--step--1); font-weight: 600; color: var(--ink-muted); }
.menu-admin-item { display: grid; grid-template-columns: 64px 1fr auto; gap: var(--space-3); align-items: center; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.menu-admin-item img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-md); }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100dvh; }
@media (min-width: 960px) { .admin { grid-template-columns: 232px minmax(0, 1fr); } }
.rail { display: flex; flex-wrap: wrap; gap: 4px; padding: var(--space-3); background: var(--ink); color: var(--paper); }
@media (min-width: 960px) { .rail { display: grid; align-content: start; padding: var(--space-5) var(--space-3); overflow-x: visible; } }
.rail :focus-visible, .auth-hero :focus-visible { outline-color: var(--paper); }
.rail .brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); font-weight: 700; color: var(--paper); }
.rail a { color: var(--rail-text); text-decoration: none; padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 600; }
.rail a:hover { background: rgba(255, 248, 238, 0.08); }
.rail a[aria-current="page"] { background: rgba(255, 248, 238, 0.12); color: var(--paper); box-shadow: inset 3px 0 0 var(--amber); }
.main { width: 100%; max-width: 1280px; padding: var(--space-5) clamp(16px, 3vw, 40px) var(--space-7); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.page-head p { margin: 4px 0 0; color: var(--ink-muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
.kpi { padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
/* On a tablet the four figures sit as two pairs, not three and an orphan */
@media (min-width: 640px) and (max-width: 959px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi span { font-size: var(--step--1); font-weight: 600; color: var(--ink-muted); }
.kpi strong { display: block; margin-top: 4px; font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); color: var(--ink); }
.panel { padding: var(--space-4); margin-bottom: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.panel-head h2 { font-size: var(--step-1); }
.table-wrap { overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th {
  padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap;
  font-size: var(--step--2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted);
}
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:hover { background: var(--table-hover); }
.num-col { text-align: right; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.toolbar input, .toolbar select { width: auto; min-width: 160px; }
.segmented { display: inline-flex; border: 1.5px solid var(--green); border-radius: var(--radius-pill); overflow: hidden; }
.segmented button { min-height: 40px; padding: 0 var(--space-4); border: 0; background: transparent; color: var(--green-deep); font-weight: 700; }
.segmented button[aria-pressed="true"] { background: var(--green); color: var(--white); }
.drawer { width: min(540px, 100%); height: 100dvh; max-height: none; margin: 0 0 0 auto; border-radius: 0; }
.drawer .sheet-body { max-height: none; height: 100%; }
.chart { display: block; width: 100%; height: auto; --bar: var(--green); }
.chart text { font-family: var(--font-text); fill: var(--ink-muted); font-size: var(--step--1); }
.setup { max-width: 560px; margin: 0 auto; padding-top: var(--space-7); }

/* ---------- additions for the app screens ---------- */
.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; margin-top: var(--space-4); }
.plain-fieldset { border: 0; padding: 0; margin: 0 0 var(--space-4); min-width: 0; }
.plain-fieldset legend { padding: 0; }
.hint.block { display: block; margin-top: 2px; }
.section-title {
  margin: var(--space-5) 0 var(--space-3);
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); color: var(--ink);
}
.deliver-to { display: block; font-family: var(--font-display); font-weight: 700; font-size: var(--step-0); color: var(--ink); }
.sign-img { object-fit: cover; }
.cover { width: 100%; height: 168px; object-fit: cover; border-radius: var(--radius-lg); }
.preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius-md); }
.sheet-content { margin-top: var(--space-3); }
.quote-line { margin: 0 0 var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); background: var(--green-soft); }
/* Store reviews: stars are radio buttons, so the keyboard and screen readers work without extra code */
.review { margin: 0 0 var(--space-4); }
.review-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); margin: 0 0 var(--space-3); }
.stars-static { color: var(--amber); letter-spacing: 2px; font-size: 1.25rem; }
.stars { position: relative; display: flex; flex-direction: row-reverse; justify-content: flex-end; width: max-content; margin-bottom: var(--space-3); }
.stars input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.stars label { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: 2rem; line-height: 1; color: var(--ink-muted); cursor: pointer; }
.stars input:checked ~ label,
.stars label:hover,
.stars label:hover ~ label { color: var(--amber); }
.stars input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.row-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.stack-tight { display: grid; gap: var(--space-2); }
.num-strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.basket-bar > span:first-child { display: grid; gap: 2px; }
.basket-bar .row { gap: var(--space-2); font-weight: 700; }
.order-meta { display: grid; gap: 2px; font-size: var(--step--1); color: var(--ink-muted); }
.rider-card { display: grid; gap: 4px; padding: var(--space-4); border-radius: var(--radius-md); background: var(--green-soft); margin-bottom: var(--space-4); }
.totals .grand span { font-weight: 800; }
.form-error { min-height: 1.2em; color: var(--error); font-weight: 700; margin: 0 0 var(--space-3); }
.search-row { display: grid; gap: var(--space-2); }
.two-col { display: grid; gap: var(--space-4); }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
.kv { display: grid; gap: 6px; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: var(--space-3); }
.kv dt { color: var(--ink-muted); }
.kv dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.tag { display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--green-soft); color: var(--green-deep); font-size: var(--step--1); font-weight: 700; }
.tag-amber { background: var(--amber-soft); color: var(--ink); }
.tag-error { background: var(--error-soft); color: var(--error); }
.tag-green { background: var(--green-soft); color: var(--green-deep); }
.drawer .sheet-content { display: grid; gap: var(--space-3); }
.chart-wrap { overflow-x: auto; }
.legend { display: flex; gap: var(--space-4); flex-wrap: wrap; font-size: var(--step--1); color: var(--ink-muted); margin-top: var(--space-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rail-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--amber); color: var(--ink); font-size: 12px; font-weight: 800; line-height: 22px; text-align: center; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.muted-cell { color: var(--ink-muted); }

/* ---------- customer app additions ---------- */
.back-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-4); font-weight: 700; }
.stepper button { width: 48px; height: 48px; }
.empty .btn { margin-top: var(--space-2); }
.store-head { padding-top: var(--space-2); }
.store-head .back-link { justify-self: start; padding-left: 0; }
.deliver-to { overflow-wrap: anywhere; }
.order-meta > span { overflow-wrap: anywhere; }

/* ---------- supplier app additions ---------- */
/* An iPad in portrait gets a wider column. The order board is wider from 720 px too (see the board rules above). */
@media (min-width: 720px) { .supplier-app .phone { max-width: 720px; } }
.ticket-actions > :only-child { grid-column: 1 / -1; }
.ticket-items li b { white-space: nowrap; }
.ticket-items li > span { overflow-wrap: anywhere; }
.ticket .kv div { flex-wrap: wrap; }
.ticket .kv dd { white-space: nowrap; }
.banner h2, .column-head h2 { font-size: var(--step-1); }
.column { min-width: 0; }
.switch-row input[type="checkbox"] { width: 26px; height: 26px; }
.switch-row > span { min-width: 0; }
.step-count { margin: 0 0 var(--space-2); font-size: var(--step--1); font-weight: 700; color: var(--ink-muted); }
.step-bar { height: 6px; margin-bottom: var(--space-4); border-radius: 3px; background: var(--line); overflow: hidden; }
.step-bar i { display: block; height: 100%; background: var(--green); }
.checks { list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.checks li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 56px; padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }

/* ---------- admin console additions ---------- */
.rail a { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; }
.rail-nav { display: grid; gap: 2px; }
.rail-foot { display: grid; justify-items: start; gap: var(--space-2); margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid rgba(255, 248, 238, 0.16); }
.rail-foot p { margin: 0; color: var(--rail-text); font-size: var(--step--1); overflow-wrap: anywhere; }
.rail-button { min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--paper); font-weight: 700; }
.rail-button:hover { background: rgba(255, 248, 238, 0.08); }
.rail-note { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--rail-text); font-size: var(--step--1); }
/* Below 960 px the rail is a top bar: the brand, the pages in one row that scrolls sideways, then the account actions */
@media (max-width: 959px) {
  .rail { display: grid; gap: var(--space-2); padding: var(--space-3); }
  .rail .brand { margin-bottom: 0; }
  .rail-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .rail-nav::-webkit-scrollbar { display: none; }
  .rail-nav a { flex: 0 0 auto; white-space: nowrap; }
  .rail-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: 0; padding-top: var(--space-2); border-top: 1px solid rgba(255, 248, 238, 0.16); }
  .rail-foot p { flex: 1 1 auto; min-width: 0; }
  .rail-button, .rail-note { padding: 0 8px; }
}
.linklike { padding: 0; border: 0; background: none; color: var(--green-deep); font: inherit; font-weight: 700; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.kpi small { display: block; margin-top: 2px; font-size: var(--step--1); color: var(--ink-muted); }
.chart-figure { position: relative; margin: 0; }
.chart-tip {
  position: absolute; z-index: 2; display: grid; gap: 2px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--ink); color: var(--paper); font-size: var(--step--1); white-space: nowrap; pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
}
.chart-tip strong { font-size: var(--step-0); }
.bar { fill: var(--bar); }
.bar-hit { fill: transparent; }
.bar-hit:focus { outline: none; }
.bar-hit:focus-visible { stroke: var(--ink); stroke-width: 3px; }
.bar-group:hover .bar, .bar-group:focus-within .bar { fill: var(--ink); }
.chart .grid { stroke: var(--line); stroke-width: 1px; }
.chart .baseline { stroke: var(--ink-muted); stroke-width: 1px; }
.chart .chart-peak { fill: var(--ink); font-weight: 700; }
.chart-table { margin-top: var(--space-3); }
.chart-table summary { display: flex; align-items: center; min-height: 44px; color: var(--green-deep); font-weight: 700; cursor: pointer; }
.is-loading { opacity: 0.5; transition: opacity 120ms ease-out; }
.field-action { align-self: end; margin-bottom: var(--space-4); }
.table-actions { white-space: nowrap; }
.btn-line-danger { background: transparent; border-color: var(--error); color: var(--error); }
.btn-line-danger:hover { background: var(--error-soft); }
.table-check { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.table-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--green); }
.chart-wrap { min-width: 0; }

/* ---------- rider app and live tracking ---------- */
.rider-app .bottom-nav { grid-template-columns: repeat(2, 1fr); }
.rider-app .btn { min-height: 56px; font-size: 1.0625rem; }
.job-list { display: grid; gap: var(--space-3); }
.job-card {
  display: grid; gap: 4px; padding: var(--space-4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: inset 6px 0 0 var(--edge, var(--ink-muted));
  color: inherit; text-decoration: none;
}
.job-card:hover { background: #FFFDF8; }
.job-store { font-family: var(--font-display); font-weight: 700; font-size: var(--step-0); color: var(--ink); }
.job-next { font-weight: 700; font-size: var(--step-1); line-height: 1.2; }
.step-card {
  display: grid; gap: 4px; margin-bottom: var(--space-4); padding: var(--space-4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: inset 6px 0 0 var(--edge, var(--ink-muted));
}
.step-card b { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); color: var(--ink); }
.rider-card a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.code-form { margin-top: var(--space-4); }
.code-input {
  min-height: 64px; font-family: var(--font-display); font-weight: 800; font-size: 2rem;
  letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums;
}
.code-card {
  display: grid; justify-items: center; gap: 4px; margin-bottom: var(--space-4); padding: var(--space-4);
  border-radius: var(--radius-md); background: var(--green); color: var(--white); text-align: center;
}
.code-card > span { font-weight: 700; color: var(--green-soft); }
.code-card .code {
  font-family: var(--font-display); font-weight: 800; font-size: 2.5rem;
  letter-spacing: 0.3em; font-variant-numeric: tabular-nums;
}
.pickup-code { display: grid; gap: 2px; padding: var(--space-3); border-radius: var(--radius-md); background: var(--green-soft); }
.pickup-code b {
  font-family: var(--font-display); font-weight: 800; font-size: min(var(--step-3), 2.25rem);
  letter-spacing: 0.25em; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.location-line { margin: 0 0 var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--green-soft); font-weight: 700; color: var(--ink); }
.location-weak, .location-waiting, .location-error { background: var(--amber-soft); color: var(--ink); }
.location-blocked { background: var(--error-soft); color: var(--error); }
.live { margin-bottom: var(--space-4); }
.order-map { height: 260px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.pin-map { height: 300px; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.pin-marker span { display: block; box-sizing: border-box; width: 26px; height: 26px; margin: 7px; border: 4px solid var(--white); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px var(--ink), 0 2px 8px rgb(0 0 0 / 35%); }
/* ---------- customer front page and stores page ---------- */
/* Phone: a green hero under the awning, then the store types, the cuisines, the home screen band and the supplier link.
   From 640 px the types sit four across. From 900 px the page widens to 1120 px and the stores sit three across. */
body.is-home .appbar-inner, body.is-wide .appbar-inner { max-width: 1120px; }
body.is-home .phone { max-width: 1120px; padding-bottom: 0; }
body.is-wide .phone { max-width: 1120px; }
.landing-hero { margin-top: 14px; padding: var(--space-5) var(--space-4) var(--space-6); background: var(--green); color: var(--paper); }
.landing-hero :focus-visible, .landing-footer :focus-visible { outline-color: var(--paper); }
.hero-inner { display: grid; gap: var(--space-5); }
.hero-main { display: grid; gap: var(--space-4); align-content: start; }
.hero-location {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--green-deep);
}
.hero-location > .icon { width: 24px; height: 24px; color: var(--paper); }
.hero-kicker { display: block; font-size: var(--step--1); color: var(--green-soft); }
.hero-address { display: block; font-family: var(--font-display); font-weight: 700; color: var(--paper); overflow-wrap: anywhere; }
.hero-title { color: var(--paper); font-size: var(--step-2); line-height: 1.11; letter-spacing: -0.015em; text-wrap: balance; }
.hero-sub { margin: 0; max-width: 36ch; font-size: var(--step-0); color: var(--green-soft); }
/* The field is taller than the button, and the button stretches to match it */
.hero-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); margin: 0; }
.hero-search input { min-height: 56px; border-color: var(--white); background: var(--white); }
.hero-guest { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.btn-paper { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn-paper:hover { background: var(--white); border-color: var(--white); }
.btn-outline-paper { background: transparent; border-color: var(--paper); color: var(--paper); }
.btn-outline-paper:hover { background: rgba(255, 248, 238, 0.12); }

.landing-body { display: grid; gap: var(--space-6); padding: var(--space-6) var(--space-4) 0; }
.landing-section { display: grid; gap: var(--space-4); min-width: 0; }
a.chip { color: var(--ink); text-decoration: none; }

/* Store types as signboards: one row that scrolls sideways on a phone, two across from 640 px and three across from 900 px.
   On a phone the row runs to the screen edge, so the tiles keep the page margin at both ends. */
.type-tiles {
  display: flex; gap: var(--space-3); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
  margin: 0 calc(var(--space-4) * -1); padding: 4px var(--space-4) 8px;
}
.type-tiles::-webkit-scrollbar { display: none; }
.type-tile {
  flex: 0 0 10.5rem; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4);
  min-height: 9.5rem; padding: var(--space-4); border-radius: var(--radius-md);
  background: var(--tile-bg); color: var(--tile-fg); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); line-height: 1.2; overflow-wrap: anywhere;
}
.type-tile > .icon { width: 32px; height: 32px; }
.type-tile:hover { box-shadow: 0 0 0 3px var(--green-soft); }
.type-tile-skeleton { flex: 0 0 10.5rem; height: 9.5rem; margin: 0; border-radius: var(--radius-md); }
@media (min-width: 640px) {
  .type-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; }
  .type-tile, .type-tile-skeleton { min-height: 10.5rem; }
}
@media (min-width: 900px) {
  .type-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The home screen band: one quiet panel with the invitation and the install button */
.home-band { display: grid; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.home-band h2 { font-size: var(--step-1); }
.home-band p { margin: 0; color: var(--ink-muted); }
.home-band .btn { justify-self: start; }
@media (min-width: 640px) {
  .home-band { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); }
  .home-band .btn { justify-self: end; }
}

/* ---------- stores page ---------- */
.stores-page { display: grid; gap: var(--space-4); }
.delivery-bar {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface);
}
.delivery-bar > .icon { width: 24px; height: 24px; color: var(--green-deep); }
.delivery-kicker { display: block; font-size: var(--step--1); color: var(--ink-muted); }
.delivery-address { display: block; font-family: var(--font-display); font-weight: 700; overflow-wrap: anywhere; }
.stores-head { display: grid; gap: var(--space-1); margin-top: var(--space-2); }
/* The title takes focus after a row link, so screen readers announce the new results. The focus ring is not needed there. */
.stores-head h1:focus { outline: none; }
.stores-count { margin: 0; font-size: var(--step--1); color: var(--ink-muted); }

/* Store types as signboard pills, in one row that scrolls sideways. On a phone the row runs to the screen edge. */
.type-pills {
  display: flex; gap: var(--space-3); overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--space-4) * -1); padding: 4px var(--space-4) 8px;
}
.type-pills::-webkit-scrollbar { display: none; }
.type-pill {
  flex: none; display: grid; justify-items: center; gap: var(--space-2); width: 84px; padding: 0;
  border: 0; background: none; color: var(--ink); font-size: var(--step--1); font-weight: 600; line-height: 1.25; text-align: center;
}
.type-pill-sign {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--radius-md);
  background: var(--tile-bg); color: var(--tile-fg);
}
.type-pill-sign .icon { width: 28px; height: 28px; }
.type-pill:hover .type-pill-sign { box-shadow: 0 0 0 3px var(--green-soft); }
.type-pill[aria-pressed="true"] .type-pill-sign { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--green); }
.type-pill[aria-pressed="true"] > span:last-child { color: var(--green-deep); font-weight: 700; }
@media (min-width: 640px) { .type-pills { margin: 0; padding: 4px 0 8px; } }

/* Browsing rows: a heading with a View all link, then one row of stores that scrolls sideways */
.store-rows { display: grid; gap: var(--space-6); }
.store-row { display: grid; gap: var(--space-3); min-width: 0; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.row-head h2 { min-width: 0; overflow-wrap: anywhere; }
.row-head .btn-quiet { flex: none; }
.row-track {
  display: flex; gap: var(--space-4); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
  margin: 0 calc(var(--space-4) * -1); padding: 4px var(--space-4) 8px; scroll-padding-inline: var(--space-4);
}
.row-track::-webkit-scrollbar { display: none; }
.row-track > .store-card { flex: 0 0 min(280px, 74vw); scroll-snap-align: start; }
@media (min-width: 900px) {
  .row-track { margin: 0; padding: 4px 0 8px; scroll-padding-inline: 0; }
  .row-track > .store-card { flex-basis: 300px; }
}

/* ---------- store cards (the stores page and its grid) ---------- */
.store-grid { display: grid; gap: var(--space-6); }
@media (min-width: 640px) and (max-width: 899px) {
  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-4); }
}
.store-card { display: grid; align-content: start; gap: var(--space-3); min-width: 0; color: var(--ink); text-decoration: none; }
.store-card-cover {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--skeleton);
}
.store-card-cover img { display: block; width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
.store-card-cover .sign { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 0; font-size: 48px; }
.store-card:hover .store-card-cover { box-shadow: 0 0 0 3px var(--green); }
/* A closed store is quieter: its cover loses most of its colour, and the Closed pill and status line say so in words. */
.store-card.is-closed .store-card-cover img, .store-card.is-closed .store-card-cover .sign { filter: saturate(0.3) brightness(0.92); }
.store-card-closed {
  position: absolute; left: var(--space-3); bottom: var(--space-3); z-index: 1;
  padding: 4px 12px; border-radius: var(--radius-pill); background: var(--paper); color: var(--ink);
  font-size: var(--step--1); font-weight: 700;
}
.store-card-body { display: grid; gap: 4px; }
.store-card-type { font-size: var(--step--1); font-weight: 600; color: var(--ink-muted); }
.store-card-name { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); line-height: 1.2; }
.store-card-status, .store-card-facts { display: flex; flex-wrap: wrap; gap: 2px var(--space-3); font-size: var(--step--1); }
.store-card-facts { color: var(--ink-muted); }
.store-card-rating { color: var(--ink); }
.store-card-cuisine { font-size: var(--step--1); color: var(--ink-muted); }
.skeleton-card { height: auto; margin: 0; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); }

.partner-grid { display: grid; gap: var(--space-3); }
.partner p { margin: 0; }
.how-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--green-soft); color: var(--green-deep); }
.how-icon .icon { width: 26px; height: 26px; }
.partner { display: grid; gap: var(--space-4); align-items: center; padding: var(--space-5); border-radius: var(--radius-md); background: var(--green-soft); }
.partner-copy { display: grid; gap: var(--space-3); justify-items: start; }
.partner > .btn { justify-self: start; }
@media (min-width: 640px) {
  .partner { grid-template-columns: minmax(0, 1fr) auto; }
  .partner > .btn { justify-self: end; }
}
.partner h3 { font-size: var(--step-1); }

.landing-footer {
  display: grid; gap: var(--space-4); margin-top: var(--space-7);
  padding: var(--space-6) var(--space-4) calc(104px + env(safe-area-inset-bottom)); background: var(--green); color: var(--paper);
}
.landing-footer a { color: var(--paper); }
.footer-logo { width: auto; height: 36px; }
.footer-text, .footer-note { margin: 0; color: var(--paper); }
.footer-text { max-width: 44ch; }
.footer-note { font-size: var(--step--1); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

@media (min-width: 900px) {
  body.is-home .landing-hero { margin: 14px var(--space-4) 0; padding: var(--space-7) var(--space-7) var(--space-6); border-radius: var(--radius-lg); }
  .hero-title { font-size: clamp(2.25rem, 1.5rem + 2vw, 3.25rem); }
  .landing-body { gap: var(--space-7); padding: var(--space-7) var(--space-4) 0; }
  .store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); }
  /* The store page: photo beside the details, and the menu in two columns */
  .store-head { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; column-gap: var(--space-6); }
  .store-head > .back-link { grid-column: 1 / -1; }
  .store-head > .cover, .store-head > .sign-lg { height: auto; aspect-ratio: 4 / 3; }
  .menu-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-6); align-items: start; }
  .landing-footer { margin: var(--space-7) var(--space-4) 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

[hidden] { display: none !important; }
