/* Ottsville Inn — pickup ordering. Their red and gold on warm paper. */

:root {
  --red: #a81f1c;
  --red-deep: #7d1310;
  --red-ink: #5c0e0c;
  --red-tint: #f7e6e3;
  --gold: #dec793;
  --gold-soft: #ecdfc0;
  --gold-deep: #6a5014;
  --paper: #f8f3ea;
  --paper-2: #f1e9da;
  --paper-3: #e7dcc6;
  --white: #fffdf9;
  --ink: #221713;
  --ink-2: #5d4b42;
  --ink-3: #7d6a60;
  --line: #dccfb8;
  --line-soft: #e9dfcc;
  --green: #2c6b3a;
  --green-tint: #e4f0e4;
  --focus: #1b4fd8;
  --sans: "Figtree", "Segoe UI", system-ui, sans-serif;
  --serif: "DM Serif Display", "Iowan Old Style", Georgia, serif;
  --black: "UnifrakturCook", "DM Serif Display", Georgia, serif;
  --gutter: 5vw;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow: 0 10px 30px -12px rgba(60, 30, 10, .35), 0 2px 6px -2px rgba(60, 30, 10, .18);
  --shadow-lg: 0 24px 60px -20px rgba(60, 30, 10, .45), 0 6px 14px -6px rgba(60, 30, 10, .2);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hover: .45s;
  --top-h: 72px;
  --head-h: 72px;
  --rail-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--paper); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  accent-color: var(--red);
}
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: 0; text-wrap: balance; }
.welcome-h, .checkout-h, .confirm-h, .cat-h h2, .side-nav-h, .foot-name, .item-name, .sheet-name, .cart-panel-h h2, .summary-h h2, .block h2 { font-weight: 400; }
p { margin: 0; }
a { color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
::selection { background: var(--gold); color: var(--red-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--radius); }
* { scrollbar-color: var(--red) var(--white); scrollbar-width: auto; }
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: var(--white); border-left: 1px solid var(--line-soft); }
::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: var(--radius); border: 3px solid var(--white); min-height: 48px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-deep); }
[hidden] { display: none !important; }
main { padding-inline: var(--gutter); }
.bleed { margin-inline: calc(-1 * var(--gutter)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius); z-index: 100; }
.skip:focus { left: 8px; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 0 22px; border-radius: var(--radius); border: 2px solid transparent;
  font-weight: 600; font-size: 1rem; white-space: nowrap; text-decoration: none;
  transition: background var(--hover) var(--ease), color var(--hover) var(--ease), border-color var(--hover) var(--ease), transform var(--hover) var(--ease), box-shadow var(--hover) var(--ease);
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px -10px rgba(168, 31, 28, .7); }
.btn-primary:hover { background: var(--red-deep); transform: translateY(-1px); }
.btn-primary:disabled { background: var(--paper-3); color: var(--ink-2); box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--red); border-color: var(--red); }
.btn-ghost:hover { background: var(--red-tint); }
.btn-block { width: 100%; }
.btn-big { min-height: 62px; font-size: 1.1rem; justify-content: space-between; padding: 0 26px; }
.link { background: none; border: 0; padding: 0; color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.link-big { font-size: 1.05rem; margin-top: 8px; }
.back { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 0; color: var(--ink-2); font-weight: 600; }
.back svg { width: 22px; height: 22px; }
.back:hover { color: var(--red); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: var(--white); border-bottom: 1px solid var(--line-soft);
}
.top::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--red) 0 60%, var(--gold) 60% 100%); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px var(--gutter); min-height: var(--top-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brand-mark { width: 58px; height: auto; border-radius: var(--radius); flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--black); font-weight: 700; font-size: 1.7rem; line-height: 1; color: var(--red); letter-spacing: .01em; }
.brand-sub { font-size: .89rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.on-desk { display: none; }
.closed-note { display: none; }
.top-right { display: flex; align-items: center; gap: 10px; flex: none; }
.top-call { display: none; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; padding: 10px 14px; border-radius: var(--radius); transition: background var(--hover) var(--ease); }
.top-call:hover { background: var(--paper-2); }
.top-call svg { width: 20px; height: 20px; color: var(--red); }
.top-cart { display: none; align-items: center; gap: 10px; background: var(--paper-2); border: 0; border-radius: var(--radius); padding: 10px 18px; font-weight: 600; transition: background var(--hover) var(--ease); }
.top-cart:hover { background: var(--paper-3); }
.top-cart svg { width: 22px; height: 22px; }
.count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: var(--radius); background: var(--red); color: #fff; font-size: .85rem; font-weight: 700; }

/* ---------- Welcome band ---------- */
.welcome { background: var(--red); color: #fff; position: relative; overflow: hidden; }
.welcome::after { content: ""; position: absolute; inset: auto 0 0 0; height: 5px; background: var(--gold); }
.welcome-in { display: grid; grid-template-columns: 1fr; padding: 0 var(--gutter); }
.welcome-copy { padding: 22px 0 24px; display: flex; flex-direction: column; gap: 10px; }
.welcome-kind { font-weight: 600; color: var(--gold); font-size: 1rem; letter-spacing: .01em; }
.welcome-h { font-size: clamp(1.9rem, 6vw, 3rem); font-weight: 400; max-width: 18ch; }
.welcome-p { font-size: 1.05rem; color: #fbe9e6; max-width: 40ch; }
.status { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; margin-top: 6px; padding: 9px 16px 9px 12px; border-radius: var(--radius); background: rgba(255, 255, 255, .14); font-weight: 600; font-size: .95rem; backdrop-filter: blur(8px); }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: #74d68a; box-shadow: 0 0 0 4px rgba(116, 214, 138, .25); }
.status.is-closed .status-dot { background: var(--gold); box-shadow: 0 0 0 4px rgba(222, 199, 147, .25); }
.welcome-art { display: none; }
.welcome-art img { width: 100%; height: 100%; object-fit: cover; }
.welcome-art.no-photo { background: var(--red-deep); }
.welcome-art.no-photo img { display: none; }

.closed-note { background: var(--gold-soft); border-bottom: 1px solid var(--line); }
.closed-in { padding: 14px var(--gutter); display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--red-ink); }

/* ---------- Category rail (mobile) ---------- */
.rail { position: sticky; top: var(--head-h); z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line-soft); }
.rail-in { display: flex; gap: 8px; overflow-x: auto; padding: 12px var(--gutter) 12px; scrollbar-width: none; scroll-snap-type: x proximity; }
.rail-in::-webkit-scrollbar { display: none; }
.rail-in a { flex: none; scroll-snap-align: start; padding: 9px 16px; border-radius: var(--radius); background: var(--white); border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; transition: background var(--hover) var(--ease), color var(--hover) var(--ease), border-color var(--hover) var(--ease); }
.rail-in a.is-active { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Menu layout ---------- */
.menu-layout { display: grid; grid-template-columns: 1fr; padding: 0 0 120px; }
.side-nav, .cart-panel { display: none; }
.menu { display: flex; flex-direction: column; gap: 8px; container-type: inline-size; min-width: 0; }

.cat { padding: 30px 0 10px; scroll-margin-top: calc(var(--head-h) + var(--rail-h) + 8px); }
.cat-h { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.cat-h h2 { font-size: 1.9rem; }
.cat-h .cat-n { color: var(--ink-3); font-weight: 500; font-size: 1rem; }
.cat-note { color: var(--ink-2); margin-top: 6px; }
.items { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }

.item {
  display: grid; grid-template-columns: 1fr 108px; gap: 14px; align-items: stretch;
  width: 100%; text-align: left; background: var(--white); border: 1.5px solid var(--line-soft); border-radius: var(--radius);
  padding: 14px 14px 14px 18px; min-height: 136px; position: relative;
  transition: border-color var(--hover) var(--ease), box-shadow var(--hover) var(--ease), transform var(--hover) var(--ease);
}
.item:hover { border-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-2px); }
.item-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.item-name { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; line-height: 1.15; color: var(--ink); }
.item-desc { color: var(--ink-2); font-size: .95rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: auto; padding-top: 6px; }
.item-price { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.item-from { color: var(--ink-3); font-weight: 500; font-size: .9rem; white-space: nowrap; margin-left: -4px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius); background: var(--gold-soft); color: var(--gold-deep); font-weight: 700; font-size: .84rem; }
.tag-call { background: var(--red-tint); color: var(--red-ink); }
.item-photo { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); aspect-ratio: 1; align-self: center; width: 108px; }
.item-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--hover) var(--ease); }
.item:hover .item-photo img { transform: scale(1.04); }
.item-photo.no-photo { background: repeating-linear-gradient(135deg, var(--paper-2) 0 8px, var(--paper-3) 8px 10px); }
.item-photo.no-photo img { display: none; }
.item-add {
  position: absolute; right: -6px; bottom: -6px; width: 42px; height: 42px; border-radius: var(--radius);
  background: var(--white); color: var(--red); border: 1.5px solid var(--line); display: grid; place-items: center;
  box-shadow: 0 4px 12px -4px rgba(60, 30, 10, .4);
  transition: background var(--hover) var(--ease), color var(--hover) var(--ease), border-color var(--hover) var(--ease);
}
.item-add svg { width: 22px; height: 22px; stroke-width: 2.5; }
.item:hover .item-add { background: var(--red); color: #fff; border-color: var(--red); }
.item.is-call .item-add, .item.is-soldout .item-add { display: none; }
.item.is-soldout { opacity: .6; cursor: not-allowed; }
.item.is-soldout .item-photo img { filter: grayscale(1); }

/* ---------- Cart bar (mobile) ---------- */
.cart-bar {
  position: fixed; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 35;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  min-height: 62px; padding: 0 18px 0 14px; border: 0; border-radius: var(--radius);
  background: var(--red); color: #fff; box-shadow: var(--shadow-lg); font-weight: 700; font-size: 1.05rem;
  transition: transform .5s var(--ease), background var(--hover) var(--ease);
}
.cart-bar.bump { animation: bump .6s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.04); } 100% { transform: scale(1); } }
.cart-bar-count { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--radius); background: #fff; color: var(--red); font-weight: 800; }
.cart-bar-label { text-align: left; }
.cart-bar-total { font-variant-numeric: tabular-nums; }

