/*
 * Three colours, each with one job:
 *   espresso — the frame: the header, the text, the tab you're on.
 *   caramel  — doing something: add, view the order, send it.
 *   herb     — what's yours: your table, your picks, what's in your order,
 *              what goes with it, and where your order is.
 * Everything else is paper and ink.
 */
:root {
  color-scheme: light;
  --bg: #f7f2eb;
  --surface: #ffffff;
  --surface-2: #f2ece4;
  --ink: #2a1c13;
  --muted: #786659;
  --line: #ebe2d7;
  --espresso: #2b1b11;
  --on-espresso: #fbf6f0;
  --caramel: #b0612c;
  --caramel-soft: #f6e8db;
  --on-caramel: #ffffff;
  --herb: #3e6b4f;
  --herb-soft: #e4eee6;
  --on-herb: #ffffff;
  --herb-bright: #86c99a;
  --danger: #b4372b;
  --nav: var(--espresso);
  --on-nav: var(--on-espresso);
  --shadow-sm: 0 1px 2px rgb(43 27 17 / 6%);
  --shadow-md: 0 4px 14px rgb(43 27 17 / 12%);
  --shadow-lg: 0 16px 40px rgb(43 27 17 / 24%);
  --radius: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #15110d;
    --surface: #1f1914;
    --surface-2: #2a221b;
    --ink: #f4ece3;
    --muted: #b4a698;
    --line: #342a21;
    --espresso: #0e0a07;
    --on-espresso: #f4ece3;
    --caramel: #e09a5f;
    --caramel-soft: #3b2b1e;
    --on-caramel: #22150c;
    --herb: #8fc9a1;
    --herb-soft: #1c2c22;
    --on-herb: #0e1f14;
    --danger: #f19a90;
    --nav: #f4ece3;
    --on-nav: #15110d;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-md: 0 4px 14px rgb(0 0 0 / 45%);
    --shadow-lg: 0 16px 40px rgb(0 0 0 / 60%);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Hidden means hidden, whatever display a class gives. */
[hidden] { display: none !important; }

html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: calc(120px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--caramel); outline-offset: 2px; }

.num { font-variant-numeric: tabular-nums; }

.icon { display: inline-grid; place-items: center; flex: none; }
.icon svg { width: 1em; height: 1em; fill: currentColor; }

/* The top: who and where */
.top {
  background: var(--espresso);
  color: var(--on-espresso);
  padding: calc(14px + env(safe-area-inset-top)) 16px 16px;
}

.top-inner { max-width: 960px; margin: 0 auto; display: grid; gap: 14px; }

.brand { display: flex; align-items: center; gap: 12px; }

.mark {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--herb);
  color: var(--on-herb);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

@media (prefers-color-scheme: dark) { .mark { background: var(--herb-soft); color: var(--herb); } }

.brand-text { flex: 1; min-width: 0; }

h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* An English name in the Arabic page keeps its own order. */
  unicode-bidi: plaintext;
  text-align: right;
}

[dir="ltr"] h1 { text-align: left; }

.where {
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: color-mix(in srgb, var(--on-espresso) 78%, transparent);
}

.where:empty { display: none; }

.where .dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--herb-bright);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--herb-bright) 25%, transparent);
}

.lang {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--on-espresso) 22%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--on-espresso) 8%, transparent);
  color: var(--on-espresso);
  font-weight: 700;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--on-espresso) 10%, transparent);
  color: var(--on-espresso);
  transition: background-color 0.2s ease-out;
}

.search:focus-within { background: color-mix(in srgb, var(--on-espresso) 16%, transparent); }
.search svg { width: 20px; height: 20px; fill: currentColor; opacity: 0.7; flex: none; }

.search input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  border: 0;
  background: transparent;
  font-size: 16px;
  outline: none;
}

.search input::placeholder { color: color-mix(in srgb, var(--on-espresso) 60%, transparent); }

/* Categories, always in reach */
.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s ease-out, color 0.2s ease-out, border-color 0.2s ease-out;
}

.tab[aria-current="true"] { background: var(--nav); border-color: var(--nav); color: var(--on-nav); }

