/* Stack Burgers — menú digital.
   Marca Brasa (manual en la bóveda: Stack_Burgers_Manual_Marca):
   carbón, brasa y hueso, con mostaza solo en el logo. Neutros teñidos del matiz
   de la marca, líneas de 1 px, radios 4/6/10/12, sin sombras ni efectos.
   Big Shoulders Display para títulos, Geist para texto y Geist Mono para precios. */

/* ---------- Tokens ---------- */
:root {
  --bg:   hsl(34 35% 94%);   /* hueso */
  --bg-2: hsl(34 40% 98%);
  --bg-3: hsl(32 26% 90%);
  --line:   hsl(25 14% 84%);
  --line-2: hsl(22 10% 74%);
  --text:   hsl(15 13% 7%);  /* carbón */
  --text-2: hsl(18 8% 30%);
  --text-3: hsl(18 6% 38%);

  /* Usos permitidos: logo, botón primario, cierre del H1, número de sección,
     enlaces de acción, marcadores pequeños, opción elegida, foco.
     Sobre brasa el texto va en carbón: el blanco no llega a 4.5:1. */
  --brand:       #E4572E;    /* brasa */
  --brand-hover: #F06A3F;
  --on-brand:    #151110;
  --brand-text:  #B03C17;    /* brasa oscura para texto pequeño sobre hueso (5.2:1) */
  --brand-soft:  hsl(13 76% 54% / .09); /* solo fondo de la opción elegida */
  --mostaza:     #F2B134;    /* solo logo y acentos gráficos, nunca texto sobre claro */

  --ink:      hsl(15 13% 6%);
  --ink-2:    hsl(28 10% 72%);
  --ink-line: hsl(15 8% 18%);
  --ink-brand: #E4572E;
  --danger: #B42318;

  --radius-sm: 4px; --radius-md: 6px; --radius-lg: 10px; --radius-xl: 12px;
  --section-y: clamp(72px, 4rem + 4vw, 112px);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

/* Modo oscuro: por preferencia del sistema o elegido con el botón */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:   hsl(15 13% 7%);
    --bg-2: hsl(15 11% 10%);
    --bg-3: hsl(15 10% 13%);
    --line:   hsl(15 8% 19%);
    --line-2: hsl(15 7% 27%);
    --text:   hsl(34 35% 94%);
    --text-2: hsl(28 10% 74%);
    --text-3: hsl(24 7% 62%);
    --brand-text: var(--ink-brand);
    --danger: #F97066;
    --brand-soft: hsl(13 76% 54% / .13);
    --ink: hsl(15 13% 4%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:   hsl(15 13% 7%);
  --bg-2: hsl(15 11% 10%);
  --bg-3: hsl(15 10% 13%);
  --line:   hsl(15 8% 19%);
  --line-2: hsl(15 7% 27%);
  --text:   hsl(34 35% 94%);
  --text-2: hsl(28 10% 74%);
  --text-3: hsl(24 7% 62%);
  --brand-text: var(--ink-brand);
  --brand-soft: hsl(13 76% 54% / .13);
  --danger: #F97066;
  --ink: hsl(15 13% 4%);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
/* El atributo height le gana a aspect-ratio si no se libera aquí */
img { height: auto; }

/* Sin restos del navegador: resaltado gris al tocar, barras de desplazamiento y fondo del autocompletado */
html { -webkit-tap-highlight-color: transparent; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: var(--radius-sm); border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--text-3); }
input:-webkit-autofill, textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-2) inset;
  caret-color: var(--text);
  transition: background-color 9999s;
}
input[type="number"] { -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
a { color: var(--brand-text); }
b { font-weight: 600; }
[hidden] { display: none !important; }

h1, h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; }
h1 { font-size: clamp(3rem, 1.4rem + 5.2vw, 5.75rem); line-height: .92; letter-spacing: -0.01em; max-width: 13ch; }
h2 { font-size: clamp(2.2rem, 1.4rem + 2.4vw, 3.25rem); line-height: .98; letter-spacing: -0.005em; max-width: 20ch; }
.h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.012em; line-height: 1.3; }
.h3--gap { margin-top: 40px; }
.lead { font-size: 1.1875rem; color: var(--text-2); max-width: 46ch; }
.small { font-size: .875rem; }
.muted { color: var(--text-3); }
.center { text-align: center; }
.brand { color: var(--brand-text); }
h1 .brand { color: var(--brand); }
:root[data-theme="dark"] h1 .brand { color: var(--ink-brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) h1 .brand { color: var(--ink-brand); } }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); display: flex; gap: 10px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--brand); color: var(--on-brand); padding: 8px 12px; border-radius: var(--radius-md); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Íconos y botones ---------- */
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon .fill { fill: currentColor; stroke: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: var(--radius-md); border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--text-3); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: .9375rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .55; cursor: progress; }
.btn--link { min-height: 40px; padding: 0 4px; background: none; border: 0; color: var(--brand-text); font-weight: 600; cursor: pointer; }
.btn--link:hover { text-decoration: underline; text-underline-offset: 3px; }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-md);
  border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--text-2);
  transition: border-color 140ms var(--ease), color 140ms var(--ease);
}
.icon-btn:hover { border-color: var(--line-2); color: var(--text); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
:root[data-theme="dark"] :focus-visible { outline-color: var(--ink-brand); }

/* ---------- Navegación ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav__in { max-width: var(--container); margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.02em; font-size: 1.0625rem; }
/* Logo: el letrero se ve igual en claro y en oscuro (public/assets/marca, scripts/build_logo.py). */
.logo img { height: 42px; width: auto; }
.logo--plain { margin: 0; }
.nav__status { margin-left: auto; font-size: .75rem; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.nav__status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.nav__status[data-open="true"]::before { background: var(--brand); }
.nav__cart { gap: 8px; }
.count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-sm); background: var(--bg-3); display: grid; place-items: center; font-size: .75rem; }
.nav__cart[data-has="true"] .count { background: var(--brand); color: var(--on-brand); }
@media (max-width: 640px) {
  .nav__status { display: none; }
  .nav__cart span:not(.count) { display: none; }
  .nav__cart { margin-left: auto; }
}

