/* BraiZone Restaurantes · Mesas: el salón de cada negocio, para atender con una mano (19/11/2026).
   Celular: las zonas y las acciones van abajo, junto al pulgar, y la hoja de la mesa sube desde abajo con su acción
   principal pegada al borde inferior. Tableta: la hoja entra por la derecha. Computadora: salón y hoja lado a lado.
   Un estado nunca se dice solo con color: cada mesa lleva su icono y su palabra. Movimiento: solo transform y opacity. */
.salon-header { margin-bottom: var(--space-4); }
.salon { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: var(--gap); align-items: start; }
.salon-main { min-width: 0; display: grid; gap: var(--space-4); align-content: start; }

/* ---------- zonas y acciones ---------- */
.salon-bar { position: relative; display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.salon-bar-zones { display: flex; gap: var(--space-2); flex: 1 1 auto; min-width: 0; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.salon-bar-zones::-webkit-scrollbar, .salon-alerts::-webkit-scrollbar, .carta-cats::-webkit-scrollbar { display: none; }
.salon-bar .chip, .carta-cats .chip { flex: none; min-height: var(--touch); padding: 0 var(--space-4); border: 0; font-size: var(--text-sm); cursor: pointer; }
.chip-dot { width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--danger); }
.chip.is-active .chip-dot { background: var(--accent-contrast); }
.salon-bar-more { display: none; flex: none; }
.salon-bar-actions { display: flex; gap: var(--space-2); flex: none; }
.salon-bar.is-arranging { justify-content: space-between; flex-wrap: nowrap; padding: var(--space-3) var(--space-4); border-radius: var(--radius-large); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.salon-bar-note { margin: 0; min-width: 0; font-size: var(--text-sm); }
.salon-bar.is-arranging .button { flex: none; min-height: var(--touch); }

/* ---------- lo que necesita atención ---------- */
.salon-alerts { display: flex; gap: var(--space-2); padding: 2px; overflow-x: auto; scrollbar-width: none; }
.salon-alert { --tone: var(--accent); flex: none; display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--touch); padding: 0 var(--space-4) 0 var(--space-3); border: 0; border-radius: var(--radius-pill); background: var(--surface-elevated); box-shadow: inset 0 0 0 1.5px var(--tone); color: var(--text); font-size: var(--text-sm); white-space: nowrap; cursor: pointer; }
.salon-alert .icon { width: 16px; height: 16px; color: var(--tone); }
.salon-alert strong { font-weight: var(--weight-bold); }
.salon-alert.is-bill { --tone: var(--danger); }
.salon-alert.is-ready { --tone: var(--success); }
.salon-alert.is-pending { --tone: var(--warning); }
.salon-alert.is-draft { box-shadow: none; outline: 1.5px dashed var(--tone); outline-offset: -2px; }
.salon-alert:active { transform: scale(0.97); }

/* ---------- el salón ---------- */
.salon-floor { display: grid; gap: var(--space-5); }
.zona-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); }
.zona-head h2 { margin: 0; font-size: var(--text-lg); }
.zona-count { color: var(--text-secondary); font-size: var(--text-xs); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Las mesas de una zona van en filas de «--cols», como en el local. En pantallas anchas no se estiran: siguen siendo mesas. */
.salon-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 190px)); gap: var(--space-3); justify-content: start; }
.mesa { --tone: var(--text-secondary); position: relative; display: grid; gap: 6px; align-content: space-between; justify-items: start; min-width: 0; min-height: 100px; padding: var(--space-3); border: 0; border-radius: var(--radius-large); background: var(--surface-elevated); box-shadow: inset 0 0 0 1px var(--border); color: var(--text); text-align: left; cursor: pointer; transition: transform var(--duration-fast) var(--ease-out); }
.mesa:active { transform: scale(0.97); }
.mesa:focus-visible, .llevar-row:focus-visible, .salon-alert:focus-visible, .paso-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.mesa-name { max-width: 100%; font-size: var(--text-md); font-weight: var(--weight-bold); line-height: 1.15; overflow-wrap: anywhere; }
.mesa-state { display: inline-flex; align-items: center; gap: 5px; color: var(--tone); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.mesa-state .icon { width: 15px; height: 15px; flex: none; }
.mesa-state b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--tone); color: var(--bg); font-size: var(--text-2xs); font-variant-numeric: tabular-nums; }
.mesa-meta { max-width: 100%; color: var(--text-secondary); font-size: var(--text-xs); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Libre: solo el contorno. Con atención en curso: relleno. Con algo por hacer: relleno del tono, borde firme y punto. */
.mesa.is-free { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); }
.mesa.is-preparing { --tone: var(--warning); background: var(--warning-soft); box-shadow: inset 0 0 0 1.5px var(--warning); }
.mesa.is-ready { --tone: var(--success); background: var(--success-soft); box-shadow: inset 0 0 0 2px var(--success); }
.mesa.is-bill { --tone: var(--danger); background: var(--danger-soft); box-shadow: inset 0 0 0 2px var(--danger); }
.mesa.is-unsent { --tone: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
/* Sin enviar desde este celular: trazo punteado. Todavía no es un pedido; cocina no lo ve. */
.mesa.is-draft { --tone: var(--accent); background: var(--accent-soft); box-shadow: none; outline: 2px dashed var(--accent); outline-offset: -2px; }
.mesa.is-draft.is-selected { outline: 3px dashed var(--accent); outline-offset: 2px; }
/* Salió del celular y el Core aún no lo confirma: «Enviando» un instante; si espera, «Por confirmar» en ámbar, con borde
   firme (no punteado: ya no se puede perder, va en camino con su identidad). */
.mesa.is-sending { --tone: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.mesa.is-pending { --tone: var(--warning); background: var(--warning-soft); box-shadow: inset 0 0 0 2px var(--warning); }
.mesa.needs::after { content: ""; position: absolute; top: 10px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--tone); }
.mesa.is-selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.mesa-add, .mesa-slot { justify-items: center; align-content: center; background: transparent; box-shadow: none; border: 1.5px dashed var(--border-strong); color: var(--text-secondary); text-align: center; }
.mesa-add .mesa-name, .mesa-slot .mesa-name { color: var(--text); font-size: var(--text-sm); }
.mesa-add-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-text); }
.mesa-add-mark .icon, .mesa-slot .icon { width: 18px; height: 18px; }
.mesa-slot { border-color: var(--accent); color: var(--accent-text); }
.mesa.is-arranging { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong); }
.mesa.is-arranging .mesa-state { color: var(--accent-text); }
.mesa.is-moving { outline: 3px dashed var(--accent); outline-offset: 2px; }

