/* The guest's phone. Structure and spacing live here; each restaurant's theme.css sets the colours, type and character. */
:root {
  --bg: #fff; --surface: #fff; --page: #ece9e2; --ink: #1c1b19; --muted: #575248; --line: #e2ddd2; --line-strong: #8b8474;
  --brand: #1c1b19; --brand-ink: #fff; --accent: #1c1b19; --tint: #f3f0e9; --danger: #a3200f; --spice: #c1361b; --diet: #1e6b43;
  --special-bg: #f3f0e9; --special-ink: var(--ink);
  --font-display: Georgia, serif; --font-text: system-ui, sans-serif;
  --radius: 10px; --radius-btn: 10px; --display-weight: 400;
  --focus: #1a5fd0;
  --bar-space: 0px;
}
body.guest { background: var(--page); color: var(--ink); font-family: var(--font-text); font-size: 1rem; }
#app { max-width: 760px; margin: 0 auto; background: var(--bg); min-height: 100dvh; padding-bottom: calc(var(--bar-space) + env(safe-area-inset-bottom, 0px)); }
body.has-bar { --bar-space: 84px; }
body.has-bar-2 { --bar-space: 148px; }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.15; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 18px; border: 2px solid transparent; border-radius: var(--radius-btn); background: none; font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center; }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-primary:disabled { background: var(--line); border-color: var(--line); color: var(--muted); }
.btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn-quiet:disabled { border-color: var(--line-strong); color: var(--muted); }
.btn-text { min-height: 44px; padding: 8px 6px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.btn-wide { width: 100%; }
.btn-grow { flex: 1; justify-content: space-between; }
.btn-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.btn-grow > span:first-child { text-align: left; }
.btn-wide .btn-price { margin-left: auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border: 2px solid var(--line-strong); border-radius: var(--radius-btn); background: var(--surface); }
.icon-btn .icon { width: 22px; height: 22px; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 44px; height: 44px; flex: none; }
.brand-kind { font-size: 0.875rem; line-height: 1.2; }
.brand-name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.625rem; line-height: 1.05; }
.lang { display: inline-flex; flex: none; border: 2px solid currentColor; border-radius: var(--radius-btn); overflow: hidden; }
.lang-btn { min-width: 46px; min-height: 44px; padding: 0 10px; border: 0; background: none; font-weight: 700; font-size: 0.9375rem; }
.lang-btn[aria-pressed="true"] { background: var(--lang-on-bg, var(--ink)); color: var(--lang-on-ink, var(--bg)); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

.hero img { width: 100%; aspect-ratio: 16 / 9; max-height: 300px; object-fit: cover; }
.hero-line { padding: 10px 16px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.0625rem; }

.under-hero { padding: 6px 16px 0; }
.statusline { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; width: 100%; min-height: 48px; padding: 6px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 0.9375rem; }
.statusline .icon { color: var(--diet); }
.statusline.is-closed .icon { color: var(--danger); }
.statusline-text { font-weight: 650; flex: 1; }
.statusline-more { text-decoration: underline; text-underline-offset: 3px; color: var(--muted); flex: none; margin-left: auto; }
.tableline { display: flex; align-items: center; gap: 6px; padding: 12px 0 2px; font-size: 1rem; }
.tableline .icon { color: var(--brand); }
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 12px; border: 2px solid var(--ink); border-radius: var(--radius-btn); overflow: hidden; }
.mode-btn { min-height: 46px; border: 0; background: var(--surface); font-weight: 650; }
.mode-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- specials ---------- */
.specials { margin: 16px 16px 0; padding: 16px; background: var(--special-bg); color: var(--special-ink); border-radius: var(--radius); }
.specials h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.25rem; margin-bottom: 4px; }
.special { padding: 10px 0; }
.special + .special { border-top: 1px solid var(--special-line, rgb(0 0 0 / 0.18)); }
.special h3 { font-size: 1.0625rem; font-weight: 700; }
.special p { font-size: 0.9375rem; margin-top: 2px; }
.special .btn { margin-top: 8px; min-height: 44px; }
.special.is-soldout h3 { text-decoration: line-through; }

