/* =====================================================================
   THE BRASS OX — grill house & tavern.
   Three zones on desktop: a sticky section rail, a photo-led board, and
   a kitchen ticket that never leaves the screen. Bone ground, bottle
   green furniture, brass for money and action.
   ===================================================================== */

:root {
  /* ground */
  --bone:     #F6F2EA;
  --bone-2:   #EDE7DB;
  --card:     #FFFFFF;
  --rule:     #DED6C6;
  --rule-2:   #C9BFAA;

  /* ink — body ≥ 9:1 on bone, secondary ≥ 4.8:1 */
  --ink:      #1B1A17;
  --ink-2:    #605B51;
  --ink-3:    #857F72;

  /* furniture */
  --green:    #1E3D32;
  --green-2:  #16302708;
  --green-lt: #2C5544;

  /* money + action */
  --brass:    #9A6F19;   /* on bone: 4.9:1 */
  --brass-lt: #C8973A;   /* on green: 5.6:1 */
  --brass-bg: #F3E7CE;

  --char:     #8A3B1E;   /* spicy / errors */

  --slab:  'Zilla Slab', Georgia, serif;
  --sans:  'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tick:  'Courier Prime', ui-monospace, 'Courier New', monospace;

  --r:     3px;         /* the whole thing is squarer than KIYO */
  --pad:   clamp(1rem, 3.2vw, 2.4rem);
  --ease:  cubic-bezier(.2, .6, .3, 1);
  --lift:  0 12px 30px -16px rgba(27, 26, 23, .45);

  --mast-h: 62px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--mast-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--slab); font-weight: 600; line-height: 1.1; }
p, ul, ol, dl, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
legend { padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select, output { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* Every overlay here also sets a display, which would beat the hidden
   attribute they are all toggled with. */
[hidden] { display: none !important; }

.skip {
  position: fixed; top: -80px; left: 1rem; z-index: 400;
  padding: .6rem 1rem; background: var(--green); color: var(--bone);
  font-size: .85rem; font-weight: 700; border-radius: var(--r);
  transition: top .2s var(--ease);
}
.skip:focus { top: .7rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 46px; padding: .7rem 1.4rem;
  font-family: var(--sans); font-weight: 700; font-size: .9rem;
  letter-spacing: .02em;
  border-radius: var(--r);
  transition: background .18s var(--ease), color .18s var(--ease), transform .1s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-green { background: var(--green); color: var(--bone); }
.btn-green:hover { background: var(--green-lt); }
.btn-brass { background: var(--brass); color: #fff; }
.btn-brass:hover { background: #85601a; }
.btn-full { width: 100%; }
.btn-grow { flex: 1; }
.btn-tall { min-height: 54px; font-size: .98rem; }
.btn:disabled { opacity: .38; pointer-events: none; }

/* ---------------------------------------------------------------- masthead */

.mast {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  height: var(--mast-h);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 var(--pad);
  background: var(--green);
  color: var(--bone);
}
.mark { display: flex; align-items: center; gap: .65rem; }
.mark-glyph { width: 30px; height: 30px; color: var(--brass-lt); flex: none; }
.mark-glyph svg { width: 100%; height: 100%; }
.mark-words { display: grid; line-height: 1.15; }
.mark-words b { font-family: var(--slab); font-weight: 700; font-size: 1.02rem; letter-spacing: .07em; }
.mark-words i {
  font-style: normal; font-size: .6rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(246, 242, 234, .72);
}

.mast-hours {
  margin-left: auto;
  display: flex; align-items: center; gap: .45rem;
  font-size: .76rem; font-weight: 500;
  color: rgba(246, 242, 234, .82); white-space: nowrap;
}
.mark-words b, .mark-words i { white-space: nowrap; }
@media (max-width: 620px) {
  .mast-hours { display: none; }
  .mast-check { margin-left: auto; }
}
.lamp { width: 7px; height: 7px; border-radius: 50%; background: var(--brass-lt); flex: none; }

.mast-check {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: var(--r);
  color: var(--bone);
  transition: background .18s var(--ease);
}
.mast-check:hover { background: rgba(246, 242, 234, .12); }
.mast-check svg { width: 22px; height: 22px; }
.mast-check-n {
  position: absolute; top: 3px; right: 2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--brass-lt); color: #16241D;
  font-size: .66rem; font-weight: 700; border-radius: 9px;
}

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

.hero { position: relative; margin-top: var(--mast-h); overflow: hidden; }
.hero-img { width: 100%; height: clamp(300px, 52vh, 520px); object-fit: cover; }
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(16, 14, 11, .88) 0%, rgba(16, 14, 11, .62) 44%, rgba(16, 14, 11, .18) 78%);
}
.hero-copy {
  position: absolute; inset: 0;
  display: grid; align-content: center;
  padding: 0 var(--pad);
  max-width: 1440px; margin-inline: auto;
  color: var(--bone);
}
.hero-eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--brass-lt); margin-bottom: .8rem;
}
.hero h1 { font-size: clamp(2.1rem, 6vw, 4rem); letter-spacing: -.01em; }
.hero-line { margin-top: 1rem; max-width: 34rem; font-size: .96rem; color: rgba(246, 242, 234, .9); }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.hero-meta { font-size: .84rem; color: rgba(246, 242, 234, .82); }
.hero-meta b { color: var(--brass-lt); }