/* ---------- organizar (solo quien administra) ---------- */
.zona-tools { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); padding: var(--space-3); border-radius: var(--radius-medium); background: var(--surface-subtle); box-shadow: inset 0 0 0 1px var(--border); }
.zona-buttons { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.zona-buttons .button { min-height: var(--touch); }
.salon-new-zone { justify-self: start; min-height: var(--touch); }
/* Fichas para elegir con un toque fuera de un formulario (dentro de uno ya las da app.css). */
.zona-tools .pick-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); min-width: 0; margin: 0; padding: 0; border: 0; }
.zona-tools .pick-chips legend { width: 100%; margin-bottom: 6px; padding: 0; color: var(--text-secondary); font-size: var(--text-xs); font-weight: var(--weight-medium); }
.zona-tools .pick-chips label { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: var(--touch); min-height: var(--touch); padding: 0 var(--space-4); border-radius: var(--radius-pill); background: var(--surface-inset); box-shadow: inset 0 0 0 1px var(--border); color: var(--text); font-size: var(--text-sm); font-variant-numeric: tabular-nums; cursor: pointer; }
.zona-tools .pick-chips input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.zona-tools .pick-chips label:has(input:checked) { background: var(--accent-strong); box-shadow: none; color: var(--accent-contrast); font-weight: var(--weight-bold); }
.zona-tools .pick-chips label:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--accent-soft), inset 0 0 0 1px var(--accent); }

