/* O'clok · Pedidos — dirección de diseño: minimalista y profesional (ver CLAUDE.md) */

/* Figtree alojada en el sitio (OFL): sin depender de Google y disponible sin señal */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap; src: url('../fonts/figtree-latin-wght-normal.woff2') format('woff2'); }

/* =================== Tokens =================== */
/* Todos los colores viven aquí (ver docs/brand/README.md). Fuera de :root no hay
   hex ni rgba sueltos; los colores de las bebidas están en js/menu.js. */
:root {
  /* Paleta de marca (docs/brand/README.md) */
  --crema: #FDF9F8;        /* fondo general */
  --blanco: #FFFFFF;       /* tarjetas, inputs, hojas */
  --espresso: #32201A;     /* texto principal, títulos, barra de la bolsa */
  --cafe: #5E2D0C;         /* marca: acción principal y selección */
  --verde-bosque: #344332; /* precios y estados OK: abierto, pagado, listo */
  --verde-olivo: #4A6022;  /* ícono de la marca y detalles gráficos */
  --verde-hoja: #7C9750;   /* solo rellenos y tintes: NUNCA como texto (3.1:1) */
  --rosa: #F4E6E5;         /* fondo de destacados (Latte Fusión, Signature) */
  --rosa-vino: #905A5D;    /* etiqueta sobre rosa y favoritos */
  --gris-calido: #736C68;  /* texto secundario sobre crema o blanco */
  --linea: #EAE3E0;        /* bordes y separadores */
  --superficie: #F3EDEA;   /* controles segmentados y chips inactivos */
  --verde-suave: #E9EEE4;  /* fondo de etiquetas positivas */

  /* Complementarios (tonos del mock en docs/mock) */
  --gris-oscuro: #5A5451;  /* títulos de sección y texto secundario sobre superficie o rosa (AA) */
  --cafe-oscuro: #3A1C08;  /* hover de enlaces */
  --linea-fuerte: #DDD3CF; /* borde punteado */
  --rosa-linea: #EBD6D5;   /* borde de tarjetas destacadas y favoritas */
  --arena: #F7F2ED;        /* tarjeta "Tu último pedido" */
  --arena-texto: #7A5C48;  /* etiqueta sobre arena (5.5:1) */
  --espuma: #F7EEE3;       /* fondo del ícono de cold foam */
  --punto-cerrado: #A39C98; /* punto de "Cerrado" en el encabezado (docs/mock/MenuEncabezado.dc.html) */

  /* Funcionales */
  --error: #B42318;
  --warn: #B54708;         /* atención: notas y pedidos con espera larga (panel) */

  /* Vaso SVG (estructura; el líquido sale de menu.js) */
  --vaso-linea: #D6CCC3;
  --vaso-vapor: #C9BFB6;
  --vaso-tapa: #F4EFEA;

  /* Sombras, velos y transparencias (sobre espresso) */
  --velo: rgba(50, 32, 26, 0.4);
  --sombra-hoja: 0 -4px 24px rgba(50, 32, 26, 0.08);
  --sombra-barra: 0 8px 24px rgba(50, 32, 26, 0.22);
  --sombra-seg: 0 1px 2px rgba(50, 32, 26, 0.12);
  --sombra-perilla: 0 1px 2px rgba(50, 32, 26, 0.2);
  --sombra-muestra: inset -6px -8px 0 rgba(50, 32, 26, 0.12), inset 6px 6px 0 rgba(255, 255, 255, 0.18);
  --sombra-muestra-sm: inset -4px -5px 0 rgba(50, 32, 26, 0.12);
  --sobre-oscuro: rgba(255, 255, 255, 0.12);  /* fondo de la bolsita en la barra */
  --spin-pista: rgba(255, 255, 255, 0.35);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2332201A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  /* Pago simulado de la demo (imita Stripe Checkout) */
  --demo-fondo: #F6F8FA;
  --demo-tarjeta: #FFFFFF;
  --demo-linea: #E0E0E6;
  --demo-texto: #30313D;
  --demo-texto-2: #6A7383;
  --demo-acento: #635BFF;
  --demo-acento-bg: #EEEDFF;

  /* Tipografía: solo Figtree, pesos 400/500/600 */
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-13: 13px;
  --fs-15: 15px;
  --fs-17: 17px;
  --fs-20: 20px;
  --fs-28: 28px;

  /* Forma */
  --r: 10px;               /* botones, inputs */
  --r-lg: 24px;            /* hojas (docs/mock/Bolsa.dc.html) */
  --border: 1px solid var(--linea);
  --logo-h: 26px;          /* logotipo O'clok (taza + 'clok, sin textos); mínimo 24 px */

  /* Movimiento: 150–250 ms, sin rebotes */
  --t-fast: 150ms;
  --t: 200ms;
  --t-slow: 250ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* Áreas táctiles y márgenes seguros */
  --tap: 44px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

/* =================== Base =================== */
*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--crema);
  color: var(--espresso);
  font-family: var(--font);
  font-size: var(--fs-15);
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
body.locked { overflow: hidden; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; }
b, strong { font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
button:disabled { cursor: default; }
a { color: inherit; }
img, svg { display: block; }
.icon { flex: none; }

/* Foco visible y claro, solo con teclado */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--cafe); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, .icon-btn:focus-visible, .tbtn:focus-visible, .switch:focus-visible { border-radius: var(--r); }

.tnum, .price, .amt, .code, .ocode { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.app { max-width: 560px; margin: 0 auto; padding: calc(var(--safe-t) + 16px) 20px calc(112px + var(--safe-b)); }

/* =================== Componentes =================== */

/* ---------- Encabezado ---------- */
/* Encabezado del menú (docs/mock/MenuEncabezado.dc.html): logo centrado como h1, estado a la derecha.
   Columnas 1fr auto 1fr: el estado nunca se encima con el logo (a 320 px el logo se recorre si hace falta). */
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; } /* sin controles: alto del logo */
.top .brand { line-height: 0; }
.top .logo { height: 36px; width: auto; }
.store { justify-self: end; display: inline-flex; align-items: center; gap: 6px; padding-left: 8px; color: var(--gris-calido); font-size: var(--fs-13); font-weight: 500; white-space: nowrap; }
.store .dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--verde-olivo); }
.store.is-closed .dot { background: var(--punto-cerrado); }
.lema-wrap { display: flex; justify-content: center; padding: 10px 0 4px; }
.lema-wrap .lema { height: 12px; width: auto; } /* descriptor "COFFEE AND MATCHA" (mín. 12 px) */

.notice { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 0; padding: 12px 16px; border: var(--border); border-radius: var(--r); background: var(--superficie); }
.notice .icon { margin-top: 1px; color: var(--gris-calido); }

/* Pedido activo */
.active-order { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; margin: 18px 0 0; padding: 8px 12px 8px 16px; border: var(--border); border-radius: 16px; background: var(--blanco); text-align: left; transition: background var(--t-fast) var(--ease); }
.active-order:active { background: var(--superficie); }
.active-order .ao-code { font-size: var(--fs-17); font-weight: 600; letter-spacing: 0.04em; }
.active-order .ao-txt { flex: 1; min-width: 0; font-weight: 500; line-height: 1.3; }
.active-order .ao-txt small { display: block; color: var(--gris-calido); font-size: var(--fs-13); font-weight: 400; }
.active-order .icon { color: var(--gris-calido); }

/* ---------- Control segmentado ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 2px; border: var(--border); border-radius: var(--r); background: var(--superficie); }
.seg button { min-height: var(--tap); padding: 4px 8px; border-radius: 8px; color: var(--gris-oscuro); font-weight: 500; text-align: center; line-height: 1.2; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.seg button small { display: block; font-size: var(--fs-13); font-weight: 400; }
.seg button[aria-selected='true'], .seg button[aria-pressed='true'] { background: var(--cafe); color: var(--blanco); }
.seg button:disabled { opacity: 0.5; }
.seg-inline { display: inline-grid; grid-auto-columns: minmax(96px, auto); }
.seg-inline button { padding: 4px 20px; }

/* ---------- Títulos de sección (menú y personalizar) ---------- */
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.sec-h h2, .sec-h h3 { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris-oscuro); transition: color var(--t-fast) var(--ease); }
.sec-h span { font-size: 12px; color: var(--gris-calido); transition: color var(--t-fast) var(--ease); }

/* Fila con scroll horizontal (favoritas, sabores) */
.hscroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }

