/* Prototipo del feed: pensado para teléfono, una promo por pantalla con scroll vertical. Cada promo es la plantilla
   del generador de creativos (creativos/plantilla.html), copiada más abajo y escalada al ancho de la pantalla. */

/* Fuentes del sistema (macOS e iOS) cargadas por nombre, como en la plantilla: sin descargas */
@font-face { font-family: "Cifra"; src: local("Futura-CondensedExtraBold"), local("AvenirNextCondensed-Heavy"); }
@font-face { font-family: "Texto"; font-weight: 900; src: local("AvenirNext-Heavy"); }
@font-face { font-family: "Texto"; font-weight: 700; src: local("AvenirNext-Bold"); }
@font-face { font-family: "Texto"; font-weight: 600; src: local("AvenirNext-DemiBold"); }
@font-face { font-family: "Texto"; font-weight: 500; src: local("AvenirNext-Medium"); }

:root {
  --oscuro: #0b0b10;
  --claro: #ffffff;
  --suave: rgba(255, 255, 255, 0.82);
  --tenue: rgba(255, 255, 255, 0.6);
  --borde: rgba(255, 255, 255, 0.24);
  --vidrio: rgba(0, 0, 0, 0.3);
  --amarillo: #ffd43b;
  --amarillo-texto: #221a00;
  --panel: #17171f;
  --ancho: 480px;
  --arriba: max(12px, env(safe-area-inset-top));
  --abajo: max(16px, env(safe-area-inset-bottom));
  --izq: max(16px, env(safe-area-inset-left, 0px));
  --der: max(16px, env(safe-area-inset-right, 0px));
  --alto-categorias: 34px; /* la barra de categorías del feed: el aviso y «¿Por qué?» van debajo */
  /* Las de Apple primero, como en la plantilla; en la versión compartible, Nunito Sans y Anton para Android */
  --letra: "Texto", "Avenir Next", "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html,
body {
  margin: 0;
  height: 100%;
  background: var(--oscuro);
  color: var(--claro);
  font: 500 16px/1.35 var(--letra);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- Inicio: elegir la dirección ---------- */
.inicio {
  position: fixed;
  inset: 0;
  max-width: var(--ancho);
  margin: 0 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-block: calc(var(--arriba) + 16px) var(--abajo);
  padding-left: var(--izq);
  padding-right: var(--der);
}
.marca { margin: 0; font-weight: 700; color: var(--amarillo); }
.marca small { font-weight: 600; color: var(--tenue); margin-left: 4px; }
.inicio h1 { margin: 4px 0 0; font-size: 34px; font-weight: 900; line-height: 1.08; letter-spacing: -0.02em; }
.sub { margin: 0; color: var(--suave); }
.form-direccion { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.form-direccion label { font-size: 15px; font-weight: 700; }
.campo { display: flex; gap: 8px; }
.campo input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--borde);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--claro);
  font: inherit;
  font-size: 16px; /* con menos, iOS acerca la pantalla al escribir */
}
.campo input::placeholder { color: var(--tenue); }
.campo input:focus { outline: 2px solid var(--amarillo); outline-offset: 1px; }
.btn-buscar {
  flex: none;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: var(--amarillo);
  color: var(--amarillo-texto);
  font-weight: 900;
}
.sugerencias {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--borde);
  border-radius: 14px;
  overflow: hidden;
}
.sugerencias li + li { border-top: 1px solid var(--borde); }
.sugerencia {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  min-height: 46px;
  padding: 10px 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
}
.sugerencia:active { background: rgba(255, 255, 255, 0.12); }
.sugerencia b { font-weight: 700; }
.sugerencia span { flex: none; color: var(--suave); font-size: 14px; }
.btn-ubicacion {
  min-height: 48px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--claro);
  font-size: 16px;
  font-weight: 700;
}
.aviso-inicio {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--suave);
  font-size: 14px;
}
.o { margin: 8px 0 0; color: var(--tenue); font-size: 14px; }
.comunas .opcion { min-height: 44px; padding: 0 18px; font-size: 15.5px; }
.lista-puntos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.punto {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 14px 16px;
  border: 1px solid var(--borde);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
}
.punto:active { background: rgba(255, 255, 255, 0.12); }
.punto b { font-size: 17px; font-weight: 700; }
.punto span { grid-column: 1; color: var(--suave); font-size: 14px; }
.punto em {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
  color: var(--amarillo);
}
.nota-inicio { margin: auto 0 0; padding-top: 12px; color: var(--tenue); font-size: 12.5px; }