main { max-width: 960px; margin: 0 auto; padding: 4px 16px 24px; }

.section { margin-top: 22px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 10px;
}

.section-title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.3; }
.section-count { color: var(--muted); font-size: 13px; font-weight: 600; }

/* The menu is a list: easier to read down, and a photo can't fill the screen. */
.list {
  display: grid;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 14px;
  padding-block: 14px;
  padding-inline: 16px 14px;
  background: var(--surface);
  cursor: pointer;
  transition: background-color 0.15s ease-out;
}

.item + .item { border-top: 1px solid var(--line); }
.item:active { background: var(--surface-2); }

/* The whole row opens the item; the + on the photo stays its own button. */
.item-open {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: start;
}

.item-open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.item-open:focus-visible { outline: none; }
.item-open:focus-visible::after { outline: 3px solid var(--caramel); outline-offset: -3px; }
.item-name, .item-sub { display: block; }

@media (hover: hover) {
  .item:hover { background: color-mix(in srgb, var(--surface) 94%, var(--caramel)); }
}

.item-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.item-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.price { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.price small { color: var(--muted); font-size: 13px; font-weight: 600; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px 1px 9px;
  border-radius: 999px;
  background: var(--herb-soft);
  color: var(--herb);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
}

.tag .icon { font-size: 13px; }

/* A tap on the photo falls through to the row; only the + catches its own. */
.media { position: relative; width: 92px; height: 92px; pointer-events: none; }
.media .add { pointer-events: auto; }

.thumb {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--caramel-soft);
}

/* Until the photo arrives, or if it never does: a cup or a plate. */
.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--caramel);
  opacity: 0.45;
  font-size: 34px;
}

.thumb img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.thumb img.loaded { opacity: 1; }

.add {
  position: absolute;
  bottom: -10px;
  inset-inline-end: -10px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  color: var(--caramel);
  font-size: 20px;
  isolation: isolate;
}

.add::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: -1;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease-out;
}

.add:active::before { transform: scale(0.9); }

.count {
  position: absolute;
  top: -7px;
  inset-inline-start: -7px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--herb);
  color: var(--on-herb);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 0 3px var(--surface);
}

.pop { animation: pop 0.32s var(--ease); }

@keyframes pop { 40% { transform: scale(1.25); } }

.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* While the menu loads */
.sk {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--line) 25%, var(--surface-2) 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}

.sk-text { display: grid; gap: 10px; }
.sk-line { height: 14px; width: 70%; }
.sk-line.short { width: 35%; }
.sk-thumb { width: 92px; height: 92px; border-radius: 14px; }

@keyframes shimmer { to { background-position: -200% 0; } }

/* The bottom: where the order is, and the order itself */
.dock {
  position: fixed;
  inset-inline: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 10;
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.dock > * { pointer-events: auto; }

.cart-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 18px;
  border: 0;
  border-radius: 18px;
  background: var(--caramel);
  color: var(--on-caramel);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--caramel) 45%, transparent);
  font-size: 17px;
  font-weight: 800;
  animation: rise 0.25s var(--ease);
}

.cart-bar .badge {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--on-caramel) 20%, transparent);
}

.cart-bar .label { flex: 1; text-align: start; }

.tracker {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--herb) 30%, transparent);
  border-radius: 999px;
  background: var(--herb-soft);
  color: var(--herb);
  box-shadow: var(--shadow-md);
  font-size: 14.5px;
  font-weight: 800;
  animation: rise 0.25s var(--ease);
}

.tracker .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  animation: breathe 1.6s ease-in-out infinite;
}

.tracker.ready { background: var(--herb); color: var(--on-herb); border-color: var(--herb); }

@keyframes breathe { 50% { opacity: 0.35; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }

/* Sheets: an item, the order, where it is */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgb(20 12 6 / 50%);
  animation: fade 0.2s ease-out;
}

@keyframes fade { from { opacity: 0; } }

.sheet {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 21;
  max-width: 600px;
  max-height: 92dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slide 0.3s var(--ease);
}