/* ---------- Tu último pedido ---------- */
.last { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 12px; border-radius: 20px; background: var(--arena); }
.last-thumb { flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--blanco); display: grid; place-items: center; }
.last-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.last-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--arena-texto); }
.last-label, .last-name, .last-opts { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.last-name { font-size: var(--fs-15); font-weight: 600; }
.last-opts { font-size: var(--fs-13); color: var(--gris-calido); }
.last-btn { flex: none; min-height: var(--tap); padding: 0 12px; border-radius: 12px; background: var(--cafe); color: var(--blanco); font-size: 14px; font-weight: 600; white-space: nowrap; transition: opacity var(--t-fast) var(--ease); }
.last-btn:focus-visible { border-radius: 12px; }
@media (max-width: 370px) { .last { gap: 8px; } .last-thumb { width: 48px; height: 48px; border-radius: 14px; } }

/* ---------- Tus favoritas ---------- */
.favs { margin: 22px -20px 0; }
.favs .sec-h { margin: 0 20px 8px; }
.favs .sec-h h2 { display: inline-flex; align-items: center; gap: 6px; }
.favs .sec-h .icon { color: var(--rosa-vino); }
.favs .hscroll { padding: 4px 20px 6px; scroll-padding-inline: 20px; }
.fav { flex: none; width: 232px; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--rosa-linea); border-radius: 16px; background: var(--blanco); text-align: left; transition: background var(--t-fast) var(--ease); }
.fav:active { background: var(--superficie); }
.fav:focus-visible { border-radius: 16px; outline-offset: 1px; }
.fav-thumb { flex: none; width: 48px; height: 56px; border-radius: 12px; display: grid; place-items: center; }
.fav-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fav-name, .fav-opts { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-name { font-size: 14px; font-weight: 600; }
.fav-opts { font-size: 12px; color: var(--gris-calido); }
.fav-price { font-size: var(--fs-13); font-weight: 600; color: var(--verde-bosque); }
.fav-add { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--cafe); color: var(--blanco); display: grid; place-items: center; }

/* ---------- Pills Café / Matcha ---------- */
.pills { display: flex; gap: 4px; margin: 18px 0 0; padding: 4px; border-radius: 16px; background: var(--superficie); }
.pills button { flex: 1; min-height: var(--tap); padding: 0 8px; border-radius: 12px; text-align: center; color: var(--gris-oscuro); font-size: var(--fs-15); font-weight: 600; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.pills button[aria-selected='true'] { background: var(--cafe); color: var(--blanco); }
.pills button:focus-visible { border-radius: 12px; outline-offset: 0; }

/* ---------- Menú: tarjetas con miniatura ---------- */
.cards { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.card { display: flex; align-items: stretch; gap: 14px; width: 100%; padding: 12px; border: 1px solid var(--linea); border-radius: 20px; background: var(--blanco); text-align: left; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.card.is-hl { border-color: var(--rosa-linea); background: var(--rosa); }
.card.is-hl .card-desc { color: var(--gris-oscuro); } /* gris cálido sobre rosa no llega a AA */
.card:active { border-color: var(--linea); }
.card:focus-visible { border-radius: 20px; outline-offset: 3px; }
/* El vaso ocupa ~80 % del alto del recuadro; en Fusión, los puntitos van debajo */
.card-thumb { flex: none; width: 92px; height: 108px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.card-dots { display: flex; justify-content: center; gap: 3px; }
.card-dots span { width: 8px; height: 8px; border-radius: 50%; }
.card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.card-name { font-size: var(--fs-17); font-weight: 600; line-height: 1.25; }
.tag-rec { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px; background: var(--blanco); color: var(--rosa-vino); font-size: 11px; font-weight: 600; line-height: 1.2; }
.card-desc { font-size: var(--fs-13); line-height: 1.35; color: var(--gris-calido); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-price { font-size: 16px; font-weight: 600; color: var(--verde-bosque); }
.card-price small, .sug-price small { font-size: 12px; font-weight: 500; } /* "desde $55": el precio depende de la temperatura */
.card-add { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--cafe); color: var(--blanco); display: grid; place-items: center; transition: opacity var(--t-fast) var(--ease); }
.card:active .card-add { opacity: 0.85; }
.item-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--rosa); color: var(--espresso); font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px var(--blanco); }

.foot { margin: 0; padding-top: 24px; color: var(--gris-calido); font-size: var(--fs-13); text-align: center; line-height: 1.6; }
.foot a { color: var(--espresso); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
/* Liga discreta al aviso de privacidad (texto chico, gris) */
.foot-legal { padding-top: 28px; font-size: 12px; }
.foot-legal a { display: inline-block; min-height: var(--tap); line-height: var(--tap); color: var(--gris-calido); font-weight: 400; }

/* ---------- Barra de la bolsa ---------- */
.cartbar {
  position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); z-index: 20; transform: translate(-50%, calc(100% + 32px)); visibility: hidden;
  width: min(528px, calc(100% - 32px)); height: 60px; padding: 0 18px 0 14px; border-radius: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--espresso); color: var(--blanco); box-shadow: var(--sombra-barra); font-size: var(--fs-15); font-weight: 600;
  transition: transform var(--t-slow) var(--ease), visibility 0s linear var(--t-slow);
}
.cartbar.show { transform: translate(-50%, 0); visibility: visible; transition: transform var(--t-slow) var(--ease), visibility 0s; }
.cartbar:focus-visible { outline-offset: 3px; border-radius: 18px; }
.cb-left { display: inline-flex; align-items: center; gap: 12px; }
.cb-bag { position: relative; width: 36px; height: 36px; border-radius: 12px; background: var(--sobre-oscuro); display: inline-grid; place-items: center; }
.cb-count { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--rosa); color: var(--espresso); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--espresso); }
.cb-bag.bump { animation: bag-bump 360ms var(--ease); }
@keyframes bag-bump { 0% { transform: scale(1); } 35% { transform: scale(1.16) rotate(-6deg); } 70% { transform: scale(0.96) rotate(2deg); } 100% { transform: scale(1); } }

/* ---------- Hojas inferiores ---------- */
.backdrop { position: fixed; inset: 0; z-index: 40; background: var(--velo); opacity: 0; transition: opacity var(--t-slow) var(--ease); }
.backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; margin: 0 auto; max-width: 560px;
  max-height: calc(100dvh - 32px - var(--safe-t)); display: flex; flex-direction: column;
  background: var(--blanco); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--sombra-hoja);
  transform: translateY(100%); transition: transform var(--t-slow) var(--ease);
}
.sheet.show { transform: translateY(0); }
.sheet:focus, .sheet:focus-visible { outline: none; }
.sheet.full { height: calc(100dvh - 32px - var(--safe-t)); }
@media (min-width: 720px) {
  .sheet { bottom: 16px; max-height: calc(100dvh - 48px); border-radius: var(--r-lg); overflow: hidden; transform: translateY(calc(100% + 16px)); }
  .sheet.full { height: calc(100dvh - 48px); }
}
.grab { flex: none; padding: 8px 0 4px; display: grid; place-items: center; touch-action: none; }
.grab::before { content: ''; width: 40px; height: 5px; border-radius: 3px; background: var(--linea-fuerte); }
.sheet-head { flex: none; display: flex; align-items: flex-start; gap: 8px; padding: 4px 12px 12px 20px; }
.sheet-head h2 { flex: 1; min-width: 0; padding-top: 10px; font-size: var(--fs-20); line-height: 1.25; }
.sheet-title { flex: 1; min-width: 0; padding-top: 10px; }
.sheet-title h2 { padding: 0; }
.sheet-title p { margin-top: 4px; color: var(--gris-calido); }
.sheet-head > .icon-btn:first-child { margin-left: -12px; }
.icon-btn { flex: none; width: var(--tap); height: var(--tap); border-radius: var(--r); display: grid; place-items: center; color: var(--espresso); transition: background var(--t-fast) var(--ease); }
.icon-btn:active { background: var(--superficie); }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 20px 24px; overscroll-behavior: contain; }
.sheet-intro { margin: 0 0 8px; color: var(--gris-calido); }
.sheet-foot { flex: none; display: flex; gap: 12px; align-items: center; padding: 12px 16px calc(12px + var(--safe-b)); border-top: var(--border); background: var(--blanco); }

/* ---------- Grupos de opciones ---------- */
.group { margin: 24px 0 0; scroll-margin-top: 16px; }
.sheet-body > .group:first-child { margin-top: 4px; }
.group h4 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; font-size: var(--fs-13); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; transition: color var(--t-fast) var(--ease); }
.group h4 em { font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--gris-calido); }
.group.need h4, .group.need h4 em { color: var(--error); }
.group.need .opts { border-color: var(--error); }