/* ---------- Barra de arriba del feed ---------- */
.barra {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  max-width: var(--ancho);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap; /* la barra de categorías va en una segunda línea */
  align-items: center;
  gap: 8px;
  padding-block: var(--arriba) 10px;
  padding-left: var(--izq);
  padding-right: var(--der);
  pointer-events: none;
}
.barra > * { pointer-events: auto; }
.chip-punto,
.btn-porque,
.btn-panel {
  min-height: 40px;
  border: 0;
  background: var(--vidrio);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-weight: 700;
}
/* El nombre del punto se corta con «…» antes que partir los botones en dos líneas (Manquehue / Apumanque). Con la
   barra en dos líneas, base 0 y tope max-content: si no, el salto de línea mediría el nombre entero y «Guardadas» y el
   panel de B bajarían a la segunda */
.chip-punto {
  flex: 1 1 0;
  max-width: max-content;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 15px;
  white-space: nowrap;
}
#nombre-punto { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.btn-porque { flex: none; padding: 0 14px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.btn-porque[aria-expanded="true"] { background: var(--claro); color: #1c1c1e; }
.btn-panel { position: relative; flex: none; width: 40px; border-radius: 50%; display: grid; place-items: center; }
/* Barra de categorías (14-nov): la segunda línea de la barra, de borde a borde. Se desliza en horizontal sin barra de
   scroll (pan-x: no toca el scroll vertical de A ni el arrastre de B) */
.categorias {
  position: relative; /* el offsetLeft de los chips, desde la fila */
  flex: 0 0 calc(100% + var(--izq) + var(--der));
  display: flex;
  gap: 6px;
  margin-inline: calc(-1 * var(--izq)) calc(-1 * var(--der));
  padding-inline: var(--izq) var(--der);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
}
.categorias::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: none;
  height: var(--alto-categorias);
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--vidrio);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.cat-chip[aria-pressed="true"] { background: var(--amarillo); color: var(--amarillo-texto); }
/* Cuántos filtros hay puestos */
.insignia {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--amarillo);
  color: var(--amarillo-texto);
  font-size: 11.5px;
  font-weight: 900;
  line-height: 19px;
  text-align: center;
}

/* ---------- El feed: una promo por pantalla ---------- */
.feed {
  position: fixed;
  inset: 0;
  max-width: var(--ancho);
  margin: 0 auto;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  outline: none;
}
.feed::-webkit-scrollbar { display: none; }
.promo {
  position: relative;
  height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: var(--fondo, var(--oscuro));
}
.escena-video {
  position: absolute;
  left: var(--x, 0px);
  top: var(--y, 0px);
  width: calc(1080px * var(--s, 0.35));
  height: calc(1920px * var(--s, 0.35));
  object-fit: cover;
}

/* Pie de cada promo: va sobre la franja de abajo del lienzo, que en la plantilla es solo decoración */
.pie {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-block: 10px var(--abajo);
  padding-left: var(--izq);
  padding-right: var(--der);
}
.pie-info { min-height: 26px; display: flex; align-items: center; gap: 6px; overflow: hidden; }
.pastilla {
  min-width: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pastilla-nueva { flex: none; background: var(--claro); color: #1c1c1e; font-weight: 700; }
.acciones { display: flex; gap: 10px; }
.pedir,
.compartir {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}
.pedir {
  flex: 1;
  background: var(--claro);
  color: #1c1c1e;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.compartir {
  gap: 6px;
  padding: 0 16px;
  border: 1px solid var(--borde);
  background: rgba(0, 0, 0, 0.3);
  color: var(--claro);
  font-size: 15px;
}

/* «¿Por qué?»: la cuenta del ranker para la promo en pantalla */
.detalle {
  position: fixed;
  top: calc(var(--arriba) + 64px + var(--alto-categorias));
  left: var(--izq);
  right: var(--der);
  z-index: 6;
  max-width: 456px;
  max-height: 62%;
  margin: 0 auto;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--borde);
  border-radius: 16px;
  background: rgba(12, 12, 16, 0.95);
  font-size: 13px;
}
.detalle dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 10px; margin: 0; }
.detalle dt { color: var(--tenue); font-weight: 700; }
.detalle dd { margin: 0; }