/* ---------- search and filters ---------- */
.tools { padding: 16px 16px 8px; }
.search { position: relative; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input { width: 100%; height: 48px; padding: 0 14px 0 44px; border: 2px solid var(--line-strong); border-radius: var(--radius-btn); background: var(--surface); font-size: 1rem; }
.search-input::placeholder { color: var(--muted); opacity: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; }
.filter { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 2px; border: 0; background: none; font-size: 0.9375rem; font-weight: 550; }
.filter-box { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 2px solid var(--line-strong); border-radius: 5px; background: var(--surface); }
.filter-box .icon { width: 16px; height: 16px; visibility: hidden; }
.filter[aria-pressed="true"] .filter-box { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.filter[aria-pressed="true"] .filter-box .icon { visibility: visible; }

/* ---------- section bar ---------- */
.sections { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.sections::-webkit-scrollbar { display: none; }
.sections ul { display: flex; gap: 2px; padding: 0 8px; width: max-content; }
.sections a { display: flex; align-items: center; min-height: 50px; padding: 0 12px; text-decoration: none; font-weight: 600; font-size: 0.9375rem; color: var(--muted); border-bottom: 4px solid transparent; white-space: nowrap; }
.sections .is-current a { color: var(--ink); border-bottom-color: var(--accent); font-weight: 750; }

/* ---------- menu ---------- */
.menu-list { padding: 0 16px; }
.menu-section { padding-top: 26px; scroll-margin-top: 50px; }
.menu-section > h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.625rem; }
.section-note { margin-top: 6px; color: var(--muted); font-size: 0.9375rem; }
.item { position: relative; cursor: pointer; }
.item-name { font-size: 1.0625rem; font-weight: 700; line-height: 1.25; }
.item-open { display: block; width: 100%; min-height: 44px; padding: 10px 0 4px; border: 0; background: none; text-align: left; font: inherit; }
.item-popular { font-size: 0.8125rem; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.item-desc { font-size: 0.9375rem; color: var(--muted); }
.markers { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; font-size: 0.8125rem; font-weight: 600; }
.marker { display: inline-flex; align-items: center; gap: 4px; }
.marker .icon { width: 15px; height: 15px; }
.marker-spice .icon { color: var(--spice); }
.chiles { display: inline-flex; }
.marker-diet .icon { color: var(--diet); }
.item-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; }
.item-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.soldout-flag { display: inline-block; padding: 1px 8px; border: 2px solid var(--danger); border-radius: 4px; color: var(--danger); font-size: 0.8125rem; font-weight: 800; background: var(--surface); }
.item.is-soldout .item-photo img { filter: grayscale(1); opacity: 0.5; }
.item.is-soldout .item-open, .item.is-soldout .item-desc, .item.is-soldout .item-price { color: var(--muted); }
.item.is-soldout .item-open { text-decoration: line-through; }
.item-photo img { width: 100%; object-fit: cover; border-radius: var(--radius); background: var(--tint); }
.btn-add { min-height: 44px; padding: 6px 14px; background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn-add .icon { width: 18px; height: 18px; }

.items-rows .item { display: grid; grid-template-columns: minmax(0, 1fr) 108px; grid-template-areas: "text photo" "text add"; column-gap: 14px; row-gap: 8px; align-items: start; padding: 10px 0 16px; border-bottom: 1px solid var(--line); }
.items-rows .item:last-child { border-bottom: 0; }
.items-rows .item-text { grid-area: text; min-width: 0; }
.items-rows .item-photo { grid-area: photo; margin-top: 10px; }
.items-rows .item-photo img { aspect-ratio: 4 / 3; }
.items-rows .btn-add { grid-area: add; width: 100%; }
.items-rows .item:not(:has(.item-photo)) .btn-add { grid-area: photo; margin-top: 10px; }
.items-rows .item:not(:has(.item-photo, .btn-add)) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text"; }

.items-cards { display: grid; grid-template-columns: 1fr; gap: 26px; margin-top: 14px; }
.items-cards .item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "photo photo" "text add"; column-gap: 12px; align-items: end; }
.items-cards .item-photo { grid-area: photo; }
.items-cards .item-photo img { aspect-ratio: 3 / 2; }
.items-cards .item-text { grid-area: text; min-width: 0; }
.items-cards .item-name { font-size: 1.1875rem; }
.items-cards .btn-add { grid-area: add; margin-bottom: 2px; }
.items-cards .item:not(:has(.item-photo)) { padding-top: 12px; border-top: 1px solid var(--line); }
@media (min-width: 620px) { .items-cards { grid-template-columns: 1fr 1fr; column-gap: 24px; } }

.empty { padding: 36px 0; text-align: center; }
.empty .btn { margin-top: 12px; }

/* ---------- footer ---------- */
.foot { margin-top: 36px; padding: 22px 16px 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.foot p + p { margin-top: 10px; }
.foot a { min-height: 44px; display: inline-flex; align-items: center; }
.foot-demo { font-size: 0.8125rem; }

/* ---------- sheets (dialogs that rise from the bottom) ---------- */
dialog.sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 560px; max-height: 92dvh; margin: 0 auto; padding: 0; border: 0; border-radius: 18px 18px 0 0; background: var(--bg); color: var(--ink); overflow: hidden; }
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-up 0.22s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) { dialog.sheet { inset: 0; margin: auto; border-radius: 18px; max-height: 88dvh; height: fit-content; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-title { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.375rem; }
.sheet-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 20px; }
.sheet-body > :first-child:not(.item-hero) { margin-top: 16px; }
.sheet-body h3 { font-size: 1rem; margin: 18px 0 6px; }
.sheet-foot { display: flex; gap: 12px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg); flex: none; }
.sheet-foot-col { flex-direction: column; align-items: stretch; gap: 6px; }

.item-hero { margin: 0 -16px; }
.item-hero img { width: 100%; aspect-ratio: 4 / 3; max-height: 42dvh; object-fit: cover; }
.item-facts { padding-top: 14px; }
.item-facts .item-price { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; }
.item-facts .item-desc { margin-top: 6px; font-size: 1rem; color: var(--ink); }
.allergens { margin-top: 16px; padding: 12px 14px; background: var(--tint); border-radius: var(--radius); font-size: 0.9375rem; }
.allergens h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 0.9375rem; }
.allergens p + p { margin-top: 6px; font-size: 0.875rem; }