/* =============================== three zones ========================== */

.shell {
  display: grid;
  /* minmax(0,…) not 1fr: a bare 1fr keeps an `auto` minimum, which lets the
     board column grow to its content and push the whole page sideways. */
  grid-template-columns: minmax(0, 1fr);
  max-width: 1440px; margin-inline: auto;
  padding: 0 var(--pad) 6rem;
  gap: 0;
}

/* ---------------------------------------------------------------- the rail */

.rail {
  position: sticky; top: var(--mast-h); z-index: 90;
  background: var(--bone);
  padding: .8rem 0 .6rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.4rem;
}
.rail-head {
  font-family: var(--slab); font-weight: 700; font-size: .74rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .5rem;
  display: none;
}
.rail-nav { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.rail-nav::-webkit-scrollbar { display: none; }
.rail-nav a {
  flex: none;
  display: flex; align-items: center; gap: .4rem;
  min-height: 40px; padding: .4rem .85rem;
  border: 1px solid var(--rule-2); border-radius: 100px;
  font-size: .86rem; font-weight: 700; white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.rail-nav a i {
  font-style: normal; font-size: .68rem; font-weight: 700;
  color: var(--ink-3);
}
.rail-nav a.is-active { background: var(--green); border-color: var(--green); color: var(--bone); }
.rail-nav a.is-active i { color: var(--brass-lt); }

.rail-filters { display: flex; gap: .4rem; margin-top: .6rem; overflow-x: auto; scrollbar-width: none; }
.rail-filters::-webkit-scrollbar { display: none; }
.pill {
  flex: none;
  min-height: 36px; padding: .35rem .8rem;
  border: 1px solid var(--rule-2); border-radius: 100px;
  font-size: .8rem; font-weight: 500; color: var(--ink-2);
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.pill.is-on { background: var(--brass-bg); border-color: var(--brass); color: #6E4E10; font-weight: 700; }
.rail-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* --------------------------------------------------------------- the board */

.course { padding-bottom: 2.6rem; }
.course-head { margin-bottom: 1.1rem; }
.course-head h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  display: flex; align-items: center; gap: .8rem;
}
.course-head h2::after { content: ''; flex: 1; height: 2px; background: var(--green); opacity: .16; }
.course-head p { margin-top: .35rem; font-size: .88rem; color: var(--ink-2); max-width: 44rem; }

/* 228px is the widest minimum that still fits three columns in the middle
   zone once the rail and the check have taken their share. */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); }

/* photo on top, menu-style dot leader under it — the opposite of KIYO's
   text-left / thumb-right row */
.dish {
  display: flex; flex-direction: column;
  text-align: left; width: 100%;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .18s var(--ease), box-shadow .2s var(--ease), transform .18s var(--ease), opacity .25s var(--ease);
}
.dish:hover { border-color: var(--green); box-shadow: var(--lift); transform: translateY(-2px); }
.dish:active { transform: translateY(0); }
.dish.is-dim { opacity: .26; }

.dish-shot { position: relative; aspect-ratio: 4 / 3; background: var(--bone-2); overflow: hidden; }
.dish-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.dish:hover .dish-shot img { transform: scale(1.04); }
.dish-weight {
  position: absolute; left: .55rem; top: .55rem;
  padding: .16rem .45rem;
  background: rgba(16, 14, 11, .78); color: var(--bone);
  font-family: var(--tick); font-size: .64rem; font-weight: 700;
  letter-spacing: .06em; border-radius: 2px;
}
.dish-plus {
  position: absolute; right: .55rem; bottom: .55rem;
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bone); color: var(--green);
  font-size: 1.3rem; font-weight: 700; line-height: 1;
  box-shadow: 0 3px 10px -2px rgba(27, 26, 23, .4);
  transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}