/* Lista de opciones: filas con separadores y radio/checkbox a la derecha */
.opts { border-top: var(--border); border-bottom: var(--border); }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 12px 0; text-align: left; }
.opt + .opt { border-top: var(--border); }
.opt-text { flex: 1; min-width: 0; }
.opt-name { display: block; }
.opt-note { margin-left: 4px; color: var(--gris-calido); font-size: var(--fs-13); }
.opt-sub { display: block; margin-top: 2px; color: var(--gris-calido); font-size: var(--fs-13); }
.opt-price { flex: none; color: var(--gris-calido); }
.radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--gris-calido); transition: border var(--t-fast) var(--ease); }
.opt[aria-pressed="true"] .radio { border: 6px solid var(--cafe); }
.checkbox { flex: none; width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--gris-calido); display: grid; place-items: center; color: var(--blanco); transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.opt[aria-pressed="true"] .checkbox { border-color: var(--cafe); background: var(--cafe); }
.opt[aria-pressed="true"] .opt-name { font-weight: 500; }
.included { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--gris-calido); }
.included .icon { color: var(--verde-bosque); }

/* =================== Personalizar bebida (página completa) =================== */
.sheet.page { top: 0; max-height: none; height: 100dvh; border-radius: 0; box-shadow: none; background: var(--crema); }
@media (min-width: 720px) {
  .sheet.page { top: auto; height: calc(100dvh - 48px); border-radius: var(--r-lg); box-shadow: var(--sombra-hoja); }
}
.pd-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 28px; scrollbar-width: none; }
.pd-scroll::-webkit-scrollbar { display: none; }

/* Hero con el tinte de la bebida */
.pd-hero { position: relative; height: calc(300px + var(--safe-t)); border-radius: 0 0 32px 32px; display: flex; align-items: flex-end; justify-content: center; transition: background-color var(--t-slow) var(--ease); }
.pd-hero-btns { position: absolute; top: calc(16px + var(--safe-t)); left: 16px; right: 16px; display: flex; justify-content: space-between; }
.round-btn { width: var(--tap); height: var(--tap); border: var(--border); border-radius: 50%; background: var(--blanco); color: var(--espresso); display: grid; place-items: center; transition: color var(--t-fast) var(--ease); }
.round-btn:focus-visible { border-radius: 50%; }
.round-btn[aria-pressed='true'] { color: var(--rosa-vino); }
.round-btn[aria-pressed='true'] svg { fill: currentColor; }
.pd-cup { margin-bottom: 20px; }
.pd-cup svg { display: block; }
.cup polygon, .cup path, .cup rect { transition: fill var(--t-slow) var(--ease); }
/* Estructura del vaso SVG (js/cup.js); el líquido trae su color de menu.js */
.cup-shadow { fill: var(--espresso); opacity: 0.08; }
.cup-steam { stroke: var(--vaso-vapor); }
.cup-paper { fill: var(--blanco); stroke: var(--vaso-linea); }
.cup-hotlid { fill: var(--vaso-tapa); stroke: var(--vaso-linea); }
.cup-brand { fill: var(--blanco); }
.cup-straw { fill: var(--cafe); }
.cup-straw.is-matcha { fill: var(--verde-bosque); }
.cup-ice { fill: var(--blanco); fill-opacity: 0.45; stroke: var(--blanco); stroke-opacity: 0.9; }
.cup-glass { fill: var(--blanco); fill-opacity: 0.15; stroke: var(--vaso-linea); }
.cup-glass.is-mini { fill: none; }
.cup-shine { fill: none; stroke: var(--blanco); opacity: 0.55; }
.cup-lid { fill: var(--blanco); stroke: var(--vaso-linea); }
.pd-legend { position: absolute; right: 16px; bottom: 26px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pd-legend span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: var(--blanco); color: var(--gris-oscuro); font-size: 11px; font-weight: 600; }
.pd-legend i { width: 8px; height: 8px; border-radius: 50%; transition: background-color var(--t-slow) var(--ease); }

/* Nombre, precio y metadatos */
.pd-info { padding: 20px 20px 4px; display: flex; flex-direction: column; gap: 6px; }
.pd-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pd-title h2 { min-width: 0; font-size: var(--fs-28); line-height: 1.1; letter-spacing: -0.02em; }
.pd-price { flex: none; font-size: var(--fs-20); font-weight: 600; color: var(--verde-bosque); }
.pd-desc { font-size: var(--fs-15); line-height: 1.4; color: var(--gris-calido); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; }
.chips li { padding: 5px 10px; border-radius: 999px; background: var(--superficie); color: var(--gris-oscuro); font-size: 12px; font-weight: 500; }
.chips li.is-ok { background: var(--verde-suave); color: var(--verde-bosque); font-weight: 600; }

/* Indicadores de avance */
.steps { list-style: none; display: flex; gap: 6px; margin: 0; padding: 14px 20px 4px; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.step { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 999px; background: var(--superficie); color: var(--gris-oscuro); font-size: 12px; font-weight: 600; transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
.step.is-done { background: var(--verde-suave); color: var(--verde-bosque); }

/* Secciones */
.grp { padding: 22px 20px 0; scroll-margin-top: 12px; }
.grp-temp { padding-top: 20px; }
.grp-wide { padding-left: 0; padding-right: 0; padding-top: 24px; }
.grp-wide .sec-h { margin: 0 20px 10px; }
.grp.need .sec-h h3, .grp.need .sec-h span { color: var(--error); }

/* Control segmentado (temperatura, hielo) */
.segm { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding: 4px; border-radius: 14px; background: var(--superficie); transition: box-shadow var(--t-fast) var(--ease); }
.segm button { min-height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--gris-oscuro); font-size: var(--fs-15); font-weight: 600; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.segm button[aria-pressed='true'] { background: var(--blanco); color: var(--espresso); box-shadow: var(--sombra-seg); }
.segm button:focus-visible { border-radius: 10px; outline-offset: 0; }
.segm.sm button { min-height: var(--tap); font-size: 14px; }
.grp.need .segm { box-shadow: inset 0 0 0 1px var(--error); }

/* Indicador de seleccionado (sabores y purés) */
.sel-check { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--cafe); color: var(--blanco); display: grid; place-items: center; opacity: 0; transform: scale(0.6); transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
[aria-pressed='true'] > .sel-check { opacity: 1; transform: none; }
.swatch { flex: none; border-radius: 50%; transition: background-color var(--t-slow) var(--ease); }

/* Sabores: carrusel horizontal */
.flv-row { padding: 4px 20px 6px; scroll-padding-inline: 20px; } /* ninguna tarjeta queda pegada al borde */
.flv { position: relative; flex: none; width: 112px; min-height: 144px; padding: 14px 12px 12px; border: 1px solid var(--linea); border-radius: 18px; background: var(--blanco); text-align: left; display: flex; flex-direction: column; gap: 10px; transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.flv[aria-pressed='true'], .pure[aria-pressed='true'] { border-color: var(--cafe); box-shadow: inset 0 0 0 0.5px var(--cafe); background: var(--blanco); background: color-mix(in srgb, var(--c, var(--cafe)) 6%, var(--blanco)); }
.flv:focus-visible, .pure:focus-visible { border-radius: 18px; outline-offset: 1px; }
.flv .swatch { width: 52px; height: 52px; box-shadow: var(--sombra-muestra); }
.flv-name { font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--espresso); }
.sf-pill { align-self: flex-start; padding: 3px 7px; border-radius: 999px; background: var(--verde-suave); color: var(--verde-bosque); font-size: 11px; font-weight: 600; }
.flv-price { align-self: flex-start; padding: 3px 7px; border-radius: 999px; background: var(--superficie); color: var(--gris-oscuro); font-size: 11px; font-weight: 600; } /* recargo del sabor (Dirty Matcha) */
.grp.need .flv, .grp.need .pure { border-color: var(--error); }

/* Purés: cuadrícula de 2 columnas */
.pure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pure { position: relative; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px; border: 1px solid var(--linea); border-radius: 16px; background: var(--blanco); text-align: left; transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.pure .swatch { width: 36px; height: 36px; box-shadow: var(--sombra-muestra-sm); }
.pure-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pure-name { font-size: 14px; font-weight: 600; line-height: 1.25; color: var(--espresso); }
.pure-sub { font-size: 12px; color: var(--gris-calido); }
.pure .sel-check { top: 8px; right: 8px; width: 20px; height: 20px; }

/* Chips (leche, endulzante, jarabe, sabor del cold foam) */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: var(--tap); padding: 0 14px; border: var(--border); border-radius: 22px; background: var(--blanco); color: var(--espresso); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.chip small { font-size: 12px; font-weight: 600; opacity: 0.75; }
.chip[aria-pressed='true'] { border-color: var(--cafe); background: var(--cafe); color: var(--blanco); }
.chip:focus-visible { border-radius: 22px; }
.grp.need .chip { border-color: var(--error); }

/* Extras: fila con ícono y switch */
.xrow { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: var(--border); border-radius: 16px; background: var(--blanco); text-align: left; }
.xrow + .xrow { margin-top: 8px; }
.xrow:focus-visible { border-radius: 16px; }
.x-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--espuma); color: var(--cafe); display: grid; place-items: center; }
.x-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.x-name { font-size: var(--fs-15); font-weight: 600; }
.x-sub { font-size: var(--fs-13); color: var(--gris-calido); }
.x-price { flex: none; margin-right: 6px; color: var(--gris-oscuro); font-size: var(--fs-13); font-weight: 600; }
.x-inc { flex: none; color: var(--verde-bosque); font-size: var(--fs-13); font-weight: 600; }
.tgl { position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px; background: var(--gris-calido); transition: background-color var(--t) var(--ease); }
.tgl::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--blanco); box-shadow: var(--sombra-perilla); transition: transform var(--t) var(--ease); }
.xrow[aria-checked='true'] .tgl { background: var(--verde-bosque); }
.xrow[aria-checked='true'] .tgl::after { transform: translateX(18px); }
/* Sabor del cold foam: aparece debajo del extra al encenderlo */
.x-flavors { margin-top: 16px; }
.x-flavors-h { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris-oscuro); }

