:root { color-scheme: light; font: 16px/1.5 system-ui, sans-serif; color: #192d25; background: #f4f4ed; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 58rem; margin: auto; padding: 1rem; }
header { position: sticky; top: 0; z-index: 5; background: #153e31; color: #fff; }
section { scroll-margin-top: 7rem; }
header h1 { margin: 0 0 .5rem; }
nav, .actions { display: flex; flex-wrap: wrap; gap: .8rem; }
header a { color: #eef6ef; }
button, .action { font: inherit; font-weight: 650; background: #205b48; color: #fff; border: 1px solid #205b48; border-radius: .55rem; padding: .6rem .85rem; cursor: pointer; text-decoration: none; display: inline-block; }
button:not(:disabled):hover, .action:hover { background: #123e30; }
:focus-visible { outline: 3px solid #be751f; outline-offset: 3px; }
button:disabled { opacity: .6; cursor: default; }
.panel, dialog { background: #fff; border: 1px solid #d7e1d7; border-radius: 1rem; padding: 1rem; margin-block: 1rem; }
.panel h2, dialog h2 { margin-top: 0; }
dialog { margin: auto; width: min(32rem, calc(100% - 2rem)); max-height: 90dvh; }
dialog::backdrop { background: #102a22a8; }
label { display: block; margin: .5rem 0; }
input:not([type=radio],[type=checkbox]) { font: inherit; width: 100%; padding: .55rem; border: 1px solid #91aa9b; border-radius: .4rem; }
fieldset { border: 1px solid #d7e1d7; border-radius: .5rem; margin: .5rem 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .75rem; }
.product { background: #fff; color: #153e31; border-color: #d7e1d7; text-align: left; }
.product:not(:disabled):hover { background: #e7f2e9; }
.product img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: .4rem; }
.product span { display: block; }
ul { padding-inline-start: 1.3rem; }
li { margin: .4rem 0; }
.line-tail { margin-inline-start: .55rem; }
.order + .order { border-top: 1px solid #d7e1d7; margin-top: .8rem; padding-top: .8rem; }
.state { display: inline-block; border-radius: .45rem; padding: .12rem .45rem; background: #f7ebce; }
.ready { background: #def0e3; }
.cancelled { background: #f8e2e0; }
.qr { width: min(10rem, 100%); display: block; }
@media print {
  body { background: #fff; }
  header, .no-print, #status, button, a { display: none !important; }
  .panel { break-inside: avoid; }
}

.table-menu { min-height:100dvh; background:#fff; color:#111; font-family:Arial,sans-serif; }
.table-menu > main { padding:0 0 2rem; }
.table-menu > header { position:static; background:#04bf60; }
.menu-brand { display:grid; text-align:center; padding:.4rem .75rem; font-weight:700; line-height:1.2; font-size:clamp(1rem,4.5vw,1.35rem); }
.menu-brand strong { font-size:1.3em; }
#menu-controls { max-width:58rem; margin:auto; padding:.15rem .75rem .55rem; }
.menu-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:.25rem .65rem; font-size:clamp(1rem,4.5vw,1.55rem); }
.menu-heading h1 { margin:0; font:inherit; }
.menu-heading strong { color:#111; }
.menu-actions { justify-content:space-between; align-items:center; gap:.45rem; margin-top:.55rem; }
.menu-actions .action,.menu-actions button,.product-actions button,.quantity-controls button { background:#fff; color:#111; border:1px solid #111; border-radius:999px; }
.menu-actions #send,.menu-actions #review { font-size:clamp(.9rem,3.8vw,1.25rem); }
.menu-actions .action:hover,.menu-actions button:not(:disabled):hover,.product-actions button:not(:disabled):hover,.quantity-controls button:not(:disabled):hover { background:#e7f2e9; color:#111; }
.table-menu #status,.table-menu #send-status,.table-menu #cart-empty,.table-menu #menu > p { margin:.7rem .85rem; }
.table-menu #status:empty,.table-menu #send-status:empty,.table-menu #product-error:empty { display:none; }
.menu-tools { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:.55rem; margin-bottom:.9rem; }
.menu-tools label { margin:0 0 0 .85rem; }
.menu-tools #search { width:calc(100% - .85rem); }
.category-list,.cart-heading { background:#111; color:#fff; text-align:center; }
.category-list { grid-column:1/-1; display:flex; overflow-x:auto; overscroll-behavior-x:contain; }
.category-list button { flex:0 0 auto; white-space:nowrap; min-height:42px; border:0; border-radius:0; padding:.35rem .8rem; background:#111; color:#fff; font-size:clamp(.9rem,4.5vw,1.4rem); font-weight:400; }
.category-list button[aria-pressed="true"],.category-list button:hover { background:#353535; }
.table-menu .grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,11rem),1fr)); gap:.8rem; margin-inline:.85rem; }
.table-menu .product { display:flex; flex-direction:column; overflow:hidden; border:1px solid #111; border-radius:1.15rem; text-align:center; }
.product-photo { aspect-ratio:4/3; overflow:hidden; border-bottom:1px solid #111; border-radius:0 0 1rem 1rem; background:#edf3ee; }
.table-menu .product img { display:block; width:100%; height:100%; object-fit:cover; border-radius:0; }
.product-detail { padding:.5rem .4rem; }
.product-detail h3 { margin:0; font-size:1rem; overflow-wrap:anywhere; }
.product-actions { display:grid; gap:.35rem; margin-top:auto; padding:.25rem .45rem .55rem; }
.product-actions button { min-height:36px; padding:.25rem .35rem; font-size:.88rem; }
.cart-heading,.table-menu #cart-lines li { display:grid; grid-template-columns:minmax(0,1fr) 6rem minmax(0,1fr); gap:.35rem; padding:.3rem .55rem; }
.cart-heading span:first-child { text-align:start; }
.cart-heading span:last-child { text-align:end; }
.table-menu #cart-lines { list-style:none; padding:0; margin:0; }
.table-menu #cart-lines li { align-items:center; margin:0; border-bottom:1px solid #d7e1d7; overflow-wrap:anywhere; }
.table-menu #cart-lines small { display:block; overflow-wrap:anywhere; }
.table-menu #cart-lines li > strong { text-align:end; overflow-wrap:anywhere; }
.quantity-controls { display:flex; justify-content:center; gap:.2rem; align-items:center; }
.quantity-controls button { min-width:32px; min-height:36px; padding:.15rem; }
.quantity-controls span { min-width:1.4rem; text-align:center; }
.table-menu #orders { margin-inline:.85rem; }
#product-error { color:#8b2929; }
.table-menu #product { padding:0; overflow:hidden; }
#product-form { display:flex; flex-direction:column; max-height:85vh; max-height:85dvh; }
.product-scroll { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:1rem; }
.product-scroll:focus-visible { outline-offset:-3px; }
.product-footer { flex:none; padding:.5rem 1rem .8rem; border-top:1px solid #d7e1d7; background:#fff; }
.product-footer label { margin:0 0 .45rem; }
.product-footer .actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.5rem; }
.product-footer button { min-height:44px; padding:.4rem; }
#cart-undo { position:fixed; z-index:6; inset:auto .65rem max(.65rem,env(safe-area-inset-bottom)); max-width:34rem; margin-inline:auto; display:flex; justify-content:space-between; align-items:center; gap:.5rem; padding:.5rem .7rem; border:1px solid #91aa9b; border-radius:.8rem; background:#fff; box-shadow:0 2px 10px #0002; }
#cart-undo span { min-width:0; overflow-wrap:anywhere; }
#cart-undo button { flex:none; min-height:44px; }
.table-menu:has(#cart-undo:not([hidden])) > main { padding-bottom:6rem; }
@media(max-width:540px) { .table-menu .grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