.dish:hover .dish-plus { background: var(--brass); color: #fff; transform: scale(1.08); }

.dish-body { padding: .85rem .9rem 1rem; display: flex; flex-direction: column; flex: 1; }
.dish-line { display: flex; align-items: baseline; gap: .4rem; }
.dish-name { font-family: var(--slab); font-weight: 600; font-size: 1.02rem; line-height: 1.25; }
.dish-dots { flex: 1; border-bottom: 1.5px dotted var(--rule-2); transform: translateY(-3px); min-width: 12px; }
.dish-price { font-family: var(--tick); font-weight: 700; font-size: .95rem; }
.dish-desc { margin-top: .35rem; font-size: .84rem; color: var(--ink-2); line-height: 1.5; }
.dish-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .6rem; padding-top: .1rem; }
.tag {
  font-size: .62rem; font-weight: 700; letter-spacing: .05em;
  padding: .14rem .42rem; border-radius: 2px; text-transform: uppercase;
}
.tag.veg   { background: #E6EDE3; color: #2F5325; }
.tag.gf    { background: #F1EAD8; color: #6B551D; }
.tag.spicy { background: #F5E4DD; color: var(--char); }

.noscript { padding: 2rem 0; text-align: center; color: var(--ink-2); }

/* --------------------------------------------------------------- the check */

.check { display: none; }

.check-paper {
  background: var(--card);
  box-shadow: var(--lift);
  position: relative;
}
/* torn perforation, top and bottom */
.check-perf {
  height: 8px;
  background:
    linear-gradient(-45deg, transparent 33.4%, var(--card) 33.4%) 0 0 / 12px 8px repeat-x,
    linear-gradient(45deg, transparent 33.4%, var(--card) 33.4%) 0 0 / 12px 8px repeat-x;
}
.check-perf--b { transform: rotate(180deg); }
.check-inner { padding: .2rem 1.1rem 1.1rem; }

.check-title {
  font-family: var(--tick); font-weight: 700; font-size: .92rem;
  letter-spacing: .18em; text-align: center;
}
.check-sub {
  font-family: var(--tick); font-size: .6rem; letter-spacing: .1em;
  text-align: center; color: var(--ink-3); margin-top: .15rem;
}
.check-rule {
  font-family: var(--tick); font-size: .7rem; color: var(--rule-2);
  overflow: hidden; white-space: nowrap; margin: .5rem 0;
}

.check-lines { display: grid; gap: .55rem; font-family: var(--tick); font-size: .76rem; }
.cl { display: grid; grid-template-columns: 1fr auto; gap: .2rem .5rem; }
.cl-name { font-weight: 700; }
.cl-cost { font-weight: 700; }
.cl-mods { grid-column: 1 / -1; font-size: .66rem; color: var(--ink-3); line-height: 1.45; padding-left: .1rem; }
.cl-qty { grid-column: 1 / -1; display: flex; align-items: center; gap: .3rem; margin-top: .1rem; }
.cl-qty button {
  width: 26px; height: 26px; line-height: 1;
  border: 1px solid var(--rule-2); border-radius: 2px;
  font-family: var(--sans); font-size: .95rem;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.cl-qty button:hover { background: var(--bone-2); border-color: var(--ink-3); }
.cl-qty output { min-width: 22px; text-align: center; font-weight: 700; }

.check-empty {
  font-family: var(--tick); font-size: .74rem; color: var(--ink-3);
  text-align: center; padding: 1.4rem .5rem 1rem; line-height: 1.7;
}
.check-empty span { font-size: .68rem; opacity: .8; }

.check-sums { font-family: var(--tick); }
.csum { display: flex; justify-content: space-between; font-size: .76rem; color: var(--ink-2); }
.csum b { font-weight: 700; }
.csum--total { font-size: .95rem; color: var(--ink); margin-top: .3rem; padding-top: .35rem; border-top: 1px solid var(--rule); }
.check-inner .btn { margin-top: .9rem; }
.check-clear {
  display: block; width: 100%; margin-top: .5rem;
  font-family: var(--tick); font-size: .68rem; letter-spacing: .06em;
  color: var(--ink-3); min-height: 34px;
}
.check-clear:hover { color: var(--char); }

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

.ticketbar {
  position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 180;
  display: flex; align-items: center; gap: .7rem;
  width: min(calc(100% - 1.6rem), 460px);
  min-height: 52px; padding: .6rem 1rem;
  background: var(--green); color: var(--bone);
  border-radius: var(--r);
  box-shadow: 0 14px 34px -12px rgba(16, 14, 11, .6);
  animation: barIn .3s var(--ease);
}
@keyframes barIn { from { transform: translate(-50%, 70px); } }
.ticketbar-n {
  display: grid; place-items: center;
  min-width: 24px; height: 24px; padding: 0 6px;
  background: var(--brass-lt); color: #16241D;
  font-family: var(--tick); font-size: .78rem; font-weight: 700; border-radius: 2px;
}
.ticketbar-txt { font-weight: 700; font-size: .92rem; }
.ticketbar-total { margin-left: auto; font-family: var(--tick); font-weight: 700; }
.ticketbar.is-bump .ticketbar-n { animation: bump .28s var(--ease); }
@keyframes bump { 50% { transform: scale(1.3); } }

/* ------------------------------------------------------------------ scrim */

.scrim {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(16, 14, 11, .55);
  animation: fadein .22s var(--ease);
}
@keyframes fadein { from { opacity: 0; } }

/* ---------------------------------------------------------------- builder */

.builder {
  position: fixed; left: 50%; bottom: 0; z-index: 260;
  transform: translateX(-50%);
  width: min(100%, 560px);
  max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--bone);
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  animation: up .3s var(--ease);
}
@keyframes up { from { transform: translate(-50%, 42px); opacity: 0; } }
.builder-x {
  position: absolute; top: .7rem; right: .7rem; z-index: 3;
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(16, 14, 11, .6); color: #fff;
  font-size: 1.5rem; line-height: 1;
}
.builder-shot { flex: none; }
.builder-shot img { width: 100%; height: min(34vw, 200px); object-fit: cover; }
.builder-body { overflow-y: auto; overscroll-behavior: contain; padding: 1rem var(--pad) .8rem; }
.builder-top { margin-bottom: 1rem; }
.builder-body h3 { font-size: 1.35rem; }
.builder-weight {
  display: inline-block; margin-top: .35rem;
  font-family: var(--tick); font-size: .68rem; font-weight: 700;
  letter-spacing: .08em; color: var(--brass);
}
.builder-desc { margin-top: .4rem; font-size: .89rem; color: var(--ink-2); }

#bForm { display: grid; gap: 1.2rem; }
.grp legend {
  font-family: var(--slab); font-weight: 600; font-size: 1rem;
  margin-bottom: .55rem;
  display: flex; align-items: baseline; gap: .5rem;
}
.grp legend small {
  font-family: var(--sans); font-weight: 500; font-size: .72rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}

/* segmented choices — a row of buttons, not a stack of radio rows */
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg label { cursor: pointer; }
.seg input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.seg span {
  display: inline-flex; align-items: center; gap: .35rem;
  min-height: 42px; padding: .45rem .85rem;
  background: var(--card);
  border: 1.5px solid var(--rule-2); border-radius: var(--r);
  font-size: .86rem; font-weight: 500;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.seg span em { font-style: normal; font-family: var(--tick); font-size: .74rem; color: var(--ink-3); }
.seg label:has(input:checked) span { border-color: var(--green); background: var(--green); color: var(--bone); font-weight: 700; }
.seg label:has(input:checked) span em { color: var(--brass-lt); }
.seg label:has(input:focus-visible) span { outline: 2px solid var(--brass); outline-offset: 2px; }

/* optional extras stay as ticked rows, which read better for a long list */
.adds { display: grid; gap: .35rem; }
.adds label {
  display: flex; align-items: center; gap: .6rem;
  min-height: 44px; padding: .4rem .8rem;
  background: var(--card);
  border: 1.5px solid var(--rule); border-radius: var(--r);
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.adds label:has(input:checked) { border-color: var(--brass); background: var(--brass-bg); }
.adds label:has(input:focus-visible) { outline: 2px solid var(--brass); outline-offset: 2px; }
.adds input {
  appearance: none; -webkit-appearance: none;
  width: 17px; height: 17px; flex: none;
  border: 2px solid var(--rule-2); border-radius: 2px;
  display: grid; place-items: center;
}
.adds input::after {
  content: ''; width: 9px; height: 9px;
  background: var(--brass); transform: scale(0);
  transition: transform .14s var(--ease);
}
.adds input:checked { border-color: var(--brass); }
.adds input:checked::after { transform: scale(1); }
.adds .a-name { font-size: .88rem; }
.adds .a-cost { margin-left: auto; font-family: var(--tick); font-size: .8rem; font-weight: 700; color: var(--ink-2); }

.builder-foot {
  flex: none;
  display: flex; gap: .7rem; align-items: center;
  padding: .7rem var(--pad) calc(.7rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  background: var(--bone);
}
.stepper {
  flex: none; display: flex; align-items: center;
  border: 1.5px solid var(--rule-2); border-radius: var(--r); overflow: hidden;
}
.stepper button { width: 42px; height: 46px; font-size: 1.25rem; transition: background .15s var(--ease); }
.stepper button:hover { background: var(--bone-2); }
.stepper output { min-width: 28px; text-align: center; font-family: var(--tick); font-weight: 700; }

/* --------------------------------------------------------------- checkout */

.pass {
  position: fixed; inset: 0; z-index: 300;
  background: var(--bone);
  display: flex; flex-direction: column;
  animation: fadein .24s var(--ease);
}
.pass-bar {
  flex: none;
  display: flex; align-items: center; gap: .7rem;
  height: var(--mast-h); padding: 0 var(--pad);
  background: var(--green); color: var(--bone);
}
.pass-bar h3 { font-size: 1.05rem; }
.pass-back {
  display: grid; place-items: center;
  width: 40px; height: 40px; margin-left: -8px; border-radius: var(--r);
  font-size: 1.2rem; color: var(--bone);
}
.pass-back:hover { background: rgba(246, 242, 234, .14); }
.pass-demo {
  margin-left: auto;
  font-family: var(--tick); font-size: .66rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--brass-lt);
}

.pass-grid {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: 1fr;
  gap: 1.6rem;
  padding: 1.3rem var(--pad) calc(2rem + env(safe-area-inset-bottom));
  max-width: 1160px; width: 100%; margin-inline: auto;
  align-content: start;
}
.pass-form { display: grid; gap: 1.7rem; align-content: start; }

.blk { display: grid; gap: .75rem; }
.blk > legend {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--slab); font-weight: 600; font-size: 1.15rem;
  margin-bottom: .1rem;
}
.blk-n {
  display: grid; place-items: center;
  width: 24px; height: 24px; flex: none;
  background: var(--green); color: var(--bone);
  font-family: var(--tick); font-size: .78rem; font-weight: 700;
  border-radius: 50%;
}

.ways { display: grid; gap: .5rem; }
.ways label { cursor: pointer; }
.ways input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.ways span {
  display: grid; gap: .1rem;
  padding: .7rem .95rem;
  background: var(--card);
  border: 1.5px solid var(--rule-2); border-radius: var(--r);
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.ways b { font-size: .95rem; }
.ways i { font-style: normal; font-size: .78rem; color: var(--ink-2); }
.ways label:has(input:checked) span { border-color: var(--green); background: #F0F4F0; }
.ways label:has(input:focus-visible) span { outline: 2px solid var(--brass); outline-offset: 2px; }

.when, .addr { display: grid; gap: .75rem; }
.f { display: grid; gap: .28rem; }
.f > span { font-size: .78rem; font-weight: 700; }
.f > span small { font-weight: 500; color: var(--ink-3); }
.f input, .f select {
  width: 100%; min-height: 46px; padding: .55rem .8rem;
  background: var(--card);
  border: 1.5px solid var(--rule-2); border-radius: var(--r);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.f input:focus, .f select:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 61, 50, .14);
}
.f.bad input { border-color: var(--char); }
.err { display: block; min-height: 0; font-style: normal; font-size: .74rem; font-weight: 500; color: var(--char); }
.f.bad .err { min-height: 1.1em; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }

.zone { font-size: .78rem; font-weight: 500; min-height: 1.2em; }
.zone.ok { color: #2C5544; }
.zone.no { color: var(--char); }

.wallets { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.wallet {
  min-height: 46px; border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .98rem;
  border: 1.5px solid transparent;
  transition: box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.w-apple { background: #111; color: #fff; }
.w-google { background: #fff; color: #3C4043; border-color: var(--rule-2); }
.w-google b { color: #4A79C9; font-weight: 700; }
.wallet[aria-pressed="true"] { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(154, 111, 25, .3); }
.or { display: flex; align-items: center; gap: .7rem; font-size: .76rem; color: var(--ink-3); margin: .1rem 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
.card { display: grid; gap: .7rem; transition: opacity .18s var(--ease); }
.card.off { opacity: .34; pointer-events: none; }
.pay-note { font-size: .74rem; color: var(--ink-2); line-height: 1.55; }

.pass-sum-in {
  background: var(--card);
  border: 1px solid var(--rule); border-radius: var(--r);
  padding: 1.1rem;
}
.pass-sum-h {
  font-family: var(--slab); font-weight: 600; font-size: 1.05rem;
  padding-bottom: .6rem; border-bottom: 1px solid var(--rule); margin-bottom: .7rem;
}
.pass-lines { display: grid; gap: .5rem; font-family: var(--tick); font-size: .76rem; }
.pass-lines li { display: flex; justify-content: space-between; gap: .8rem; }
.pass-lines .pl-mods { display: block; font-size: .66rem; color: var(--ink-3); margin-top: .1rem; }
.pass-tot { display: grid; gap: .25rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--rule); font-family: var(--tick); font-size: .78rem; }
.pass-tot div { display: flex; justify-content: space-between; color: var(--ink-2); }
.pass-tot dd { margin: 0; }
.pass-tot .t { font-size: .98rem; font-weight: 700; color: var(--ink); margin-top: .3rem; padding-top: .4rem; border-top: 1px solid var(--rule); }
.pass-sum-in .btn { margin-top: 1rem; }
.pass-fine { margin-top: .6rem; font-size: .7rem; color: var(--ink-3); text-align: center; line-height: 1.5; }

/* ------------------------------------------------------------ confirmation */

.pass-done { display: grid; place-items: center; padding: var(--pad); text-align: center; }
.done-in { max-width: 26rem; display: grid; gap: .6rem; justify-items: center; }
.done-stamp {
  font-family: var(--tick); font-size: .72rem; font-weight: 700;
  letter-spacing: .3em; color: var(--char);
  border: 2px solid var(--char); border-radius: 2px;
  padding: .35rem .8rem;
  transform: rotate(-3deg);
  opacity: .85;
  margin-bottom: .6rem;
}
.done-in h3 { font-size: 2rem; }
.done-no { font-family: var(--tick); font-size: .9rem; color: var(--ink-2); }
.done-no b { color: var(--ink); }
.done-when { font-size: .98rem; }
.done-fine { font-size: .8rem; color: var(--ink-2); line-height: 1.6; margin: .5rem 0 .8rem; }

/* ------------------------------------------------------------------ flash */

.flash {
  position: fixed; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 190;
  padding: .6rem 1.1rem;
  background: var(--ink); color: var(--bone);
  font-size: .86rem; font-weight: 500;
  border-radius: var(--r);
  max-width: calc(100% - 2rem); text-align: center;
  animation: barIn .22s var(--ease);
}

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

.foot { background: var(--green); color: var(--bone); padding: 2.4rem var(--pad) calc(2.4rem + 66px); }
.foot-in { max-width: 1440px; margin-inline: auto; text-align: center; }
.foot-mark { font-family: var(--slab); font-weight: 700; font-size: 1.2rem; letter-spacing: .12em; color: var(--brass-lt); }
.foot-note { max-width: 46rem; margin: .8rem auto 1rem; font-size: .8rem; line-height: 1.7; color: rgba(246, 242, 234, .78); }
.foot-back { font-size: .82rem; font-weight: 700; color: var(--brass-lt); }
.foot-back:hover { color: var(--bone); }

/* ====================================================== wider viewports === */

@media (min-width: 760px) {
  .builder { border-radius: 6px; bottom: 4vh; }
  .pass-grid { grid-template-columns: minmax(0, 1.5fr) minmax(300px, .9fr); align-items: start; }
  .pass-sum { position: sticky; top: 0; }
  .foot { padding-bottom: 2.4rem; }
}

/* the three-zone layout proper */
@media (min-width: 1080px) {
  .shell {
    grid-template-columns: 178px minmax(0, 1fr) 288px;
    gap: 2rem;
    padding-top: 2rem;
  }
  .rail {
    position: sticky; top: calc(var(--mast-h) + 1.6rem);
    align-self: start;
    padding: 0; margin: 0;
    border-bottom: 0;
    background: transparent;
    height: fit-content;
  }
  .rail-head { display: block; }
  .rail-head--2 { margin-top: 1.6rem; }
  .rail-nav { flex-direction: column; gap: .1rem; overflow: visible; }
  .rail-nav a {
    border: 0; border-radius: var(--r);
    border-left: 2px solid transparent;
    justify-content: space-between;
    padding: .5rem .7rem;
    color: var(--ink-2);
  }
  .rail-nav a:hover { background: var(--bone-2); color: var(--ink); }
  .rail-nav a.is-active {
    background: transparent; color: var(--green);
    border-left-color: var(--green);
    font-weight: 700;
  }
  .rail-nav a.is-active i { color: var(--brass); }
  .rail-filters { flex-direction: column; align-items: flex-start; overflow: visible; }
  .pill { width: 100%; text-align: left; }

  .check {
    display: block;
    position: sticky; top: calc(var(--mast-h) + 1.6rem);
    align-self: start;
  }
  .ticketbar { display: none !important; }
  .mast-check { display: none; }
  .foot { padding-bottom: 2.4rem; }
}

@media (min-width: 1320px) {
  .shell { grid-template-columns: 200px minmax(0, 1fr) 320px; gap: 2.6rem; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ===================================================== touch targets ==== */

@media (pointer: coarse) {
  .dish-plus { width: 42px; height: 42px; }
  .cl-qty button { width: 32px; height: 32px; }
}

/* ==================================================== reduced motion ==== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .dish:hover .dish-shot img { transform: none; }
}

/* ===================================================== touch targets ====
   Thumb, not cursor. Category pills were 60x36 and rail links 78x40. */
@media (pointer: coarse) {
  .pill { min-height: 44px; display: inline-flex; align-items: center; }
  .rail-nav a, .foot a { min-height: 44px; display: inline-flex; align-items: center; }
  .pill:active { transform: scale(.94); }
  .dish:active { transform: scale(.99); }
}

/* ============================================== mobile menu density ====
   On a phone the dish card stacked a 4:3 photo above the text, which made each
   card 373px tall — about 2.3 dishes per screen, and 15.9 screens to reach the
   bottom of the menu. That is the longest scroll in the collection.

   Below 720px the card becomes the delivery-app row instead: text left, a 96px
   square thumb right. Same information, ~6 dishes per screen. The photo earns
   less space because on a menu the name and price are what people scan; the
   picture only has to confirm what the dish is.

   The description clamps to two lines so every row is the same height — a
   ragged column is far harder to scan than a slightly truncated one. */
@media (max-width: 719px) {
  .dish {
    flex-direction: row-reverse;
    align-items: stretch;
    gap: .85rem;
    padding: .8rem .85rem;
  }

  .dish-shot {
    aspect-ratio: 1 / 1;
    width: 96px; flex: 0 0 96px;
    border-radius: 10px;
    align-self: center;
  }

  .dish-body { padding: 0; justify-content: center; min-width: 0; }

  .dish-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: .25rem;
  }

  /* the weight badge overlapped a 96px thumb; move it inline with the name */
  .dish-weight {
    position: static;
    display: inline-block;
    margin-left: .4rem;
    background: none; color: var(--ink-3);
    padding: 0;
  }
}

/* ==================================================== legible on glass ====
   Several labels sat at .6rem — 9.6px, the smallest type in the collection and
   unreadable at arm's length on a phone. Nothing drops below 12px on mobile. */
@media (max-width: 719px) {
  .dish-weight, .cl-mods, .check-empty span { font-size: .75rem; }
  .pill, .tag, .rail-nav a { font-size: .78rem; }
}