@keyframes slide { from { transform: translateY(100%); } }

.sheet:focus { outline: none; }

.sheet-scroll { overflow-y: auto; overscroll-behavior: contain; }

.sheet-photo {
  position: relative;
  aspect-ratio: 16 / 10;
  max-height: 34dvh;
  width: 100%;
  height: auto;
  border-radius: 0;
}

.close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 45%);
  color: #fff;
  font-size: 18px;
  backdrop-filter: blur(6px);
}

.close.plain { position: static; background: var(--surface-2); color: var(--ink); backdrop-filter: none; }

.sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 8px;
}

.sheet-head h2 { flex: 1; }
.sheet-head .muted { color: var(--muted); font-weight: 600; font-size: 14px; }

.sheet-body { padding: 16px 20px 24px; display: grid; gap: 22px; }

.sheet h2 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.3; }
.subtitle { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.lead { margin: 6px 0 0; font-size: 16px; }

.sheet-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

/* Choosing: a size, a milk, extras */
.group { display: grid; gap: 8px; min-width: 0; }

.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.group-title { margin: 0; font-size: 16px; font-weight: 800; }
.group-note { color: var(--muted); font-size: 13px; font-weight: 600; }

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease-out, background-color 0.15s ease-out;
}

.option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.option .tick {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--muted) 70%, transparent);
  border-radius: 50%;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out;
}

.option input[type="checkbox"] ~ .tick { border-radius: 7px; }

.option input:checked ~ .tick { border-color: var(--herb); background: var(--herb); }

.option input[type="radio"]:checked ~ .tick::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--on-herb);
}

.option input[type="checkbox"]:checked ~ .tick::after {
  content: "";
  width: 6px;
  height: 11px;
  margin-top: -2px;
  border: solid var(--on-herb);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.option input:focus-visible ~ .tick { outline: 3px solid var(--caramel); outline-offset: 2px; }

.option:has(input:checked) { border-color: var(--herb); background: var(--herb-soft); }

.option-name { flex: 1; font-weight: 700; line-height: 1.35; }
.option-price { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.option:has(input:checked) .option-price { color: var(--herb); }

.link {
  justify-self: start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--caramel);
  font-weight: 800;
}

.stepper {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 14px;
  background: var(--surface-2);
}

.stepper button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: var(--surface);
  font-size: 18px;
  box-shadow: var(--shadow-sm);
}

.stepper button:active { transform: scale(0.94); }
.stepper output { min-width: 30px; text-align: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }

.stepper.small button { width: 36px; height: 36px; font-size: 15px; }
.stepper.small output { min-width: 26px; font-size: 15px; }

/* Next to the add button: narrower, still a full finger tall. */
.sheet-foot .stepper button { width: 40px; }
.sheet-foot .stepper output { min-width: 26px; }

textarea, .field input, .field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 16px;
  resize: none;
}

textarea:focus, .field input:focus, .field select:focus { outline: 2px solid var(--caramel); outline-offset: 0; border-color: transparent; }

.field { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.fields { display: grid; gap: 14px; }

.primary {
  flex: 1;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  background: var(--caramel);
  color: var(--on-caramel);
  font-size: 16.5px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}

.primary:active { transform: scale(0.98); }
.primary.center { justify-content: center; }
.primary:disabled { opacity: 0.6; }

/* What goes with it */
.pair {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: var(--herb-soft);
}

.pair-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--herb);
  font-weight: 800;
}

.pair-title .icon { font-size: 18px; }
.pair-list { display: grid; gap: 8px; }

.mini {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 8px;
  padding-inline-end: 12px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: start;
}

.mini .thumb { width: 52px; height: 52px; flex: none; border-radius: 11px; }
.mini .ph { font-size: 22px; }
.mini-text { flex: 1; min-width: 0; display: grid; }
.mini-name { font-weight: 700; font-size: 14.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-price { color: var(--muted); font-size: 13px; font-weight: 600; }

.mini-plus {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--caramel);
  color: var(--on-caramel);
  font-size: 17px;
  transition: background-color 0.2s ease-out;
}