/* ---------- Secciones ---------- */
.sec { padding: var(--section-y) 0; border-top: 1px solid var(--line); }
.sec--bg { background: var(--bg); }
.sec--bg2 { background: var(--bg-2); }
.sec--bg3 { background: var(--bg-3); }
.sec--ink { background: var(--ink); color: hsl(34 35% 94%); border-top-color: var(--ink-line); }
.sec__head { display: grid; gap: 14px; align-content: start; margin-bottom: 40px; }
.sec__head > p:not(.eyebrow) { color: var(--text-2); max-width: 52ch; }
.split { display: grid; gap: 48px; }
@media (min-width: 960px) {
  .split { grid-template-columns: 5fr 6fr; gap: 64px; align-items: start; }
  .split > .sec__head { margin-bottom: 0; position: sticky; top: 96px; }
}

/* Hero */
.hero { border-top: 0; padding-top: clamp(40px, 2rem + 4vw, 88px); padding-bottom: clamp(48px, 2rem + 4vw, 80px); }
.hero__grid { display: grid; gap: 40px; align-items: center; }
.hero__copy { display: grid; gap: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
/* En celulares angostos no caben en una fila: uno debajo del otro, mismo ancho */
@media (max-width: 419px) { .actions .btn { flex: 1 1 100%; } }
.micro { font-size: .875rem; color: var(--text-3); }
.hero__media { margin: 0; }
.hero__media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 62%; border-radius: var(--radius-xl); border: 1px solid var(--line); }
.hero__media figcaption, .media figcaption { margin-top: 10px; font-size: .75rem; color: var(--text-3); }
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1fr 440px; gap: 64px; }
}
.facts { margin-top: 48px; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.facts div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.facts dd { font-weight: 600; margin-top: 2px; }
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(4, 1fr); }
  .facts div + div { padding-left: 16px; border-left: 1px solid var(--line); }
}
@media (max-width: 759px) { .facts div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); } }