/* Indicación para la barra */
.note-btn { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border: 1px dashed var(--linea-fuerte); border-radius: 14px; background: var(--blanco); color: var(--gris-oscuro); font-size: 14px; font-weight: 500; }
.note-btn:focus-visible { border-radius: 14px; }
.note-field label { display: block; margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris-oscuro); }
.note-field textarea { border-radius: 14px; }

/* Pie fijo: resumen, cantidad y botón */
.pd-foot { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: var(--border); background: var(--crema); }
.pd-sum { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--gris-oscuro); font-size: var(--fs-13); }
.pd-sum .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; transition: background-color var(--t-slow) var(--ease); }
.pd-sum .txt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-actions { display: flex; align-items: center; gap: 8px; container-type: inline-size; }
.pd-actions .qty { height: 52px; border-radius: 14px; }
.pd-actions .qty span { min-width: 20px; font-size: 16px; }
.pd-add { flex: 1; min-width: 0; min-height: 52px; padding: 0 14px; border-radius: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--cafe); color: var(--blanco); font-size: var(--fs-15); font-weight: 600; transition: opacity var(--t-fast) var(--ease); }
.pd-add:focus-visible { border-radius: 14px; }
.pd-add .lbl { display: inline-flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.pd-add.pending { justify-content: center; text-align: center; }
/* "Agregar a la bolsa" no cabe junto a la cantidad en pantallas angostas: queda "Agregar" */
@container (max-width: 335px) { .pd-add .lbl-x { display: none; } }
@container (max-width: 349px) { .pd-add.long .lbl-x { display: none; } }

/* ---------- Campos ---------- */
textarea, input[type='text'], input[type='tel'], input[type='password'], select {
  width: 100%; min-height: 48px; padding: 12px 14px; border: var(--border); border-radius: var(--r); background: var(--blanco);
  font-size: var(--fs-17); line-height: 1.3; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
textarea { resize: none; min-height: 72px; }
textarea:focus, input:focus, select:focus { border-color: var(--cafe); box-shadow: inset 0 0 0 1px var(--cafe); }
textarea:focus-visible, input:focus-visible, select:focus-visible { outline: none; }
::placeholder { color: var(--gris-calido); opacity: 1; }
select { appearance: none; padding-right: 40px; background: var(--blanco) var(--chevron) no-repeat right 12px center; }
.field { margin: 16px 0 0; }
.field label { display: block; margin: 0 0 8px; font-weight: 500; }
.field .hint { margin: 8px 0 0; font-size: var(--fs-13); color: var(--gris-calido); }
.field.err input, .field.err textarea { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.field .msg { margin: 8px 0 0; font-size: var(--fs-13); color: var(--error); font-weight: 500; }

/* ---------- Cantidad ---------- */
.qty { flex: none; display: flex; align-items: center; height: 48px; border: var(--border); border-radius: var(--r); }
.qty button { width: var(--tap); height: 100%; display: grid; place-items: center; color: var(--espresso); font-size: var(--fs-20); }
.qty button:disabled { color: var(--gris-calido); opacity: 0.4; }
.qty span { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Botones ---------- */
.btn {
  flex: 1; min-height: 48px; padding: 0 16px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--cafe); color: var(--blanco); font-weight: 600; text-align: center; transition: opacity var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.btn:not(.ghost):not(.btn-danger):not(.btn-line):active:not(:disabled), .pd-add:active, .last-btn:active { background: var(--cafe-oscuro); }
.btn.ghost:active:not(:disabled) { background: var(--superficie); }
.btn.ghost { background: var(--blanco); color: var(--espresso); border: var(--border); font-weight: 500; }
.btn:disabled { opacity: 0.5; }
a.btn { text-decoration: none; } /* "Listo y avisar" es un enlace a WhatsApp con forma de botón */
a.btn[aria-disabled='true'] { opacity: 0.5; pointer-events: none; }
.btn .amt { font-weight: 500; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--spin-pista); border-top-color: var(--blanco); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Totales (checkout y estatus) ---------- */
.total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 0 0; font-size: var(--fs-17); font-weight: 600; }
.total-row .tnum, .summary li > .tnum { color: var(--verde-bosque); }
.totals { margin: 24px 0 0; padding-top: 8px; border-top: var(--border); display: grid; gap: 4px; }
.totals > div:not(.total-row) { display: flex; justify-content: space-between; color: var(--gris-calido); }
.totals .total-row { padding-top: 8px; }
.empty { padding: 40px 12px; text-align: center; color: var(--gris-calido); }

/* =================== Bolsa (docs/mock/Bolsa.dc.html) =================== */
.sheet.bag, .sheet.bag .sheet-foot { background: var(--crema); }
.bag-head { align-items: center; gap: 12px; padding: 8px 20px 0; }
.bag-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.sheet-head.bag-head h2 { flex: none; padding: 0; font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; }
.bag-title span { color: var(--gris-oscuro); font-size: 14px; white-space: nowrap; }

/* Indicador de 2 pasos */
.bag-steps { flex: none; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 10px 20px 0; }
.bag-steps li { display: flex; flex-direction: column; gap: 6px; color: var(--gris-oscuro); font-size: 12px; font-weight: 500; }
.bag-steps li::before { content: ''; height: 4px; border-radius: 2px; background: var(--linea); transition: background-color var(--t) var(--ease); }
.bag-steps li.is-done::before, .bag-steps li.is-on::before { background: var(--cafe); }
.bag-steps li.is-on { color: var(--espresso); font-weight: 600; }
.sheet-body.bag-body { padding-top: 16px; }

/* Bebidas como tarjetas blancas */
.bag-lines { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; }
.bag-line { display: flex; gap: 12px; padding: 12px; border: var(--border); border-radius: 18px; background: var(--blanco); }
.bag-thumb { flex: none; width: 64px; height: 76px; border-radius: 14px; display: grid; place-items: center; }
.bag-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bag-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bag-name { font-size: 16px; font-weight: 600; line-height: 1.3; }
.bag-amt { flex: none; color: var(--verde-bosque); font-size: 16px; font-weight: 600; }
.bag-opts { color: var(--gris-oscuro); font-size: var(--fs-13); line-height: 1.35; }
.bag-ctl { align-items: center; margin-top: auto; padding-top: 6px; }
.bag-edit { display: inline-flex; align-items: center; gap: 5px; min-height: var(--tap); margin: -4px 0 -4px -6px; padding: 0 6px; border-radius: var(--r); color: var(--cafe); font-size: var(--fs-13); font-weight: 600; }
.bag-edit:active { background: var(--superficie); }
/* Cantidad compacta: 36 px de alto a la vista, 44 px de área táctil */
.qty.xs { height: 36px; border-radius: 12px; background: var(--blanco); }
.qty.xs button { position: relative; width: 40px; color: var(--espresso); }
.qty.xs button::after { content: ''; position: absolute; inset: -5px -2px; } /* 44×44 */
.qty.xs button.is-trash { color: var(--gris-oscuro); }
.qty.xs span { min-width: 18px; font-size: var(--fs-15); }

/* ¿Algo más? */
.more { margin: 22px 0 0; }
.more .sec-h { margin-bottom: 8px; }
.more-link { display: inline-flex; align-items: center; min-height: var(--tap); margin: -12px -8px; padding: 0 8px; border-radius: var(--r); color: var(--cafe); font-size: var(--fs-13); font-weight: 600; }
.more .hscroll { margin: 0 -20px; padding: 4px 20px 6px; scroll-padding-inline: 20px; }
.sug { flex: none; width: 148px; display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; border: var(--border); border-radius: 16px; background: var(--blanco); text-align: left; transition: border-color var(--t-fast) var(--ease); }
.sug:active { border-color: var(--linea-fuerte); }
.sug:focus-visible { border-radius: 16px; outline-offset: 1px; }
.sug-thumb { height: 64px; border-radius: 12px; display: grid; place-items: center; }
.sug-name { color: var(--espresso); font-size: 14px; font-weight: 600; line-height: 1.2; }
.sug-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.sug-price { color: var(--verde-bosque); font-size: 14px; font-weight: 600; }
.sug-add { width: 28px; height: 28px; border-radius: 50%; background: var(--cafe); color: var(--blanco); display: grid; place-items: center; }

/* Pie fijo: total, Seguir pidiendo / Ir a pagar y nota */
.sheet-foot.bag-foot { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 16px calc(14px + var(--safe-b)); }
.bag-total { display: flex; align-items: baseline; justify-content: space-between; }
.bag-total span:first-child { color: var(--gris-oscuro); font-size: var(--fs-15); }
.bag-total .tnum { color: var(--verde-bosque); font-size: 22px; font-weight: 600; }
.bag-actions { display: flex; gap: 10px; }
.bag-actions .btn { min-height: 54px; border-radius: 14px; font-size: 16px; }
.bag-actions .btn:focus-visible { border-radius: 14px; }
.btn.btn-line { flex: none; gap: 6px; padding: 0 16px; border: 1.5px solid var(--cafe); background: var(--blanco); color: var(--cafe); font-size: var(--fs-15); }
.btn.btn-line:active { background: var(--superficie); }
.bag-pay-note { color: var(--gris-oscuro); font-size: 12px; text-align: center; }

/* ---------- Checkout ---------- */
/* Cliente guardado: "Ana · 686 123 4567" con "Cambiar" */
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 6px 6px 6px 16px; border: var(--border); border-radius: 14px; background: var(--blanco); }
.contact-text { display: flex; min-width: 0; font-size: var(--fs-15); white-space: nowrap; }
.contact-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; } /* si no cabe, se recorta el nombre */
.contact-sep, .contact-phone { flex: none; } /* el celular siempre completo */
.contact-change { flex: none; min-height: var(--tap); padding: 0 12px; border-radius: var(--r); color: var(--cafe); font-weight: 600; }
.contact-change:active { background: var(--superficie); }
.opt-icon { flex: none; width: 24px; display: grid; place-items: center; color: var(--espresso); }
.place { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--gris-calido); font-size: var(--fs-13); }
.secure { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: var(--fs-13); color: var(--gris-calido); }
.formerr { margin: 16px 0 0; padding: 12px 16px; border: 1px solid var(--error); border-radius: var(--r); color: var(--error); font-weight: 500; }

