:root {
  color-scheme: light;
  --bg: #f8f4ed;
  --paper: #fffdf8;
  --ink: #252019;
  --mute: #675d52;
  --line: #e6ded2;
  --red: #a31932;
  --brick: #671728;
  --soft: #f6e5e7;
  --green: #245d40;
  --green-bg: #e3efe4;
  --radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .54; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #bc596b; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.5; }
img { display: block; object-fit: cover; width: 100%; height: 100%; }
img[hidden] { display: none; }
.skip { position: fixed; z-index: 12; left: 12px; top: 12px; padding: 10px 15px; background: var(--paper); transform: translateY(-180%); }
.skip:focus { transform: none; }
.shell { width: min(1120px, 100% - 48px); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); background: var(--paper); }
.topbar-inner, .top-actions, .brand, .section-head, .total-row, .detail-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar-inner { min-height: 67px; }
.brand { border: 0; padding: 0; color: var(--ink); background: transparent; font-size: 1.55rem; font-weight: 850; letter-spacing: -.06em; text-align: left; }
.brand-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; background: var(--red); color: #fff8ed; font-size: 20px; font-weight: 500; letter-spacing: 0; }
.text-link { color: var(--red); font-size: .88rem; font-weight: 700; text-underline-offset: 3px; }
.open-state { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 30px; background: #ece4d9; color: var(--mute); font-size: .75rem; font-weight: 750; white-space: nowrap; }
.open-state.is-open { color: var(--green); background: var(--green-bg); }
.open-state i { width: 7px; height: 7px; border-radius: 100%; background: currentColor; }
#main { padding-top: 24px; padding-bottom: 108px; }
#main.operator-shell { padding-bottom: 44px; }
.hero { display: grid; min-height: 300px; overflow: hidden; border-radius: 24px; color: #fff7ec; background: var(--brick); position: relative; isolation: isolate; }
.hero-content { position: relative; align-self: center; width: min(100%, 610px); padding: 40px 44px; }
.hero h1 { font-size: clamp(2.8rem, 6.7vw, 5.35rem); font-weight: 900; line-height: .94; letter-spacing: -.07em; }
.hero p { margin-top: 12px; color: #fae5dd; }
.hero-plain { min-height: 216px; }
.hero-photo { position: absolute; inset: 0 0 0 40%; background: radial-gradient(ellipse at 67% 52%, #d95b35, #8a2634 58%, var(--brick)); z-index: -1; }
.hero-photo img { object-position: center 54%; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--brick), #67172834 56%, #211a133b); }
.hero-button { margin-top: 22px; display: inline-flex; gap: 12px; border: 1px solid #ffd5c470; color: inherit; background: #ffffff19; padding: 11px 16px; border-radius: 40px; font-weight: 730; }
.hero-button:hover { background: #ffffff36; }
.menu-section { margin-top: 28px; }
.section-head h2, .page-heading h1 { font-size: clamp(1.85rem, 3.5vw, 2.8rem); letter-spacing: -.065em; line-height: 1.05; }
.panel .section-head h2, .sheet .section-head h2 { font-size: 1.4rem; letter-spacing: -.04em; }
.search { display: flex; width: min(250px, 50%); border: 1px solid var(--line); border-radius: 30px; background: var(--paper); }
.search input { width: 100%; min-width: 0; height: 42px; padding: 0 0 0 14px; background: transparent; border: 0; }
.search button { padding: 0 14px 0 7px; border: 0; background: transparent; color: var(--red); font-size: 1.2rem; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding: 4px 1px; }
.menu-section .chips { margin-top: 12px; }
.chip { white-space: nowrap; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 50px; padding: 9px 16px; font-size: .88rem; font-weight: 700; min-height: 40px; }
.chip.selected { background: var(--ink); color: #fff9ed; border-color: var(--ink); }
.results-heading { margin-block: 17px 11px; font-size: 1.02rem; letter-spacing: -.025em; color: var(--mute); }
.products { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.product-card { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product-cover, .cart-photo, .sheet-image { position: relative; isolation: isolate; display: grid; place-items: center; background: radial-gradient(ellipse at 70% 45%, #f3d4a0, #f1dec7 66%, #e8c5a0); overflow: hidden; }
.product-cover { padding: 0; border: 0; width: 100%; aspect-ratio: 1.62; }
.product-cover img, .cart-photo img, .sheet-image img { position: absolute; inset: 0; transition: transform .2s ease; }
.product-cover:hover img { transform: scale(1.05); }
.product-card:nth-child(3n+2) .product-cover { background: radial-gradient(ellipse at 58% 45%, #edac8d, #e8c3a5 70%); }
.food-fallback { color: #93472c; opacity: .65; font-size: max(20px, 2.2vw); line-height: 1; }
.product-copy { padding: 13px 14px 12px; }
.product-copy h3, .cart-item h3 { font-size: 1.11rem; letter-spacing: -.036em; }
.product-copy p { margin-top: 4px; color: var(--mute); font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.product-foot, .sheet-foot, .order-card-top, .order-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-foot { margin-top: 9px; }
.product-foot strong { font-size: .92rem; color: var(--brick); }
.add { display: grid; place-items: center; border: 1px solid #ecd1d7; border-radius: 11px; width: 42px; height: 42px; padding: 0 0 3px; font-size: 1.55rem; color: var(--red); background: var(--soft); }
.add:hover { background: var(--red); color: white; border-color: var(--red); }
.bottom-nav { position: fixed; z-index: 5; bottom: 0; left: 0; right: 0; padding: 6px 10px max(6px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.bottom-nav > div { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; width: min(490px, 100%); margin: auto; }
.nav-item { display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; padding: 9px 6px; border-radius: 11px; background: transparent; color: var(--mute); font-size: .84rem; font-weight: 750; }
.nav-icon { font-size: 1.12rem; }
.nav-item.selected { background: var(--soft); color: var(--red); }
.nav-item b { display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 4px; background: var(--red); color: white; border-radius: 14px; font-size: .67rem; }
.page-heading { margin: 9px 0 19px; }
.page-heading p { color: var(--mute); margin-top: 6px; }
.narrow { max-width: 660px; }
.stack { display: grid; gap: 12px; align-content: start; }
.panel, .cart-item, .order-card, .placeholder { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.panel { padding: 19px; }
.placeholder { padding: 26px 20px; color: var(--mute); }
.placeholder h2 { margin-bottom: 6px; color: var(--ink); font-size: 1.18rem; }
.placeholder button { margin-top: 16px; }
.cart-item { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: center; padding: 10px; }
.cart-photo { width: 100%; aspect-ratio: 1.1; border-radius: 10px; }
.cart-item p, .cart-item strong { font-size: .85rem; }
.cart-item p { color: var(--mute); }
.stepper { display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 14px; min-width: 102px; }
.stepper button { border: 0; background: transparent; color: var(--red); width: 34px; height: 40px; font-size: 1.17rem; }
.stepper span { font-size: .88rem; font-weight: 800; min-width: 21px; text-align: center; }
.summary.panel { margin-top: 13px; }
.summary p { color: var(--mute); font-size: .86rem; margin-block: 7px 10px; }
.total-row { align-items: flex-start; margin-bottom: 9px; font-size: .93rem; }
.total-row strong { text-align: right; }
.total-row.grand { padding-top: 11px; margin-top: 11px; border-top: 1px solid var(--line); font-size: 1.1rem; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 10px 15px; border-radius: 12px; font-weight: 750; line-height: 1.2; }
.primary { background: var(--red); color: #fffaf2; border: 1px solid var(--red); }
.primary:hover:not(:disabled) { background: #841127; }
.secondary { background: var(--paper); color: var(--red); border: 1px solid var(--line); }
.secondary:hover:not(:disabled) { background: var(--soft); }
.full { width: 100%; }
label:not(.check, .quantity-picker) { display: grid; gap: 7px; font-weight: 650; font-size: .9rem; }
label small { font-weight: 400; color: var(--mute); }
label input:not([type="radio"], [type="checkbox"]), label textarea, label select,
.option-row input { width: 100%; min-width: 0; background: var(--paper); font-weight: 450; color: var(--ink); border: 1px solid var(--line); padding: 10px 12px; border-radius: 10px; }
textarea { resize: vertical; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { font-size: .91rem; font-weight: 750; margin-bottom: 8px; }
.choice-set { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice-set label { display: flex; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.choice-set label:has(input:checked) { background: var(--soft); border-color: #d29ba6; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--red); height: 17px; width: 17px; flex: 0 0 auto; margin: 0; }
.address, .order-meta { display: grid; gap: 4px; font-size: .9rem; color: var(--mute); }
.address { border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.address strong, .order-meta strong { color: var(--ink); }
.check { display: flex; align-items: center; gap: 8px; font-size: .88rem; min-height: 37px; }
.check strong { margin-left: auto; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.muted { color: var(--mute); font-size: .84rem; }
.banner { padding: 11px 13px; border-radius: 12px; background: #f5e6cf; color: #67411c; margin-top: 12px; font-size: .9rem; }
.split { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(0, 1.75fr); align-items: start; gap: 18px; }
.order-card { display: grid; gap: 9px; padding: 13px; text-align: left; color: var(--ink); }
.order-card.current { border-color: #ca8594; box-shadow: 0 0 0 1px #ca8594; }
.order-card-bottom { align-items: end; color: var(--mute); font-size: .84rem; }
.order-card-bottom small { font-size: .76rem; }
.order-card-bottom strong { white-space: nowrap; color: var(--ink); }
.badge { display: inline-block; padding: 4px 7px; border-radius: 10px; line-height: 1.22; background: #efeadf; color: #594c3c; font-size: .74rem; font-weight: 700; }
.status-new, .status-quote, .status-preparing { background: #f8e9ce; color: #70490e; }
.status-accepted, .status-ready, .status-delivered, .status-handed_over { background: var(--green-bg); color: var(--green); }
.status-rejected, .status-cancelled { background: var(--soft); color: var(--red); }
.detail-top { align-items: flex-start; }
.detail-top h2 { font-size: 1.35rem; letter-spacing: -.03em; }
.order-meta { margin-top: 13px; }
.item-list { padding: 12px 0; margin: 10px 0; list-style: none; border-block: 1px solid var(--line); display: grid; gap: 7px; }
.item-list li { display: flex; justify-content: space-between; gap: 9px; font-size: .9rem; }
.item-list small { display: block; color: var(--mute); }
.item-list strong { white-space: nowrap; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.operator-tabs { margin-bottom: 16px; }
.groups { margin-bottom: 12px; }
.groups .selected { background: var(--red); border-color: var(--red); }
.manager-products { margin-top: 12px; }
.manage-row { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.row-title { display: grid; gap: 3px; text-align: left; color: var(--ink); background: transparent; border: 0; }
.row-title span { color: var(--mute); font-size: .8rem; }
.notice { z-index: 8; position: fixed; left: 50%; bottom: calc(67px + env(safe-area-inset-bottom)); transform: translateX(-50%); border-radius: 12px; width: max-content; max-width: calc(100vw - 32px); padding: 12px 16px; color: white; background: var(--ink); font-size: .88rem; box-shadow: 0 10px 32px #18110d45; }
.loading { padding: 20px 0; color: var(--mute); }
dialog { border: 1px solid var(--line); margin: auto; padding: 0; border-radius: 20px; max-height: min(90dvh, 820px); max-width: min(490px, 100% - 24px); color: var(--ink); background: var(--paper); width: 100%; }
dialog::backdrop { background: #2d1c19a3; }
body:has(dialog[open]) { overflow: hidden; }
.sheet-body { padding: 18px; }
.sheet-image { height: 210px; }
.sheet-image .icon-btn { position: absolute; top: 9px; right: 9px; z-index: 1; }
.icon-btn { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); padding: 0 0 2px; color: var(--ink); font-size: 1.5rem; }
.sheet-body h2 { font-size: 1.55rem; line-height: 1.1; letter-spacing: -.055em; margin-bottom: 5px; }
.sheet-body p { color: var(--mute); font-size: .91rem; margin-bottom: 12px; }
.sheet-body .section-head { margin-bottom: 12px; }
.product-sheet .sheet-body > label, .product-sheet fieldset { margin-bottom: 10px; }
.quantity-picker { display: flex; align-items: center; gap: 7px; font-size: .86rem; }
.quantity-picker input { width: 59px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--paper); }
.sheet-foot { padding-top: 11px; }
.sheet-foot .primary { flex: 1; }
.option-row { display: grid; grid-template-columns: 1fr 92px auto; gap: 5px; }
.options > button { margin-top: 7px; }
@media (max-width: 690px) {
  .shell { width: calc(100% - 28px); }
  .topbar-inner { min-height: 56px; }
  .top-actions { gap: 8px; }
  .top-actions .text-link { font-size: .76rem; }
  .brand { gap: 6px; font-size: 1.33rem; }
  .brand-icon { width: 30px; height: 30px; }
  #main { padding-top: 13px; }
  .hero { min-height: 180px; border-radius: 17px; }
  .hero-content { padding: 22px 17px; }
  .hero h1 { font-size: clamp(2.1rem, 8.4vw, 3.4rem); }
  .hero-photo { left: 28%; }
  .hero-photo::after { background: linear-gradient(90deg, var(--brick), #67172896 55%, #211a133b); }
  .hero-button { margin-top: 15px; padding: 8px 12px; font-size: .83rem; }
  .menu-section { margin-top: 18px; }
  .products { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .product-card { border-radius: 13px; }
  .product-cover { aspect-ratio: 1.35; }
  .product-copy { padding: 9px; }
  .product-copy h3 { font-size: 1rem; }
  .product-copy p { font-size: .77rem; }
  .product-foot strong { font-size: .82rem; }
  .add { width: 33px; height: 36px; }
  .split { grid-template-columns: 1fr; gap: 12px; }
  #order-detail { scroll-margin-top: 12px; }
  .panel { padding: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