/* Imágenes de producto */
.media { margin: 0; }
.media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-xl); border: 1px solid var(--line); }
.media--sm { max-width: 440px; margin-top: 8px; }

/* Mapa de la zona: SVG en línea para que tome los colores del tema (scripts/build_map.py). */
.map { margin: 40px 0 0; }
.map__frame svg { display: block; width: 100%; height: auto; border-radius: var(--radius-xl); border: 1px solid var(--line); }
.map figcaption { margin-top: 10px; font-size: .75rem; color: var(--text-3); max-width: 60ch; }
.map__bg { fill: var(--bg-2); }
.map__area { fill: color-mix(in srgb, var(--brand-text) 11%, transparent); stroke: var(--brand-text); stroke-width: 2; stroke-dasharray: 5 4; }
.map__block { fill: var(--bg-3); stroke: var(--line-2); stroke-width: 1; }
.map__park { fill: color-mix(in srgb, hsl(140 35% 45%) 16%, var(--bg-2)); }
.map__served { fill: color-mix(in srgb, var(--brand-text) 30%, transparent); stroke: var(--brand-text); stroke-width: 1.5; }
.map__river { fill: none; stroke: color-mix(in srgb, hsl(205 55% 55%) 40%, var(--bg-2)); stroke-width: 3; }
.map__street, .map__minor, .map__major, .map__trunk, .map__runway { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.map__street { stroke: var(--line); stroke-width: 1.2; }
.map__minor { stroke: var(--line-2); stroke-width: 1.5; }
.map__major { stroke: var(--line-2); stroke-width: 2.4; }
.map__trunk { stroke: var(--text-3); stroke-width: 4.5; }
.map__runway { stroke: var(--text-3); stroke-width: 7; opacity: .45; }
.map__dot { fill: var(--brand-text); stroke: var(--bg-2); stroke-width: 3; }
.map__label, .map__place { paint-order: stroke; stroke: var(--bg-2); stroke-linejoin: round; }
.map__label { font: 600 28px var(--font); fill: var(--text); stroke-width: 6px; }
.map__place { font: 19px var(--font); fill: var(--text-3); stroke-width: 4px; text-anchor: middle; }
.map__road-label { font: 17px var(--mono); fill: var(--text-3); text-anchor: middle; letter-spacing: .04em; }
}

/* ---------- Carta ----------
   Se lee como una carta impresa: un tablero con encabezado de columnas y una fila por burger
   (foto pequeña, nombre, descripción, precio combo, precio solo, Pedir). */
.menu { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg); overflow: hidden; }
/* La columna del botón tiene ancho fijo: si fuera "auto", en el encabezado (vacía) mediría 0
   y los títulos Combo / Solo quedarían corridos respecto a sus precios. */