/* ---------- Checkout · paso 2 (docs/mock/EntregaPunto, EntregaDomicilio y EntregaRecoger) ---------- */
.ck-body { padding-top: 10px; padding-bottom: 6px; }
.ck-contact { margin: 0; }
.ck-sec { margin-top: 10px; scroll-margin-top: 16px; }
.ck-sec:first-child { margin-top: 0; }
.ck-h { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris-oscuro); }
.ck-sec.err .ck-h { color: var(--error); }
.ck-sec.err select { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.ck-field { margin-top: 6px; }
.ck-point { display: flex; gap: 8px; }
.ck-point select { flex: 1; min-width: 0; min-height: 48px; padding: 0 40px 0 14px; border-radius: 12px; font-size: var(--fs-15); font-weight: 600; }
.ck-maps { flex: none; width: 48px; height: 48px; border: var(--border); border-radius: 12px; background: var(--blanco); color: var(--cafe); display: grid; place-items: center; }
.ck-hint { margin: 8px 2px 0; font-size: 12px; line-height: 1.4; color: var(--gris-oscuro); }
.link-btn { display: inline-flex; align-items: center; min-height: var(--tap); margin: -14px 0; padding: 0 4px; color: var(--cafe); font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ck-loc, .ck-place { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border: var(--border); border-radius: 14px; background: var(--blanco); transition: border-color var(--t-fast) var(--ease); }
.ck-loc.is-err { border-color: var(--error); }
.ck-loc-ico { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--superficie); color: var(--cafe); display: grid; place-items: center; }
.ck-loc.is-ok .ck-loc-ico { background: var(--verde-suave); color: var(--verde-bosque); }
.ck-loc.is-err .ck-loc-ico { color: var(--error); }
.ck-loc-txt { flex: 1; min-width: 0; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; font-weight: 600; line-height: 1.3; }
.ck-loc-txt .icon { color: var(--verde-olivo); }
.ck-loc.is-err .ck-loc-txt { color: var(--error); }
.ck-addr { min-height: var(--tap); padding: 0 14px; border-radius: 12px; font-size: var(--fs-15); }
/* Mapa del pin de entrega (Leaflet en public/vendor + mosaicos de OpenStreetMap); sin círculo de cobertura */
.ck-map { position: relative; z-index: 0; height: 140px; border: var(--border); border-radius: 14px; overflow: hidden; background: var(--superficie); }
.ck-map.is-err { border-color: var(--error); }
.ck-map.leaflet-container { font-family: var(--font); }
.ck-map .leaflet-control-attribution { padding: 1px 5px; background: var(--blanco); color: var(--gris-oscuro); font-size: 10px; line-height: 1.3; }
.ck-map .leaflet-control-attribution a { color: var(--gris-oscuro); }
.ck-pin svg { width: 36px; height: 36px; filter: drop-shadow(0 1px 2px var(--velo)); }
.ck-pin path { fill: var(--cafe); stroke: var(--blanco); stroke-width: 1.5; }
.ck-pin circle { fill: var(--blanco); }
/* Estado de la cotización e instrucción como pastillas sobre el mapa (no estorban al arrastre) */
.ck-mapwrap { position: relative; }
.ck-map-ov { position: absolute; inset: 6px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; pointer-events: none; z-index: 1; }
.ck-map-pill { max-width: 100%; padding: 4px 8px; border-radius: 999px; background: var(--blanco); color: var(--gris-oscuro); font-size: 11px; line-height: 1.3; font-weight: 500; box-shadow: var(--sombra-seg); }
.ck-map-status { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--espresso); pointer-events: auto; }
.ck-map-status:empty { display: none; }
.ck-map-status .icon { color: var(--verde-olivo); }
.ck-map-status.is-err { color: var(--error); }
.ck-map-status .link-btn { min-height: 0; margin: 0; padding: 0; font-size: 11px; }
.ck-map-tip { margin-bottom: 14px; } /* deja ver la atribución de OpenStreetMap, abajo a la derecha */
.ck-map-fallback { padding: 12px; font-size: var(--fs-13); color: var(--gris-oscuro); }
.ck-nudge { margin-top: 6px; padding: 5px 12px; border-radius: 12px; background: var(--rosa); display: flex; flex-direction: column; gap: 3px; }
.ck-nudge span { font-size: var(--fs-13); font-weight: 600; color: var(--espresso); }
.ck-bar { height: 4px; border-radius: 2px; background: var(--blanco); overflow: hidden; }
.ck-bar i { display: block; height: 4px; background: var(--rosa-vino); transition: width var(--t-slow) var(--ease); }
.ck-place { padding: 10px 8px 10px 12px; }
.ck-place-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ck-place-name { font-size: 14px; font-weight: 600; }
.ck-place-addr { font-size: var(--fs-13); color: var(--gris-oscuro); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Paso 2 a pantalla completa (docs/mock/Entrega*.dc.html): sin agarradera ni esquinas */
.sheet.bag.page { background: var(--crema); }
.sheet.bag.page .grab { display: none; }
.sheet.bag.page .bag-head { padding-top: calc(8px + var(--safe-t)); }
.sheet.bag.page .ck-contact .contact-row { min-height: 50px; }
/* Pie fijo: resumen, total y botón (sin scroll a 375 × 812 con cliente guardado) */
.sheet-foot.ck-foot { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 16px calc(10px + var(--safe-b)); background: var(--crema); }
.ck-privacy { margin: 0 4px; font-size: 11px; line-height: 1.35; color: var(--gris-calido); text-align: center; }
.ck-privacy a { color: var(--gris-oscuro); text-decoration: underline; text-underline-offset: 2px; }
.ck-sum { display: flex; justify-content: space-between; gap: 12px; margin: 0 4px; font-size: var(--fs-13); color: var(--gris-oscuro); }
.ck-sum strong { color: var(--espresso); font-size: var(--fs-15); }
.ck-foot .btn { min-height: 56px; border-radius: 16px; font-size: 16px; }
.ck-foot .btn:focus-visible { border-radius: 16px; }

/* ---------- Estatus del pedido (docs/mock/EntregaLlegada.dc.html) ---------- */
.status { padding: 8px 0 0; text-align: center; }
.st-label { color: var(--gris-calido); font-size: var(--fs-13); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.st-label b { font-size: var(--fs-15); letter-spacing: 0.08em; }
.st-title { margin-top: 8px; font-size: var(--fs-28); line-height: 1.15; letter-spacing: -0.01em; }
.st-title.is-ready { color: var(--verde-bosque); }
.st-text { margin-top: 4px; color: var(--gris-calido); }
.st-pausa { display: block; height: 14px; width: auto; margin: 18px auto 0; } /* pedido entregado: "TAKE A PAUSE" arriba del gracias */
.progress { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 22px 0 0; padding: 0; }
.progress li { color: var(--gris-oscuro); font-size: 11px; font-weight: 400; text-align: left; }
.progress li::before { content: ''; display: block; height: 4px; margin-bottom: 6px; border-radius: 2px; background: var(--linea); transition: background var(--t) var(--ease); }
.progress li.on { color: var(--espresso); }
.progress li.on::before { background: var(--cafe); }
.progress li[aria-current='step'] { font-weight: 600; }
/* Lugar de entrega y "Ya llegué" */
.st-card { display: flex; align-items: center; gap: 12px; margin: 24px 0 0; padding: 14px; border: var(--border); border-radius: 14px; background: var(--blanco); text-align: left; }
.st-card .ck-loc-ico { width: 36px; height: 36px; }
.st-card-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-card-name { font-size: var(--fs-15); font-weight: 600; overflow-wrap: anywhere; }
.st-card-sub { font-size: var(--fs-13); color: var(--gris-oscuro); }
.st-card-link { flex: none; width: var(--tap); height: var(--tap); margin: -4px -8px -4px 0; display: grid; place-items: center; color: var(--cafe); }
.st-acts { margin: 24px 0 0; display: flex; flex-direction: column; gap: 10px; }
.st-acts .btn { min-height: 56px; border-radius: 16px; font-size: 16px; }
.st-acts .btn.ghost { min-height: 52px; color: var(--cafe); font-weight: 600; }
.st-acts .btn:focus-visible { border-radius: 16px; }
.st-note { margin: 0 8px; font-size: var(--fs-13); line-height: 1.4; color: var(--gris-oscuro); text-align: center; }
.st-qr { margin: 24px 0 0; padding: 20px 16px 18px; border: var(--border); border-radius: 14px; background: var(--blanco); text-align: center; }
.st-qr-img { width: 200px; height: 200px; margin: 0 auto; }
.st-qr-img svg { width: 100%; height: 100%; display: block; }
.st-qr-img path { fill: var(--espresso); }
.st-qr-img rect { fill: var(--blanco); }
.st-qr-label { margin-top: 14px; font-size: var(--fs-13); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gris-oscuro); }
.st-qr-pin { margin-top: 2px; font-size: 40px; font-weight: 600; line-height: 1.1; letter-spacing: 0.14em; }
.st-qr-note { margin-top: 6px; font-size: var(--fs-13); color: var(--gris-oscuro); }
.details { display: grid; grid-template-columns: 1fr 1fr; margin: 24px 0 0; border-top: var(--border); border-bottom: var(--border); }
.details > div { padding: 12px 0; min-width: 0; }
.details > div:nth-child(n + 3) { border-top: var(--border); }
.details > div:nth-child(even) { padding-left: 16px; border-left: var(--border); }
.details dt { color: var(--gris-calido); font-size: var(--fs-13); }
.details dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.ok { display: inline-flex; align-items: center; gap: 4px; color: var(--verde-bosque); }
.summary { margin: 24px 0 0; }
.summary h4 { margin: 0 0 8px; font-size: var(--fs-13); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.summary ul { list-style: none; margin: 0; padding: 0; border-top: var(--border); border-bottom: var(--border); }
.summary li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; }
.summary li + li { border-top: var(--border); }
.summary li p { font-weight: 500; }
.summary li small { display: block; margin-top: 2px; color: var(--gris-calido); font-size: var(--fs-13); }
.summary .sum-row { display: flex; justify-content: space-between; padding: 12px 0 0; color: var(--gris-calido); }
.demo-note { margin: 24px 0 0; color: var(--gris-calido); font-size: var(--fs-13); text-align: center; }

/* ---------- Toast: negro y pequeño, encima de la barra del carrito ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); z-index: 90; transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  width: max-content; max-width: calc(100% - 32px); padding: 8px 14px; border-radius: var(--r); background: var(--espresso); color: var(--blanco);
  font-size: var(--fs-13); font-weight: 500; text-align: center; transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.locked .toast { bottom: calc(172px + var(--safe-b)); } /* encima del pie de las hojas y de la bolsa */

/* ---------- Pago simulado (solo demo; imita Stripe Checkout) ---------- */
.fake-pay { position: fixed; inset: 0; z-index: 80; background: var(--demo-fondo); display: flex; flex-direction: column; align-items: center; padding: calc(32px + var(--safe-t)) 20px 20px; font-family: system-ui, sans-serif; color: var(--demo-texto); }
.fake-pay .card2 { width: 100%; max-width: 420px; background: var(--demo-tarjeta); border-radius: 12px; padding: 24px; border: 1px solid var(--demo-linea); }
.fake-pay .tag2 { display: inline-block; font-size: 12px; font-weight: 600; color: var(--demo-acento); background: var(--demo-acento-bg); padding: 4px 8px; border-radius: 6px; margin-bottom: 12px; }
.fake-pay .tot { font-size: 30px; font-weight: 600; margin: 4px 0 20px; }
.fake-pay .fld { border: 1px solid var(--demo-linea); border-radius: 8px; padding: 12px; margin-bottom: 12px; color: var(--demo-texto-2); font-size: 15px; }
.fake-pay .to { font-size: 14px; color: var(--demo-texto-2); }
.fake-pay .go { width: 100%; height: 48px; border-radius: 8px; background: var(--demo-acento); color: var(--demo-tarjeta); font-weight: 600; font-size: 16px; text-align: center; margin-top: 4px; }
.fake-pay .back { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); margin-top: 12px; color: var(--demo-acento); font-weight: 600; font-size: 14px; }