/* ---------- Cart lines and totals ---------- */
.cart-lines { display: flex; flex-direction: column; }
.line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.line-photo { position: relative; width: 64px; height: 64px; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.line-photo img { width: 100%; height: 100%; object-fit: cover; }
.line-photo.no-photo img { display: none; }
.line-text { min-width: 0; }
.line-qty { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; min-width: 26px; height: 24px; padding: 0 6px; border-radius: var(--radius) 0 0 0; background: var(--red); color: #fff; font-weight: 700; font-size: .82rem; }
.line-name { font-weight: 600; }
.line-opts { color: var(--ink-2); font-size: .92rem; line-height: 1.4; margin-top: 2px; }
.line-acts { display: flex; gap: 14px; margin-top: 6px; }
.line-acts button { background: none; border: 0; padding: 0; color: var(--red); font-weight: 600; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; }
.line-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-lines-compact .line { padding: 10px 0; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; }
.cart-lines-compact .line-photo { width: 48px; height: 48px; }
.cart-lines-compact .line-qty { min-width: 22px; height: 20px; font-size: .78rem; }
.cart-lines-compact .line-acts { display: none; }
.cart-totals { display: flex; flex-direction: column; gap: 6px; padding: 14px 0 16px; font-variant-numeric: tabular-nums; }
.tot { display: flex; justify-content: space-between; color: var(--ink-2); }
.tot.grand { color: var(--ink); font-weight: 700; font-size: 1.2rem; padding-top: 8px; margin-top: 4px; border-top: 1.5px solid var(--line); }
.cart-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 10px; color: var(--ink-3); text-align: center; }
.cart-empty svg { width: 40px; height: 40px; color: var(--gold-deep); }

/* ---------- Sheets / dialogs ---------- */
.sheet { border: 0; padding: 0; margin: 0; width: 100%; max-width: 100%; max-height: 100dvh; background: transparent; color: inherit; overflow: visible; }
.sheet::backdrop { background: rgba(34, 23, 19, .55); backdrop-filter: blur(3px); }
.sheet-form {
  position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; width: 100%;
  background: var(--white); border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; max-height: 92dvh;
  transform: translateY(24px); opacity: 0; transition: transform .55s var(--ease), opacity .4s var(--ease);
}
.sheet[open] .sheet-form { transform: none; opacity: 1; }
.sheet-close { flex: none; width: 44px; height: 44px; border-radius: var(--radius); border: 1.5px solid var(--line-soft); background: var(--white); color: var(--ink); display: grid; place-items: center; transition: background var(--hover) var(--ease), border-color var(--hover) var(--ease); }
.sheet-close:hover { background: var(--paper-2); border-color: var(--line); }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px 8px; }
.sheet-close svg { width: 22px; height: 22px; }
.sheet-scroll { overflow-y: auto; overscroll-behavior: contain; border-radius: inherit; }
.sheet-photo { aspect-ratio: 16 / 9; background: var(--paper-2); overflow: hidden; }
.sheet-photo img { width: 100%; height: 100%; object-fit: cover; }
.sheet-photo.no-photo { aspect-ratio: auto; height: 22px; background: linear-gradient(90deg, var(--red) 0 60%, var(--gold) 60% 100%); }
.sheet-photo.no-photo img { display: none; }
.sheet-body { overflow-x: hidden; display: flex; flex-direction: column; }
.sheet-main { display: flex; flex-direction: column; gap: 10px; padding: 0 20px 24px; }
.sheet-name { font-size: 1.7rem; padding-top: 4px; }
.sheet-desc { color: var(--ink-2); }
.sheet-price { font-weight: 700; font-size: 1.1rem; }
.sheet-foot { display: flex; gap: 12px; align-items: center; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); background: var(--white); }
.btn-add { flex: 1; justify-content: space-between; min-height: 58px; }
.err-sheet { position: absolute; left: 20px; right: 20px; bottom: 92px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.qty button { width: 48px; height: 54px; border: 0; background: transparent; color: var(--red); display: grid; place-items: center; transition: background var(--hover) var(--ease); }
.qty button:hover { background: var(--paper-2); }
.qty button svg { width: 20px; height: 20px; stroke-width: 2.5; }
.qty output { min-width: 34px; text-align: center; font-weight: 700; font-size: 1.1rem; }

.groups { display: flex; flex-direction: column; gap: 18px; margin-top: 6px; }
.group-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.group-h h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; }
.group-h .req { font-size: .84rem; font-weight: 700; padding: 3px 10px; border-radius: var(--radius); background: var(--paper-2); color: var(--ink-2); }
.group-h .req.is-missing { background: var(--red-tint); color: var(--red-ink); }
.group-h .req.is-done { background: var(--green-tint); color: var(--green); }
.opts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.opts[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius); border: 1.5px solid var(--line-soft); background: var(--white); cursor: pointer; transition: border-color var(--hover) var(--ease), background var(--hover) var(--ease); min-height: 50px; min-width: 0; }
.opt:hover { border-color: var(--gold); }
.opt:has(input:checked) { border-color: var(--red); background: var(--red-tint); }
.opt input { width: 22px; height: 22px; margin: 0; flex: none; }
.opt-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.opt-price { color: var(--ink-2); font-weight: 600; font-size: .92rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.opt-tag { font-size: .8rem; font-weight: 700; color: var(--gold-deep); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(8px); z-index: 50; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius); font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .35s var(--ease), transform .35s var(--ease); white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.field > span { font-weight: 600; font-size: .95rem; }
.field em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.field input, .field select, .field textarea { width: 100%; min-height: 54px; padding: 12px 14px; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--white); transition: border-color var(--hover) var(--ease), box-shadow var(--hover) var(--ease); }
.field textarea { min-height: 72px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8f7d73; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 4px var(--red-tint); }
.field input.is-bad { border-color: var(--red); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23221713' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; padding-right: 44px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; }
.check em { font-style: normal; color: var(--ink-3); }
.err { color: var(--red-ink); background: var(--red-tint); border-radius: var(--radius); padding: 10px 14px; font-weight: 600; }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 18px 0 120px; }
.checkout-h { font-size: 2.2rem; margin: 6px 0 4px; }
.block { background: var(--white); border: 1.5px solid var(--line-soft); border-radius: var(--radius-lg); padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.block h2 { font-size: 1.45rem; }
.segmented { display: grid; grid-template-columns: 1fr; gap: 10px; }
.seg { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); border: 1.5px solid var(--line-soft); cursor: pointer; transition: border-color var(--hover) var(--ease), background var(--hover) var(--ease); }
.seg:has(input:checked) { border-color: var(--red); background: var(--red-tint); }
.seg input { width: 22px; height: 22px; margin: 0; flex: none; }
.seg span { display: flex; flex-direction: column; }
.seg small { font-size: .92rem; color: var(--ink-2); }
.wallets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wallet { min-height: 56px; border-radius: var(--radius); border: 0; background: #111; color: #fff; display: grid; place-items: center; transition: transform var(--hover) var(--ease), background var(--hover) var(--ease); }
.wallet:hover { transform: translateY(-1px); background: #000; }
.wallet svg { height: 26px; width: auto; stroke: none; }
.wallet-google { background: var(--white); color: #111; border: 1.5px solid var(--line); }
.wallet-google:hover { background: var(--paper-2); }
.or { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font-weight: 600; font-size: .95rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field-row-3 { grid-template-columns: 1fr 1fr; }
.field-row-3 .field:last-child { grid-column: 1 / -1; }
.field > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-note { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: .95rem; }
.pay-note svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--green); }

.summary { background: var(--white); border: 1.5px solid var(--line-soft); border-radius: var(--radius-lg); padding: 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.summary-h { display: flex; justify-content: space-between; align-items: baseline; }
.summary-h h2 { font-size: 1.45rem; }
.tip { padding-top: 6px; }
.tip-h { font-weight: 700; margin-bottom: 8px; }
.tip-h em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.tip-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tip-opts button { min-height: 48px; border-radius: var(--radius); border: 1.5px solid var(--line-soft); background: var(--white); font-weight: 700; transition: border-color var(--hover) var(--ease), background var(--hover) var(--ease), color var(--hover) var(--ease); }
.tip-opts button[aria-pressed="true"] { background: var(--red); color: #fff; border-color: var(--red); }
.pickup-line { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); padding: 8px 0 4px; }
.fine { font-size: .9rem; color: var(--ink-3); }

/* ---------- Confirmation ---------- */
.confirm-layout { padding: 30px 0 80px; display: grid; place-items: start center; }
.confirm-card { width: 100%; max-width: 720px; background: var(--white); border: 1.5px solid var(--line-soft); border-radius: var(--radius-lg); padding: 34px 24px; display: flex; flex-direction: column; gap: 16px; text-align: center; box-shadow: var(--shadow); }
.confirm-mark { width: 84px; height: 84px; margin: 0 auto; border-radius: var(--radius-lg); background: var(--green-tint); color: var(--green); display: grid; place-items: center; }
.confirm-mark svg { width: 44px; height: 44px; stroke-width: 3; }
.confirm-kind { font-weight: 700; color: var(--ink-2); }
.confirm-h { font-size: 2.2rem; }
.confirm-p { font-size: 1.1rem; color: var(--ink-2); max-width: 44ch; margin: 0 auto; }
.track { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; }
.track::before { content: ""; position: absolute; left: 16.6%; right: 16.6%; top: 12px; height: 3px; background: var(--line); }
.track li { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; font-weight: 600; font-size: .95rem; color: var(--ink-3); }
.track-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--white); border: 3px solid var(--line); }
.track li.done { color: var(--green); }
.track li.done .track-dot { background: var(--green); border-color: var(--green); }
.track li.now { color: var(--red); }
.track li.now .track-dot { border-color: var(--red); background: var(--red-tint); animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(168, 31, 28, .35); } 60% { box-shadow: 0 0 0 10px rgba(168, 31, 28, 0); } }
.confirm-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 6px; }
.ask { text-align: left; background: var(--paper-2); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ask-h { font-family: var(--serif); font-size: 1.4rem; }
.ask-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ask-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--white); font-weight: 700; transition: border-color var(--hover) var(--ease), background var(--hover) var(--ease); }
.ask-btn svg { width: 22px; height: 22px; }
.ask-btn[aria-pressed="true"] { border-color: var(--red); background: var(--red-tint); }
.ask-up, .ask-down { display: flex; flex-direction: column; gap: 10px; }
.ask-done { font-weight: 600; color: var(--green); }
.confirm-details { text-align: left; border-top: 1px solid var(--line-soft); margin-top: 6px; }
.confirm-where { text-align: left; background: var(--paper-2); border-radius: var(--radius); padding: 16px; }
.confirm-where .foot-name { color: var(--ink); }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: #f3e9dc; margin-top: 30px; }
.foot-in { display: grid; grid-template-columns: 1fr; gap: 26px; padding: 40px var(--gutter) 50px; }
.foot-name { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; margin-bottom: 8px; color: #fff; }
.foot-link { color: var(--gold); }
.foot-small { color: #c9bba9; font-size: .95rem; margin-top: 8px; }
.hours { border-collapse: collapse; }
.hours th { text-align: left; font-weight: 600; padding: 3px 18px 3px 0; color: #fff; }
.hours td { padding: 3px 0; font-variant-numeric: tabular-nums; }

/* ---------- Reveal motion ---------- */
.rv { opacity: 0; filter: blur(10px); transform: translateY(14px); transition: opacity .9s var(--ease), filter .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; filter: blur(0); transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; filter: none; transform: none; transition: none; }
  .sheet-form, .btn, .item, .cart-bar, .toast { transition: none !important; animation: none !important; }
  .track li.now .track-dot { animation: none; }
}

/* ============ TABLET (≥ 640) ============ */
@container (min-width: 760px) {
  .items { grid-template-columns: 1fr 1fr; }
}
@container (min-width: 1400px) {
  .items { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row-3 { grid-template-columns: 1fr 1fr 1fr; }
  .field-row-3 .field:last-child { grid-column: auto; }
  .segmented { grid-template-columns: 1fr 1fr; }
  .confirm-actions { grid-template-columns: 1fr 1fr; }
  .foot-in { grid-template-columns: 1fr 1fr 1fr; }
  .top-call { display: inline-flex; }
  .sheet-form { max-width: min(760px, 94vw); left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -46%); border-radius: var(--radius-lg); max-height: 88dvh; }
  .sheet[open] .sheet-form { transform: translate(-50%, -50%); }
  .sheet-scroll { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .sheet-foot { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
}

/* ============ DESKTOP (≥ 1025) ============ */
@media (min-width: 1025px) {
  :root { --gutter: 10vw; --rail-h: 0px; }
  .top-cart { display: inline-flex; }
  .on-desk { display: inline; }
  .on-phone { display: none; }
  .closed-note { display: block; }
  .welcome-in { grid-template-columns: minmax(0, 1fr) minmax(380px, 560px); gap: 48px; align-items: center; }
  .welcome-copy { padding: 40px 0; gap: 14px; }
  .welcome-h { font-size: clamp(2.4rem, 3.4vw, 3.4rem); }
  /* The Inn's own front-of-building photo, shown whole and level: a framed picture, never a crop. */
  .welcome-art { display: block; margin: 28px 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .6); aspect-ratio: 4 / 3; }
  .welcome-art img { width: 100%; height: 100%; object-fit: cover; }
  .rail { display: none; }
  .menu-layout { grid-template-columns: 200px minmax(0, 1fr) 340px; gap: 36px; padding-top: 10px; padding-bottom: 80px; }
  .side-nav { display: block; position: sticky; top: calc(var(--head-h) + 20px); align-self: start; padding-top: 30px; }
  .side-nav-h { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; margin-bottom: 10px; }
  .side-nav ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
  .side-nav a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius); color: var(--ink-2); text-decoration: none; font-weight: 600; transition: background var(--hover) var(--ease), color var(--hover) var(--ease); border-left: 0; }
  .side-nav a:hover { background: var(--paper-2); color: var(--ink); }
  .side-nav a.is-active { background: var(--red); color: #fff; }
  .side-nav a small { font-size: .85rem; font-weight: 600; opacity: .7; }
  .cat { scroll-margin-top: calc(var(--head-h) + 16px); }
  .cart-panel { display: flex; flex-direction: column; position: sticky; top: calc(var(--head-h) + 20px); align-self: start; margin-top: 30px; background: var(--white); border: 1.5px solid var(--line-soft); border-radius: var(--radius-lg); padding: 22px 22px 20px; max-height: calc(100dvh - var(--head-h) - 40px); }
  .cart-panel-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
  .cart-panel-h h2 { font-size: 1.45rem; }
  .cart-panel-kind { font-weight: 700; color: var(--gold-deep); background: var(--gold-soft); padding: 3px 12px; border-radius: var(--radius); font-size: .88rem; }
  .cart-panel .cart-lines { overflow-y: auto; flex: 1; }
  .cart-bar { display: none; }
  .checkout-layout { grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; align-items: start; padding-top: 30px; }
  .checkout-side { position: sticky; top: calc(var(--head-h) + 24px); }
  .block { padding: 28px 28px; }
  .item { padding: 16px 16px 16px 20px; }
  .items { gap: 14px; }
}

@media (min-width: 1600px) {
  .menu-layout { grid-template-columns: 230px minmax(0, 1fr) 380px; gap: 48px; }
}

/* Dish window on desktop: wide, photo left, choices right, so there is less scrolling. */
@media (min-width: 1025px) {
  #item-sheet .sheet-form { max-width: min(1180px, 92vw); max-height: 86dvh; }
  #item-sheet .sheet-scroll { display: grid; grid-template-columns: minmax(300px, 36%) minmax(0, 1fr); overflow: hidden; align-items: stretch; }
  #item-sheet .sheet-photo { aspect-ratio: auto; position: relative; min-height: 420px; }
  #item-sheet .sheet-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
  #item-sheet .sheet-photo.no-photo { height: 100%; background: linear-gradient(160deg, var(--red) 0 70%, var(--gold) 70% 100%); }
  #item-sheet .sheet-body { position: relative; overflow: hidden; max-height: calc(86dvh - 90px); }
  #item-sheet .sheet-head { padding: 22px 28px 10px; }
  #item-sheet .sheet-main { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 28px 40px; }
  #item-sheet .sheet-body::after { content: ""; position: absolute; left: 0; right: 14px; bottom: 0; height: 40px; background: linear-gradient(rgba(255, 253, 249, 0), var(--white)); pointer-events: none; }
  #item-sheet .sheet-name { font-size: 2rem; }
  #item-sheet .sheet-foot { padding: 14px 28px; }
  #item-sheet .btn-add { max-width: 520px; margin-left: auto; }
}
@media (min-width: 1600px) {
  #item-sheet .sheet-form { max-width: min(1320px, 88vw); }
}