.menu__head, .dish { display: grid; grid-template-columns: 112px minmax(0, 1fr) 7.5rem 7.5rem 6.5rem; gap: 0 24px; align-items: center; }
.menu__head { padding: 12px 20px; border-bottom: 1px solid var(--line-2); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.menu__head span:nth-child(3), .menu__head span:nth-child(4) { text-align: center; }
.dish { padding: 16px 20px; }
.dish + .dish { border-top: 1px solid var(--line); }
.dish__pic { display: block; width: 112px; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); padding: 0; background: none; cursor: pointer; }
/* Cuadrado al 52 %: la burger (24-79 % del alto de la foto) entra completa */
.dish__pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; transition: transform 200ms var(--ease); }
.dish__pic:hover img { transform: scale(1.04); }
.dish__info { display: grid; gap: 4px; min-width: 0; }
.dish__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.dish__name h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.5rem; line-height: 1; letter-spacing: 0; }
.dish__tag { font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-text); }
.dish__desc { color: var(--text-2); font-size: .9375rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish__price { text-align: center; font-size: 1.0625rem; white-space: nowrap; }
.dish__price small { display: none; }
.dish__price--combo { font-weight: 600; }
.dish__price--solo { color: var(--text-2); }
.dish .btn { min-height: 44px; width: 100%; padding: 0 12px; }

@media (max-width: 759px) {
  .menu__head { display: none; }
  .dish { grid-template-columns: 88px minmax(0, 1fr); grid-template-areas: "pic info" "pic prices"; gap: 10px 14px; align-items: start; padding: 16px; }
  .dish__pic { grid-area: pic; width: 88px; }
  .dish__info { grid-area: info; }
  .dish__prices { grid-area: prices; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
  .dish__price { text-align: left; font-size: .9375rem; }
  .dish__price small { display: inline; font-family: var(--font); font-size: .75rem; color: var(--text-3); margin-right: 4px; }
  .dish .btn { margin-left: auto; min-height: 40px; padding: 0 16px; width: auto; }
  .dish__name h3 { font-size: 1.3rem; }
}
/* En escritorio los precios y el botón son columnas del tablero; en el celular, una línea bajo el nombre */
@media (min-width: 760px) { .dish__prices { display: contents; } }

/* ---------- Filas (papas, bebidas, pasos) ---------- */
.rows { border-top: 1px solid var(--line); margin-top: 12px; }
.rows > li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rows--tight > li { grid-template-columns: 1fr auto; padding: 6px 0; }
.rows__thumb { width: 64px; height: 64px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.rows__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rows__main { display: grid; gap: 2px; }
.rows__main span { font-size: .875rem; color: var(--text-2); }
.rows__price { font-size: .875rem; color: var(--text-2); }

.steps { display: grid; border-top: 1px solid var(--line); counter-reset: s; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.steps__n { width: 32px; height: 32px; border-radius: var(--radius-md); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--brand-text); font-size: .875rem; }
.steps p { color: var(--text-2); margin-top: 4px; }

.table { margin-top: 12px; border-top: 1px solid var(--line-2); }
.table div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: .9375rem; }
.table dt { color: var(--text-3); }

/* ---------- Preguntas ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 32px 18px 0; position: relative; font-weight: 600; font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 1.75px solid var(--text-3); border-bottom: 1.75px solid var(--text-3); transform: translateY(-70%) rotate(45deg); transition: transform 200ms var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 18px; color: var(--text-2); max-width: 62ch; }

/* ---------- Cierre (banda oscura) ---------- */
.close { display: grid; gap: 24px; align-items: end; }
.close h2 { color: hsl(34 35% 94%); }
.close p:not(.eyebrow) { color: var(--ink-2); max-width: 48ch; margin-top: 12px; }
.close .eyebrow { color: var(--ink-2); margin-bottom: 12px; }
@media (min-width: 860px) { .close { grid-template-columns: 1fr auto; } }

.foot { background: var(--bg); border-top: 1px solid var(--line); padding: 32px 0 calc(96px + env(safe-area-inset-bottom)); }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
@media (min-width: 760px) { .foot { padding-bottom: 32px; } }

/* ---------- Barra inferior (móvil) ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.dock__btn { width: 100%; justify-content: space-between; }
@media (min-width: 760px) { .dock { display: none !important; } }

/* ---------- Paneles (dialog) ---------- */
.sheet {
  padding: 0; border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
  width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.sheet::backdrop { background: hsl(15 13% 7% / .6); }
.sheet[open] { animation: sheet-in 300ms var(--ease); }
@keyframes sheet-in { from { transform: translateY(16px); opacity: 0; } }
@media (min-width: 760px) {
  .sheet { width: min(480px, 100vw); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 0; border-width: 0 0 0 1px; }
  @keyframes sheet-in { from { transform: translateX(16px); opacity: 0; } }
}
.sheet__in { display: flex; flex-direction: column; height: 100%; max-height: inherit; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.sheet__body { flex: 1; overflow-y: auto; padding: 20px; overscroll-behavior: contain; display: grid; gap: 20px; align-content: start; }
.sheet__foot { display: flex; gap: 12px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg-2); }
.sheet__foot .btn--primary { flex: 1; justify-content: space-between; }
.sheet__foot--stack { display: grid; gap: 8px; }

/* ---------- Controles propios ----------
   Nada del navegador: círculo, casilla e interruptor se dibujan aquí con los tokens.
   El <input> sigue siendo el real (teclado, lector de pantalla, formulario). */
.ctl {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; width: 20px; height: 20px;
  border: 1.5px solid var(--line-2); background: var(--bg-2); cursor: pointer;
  transition: border-color 140ms var(--ease), background-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.ctl[type="radio"] { border-radius: 50%; }
.ctl[type="checkbox"] { border-radius: var(--radius-sm); }
.ctl:hover { border-color: var(--text-3); }
.ctl:checked { border-color: var(--brand); background-color: var(--brand); }
/* Radio: anillo de marca con punto, sin pseudo-elementos (no todos los navegadores los dibujan en un input) */
.ctl[type="radio"]:checked { box-shadow: inset 0 0 0 4px var(--bg-2); }
.ctl[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 14px; background-position: center; background-repeat: no-repeat;
}
.ctl:focus-visible, .switch__ctl:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; grid-column: 1 / -1; }
.switch__text { display: grid; gap: 2px; }
.switch__text span { font-size: .875rem; color: var(--text-2); }
/* La perilla es el fondo: un cuadrado claro (imagen de un solo color) que se desplaza con background-position */
.switch__ctl {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; width: 40px; height: 24px;
  border-radius: var(--radius-md); background-color: var(--line-2); cursor: pointer;
  background-image: linear-gradient(var(--bg-2), var(--bg-2)); background-size: 18px 18px; background-position: 3px center; background-repeat: no-repeat;
  transition: background-color 160ms var(--ease), background-position 160ms var(--ease);
}
.switch__ctl:checked { background-color: var(--brand); background-position: 19px center; }

/* ---------- Panel "Pedir" ---------- */
.sheet--config .sheet__body { padding: 0 0 24px; gap: 0; }
.sheet__head--slim { padding: 8px 10px 8px 20px; }
.sheet__kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.config__hero { margin: 0; position: relative; }
.config__hero img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; object-position: 50% 52%; display: block; border-bottom: 1px solid var(--line); }
.config__intro { display: grid; gap: 6px; padding: 20px 20px 4px; }
.config__name { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 2.25rem; line-height: .95; letter-spacing: 0; }
.config__tag { font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-text); }
.config__desc { color: var(--text-2); font-size: .9375rem; }

.step { padding: 20px 20px 4px; }
.step + .step { border-top: 1px solid var(--line); margin-top: 16px; }
.step[hidden] { display: none; }
.step__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.step__head h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.step__n { width: 22px; height: 22px; display: grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--line-2); color: var(--brand-text); font-size: .75rem; }
.step__hint { margin-left: auto; font-size: .75rem; color: var(--text-3); }