/* ---------- para llevar y web ---------- */
.salon-llevar { display: grid; gap: var(--space-2); }
.salon-llevar h2 { margin: 0; font-size: var(--text-lg); }
.llevar-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); width: 100%; min-height: 60px; padding: var(--space-3) var(--space-4); border: 0; border-radius: var(--radius-medium); background: var(--surface-elevated); box-shadow: inset 0 0 0 1px var(--border); color: var(--text); text-align: left; cursor: pointer; }
.llevar-row > span:first-child { display: grid; gap: 2px; min-width: 0; }
.llevar-row small { color: var(--text-secondary); }
.llevar-row.is-selected { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- la hoja de la mesa ---------- */
.salon-scrim { display: none; }
.salon-sheet { position: sticky; top: var(--space-4); display: flex; flex-direction: column; min-width: 0; max-height: calc(100dvh - var(--space-7)); border-radius: var(--radius-large); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), var(--shadow-md); overflow: hidden; }
.salon-sheet.is-empty { padding: var(--space-5); }
.salon-sheet.is-empty .helper { margin: 0; }
/* Salón tranquilo: ninguna mesa ocupada. Texto con icono, nunca solo color. */
.salon-calm { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0 0 var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-medium); background: var(--surface-inset); color: var(--text-secondary); font-size: var(--text-sm); }
.salon-calm .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--success); }
.salon-calm strong { color: var(--text); }
.sheet-head { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4) var(--space-3) var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.sheet-title { flex: 1 1 auto; min-width: 0; }
.sheet-title h2 { margin: 0; font-size: var(--text-xl); line-height: 1.15; outline: none; overflow-wrap: anywhere; }
.sheet-sub { margin: 3px 0 0; color: var(--text-secondary); font-size: var(--text-xs); }
.sheet-head .status-pill { flex: none; margin-top: 2px; }
.sheet-close { flex: none; margin: -6px 0 0; }
.sheet-body { flex: 1 1 auto; min-height: 0; display: grid; gap: var(--space-4); align-content: start; padding: var(--space-4); overflow-y: auto; overscroll-behavior: contain; }
.sheet-body > .business-feedback, .sheet-hint { margin: 0; }
.sheet-foot { display: grid; gap: var(--space-2); padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: var(--surface-elevated); }
.sheet-foot:empty { display: none; }
.sheet-total { display: flex; align-items: baseline; justify-content: space-between; margin: 0; color: var(--text-secondary); font-size: var(--text-sm); }
.sheet-total strong { color: var(--text); font-size: var(--text-lg); font-variant-numeric: tabular-nums; }
.button.sheet-primary { width: 100%; min-height: 56px; font-size: var(--text-md); }
.sheet-secondary { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sheet-secondary .button { flex: 1 1 auto; min-height: var(--touch); }

.pedido-lineas, .borrador ul { display: grid; margin: 0; padding: 0; list-style: none; }
.pedido-linea { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--space-3); align-items: center; padding: var(--space-3) 0; }
.pedido-linea:first-child { padding-top: 0; }
.pedido-linea + .pedido-linea, .borrador-linea + .borrador-linea { border-top: 1px solid var(--border); }
.salon-sheet .line-copy { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.salon-sheet .line-copy small { color: var(--text-secondary); font-size: var(--text-xs); }
.linea-precio { color: var(--text-secondary); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.pedido-linea .status-pill { justify-self: start; }
.linea-accion { justify-self: end; display: inline-flex; gap: var(--space-1); }
.linea-accion:empty { display: none; }
.linea-accion .button { min-height: var(--touch); }
.pedido-linea.is-cancelled .line-copy, .pedido-linea.is-wasted .line-copy { color: var(--text-secondary); text-decoration: line-through; }
.pedido { display: grid; gap: var(--space-2); }
.pedido h3 { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-bold); }
.borrador { display: grid; gap: var(--space-2); padding: var(--space-3) var(--space-4); border: 2px dashed var(--accent); border-radius: var(--radius-medium); background: var(--accent-soft); }
.borrador-aviso { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; color: var(--text); font-size: var(--text-xs); }
.borrador-aviso .icon { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--accent-text); }
.borrador h3, .carta h3 { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-bold); }
.borrador-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.borrador-head .button { min-height: var(--touch); margin-right: calc(-1 * var(--space-2)); }
.borrador-linea { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-2) 0; }
.borrador-nota { display: inline-flex; align-items: center; gap: 5px; justify-self: start; max-width: 100%; min-height: 32px; padding: 0; border: 0; background: transparent; color: var(--accent-text); font: inherit; font-size: var(--text-xs); text-align: left; cursor: pointer; }
.borrador-nota .icon { width: 14px; height: 14px; flex: none; }
.borrador-nota span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.borrador-nota:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-small); }
/* Un plato del borrador que ya no se puede pedir: el motivo en rojo, con icono y palabra (nunca solo el color). */
.borrador.has-off .borrador-aviso .icon { color: var(--danger); }
.borrador-linea.is-off strong { color: var(--text-secondary); text-decoration: line-through; }
.borrador-alerta { display: inline-flex; align-items: center; gap: 5px; color: var(--danger); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.borrador-alerta .icon { width: 14px; height: 14px; flex: none; }
/* Por confirmar: lo que salió del celular y el Core aún no confirma. No se edita; dice en qué está. */
.envio { display: grid; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-radius: var(--radius-medium); background: var(--warning-soft); box-shadow: inset 0 0 0 2px var(--warning); }
.envio.is-sending { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.envio-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.envio-head h3 { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0; font-size: var(--text-sm); font-weight: var(--weight-bold); }
.envio-head h3 .icon { width: 16px; height: 16px; flex: none; color: var(--warning); }
.envio.is-sending .envio-head h3 .icon { color: var(--accent-text); }
.envio-head .button { min-height: var(--touch); margin-right: calc(-1 * var(--space-2)); }
.envio-aviso { margin: 0; color: var(--text); font-size: var(--text-xs); }
.envio ul { display: grid; margin: 0; padding: 0; list-style: none; }
.envio-linea { padding: var(--space-2) 0; }
.envio-linea + .envio-linea { border-top: 1px solid var(--border); }
.envio-linea small { display: block; color: var(--text-secondary); font-size: var(--text-xs); }
.paso { display: inline-flex; align-items: center; gap: 2px; }
.paso-btn { width: 48px; height: 48px; border: 0; border-radius: var(--radius-medium); background: var(--surface-elevated); box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text); font-size: var(--text-xl); line-height: 1; cursor: pointer; }
.paso-btn:active { transform: scale(0.94); }
.paso output { min-width: 34px; font-size: var(--text-md); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; text-align: center; }

.carta { display: grid; gap: var(--space-3); }
.carta-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.carta-buscar { display: inline-flex; align-items: center; gap: 6px; width: min(180px, 50%); min-height: var(--touch); padding: 0 var(--space-3); border-radius: var(--radius-pill); background: var(--surface-inset); box-shadow: inset 0 0 0 1px var(--border); color: var(--text-secondary); }
.carta-buscar .icon { width: 16px; height: 16px; flex: none; }
.carta-buscar input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; outline: none; }
.carta-buscar input::placeholder { color: var(--muted); }
.carta-buscar:focus-within { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
.carta-cats { display: flex; gap: var(--space-2); padding: 2px; overflow-x: auto; scrollbar-width: none; }
.carta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
/* Un plato es un botón grande (sumar) y, cuando ya se eligió, lleva al lado su cuenta y un «−» para corregir. */
.plato { position: relative; display: flex; min-width: 0; min-height: 76px; border-radius: var(--radius-medium); background: var(--surface-subtle); box-shadow: inset 0 0 0 1px var(--border); }
.plato[hidden] { display: none; }
.plato-main { flex: 1 1 auto; display: grid; gap: 4px; align-content: start; justify-items: start; min-width: 0; padding: var(--space-3); border: 0; border-radius: inherit; background: transparent; color: var(--text); text-align: left; cursor: pointer; transition: transform var(--duration-fast) var(--ease-out); }
.plato-main:active:not(:disabled) { transform: scale(0.97); }
.plato-main:focus-visible, .plato-menos:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.plato strong { font-size: var(--text-sm); line-height: 1.2; overflow-wrap: anywhere; }
.plato-paso { flex: none; display: grid; grid-template-rows: auto 1fr; justify-items: center; gap: 2px; padding: 6px 6px 6px 0; }
.plato-menos { order: 2; align-self: end; width: 44px; height: 44px; border: 0; border-radius: var(--radius-medium); background: var(--surface-elevated); box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text); font-size: var(--text-xl); line-height: 1; cursor: pointer; }
.plato-menos:active { transform: scale(0.94); }
.plato-precio { color: var(--text-secondary); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.plato-nota { color: var(--warning); font-size: var(--text-2xs); }
.plato.is-off { opacity: 0.5; }
.plato.is-off .plato-main { cursor: not-allowed; }
.plato.is-picked { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.plato-cuenta { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: var(--radius-pill); background: var(--accent-strong); color: var(--accent-contrast); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }

@media (hover: hover) and (pointer: fine) {
  .mesa:hover, .llevar-row:hover { box-shadow: inset 0 0 0 1px var(--accent); }
  .mesa.is-ready:hover, .mesa.is-bill:hover, .mesa.is-unsent:hover, .mesa.is-preparing:hover, .mesa.is-sending:hover, .mesa.is-pending:hover { box-shadow: inset 0 0 0 2px var(--tone); }
  .mesa.is-draft:hover { box-shadow: none; }
  .plato:not(.is-off):hover { background: var(--surface-hover); }
  .plato.is-picked:hover { background: var(--accent-soft); }
  .mesa-add:hover { border-color: var(--accent); box-shadow: none; color: var(--text); }
}

/* ---------- tableta y celular: la hoja se superpone ---------- */
@media (max-width: 1100px) {
  .salon { grid-template-columns: minmax(0, 1fr); }
  .salon-sheet.is-empty { display: none; }
  .salon-scrim { display: block; position: fixed; inset: 0; z-index: calc(var(--z-sheet) - 1); border: 0; padding: 0; background: var(--overlay); }
  .salon-sheet:not(.is-empty) { position: fixed; z-index: var(--z-sheet); top: 0; right: 0; bottom: 0; width: min(460px, 100%); max-height: none; border-radius: var(--radius-large) 0 0 var(--radius-large); box-shadow: var(--shadow-lg); }
  .salon-sheet.is-opening { animation: salon-lado var(--duration-base) var(--ease-drawer) both; }
  html.salon-sheet-open { overflow: hidden; }
}
@media (max-width: 860px) {
  /* Zonas y acciones abajo, encima de la barra de navegación: es donde llega el pulgar. */
  .salon-header { margin-bottom: var(--space-2); }
  .salon-header .eyebrow { display: none; }
  .salon-main { padding-bottom: 72px; align-content: end; }
  .salon-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); z-index: calc(var(--z-tabbar) - 1); flex-wrap: nowrap; padding: var(--space-2) var(--space-3); border-radius: 0; background: var(--surface); box-shadow: 0 -1px 0 var(--border); }
  .salon-bar.is-arranging { border-radius: 0; background: var(--surface); box-shadow: 0 -2px 0 var(--accent); }
  .salon-bar-more { display: inline-flex; min-height: var(--touch); margin-left: auto; }
  .salon-bar-actions { display: none; position: absolute; left: 0; right: 0; bottom: 100%; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-large) var(--radius-large) 0 0; background: var(--surface-elevated); box-shadow: 0 -1px 0 var(--border), var(--shadow-lg); }
  .salon-bar.is-open .salon-bar-actions { display: grid; }
  .salon-bar-actions .button { justify-content: flex-start; min-height: 52px; font-size: var(--text-md); }
  .salon-grid { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--space-2); }
}
@media (max-width: 760px) {
  .salon-sheet:not(.is-empty) { top: auto; left: 0; width: 100%; height: min(92dvh, calc(100dvh - 20px)); border-radius: var(--radius-large) var(--radius-large) 0 0; }
  .salon-sheet.is-opening { animation-name: salon-arriba; }
  /* Editar una mesa es corto: la hoja mide lo que ocupa y sus botones quedan abajo. */
  .salon-sheet.is-editor { height: auto; max-height: min(92dvh, calc(100dvh - 20px)); }
  .carta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Cuatro o cinco mesas por fila en un celular: lo esencial (nombre y estado), sin la línea de detalle. */
  .salon-grid[style*="--cols:4"] .mesa, .salon-grid[style*="--cols:5"] .mesa { min-height: 84px; padding: var(--space-2); }
  .salon-grid[style*="--cols:4"] .mesa-meta, .salon-grid[style*="--cols:5"] .mesa-meta { display: none; }
  .salon-grid[style*="--cols:4"] .mesa-name, .salon-grid[style*="--cols:5"] .mesa-name { font-size: var(--text-sm); }
  .salon-grid[style*="--cols:5"] .mesa-state > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (min-width: 1101px) { .carta-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }
@keyframes salon-arriba { from { transform: translateY(100%); } to { transform: none; } }
@keyframes salon-lado { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .salon-sheet.is-opening { animation: none; }
  .mesa, .plato-main { transition: none; }
  .mesa:active, .plato-main:active:not(:disabled), .plato-menos:active, .paso-btn:active, .salon-alert:active { transform: none; }
}
