/* Myli QR menu — one ink on one stock, after the v3 letterpress direction.
   Tokens lifted verbatim from "Myli QR Menu v3.dc.html". */
:root {
  --ink:      #17356B;
  --ink-mid:  #4E7FB5;
  --ink-pale: #8FA6C4;
  --cream:    #F4F0E6;
  --stock:    #E9E4D6;
  --stock-2:  #E6E0D1;
  --muted:    #8C8676;
  --muted-2:  #9A9484;
  --body:     #3E4757;
  --body-2:   #5A6272;
  --body-3:   #7B8598;
  --rule:     rgba(23, 53, 107, .12);
  --rule-mid: rgba(23, 53, 107, .24);
  --rule-str: rgba(23, 53, 107, .40);
  --serif:    'Marcellus SC', serif;
  --sans:     Jost, sans-serif;
  --pad:      22px;
}

* { box-sizing: border-box; }
/* The sheet is the whole app: nothing at page level ever scrolls, only the lists
   inside it. Without this the guest can pan the menu sideways by the width the
   olive corner bleeds off the edge. */
html, body { overflow: hidden; overscroll-behavior: none; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--stock-2);
  font-family: var(--sans);
  color: var(--body);
  /* the phone is the canvas; on desktop the sheet sits centred on the stock */
  display: flex;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
}
#root {
  width: 100%;
  max-width: 480px;
  background: var(--cream);
  position: relative;
  overflow: clip;
  display: flex;
  flex-direction: column;
  /* The sheet is exactly one screen tall: header and rail stay put while the
     list scrolls under them, which is also what the rail's observer roots on. */
  height: 100vh;
  height: 100dvh;
}

img { display: block; max-width: 100%; }
/* every engraving sinks into the cream rather than sitting on it */
.art { mix-blend-mode: multiply; pointer-events: none; }

button {
  font: inherit; color: inherit; background: none;
  border: 0; margin: 0; padding: 0; cursor: pointer;
  text-align: left; -webkit-tap-highlight-color: transparent;
}
:focus-visible { outline: 2px solid var(--ink-mid); outline-offset: 2px; }

.screen { display: none; flex-direction: column; flex: 1; min-height: 0; }
.screen[data-active] { display: flex; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- welcome */
#welcome { position: relative; align-items: center; overflow-y: auto; }
#welcome .wash {
  position: absolute; inset: 0;
  background-image: url(img/pattern.webp);
  background-size: 300px;
  opacity: .16;
  mix-blend-mode: multiply;
}
#welcome .wash::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(244,240,230,.55) 0%, rgba(244,240,230,.88) 40%, var(--cream) 100%);
}
#welcome > *:not(.wash) { position: relative; }
#welcome .lockup { width: 206px; margin: 34px auto 0; }
#welcome .intro {
  font: 400 14px/1.9 var(--serif);
  letter-spacing: .05em; color: #3E4757;
  text-align: center; padding: 26px 46px 0; text-wrap: pretty;
}
#welcome .spacer { flex: 1; min-height: 24px; }
#welcome .foot { width: 100%; padding: 0 26px 34px; display: flex; flex-direction: column; gap: 11px; }

.langs { display: flex; gap: 6px; justify-content: center; padding-bottom: 10px; flex-wrap: wrap; }
.langs button {
  font: 400 11px/1 var(--sans); letter-spacing: .1em;
  padding: 10px 13px; border: 1px solid rgba(23,53,107,.3); color: #2F4368;
}
.langs button[aria-pressed="true"] {
  font-weight: 500; background: var(--ink); color: var(--cream); border-color: var(--ink);
}

.btn-solid {
  width: 100%;
  min-height: 58px; background: var(--ink); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font: 400 17px/1 var(--serif); letter-spacing: .18em;
}
.btn-ghost {
  width: 100%;
  min-height: 54px; border: 1px solid rgba(23,53,107,.32);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; gap: 12px;
}
.btn-ghost .l { font: 400 14px/1.25 var(--serif); letter-spacing: .07em; color: var(--ink); }
.btn-ghost .r { font: 500 11px/1.3 var(--sans); letter-spacing: .14em; color: var(--ink-mid); text-align: right; }