/* ---------- Barra de la demo (en el flujo, se va al hacer scroll) ---------- */
body.demo .app { padding-top: 16px; }
.demo-bar { display: flex; width: max-content; gap: 2px; margin: calc(8px + var(--safe-t)) auto 0; padding: 2px; border: var(--border); border-radius: var(--r); background: var(--superficie); }
.demo-bar a { display: grid; place-items: center; min-height: var(--tap); padding: 0 16px; border-radius: 8px; color: var(--gris-oscuro); font-size: var(--fs-13); font-weight: 500; text-decoration: none; }
.demo-bar a.on { background: var(--espresso); color: var(--blanco); }

/* =================== Panel de pedidos: estilo punto de venta =================== */
body.view-panel .cartbar, body.view-panel #app { display: none; }
body:not(.view-panel) #admin { display: none; }
body.view-panel .toast { bottom: calc(24px + var(--safe-b)); }
.admin { max-width: none; padding: 0 0 calc(32px + var(--safe-b)); }
body.demo .admin { padding-top: 8px; }
@media (max-width: 899px) { .only-desktop { display: none !important; } }

/* Barra superior fija */
.pos-bar { position: sticky; top: 0; z-index: 10; background: var(--crema); border-bottom: var(--border); padding-top: var(--safe-t); }
.pos-bar-in { display: flex; align-items: center; gap: 12px; max-width: 1280px; min-height: 56px; margin: 0 auto; padding: 4px 8px 4px 16px; }
.pos-bar .logo { height: var(--logo-h); width: auto; }
.pos-bar .mark { height: 28px; width: auto; } /* celular: solo la taza (docs/brand/mark.svg) */
.pos-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; padding-left: 12px; border-left: var(--border); }
.pos-title h1 { font-size: var(--fs-17); line-height: 1.2; }
@media (max-width: 899px) { .pos-title { flex-direction: column; align-items: flex-start; gap: 0; } .pos-date { max-width: 100%; } }
.pos-date { color: var(--gris-calido); font-size: var(--fs-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--gris-calido); font-size: var(--fs-13); font-weight: 500; white-space: nowrap; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gris-calido); }
.live.is-live { color: var(--espresso); }
.live.is-live::before { background: var(--verde-bosque); }

