/* ==========================================================================
   Guareneitor · estilos
   Sistema heredado del Libro Digital (tinta de 3 px, sombra dura, pasteles
   con texto de tinta) llevado al Mapocho: café del río, smog, pirca y el rojo
   del LED del Guareneitor reservado para el porcentaje de descuento.
   Celular primero: todo se diseña a 375 px y se agranda después.
   ========================================================================== */

@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage.woff2") format("woff2");
  font-weight: 400 800; font-stretch: 75% 100%; font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("../fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("../fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700; font-display: swap;
}

:root {
  color-scheme: light;
  --tinta: #2E2A44;
  --tinta-suave: #5D5874;
  --papel: #FFFDF8;
  --fondo: #E4EBF0;
  --mapocho: #A47B55;
  --mapocho-osc: #7A5638;
  --smog: #E9DDC9;
  --pirca: #D8C6AE;
  --laser: #CF2F20;          /* el LED: solo para el porcentaje y la acción principal */
  --laser-vivo: #FF3B2F;
  --queso: #FFD25A;
  --manteca: #FFE9A8;
  --menta: #9FE3C6;
  --lavanda: #C9BFF0;
  --celeste: #AEDCF2;
  --coral: #FF8D7E;
  --verde-txt: #1D7A55;
  --rojo-txt: #B42318;
  --hud: #FF3B2F;
  --hud-fondo: #170F1D;

  --borde: 3px solid var(--tinta);
  --sombra: 4px 4px 0 var(--tinta);
  --sombra-chica: 2px 2px 0 var(--tinta);
  --radio: 14px;
  --t-toque: 160ms;
  --t-resp: 280ms;

  --f-titulo: "Bricolage", "Arial Narrow", system-ui, sans-serif;
  --f-texto: "Atkinson", system-ui, -apple-system, "Segoe UI", sans-serif;

  --alto-barra: 56px;
  --alto-dias: 56px;
  --alto-tabs: 64px;
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: 17px;
  line-height: 1.45;
  color: var(--tinta);
  background: var(--fondo);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--f-titulo); font-weight: 800; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.visual-oculto {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
:focus-visible { outline: 3px solid var(--laser); outline-offset: 2px; border-radius: 8px; }

.saltar {
  position: fixed; left: 8px; top: -60px; z-index: 100;
  background: var(--papel); border: var(--borde); border-radius: 10px; padding: 10px 14px;
  font-weight: 700; text-decoration: none;
}
.saltar:focus { top: 8px; }

/* ---------- botones con sombra dura que se hunden ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px;
  background: var(--papel); border: var(--borde); border-radius: 12px; box-shadow: var(--sombra-chica);
  font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform var(--t-toque) ease, box-shadow var(--t-toque) ease;
  touch-action: manipulation;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--tinta); }
.btn-principal { background: var(--laser); color: #fff; min-height: 56px; font-size: 1.08rem; box-shadow: var(--sombra); }
.btn-principal:active { transform: translate(4px, 4px); }
.btn-queso { background: var(--queso); }
.btn-menta { background: var(--menta); }
.btn-plano { box-shadow: none; }
.btn-icono { width: 48px; padding: 0; }
.btn svg, .ico { width: 22px; height: 22px; flex: none; }
.ico { stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   ESTRUCTURA: barra, días, mapa, hoja y pestañas
   ========================================================================== */
.app { position: fixed; inset: 0; display: block; }

.barra {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: var(--alto-barra);
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--papel); border-bottom: var(--borde);
}
.marca { display: flex; align-items: center; gap: 8px; text-decoration: none; min-height: 48px; }
.marca-cara { width: 46px; height: 40px; display: block; }
.marca-cara .animal { width: 100%; height: 100%; overflow: hidden; }
.marca-txt {
  font-family: var(--f-titulo); font-weight: 800; font-stretch: 80%;
  font-size: 1.5rem; letter-spacing: -0.02em;
}
.barra .espacio { flex: 1; }
.btn-bancos { min-height: 44px; padding: 6px 10px; font-size: .92rem; gap: 6px; white-space: nowrap; flex: none; }
@media (max-width: 420px) {
  .btn-bancos .ico { display: none; }
  .marca-txt { font-size: 1.32rem; }
  .marca-cara { width: 40px; height: 35px; }
}
.btn-bancos .cuantos {
  background: var(--queso); border: 2px solid var(--tinta); border-radius: 999px;
  min-width: 26px; height: 26px; padding: 0 6px; display: inline-grid; place-items: center;
  font-size: .82rem;
}

