:root {
  color-scheme: dark;
  --bg: #1b1215;
  --panel: #261b20;
  --surface: #322329;
  --raised: #3e2b32;
  --line: #5b4247;
  --cream: #fff5e8;
  --muted: #d4bfb7;
  --gold: #e4bd72;
  --red: #be1c33;
  --red-hover: #d12a40;
  --green: #b5e4c4;
  font-family: Inter, Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.45;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--cream); background: var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
img { max-width: 100%; }
a { color: var(--gold); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.055em; line-height: 1.05; }
h2 { font-size: 1.22rem; letter-spacing: -.018em; }
small, .muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 6px; left: 10px; z-index: 5; transform: translateY(-160%); background: var(--panel); padding: 10px 14px; }
.skip:focus { transform: none; }
.top { background: #27161c; border-bottom: 2px solid #b98949; }
.top-inner, .main, .foot { width: min(100%, 96rem); margin-inline: auto; padding-inline: clamp(12px, 2.8vw, 42px); }
.top-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(8px, 2vw, 26px); min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; min-width: 0; width: fit-content; }
.brand img { display: block; flex: none; width: clamp(62px, 8vw, 106px); height: auto; aspect-ratio: 979/504; clip-path: ellipse(48% 46%); }
.brand b, .brand small { display: block; }
.brand b { font-size: clamp(.98rem, 1.8vw, 1.2rem); }
.brand small { font-size: .78rem; line-height: 1.15; }
.views, .mode-set { display: flex; align-items: stretch; gap: 4px; border: 1px solid var(--line); padding: 4px; border-radius: 11px; background: #1e1418; }
.views button, .mode-set button, .categories button { min-height: 42px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); padding: 7px 14px; font-weight: 700; white-space: nowrap; }
.views button:hover, .mode-set button:hover, .categories button:hover { color: var(--cream); background: var(--raised); }
.views button[aria-current], .mode-set button[aria-pressed="true"], .categories button[aria-pressed="true"] { border-color: #93654a; color: var(--gold); background: #482831; }
.view-count { min-width: 18px; display: inline-grid; place-items: center; border-radius: 20px; background: var(--gold); color: #2a181c; font-size: .7rem; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 9px; }
.demo-pill { display: inline-block; border: 1px solid #b78845; border-radius: 20px; padding: 4px 11px; color: var(--gold); background: #402b22; font-weight: 800; font-size: .81rem; }
.button { min-height: 44px; border: 1px solid var(--line); border-radius: 9px; padding: 7px 13px; color: var(--cream); background: var(--raised); font-weight: 750; }
.button:hover:not(:disabled) { background: #583942; border-color: #a07965; }
.button-small { min-height: 40px; font-size: .84rem; }
.button-primary { border-color: #d74354; background: var(--red); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--red-hover); border-color: #f27e83; }
.main { min-height: calc(100vh - 130px); padding-block: clamp(15px, 2.5vw, 38px); }
.screen-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 10px 18px; margin-bottom: clamp(14px, 2vw, 25px); }
.eyebrow { color: var(--gold); font-size: .79rem; font-weight: 800; margin-bottom: 4px; }
.cashier-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(292px, 31%); align-items: start; gap: clamp(12px, 2vw, 24px); }
.catalog, .cart, .lane, .pickup-card { min-width: 0; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.catalog { padding: clamp(12px, 1.6vw, 22px); }
.catalog-tools { display: grid; grid-template-columns: 1fr minmax(120px, 24%); gap: 10px; }
.search, .table-field, .cash-label { color: var(--muted); font-size: .85rem; font-weight: 750; }
input, select { min-width: 0; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #745359; border-radius: 8px; background: #1d1519; color: var(--cream); }
.catalog-tools input, .catalog-tools select { margin-top: 4px; }
input::placeholder { color: #c1a9a2; opacity: 1; }
.categories { display: flex; flex-wrap: wrap; gap: 5px; padding-block: 11px 13px; border-bottom: 1px solid var(--line); }
.categories button { min-height: 39px; padding-inline: 10px; font-size: .88rem; }
.catalog-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-block: 13px 10px; }
.catalog-title span { color: var(--muted); font-size: .82rem; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 148px), 1fr)); gap: 9px; }
.product { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; min-height: 150px; padding: 0; overflow: hidden; text-align: start; border: 1px solid #68484d; border-radius: 11px; background: #38272d; color: var(--cream); }
.product:hover { border-color: var(--gold); background: #483036; }
.product img { display: block; width: 100%; height: auto; aspect-ratio: 16/8; object-fit: cover; background: #56362e; }
.product-photo-empty { display: block; aspect-ratio: 16/8; background: linear-gradient(135deg, #6b2933, #392829 65%); }
.product-name { display: block; padding: 8px 9px 0; font-weight: 700; font-size: .94rem; line-height: 1.27; overflow-wrap: anywhere; }
.product-footer { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 5px 9px 7px; }
.product-price { color: var(--gold); font-variant-numeric: tabular-nums; font-weight: 800; }
.product-add { display: grid; place-items: center; min-width: 27px; min-height: 27px; border-radius: 6px; background: #6e2533; color: var(--cream); font-size: 1.05rem; }
.cart { position: sticky; top: 12px; display: flex; flex-direction: column; padding: clamp(12px, 1.6vw, 22px); border-top: 2px solid #c99457; }
.cart-head, .cart-total, .lane > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cart-badge { display: inline-grid; min-width: 32px; min-height: 29px; place-items: center; padding: 2px 8px; background: #513138; color: var(--gold); border-radius: 8px; font-weight: 800; }
.cart-items { min-height: 155px; max-height: min(52vh, 540px); margin-block: 12px; overflow: auto; }
.cart-items ul, .review-list, .ticket ul { list-style: none; padding: 0; margin: 0; }
.cart-line { padding: 10px 1px; border-bottom: 1px solid var(--line); }
.cart-line-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.cart-line-top strong:last-child { flex: none; color: var(--gold); font-size: .93rem; }
.cart-line small { display: block; margin: 3px 0 0; }
.quantity { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.quantity .button { min-width: 40px; min-height: 38px; padding: 3px 8px; }
.quantity-output { min-width: 25px; text-align: center; font-weight: 750; }
.quantity .remove { margin-inline-start: auto; color: #ffbfbe; font-size: .78rem; }
.empty { padding: 22px 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; }
.products > .empty { grid-column: 1/-1; }
.cart-total { padding-block: 9px 12px; color: var(--muted); border-top: 1px solid var(--line); font-weight: 700; }
.cart-total strong { color: var(--cream); font-size: clamp(1.5rem, 3.2vw, 2.15rem); font-variant-numeric: tabular-nums; }
.checkout { display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; min-height: 50px; }
.cart-jump { display: none; }
.text-button { padding: 9px 4px; min-height: 40px; border: 0; color: var(--gold); background: transparent; text-decoration: underline; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding-block: 12px 18px; color: var(--muted); font-size: .8rem; }
.kitchen-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lane { padding: 14px; min-height: 240px; }
.lane > header { margin-bottom: 10px; }
.lane-orders, .pickup-orders { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 195px), 1fr)); gap: 10px; }
.lane-orders .empty, .pickup-orders .empty { grid-column: 1/-1; }
.ticket { min-width: 0; padding: 14px; background: var(--surface); border: 1px solid #785459; border-radius: 10px; }
.ticket h3, .pickup-card h3 { color: var(--gold); font-size: 1.8rem; line-height: 1.15; }
.ticket p, .pickup-card p { margin: 3px 0 9px; color: var(--muted); }
.ticket li { padding-block: 4px; border-top: 1px solid var(--line); }
.ticket .button, .pickup-card .button { margin-top: 10px; width: 100%; }
.pickup-card { min-width: 0; padding: 17px; text-align: center; }
.pickup-card h3 { font-size: clamp(2rem, 6vw, 4rem); }
.pickup-card .button { background: #27583d; border-color: #79a58b; }
.pickup-card .button:hover { background: #346f50; }
dialog { width: min(820px, calc(100% - 22px)); max-width: none; max-height: calc(100dvh - 20px); padding: 0; border: 1px solid #b68958; border-radius: 16px; background: #2e2026; color: var(--cream); }
dialog:has(.dialog-narrow) { width: min(515px, calc(100% - 22px)); }
dialog::backdrop { background: #150b10c9; }
.dialog-frame { padding: clamp(13px, 2.4vw, 24px); }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dialog-head h2 { font-size: clamp(1.45rem, 3.5vw, 2.3rem); line-height: 1.15; }
.side-options, .receipt-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.side-options .button, .receipt-actions .button { flex: 1; }
.pay-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 44%); gap: 13px; }
.pay-total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 7px; padding: 12px; border-radius: 9px; background: #422a31; color: var(--muted); }
.pay-total strong { color: var(--gold); font-size: 1.75rem; }
.review-list li, .receipt-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.review-list li strong, .receipt-row strong { flex: none; }
.pay-controls { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 11px; background: #36252b; }
.methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 9px; }
.methods .button[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); background: #5a3540; }
.cash-line { display: flex; gap: 6px; margin-block: 4px 8px; }
.quick-cash { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.quick-cash .button { min-width: 0; min-height: 38px; padding-inline: 4px; }
.change { display: flex; justify-content: space-between; gap: 8px; margin-block: 11px; color: var(--green); }
.pay-controls > .button { width: 100%; margin-top: 7px; }
.card-info { margin: 13px 0; color: var(--muted); }
.receipt-body { padding: 14px; background: #fff6e8; color: #2c1d22; border-radius: 8px; }
.receipt-body .receipt-row { border-color: #e2c9b8; }
.receipt-body .receipt-meta { color: #684d52; margin-bottom: 6px; }
.receipt-body .receipt-info { margin-top: 10px; font-size: .84rem; color: #623a43; }
.receipt-total { font-size: 1.15rem; }
@media (max-width: 800px) {
  .top-inner { grid-template-columns: 1fr auto; padding-block: 8px; }
  .views { order: 3; grid-column: 1/-1; width: fit-content; }
}
@media (max-width: 710px) {
  .cashier-layout, .pay-layout { grid-template-columns: minmax(0, 1fr); }
  .cart { position: static; scroll-margin-top: 10px; }
  .cart-items { min-height: 0; max-height: none; }
  #cashier { padding-bottom: 62px; }
  .cart-jump { position: fixed; inset-inline: 12px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 50px; padding: 8px 14px; border: 1px solid #e5a083; border-radius: 10px; background: #79172a; color: #fff3e4; font-weight: 760; text-decoration: none; }
}
@media (max-width: 510px) {
  .top-actions { gap: 5px; }
  .top-actions .button { padding-inline: 6px; }
  .brand { gap: 6px; }
  .views { width: 100%; }
  .views button { flex: 1; padding-inline: 5px; }
  .mode-set { width: 100%; }
  .mode-set button { flex: 1; padding-inline: 6px; font-size: .86rem; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kitchen-layout { grid-template-columns: minmax(0, 1fr); }
  .catalog-tools { grid-template-columns: 1fr minmax(94px, 30%); }
}
