: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 > main { padding-bottom: 6rem; }
.table-menu header main { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; flex-wrap: wrap; }
.table-menu header h1 { margin: 0; font-size: clamp(1.25rem, 4vw, 1.7rem); }
.table-menu #status:empty, .table-menu #send-status:empty, .table-menu #product-error:empty { display: none; }
.menu-tools { display: grid; gap: .55rem; margin-block: .5rem 1.1rem; }
.menu-tools label { margin: 0; font-weight: 650; }
.category-list { display: flex; gap: .45rem; overflow-x: auto; padding: .25rem .25rem .55rem; margin-inline: -.25rem; }
.category-list button { flex: 0 0 auto; min-height: 44px; }
.category-list button[aria-pressed="false"], .table-menu button.options, .quantity-controls button {
  background: #fff; color: #153e31; border-color: #91aa9b;
}
.category-list button[aria-pressed="false"]:hover, .table-menu button.options:hover, .quantity-controls button:not(:disabled):hover {
  background: #e7f2e9;
}
.table-menu #menu h2 { margin: 1.05rem 0 .55rem; font-size: 1.15rem; }
.table-menu .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.5rem), 1fr)); }
.table-menu .product { display: flex; flex-direction: column; overflow: hidden; border: 1px solid #d7e1d7; border-radius: .8rem; }
.table-menu .product img { border-radius: 0; aspect-ratio: 16/10; }
.product-detail { padding: .75rem .8rem .4rem; }
.product-detail h3 { margin: 0 0 .25rem; font-size: 1rem; overflow-wrap: anywhere; }
.product-detail strong { font-size: 1.08rem; }
.product-actions { margin-top: auto; padding: .4rem .65rem .65rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.product-actions button { flex: 1 1 auto; min-height: 44px; padding: .4rem .45rem; }
.table-menu #cart-lines { list-style: none; padding: 0; margin: 0 0 .8rem; }
.table-menu #cart-lines li { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) auto minmax(4.5rem, auto);
  column-gap: .6rem; border-bottom: 1px solid #d7e1d7; padding-block: .55rem; }
.table-menu #cart-lines small { display: block; overflow-wrap: anywhere; }
.table-menu #cart-lines li > strong { text-align: end; }
.quantity-controls { display: flex; gap: .25rem; align-items: center; }
.quantity-controls button { min-width: 42px; min-height: 42px; padding: .25rem; }
.quantity-controls span { min-width: 1.3rem; text-align: center; }
.cart-total { display: flex; justify-content: space-between; gap: .5rem; padding-block: .5rem .85rem; font-size: 1.1rem; }
.table-menu #send { width: 100%; min-height: 48px; }
.cart-bar { position: fixed; inset: auto 0 0; z-index: 6; background: #fff; border-top: 1px solid #d7e1d7;
  padding: .55rem 1rem max(.55rem, env(safe-area-inset-bottom)); }
.cart-bar .action { display: flex; justify-content: space-between; max-width: 56rem; margin: auto; gap: .75rem; }
#product-error { color: #8b2929; }
@media (max-width: 500px) {
  .table-menu .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .product-detail { padding-inline: .55rem; }
  .product-actions { padding-inline: .5rem; }
}
@media print { .cart-bar, .menu-tools { display: none !important; } }