/* Riel de días: Hoy primero, la semana después. Se desliza con el dedo. */
.dias {
  position: fixed; top: var(--alto-barra); left: 0; right: 0; z-index: 25;
  height: var(--alto-dias);
  display: flex; gap: 8px; align-items: center; padding: 0 12px;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
  background: color-mix(in srgb, var(--papel) 92%, transparent);
  border-bottom: 2px solid var(--tinta);
}
.dias::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start;
  min-height: 40px; padding: 6px 14px; border-radius: 999px;
  background: var(--papel); border: 2px solid var(--tinta);
  font-weight: 700; font-size: .95rem; cursor: pointer; white-space: nowrap;
  touch-action: manipulation;
}
.chip[aria-pressed="true"] { background: var(--tinta); color: var(--papel); }
.chip.hoy { background: var(--queso); }
.chip.hoy[aria-pressed="true"] { background: var(--tinta); color: var(--queso); }

/* Mapa: ocupa todo detrás de la hoja. */
.mapa {
  position: fixed; left: 0; right: 0;
  top: calc(var(--alto-barra) + var(--alto-dias));
  bottom: calc(var(--alto-tabs) + var(--seguro-abajo));
  background: #E7EAEE;
}
.mapa-sin {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px;
}
.maplibregl-ctrl-attrib { font-size: 11px; }
.maplibregl-ctrl-group { border: 2px solid var(--tinta) !important; border-radius: 10px !important; box-shadow: var(--sombra-chica) !important; }
.maplibregl-ctrl-group button { width: 40px; height: 40px; }

.yo-punto {
  width: 22px; height: 22px; border-radius: 50%;
  background: #2F6FE4; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--tinta), 0 0 0 10px rgba(47, 111, 228, .18);
}

/* ---------- la hoja inferior ----------
   Tres topes (asoma, mitad, entera). Se arrastra desde el agarre o la
   cabecera, y el agarre también es un botón: tocarlo cambia de tope, para
   quien no puede o no quiere arrastrar (WCAG 2.5.7). */