.pos-main { max-width: 1280px; margin: 0 auto; padding: 16px 16px 0; }

/* Avisos (solo celular, cuando los ajustes están escondidos) */
.pos-alerts { display: grid; gap: 8px; }
.pos-alerts:has(.alert) { margin-bottom: 16px; }
.alert { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 4px 4px 4px 16px; border: var(--border); border-radius: var(--r); }
.alert .icon { color: var(--warn); }
.alert span { flex: 1; min-width: 0; font-size: var(--fs-13); }

/* Ajustes: switches compactos */
.pos-settings { display: none; margin: 0 0 16px; }
.pos-settings.open { display: block; }
.switches { border: var(--border); border-radius: var(--r); }
.switch { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 16px; text-align: left; }
.switch + .switch { border-top: var(--border); }
.sw-text { flex: 1; min-width: 0; font-weight: 500; }
.sw-text small { display: block; color: var(--gris-calido); font-size: var(--fs-13); font-weight: 400; }
.sw-track { flex: none; position: relative; width: 36px; height: 20px; border: 1.5px solid var(--gris-calido); border-radius: 10px; transition: background var(--t) var(--ease), border-color var(--t) var(--ease); }
.sw-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 11px; height: 11px; border-radius: 50%; background: var(--gris-calido); transition: transform var(--t) var(--ease), background var(--t) var(--ease); }
.switch[aria-checked='true'] .sw-track { background: var(--verde-bosque); border-color: var(--verde-bosque); }
.switch[aria-checked='true'] .sw-track::after { background: var(--blanco); transform: translateX(16px); }
.pos-settings .field { margin-top: 12px; }

/* Métricas */
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 16px; border: var(--border); border-radius: var(--r); }
.metrics > div { min-width: 0; padding: 12px 16px; }
.metrics > div + div { border-left: var(--border); }
.metrics dt { color: var(--gris-calido); font-size: var(--fs-13); white-space: nowrap; }
.metrics dd { margin: 2px 0 0; font-size: var(--fs-20); font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pestañas: 4 en celular (etiqueta + contador), 2 en escritorio */
.pos-tabs { margin: 0 0 16px; }
.pos-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 2px; font-size: var(--fs-13); }
.pos-tabs button .tnum { font-size: var(--fs-17); font-weight: 600; line-height: 1; }
.pos-tabs-d { margin: 0 0 16px; }
.pos-tabs-d button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pos-tabs-d button .tnum { color: inherit; opacity: 0.75; }

/* Tablero */
.board { display: grid; gap: 12px; }
.col { display: grid; gap: 12px; align-content: start; }
.col-h { display: none; }
.col-empty, .empty { padding: 40px 12px; color: var(--gris-calido); text-align: center; }
.board[data-show='new'] .col:not([data-col='new']),
.board[data-show='preparing'] .col:not([data-col='preparing']),
.board[data-show='ready'] .col:not([data-col='ready']) { display: none; }
.done-list { display: grid; gap: 12px; }

/* Ticket del pedido */
.ticket { padding: 16px; border: var(--border); border-radius: var(--r); background: var(--blanco); }
.ticket.is-finished { background: var(--crema); }
.t-head { display: flex; align-items: center; gap: 12px; }
.t-code { font-size: var(--fs-28); font-weight: 600; line-height: 1; letter-spacing: 0.04em; }
.t-who { flex: 1; min-width: 0; }
.t-name { font-size: var(--fs-17); font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-time { color: var(--gris-calido); font-size: var(--fs-13); }
.t-time .late { color: var(--warn); font-weight: 600; }
.t-status { color: var(--gris-calido); font-size: var(--fs-13); font-weight: 500; white-space: nowrap; }
.t-status.st-done { color: var(--verde-bosque); }
.t-status.st-canceled { color: var(--error); }
.t-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: var(--border); border-radius: 6px; color: var(--espresso); font-size: var(--fs-13); font-weight: 500; white-space: nowrap; }
.tag .icon { color: var(--gris-calido); }
.tag-ok, .tag-ok .icon { color: var(--verde-bosque); }
.tag-old, .tag-old .icon { color: var(--warn); border-color: currentColor; } /* pendiente de otro día */
.tag-err, .tag-err .icon { color: var(--error); border-color: currentColor; }
.t-addr { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; }
.t-addr .icon { margin-top: 2px; color: var(--gris-calido); }
.t-addr > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.t-addr small { color: var(--gris-calido); font-size: var(--fs-13); }
.t-link { flex: none; display: inline-flex; align-items: center; min-height: var(--tap); margin: -12px -8px -12px 0; padding: 0 8px; border-radius: var(--r); color: var(--cafe); font-size: var(--fs-13); font-weight: 600; text-decoration: none; }
.t-link:hover, .t-link:active { background: var(--superficie); }
/* El cliente ya llegó al punto (Realtime) */
.t-arrived { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 6px 10px; border-radius: var(--r); background: var(--verde-suave); color: var(--verde-bosque); font-size: var(--fs-13); font-weight: 600; }
.t-arrived > span { flex: 1; }
.t-arrived .t-link { color: var(--verde-bosque); margin: -6px -6px -6px 0; }
.t-items { list-style: none; margin: 12px 0 0; padding: 0; border-top: var(--border); }
.t-items li { padding: 8px 0; }
.t-items li + li { border-top: var(--border); }
.t-items li > p:first-child { font-size: var(--fs-17); font-weight: 600; line-height: 1.3; }
.t-items small { display: block; margin-top: 2px; color: var(--gris-calido); font-size: var(--fs-13); }
.t-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; padding: 6px 8px; border-left: 2px solid var(--warn); color: var(--warn); font-weight: 600; }
.t-note .icon { margin-top: 3px; }
.t-foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0 0; border-top: var(--border); color: var(--gris-calido); font-size: var(--fs-13); }
.t-foot b { color: var(--verde-bosque); font-size: var(--fs-15); }
.t-acts { display: grid; gap: 4px; margin: 12px 0 0; }
.t-acts > .btn { width: 100%; }
.ticket.is-finished .t-acts { margin-top: 4px; }
.t-sec { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 -8px; }
.tbtn { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 8px; border-radius: var(--r); color: var(--espresso); font-size: var(--fs-15); font-weight: 500; text-decoration: none; transition: background var(--t-fast) var(--ease); }
.tbtn:hover, .tbtn:active { background: var(--superficie); }
.tbtn:disabled { opacity: 0.5; }
.tbtn .icon { color: var(--gris-calido); }
.tbtn-danger { margin-left: auto; color: var(--error); }
.alert .tbtn { flex: none; }
.t-confirm p { font-weight: 500; }
.t-confirm-btns { display: flex; gap: 8px; margin-top: 8px; }
.btn-danger { background: var(--error); }
.t-warn { margin-top: 8px; color: var(--error); font-size: var(--fs-13); }

/* Entregar con QR (hoja del panel) */
.dv-cam { position: relative; aspect-ratio: 1; max-height: 52vh; border-radius: 16px; background: var(--espresso); overflow: hidden; display: grid; place-items: center; }
.dv-cam video { width: 100%; height: 100%; object-fit: cover; }
.dv-frame { position: absolute; inset: 18%; border: 2px solid var(--blanco); border-radius: 16px; opacity: 0.85; pointer-events: none; }
.dv-cam-msg { position: absolute; inset: auto 16px 16px; margin: 0; padding: 10px 12px; border-radius: var(--r); background: var(--blanco); color: var(--espresso); font-size: var(--fs-13); font-weight: 500; text-align: center; }
.dv-hint { margin: 12px 4px 0; color: var(--gris-oscuro); font-size: var(--fs-13); text-align: center; }
.dv-pin { font-size: 32px; font-weight: 600; letter-spacing: 0.3em; text-align: center; }
.dv-order { padding: 14px 16px; border: var(--border); border-radius: 14px; background: var(--blanco); }
.dv-code { font-size: var(--fs-28); font-weight: 600; line-height: 1; letter-spacing: 0.04em; }
.dv-name { margin-top: 6px; font-size: var(--fs-17); font-weight: 600; }
.dv-meta { margin-top: 2px; color: var(--gris-oscuro); font-size: var(--fs-13); }
.dv-items { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: var(--border); display: grid; gap: 4px; }
.dv-total { margin-top: 10px; padding-top: 10px; border-top: var(--border); display: flex; justify-content: space-between; font-weight: 600; }
.dv-total .tnum { color: var(--verde-bosque); }
.dv-ok, .dv-warn { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: var(--fs-13); font-weight: 600; }
.dv-ok { color: var(--verde-bosque); }
.dv-warn { color: var(--warn); }