/* ------------------------------------------------------------------- menu */
#menu { position: relative; }
#menu .corner {
  position: absolute; top: -16px; right: -30px; width: 170px;
  transform: scaleX(-1); opacity: .5; z-index: 0;
}
.top {
  position: relative; z-index: 1;
  padding: 18px var(--pad) 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.top .home { width: 150px; flex-shrink: 0; }
.top .home img { width: 100%; }
.chip {
  font: 500 10px/1 var(--sans); letter-spacing: .14em;
  padding: 10px 12px; background: var(--ink); color: var(--cream);
  flex-shrink: 0;
}

.tabs {
  position: relative; z-index: 1;
  display: flex; gap: 20px; align-items: center;
  padding: 0 var(--pad) 12px;
  border-bottom: 1px solid rgba(23,53,107,.16);
  margin-bottom: 6px;
}
.tabs button {
  font: 400 13px/1 var(--serif); letter-spacing: .14em;
  color: var(--muted); padding-bottom: 5px;
  border-bottom: 2px solid transparent;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.rail {
  position: relative; z-index: 1;
  display: flex; gap: 18px;
  padding: 6px var(--pad) 0;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 86%, transparent 100%);
          mask-image: linear-gradient(90deg, #000 0, #000 86%, transparent 100%);
}
.rail::-webkit-scrollbar { display: none; }
.rail button {
  font: 400 15px/1 var(--serif); letter-spacing: .04em;
  white-space: nowrap; padding-bottom: 9px;
  color: var(--muted-2); border-bottom: 2px solid transparent;
}
.rail button[aria-current="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.list { position: relative; z-index: 1; flex: 1; min-height: 0; overflow-y: auto;
        padding: 0 var(--pad) 8px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

.sec-head { display: flex; align-items: baseline; gap: 12px; padding: 22px 0 4px; }
.sec-head h2 { margin: 0; font: 400 23px/1.15 var(--serif); letter-spacing: .04em; color: var(--ink); }
.sec-head .rule { flex: 1; height: 1px; background: var(--rule-mid); }
.sec-head .count { font: 400 11px/1 var(--sans); letter-spacing: .12em; color: var(--muted); white-space: nowrap; }

/* drinks groups use the lighter ink and a tighter head */
.grp-head { display: flex; align-items: center; gap: 10px; padding: 18px 0 8px; }
.grp-head h2 { margin: 0; font: 400 15px/1 var(--serif); letter-spacing: .14em; color: var(--ink-mid); }
.grp-head .rule { flex: 1; height: 1px; background: rgba(23,53,107,.22); }

/* a div wrapping a button, so the expand panel below can hold buttons of its own */
.row { border-bottom: 1px solid var(--rule); }
.row .tap { display: block; width: 100%; padding: 13px 0 12px; cursor: pointer; }
.line { display: flex; align-items: flex-end; gap: 7px; }
.line .n { font: 400 17px/1.25 var(--serif); letter-spacing: .02em; color: var(--ink); }
.line .v { font: 300 10px/1 var(--sans); letter-spacing: .08em; color: var(--muted-2); white-space: nowrap; }
/* the dotted leader carries the eye to the price, exactly as on the printed card */
.line .lead { flex: 1; border-bottom: 1.5px dotted var(--rule-str); transform: translateY(-5px); min-width: 18px; }
.line .p { font: 400 15px/1 var(--sans); color: var(--ink); white-space: nowrap; }
.line .p:empty::before { content: ""; }

.sub { display: flex; align-items: baseline; gap: 8px; padding-top: 4px; }
.sub .d { flex: 1; font: 300 13px/1.5 var(--sans); color: var(--body-2); text-wrap: pretty; }
.sub .marks { font: 500 9px/1.4 var(--sans); letter-spacing: .16em; color: var(--ink-mid); white-space: nowrap; }

.variants { padding: 6px 0 0 0; display: flex; flex-direction: column; gap: 4px; }
.variants .line .n { font: 300 13px/1.3 var(--sans); color: var(--body-2); letter-spacing: 0; }

.expand { margin-top: 12px; padding: 14px 16px; background: var(--stock); display: flex; flex-direction: column; gap: 9px; }
.expand .k { font: 400 10px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--body-3); }
.expand .val { font: 300 14px/1.5 var(--sans); color: var(--body); }

.divider { width: 100%; margin-top: 14px; opacity: .85; }
.tail { padding: 16px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tail img { width: 200px; opacity: .9; }
.tail .say { font: 400 14px/1.5 var(--serif); letter-spacing: .07em; color: var(--body); text-align: center; }

.notes { padding: 14px 0 0; border-top: 1px solid rgba(23,53,107,.14); margin-top: 18px; }
.notes p { margin: 0 0 8px; font: 300 12px/1.6 var(--sans); color: var(--body-3); text-wrap: pretty; }

/* ------------------------------------------------------------------ board */
#board { background: var(--ink); color: var(--cream); }
#board .head { padding: 26px var(--pad) 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
#board .head img { width: 74px; filter: invert(1); mix-blend-mode: screen; opacity: .9; }
#board h1 { margin: 8px 0 0; font: 400 27px/1 var(--serif); letter-spacing: .06em; color: var(--cream); }
#board .date { font: 300 12px/1 var(--sans); letter-spacing: .1em; color: rgba(244,240,230,.6); }
#board .list { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 26px 0; }
#board .row { border-bottom-color: rgba(244,240,230,.18); padding: 15px 0; }
#board .line .n, #board .line .p { color: var(--cream); }
#board .line .lead { border-bottom-color: rgba(244,240,230,.35); }
#board .sub .d { color: rgba(244,240,230,.62); }
#board .foot { padding: 6px 26px 30px; display: flex; flex-direction: column; gap: 10px; }
#board .cta {
  width: 100%;
  min-height: 56px; background: var(--cream); color: var(--ink);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font: 400 15px/1.3 var(--serif); letter-spacing: .14em; padding: 0 16px;
}
#board .hours { text-align: center; font: 300 12px/1 var(--sans); letter-spacing: .06em; color: rgba(244,240,230,.55); }

/* ---------------------------------------------------------------- filters */
#filters { position: relative; }
#filters .corner { position: absolute; top: -18px; left: -28px; width: 165px; opacity: .5; z-index: 0; }
#filters .head { position: relative; z-index: 1; padding: 26px var(--pad) 14px; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
#filters h1 { margin: 0; font: 400 25px/1.15 var(--serif); letter-spacing: .04em; color: var(--ink); }
#filters .sub2 { font: 300 13px/1 var(--sans); color: var(--muted); }
#filters .body { position: relative; z-index: 1; flex: 1; min-height: 0; overflow-y: auto; padding: 6px var(--pad) 0; }
.diet { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 19px 0; border-bottom: 1px solid var(--rule); }
.diet .t { font: 400 18px/1.2 var(--serif); letter-spacing: .03em; color: var(--ink); }
.diet .s { font: 300 12px/1.4 var(--sans); color: var(--muted); }
.track { width: 48px; height: 26px; padding: 3px; display: flex; justify-content: flex-start; background: #D6D0BF; flex-shrink: 0; }
.diet[aria-pressed="true"] .track { justify-content: flex-end; background: var(--ink); }
.knob { width: 20px; height: 20px; background: var(--cream); }
.allergen-head { font: 400 10px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: 24px 0 12px; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chips button, .chips span {
  font: 400 13px/1 var(--sans); padding: 11px 14px;
  border: 1px solid rgba(23,53,107,.26); color: var(--body);
}
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
#filters .foot { padding: 16px var(--pad) 26px; }
#filters .foot .btn-solid { font: 400 15px/1 var(--serif); letter-spacing: .14em; }

.empty { padding: 40px 0; text-align: center; font: 300 14px/1.6 var(--sans); color: var(--body-3); }

/* ------------------------------------------------- add to table / the bar */
.acts { display: flex; gap: 8px; padding-top: 2px; }
.acts .add {
  flex: 1; min-height: 42px; background: var(--ink); color: var(--cream);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font: 500 11px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  padding: 0 10px;
}
.acts .info {
  width: 42px; flex-shrink: 0; border: 1px solid rgba(23,53,107,.3);
  display: flex; align-items: center; justify-content: center;
  font: 400 15px/1 Marcellus, serif; color: var(--ink);
}

/* the bar is the flex footer of #menu — .list is flex:1, so nothing needs pinning */
.tablebar {
  position: relative; z-index: 1; flex-shrink: 0;
  margin: 10px var(--pad) 24px;
  min-height: 54px; background: var(--ink); color: var(--cream);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; gap: 12px;
}
.tablebar .l { font: 500 11px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.tablebar .r { font: 400 15px/1 var(--sans); white-space: nowrap; }

/* ------------------------------------------------------------- dish detail */
#dish { position: relative; }
/* no dish photography exists, so the band carries the brand pattern instead */
#dish .shot {
  position: relative; flex-shrink: 0; height: 220px; overflow: hidden;
  background: var(--stock);
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 16px;
}
#dish .shot .wash {
  position: absolute; inset: 0;
  background-image: url(img/pattern.webp); background-size: 300px;
  opacity: .22; mix-blend-mode: multiply;
}
#dish .close {
  position: relative;
  font: 500 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  padding: 10px 12px; background: var(--cream); color: var(--ink);
}
#dish .body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 22px var(--pad) 0; display: flex; flex-direction: column; gap: 14px;
}
#dish h1 { margin: 0; font: 400 29px/1.15 var(--serif); letter-spacing: .02em; color: var(--ink); }
#dish .line { margin-top: -6px; }
#dish .p2 { font: 400 22px/1 var(--sans); color: var(--ink); }
#dish .marks { font: 500 10px/1.4 var(--sans); letter-spacing: .16em; color: var(--ink-mid); white-space: nowrap; }
#dish .desc { margin: 0; font: 300 16px/1.65 var(--sans); color: var(--body); text-wrap: pretty; }
#dish .alg { display: flex; flex-direction: column; gap: 9px; }
#dish .alg .k { font: 400 10px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
#dish .chips span { background: var(--stock); border-color: transparent; }
/* the rule closes the page, so it sinks to the foot when the dish reads short */
#dish .divider { margin-top: auto; opacity: .9; }
#dish .note { margin: 0 0 4px; font: 300 12px/1.55 var(--sans); color: var(--body-3); text-wrap: pretty; }
#dish .foot { flex-shrink: 0; padding: 12px var(--pad) 26px; }
#dish .foot .btn-solid {
  font: 500 12px/1.3 var(--sans); letter-spacing: .16em;
  text-transform: uppercase; text-align: center; padding: 0 16px;
}

