/* La Brujah · rojo del logotipo y del libro de control, carbón y blanco; letra condensada tipo DIN */
@font-face { font-family: "Barlow Semi Condensed"; src: url("/fuentes/BarlowSemiCondensed-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("/fuentes/BarlowSemiCondensed-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("/fuentes/BarlowSemiCondensed-SemiBold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Abril Fatface"; src: url("/fuentes/AbrilFatface-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
:root {
  --rojo: #8C1319; --rojo-2: #6C0E13; --papel: #E7E0D0;
  --patio: #333B2E; --bg: #211D1D; --surface: #2B2626; --surface-2: #393232; --border: #463D3D; --border-2: #6B5F5F;
  --ink: #F2ECE7; --muted: #C2B7B2; --acc: #8C1319; --acc-ink: #FFFFFF; --acc-txt: #EDA29F; --ok: #93CFA0; --warn: #E8C067; --bad: #EDA29F;
  --d: "Abril Fatface", "Bodoni 72", Didot, "Bodoni MT", Georgia, serif;
  --f: "Barlow Semi Condensed", Bahnschrift, "DIN Alternate", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: dark;
}
/* Día: por elección o porque así está el sistema */
:root[data-tema=dia] {
  --rojo: #CC171E; --rojo-2: #A61118; --acc: #CC171E; --papel: #F5F2E9; --patio: #DCE5CF; --bg: #E4E1D8; --surface: #F5F2E9; --surface-2: #D8D4C8; --border: #C9C4B5; --border-2: #9F998A;
  --ink: #0D0D0D; --muted: #595955; --acc-txt: #B3141A; --ok: #1E6A39; --warn: #7A5600; --bad: #B3141A;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-tema=noche]) {
    --rojo: #CC171E; --rojo-2: #A61118; --acc: #CC171E; --papel: #F5F2E9; --patio: #DCE5CF; --bg: #E4E1D8; --surface: #F5F2E9; --surface-2: #D8D4C8; --border: #C9C4B5; --border-2: #9F998A;
    --ink: #0D0D0D; --muted: #595955; --acc-txt: #B3141A; --ok: #1E6A39; --warn: #7A5600; --bad: #B3141A;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.4 var(--f); min-height: 100dvh; overflow-wrap: anywhere; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
input, select, textarea { width: 100%; min-width: 0; max-width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: 6px; background: var(--bg); -webkit-appearance: none; appearance: none; }
textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input[type=checkbox] { width: 22px; height: 22px; padding: 0; border-radius: 6px; flex: none; accent-color: var(--acc); -webkit-appearance: auto; appearance: auto; }
input[type=date] { text-align: left; }
:focus-visible { outline: 2px solid var(--acc-txt); outline-offset: 2px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); min-width: 0; }
label.ck { flex-direction: row; align-items: center; gap: 10px; font-size: 16px; color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border: 1px solid var(--border-2); border-radius: 6px; background: var(--surface-2); font-weight: 600; white-space: nowrap; max-width: 100%; }
.btn.pri { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 15px; }
.btn.liso { background: none; }
.btn.mal { color: var(--bad); }
.btn:disabled { opacity: .45; cursor: default; }
.muted { color: var(--muted); }
.r { text-align: right; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Entrada: toda roja, con el logotipo */
.entrada { min-height: 100dvh; background: var(--rojo); color: #fff; display: grid; align-content: center; justify-items: center; gap: 28px; padding: calc(32px + env(safe-area-inset-top)) 20px 32px; }
.entrada-m { text-align: center; max-width: 420px; }
.entrada-m .logo { width: min(270px, 66vw); height: auto; display: block; margin: 0 auto; }
.entrada-m p { margin-top: 8px; font-size: 19px; }
.entrada form { width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; }
.entrada label { color: #fff; }
.entrada input { background: #fff; color: #141414; border-color: #fff; }
.entrada .btn { background: #fff; border-color: #fff; color: var(--rojo); margin-top: 4px; }
.entrada .err { color: #fff; font-weight: 600; }
.entrada :focus-visible { outline-color: #fff; }
.err { color: var(--bad); font-size: 15px; min-height: 20px; }

/* Armazón: franja roja arriba en teléfono; en pantalla ancha, barra roja a la izquierda como en el libro de control */
.riel { position: sticky; top: 0; z-index: 5; background: var(--rojo); color: #fff; padding-top: env(safe-area-inset-top); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "m q" "t t"; }
.riel-m { grid-area: m; display: flex; align-items: center; padding: 8px 0 8px 16px; min-width: 0; }
.riel .logo-l { height: 40px; width: auto; display: block; flex: none; }
.riel .logo { display: none; }
.quien { grid-area: q; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 12px 8px 8px; font-size: 16px; }
.quien > span { display: none; }
.quien-b { display: flex; align-items: center; gap: 8px; }
.tema { flex: none; display: inline-flex; border: 1px solid rgba(255, 255, 255, .5); border-radius: 6px; overflow: hidden; }
.tema button { width: 34px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: #fff; }
.tema button[aria-pressed=true] { background: rgba(0, 0, 0, .3); }
.tema svg { width: 17px; height: 17px; }
.salir { height: 38px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 6px; background: none; color: #fff; font-weight: 600; font-size: 16px; }
.riel :focus-visible { outline-color: #fff; }
.tabs { grid-area: t; display: flex; gap: 2px; padding: 0 6px; overflow-x: auto; scrollbar-width: none; background: var(--rojo-2); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; height: 46px; padding: 0 11px; border: 0; border-bottom: 3px solid transparent; background: none; color: #fff; font-weight: 500; font-size: 17px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tab svg { width: 19px; height: 19px; flex: none; }
.tab[aria-current=page] { font-weight: 600; border-bottom-color: #fff; }
.cta[hidden] { display: none; }
.cta { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #fff; color: var(--rojo); font-size: 13px; font-weight: 700; }
@media (min-width: 900px) {
  #app.arm { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
  .riel { height: 100dvh; display: flex; flex-direction: column; padding: 22px 0 16px; }
  .riel-m { padding: 0 20px 14px; justify-content: center; }
  .riel .logo { display: block; width: 150px; height: auto; }
  .riel .logo-l { display: none; }
  .tabs { flex: 1 1 auto; flex-direction: column; gap: 2px; padding: 6px 10px; overflow-y: auto; background: none; }
  .tab { height: 44px; padding: 0 12px; border-bottom: 0; border-radius: 6px; font-size: 18px; gap: 12px; }
  .tab svg { width: 21px; height: 21px; }
  .tab[aria-current=page] { background: rgba(0, 0, 0, .28); }
  .tab .cta { margin-left: auto; }
  .quien { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px 0; margin-top: auto; }
  .quien > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .quien-b { justify-content: space-between; }
  .pie { left: 220px; }
}
main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
.cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin-bottom: 16px; }
.cab h1 { font-family: var(--d); font-size: 36px; font-weight: 400; line-height: 1.05; min-width: 0; }
.cab .acc { display: flex; flex-wrap: wrap; gap: 8px; }
.vacio { color: var(--muted); padding: 28px 0; }
h2.sec { font-family: var(--d); font-size: 21px; font-weight: 400; color: var(--ink); margin: 28px 0 8px; }

/* Salón: las mesas son redondas; el arco marca cuánto lleva abierta, como los arcos del reloj del logotipo */
.salon { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; padding: 10px 6px 0; }
.mesa { position: relative; aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--border-2); background: none; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 13%; text-align: center; min-width: 0; }
.mesa b { font-family: var(--d); font-weight: 400; font-size: 21px; line-height: 1.1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mesa small { font-size: 14px; line-height: 1.2; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mesa .tot { font-family: var(--d); font-size: 27px; line-height: 1.1; }
.mesa.abierta { border: 0; background: var(--rojo); color: #fff; }
.mesa.abierta small { color: #fff; }
.mesa .aro { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); pointer-events: none; }
.aro .a1 { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.sello { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); height: 24px; padding: 0 9px; display: inline-flex; align-items: center; border-radius: 4px; font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--bg); }
.sello.ok { background: var(--ok); }
.sello.warn { background: var(--warn); }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 4px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border-2); }
.chip.ok { color: var(--ok); border-color: var(--ok); }
.chip.warn { color: var(--warn); border-color: var(--warn); }
.chip.bad { color: var(--bad); border-color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Plano del local, a escala en metros */
.plano-w { max-width: 460px; margin: 0 auto; }
.plano-svg { display: block; width: 100%; height: auto; font-family: var(--f); }
.cu { stroke: var(--ink); stroke-width: .07; }
.cu-interior { fill: var(--surface); }
.cu-patio { fill: var(--patio); }
.cu-banos { fill: var(--surface-2); }
.cu-cocina { fill: url(#rayas); }
.ry-f { fill: var(--surface); }
.ry-l { stroke: var(--border-2); stroke-width: .08; }
.cu-t { fill: var(--muted); font-weight: 600; }
.muro { fill: none; stroke: var(--ink); stroke-width: .16; }
.pu-b { stroke: var(--surface); stroke-width: .22; }
.pu-cortina { stroke: var(--muted); stroke-width: .1; stroke-dasharray: .16 .1; }
.pu-puerta { stroke: var(--acc-txt); stroke-width: .07; }
.mueble { fill: var(--ink); }
.mueble-t { fill: var(--bg); font-family: var(--d); text-anchor: middle; }
.pm .f, .pm .resp, .pm .ban { fill: var(--surface); stroke: var(--ink); stroke-width: .05; }
.pm text { fill: var(--ink); text-anchor: middle; font-weight: 600; }
.pm .t2 { font-family: var(--d); font-weight: 400; }
.pm.abierta .f, .pm.abierta .resp { fill: var(--rojo); stroke: var(--rojo); }
.pm.abierta text { fill: #fff; }
.pm .toque { fill: transparent; }
.pm[data-a] { cursor: pointer; outline: none; }
.pm[data-a]:focus-visible .f { stroke: var(--acc-txt); stroke-width: .12; }
.pto-ok { fill: var(--ok); stroke: var(--surface); stroke-width: .04; }
.pto-warn { fill: var(--warn); stroke: var(--surface); stroke-width: .04; }
.plano-svg.ed [data-e] { cursor: move; touch-action: none; }
.plano-svg.ed .sel .f, .plano-svg.ed .sel .cu, .plano-svg.ed .sel .mueble, .plano-svg.ed .sel .pu-puerta, .plano-svg.ed .sel .pu-cortina { stroke: #2F80ED; stroke-width: .12; stroke-dasharray: .2 .12; }
.ed { display: flex; flex-direction: column; gap: 16px; }
.ed-panel { display: flex; flex-direction: column; gap: 12px; }
.ed-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
/* En teléfono, la ficha de lo seleccionado queda fija abajo para que el plano no se mueva al tocar */
.ed-sel { position: fixed; left: 0; right: 0; bottom: calc(67px + env(safe-area-inset-bottom)); z-index: 4; max-height: 44dvh; overflow-y: auto; padding: 12px 16px; border-top: 1px solid var(--border-2); background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.ed-sel p { font-size: 15px; }
.ed-sel input, .ed-sel select { height: 40px; }
.ed-lienzo { max-width: 460px; width: 100%; margin: 0 auto; padding-bottom: 46dvh; }
@media (min-width: 900px) {
  .ed { flex-direction: row-reverse; align-items: flex-start; gap: 28px; }
  .ed-panel { flex: 1 1 320px; position: sticky; top: 18px; }
  .ed-sel { position: static; max-height: none; overflow: visible; padding: 12px; border: 1px solid var(--border-2); border-radius: 8px; }
  .ed-lienzo { padding-bottom: 0; }
  .ed-lienzo { flex: none; width: 460px; margin: 0; }
}

/* Ticket de papel: la cuenta y las comandas se leen como lo que son. El papel es claro en los dos modos. */
.ticket { --bg: var(--papel); --surface: var(--papel); --surface-2: #E6E1D2; --border: #D3CDBC; --border-2: #A39C8A; --ink: #141414; --muted: #5E5A4F; --acc-txt: #B3141A; --ok: #1E6A39; --warn: #7A5600; --bad: #B3141A; --s: 9px;
  color-scheme: light; background: var(--bg); color: var(--ink); padding: 20px 16px 34px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--s)) 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--s)) 100%; }
.ticket.cuenta { max-width: 560px; margin: 0 auto; }
.tk-h { text-align: center; padding-bottom: 14px; border-bottom: 2px dashed var(--border-2); }
.tk-h h1 { font-family: var(--d); font-weight: 400; font-size: 36px; line-height: 1.05; }
.tk-h p { margin-top: 5px; font-size: 15px; color: var(--muted); }
.renglones { list-style: none; margin: 0; padding: 0; }
.renglones li { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.ren { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 19px; font-weight: 500; }
.ren .q { flex: none; min-width: 22px; font-family: var(--d); color: var(--acc-txt); }
.ren .nm { min-width: 0; }
.ren .pt { flex: 1 1 14px; min-width: 14px; border-bottom: 2px dotted var(--border-2); transform: translateY(-4px); }
.ren .num { flex: none; font-weight: 600; }
.ren s { color: var(--muted); font-weight: 400; font-size: 15px; }
.nota { margin: 2px 0 0 30px; font-size: 15px; color: var(--muted); }
.renglones .ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0 30px; }
.ctl select { height: 34px; width: auto; font-size: 14px; padding: 0 28px 0 10px; background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; }
.tk-t { margin: 12px 0 0; }
.tk-t div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 3px 0; font-size: 17px; }
.tk-t dt { color: var(--muted); }
.tk-t dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.tk-t .gr dt { font-family: var(--d); font-size: 26px; color: var(--ink); }
.tk-t .gr dd { font-family: var(--d); font-weight: 400; font-size: 32px; }
.ticket .cli { margin: 12px 0 0; background: none; border: 1px dashed var(--border-2); }
.ticket .vacio { text-align: center; }

/* Carta: nombre, puntos y precio, como en un menú impreso */
.carta h2.sec { font-size: 24px; padding-bottom: 5px; border-bottom: 3px solid var(--acc); margin-bottom: 4px; }
.plato { width: 100%; display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border: 0; background: none; color: inherit; text-align: left; min-width: 0; }
.plato small { font-size: 15px; color: var(--muted); }
.plato:disabled { opacity: .5; }
.plato .n { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-right: 8px; padding: 0 6px; border-radius: 12px; background: var(--acc); color: #fff; font-style: normal; font-size: 14px; font-weight: 700; vertical-align: 2px; }

/* Listas genéricas */
.lista { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.lista > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.lista .cu { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lista .cu b { font-weight: 600; }
.lista .cu small { color: var(--muted); font-size: 14px; }
.lista .der { flex: none; display: flex; align-items: center; gap: 8px; }
.lista .der.col { flex-direction: column; align-items: flex-end; gap: 4px; }

/* Cuenta */
.it { align-items: flex-start !important; }
.it .q { flex: none; width: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.it .ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.it select { height: 34px; width: auto; font-size: 14px; padding: 0 28px 0 10px; background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; }
.paso { display: inline-flex; align-items: center; border: 1px solid var(--border-2); border-radius: 6px; overflow: hidden; }
.paso button { width: 40px; height: 38px; border: 0; background: var(--surface-2); font-size: 20px; line-height: 1; }
.paso span { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.pie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; background: var(--bg); border-top: 1px solid var(--border); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.pie > div { max-width: 1148px; margin: 0 auto; display: flex; gap: 8px; }
.pie .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; overflow: hidden; text-overflow: ellipsis; }
.totales { margin: 18px 0 0; }
.totales div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.totales dt { color: var(--muted); }
.totales dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.totales .gr dt, .totales .gr dd { font-family: var(--d); font-size: 26px; color: var(--ink); font-weight: 400; }

.cli { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--acc); border-radius: 8px; background: var(--surface); font-size: 16px; }
.cli p { color: var(--muted); font-size: 15px; margin-top: 4px; }
.der.col s, .prod s { color: var(--muted); font-size: 14px; font-weight: 400; }

.falta { color: var(--bad); font-weight: 600; }
input.cnt { width: 96px; text-align: right; }
.tabla-w { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.tabla { border-collapse: collapse; width: 100%; min-width: 860px; font-size: 15px; font-variant-numeric: tabular-nums; }
.tabla th, .tabla td { padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; text-align: left; }
.tabla th { font-size: 13px; color: var(--muted); font-weight: 600; }
.tabla tbody tr:last-child td { border-bottom: 0; }
.tabla .r { text-align: right; }
.tabla td:first-child, .tabla th:first-child { position: sticky; left: 0; background: var(--bg); }

/* Diálogo */
dialog { width: min(520px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); padding: 0; border: 1px solid var(--border-2); border-radius: 6px; background: var(--surface); color: var(--ink); overflow: hidden; }
dialog.ancho { width: min(760px, calc(100vw - 20px)); }
dialog::backdrop { background: rgba(8, 5, 10, .6); }
.dlg { display: flex; flex-direction: column; max-height: calc(100dvh - 22px); }
.dlg-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 10px; }
.dlg-h h3 { font-family: var(--d); font-size: 26px; font-weight: 400; line-height: 1.1; min-width: 0; }
.dlg-h p { color: var(--muted); font-size: 15px; }
.x { flex: none; width: 40px; height: 40px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 24px; line-height: 1; }
.dlg-c { padding: 4px 16px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dlg-c > * { flex: none; }
.dlg-p { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.dlg-p .btn.pri { flex: 1 1 auto; }
.dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--border-2); border-radius: 6px; overflow: hidden; }
.seg button { height: 44px; border: 0; border-left: 1px solid var(--border-2); background: none; font-weight: 600; font-size: 15px; color: var(--muted); padding: 0 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed=true] { background: var(--acc); color: var(--acc-ink); }

/* Selector del menú */
.cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; height: 36px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: 6px; background: none; font-size: 15px; font-weight: 600; color: var(--muted); }
.cat[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.prod { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; min-width: 0; }
.prod .cu { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prod .cu small { color: var(--muted); font-size: 14px; }
.prod:disabled { opacity: .5; }
.prod .mas { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-2); font-size: 20px; line-height: 1; }

/* Cocina y barra: las comandas cuelgan del riel como tickets */
.riel-c { border-top: 7px solid var(--border-2); }
.tablero { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 0 16px; align-items: start; }
.com { padding: 16px 0 30px; margin-bottom: 16px; border-top: 8px solid transparent; }
.com.tarde { border-top-color: #E2A72E; }
.com.muy { border-top-color: var(--rojo); }
.com-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 14px 12px; border-bottom: 2px dashed var(--border-2); }
.com-h b { font-family: var(--d); font-weight: 400; font-size: 30px; line-height: 1; min-width: 0; }
.com-h .reloj { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); align-self: center; }
.com.tarde .reloj { color: var(--warn); }
.com.muy .reloj { color: var(--bad); }
.reloj { display: inline-flex; align-items: center; gap: 6px; }
.reloj svg { width: 26px; height: 26px; flex: none; }
.reloj circle { fill: none; stroke-width: 4; }
.reloj .rb { stroke: var(--border); }
.reloj .ra { stroke: currentColor; stroke-linecap: round; }
.com ul { list-style: none; margin: 0; padding: 0; }
.com li { border-bottom: 1px dashed var(--border); }
.com li button { width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 0; background: none; color: inherit; text-align: left; min-width: 0; }
.com li .q { flex: none; min-width: 26px; font-family: var(--d); font-size: 28px; line-height: 1; color: var(--acc-txt); }
.com li .cu { flex: 1 1 auto; min-width: 0; font-size: 22px; font-weight: 600; line-height: 1.15; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.com li .cu small { font-size: 16px; font-weight: 600; color: #141414; background: #F3D46B; padding: 1px 7px; }
.com li .ok { flex: none; align-self: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border-2); }
.com-p { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 0; }
.com-p small { color: var(--muted); font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Recetas */
.rec { border-bottom: 1px solid var(--border); }
.rec summary { display: flex; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer; list-style: none; min-width: 0; }
.rec summary::-webkit-details-marker { display: none; }
.rec summary .cu { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rec summary .cu small { color: var(--muted); font-size: 14px; }
.rec .cuerpo { padding: 0 0 16px; display: flex; flex-direction: column; gap: 12px; }
.rec .ing { list-style: none; margin: 0; padding: 0; }
.rec .ing li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.rec .prep { white-space: pre-wrap; color: var(--ink); }
.ing-f { display: grid; grid-template-columns: minmax(0, 1fr) 96px 40px; gap: 8px; align-items: center; }
.ing-f .x { border: 1px solid var(--border-2); }

/* Tarjetas de cifras */
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cifra { padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cifra span { font-size: 14px; color: var(--muted); }
.cifra b { font-family: var(--d); font-size: 30px; font-weight: 400; line-height: 1.1; }
.tarj { padding: 14px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--surface); display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.tarj h3 { font-size: 18px; font-weight: 600; }
.tarj .fila { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.tarj .fila label { flex: 1 1 140px; }

#toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .15s; }
#toast.ver { opacity: 1; }
#toast.mal { background: var(--bad); color: var(--bg); }
@media (max-width: 480px) {
  .cab h1 { font-size: 32px; }
  .salon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Página del cliente frecuente */
.cl { max-width: 720px; margin: 0 auto; padding: 22px 16px calc(110px + env(safe-area-inset-bottom)); }
.cl-top { background: var(--rojo); color: #fff; padding: calc(22px + env(safe-area-inset-top)) 16px 28px; }
.cl-top div { max-width: 688px; margin: 0 auto; }
.cl-top .logo { width: 116px; height: auto; display: block; margin: 0 0 16px -6px; }
.cl-top h1 { font-family: var(--d); font-weight: 400; font-size: 46px; line-height: 1.05; }
.cl-top p { margin-top: 8px; font-size: 18px; }
.cl .ticket { margin-bottom: 20px; }

.siempre { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.siempre button { display: flex; flex-direction: column; gap: 4px; padding: 12px; text-align: left; border: 1px solid var(--border-2); border-radius: 8px; background: var(--surface); min-width: 0; }
.siempre button b { font-weight: 600; } .siempre button span { color: var(--muted); font-size: 15px; }
.prod .pr { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.prod .n { flex: none; min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--acc); color: var(--acc-ink); font-size: 14px; font-weight: 700; }