/* Inicio de sesión */
.login { max-width: 360px; margin: 14vh auto 0; padding: 0 16px; }
.login .logo, .login .logo-lema { height: var(--logo-h); width: auto; }
.login .logo-lema { height: 84px; }
.login h1 { margin: 24px 0 4px; font-size: var(--fs-20); }
.login p { color: var(--gris-calido); }
.login .btn { width: 100%; margin-top: 24px; }
.login .formerr { margin-top: 16px; }

/* Escritorio: tablero de 3 columnas y ajustes siempre visibles */
@media (min-width: 900px) {
  .only-mobile { display: none !important; }
  .pos-bar-in { padding: 8px 16px 8px 24px; gap: 16px; }
  .pos-main { padding: 24px 24px 0; }
  .pos-settings, .pos-settings.open { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
  .switches { display: flex; flex: 1; }
  .switch { flex: 1; }
  .switch + .switch { border-top: 0; border-left: var(--border); }
  .pos-settings .field { flex: 1 1 100%; margin: 0; }
  .metrics { max-width: 640px; }
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .board .col { display: grid !important; padding: 12px; border: var(--border); border-radius: var(--r); background: var(--superficie); }
  .col-h { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 4px 0; font-size: var(--fs-13); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
  .col-h .tnum { color: var(--gris-oscuro); font-size: var(--fs-15); letter-spacing: 0; }
  .col-empty { padding: 24px 8px; font-size: var(--fs-13); color: var(--gris-oscuro); }
  .done-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
}

/* ---------- Control segmentado tipo píldora (checkout y pestañas de Configuración; docs/mock/Entrega*.dc.html) ---------- */
.segp { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--superficie); }
.segp button { flex: 1; min-height: var(--tap); padding: 0 4px; border-radius: 12px; color: var(--espresso); font-size: 14px; font-weight: 600; text-align: center; line-height: 1.2; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.segp button[aria-pressed='true'], .segp button[aria-selected='true'] { background: var(--cafe); color: var(--blanco); }
.segp button:disabled { opacity: 0.5; }
.segp button:focus-visible { border-radius: 12px; outline-offset: 0; }
/* Botón chico sobre superficie ("Cambiar", "Actualizar", "Cómo llegar", "Agregar") */
.sbtn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; padding: 0 12px; border-radius: var(--r); background: var(--superficie); color: var(--cafe); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; position: relative; transition: background var(--t-fast) var(--ease); }
.sbtn::after { content: ''; position: absolute; inset: -4px 0; } /* área táctil de 44 px */
.sbtn:active { background: var(--linea); }
.sbtn:disabled { opacity: 0.5; }

/* =================== Panel · Configuración (docs/mock/ConfigTienda.dc.html y ConfigEntrega.dc.html) =================== */
/* Pantalla completa desde el engrane; cabe en 375 × 812 sin scroll. */
.admin.is-config { padding-bottom: 0; } /* la pantalla trae su propio margen inferior */
.cfg { max-width: 560px; margin: 0 auto; padding: calc(8px + var(--safe-t)) 20px calc(12px + var(--safe-b)); }
.cfg-head { display: flex; align-items: center; gap: 12px; min-height: var(--tap); }
.cfg-head .logo { height: 22px; width: auto; }
.cfg-head h1 { flex: 1; min-width: 0; font-size: var(--fs-20); line-height: 1.2; }
.cfg-tabs { margin-top: 12px; }
.cfg-tabs button { font-size: var(--fs-15); }
.cfg-sec { padding-top: 12px; }
.cfg-h { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris-oscuro); }
.cfg-card { border: var(--border); border-radius: 14px; background: var(--blanco); overflow: hidden; }
.cfg-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 14px; }
.cfg-row + .cfg-row { border-top: var(--border); }
.cfg-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cfg-name { font-size: var(--fs-15); font-weight: 600; line-height: 1.25; }
.cfg-sub { font-size: 12px; line-height: 1.3; color: var(--gris-oscuro); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Switch grande (48 × 28), mismos tokens que el de extras */
.sw2 { position: relative; flex: none; width: 48px; height: 28px; border-radius: 14px; background: var(--gris-calido); transition: background-color var(--t) var(--ease), opacity var(--t-fast) var(--ease); }
.sw2::before { content: ''; position: absolute; inset: -8px 0; } /* área táctil de 44 px */
.sw2::after { content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--blanco); box-shadow: var(--sombra-perilla); transition: transform var(--t) var(--ease); }
.sw2[aria-checked='true'] { background: var(--verde-bosque); }
.sw2[aria-checked='true']::after { transform: translateX(20px); }
.sw2:disabled { opacity: 0.4; }
.sw2:focus-visible { border-radius: 14px; }
/* −/+ del tiempo de preparación */
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { position: relative; width: 36px; height: 36px; border: var(--border); border-radius: 50%; background: var(--blanco); color: var(--cafe); display: grid; place-items: center; }
.stepper button::after { content: ''; position: absolute; inset: -4px; }
.stepper button:disabled { opacity: 0.4; }
.stepper button:focus-visible { border-radius: 50%; }
.stepper span { min-width: 52px; text-align: center; font-size: var(--fs-15); font-weight: 600; }
/* Campos */
.cfg-field { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.cfg-field label, .cfg-grid3 label { font-size: 12px; font-weight: 600; color: var(--gris-oscuro); }
.cfg-field input { min-height: var(--tap); padding: 0 12px; border-radius: 12px; font-size: var(--fs-15); }
.cfg-grid3 { display: flex; gap: 8px; }
.cfg-grid3 > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cfg-money { height: var(--tap); display: flex; align-items: center; gap: 4px; padding: 0 10px; border: var(--border); border-radius: 12px; background: var(--blanco); transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.cfg-money:focus-within { border-color: var(--cafe); box-shadow: inset 0 0 0 1px var(--cafe); }
.cfg-money span { flex: none; color: var(--gris-oscuro); font-size: 14px; }
.cfg-money input { width: 100%; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 16px; font-weight: 600; }
.cfg-note { margin: 6px 2px 0; font-size: 12px; line-height: 1.4; color: var(--gris-oscuro); }
/* Puntos como chips */
.cfg-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.cfg-chip { position: relative; min-height: 32px; padding: 0 12px; border: var(--border); border-radius: 16px; background: var(--blanco); color: var(--espresso); font-size: var(--fs-13); font-weight: 500; white-space: nowrap; transition: background var(--t-fast) var(--ease); }
.cfg-chip::after { content: ''; position: absolute; inset: -6px 0; } /* área táctil de 44 px */
.cfg-chip:active { background: var(--superficie); }
.cfg-chip:focus-visible { border-radius: 16px; }
.cfg-chip.is-add { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--cafe); background: transparent; color: var(--cafe); font-weight: 600; }
.cfg-foot { margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 18px; font-size: 12px; color: var(--gris-oscuro); text-align: center; }
.cfg-foot.is-saved { color: var(--verde-bosque); font-weight: 600; }

/* =================== Aviso de privacidad (public/privacidad.html) =================== */
.legal { max-width: 560px; padding-bottom: 40px; line-height: 1.55; }
.legal-head { display: flex; align-items: center; min-height: var(--tap); }
.legal-back img { height: var(--logo-h); width: auto; }
.legal h1 { margin-top: 20px; font-size: var(--fs-28); line-height: 1.15; letter-spacing: -0.01em; }
.legal-date { margin-top: 6px; color: var(--gris-calido); font-size: var(--fs-13); }
.legal h2 { margin-top: 26px; font-size: var(--fs-17); line-height: 1.3; }
.legal p { margin-top: 10px; }
.legal ul, .legal ol { margin: 10px 0 0; padding-left: 22px; }
.legal li { margin-top: 6px; }
.legal li::marker { color: var(--gris-calido); }
.legal a { color: var(--cafe); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.legal-foot { margin-top: 32px; padding-top: 16px; border-top: var(--border); font-size: var(--fs-13); }

/* =================== Movimiento reducido =================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