/* ----------------------------------------------------------------- my table */
#table { position: relative; }
/* the crest signs the bill, at a tenth of an ink so the slip stays readable */
#table .crest {
  position: absolute; top: 96px; left: 50%; width: 84%; max-width: 330px;
  transform: translateX(-50%); opacity: .1; z-index: 0;
}
#table .head {
  position: relative; z-index: 1;
  padding: 26px var(--pad) 16px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid rgba(23,53,107,.16);
}
#table h1 { margin: 0; font: 400 27px/1 var(--serif); letter-spacing: .04em; color: var(--ink); }
#table .sub2 { padding-top: 5px; font: 300 12px/1.4 var(--sans); color: var(--muted); }
.chip-ghost {
  font: 500 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-mid); flex-shrink: 0; padding: 4px 0 2px;
}
#table .list { padding: 4px var(--pad) 0; }
.slip { display: flex; align-items: baseline; gap: 11px; padding: 14px 0; border-bottom: 1px solid rgba(23,53,107,.1); }
.slip .q { width: 26px; flex-shrink: 0; font: 400 13px/1 var(--sans); color: var(--ink-pale); }
.slip .main { flex: 1; min-width: 0; }
.slip .step { display: flex; gap: 7px; padding-top: 7px; }
.slip .step button {
  width: 30px; height: 30px; border: 1px solid rgba(23,53,107,.26);
  display: flex; align-items: center; justify-content: center;
  font: 400 15px/1 var(--sans); color: var(--ink);
}
#table .sum { display: flex; align-items: baseline; justify-content: space-between; padding: 20px 0 0; }
#table .sum .k { font: 400 15px/1 var(--serif); letter-spacing: .14em; color: var(--body-2); }
#table .sum .v { font: 400 25px/1 var(--sans); color: var(--ink); }
#table .legal { margin: 0; padding-top: 10px; font: 300 11px/1.6 var(--sans); color: var(--body-3); text-wrap: pretty; }
#table .foot { flex-shrink: 0; padding: 12px var(--pad) 26px; }
#table .foot .btn-solid {
  font: 400 15px/1.3 var(--serif); letter-spacing: .14em; text-align: center; padding: 0 16px;
}

@media (prefers-reduced-motion: no-preference) {
  .screen[data-active] { animation: fade .18s ease-out; }
  @keyframes fade { from { opacity: 0 } to { opacity: 1 } }
}
