/* Ordering gateway pages: the same look as the restaurant's guest app (Bognor's ocean palette: navy, blue, aqua,
   sky, ice; glass cards; round blue buttons; Georgia headings), standalone so the gateway deploys alone.
   The variable names are kept from the first design so every rule below follows the new colours. */
:root {
  color-scheme: light;
  --deep: #03045e;      /* navy */
  --green: #0077b6;     /* blue: primary actions, headings accents */
  --cream: #caf0f8;     /* ice */
  --paper: rgba(255, 255, 255, .82);
  --ink: #03045e;
  --muted: #3d5a80;
  --line: #cde9f2;
  --brass: #00b4d8;     /* aqua */
  --rust: #0077b6;
  --alert: #b42318;
  --ok: #027a48;
  --shadow: 0 10px 30px rgba(3, 4, 94, .12);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #caf0f8 0%, #90e0ef 100%) fixed;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: transparent; overflow-wrap: anywhere; }
a { color: var(--green); text-underline-offset: .22em; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 700; margin: 0; color: var(--deep); }
h1 { font-size: clamp(2rem, 8vw, 3.2rem); line-height: 1.05; letter-spacing: -.02em; }
h2 { font-size: clamp(1.35rem, 5vw, 1.75rem); line-height: 1.15; }
h3 { font-size: 1.15rem; line-height: 1.25; }
p { margin: 0; }

.top { display: flex; align-items: center; gap: .75rem; padding: .8rem 16px; color: #fff6e4; background: var(--deep); border-bottom: 1px solid #45605a; }
.mark { width: 2.4rem; height: 2.4rem; flex: 0 0 2.4rem; display: grid; place-items: center; border: 1px solid var(--brass); border-radius: 50%;
  color: var(--brass); font: 1.4rem/1 Georgia, serif; }
.top .name { font: 1.1rem/1.2 Georgia, serif; }
.top .sub { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: #cdd8cf; }

main { width: min(44rem, 100%); margin: 0 auto; padding: 1rem 16px 7rem; display: grid; gap: 1rem; }
main:focus { outline: none; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: .85rem; padding: 1.1rem 1rem; display: grid; gap: .8rem; min-width: 0; }
.hero { background: var(--green); color: #fff6e4; border-color: var(--green); padding: 1.5rem 1.1rem; }
.hero h1 { color: #fff6e4; }
.eyebrow { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--rust); }
.hero .eyebrow { color: var(--brass); }
.muted { color: var(--muted); font-size: .9rem; }
.hero .muted { color: #d6e0d8; }
.step-title { display: flex; align-items: baseline; gap: .5rem; }
.step-title span { font: .8rem/1 system-ui, sans-serif; color: var(--muted); }

button, .button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1.1rem;
  border: 1px solid #a4afa2; border-radius: 2rem; background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; font-weight: 650; }
button:disabled { opacity: .55; cursor: default; }
.primary { background: var(--green); border-color: var(--green); color: #fff9ed; }
.quiet { background: transparent; }

/* Menu: see "Menu as the guest app" at the end. */
.stepper { display: inline-flex; align-items: center; gap: .25rem; }
.stepper button { width: 44px; padding: 0; font-size: 1.25rem; line-height: 1; }
.stepper output { min-width: 1.6rem; text-align: center; font-weight: 700; }

/* Forms */
.field { display: grid; gap: .3rem; }
.field label, .legend { font-weight: 600; }
input[type=text], input[type=tel], input[type=email], select { width: 100%; min-height: 44px; padding: .55rem .7rem; border: 1px solid #a9b2a5;
  border-radius: .55rem; background: #fff; }
/* Red only after the customer has touched a field and it is wrong, never on an empty form. */
input:user-invalid { border-color: var(--alert); }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: .55rem; min-width: 0; }
.choice { display: flex; gap: .65rem; align-items: flex-start; padding: .75rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; cursor: pointer; }
.choice input { margin-top: .3rem; width: 1.15rem; height: 1.15rem; flex: none; accent-color: var(--green); }
.choice strong { display: block; }

/* Sticky basket bar */
.basket { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--paper); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px #2a24180f; padding: .7rem 16px calc(.7rem + env(safe-area-inset-bottom)); }
.basket-inner { width: min(44rem, 100%); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.basket-total { font-weight: 700; }
.basket-count { color: var(--muted); font-size: .85rem; }

.error { color: var(--alert); font-weight: 600; }
.error:empty { display: none; }
.notice { border-left: 4px solid var(--rust); }
.notice.good { border-left-color: var(--ok); }
.notice.bad { border-left-color: var(--alert); }

/* Tracking */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.steps li { position: relative; display: flex; align-items: center; gap: .7rem; padding: .45rem 0; color: var(--muted); }
.steps li::before { content: ""; width: 1.05rem; height: 1.05rem; flex: none; border-radius: 50%; border: 2px solid #b8bfb2; background: var(--paper); }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--green); border-color: var(--green); }
.steps li.current { color: var(--ink); font-weight: 700; }
.steps li.current::before { border-color: var(--green); box-shadow: 0 0 0 4px #14403533; }
.code { font: 700 2.4rem/1 Georgia, serif; letter-spacing: .18em; color: var(--green); }
.lines { width: 100%; border-collapse: collapse; }
.lines td { padding: .45rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines td.num { text-align: right; white-space: nowrap; padding-left: .75rem; }
.lines .allergy { display: block; font-size: .85rem; color: var(--rust); }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .3rem 1rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

/* Delivery */
.legend .h2 { display: block; margin-bottom: .2rem; font: 400 clamp(1.35rem, 5vw, 1.75rem)/1.15 Georgia, "Times New Roman", serif; color: var(--green); }
.notice-inline { padding: .6rem .75rem; border-radius: .55rem; background: #fbe9c8; color: #4a2d0c; font-weight: 600; }
.summary dd { text-align: right; }
.summary .strong { font-weight: 700; color: var(--ink); border-top: 1px solid var(--line); padding-top: .3rem; }
.address { font-style: normal; }
.total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Test payment page */
.test-banner { background: #fbe9c8; color: #4a2d0c; border: 1px dashed var(--rust); border-radius: .65rem; padding: .7rem .9rem; font-weight: 600; }
.amount { font: 2.4rem/1.1 Georgia, serif; color: var(--green); }

@media (min-width: 40rem) {
  main { padding-top: 1.5rem; }
  .panel { padding: 1.4rem 1.5rem; }
  .hero { padding: 2rem 1.6rem; }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: box-shadow .15s ease; }
}

/* Accounts (optional) */
.top-link { margin-left: auto; color: #fff6e4; font-size: .9rem; padding: .5rem .2rem; min-height: 44px; display: inline-flex; align-items: center; }
.heart { width: 44px; min-width: 44px; padding: 0; border-color: transparent; background: transparent; color: var(--rust); font-size: 1.25rem; }
.heart[aria-pressed=true] { color: var(--alert); }
.check { display: flex; gap: .6rem; align-items: center; min-height: 44px; cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--green); }
.plain-list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-row > div:first-child { min-width: 0; }
.row-end { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .3rem .9rem; flex: none; max-width: 50%; }
.order-row .row-end a { min-height: 44px; display: inline-flex; align-items: center; }
.strong { font-weight: 700; }
.section-nav { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-top: .4rem; }
.section-nav a { color: #fff6e4; min-height: 44px; display: inline-flex; align-items: center; }
.search-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.search-grid .field:nth-child(3), .search-grid .actions { grid-column: 1 / -1; }
input[type=date], input[type=search] { width: 100%; min-height: 44px; padding: .55rem .7rem; border: 1px solid #a9b2a5; border-radius: .55rem; background: #fff; }
.danger { background: var(--alert); border-color: var(--alert); color: #fff9ed; }
.status-line { color: var(--ok); font-weight: 600; }
.status-line:empty { display: none; }

/* Receipts */
.receipt { display: grid; gap: .6rem; }
.receipt-head h2 { margin-bottom: .2rem; }
.receipt-lines th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .35rem 0; border-bottom: 1px solid var(--line); }
.receipt-lines th.num { text-align: right; }
.receipt-totals dd, .receipt .facts dd { text-align: right; }
.receipt .facts .strong { border-top: 1px solid var(--ink); padding-top: .3rem; }
.receipt-notice { border-top: 1px dashed var(--line); padding-top: .5rem; }

@media print {
  body { background: #fff; }
  .top, .basket, .no-print, .section-nav { display: none !important; }
  /* On a page with a receipt, print only the receipt. */
  main:has(.receipt-panel) > :not(.receipt-panel) { display: none !important; }
  main { padding: 0; width: 100%; }
  .panel { border: 0; padding: 0; }
}

/* Offers and rewards */
.inline-field { display: flex; gap: .5rem; }
.inline-field input { flex: 1 1 auto; min-width: 0; }
.inline-field button { flex: none; white-space: nowrap; }
.offers-list li { padding: .25rem 0; }
.discount { color: var(--ok); }
.points { font: 400 1.1rem/1.2 Georgia, serif; color: var(--green); }
.points-balance { font-size: 2.4rem; }

/* Ocean look, matching the guest app (2026-11-16). */
.top { color: var(--deep); background: rgba(255, 255, 255, .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .85); }
.mark { border-color: var(--green); color: var(--green); background: #fff; font-weight: 700; }
.top .name { color: var(--deep); font-weight: 700; }
.top .sub, .top-link, .section-nav a { color: var(--muted); }
.panel { background: var(--paper); border: 1px solid rgba(255, 255, 255, .9); border-radius: 24px; box-shadow: var(--shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hero { background: linear-gradient(135deg, #03045e 0%, #0077b6 100%); border-color: transparent; color: #fff; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: #90e0ef; }
.hero .muted { color: #e6f6fb; }
button, .button { border-color: #b9dcea; background: #fff; color: var(--deep); }
.primary { background: var(--green); border-color: var(--green); color: #fff; box-shadow: var(--shadow); }
.stepper button { border-color: #9ccfe3; color: var(--green); font-weight: 800; }
.stepper button:not(:disabled):last-child { background: var(--green); border-color: var(--green); color: #fff; }
.choice { border-radius: 16px; border-color: var(--line); }
input[type=text], input[type=tel], input[type=email], input[type=date], input[type=search], select { border-color: #9ccfe3; border-radius: 14px; }
.basket { background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid #cde9f2; box-shadow: 0 -8px 24px rgba(3, 4, 94, .08); }
.basket .primary { min-height: 52px; padding: 0 1.6rem; font-size: 1.05rem; }
.lines .allergy { color: var(--alert); }
.notice-inline, .test-banner { background: #e6f6fb; color: var(--deep); }
.test-banner { border-color: var(--green); }
.steps li.current::before { box-shadow: 0 0 0 4px rgba(0, 119, 182, .25); }
.code, .amount, .points { color: var(--green); }
@media print { body { background: #fff; } }

/* Dish options (the restaurant's modifiers): a panel under the dish, one basket line per choice. */
.choose { min-width: 92px; padding: .5rem 1rem; }
.options-panel { display: grid; gap: .9rem; padding: .9rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .92); min-width: 0; }
.option-group legend { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .55rem; padding: 0; margin-bottom: .45rem; font-weight: 700; }
.option-rule { font-size: .85rem; font-weight: 400; color: var(--muted); }
.option-rule.required { color: var(--green); font-weight: 650; }
.choice.option { align-items: center; min-height: 48px; padding: .55rem .75rem; }
.choice.option input { margin-top: 0; }
.option-name { flex: 1 1 auto; min-width: 0; }
.option-price { flex: none; white-space: nowrap; font-weight: 650; color: var(--muted); }
.choice.option:has(input:checked) { border-color: var(--green); background: #e6f6fb; }
.choice.option:has(input:disabled) { opacity: .55; cursor: default; }
.options-qty { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.option-hint { font-size: .9rem; font-weight: 600; color: var(--muted); }
.option-hint:empty { display: none; }
.options-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.options-actions .primary { flex: 1 1 12rem; min-height: 52px; font-size: 1.05rem; }
.option-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.option-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .75rem; align-items: center; padding: .6rem .75rem; border-radius: 14px; background: #e6f6fb; }
.option-line .note { grid-column: 1 / -1; }
.option-summary { font-weight: 600; }
.lines .option-list { display: block; font-size: .85rem; color: var(--muted); }

/* Menu as the guest app (2026-11-16): meal tabs, then the groups as big tiles (a drawing on a colour: the gateway has
   no photos, so nothing poses as the dish), then a group's dishes as clear rows: name, what is in it, price, round +. */
.menu { display: grid; gap: .8rem; min-width: 0; scroll-margin-top: .75rem; }
.menu > h2 { padding: 0 .25rem; }
.menu-body { display: grid; gap: .8rem; min-width: 0; }
.icon { width: 1.45em; height: 1.45em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.meals { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.meal { min-height: 52px; padding: 6px 4px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .62);
  font-size: .9rem; line-height: 1.1; text-align: center; white-space: normal; overflow-wrap: normal; word-break: keep-all; hyphens: none; }
@media (max-width: 420px) { .meal { font-size: .8rem; padding: 6px 2px; letter-spacing: -.01em; } }
.meal[aria-pressed=true] { background: var(--green); border-color: var(--green); color: #fff; box-shadow: var(--shadow); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tiles.many { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; padding: 14px 10px;
  border-radius: 24px; border: 1px solid rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .62); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); text-align: center; font-weight: 400; }
.tile-art { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; color: rgba(255, 255, 255, .95); }
.tile-art .icon { width: 38px; height: 38px; stroke-width: 1.6; }
.art-0 { background: linear-gradient(135deg, #0077b6, #48cae4); }
.art-1 { background: linear-gradient(135deg, #03045e, #0077b6); }
.art-2 { background: linear-gradient(135deg, #0096c7, #90e0ef); }
.art-3 { background: linear-gradient(135deg, #00b4d8, #48cae4); }
.tile-name { font: 700 1.05rem/1.2 Georgia, "Times New Roman", serif; color: var(--deep); overflow-wrap: anywhere; }
.tile small { color: var(--muted); font-size: .82rem; line-height: 1.2; }
.tile-count { position: absolute; top: 8px; right: 8px; max-width: calc(100% - 16px); padding: 2px 8px; border-radius: 999px; background: var(--green);
  color: #fff; font-size: .72rem; font-weight: 700; line-height: 1.5; }
.tiles.many .tile { min-height: 124px; padding: 10px 6px; gap: 4px; border-radius: 20px; }
.tiles.many .tile-art { width: 48px; height: 48px; border-radius: 16px; }
.tiles.many .tile-art .icon { width: 28px; height: 28px; }
.tiles.many .tile-name { font-size: .92rem; }
.tiles.many .tile small { font-size: .74rem; }
.tiles.many .tile-count { position: static; order: -1; padding: 0 6px; }
.crumb { justify-self: start; display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 44px; padding: 0 16px 0 8px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .75); font-weight: 700; color: var(--deep); }
.crumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dishes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dish { display: grid; gap: .55rem; min-width: 0; padding: 10px 10px 10px 14px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .78); box-shadow: 0 4px 14px rgba(3, 4, 94, .06); }
.dish:has(.option-line) { border-color: var(--green); }
.dish-top { display: flex; align-items: center; gap: 10px; min-height: 56px; min-width: 0; }
.dish-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.dish-name { font: 700 1.02rem/1.2 Georgia, "Times New Roman", serif; color: var(--deep); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-about { font-size: .85rem; color: #2b3a67; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Allergens: one quiet line on the row; amber when not filled in (ask the restaurant). */
.dish-allergens { font-size: .8rem; font-weight: 600; color: #2b3a67; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dish-allergens.unknown { color: #7a5200; font-weight: 500; }
.dish-allergen-info { padding: .55rem .7rem; border-radius: 12px; background: #fff6dc; }
.dish-allergen-info .dish-allergens { white-space: normal; font-size: .9rem; }
.dish-allergen-note { font-size: .85rem; color: #4a3c00; }
.dish-end { flex: none; display: flex; align-items: center; gap: 10px; }
.dish-end .dish-price { font-weight: 700; font-size: 1.02rem; color: var(--deep); white-space: nowrap; }
.dish-price { color: var(--muted); font-size: .92rem; }
.round { width: 48px; min-width: 48px; min-height: 48px; height: 48px; padding: 0; border-radius: 50%; background: var(--green); border-color: var(--green); color: #fff; box-shadow: var(--shadow); }
.round .icon { width: 24px; height: 24px; stroke-width: 2.6; }
.stepper .round { width: 44px; min-width: 44px; height: 44px; min-height: 44px; box-shadow: none; }
.dish .heart { margin-left: -8px; }
.plain-line .option-summary { color: var(--green); }
@media (max-width: 380px) {
  .dish { padding-left: 12px; }
  .dish-end { gap: 8px; }
  .choose { min-width: 0; padding: .5rem .85rem; }
}