.fin {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 24px;
  padding-left: var(--izq);
  padding-right: var(--der);
  text-align: center;
}
.fin-emoji { margin: 0; font-size: 64px; }
.fin h2 { margin: 8px 0 4px; }
.fin p { color: var(--suave); }
.fin button,
.btn-sec {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--borde);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
}
.btn-sec:disabled { opacity: 0.4; cursor: default; }
.fin-botones { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.fin [data-accion="limpiar"] { border-color: var(--claro); background: var(--claro); color: #1c1c1e; }

/* ---------- Plantilla del generador (creativos/plantilla.html), en coordenadas de 1080×1920 ---------- */
.lienzo {
  --tinta: #1C1C1E;
  --gris: #6E6E73;
  --cifra: "Cifra", "Anton", "Impact", "Arial Black", sans-serif;
  --texto: "Texto", "Avenir Next", "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
  position: absolute;
  left: 0;
  top: 0;
  width: 1080px;
  height: 1920px;
  overflow: hidden;
  transform-origin: 0 0;
  transform: translate(var(--x, 0px), var(--y, 0px)) scale(var(--s, 0.35));
  font-family: var(--texto);
  font-weight: 400;
  line-height: normal;
  color: var(--tinta);
  background: var(--fondo);
  user-select: none;
}
.lienzo .fondo { position: absolute; inset: 0;
  background: radial-gradient(110% 62% at 50% 36%, var(--fondo2) 0%, var(--fondo) 68%); }
.lienzo .rayos { position: absolute; left: -210px; top: -80px; width: 1500px; height: 1500px;
  background: repeating-conic-gradient(from var(--giro), rgba(255,255,255,.085) 0deg 6deg, rgba(255,255,255,0) 6deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 0px, #000 300px, transparent 720px);
  mask-image: radial-gradient(circle, #000 0px, #000 300px, transparent 720px); }
.lienzo .puntos { position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.13) 3px, transparent 3.6px);
  background-size: 46px 46px; background-position: var(--desfase) 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 22%, transparent 70%, #000 100%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 22%, transparent 70%, #000 100%); }
.lienzo .deco { position: absolute; left: -40px; right: -40px; top: 1468px; text-align: center; white-space: nowrap;
  font-family: var(--cifra); line-height: 1; letter-spacing: .01em; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 4px rgba(255,255,255,.17); }
.lienzo .ilustracion { position: absolute; left: 250px; top: 380px; width: 580px; height: 580px;
  filter: drop-shadow(0 34px 34px rgba(0,0,0,.30)); }
.lienzo .ilustracion img { width: 100%; height: 100%; object-fit: contain; }

.lienzo .kicker { position: absolute; top: 92px; left: 64px; right: 64px; display: flex; justify-content: center;
  white-space: nowrap; gap: 18px; font-weight: 600; font-size: 31px; letter-spacing: .13em; text-transform: uppercase;
  color: rgba(255,255,255,.94); }
.lienzo .kicker i { font-style: normal; opacity: .6; }
.lienzo .referencial { position: absolute; right: 70px; top: 900px; font-weight: 500; font-size: 24px;
  letter-spacing: .02em; color: rgba(255,255,255,.92); background: rgba(0,0,0,.24); padding: 6px 16px 7px;
  border-radius: 16px; }

.lienzo .numero { position: absolute; left: 0; right: 0; text-align: center; color: #FFFFFF; transform-origin: 50% 62%; }
.lienzo .numero .hasta { font-weight: 900; font-size: 60px; letter-spacing: .16em; line-height: 1; margin-bottom: -6px;
  text-shadow: 0 5px 0 rgba(0,0,0,.20); }
.lienzo .numero .cifra { font-family: var(--cifra); line-height: .86; white-space: nowrap;
  text-shadow: 0 12px 0 rgba(0,0,0,.20), 0 18px 40px rgba(0,0,0,.22); }
.lienzo .numero .valor { font-size: 330px; letter-spacing: -.01em; }
.lienzo .numero .menos, .lienzo .numero .pct { font-size: 190px; vertical-align: 92px; }
.lienzo .numero .menos { margin-right: -14px; }

.lienzo .tarjeta { position: absolute; left: 48px; right: 48px; bottom: 466px; background: #FFFFFF; border-radius: 46px;
  padding: 40px 50px 36px; box-shadow: 0 30px 70px rgba(0,0,0,.30); }
.lienzo .local { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; font-size: 32px; }
.lienzo .local .nombre { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gris);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lienzo .local .nota { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--tinta);
  white-space: nowrap; }
.lienzo .local .nota svg { width: 30px; height: 30px; margin-top: -4px; }
.lienzo .local .nota em { font-style: normal; color: var(--gris); font-weight: 500; }
.lienzo .principal { margin-top: 12px; font-weight: 900; line-height: 1.06; letter-spacing: -.005em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lienzo .precios { margin-top: 18px; display: flex; align-items: baseline; gap: 26px; }
.lienzo .precio { font-weight: 900; font-size: 104px; line-height: 1; letter-spacing: -.015em; color: var(--acento); }
.lienzo .antes { position: relative; font-weight: 600; font-size: 52px; color: #8E8E93; line-height: 1; }
.lienzo .linea { position: absolute; left: -10px; right: -10px; top: 46%; height: 8px; margin-top: -4px;
  background: #E11D48; border-radius: 4px; transform: rotate(-7deg); }
.lienzo .total { margin-top: 10px; font-weight: 600; font-size: 34px; color: #3A3A3C; }
.lienzo .condiciones { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.lienzo .condiciones div { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 42px;
  color: var(--acento); }
.lienzo .condiciones svg { width: 40px; height: 40px; flex: none; }
.lienzo .chips { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px; }
.lienzo .chip { height: 66px; padding: 0 26px; border-radius: 33px; background: #F2F2F5; display: inline-flex;
  align-items: center; gap: 12px; font-weight: 600; font-size: 33px; white-space: nowrap; }
.lienzo .chip svg { width: 34px; height: 34px; }
.lienzo .chip.app { background: var(--tinta); color: #FFFFFF; font-weight: 700; }
.lienzo .letra-chica { margin-top: 22px; font-weight: 500; font-size: 25px; line-height: 1.3; color: var(--gris); }

/* ---------- Panel «Personaliza tu feed»: filtros y, plegado, «Cómo se ordena» ---------- */
.panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}
.hoja {
  width: 100%;
  max-width: var(--ancho);
  max-height: 86%;
  overflow-y: auto;
  padding-top: 16px; /* el de abajo lo pone .hoja-pie, que queda pegado al borde */
  padding-left: var(--izq);
  padding-right: var(--der);
  border-radius: 20px 20px 0 0;
  background: var(--panel);
}
.hoja-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hoja h2 { margin: 0; font-size: 20px; font-weight: 900; }
.hoja h3 { margin: 18px 0 6px; font-size: 15px; font-weight: 700; }
.cerrar { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.hoja-cab + .panel-nota { margin-top: 6px; }

.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.opcion {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 14.5px;
  font-weight: 600;
}
.opcion small { margin-left: 2px; color: var(--tenue); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.opcion[aria-pressed="true"] { border-color: var(--amarillo); background: var(--amarillo); color: var(--amarillo-texto); }
.opcion[aria-pressed="true"] small { color: rgba(34, 26, 0, 0.7); }
.opcion:disabled { opacity: 0.35; cursor: default; }
.filtro-vacio {
  flex-basis: 100%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 212, 59, 0.12);
  color: var(--amarillo);
  font-size: 13.5px;
}

.como { margin-top: 20px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.como summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  list-style: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.como summary::-webkit-details-marker { display: none; }
.como summary::before { content: "▸"; color: var(--tenue); transition: transform 0.15s; }
.como[open] summary::before { transform: rotate(90deg); }

/* «Limpiar» y «Ver N promos», siempre a la vista al fondo del panel */
.hoja-pie {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px calc(-1 * var(--der)) 0 calc(-1 * var(--izq));
  padding-block: 12px var(--abajo);
  padding-left: var(--izq);
  padding-right: var(--der);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--panel);
}
.hoja-pie .btn-sec { min-height: 50px; border-radius: 999px; }
.btn-ver {
  flex: 1;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: var(--claro);
  color: #1c1c1e;
  font-size: 16px;
  font-weight: 900;
}
.btn-ver:disabled { background: rgba(255, 255, 255, 0.14); color: var(--tenue); cursor: default; }
.formula {
  margin: 10px 0 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  font: 600 13.5px/1.3 ui-monospace, Menlo, monospace;
}
.panel-nota { margin: 0 0 6px; font-size: 13px; color: var(--tenue); }
.afinidades { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.afinidades li {
  display: grid;
  grid-template-columns: minmax(0, 10.5em) 1fr 5.4em;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}
.afinidades .cat { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afinidades .num { text-align: right; font-variant-numeric: tabular-nums; }
.afinidades small { color: var(--tenue); }
.barra-af { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.barra-af i { display: block; height: 100%; border-radius: 4px; background: var(--amarillo); }
.fila { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; font-size: 14px; }
.fila select {
  margin-left: 6px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--borde);
  border-radius: 8px;
  background: #22222c;
  color: var(--claro);
  font: inherit;
}
.check { display: flex; align-items: center; gap: 6px; }
.check input { width: 18px; height: 18px; }
.eventos { margin: 4px 0 12px; padding-left: 0; list-style: none; font-size: 12.5px; color: var(--suave); }
.eventos li { padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.eventos time { color: var(--tenue); font-variant-numeric: tabular-nums; margin-right: 4px; }

/* «Pedir» la primera vez: la hoja del correo */
.hoja-correo .rotulo { display: block; margin: 14px 0 6px; font-size: 15px; font-weight: 700; }
.campo-correo {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--borde);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--claro);
  font: inherit;
  font-size: 16px; /* con menos, iOS acerca la pantalla al escribir */
}
.campo-correo:focus { outline: 2px solid var(--amarillo); outline-offset: 1px; }
.correo-error { margin: 8px 0 0; color: #ffb4a8; font-size: 14px; }
.casilla { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 4px; font-size: 15px; line-height: 1.35; }
.casilla input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--amarillo); }
.casilla-nota { margin-left: 32px; }
/* «Promos por correo» en el panel: un checkbox con forma de interruptor */
.interruptor { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 15px; cursor: pointer; }
.interruptor input {
  flex: none;
  appearance: none;
  position: relative;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.15s;
}
.interruptor input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--claro);
  transition: transform 0.15s;
}
.interruptor input:checked { background: var(--amarillo); }
.interruptor input:checked::after { transform: translateX(18px); }
.interruptor input:focus-visible { outline: 2px solid var(--amarillo); outline-offset: 2px; }
.interruptor input:disabled { opacity: 0.5; }
.correo-estado { margin: 0 0 8px; font-size: 14px; color: var(--suave); overflow-wrap: anywhere; }
.correo-estado .validado { color: #8ce99a; font-weight: 700; }
/* Entrar con Google (14-nov): «o» y el botón oficial (o el de prueba con api.py --dev) */
.google { margin: 12px 0 0; }
.o-google { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; color: var(--tenue); font-size: 14px; }
.o-google::before,
.o-google::after { content: ""; flex: 1; height: 1px; background: var(--borde); }
.boton-google { display: flex; justify-content: center; min-height: 44px; }
.mi-correo .boton-google { justify-content: flex-start; }
.btn-google-dev {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid #dadce0;
  border-radius: 999px;
  background: #fff;
  color: #1f1f1f;
  font-size: 15px;
  font-weight: 600;
}
.google-ok { margin: 10px 0 0; color: #8ce99a; font-size: 15px; font-weight: 700; }
.botones-correo { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.aviso-boton {
  margin-left: 6px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--claro);
  color: #1c1c1e;
  font-weight: 800;
}
#enlace-app a { color: var(--amarillo); }

.aviso {
  position: fixed;
  top: calc(var(--arriba) + 60px + var(--alto-categorias));
  left: 50%;
  z-index: 30;
  width: min(calc(100% - 32px), 448px);
  transform: translateX(-50%);
  padding: 12px 14px;
  border: 1px solid var(--borde);
  border-radius: 14px;
  background: rgba(20, 20, 26, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-size: 14px;
}

/* ---------- Variante B del A/B: el mazo para deslizar (deslizar.js) ---------- */
.feed.mazo { overflow: hidden; scroll-snap-type: none; overscroll-behavior: none; }
/* Cada promo es una tarjeta entre la barra y los botones; solo se ven la del frente y la que asoma detrás */
.mazo > .promo {
  position: absolute;
  top: var(--carta-arriba, 64px);
  bottom: var(--carta-abajo, 96px);
  left: 10px;
  right: 10px;
  height: auto;
  border-radius: 22px;
  visibility: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease-out, filter 0.2s ease-out;
}
.mazo > .promo.frente { visibility: visible; z-index: 2; cursor: grab; }
/* La de atrás asoma por abajo: escalada desde su borde inferior y corrida hacia abajo */
.mazo > .promo.detras {
  visibility: visible;
  z-index: 1;
  transform-origin: 50% 100%;
  transform: translateY(12px) scale(0.94);
  filter: brightness(0.6);
}
.mazo > .promo.arrastrando { transition: none; cursor: grabbing; }
.mazo > .promo.vuela { transition: transform 0.3s ease-in, opacity 0.3s ease-in; }
.mazo > .promo.fin { background: var(--panel); }
.mazo .pie { padding-bottom: 12px; }
/* «Me encanta, ir a la promo» (12-nov): amarillo, para que no se confunda con ♥ guardar */
.mazo .pedir-b { background: var(--amarillo); color: var(--amarillo-texto); }
.mazo img { -webkit-user-drag: none; }
.sello {
  position: absolute;
  top: 26px;
  z-index: 3;
  padding: 4px 12px;
  border: 4px solid;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
}
.sello-guardar { left: 20px; color: #8ce99a; transform: rotate(-12deg); }
/* Pista de la primera tarjeta (12-nov): una flecha a cada lado, a la altura de la ilustración, moviéndose hacia afuera */
.pista {
  position: absolute;
  top: 36%;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  pointer-events: none;
}
.pista span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}
.pista-izq { color: #ff8787; animation: pista-izq 1.4s ease-in-out infinite; }
.pista-der { color: #8ce99a; animation: pista-der 1.4s ease-in-out infinite; }
@keyframes pista-izq { 50% { transform: translateX(-7px); } }
@keyframes pista-der { 50% { transform: translateX(7px); } }
.sello-descartar { right: 20px; color: #ff8787; transform: rotate(12deg); }
.controles-b {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  max-width: var(--ancho);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 10px var(--der) var(--abajo) var(--izq);
}
#feed[hidden] ~ .controles-b { display: none; }
.btn-ronda {
  flex: none;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--borde);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 26px;
  line-height: 1;
}
.btn-ronda.descartar { color: #ff8787; }
.btn-ronda.guardar { border-color: var(--claro); background: var(--claro); color: #e03131; }
.btn-ronda:disabled,
.controles-b .compartir[aria-disabled="true"] { opacity: 0.35; pointer-events: none; }
.btn-guardadas {
  flex: none;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--vidrio);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.btn-guardadas span[aria-hidden] { color: #ff8787; }
.lista-guardadas {
  list-style: none;
  margin: 12px 0 0;
  padding: 0 0 var(--abajo);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#hoja-invitacion .lista-guardadas { padding-bottom: 0; }
.guardada {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--borde);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}
.guardada-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.guardada-txt b { font-size: 16px; }
.guardada-txt span { color: var(--suave); font-size: 14px; }
.guardada-txt small { color: var(--tenue); font-size: 12.5px; }
.guardada-botones { display: flex; gap: 8px; }
.guardada-botones .pedir { min-height: 44px; font-size: 15px; box-shadow: none; }
.lista-guardadas .vacia { color: var(--suave); font-size: 14px; }
.fin .ver-guardadas { border-color: var(--amarillo); background: var(--amarillo); color: var(--amarillo-texto); }
@media (prefers-reduced-motion: reduce) {
  .mazo > .promo,
  .mazo > .promo.vuela { transition: none; }
  .pista span { animation: none; }
}