.hours th { text-align: left; font-weight: 500; padding: 7px 0; text-transform: capitalize; }
.hours td { text-align: right; padding: 7px 0; font-variant-numeric: tabular-nums; }
.hours tr { border-bottom: 1px solid var(--line); }
.hours .is-today th, .hours .is-today td { font-weight: 800; }
.address span { display: block; }
.sheet-info .btn { margin: 12px 0; }

/* ---------- options in the item sheet ---------- */
.item-form { margin-top: 8px; }
.opt-group { margin-top: 18px; }
.opt-group legend { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; font-weight: 800; font-size: 1.0625rem; padding-bottom: 4px; }
.opt-rule { font-weight: 500; font-size: 0.8125rem; color: var(--muted); }
.opt { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.opt input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--brand); }
.opt-name { flex: 1; min-width: 0; }
.opt-name::first-letter { text-transform: uppercase; }
.opt-name small { display: block; color: var(--muted); font-size: 0.8125rem; }
.opt-price { color: var(--muted); font-size: 0.9375rem; font-variant-numeric: tabular-nums; flex: none; }
.half-pick { padding: 10px 0 4px 36px; }
.half-pick label { display: block; font-weight: 650; font-size: 0.9375rem; margin-bottom: 4px; }
.half-pick p { margin-top: 6px; font-size: 0.875rem; }
.select, .field input { width: 100%; height: 48px; padding: 0 12px; border: 2px solid var(--line-strong); border-radius: var(--radius-btn); background: var(--surface); font-size: 1rem; }
.field { margin-top: 18px; }
.field label { display: flex; align-items: center; gap: 6px; font-weight: 650; font-size: 0.9375rem; margin-bottom: 6px; }
.field .muted { margin-top: 4px; font-size: 0.8125rem; }
.field input[readonly] { background: var(--tint); }
.field input[aria-invalid="true"] { border-color: var(--danger); border-width: 3px; }
.field-error { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--danger); font-weight: 650; font-size: 0.875rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-allergy label .icon { color: var(--danger); }
.qty { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.qty-value { min-width: 30px; text-align: center; font-weight: 800; font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.qty-small .icon-btn { width: 44px; height: 44px; }

/* ---------- cart ---------- */
.lines { margin-top: 4px; }
.line { display: flex; gap: 12px; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line-main { min-width: 0; flex: 1; }
.line-name { font-weight: 750; }
.line-mods { margin-top: 2px; font-size: 0.9375rem; color: var(--muted); }
.line-note { font-size: 0.9375rem; color: var(--muted); }
.line-warning { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--danger); font-weight: 700; font-size: 0.9375rem; }
.line-actions { display: flex; gap: 14px; margin-top: 2px; }
.line-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.line-price { font-weight: 750; font-variant-numeric: tabular-nums; }
.pay, .tip { margin-top: 22px; }
.pay legend, .tip legend { font-weight: 800; font-size: 1.0625rem; padding-bottom: 4px; }
.tip-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 8px; margin-top: 4px; }
.tip-opt { position: relative; display: block; cursor: pointer; }
.tip-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tip-face { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; padding: 4px; border: 2px solid var(--line-strong); border-radius: var(--radius-btn); background: var(--surface); text-align: center; line-height: 1.2; }
.tip-face small { color: var(--muted); font-size: 0.75rem; }
.tip-opt input:checked + .tip-face { border-color: var(--brand); border-width: 3px; background: var(--tint); box-shadow: inset 0 -5px 0 var(--brand); }
.tip-opt input:focus-visible + .tip-face { outline: 3px solid var(--focus); outline-offset: 2px; }
.tip-custom { width: 100%; height: 48px; margin-top: 8px; padding: 0 12px; border: 2px solid var(--line-strong); border-radius: var(--radius-btn); font-size: 1rem; }
.totals-wrap { margin-top: 20px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.totals dd { font-variant-numeric: tabular-nums; }
.totals-total { margin-top: 6px; padding-top: 10px !important; border-top: 2px solid var(--ink); font-weight: 800; font-size: 1.125rem; }
.notice { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; background: var(--tint); border-radius: var(--radius); font-size: 0.9375rem; }
.notice .icon { margin-top: 1px; }
.card-step .btn-quiet { margin-top: 14px; }
.card-step .btn-primary { margin-top: 16px; }
.card-hint { min-height: 1.4em; margin-top: 8px; font-size: 0.875rem; }
.details-form > :first-child { margin-top: 16px; }

/* ---------- bottom bar ---------- */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; flex-direction: column; gap: 8px; max-width: 760px; margin: 0 auto; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line-strong); }
.btn-cart { width: 100%; min-height: 54px; justify-content: flex-start; }
.btn-cart .btn-price { margin-left: auto; }
.btn-status { width: 100%; min-height: 48px; justify-content: flex-start; background: var(--tint); border-color: var(--ink); color: var(--ink); }