.hoja {
  position: fixed; left: 0; right: 0; z-index: 20;
  bottom: calc(var(--alto-tabs) + var(--seguro-abajo));
  height: calc(100dvh - var(--alto-barra) - var(--alto-dias) - var(--alto-tabs) - var(--seguro-abajo) - 8px);
  background: var(--papel);
  border-top: var(--borde); border-radius: 22px 22px 0 0;
  box-shadow: 0 -4px 0 rgba(46, 42, 68, .12);
  display: flex; flex-direction: column;
  transform: translateY(var(--hoja-y, 55%));
  transition: transform var(--t-resp) cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
.hoja.arrastrando { transition: none; }
.agarre {
  flex: none; display: grid; place-items: center;
  width: 100%; height: 30px; border: 0; background: transparent; cursor: grab; touch-action: none;
}
.agarre span { width: 56px; height: 6px; border-radius: 3px; background: var(--tinta); opacity: .55; }
.hoja-cab { flex: none; padding: 0 14px 10px; touch-action: none; }
.hoja-fila { display: flex; align-items: flex-start; gap: 10px; }
.hoja-titulo { font-size: 1.3rem; font-stretch: 85%; flex: 1; }
.pastilla {
  flex: none; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--tinta);
  background: var(--tinta); color: var(--papel); font-weight: 700; font-size: .9rem; cursor: pointer; touch-action: manipulation;
}
@media (min-width: 900px) { .pastilla { display: none; } }
.hoja-titulo .num { color: var(--laser); }
.hoja-sub { color: var(--tinta-suave); font-size: .88rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.controles { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.buscar {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px;
  background: #fff; border: 2px solid var(--tinta); border-radius: 12px; padding: 0 10px; min-height: 46px;
}
.buscar input { border: 0; outline: 0; background: transparent; width: 100%; min-height: 42px; font-size: 1rem; }
.buscar:focus-within { box-shadow: 0 0 0 3px var(--laser); }
.orden { min-height: 46px; border: 2px solid var(--tinta); border-radius: 12px; background: var(--papel); padding: 0 10px; font-weight: 700; }

.cocinas { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 14px 4px; margin: 0 -14px; }
.cocinas::-webkit-scrollbar { display: none; }
.cocinas .chip { min-height: 36px; font-size: .9rem; padding: 4px 12px; }

.lista {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  list-style: none; margin: 0; padding: 4px 12px 24px;
  -webkit-overflow-scrolling: touch;
}
.lista > li { margin-bottom: 12px; }
.mas { display: flex; justify-content: center; padding: 6px 0 20px; }

/* ---------- tarjeta de restorán ---------- */
.tarjeta {
  display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; align-items: center;
  width: 100%; text-align: left; padding: 10px;
  background: var(--papel); border: var(--borde); border-radius: var(--radio); box-shadow: var(--sombra-chica);
  cursor: pointer; touch-action: manipulation;
  transition: transform var(--t-toque) ease, box-shadow var(--t-toque) ease;
}
.tarjeta:active { transform: translate(2px, 2px); box-shadow: none; }
.tarjeta-foto {
  width: 84px; height: 84px; border-radius: 10px; border: 2px solid var(--tinta);
  object-fit: cover; background: var(--smog);
}
.monograma {
  width: 84px; height: 84px; border-radius: 10px; border: 2px solid var(--tinta);
  display: grid; place-items: center;
  font-family: var(--f-titulo); font-weight: 800; font-size: 1.7rem; font-stretch: 80%;
}
.tarjeta-cuerpo { min-width: 0; }
.tarjeta-nombre { font-family: var(--f-titulo); font-weight: 800; font-size: 1.12rem; line-height: 1.15;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tarjeta-meta { font-size: .88rem; color: var(--tinta-suave); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tarjeta-bancos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.banco {
  font-size: .76rem; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  border: 1.5px solid var(--tinta); background: var(--manteca); white-space: nowrap;
}
.nota-g { font-size: .85rem; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.nota-g svg { width: 15px; height: 15px; }
.pct {
  font-family: var(--f-titulo); font-weight: 800; font-stretch: 78%;
  font-size: 1.9rem; line-height: 1; color: var(--laser); text-align: right;
}
.pct small { display: block; font-size: .72rem; font-family: var(--f-texto); font-stretch: 100%; color: var(--tinta-suave); font-weight: 700; margin-top: 3px; }
.pct-oferta { font-size: 1rem; }
.dist { font-size: .8rem; font-weight: 700; background: var(--celeste); border: 1.5px solid var(--tinta); border-radius: 999px; padding: 1px 7px; }

.vacio { text-align: center; padding: 18px 10px 30px; }
.vacio .gn-hundido { width: 180px; margin: 0 auto 8px; }
.vacio h3 { font-size: 1.25rem; margin-bottom: 6px; }
.vacio p { color: var(--tinta-suave); margin-bottom: 14px; }

/* ---------- pestañas de abajo ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--alto-tabs) + var(--seguro-abajo)); padding-bottom: var(--seguro-abajo);
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--papel); border-top: var(--borde);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: transparent; font-size: .8rem; font-weight: 700; cursor: pointer; min-height: 56px;
  touch-action: manipulation; position: relative;
}
.tab .ico { width: 26px; height: 26px; }
.tab .ico { box-sizing: content-box; padding: 2px 14px; border: 2px solid transparent; border-radius: 999px; }
.tab[aria-current="page"] .ico { background: var(--queso); border-color: var(--tinta); }
.tab .globo {
  position: absolute; top: 6px; right: calc(50% - 26px); min-width: 20px; height: 20px; border-radius: 999px;
  background: var(--laser); color: #fff; font-size: .72rem; display: grid; place-items: center; padding: 0 5px;
  border: 2px solid var(--papel);
}

/* ==========================================================================
   VISIÓN GUARENEITOR (modo cerca de mí): el HUD rojo de la película
   ========================================================================== */
.vista {
  position: fixed; left: 0; right: 0; top: var(--alto-barra);
  bottom: calc(var(--alto-tabs) + var(--seguro-abajo));
  overflow-y: auto; overscroll-behavior: contain; z-index: 22;
}
.vision { background: var(--hud-fondo); color: #FFE3DF; }
.vision::before {
  content: ""; position: fixed; inset: var(--alto-barra) 0 calc(var(--alto-tabs) + var(--seguro-abajo)) 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 59, 47, .07) 0 2px, transparent 2px 5px);
}
.vision-dentro { position: relative; max-width: 560px; margin: 0 auto; padding: 16px 16px 40px; }
.hud-etiqueta { font-family: var(--f-titulo); font-stretch: 75%; font-weight: 700; letter-spacing: .08em; color: var(--hud); font-size: .85rem; text-transform: uppercase; }
.hud-titulo { font-family: var(--f-titulo); font-weight: 800; font-stretch: 78%; font-size: 1.9rem; color: #fff; margin: 4px 0 2px; line-height: 1.05; }
.hud-texto { color: #FFC9C2; font-size: .98rem; }
.radar { position: relative; width: min(100%, 360px); aspect-ratio: 1; margin: 16px auto 10px; }
.radar svg { width: 100%; height: 100%; display: block; }
.radar .barrido { transform-origin: 50% 50%; animation: barrido 4s linear infinite; }
@keyframes barrido { to { transform: rotate(360deg); } }
.blanco { cursor: pointer; }
.blanco circle.punto { fill: var(--hud); stroke: #fff; stroke-width: 2; }
.blanco text { fill: #fff; font-family: var(--f-titulo); font-weight: 800; font-size: 13px; }
.objetivos { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.objetivo {
  width: 100%; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; text-align: left;
  background: rgba(255, 59, 47, .08); color: #FFE3DF; border: 2px solid var(--hud); border-radius: 12px; padding: 10px 12px;
  cursor: pointer; min-height: 64px; touch-action: manipulation;
}
.objetivo:active { background: rgba(255, 59, 47, .2); }
.objetivo .n { font-family: var(--f-titulo); font-weight: 800; font-size: 1.4rem; color: var(--hud); text-align: center; }
.objetivo .nom { font-weight: 700; color: #fff; display: block; line-height: 1.2; }
.objetivo .det { font-size: .86rem; color: #FFC9C2; }
.objetivo .pct { color: #fff; font-size: 1.6rem; }
.objetivo .pct small { color: #FFC9C2; }
.vision .btn { background: transparent; color: #fff; border-color: var(--hud); box-shadow: none; }
.vision .btn-principal { background: var(--hud); color: var(--hud-fondo); border-color: var(--hud); }
.permiso { text-align: left; }
.permiso .gn { width: 150px; margin: 6px auto 8px; display: block; }
.permiso .acciones { display: grid; gap: 10px; margin-top: 16px; }
.vision select { width: 100%; min-height: 48px; border-radius: 12px; border: 2px solid var(--hud); background: var(--hud-fondo); color: #fff; padding: 0 12px; }
.acciones-hud { display: grid; gap: 10px; margin-top: 18px; }
.hud-error { border: 2px dashed var(--hud); border-radius: 12px; padding: 12px; margin-top: 12px; color: #FFE3DF; }

/* ==========================================================================
   MIS IDAS
   ========================================================================== */
.idas { background: var(--fondo); }
.idas-dentro { max-width: 640px; margin: 0 auto; padding: 18px 14px 40px; }
.idas h2 { font-size: 1.7rem; font-stretch: 85%; margin-bottom: 6px; }
.idas .intro { color: var(--tinta-suave); margin-bottom: 14px; }
.ida {
  background: var(--papel); border: var(--borde); border-radius: var(--radio); box-shadow: var(--sombra-chica);
  padding: 12px 14px; margin-bottom: 12px; display: grid; gap: 8px;
}
.ida-nombre { font-family: var(--f-titulo); font-weight: 800; font-size: 1.15rem; }
.ida-cuando { font-size: .9rem; color: var(--tinta-suave); }
.ida .acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.nota-hecha { font-weight: 700; color: var(--verde-txt); }
.como-funciona { margin-top: 22px; background: var(--manteca); border: var(--borde); border-radius: var(--radio); padding: 14px; }
.como-funciona h3 { font-size: 1.1rem; margin-bottom: 6px; }
.como-funciona ul { margin: 6px 0 0; padding-left: 20px; }

/* ==========================================================================
   FICHA DEL RESTORÁN (diálogo a pantalla completa en el celular)
   ========================================================================== */
dialog { color: var(--tinta); }
dialog::backdrop { background: rgba(23, 15, 29, .55); }
.ficha {
  width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0;
  background: var(--papel); overflow: hidden;
}
.ficha[open] { display: flex; flex-direction: column; animation: subir var(--t-resp) cubic-bezier(.2, .8, .2, 1); }
@keyframes subir { from { transform: translateY(24px); opacity: .4; } }
.ficha-barra {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-bottom: var(--borde); background: var(--papel); padding-top: max(8px, env(safe-area-inset-top));
}
.ficha-barra .titulo-chico { flex: 1; min-width: 0; font-family: var(--f-titulo); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ficha-cuerpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 24px; }
.ficha-pie {
  flex: none; display: flex; gap: 10px; padding: 10px 14px calc(10px + var(--seguro-abajo));
  border-top: var(--borde); background: var(--papel);
}
.ficha-pie .btn-principal { flex: 1; }

.foto-cinta { position: relative; margin: 6px 6px 18px; transform: rotate(-1.2deg); }
.foto-cinta img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: var(--borde); border-radius: 6px; box-shadow: var(--sombra); background: var(--smog); }
.foto-cinta::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; margin-left: -55px;
  background: rgba(255, 233, 168, .85); border: 2px solid rgba(46, 42, 68, .35); transform: rotate(3deg); z-index: 1;
}
.foto-credito { font-size: .78rem; color: var(--tinta-suave); margin-top: 8px; text-align: right; transform: rotate(1.2deg); }
.placa {
  position: relative; margin: 4px 0 18px; height: 150px; border: var(--borde); border-radius: var(--radio); box-shadow: var(--sombra);
  display: flex; align-items: center; padding: 0 18px; overflow: hidden;
  font-family: var(--f-titulo); font-weight: 800; font-stretch: 75%; font-size: 4.2rem; line-height: 1;
}
.placa .gn { position: absolute; right: -6px; bottom: -46px; width: 132px; height: auto; }
.placa small { position: absolute; left: 18px; bottom: 12px; font-family: var(--f-texto); font-stretch: 100%; font-size: .8rem; font-weight: 700; color: var(--tinta-suave); }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; margin-left: 8px; font-weight: 800; }
details[open] > summary::after { content: "–"; }

.ficha h2 { font-size: 2rem; font-stretch: 82%; }
.ficha .linea { color: var(--tinta-suave); margin-top: 4px; }
.notas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.nota {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; min-height: 40px;
  border: 2px solid var(--tinta); border-radius: 10px; background: #fff; font-weight: 700; font-size: .92rem; text-decoration: none;
}
.nota svg { width: 18px; height: 18px; }
.nota small { font-weight: 400; color: var(--tinta-suave); }
.nota-rata { background: var(--manteca); }
.ficha .desc { margin-top: 14px; font-size: 1.04rem; }

.seccion { margin-top: 26px; }
.seccion > h3 { font-size: 1.3rem; font-stretch: 85%; margin-bottom: 10px; }

/* El descuento como boleto: borde perforado a la izquierda, % gigante. */
.boleto {
  position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 0;
  border: var(--borde); border-radius: var(--radio); background: var(--papel); box-shadow: var(--sombra);
  margin-bottom: 16px; overflow: hidden;
}
.boleto.no-hoy { box-shadow: var(--sombra-chica); }
.boleto-pct {
  background: var(--laser); color: #fff; display: grid; place-items: center; align-content: center; text-align: center;
  border-right: 3px dashed var(--papel); padding: 10px 4px;
  font-family: var(--f-titulo); font-weight: 800; font-stretch: 75%; font-size: 2.3rem; line-height: .95;
}
.boleto.no-hoy .boleto-pct { background: var(--tinta-suave); }
.boleto-pct small { font-size: .8rem; font-family: var(--f-texto); font-stretch: 100%; font-weight: 700; margin-top: 4px; }
.boleto-cuerpo { padding: 10px 12px 12px; min-width: 0; }
.boleto-banco { font-family: var(--f-titulo); font-weight: 800; font-size: 1.15rem; }
.dias-mini { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.dia-mini { font-size: .78rem; font-weight: 700; border: 1.5px solid var(--tinta); border-radius: 6px; padding: 1px 6px; background: #fff; }
.dia-mini.es-hoy { background: var(--queso); }
.boleto-datos { font-size: .92rem; display: grid; gap: 2px; }
.boleto details { margin-top: 8px; font-size: .9rem; }
.boleto summary { cursor: pointer; font-weight: 700; min-height: 36px; display: flex; align-items: center; }
.boleto .letra { color: var(--tinta-suave); margin-top: 4px; }
.boleto .tarjetas { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.boleto .tarjetas span { font-size: .78rem; border: 1px solid var(--tinta-suave); border-radius: 6px; padding: 0 6px; }
.aviso-banco { font-size: .85rem; color: var(--tinta-suave); margin-top: 6px; }
.consejo { display: flex; gap: 10px; align-items: flex-start; background: var(--manteca); border: 2px solid var(--tinta); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; font-size: .95rem; }
.consejo .ico { margin-top: 2px; }
.respeto { font-size: .8rem; font-weight: 700; background: var(--menta); border: 1.5px solid var(--tinta); border-radius: 999px; padding: 1px 7px; }

/* Calculadora rata */
.calcu { background: var(--celeste); border: var(--borde); border-radius: var(--radio); padding: 14px; }
.calcu label { font-weight: 700; display: block; margin-bottom: 6px; }
.calcu .campo { display: flex; align-items: center; gap: 6px; background: #fff; border: 2px solid var(--tinta); border-radius: 12px; padding: 0 12px; }
.calcu input { border: 0; outline: 0; width: 100%; min-height: 48px; font-size: 1.2rem; font-weight: 700; background: transparent; }
.calcu .resultado { margin-top: 10px; font-size: 1.02rem; }
.calcu .resultado strong { font-family: var(--f-titulo); font-size: 1.5rem; }

/* Plato estrella: la nota de papel manteca pegada con cinta. */
.nota-papel {
  position: relative; background: var(--manteca); border: 2px solid var(--tinta); border-radius: 4px;
  padding: 18px 16px 14px; transform: rotate(1deg); box-shadow: var(--sombra-chica);
}
.nota-papel::before {
  content: ""; position: absolute; top: -11px; left: 22px; width: 70px; height: 20px;
  background: rgba(174, 220, 242, .85); border: 2px solid rgba(46, 42, 68, .3); transform: rotate(-4deg);
}
.nota-papel .plato { font-family: var(--f-titulo); font-weight: 800; font-size: 1.3rem; }

.carta { list-style: none; padding: 0; margin: 0; border: var(--borde); border-radius: var(--radio); overflow: hidden; background: #fff; }
.carta li { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 10px 12px; border-bottom: 2px dashed rgba(46, 42, 68, .25); }
.carta li:last-child { border-bottom: 0; }
.carta .precio { text-align: right; font-weight: 700; white-space: nowrap; }
.carta .precio s { color: var(--tinta-suave); font-weight: 400; font-size: .85rem; display: block; }
.carta .precio .con { color: var(--laser); }

.enlaces { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.enlaces .btn { justify-content: flex-start; font-size: .95rem; min-height: 52px; }

.locales { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.local { border: 2px solid var(--tinta); border-radius: 12px; padding: 10px 12px; background: #fff; display: grid; gap: 6px; }
.local .dir { font-weight: 700; }
.local .acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.local .btn { min-height: 44px; padding: 6px 12px; font-size: .92rem; }
.aprox { font-size: .82rem; color: var(--tinta-suave); }

.votos-resumen { background: var(--menta); border: var(--borde); border-radius: var(--radio); padding: 12px 14px; }
.barra-si { height: 12px; border: 2px solid var(--tinta); border-radius: 999px; background: #fff; overflow: hidden; margin-top: 8px; }
.barra-si i { display: block; height: 100%; background: var(--verde-txt); width: var(--si, 0%); }

/* ==========================================================================
   DIÁLOGOS CHICOS: bancos, voto, bienvenida
   ========================================================================== */
.dlg {
  width: min(560px, 100%); max-height: 92dvh; margin: auto auto 0; padding: 0;
  border: var(--borde); border-bottom: 0; border-radius: 22px 22px 0 0; background: var(--papel);
}
.dlg[open] { display: flex; flex-direction: column; animation: subir var(--t-resp) cubic-bezier(.2, .8, .2, 1); }
.dlg-cab { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px 16px; }
.dlg-cab h2 { flex: 1; font-size: 1.4rem; font-stretch: 85%; }
.dlg-cuerpo { overflow-y: auto; padding: 4px 16px 16px; }
.dlg-pie { display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--seguro-abajo)); border-top: 2px solid var(--tinta); }
.dlg-pie .btn { flex: 1; }

.lista-bancos { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.casilla {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px;
  border: 2px solid var(--tinta); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 700;
}
.casilla input { width: 24px; height: 24px; accent-color: var(--tinta); flex: none; }
.casilla:has(input:checked) { background: var(--queso); }
.casilla .cuantos { margin-left: auto; font-weight: 400; color: var(--tinta-suave); font-size: .9rem; }

.quesos { display: flex; gap: 6px; justify-content: space-between; margin: 10px 0 4px; }
.queso-btn {
  flex: 1; aspect-ratio: 1; max-width: 64px; border: 2px solid var(--tinta); border-radius: 12px; background: #fff;
  display: grid; place-items: center; cursor: pointer; padding: 4px;
}
.queso-btn svg { width: 100%; height: 100%; }
.queso-btn .relleno { fill: #fff; }
.queso-btn.lleno .relleno { fill: var(--queso); }
.queso-btn.lleno { background: var(--manteca); }
.quesos-leyenda { display: flex; justify-content: space-between; font-size: .82rem; color: var(--tinta-suave); }
.pregunta { font-weight: 700; margin: 16px 0 8px; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.opciones .chip[aria-pressed="true"] { background: var(--tinta); color: var(--papel); }
.error-form { color: var(--rojo-txt); font-weight: 700; margin-top: 10px; }

.bienvenida .gn-escena { width: 100%; display: block; }
.bienvenida .escena-marco { border: var(--borde); border-radius: var(--radio); overflow: hidden; line-height: 0; box-shadow: var(--sombra); margin: 4px 0 16px; }
.bienvenida h2 { font-size: 2rem; font-stretch: 80%; margin-bottom: 8px; }
.bienvenida p { margin-bottom: 10px; }

.aviso-toast {
  position: fixed; left: 50%; bottom: calc(var(--alto-tabs) + var(--seguro-abajo) + 14px); z-index: 90;
  transform: translateX(-50%); max-width: calc(100% - 28px);
  background: var(--tinta); color: var(--papel); border-radius: 12px; padding: 12px 16px; font-weight: 700;
  box-shadow: 4px 4px 0 var(--laser);
}

.pie-legal { font-size: .85rem; color: var(--tinta-suave); padding: 10px 2px 0; }
.pie-legal a { font-weight: 700; }

/* ---------- animación propia del guarén ---------- */
.gn .an-brazo { animation: gn-tarjeta 3.2s ease-in-out infinite; transform-origin: 0% 100%; }
@keyframes gn-tarjeta { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-9deg); } 86% { transform: rotate(5deg); } 93% { transform: rotate(-4deg); } }
.gn .gn-led { animation: gn-led 2.6s ease-in-out infinite; }
@keyframes gn-led { 0%, 100% { opacity: 1; } 46% { opacity: 1; } 50% { opacity: .25; } 54% { opacity: 1; } }
.gn-ola { animation: gn-ola 3s linear infinite; }
.gn-ola-lenta { animation: gn-ola 5s linear infinite; }
@keyframes gn-ola { from { transform: translateX(0); } to { transform: translateX(50px); } }

@media (prefers-reduced-motion: reduce) {
  .gn .an-brazo, .gn .gn-led, .gn-ola, .gn-ola-lenta, .radar .barrido { animation: none !important; }
  .hoja, .ficha[open], .dlg[open] { transition: none; animation: none; }
}

/* ==========================================================================
   ESCRITORIO: la hoja se vuelve columna a la izquierda
   ========================================================================== */
@media (min-width: 900px) {
  :root { --alto-tabs: 0px; }
  .tabs { position: fixed; top: 0; right: 12px; left: auto; bottom: auto; height: var(--alto-barra); width: auto;
    display: flex; gap: 4px; border: 0; background: transparent; padding: 0; z-index: 31; }
  .tab { flex-direction: row; gap: 6px; padding: 0 12px; font-size: .95rem; }
  .tab[aria-current="page"]::before { top: 10px; bottom: 10px; height: auto; width: auto; left: 2px; right: 2px; }
  .tab .globo { top: 4px; right: 0; }
  .barra { padding-right: 480px; }
  .hoja { top: calc(var(--alto-barra) + var(--alto-dias)); bottom: 0; left: 0; right: auto; width: 440px; height: auto;
    transform: none !important; border-top: 0; border-right: var(--borde); border-radius: 0; box-shadow: none; }
  .agarre { display: none; }
  .hoja-cab { padding-top: 14px; }
  .mapa { left: 440px; bottom: 0; }
  .vista { bottom: 0; }
  .ficha { width: min(620px, 100%); height: 100dvh; margin: 0 0 0 auto; border-left: var(--borde); }
  .dlg { margin: auto; border-bottom: var(--borde); border-radius: 22px; }
}