.mini.added .mini-plus { background: var(--herb); color: var(--on-herb); }

/* The order's lines */
.lines { display: grid; }

.line {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
}

.line + .line { border-top: 1px solid var(--line); }
.line .thumb { width: 56px; height: 56px; border-radius: 12px; }
.line .ph { font-size: 22px; }
.line-name { font-weight: 700; line-height: 1.3; }
.line-meta { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.line-note { color: var(--muted); font-size: 13px; font-style: italic; }
.line-end { display: grid; justify-items: end; gap: 6px; }

.totals { display: grid; gap: 4px; padding-top: 4px; border-top: 1px dashed var(--line); }
.totals .row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; }
.totals .row.total { font-weight: 800; font-size: 18px; }
.fine { margin: 0; color: var(--muted); font-size: 13px; }

.hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--herb-soft);
  color: var(--ink);
  font-size: 14.5px;
}

.hint .icon { color: var(--herb); font-size: 20px; margin-top: 1px; }

.error { color: var(--danger); font-weight: 700; margin: 0; }
.error:empty { display: none; }

/* Where the order is */
.status { text-align: center; padding: 28px 20px 8px; display: grid; gap: 6px; justify-items: center; }

.status-icon {
  width: 84px;
  height: 84px;
  margin-bottom: 6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--herb-soft);
  color: var(--herb);
  font-size: 38px;
}

.status-icon.waiting { background: var(--caramel-soft); color: var(--caramel); }
.status-icon.rejected { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.status h2 { font-size: 24px; }
.status p { margin: 0; color: var(--muted); }

.steps {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  width: 100%;
  max-width: 320px;
  display: grid;
}

.steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  text-align: start;
  color: var(--muted);
  font-weight: 700;
}

.steps li::before {
  content: "";
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: var(--surface);
}

/* The thread between the steps */
.steps li + li::after {
  content: "";
  position: absolute;
  inset-inline-start: 10px;
  bottom: calc(50% + 11px);
  width: 3px;
  height: calc(100% - 22px);
  background: var(--line);
}

.steps li.done { color: var(--ink); }
.steps li.done::before { border-color: var(--herb); background: var(--herb); }
.steps li.done + li::after,
.steps li.done + li.done::after { background: var(--herb); }
.steps li.now { color: var(--ink); }
.steps li.now::before { border-color: var(--herb); animation: pulse 1.4s ease-in-out infinite; }

@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--herb) 22%, transparent); } }

.summary {
  width: 100%;
  margin-top: 18px;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  border-radius: 16px;
  background: var(--surface-2);
  text-align: start;
  font-size: 14.5px;
}

.summary .row { display: flex; justify-content: space-between; gap: 12px; }
.summary .row.total { padding-top: 8px; border-top: 1px dashed var(--line); font-weight: 800; }

.toast {
  position: fixed;
  inset-inline: 0;
  top: calc(12px + env(safe-area-inset-top));
  z-index: 30;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--herb);
  color: var(--on-herb);
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  animation: drop 0.25s var(--ease);
}

.toast .icon { font-size: 18px; }

@keyframes drop { from { transform: translateY(-16px); opacity: 0; } }

.notice { max-width: 420px; margin: 64px auto; text-align: center; }
.notice .icon { font-size: 52px; }
.notice h2 { margin: 8px 0; font-size: 22px; }
.notice p { color: var(--muted); }

/* A wider screen: the list becomes cards side by side. */
@media (min-width: 720px) {
  .list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .item,
  .item + .item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
  }

  .sheet { bottom: 24px; border-radius: 24px; max-height: calc(100dvh - 48px); }
  .sheet-foot { padding-bottom: 16px; }
}

@media (min-width: 1080px) { .list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* A tablet on the counter */
.kiosk { font-size: 18px; }
.kiosk h1 { font-size: 30px; }
.kiosk .item { grid-template-columns: minmax(0, 1fr) 120px; }
.kiosk .media { width: 120px; height: 120px; }
.kiosk .item-name { font-size: 19px; }
.kiosk .price { font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