/* ---------- order status ---------- */
.status-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.status-brand { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.125rem; }
.status-main { padding: 22px 16px 0; }
.status-title { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.125rem; }
.status-where { display: block; margin-top: 4px; font-family: var(--font-text); font-size: 1rem; font-weight: 600; color: var(--muted); }
.status-message { margin-top: 14px; font-size: 1.1875rem; font-weight: 650; }
.steps { margin-top: 18px; }
.step { position: relative; display: flex; align-items: center; gap: 14px; min-height: 58px; color: var(--muted); }
.step + .step::before { content: ""; position: absolute; left: 15px; top: -15px; width: 2px; height: 30px; background: var(--line-strong); }
.step.is-done + .step::before { background: var(--brand); }
.step-dot { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--bg); }
.step.is-done { color: var(--ink); }
.step.is-done .step-dot { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.step.is-now { color: var(--ink); }
.step.is-now .step-dot { border: 9px solid var(--brand); }
.step.is-now .step-label { font-weight: 800; font-size: 1.1875rem; }
.step-label { flex: 1; font-size: 1.0625rem; }
.step-state { font-size: 0.8125rem; font-weight: 700; }
.step.is-now .step-state { padding: 2px 8px; border: 2px solid var(--brand); border-radius: 4px; color: var(--brand); background: var(--surface); }
.status-when { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.9375rem; }
.status-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.status-actions .notice { margin-top: 0; }
.status-summary { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.status-summary h2 { font-size: 1.0625rem; font-family: var(--font-text); font-weight: 800; }
.summary-head { margin-top: 12px; font-size: 0.9375rem; }
.summary-lines li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.summary-qty { flex: none; width: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary-name { flex: 1; min-width: 0; }
.summary-name small { display: block; color: var(--muted); font-size: 0.875rem; }
.summary-price { flex: none; font-variant-numeric: tabular-nums; }
.status-summary .totals { margin-top: 8px; }
.btn-back { padding-left: 0; text-decoration: none; }
@media (max-width: 480px) { .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } }

/* ---------- masthead: the name set on the header photo ---------- */
.masthead { position: relative; background: #151412; color: #fff; overflow: hidden; }
.masthead-photo { display: block; width: 100%; aspect-ratio: 5 / 4; max-height: 440px; object-fit: cover; }
.masthead::after { content: ""; position: absolute; inset: 0; background: rgb(12 10 8 / 0.42); pointer-events: none; }
.masthead-top { position: absolute; z-index: 1; top: 0; left: 0; right: 0; background: none; border: 0; color: #fff; --lang-on-bg: #fff; --lang-on-ink: #111; }
.masthead-name { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 18px; }
.masthead .brand-name { font-size: clamp(2.5rem, 12vw, 3.75rem); line-height: 0.98; text-wrap: balance; }
.masthead .brand-kind { font-size: 1rem; font-weight: 650; margin-bottom: 4px; }
.masthead-line { margin-top: 8px; font-size: 1rem; font-weight: 500; max-width: 26em; }
@media (min-width: 620px) { .masthead-photo { aspect-ratio: 16 / 9; } }

/* ---------- photos fade in over a tinted block instead of popping ---------- */
.item-photo, .item-hero { background: var(--tint); border-radius: var(--radius); overflow: hidden; }
.item-hero { border-radius: 0; }
.ph { opacity: 0; transition: opacity 0.35s ease-out; }
.ph.is-in { opacity: 1; }

/* ---------- small feedback ---------- */
.btn, .icon-btn, .filter, .lang-btn, .mode-btn { transition: transform 0.12s ease-out, background-color 0.15s, color 0.15s, border-color 0.15s; }
.btn:active:not(:disabled), .icon-btn:active:not(:disabled) { transform: scale(0.97); }
.btn-add.is-added { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); animation: pop 0.32s ease-out; }
.btn-add.is-added .icon { transform: rotate(90deg) scale(0.9); transition: transform 0.2s; }
.btn-cart.is-bump { animation: bump 0.36s cubic-bezier(0.2, 1.4, 0.4, 1); }
.btn-cart.is-bump .btn-price { animation: pop 0.4s ease-out; }
.qty-value.is-tick { animation: tick 0.22s ease-out; }
.cartbar:not([hidden]) { animation: rise 0.28s ease-out; }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes bump { 0% { transform: translateY(0); } 40% { transform: translateY(-5px); } 100% { transform: translateY(0); } }
@keyframes tick { 0% { transform: translateY(5px); opacity: 0.3; } 100% { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }

/* an item that sells out while you look at it greys out, then the label lands */
.item-photo img { transition: filter 0.5s, opacity 0.5s; }
.item.just-out .item-photo img { animation: greyout 0.8s ease-out both; }
.item.just-out .soldout-flag { animation: land 0.45s 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes greyout { from { filter: grayscale(0); opacity: 1; } to { filter: grayscale(1); opacity: 0.5; } }
@keyframes land { from { transform: scale(1.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* the order tracker fills toward the new step */
.step + .step::after { content: ""; position: absolute; left: 15px; top: -15px; width: 2px; height: 30px; background: var(--brand); transform: scaleY(0); transform-origin: top; }
.step.is-done + .step::after { transform: scaleY(1); }
.just-moved .step.is-now::after { animation: fill 0.6s ease-out both; }
.just-moved .step.is-now .step-dot { animation: pop 0.45s 0.5s ease-out both; }
.just-moved .status-message { animation: tick 0.4s ease-out; }
@keyframes fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.sections a { transition: color 0.2s, border-color 0.2s; }

.sheet-title:focus, .status-title:focus, .menu-section > h2:focus { outline: none; }

/* a drawn logo in place of the name */
.brand-logo img { display: block; width: min(78%, 420px); height: auto; }
.status-logo { height: 40px; width: auto; }