.opts { display: grid; gap: 8px; }
.opts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opts__hint { grid-column: 1 / -1; font-size: .875rem; color: var(--text-3); margin-bottom: 2px; }

/* Una opción: control propio, texto y precio. En cuadrícula se vuelve tarjeta. */
.opt { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; transition: border-color 140ms var(--ease), background-color 140ms var(--ease); }
.opt:hover { border-color: var(--line-2); }
.opt .ctl { margin-top: 1px; }
.opt__body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.opt__name { font-weight: 600; line-height: 1.3; }
.opt__note { font-size: .8125rem; color: var(--text-2); line-height: 1.4; }
.opt__price { font-size: .875rem; color: var(--text-2); white-space: nowrap; }
.opt__flag { font-size: .75rem; color: var(--brand-text); }
.opt:has(.ctl:checked) { border-color: var(--brand); background: var(--brand-soft); }
.opt:has(.ctl:checked) .opt__price { color: var(--text); }
:root[data-theme="dark"] .opt:has(.ctl:checked) { border-color: var(--ink-brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .opt:has(.ctl:checked) { border-color: var(--ink-brand); } }
.opt--img { align-items: center; }
.opt--img img { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
/* En cuadrícula: el precio va debajo del nombre para que quepan dos o tres por fila */
.opts--2 .opt, .opts--3 .opt { flex-wrap: wrap; }
.opts--2 .opt__price, .opts--3 .opt__price { flex-basis: 100%; padding-left: 32px; }
.opts--3 .opt { padding: 12px; gap: 10px; }
.opts--3 .opt__price { padding-left: 30px; }
@media (max-width: 380px) { .opts--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Grupos del formulario del pedido (zona, pago) */
.choices { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.choices legend { font-size: .8125rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; padding: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg .opt { padding: 10px 14px; align-items: center; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-md); height: 48px; }
.stepper button { width: 44px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 1.25rem; color: var(--text-2); }
.stepper button:hover { color: var(--text); }
.stepper output { min-width: 28px; text-align: center; }
.stepper--sm { height: 36px; }
.stepper--sm button { width: 34px; font-size: 1.1rem; }

/* Pedido */
.empty { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 32px 0; }
.empty .btn { margin-top: 12px; }
.sheet.is-empty .lines, .sheet.is-empty .totals, .sheet.is-empty .customer, .sheet.is-empty #order-foot { display: none; }
.sheet:not(.is-empty) .empty { display: none; }
.lines { border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line__name { font-weight: 600; }
.line__meta { font-size: .875rem; color: var(--text-2); }
.line__ctrl { grid-column: 2; grid-row: 2 / span 2; justify-self: end; align-self: end; }
.totals { display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals div:first-child { font-weight: 600; font-size: 1.0625rem; }
.totals dt { color: inherit; }
.totals div:last-child { font-size: .9375rem; color: var(--text-2); }
.customer { border: 0; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 16px; min-width: 0; }
.customer > legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; }
.grid2 { display: grid; gap: 16px; }
@media (min-width: 420px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; font-size: .8125rem; font-weight: 600; color: var(--text-2); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: var(--radius-md);
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font-size: 1rem; font-weight: 400;
  transition: border-color 140ms var(--ease);
}
.field textarea { min-height: 72px; resize: none; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .9375rem; cursor: pointer; }
.check .ctl { margin-top: 2px; }
.error { color: var(--danger); font-size: .875rem; }
.error:empty { display: none; }

/* ---------- Páginas legales (/privacidad, /terminos) ---------- */
.legal { max-width: 760px; padding-top: clamp(40px, 2rem + 3vw, 72px); padding-bottom: 72px; }
.legal h1 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem); line-height: .95; letter-spacing: 0; margin-top: 12px; max-width: none; }
.legal h2 { font-size: 1.25rem; letter-spacing: -0.015em; margin: 40px 0 12px; max-width: none; }
.legal p, .legal li { color: var(--text-2); }
.legal p + p { margin-top: 12px; }
.legal ul, .legal ol { display: grid; gap: 8px; padding-left: 20px; }
.legal ul { list-style: disc; }
.legal ol { list-style: decimal; }
.legal li::marker { color: var(--brand-text); }
.legal b { color: var(--text); }
.legal__lead { font-size: 1.125rem; margin-top: 16px; }
.legal__meta { font-size: .875rem; color: var(--text-3) !important; margin-top: 8px; }
.legal__card { border: 1px solid var(--line); border-radius: var(--radius-lg); }
.legal__card div { display: grid; grid-template-columns: 9rem 1fr; gap: 12px; padding: 12px 16px; }
.legal__card div + div { border-top: 1px solid var(--line); }
.legal__card dt { color: var(--text-3); font-size: .9375rem; }
.legal__card dd { color: var(--text); }
@media (max-width: 520px) { .legal__card div { grid-template-columns: 1fr; gap: 2px; } }
.legal__links { margin-top: 40px !important; padding-top: 20px; border-top: 1px solid var(--line); }
/* Dato del responsable que falta en menu.json (business.legal): se ve a propósito */
.pending { color: var(--danger); font-family: var(--mono); font-size: .875em; }
.nav__back { margin-left: auto; }
.foot a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.check a { color: var(--brand-text); }

/* ---------- Aviso ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 40;
  transform: translate(-50%, 8px); opacity: 0; pointer-events: none; max-width: calc(100vw - 32px);
  padding: 10px 14px; border-radius: var(--radius-md); background: var(--text); color: var(--bg); font-size: .9375rem; font-weight: 500;
  transition: opacity 180ms var(--ease), transform 220ms var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 760px) { .toast { bottom: 24px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
