/* The customer ordering page. Colors are custom properties; /assets/theme.css (loaded after this file) overrides the defaults per restaurant. */
:root {
  --accent: #b3261e;
  --accent-dark: #7f1a14;
  --ink: #26201b;
  --paper: #f4ede2;
  --surface: #fffdf8;
  --hero: #2a1d14;
  --hero-ink: #e8b04a;
  --highlight: #e0a040;
  --highlight-ink: #2a1d14;
  --on-accent: #fff;
  --muted: #6b6259;
  --line: #e4dccd;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 14px rgb(0 0 0 / 5%);
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@supports (color: color-mix(in srgb, red, blue)) {
  :root {
    --muted: color-mix(in srgb, var(--ink) 66%, var(--paper));
    --line: color-mix(in srgb, var(--ink) 14%, var(--paper));
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); padding-bottom: 6rem; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0; font-weight: 700; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hero :focus-visible, .bar :focus-visible { outline-color: var(--highlight); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
/* The bot trap: off screen for people (and screen readers), still a field for form-filling bots. */
.trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 70rem; margin: 0 auto; padding: 0 1rem; }
.skip { position: absolute; left: .5rem; top: -4rem; background: var(--surface); color: var(--ink); padding: .6rem 1rem; border-radius: .5rem; z-index: 50; }
.skip:focus { top: .5rem; }

/* ---------------------------------------------------------------- hero */
.hero { background: var(--hero); color: var(--paper); padding: 1.25rem 0 1.35rem; }
.hero-in { display: flex; gap: 1rem; align-items: center; }
.logo { flex: none; width: 5.25rem; height: 5.25rem; object-fit: contain; border-radius: 12px; }
.logo.wide { width: 8rem; height: 5.25rem; border-radius: 12px; }
.hero-text { min-width: 0; }
.hero h1 { font-size: clamp(1.55rem, 5.5vw, 2.5rem); color: var(--hero-ink); letter-spacing: .005em; }
.tagline { margin-top: .3rem; font-size: 1.02rem; opacity: .95; }
.contact { margin-top: .25rem; font-size: .95rem; opacity: .9; }
.contact a { color: inherit; text-underline-offset: 3px; }
.pills { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .75rem; border-radius: 999px; font-weight: 700; font-size: .85rem; background: var(--highlight); color: var(--highlight-ink); }
.pill::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.pill.off { background: rgb(255 255 255 / 16%); color: var(--paper); }
.pill.off::before { background: #f0b3a8; }
.pill-quiet { background: transparent; color: var(--paper); border: 1px solid rgb(255 255 255 / 35%); font-weight: 600; }
.pill-quiet::before { display: none; }
.announcement { background: var(--highlight); color: var(--highlight-ink); text-align: center; padding: .6rem 1rem; font-weight: 600; }

/* ---------------------------------------------------------------- category tabs */
.tabs { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 2px 6px rgb(0 0 0 / 4%); }
.tabs ul { position: relative; display: flex; gap: .5rem; list-style: none; margin: 0 auto; padding-top: .65rem; padding-bottom: .65rem; overflow-x: auto; scrollbar-width: none; }
.tabs ul::-webkit-scrollbar { display: none; }
.tabs a { display: block; white-space: nowrap; padding: .45rem .95rem; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 650; font-size: .95rem; background: var(--surface); border: 1px solid var(--line); }
.tabs a:hover { border-color: var(--ink); }
/* a computer can't swipe: the category bar gets ‹ › at its ends (storefront.js scrollArrows), the topping tabs wrap */
.strip-arrow { display: none; }
@media (hover: hover) and (pointer: fine) {
  .strip-arrow { display: grid; place-items: center; position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 2.2rem; height: 2.2rem; padding: 0 0 .15rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgb(0 0 0 / 18%); }
  .strip-arrow:hover { border-color: var(--ink); }
  .strip-arrow[hidden] { display: none; }
  .kind-tabs { flex-wrap: wrap; overflow: visible; }
}
.tabs a[aria-current="true"] { background: var(--highlight); color: var(--highlight-ink); border-color: var(--highlight); }

/* ---------------------------------------------------------------- menu */
main { padding-top: 1rem; }
.notice { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: .8rem 1rem; border-radius: var(--radius); margin: 1rem 0; }
.section { padding-top: .6rem; }
.section h2 { font-size: 1.6rem; margin: 1.1rem 0 .7rem; }
.grid { display: grid; gap: .75rem; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 0; }
@media (min-width: 36rem) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 56rem) { .grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
.card { display: flex; flex-direction: column; gap: .35rem; width: 100%; height: 100%; text-align: left; padding: 1rem 1.05rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card.soldout { opacity: .55; }
.card-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(var(--radius) - 4px); margin-bottom: .25rem; background: var(--line); }
.card.soldout .card-price { font-weight: 700; }
.kitchen-note { margin: .25rem 0 .5rem; color: var(--ink); }
.card-name { font-weight: 700; font-size: 1.05rem; }
.card-desc { color: var(--muted); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { margin-top: auto; padding-top: .35rem; font-weight: 700; }

.info { margin: 2.5rem 0 1rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.info h2 { font-size: 1.35rem; margin-bottom: .5rem; }
.hours { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1.5rem; margin: .8rem 0 0; }
.hours dt { font-weight: 600; } .hours dd { margin: 0; }
.hours .today { color: var(--accent); font-weight: 800; }

/* "Add to home screen" bar: at the top of the page, never inside the installed app */
.install { background: var(--surface); border-bottom: 1px solid var(--line); }
.install-in { display: flex; align-items: center; gap: .75rem; padding-top: .5rem; padding-bottom: .5rem; }
.install-in p { flex: 1; font-size: .9rem; }
.install-btn { border: 0; border-radius: 999px; padding: .4rem 1rem; font-weight: 700; background: var(--accent); color: var(--on-accent); }
.install .icon-btn { width: 2rem; height: 2rem; font-size: 1.2rem; }

/* ---------------------------------------------------------------- buttons */
.primary { background: var(--accent); color: var(--on-accent); border: 0; border-radius: 12px; padding: .7rem 1.2rem; font-weight: 700; }
.primary:hover:not(:disabled) { background: var(--accent-dark); }
.primary:disabled { opacity: .5; cursor: not-allowed; }
.big { min-height: 3.1rem; font-size: 1.05rem; }
.icon-btn { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 1.5rem; line-height: 1; display: grid; place-items: center; flex: none; }
.icon-btn:hover { border-color: var(--ink); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.stepper button { width: 2.6rem; height: 2.6rem; border: 0; background: transparent; font-size: 1.3rem; border-radius: 50%; }
.stepper output { min-width: 1.6rem; text-align: center; font-weight: 700; }
.stepper.small button { width: 2.1rem; height: 2.1rem; font-size: 1.1rem; }

/* ---------------------------------------------------------------- the order bar */
.bar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); pointer-events: none; display: flex; justify-content: center; }
.bar-btn { pointer-events: auto; width: 100%; max-width: 34rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1.1rem; border: 0; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 1.05rem; box-shadow: 0 6px 20px rgb(0 0 0 / 28%); }
.bar-btn:hover { background: var(--accent-dark); }
.bar-count { display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.9rem; padding: 0 .4rem; border-radius: 999px; background: var(--highlight); color: var(--highlight-ink); font-size: .95rem; }
.bar-label { flex: 1; text-align: left; }

/* ---------------------------------------------------------------- dialogs: a sheet on phones, centered or a drawer on wide screens */
dialog.sheet { border: 0; padding: 0; background: var(--surface); color: var(--ink); width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; overflow: hidden; box-shadow: 0 -8px 40px rgb(0 0 0 / 30%); }
dialog.sheet[open] { display: flex; }
dialog.sheet::backdrop { background: rgb(20 12 6 / 55%); }
.sheet-in { display: flex; flex-direction: column; width: 100%; min-height: 0; max-height: 92dvh; margin: 0; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem .6rem; }
.sheet-head h2 { font-size: 1.5rem; }
.sheet-body { overflow-y: auto; padding: 0 1.25rem 1rem; flex: 1; min-height: 0; overscroll-behavior: contain; }
.sheet-foot { padding: .85rem 1.25rem calc(.85rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.foot-row { display: flex; gap: .75rem; align-items: center; }
/* phones: a sheet that slides up, with a grab bar; pulled down, it follows the finger (storefront.js swipeToClose) */
.sheet-grab { display: none; }
@media (max-width: 39.99rem) {
  dialog.sheet { max-height: 88dvh; transition: transform .18s ease-out; }
  dialog.sheet .sheet-in { max-height: 88dvh; }
  dialog.sheet.dragging { transition: none; }
  dialog.sheet[open] { animation: sheet-up .22s ease-out; }
  .sheet-grab { display: block; flex: none; width: 2.6rem; height: 5px; margin: .55rem auto -.35rem; border-radius: 999px; background: var(--line); }
  .sheet-head { touch-action: none; }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.foot-row .primary { flex: 1; }
@media (min-width: 40rem) {
  dialog.sheet { width: 34rem; margin: auto; border-radius: 20px; }
  dialog.drawer { width: 28rem; max-height: 100dvh; height: 100dvh; margin: 0 0 0 auto; border-radius: 20px 0 0 20px; }
  dialog.drawer .sheet-in { max-height: 100dvh; height: 100%; }
  .sheet-in { max-height: 90dvh; }
}
.p-desc { color: var(--muted); margin-bottom: .9rem; }
.group { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 .9rem; padding: .2rem .9rem .35rem; background: var(--paper); min-width: 0; }
.group legend { padding: 0 .4rem; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .45rem; }
.badge { font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; white-space: nowrap; }
.badge-req { background: color-mix(in srgb, var(--accent) 14%, var(--paper)); color: var(--accent-dark); }
.badge-opt { background: var(--line); color: var(--muted); }
.choice { display: flex; align-items: center; gap: .7rem; padding: .62rem .1rem; border-top: 1px solid var(--line); cursor: pointer; }
.choice:first-child { border-top: 0; }
.choice input { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--accent); flex: none; }
.choice .nm { flex: 1; }
.choice .pr { color: var(--muted); white-space: nowrap; }
.choice.disabled { opacity: .5; cursor: not-allowed; }
/* the size once picked: one quiet line, tap to change */
.group.folded { padding-block: .1rem .1rem; }
.size-picked { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .55rem .1rem; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.size-picked .nm { flex: 1; font-weight: 600; }
.size-picked .pr { color: var(--muted); white-space: nowrap; }
.size-picked .chg { color: var(--accent-dark); font-weight: 700; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; }
.group-count { display: block; padding: 0 .1rem .3rem; font-size: .85rem; color: var(--muted); }
.form-error { color: #9b1c1c; background: #fdecea; border-radius: 10px; padding: .55rem .8rem; margin-bottom: .6rem; font-weight: 600; }

/* ---------------------------------------------------------------- the cart */
.lines { list-style: none; padding: 0; margin: 0 0 .6rem; }
.lines li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.lines .nm { font-weight: 700; }
.lines .opts { grid-column: 1; color: var(--muted); font-size: .9rem; }
.lines .amt { font-weight: 700; text-align: right; }
.lines .ctl { grid-column: 1 / -1; display: flex; align-items: center; gap: .8rem; }
.linklike { background: none; border: 0; color: var(--accent); text-decoration: underline; padding: .3rem; font-size: .9rem; }
.row { display: flex; justify-content: space-between; }
.total-row { font-weight: 800; font-size: 1.1rem; padding: .6rem 0 .2rem; }
#checkout { margin-top: 1rem; }
#checkout label { display: block; font-weight: 650; margin: .8rem 0 .25rem; }
#checkout input, #checkout textarea, #checkout select { width: 100%; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
#checkout input:focus-visible, #checkout textarea:focus-visible, #checkout select:focus-visible { outline-offset: 0; }
#place { width: 100%; margin-top: 1rem; }

/* ---------------------------------------------------------------- order placed */
.done { text-align: center; padding: 2rem 1rem 3rem; max-width: 32rem; margin: 0 auto; }
.done h2 { font-size: 2rem; margin-bottom: .6rem; }
.done .ref { font-family: var(--serif); font-size: 3.2rem; letter-spacing: .12em; color: var(--accent); margin: .6rem 0; }
.done .status { font-weight: 700; font-size: 1.1rem; margin-top: 1rem; }
.done .pickup-at { font-weight: 700; font-size: 1.25rem; margin: .4rem 0 .8rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (max-width: 30rem) {
  .hero { padding: 1rem 0 1.1rem; }
  .hero-in { gap: .75rem; }
  .logo.wide { width: 5.5rem; height: 4rem; }
  .logo { width: 4rem; height: 4rem; }
  .tagline { font-size: .9rem; margin-top: .2rem; }
  .contact { font-size: .82rem; }
  .pills { gap: .35rem; margin-top: .55rem; }
  .pill { font-size: .75rem; padding: .12rem .55rem; }
  .pill::before { width: .4rem; height: .4rem; }
}

/* Curbside pickup: the choice at checkout and the "I'm here" box on the order page. */
.handoff { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 12px; margin: 12px 0 0; }
.handoff legend { font-weight: 700; padding: 0 4px; }
#checkout .handoff .choice { display: flex; gap: 10px; align-items: center; font-weight: 550; margin: 8px 0; }
#checkout .handoff .choice input { width: 1.2rem; height: 1.2rem; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }
/* The demo card (docs/specs/demo-card.md): a choice like curbside, and a box that says DEMO in plain sight. */
.paywith { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 12px; margin: 12px 0 0; }
.paywith legend { font-weight: 700; padding: 0 4px; }
#checkout .paywith .choice { display: flex; gap: 10px; align-items: center; font-weight: 550; margin: 8px 0; }
#checkout .paywith .choice input { width: 1.2rem; height: 1.2rem; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }
.demo-badge { display: inline-block; border: 2px dashed currentColor; border-radius: 6px; padding: 0 .4rem; font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.demo-card { border: 2px dashed var(--line); border-radius: 10px; padding: .6rem .8rem; margin-top: .4rem; background: var(--surface); }
.demo-card p { margin: .4rem 0 0; }
.curbside { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 8px; text-align: left; }
.curbside h3 { font-size: 1.15rem; }
.curbside input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.curbside .spot-label { font-weight: 700; }
.curbside .spots { display: flex; flex-wrap: wrap; gap: 8px; }
.curbside .spot { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; }
.curbside .spot[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* The header's links (reserve, waitlist) and the compact header shown after the big one scrolls away (docs/specs/storefront-header.md). */
/* the other pages: one quiet line of text links ("Gift cards · Reserve · Waitlist · Last order"), not a row of buttons */
.hero-links { display: flex; flex-wrap: wrap; align-items: center; column-gap: .55rem; row-gap: .2rem; margin-top: .7rem; font-size: .9rem; }
.hero-link { color: var(--paper); opacity: .9; text-decoration: underline; text-decoration-color: rgb(255 255 255 / 35%); text-underline-offset: 3px; font-weight: 600; white-space: nowrap; padding: .35rem 0; }
.hero-link + .hero-link::before { content: "·"; display: inline-block; margin-right: .55rem; opacity: .6; text-decoration: none; }
.hero-link:hover { opacity: 1; color: var(--hero-ink); }
/* Rewards: one small button beside the name */
.hero-acct { flex: none; align-self: flex-start; margin-left: auto; display: inline-flex; align-items: center; min-height: 2.3rem; padding: .3rem .85rem; border-radius: 999px; background: var(--hero-ink); color: var(--hero); font-weight: 750; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.hero-acct:hover { filter: brightness(1.08); }
.info-contact { margin: .2rem 0 .6rem; }
.info-contact a { color: inherit; }
/* Phones: the logo sits beside the name, and everything else uses the full width under them (no squeezed column next to the logo). */
@media (max-width: 40rem) {
  .hero-in { display: grid; grid-template-columns: auto 1fr auto; column-gap: .7rem; align-items: center; }
  .hero-text { display: contents; }
  .hero-in > .logo { grid-row: 1; grid-column: 1; width: 3rem; height: 3rem; }
  .hero-in > .logo.wide { width: 4.5rem; height: 3rem; }
  .hero h1 { grid-row: 1; grid-column: 2; font-size: clamp(1.3rem, 6vw, 1.75rem); line-height: 1.1; }
  .hero-in > .hero-acct { grid-row: 1; grid-column: 3; align-self: center; margin: 0; }
  .hero-text > :not(h1) { grid-column: 1 / -1; }
  .hero-text > .tagline { margin-top: .5rem; }
  /* the address and phone are in "Pickup and hours" further down */
  .hero-text > .contact { display: none; }
}
.mini { display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: 3rem; background: var(--hero); color: var(--paper); box-shadow: 0 2px 8px rgb(0 0 0 / 18%); }
body.compact .tabs { top: 3rem; }
body.compact .mini { display: block; }
.mini-in { display: flex; align-items: center; justify-content: space-between; gap: .75rem; height: 100%; }
.mini-home { display: flex; align-items: center; gap: .55rem; min-width: 0; color: var(--hero-ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.mini-home span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-logo { width: 2rem; height: 2rem; object-fit: contain; border-radius: 6px; flex: none; }
.mini-links { display: flex; gap: .4rem; flex: 0 1 auto; min-width: 0; overflow: hidden; }
.mini-link { padding: .3rem .65rem; border-radius: 999px; border: 1px solid rgb(255 255 255 / 30%); color: var(--paper); text-decoration: none; font-size: .82rem; font-weight: 650; white-space: nowrap; }
.mini-link.main { background: var(--hero-ink); border-color: var(--hero-ink); color: var(--hero); }
/* Phones: the compact bar is the name and one button (Rewards, or the first link), never a row that runs under the logo. */
@media (max-width: 40rem) { .mini-links .mini-link + .mini-link { display: none; } }

/* The receipt under an order's status (issue #65). */
.receipt { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 6px; text-align: left; }
.receipt h3 { font-size: 1.15rem; }
.receipt-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.receipt-lines li, .receipt .row { display: flex; justify-content: space-between; gap: 12px; }
.receipt .total-row { font-weight: 800; border-top: 1px solid var(--line); padding-top: 6px; }
.reward-line { font-weight: 650; color: var(--accent); }

/* Pizza builder (docs/specs/pizza-halves.md): the drawn pizza, topping tabs, and Whole / Left / Right per topping */
.group-head { position: sticky; top: -.2rem; z-index: 2; margin: 0 -.9rem .2rem; padding: 0 .9rem; background: var(--surface); box-shadow: 0 8px 10px -10px rgb(0 0 0 / 25%); }
.pizza-pic { display: grid; justify-items: center; gap: .55rem; padding: .9rem 0 .6rem; }
.pizza-svg { width: min(200px, 52vw); height: auto; aspect-ratio: 1; filter: drop-shadow(0 6px 10px rgb(60 30 10 / 22%)); transition: width .2s ease; }
/* scrolled into the toppings: a small pizza beside what is on it */
.group-head.pz-small .pizza-pic { grid-template-columns: auto 1fr; justify-items: stretch; align-items: center; gap: .7rem; padding: .45rem 0; }
.group-head.pz-small .pizza-svg { width: 64px; filter: drop-shadow(0 2px 4px rgb(60 30 10 / 22%)); }
.group-head.pz-small .pizza-legend.single { text-align: left; }
.group-head.pz-small .pz-hint { display: none; }
.pz-piece { transition: opacity .25s ease; }
.pizza-legend { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; width: 100%; max-width: 30rem; }
.pizza-legend.single { grid-template-columns: 1fr; text-align: center; }
.pz-side { display: grid; gap: .1rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); min-width: 0; }
.pz-side-title { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.pz-side-items { font-size: .9rem; color: var(--ink); overflow-wrap: anywhere; }
.pz-hint { font-size: .8rem; color: var(--muted); }
/* the pizza's size, inside its summary: Thin 12"  Change */
.pz-size { display: flex; align-items: baseline; justify-content: center; gap: .6rem; font-weight: 700; }
.pizza-legend:not(.single) > .pz-size { grid-column: 1 / -1; }
.pizza-legend.single .pz-size { margin: .05rem 0 .1rem; }
.pz-size-change { border: 0; background: none; padding: .1rem 0; font: inherit; font-size: .88rem; font-weight: 700; color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.group-head.pz-small .pz-size { justify-content: flex-start; }
.kind-tabs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding: .35rem .1rem .6rem; margin: 0 -.1rem; scroll-snap-type: x proximity; }
.kind-tabs::-webkit-scrollbar { display: none; }
.kind-tab { flex: none; display: inline-flex; align-items: center; gap: .35rem; min-height: 2.3rem; padding: 0 .95rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; scroll-snap-align: start; }
.kind-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.kind-count { min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .72rem; display: inline-grid; place-items: center; }
.kind-count[hidden] { display: none; }
.choice-row, .choice-wrap { border-top: 1px solid var(--line); }
.choice-row[hidden], .choice-wrap[hidden] { display: none; }
.choice-row .choice, .choice-wrap .choice { border-top: 0; }
.top-ico { width: 1.9rem; height: 1.9rem; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); }
.top-ico-none { display: inline-block; width: 1.9rem; height: 1.9rem; flex: none; }
/* a manager's picture for the choice: a little larger than the drawing, so a photo reads */
.top-photo { width: 2.6rem; height: 2.6rem; object-fit: cover; background: var(--line); }
/* where a ticked topping goes: small pizzas to tap (Whole, Left, Right, the quarters the register rings), then Extra.
   docs/specs/pizza-portions.md, "Placing a topping" */
.place { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .6rem; padding: 0 0 .75rem 2.15rem; }
.place[hidden] { display: none; }
.place-chips { display: grid; gap: .15rem; padding: .2rem; border-radius: 14px; background: color-mix(in srgb, var(--ink) 5%, var(--surface)); }
.pl-row { display: flex; gap: .2rem; align-items: center; }
.pl-quarters { border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); padding-top: .15rem; }
.pl-lbl { width: 1.6rem; text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); }
.pl-chip { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.25rem; padding: 0 .55rem; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.pl-chip.pl-q { padding: 0 .45rem; gap: .2rem; }
.pl-chip.pl-q .pl-nm { font-size: .78rem; font-variant-numeric: tabular-nums; opacity: .8; }
.pl-chip:hover { background: var(--surface); }
.pl-chip[aria-pressed="true"] { background: var(--surface); border-color: var(--accent); color: var(--accent-dark); box-shadow: 0 1px 2px #0000001f; }
.pl-chip[aria-pressed="true"] .pi-fill { fill: var(--accent); stroke: var(--accent-dark); }
.pl-chip:disabled { opacity: .35; cursor: not-allowed; background: transparent; }
.pl-chip:focus-visible, .extra-toggle:focus-visible, .kind-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.place .extra-toggle { min-height: 2.3rem; padding: 0 .95rem; border: 1px dashed var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.place .extra-toggle[aria-pressed="true"] { background: var(--accent); border: 1px solid var(--accent); color: var(--on-accent, #fff); }
.portion-ico { width: 1.2rem; height: 1.2rem; flex: none; }
.portion-ico .pi-base { fill: none; stroke: currentColor; stroke-width: 1.6; opacity: .55; }
.portion-ico .pi-fill { fill: #e9b56b; stroke: #b06a2a; stroke-width: 1.2; }
.group-count.full { color: var(--accent-dark); font-weight: 700; }
@media (max-width: 520px) { .place { padding-left: .15rem; gap: .4rem; } .pl-chip { padding: 0 .45rem; } .pl-chip.pl-q { padding: 0 .35rem; } .place .extra-toggle { padding: 0 .75rem; } }
@media (max-width: 520px) { .pizza-svg { width: min(130px, 34vw); } .pizza-pic { gap: .4rem; padding: .6rem 0 .4rem; } .pz-side { padding: .35rem .5rem; } .pz-side-items { font-size: .84rem; } .pz-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .pz-piece, .pl-chip { transition: none; } }
.demo-code { border: 2px dashed var(--line); border-radius: 10px; padding: .55rem .75rem; margin: .5rem 0 0; background: var(--paper); font-size: .92rem; }
.demo-code b { font-size: 1.1rem; letter-spacing: .12em; }

/* ---------------------------------------------------------------- secondary buttons */
.secondary { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); border-radius: 12px; padding: .62rem 1.1rem; font-weight: 700; min-height: 2.75rem; }
.secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-dark); }
#gift .secondary { margin-top: .6rem; }

/* ---------------------------------------------------------------- gift cards dialog (buy + balance) */
#giftdlg .sheet-body { display: grid; gap: .2rem; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .25rem; padding: .25rem; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; margin-bottom: .6rem; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: .55rem .8rem; font-weight: 700; color: var(--muted); min-height: 2.6rem; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg button[hidden] { display: none; }
#g-buy label, #g-bal label { display: block; font-weight: 650; margin: .8rem 0 .25rem; }
#g-buy input:not([type="radio"]), #g-buy textarea, #g-bal input { width: 100%; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
#g-buy .primary, #g-bal .primary { width: 100%; margin-top: 1rem; }
.amounts { border: 0; margin: 0; padding: 0; }
.amounts legend { font-weight: 650; margin-bottom: .4rem; padding: 0; }
.amount-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.amount-chips .chip { position: relative; margin: 0 !important; }
.amount-chips input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.amount-chips span { display: grid; place-items: center; min-height: 3rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 750; font-size: 1.02rem; }
.amount-chips input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.amount-chips input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
#g-demo { margin-top: 1rem; }
.g-done { display: grid; gap: .7rem; }
.g-done:focus { outline: none; }
.giftcard { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand amount" "number number" "pin to"; gap: .6rem 1rem; aspect-ratio: 1.586; padding: 1.2rem 1.3rem; border-radius: 18px; color: var(--hero-ink); overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%), linear-gradient(135deg, var(--hero), color-mix(in srgb, var(--hero) 70%, #000)); box-shadow: 0 10px 30px rgb(0 0 0 / 22%); }
.gc-brand { grid-area: brand; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; line-height: 1.15; }
.gc-amount { grid-area: amount; font-weight: 800; font-size: 1.6rem; }
.gc-number { grid-area: number; align-self: center; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: clamp(1.05rem, 5vw, 1.45rem); letter-spacing: .06em; color: #fff; }
.gc-pin { grid-area: pin; align-self: end; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.gc-pin b { font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem; color: #fff; letter-spacing: .12em; margin-left: .3rem; }
.gc-to { grid-area: to; align-self: end; justify-self: end; font-size: .85rem; text-align: right; }
.g-msg { margin: 0; padding: .7rem .9rem; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; font-style: italic; white-space: pre-wrap; }
.g-result { min-height: 1.4rem; margin-top: .8rem; font-weight: 650; }
@media (max-width: 380px) { .amount-chips { grid-template-columns: repeat(3, 1fr); } .two { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- join rewards at checkout */
.joincard { margin: 1rem 0 .4rem; padding: .95rem 1rem; border-radius: 14px; border: 1.5px solid color-mix(in srgb, var(--highlight) 70%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--highlight) 16%, var(--surface)), var(--surface) 70%); }
.join-head { display: flex; gap: .75rem; align-items: flex-start; }
.join-star { flex: none; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--highlight); color: var(--highlight-ink); font-size: 1.2rem; }
.join-title { margin: 0; font-weight: 800; font-size: 1.05rem; line-height: 1.25; }
.join-sub { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.35; }
.join-sub:empty { display: none; }
.join-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin-top: .75rem; }
.join-actions .primary { min-height: 2.75rem; }
#checkout .join-actions input { flex: 1; min-width: 8rem; width: auto; letter-spacing: .2em; font-size: 1.1rem; }
.join-link { background: none; border: 0; padding: .3rem 0; color: var(--muted); font-weight: 650; font-size: .9rem; text-decoration: underline; cursor: pointer; }
.join-link:hover { color: var(--ink); }
#checkout .joincard label { font-weight: 650; }
#checkout .joincard label.choice { display: flex; gap: .5rem; align-items: center; font-weight: 500; margin: .6rem 0 0; }
#checkout .joincard label.choice input { width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--accent); }
.join-done { margin: .7rem 0 0; font-weight: 700; color: #14532d; }

.join-after { margin-top: 1rem; padding: .8rem 1rem; border-radius: 12px; background: color-mix(in srgb, var(--highlight) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--highlight) 60%, var(--line)); font-weight: 600; }
.join-after a { color: var(--accent-dark); font-weight: 800; }
.pizza-legend > .pz-wide { grid-column: 1 / -1; }
