/* Snack Time v2 – mobile first. Palette taken from the counter: mustard, ketchup, pickle, charred bun. */
:root {
  --mustard: #e0a427;
  --ketchup: #d6281c;
  --ketchup-dk: #b31f15;
  --pickle: #2e6b3b;
  --bun: #231a14;
  --paper: #ffffff;
  --flour: #f5f4f1;
  --line: #e6e2da;
  --muted: #6b625a;
  --tint-k: #fbe4e1;
  --tint-p: #e2eee4;
  --r: 16px;
  --font: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body { margin: 0; font: 400 1rem/1.5 var(--font); font-optical-sizing: auto; color: var(--bun); background: var(--paper); }
body.lock { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ketchup); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--bun); color: #fff; padding: .6rem 1rem; border-radius: 10px; z-index: 50; }
.skip:focus { top: 8px; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.3rem;
  border-radius: 999px; border: 2px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.1; }
.btn-ink { background: var(--bun); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-line { background: transparent; border-color: var(--bun); }
.btn-line:hover { background: rgba(35, 26, 20, .06); }
.btn-red { background: var(--ketchup); color: #fff; }
.btn-red:hover { background: var(--ketchup-dk); }
.btn-red:disabled { background: #c9c3bb; cursor: not-allowed; }
.btn-sm { min-height: 40px; padding: .45rem 1rem; font-size: .95rem; }
.btn-wide { width: 100%; font-size: 1.05rem; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; background: var(--mustard); }
.logo { white-space: nowrap; display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; margin-right: auto; }
.status { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: .8rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .65); white-space: nowrap; }
.status::before { content: ''; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .4rem; background: var(--muted); vertical-align: .05em; }
.status.is-open::before { background: var(--pickle); }
.lang { font-weight: 800; text-decoration: none; min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border-radius: 999px; }
.lang:hover { background: rgba(255, 255, 255, .5); }

@media (max-width: 400px) {
  .top { padding-left: .75rem; padding-right: .5rem; }
  .logo { font-size: 1.02rem; gap: .35rem; }
  .logo svg { width: 30px; height: 30px; }
  .status { padding: .28rem .55rem; }
}
/* ---------- hero ---------- */
.hero { background: var(--mustard); padding: 1.2rem 1rem 0; overflow: hidden; display: grid; }
.hero h1 { font-size: clamp(2.35rem, 10.5vw, 4.8rem); font-weight: 800; letter-spacing: -.035em; line-height: .95; max-width: 13ch; }
.lead { font-size: 1.08rem; margin: .9rem 0 1.2rem; max-width: 38ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .6rem; }
.facts { list-style: none; padding: 0; margin: 1.1rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.facts li { font-size: .85rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .55); }
.hero-art { margin: .4rem -1rem 0; }
.hero-art img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 70% 50%;
  -webkit-mask-image: radial-gradient(ellipse 62% 62% at 62% 56%, #000 48%, transparent 100%); mask-image: radial-gradient(ellipse 62% 62% at 62% 56%, #000 48%, transparent 100%); }
.hero-art img { width: 100%; animation: slidein .9s cubic-bezier(.2, .8, .2, 1) both .1s; }
@keyframes slidein { from { transform: translateX(-40%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- category chips ---------- */
.chips { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.chips-in { display: flex; gap: .4rem; overflow-x: auto; padding: .6rem 1rem; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips-in::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; text-decoration: none; font-weight: 700; font-size: .95rem; padding: .5rem .95rem; border-radius: 999px; background: var(--flour); min-height: 40px; display: inline-flex; align-items: center; }
.chip.on { background: var(--bun); color: #fff; }

/* ---------- menu ---------- */
.cat { padding: 1.6rem 1rem .4rem; }
.cat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.cat-head h2 { font-size: clamp(1.7rem, 6.5vw, 2.4rem); font-weight: 800; letter-spacing: -.025em; }
.cat-note { margin: .35rem 0 0; color: var(--muted); font-size: .92rem; max-width: 40ch; }
.cat-art, .cat-photo { width: 104px; height: 84px; object-fit: contain; flex: none; border-radius: 14px; padding: 4px; }
.cat-photo { object-fit: cover; padding: 0; }
.cat.has-photo > .cat-photo { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 18px; margin-bottom: 1rem; }
.tone-0 .cat-art { background: #f7d27a; }
.tone-1 .cat-art { background: var(--tint-k); }
.tone-2 .cat-art { background: var(--tint-p); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .9rem; padding: .95rem 0; border-bottom: 1px solid var(--line); }
.row.has-pic { grid-template-columns: 1fr 116px; grid-template-areas: "t p"; }
.row.has-pic .row-text { grid-area: t; }
.row.has-pic .row-pic { grid-area: p; }
.row.has-pic .qty { grid-area: p; align-self: end; justify-self: end; margin: 0 -6px -8px 0; box-shadow: 0 0 0 3px #fff; }
.row.has-pic .qty button { width: 40px; height: 40px; font-size: 1.3rem; }
.row-text h3 { font-size: 1.06rem; font-weight: 700; letter-spacing: -.005em; }
.row-text p { margin: .2rem 0 .3rem; color: var(--muted); font-size: .9rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.row-text h3 + .price { display: inline-block; margin-top: .2rem; }
.row-pic { width: 116px; height: 87px; object-fit: cover; border-radius: 10px; background: var(--flour); }
.qty { display: flex; align-items: center; border-radius: 999px; }
.qty button { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; font-size: 1.45rem; font-weight: 700; line-height: 1; display: grid; place-items: center; }
.q-plus { background: var(--bun); color: #fff; }
.q-plus:hover { background: #000; }
.q-minus { background: transparent; }
.q-n { min-width: 1.6rem; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.qty.has { background: #f7c34a; }
.qty.has .q-plus { background: transparent; color: var(--bun); }
.qty.bump { animation: bump .25s ease; }
@keyframes bump { 50% { transform: scale(1.08); } }
.cat--compact .row { padding: .7rem 0; }
.cat--compact .row-text h3 { font-size: 1rem; font-weight: 600; }
.origin { color: var(--muted); font-size: .88rem; padding: 1rem; margin: 0; }

/* ---------- order sheet (bottom sheet on phones, side panel on desktop) ---------- */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--paper); border-radius: 22px 22px 0 0;
  max-height: 90dvh; display: flex; flex-direction: column; box-shadow: 0 -10px 40px rgba(35, 26, 20, .22);
  transform: translateY(105%); visibility: hidden; transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .28s; }
.sheet.open { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: .5rem 1rem .4rem; flex: none; }
.sheet-head h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; outline: none; }
.x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--flour); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 1rem calc(1.2rem + var(--safe-b)); }
.backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(35, 26, 20, .45); }
.empty { color: var(--muted); margin: .2rem 0 1rem; }
.lines { list-style: none; margin: 0 0 1rem; padding: 0; }
.lines li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.lines .l-name { font-weight: 600; }
.lines .l-sum { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 4.5rem; text-align: right; }
.lines .qty button { width: 38px; height: 38px; font-size: 1.25rem; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 1rem; border: 0; border-radius: 999px; background: var(--flour); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; justify-content: center; align-items: center; min-height: 44px; border-radius: 999px; font-weight: 700; }
.seg input:checked + span { background: var(--bun); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--ketchup); outline-offset: 2px; }
.f { margin-bottom: .85rem; }
.f label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.f input, .f select, .f textarea { width: 100%; min-height: 48px; padding: .65rem .8rem; border: 1.5px solid #cfc9bf; border-radius: 12px; background: #fff; font-size: 1rem; }
.f textarea { min-height: 72px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--bun); outline: none; box-shadow: 0 0 0 3px rgba(247, 184, 27, .55); }
.f2 { display: grid; grid-template-columns: 2fr 3fr; gap: .6rem; }
.quote { font-weight: 700; min-height: 1.3em; margin: .55rem 0 .2rem; }
.fine { color: var(--muted); font-size: .84rem; margin: .4rem 0 .9rem; }
#delivery-fields { margin-bottom: .4rem; }
.hp { position: absolute; left: -9999px; }
.check { display: flex; gap: .6rem; align-items: center; font-weight: 600; margin: .2rem 0 .8rem; cursor: pointer; min-height: 44px; }
.check input { width: 1.3rem; height: 1.3rem; accent-color: var(--ketchup); flex: none; }
.note-pay, .note-warn { background: var(--tint-k); border-radius: 12px; padding: .7rem .85rem; font-size: .92rem; margin: 0 0 .9rem; }
.note-warn { font-weight: 700; }
.sum { margin: .4rem 0 .6rem; }
.sum div { display: flex; justify-content: space-between; padding: .2rem 0; }
.sum dt, .sum dd { margin: 0; }
.sum dd { font-variant-numeric: tabular-nums; }
.sum-total { font-weight: 800; font-size: 1.2rem; border-top: 2px solid var(--bun); margin-top: .3rem; padding-top: .45rem !important; }
.err { color: var(--ketchup-dk); font-weight: 700; min-height: 1.2em; margin: .2rem 0 .6rem; }
.result { background: var(--tint-p); border-radius: var(--r); padding: 1rem; margin-top: 1rem; outline: none; }
.result h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.result p { margin: 0 0 .6rem; }
.result pre { white-space: pre-wrap; background: #fff; border-radius: 10px; padding: .75rem; font-size: .85rem; margin: 0 0 .8rem; font-family: ui-monospace, Menlo, Consolas, monospace; }

.cartbar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 30; display: flex; align-items: center; gap: .75rem;
  min-height: 58px; padding: .5rem 1.1rem .5rem .55rem; border: 0; border-radius: 18px; background: var(--ketchup); color: #fff; font-weight: 800; font-size: 1.05rem;
  cursor: pointer; box-shadow: 0 10px 28px rgba(214, 40, 28, .38); }
.cartbar:hover { background: var(--ketchup-dk); }
.cb-n { min-width: 2.2rem; height: 2.2rem; border-radius: 12px; background: rgba(0, 0, 0, .22); display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.cb-label { flex: 1; text-align: left; }
.cb-sum { font-variant-numeric: tabular-nums; }
.cartbar.bump { animation: bump .25s ease; }
body.has-bar .foot { padding-bottom: calc(6rem + var(--safe-b)); }

/* ---------- find + faq + footer ---------- */
.find, .faq { padding: 2.4rem 1rem 1rem; }
.find h2, .faq h2 { font-size: clamp(1.7rem, 6.5vw, 2.4rem); font-weight: 800; letter-spacing: -.025em; margin-bottom: 1rem; }
.find-grid { display: grid; gap: 1rem; }
.find-card { background: var(--flour); border-radius: var(--r); padding: 1.2rem; }
.find-card h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.addr { font-size: 1.35rem; font-weight: 700; line-height: 1.25; margin: 0 0 1rem; }
.find-btns { display: flex; gap: .6rem; flex-wrap: wrap; }
.also { margin: 1rem 0 0; color: var(--muted); font-size: .92rem; }
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { text-align: left; padding: .45rem 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours td { text-align: right; }
.hours tr.today th, .hours tr.today td { font-weight: 800; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: .2rem; top: .8rem; font-size: 1.5rem; font-weight: 700; }
.faq details[open] summary::after { content: '–'; }
.faq summary h3 { font-size: 1.05rem; font-weight: 700; display: inline; }
.faq details p { margin: 0 0 1rem; color: #3f3731; max-width: 60ch; }
.foot { margin-top: 2rem; padding: 1.6rem 1rem 2rem; background: var(--bun); color: #e9e3db; font-size: .9rem; }
.foot p { margin: 0 0 .3rem; }

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .hero, .cat, .find, .faq, .origin { padding-left: 2rem; padding-right: 2rem; }
  .chips-in { padding-left: 2rem; padding-right: 2rem; }
  .top { padding-left: 2rem; padding-right: 2rem; }
  .cat-art, .cat-photo { width: 150px; height: 120px; }
  .cat.has-photo > .cat-photo { aspect-ratio: 21 / 9; }
  .row.has-pic { grid-template-columns: 1fr 150px; }
  .row-pic { width: 150px; height: 112px; }
  .cat--compact .rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  .find-grid { grid-template-columns: 1fr 1fr; }
  .sheet { left: 50%; right: auto; width: 560px; transform: translate(-50%, 105%); }
  .sheet.open { transform: translate(-50%, 0); }
  .cartbar { left: 50%; right: auto; width: 520px; transform: translateX(-50%); }
}
@media (min-width: 1024px) {
  html { scroll-padding-top: 72px; }
  .hero { grid-template-columns: 1.15fr 1fr; align-items: center; padding: 2.5rem max(2rem, calc((100vw - 1200px) / 2)) 2rem; }
  .hero-art { margin: 0 -2rem 0 0; align-self: stretch; }
  .hero-art img { height: 100%; min-height: 420px; }
  .shop { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 2.5rem; max-width: 1240px; margin: 0 auto; padding: 0 2rem; align-items: start; }
  .menu-col .cat, .menu-col .origin, .menu-col .chips-in { padding-left: 0; padding-right: 0; }
  .sheet { position: sticky; top: 1rem; left: auto; width: auto; margin-top: 1rem; transform: none; visibility: visible; transition: none;
    max-height: calc(100vh - 2rem); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 6px 24px rgba(35, 26, 20, .08); z-index: 10; }
  .sheet.open { transform: none; }
  .sheet-grab, .x, .cartbar, .backdrop { display: none !important; }
  .sheet-head { padding-top: 1rem; }
  body.has-bar .foot { padding-bottom: 2rem; }
  .find, .faq { max-width: 1240px; margin: 0 auto; padding-left: 2rem; padding-right: 2rem; }
  .foot { padding-left: max(2rem, calc((100vw - 1176px) / 2)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
