/* La portada (templates/index.html). Va aparte de style.css, que comparten las demás páginas públicas, y usa
   sus mismos colores: tinta, papel y oro, los de la tarjeta.

   La idea: la tarjeta de verdad manda. Sale tal cual se imprime (static/img/tarjeta/, de cuatropuntos/diseno/tarjeta.py
   --web), se da la vuelta al pasar el ratón o al tocarla, y de ella salen los motivos del resto de la página:
   las ondas doradas del reverso, la raya de oro bajo PUN/TOS, «Suma aquí. Gasta allí.» y los cuatro puntos.

   Todo lo que se mueve es un añadido: sin JavaScript, o con «reducir movimiento», la página está entera y quieta
   (la tarjeta gira igual con el ratón encima). */

:root {
  --p-grano: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
  --p-muelle: cubic-bezier(0.3, 1.3, 0.4, 1);     /* el giro de la tarjeta: se pasa un pelín y vuelve, como el plástico */
  --p-suave: cubic-bezier(0.2, 0.7, 0.1, 1);
  --p-tique: #FFFDF6;
  --p-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
}

/* --- 1. Arriba: el titular y la tarjeta --- */
.p-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 55% 60% at 74% 55%, rgba(214, 162, 49, 0.16), transparent 70%),
    var(--ink);
  color: var(--paper-white);
  /* Entera en la primera pantalla, contando la barra de arriba (unos 82 px): con la de marcadores del navegador
     puesta, los botones se quedaban cortados abajo. Por eso el titular y la tarjeta encogen también con el alto.
     Y 36 px más: las tarjetas de debajo (.entries) suben 28 sobre ella, y sin eso asomaban cortadas por abajo. O se
     ven enteras o no se ven */
  --p-aire: clamp(24px, 4.5vh, 72px);
  display: grid;
  align-items: center;
  min-height: calc(100vh - 82px + 36px);
  min-height: calc(100svh - 82px + 36px);
  padding: var(--p-aire) 0 calc(var(--p-aire) + 36px);     /* así queda centrada en lo que se ve */
}
/* Un grano muy fino, como el de una tarjeta impresa: la tinta lisa de una pantalla parece plástico barato */
.p-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--p-grano);
  opacity: 0.06;
  pointer-events: none;
}
/* El texto, más ancho que la tarjeta (que no pasa de 290 px): con menos, a 1366 de ancho los dos botones no cabían
   en una fila y el segundo bajaba, cortado por abajo */
.p-hero-grid {
  width: 100%;                /* dentro de .p-hero, que es una rejilla, el margin: auto de .wrap la encogía */
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.p-hero-texto { min-width: 0; }

/* El titular va en líneas cortas y apretadas, como PUN / TOS en la tarjeta, con su raya de oro debajo */
.p-titular {
  font-weight: 800;
  font-size: clamp(40px, min(6.2vw, 9.4vh), 86px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin: 0 0 26px;
}
.p-titular span { display: block; }
.p-titular-final {
  position: relative;
  width: fit-content;
  padding-bottom: 14px;
}
.p-titular-final::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--gold);
  transform-origin: left center;
  animation: p-raya 1.1s 0.35s var(--p-suave) both;
}
@keyframes p-raya { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Los cuatro puntos del botón se van llenando al pasar por encima, uno detrás de otro */
.p-btn-puntos { gap: 12px; white-space: nowrap; }
.p-btn-puntos .bd { width: 11px; height: 11px; border-color: var(--ink); transition: background-color 0.18s ease; }
.p-btn-puntos .bd-fill { background: var(--ink); }
.p-btn-puntos:hover .bd { background: var(--ink); }
.p-btn-puntos .bd:nth-child(2) { transition-delay: 0.06s; }
.p-btn-puntos .bd:nth-child(3) { transition-delay: 0.12s; }
.p-btn-puntos .bd:nth-child(4) { transition-delay: 0.18s; }

/* Tres datos, separados como los cortes de un talonario */
.p-datos {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: 16px;
  color: rgba(251, 250, 243, 0.78);
}
.p-datos li {
  padding: 4px 18px 4px 0;
  margin-right: 18px;
  border-right: 1.5px dashed rgba(241, 239, 225, 0.28);
  font-variant-numeric: tabular-nums;
}
.p-datos li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.p-datos strong { color: var(--gold); font-weight: 700; font-size: 18px; margin-right: 2px; }

/* La escena de la tarjeta: perspectiva, las ondas detrás y la sombra en el suelo */
.p-escena {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  perspective: 1400px;
  padding: 12px 0 0;
}
.p-escena::after {          /* la sombra en el «suelo», que se encoge cuando la tarjeta se levanta al girar */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: clamp(160px, 20vw, 230px);
  height: 26px;
  margin-left: calc(clamp(160px, 20vw, 230px) / -2);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), transparent);
  filter: blur(6px);
  z-index: -1;
  transition: transform 0.9s var(--p-suave), opacity 0.9s var(--p-suave);
}
.p-escena:has(.p-tarjeta.girada)::after { transform: scale(0.82); opacity: 0.7; }

/* Las ondas del reverso de la tarjeta, saliendo de detrás como la señal al acercarla */
.p-ondas {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0;
  height: 0;
  z-index: -1;
  pointer-events: none;
}
.p-ondas i {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(300px, 38vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  translate: -50% -50%;
  opacity: 0;
  animation: p-onda 7.2s cubic-bezier(0.2, 0.6, 0.35, 1) infinite;
}
.p-ondas i:nth-child(2) { animation-delay: 1.8s; }
.p-ondas i:nth-child(3) { animation-delay: 3.6s; }
.p-ondas i:nth-child(4) { animation-delay: 5.4s; }
@keyframes p-onda {
  0% { transform: scale(0.35); opacity: 0; }
  12% { opacity: 0.55; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* La tarjeta: un botón (se le da la vuelta con el ratón, el dedo o el teclado). Las medidas, las de una CR80 */
.p-tarjeta {
  --rx: 0deg;
  --ry: 0deg;
  --brillo: 0%;               /* quieta, sin brillo: la franja está fuera de la tarjeta hasta que el ratón la mueve */
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  width: clamp(200px, min(23vw, 39vh), 290px);
  aspect-ratio: 54 / 85.6;
  border-radius: 5.9% / 3.7%;
  transform-style: preserve-3d;
  transform: rotate(-6deg) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.6s var(--p-suave);
  animation: p-flota 7s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.p-tarjeta:focus-visible { outline: 3px solid var(--gold); outline-offset: 10px; }
@keyframes p-flota {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}
.p-tarjeta-giro {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.95s var(--p-muelle);
}
.p-tarjeta.girada .p-tarjeta-giro { transform: rotateY(180deg) translateZ(1px); }
/* Sin JavaScript, que gire igual con el ratón encima o al llegar con el teclado */
html:not(.js) .p-tarjeta:hover .p-tarjeta-giro,
html:not(.js) .p-tarjeta:focus-visible .p-tarjeta-giro { transform: rotateY(180deg); }

.p-cara {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 5.9% / 3.7%;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 2px 4px rgba(0, 0, 0, 0.25),
    0 18px 30px -8px rgba(0, 0, 0, 0.45),
    0 40px 70px -20px rgba(0, 0, 0, 0.55);
}
.p-cara img { display: block; width: 100%; height: 100%; }
.p-cara-reverso { transform: rotateY(180deg); }
/* El brillo del plástico: una franja de luz muy floja que solo cruza la tarjeta al moverla con el ratón. Antes se
   veía siempre y fuerte, y la tarjeta parecía de charol */
.p-cara::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.07) 48%, rgba(255, 255, 255, 0.02) 53%, transparent 60%);
  background-size: 260% 100%;
  background-position: var(--brillo) 0;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: background-position 0.25s linear;
}
.p-cara-reverso::after { mix-blend-mode: multiply; opacity: 0.25; }

.p-pista {
  margin: 4px 0 0;
  font-size: 15px;
  color: rgba(251, 250, 243, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
}
.p-pista::before {
  content: "↻";
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
}
.p-pista-dedo { display: none; }
@media (hover: none) {
  .p-pista-raton { display: none; }
  .p-pista-dedo { display: inline; }
}

/* --- 3. Cómo funciona, con el ticket --- */
.p-como {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.p-como-texto { min-width: 0; }
.p-pasos { list-style: none; margin: 18px 0 0; padding: 0; }
.p-pasos li {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  font-size: 19px;
}
.p-pasos li:last-child { border-bottom: 1px solid var(--line); }
.p-pasos strong { font-family: var(--font-display); font-weight: 700; }
.p-nota { font-size: 16px; margin: 18px 0 0; max-width: 56ch; }

/* Los puntos de cada paso se llenan al llegar a verlos: primero el uno, luego el dos, luego los cuatro */
.js .p-pasos:not(.visto) .bd-fill { background: transparent; border-color: var(--ink); }
.p-pasos.visto .bd-fill { animation: p-llena 0.45s var(--p-muelle) backwards; }
.p-pasos.visto li:nth-child(1) .bd:nth-child(1) { animation-delay: 0.1s; }
.p-pasos.visto li:nth-child(2) .bd:nth-child(1) { animation-delay: 0.45s; }
.p-pasos.visto li:nth-child(2) .bd:nth-child(2) { animation-delay: 0.55s; }
.p-pasos.visto li:nth-child(3) .bd:nth-child(1) { animation-delay: 0.9s; }
.p-pasos.visto li:nth-child(3) .bd:nth-child(2) { animation-delay: 1s; }
.p-pasos.visto li:nth-child(3) .bd:nth-child(3) { animation-delay: 1.1s; }
.p-pasos.visto li:nth-child(3) .bd:nth-child(4) { animation-delay: 1.2s; }
@keyframes p-llena {
  from { transform: scale(0.3); background: transparent; border-color: var(--ink); }
  to { transform: scale(1); }
}

/* El ticket de caja, con sus dientes de papel arriba y abajo, y el sello de los puntos encima */
.p-ticket {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 340px);
  padding: 18px 0 54px;
}
.p-ticket-papel {
  background: var(--p-tique);
  color: var(--ink);
  font-family: var(--p-mono);
  font-size: 14.5px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  padding: 30px 26px 36px;
  transform: rotate(1.6deg);
  filter: drop-shadow(0 14px 22px rgba(24, 42, 34, 0.16)) drop-shadow(0 2px 3px rgba(24, 42, 34, 0.12));
  -webkit-mask:
    radial-gradient(circle at 6px 0, transparent 5px, #000 5.6px) top / 12px 51% repeat-x,
    radial-gradient(circle at 6px 100%, transparent 5px, #000 5.6px) bottom / 12px 51% repeat-x;
  mask:
    radial-gradient(circle at 6px 0, transparent 5px, #000 5.6px) top / 12px 51% repeat-x,
    radial-gradient(circle at 6px 100%, transparent 5px, #000 5.6px) bottom / 12px 51% repeat-x;
}
.p-ticket-papel p { margin: 0; }
.p-ticket-cabecera { text-align: center; font-weight: 700; letter-spacing: 0.12em; }
.p-ticket-cabecera small { font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; }
.p-ticket-fecha {
  display: flex;
  justify-content: space-between;
  margin: 14px 0 10px !important;
  padding-bottom: 10px;
  border-bottom: 1.5px dashed rgba(24, 42, 34, 0.35);
  font-size: 13px;
  color: var(--ink-soft);
}
.p-ticket-papel ul { list-style: none; margin: 0; padding: 0; }
.p-ticket-papel li { display: flex; gap: 6px; font-variant-numeric: tabular-nums; }
.p-ticket-papel li span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.p-ticket-papel li span:first-child::after { content: " ........................................................"; color: rgba(24, 42, 34, 0.4); }
.p-ticket-total {
  display: flex;
  justify-content: space-between;
  margin-top: 12px !important;
  padding-top: 10px;
  border-top: 3px double rgba(24, 42, 34, 0.55);
  font-weight: 700;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.p-ticket-pie { margin-top: 18px !important; text-align: center; font-size: 11.5px; letter-spacing: 0.08em; color: var(--ink-soft); }

/* El sello: tinta de tampón, un poco torcido y con los bordes gastados */
.p-sello {
  position: absolute;
  right: -26px;
  bottom: -14px;
  display: grid;
  justify-items: center;
  padding: 10px 16px 8px;
  border: 3px solid var(--gold-dark);
  border-radius: 10px;
  outline: 1.5px solid var(--gold-dark);
  outline-offset: 3px;
  color: var(--gold-dark);
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 1.05;
  transform: rotate(-11deg);
  mix-blend-mode: multiply;
  opacity: 0.92;
  background: rgba(214, 162, 49, 0.08);
}
.p-sello small { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; }
.p-sello strong { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
/* Al verlo entero, el ticket se «imprime»: las líneas una detrás de otra y el total; el sello cae al final, con un
   golpe en el papel. Antes caía en cuanto asomaba el ticket y no daba tiempo a verlo */
.js .p-ticket:not(.visto) :is(.p-ticket-papel li, .p-ticket-total, .p-ticket-pie, .p-sello) { opacity: 0; }
.p-ticket.visto :is(.p-ticket-papel li, .p-ticket-total, .p-ticket-pie) { animation: p-imprime 0.4s ease-out backwards; }
.p-ticket.visto .p-ticket-papel li:nth-child(1) { animation-delay: 0.2s; }
.p-ticket.visto .p-ticket-papel li:nth-child(2) { animation-delay: 0.5s; }
.p-ticket.visto .p-ticket-papel li:nth-child(3) { animation-delay: 0.8s; }
.p-ticket.visto .p-ticket-total { animation-delay: 1.15s; }
.p-ticket.visto .p-ticket-pie { animation-delay: 1.4s; }
.p-ticket.visto .p-sello { animation: p-sello 0.6s 1.9s cubic-bezier(0.2, 1.6, 0.4, 1) backwards; }
.p-ticket.visto .p-ticket-papel { animation: p-golpe 0.35s 2.15s ease-out; }
@keyframes p-imprime { from { opacity: 0; transform: translateY(-5px); } }
@keyframes p-sello {
  from { opacity: 0; transform: rotate(-3deg) scale(1.9); }
  to { opacity: 0.92; transform: rotate(-11deg) scale(1); }
}
@keyframes p-golpe {
  0%, 100% { transform: rotate(1.6deg); }
  35% { transform: rotate(1.6deg) translateY(3px) scale(0.995); }
}

/* --- 4. El circuito: la moneda va de la panadería a ti, se para, y sigue a la carnicería --- */
.p-circuito-dibujo { position: relative; max-width: 760px; margin: 0 auto 32px; }
.p-circuito-nodos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; position: relative; z-index: 1; }
.p-circuito-via {
  position: absolute;
  left: calc(100% / 6);
  right: calc(100% / 6);
  top: calc(clamp(44px, 6vw, 68px) / 2);
  border-top: 2px dashed rgba(214, 162, 49, 0.55);
  z-index: 0;
}
.p-circuito-via-moneda { border: 0; z-index: 2; }
.p-moneda {
  position: absolute;
  top: -15px;
  left: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 0 0 4px rgba(214, 162, 49, 0.22), 0 4px 10px rgba(0, 0, 0, 0.35);
  translate: -50% 0;
  animation: p-viaje 6s var(--p-suave) infinite;
}
@keyframes p-viaje {
  0% { left: 0; opacity: 0; transform: scale(0.6); }
  6% { opacity: 1; transform: scale(1); }
  34% { left: 50%; transform: scale(1); }
  40% { left: 50%; transform: scale(1.25); }
  52% { left: 50%; transform: scale(1); }
  86% { left: 100%; opacity: 1; transform: scale(1); }
  96%, 100% { left: 100%; opacity: 0; transform: scale(0.6); }
}
.p-circuito .circuit-dot { background: var(--ink); position: relative; }
.p-circuito .circuit-dot-fill { background: var(--gold); }

/* --- 6. El lema, en grande --- */
.p-lema {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
  color: var(--paper-white);
  padding: clamp(64px, 10vw, 140px) 0;
}
.p-lema::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--p-grano);
  opacity: 0.06;
}
.p-lema-texto {
  margin: 0;
  font-weight: 800;
  font-size: clamp(52px, 10vw, 150px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  max-width: 9ch;
}
.p-lema-texto span { display: block; }
.p-lema-oro { color: var(--gold); }
.p-lema-sub { margin: 28px 0 0; font-size: 18px; color: rgba(251, 250, 243, 0.7); }
/* Las ondas, como en la tarjeta: salen de la esquina de abajo a la derecha, con el círculo de oro */
.p-lema-ondas {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  z-index: -1;
}
.p-lema-ondas i {
  position: absolute;
  left: 0;
  top: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  border: 1.5px solid var(--gold);
}
.p-lema-ondas i:nth-child(1) { width: clamp(150px, 22vw, 320px); background: var(--gold); border: 0; }
.p-lema-ondas i:nth-child(2) { width: clamp(250px, 36vw, 520px); opacity: 0.75; }
.p-lema-ondas i:nth-child(3) { width: clamp(350px, 50vw, 720px); opacity: 0.55; }
.p-lema-ondas i:nth-child(4) { width: clamp(450px, 64vw, 920px); opacity: 0.38; }
.p-lema-ondas i:nth-child(5) { width: clamp(550px, 78vw, 1120px); opacity: 0.22; }
.p-lema-ondas i:nth-child(n+2) { animation: p-respira 6s ease-in-out infinite; }
.p-lema-ondas i:nth-child(3) { animation-delay: 0.4s; }
.p-lema-ondas i:nth-child(4) { animation-delay: 0.8s; }
.p-lema-ondas i:nth-child(5) { animation-delay: 1.2s; }
@keyframes p-respira {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

/* --- 7. Las tiendas: su web y cómo llegar, uno al lado del otro --- */
.p-tienda-enlaces { margin-top: auto; display: flex; flex-wrap: wrap; column-gap: 22px; }
.p-tienda-enlaces .store-map { margin-top: 0; }

/* --- 10. Hazte socio: las formas de conseguirla, como las líneas de un folleto, y al lado el cupón --- */
.p-socio {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}
.p-socio-texto { min-width: 0; }
.p-formas { list-style: none; margin: 30px 0 0; padding: 0; }
.p-formas li {
  display: grid;
  grid-template-columns: 8.6em minmax(0, 1fr) auto;
  gap: 4px 24px;
  align-items: baseline;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.p-formas li:last-child { border-bottom: 1px solid var(--line); }
.p-formas h3 { font-size: 20px; line-height: 1.2; margin: 0 0 4px; }
.p-formas p { margin: 0; font-size: 17px; color: var(--ink-soft); }
.p-formas .store-map { min-height: 0; white-space: nowrap; }

/* El cupón: la tarjeta oscura con su línea de recortar arriba, como los de los folletos de toda la vida */
.p-cupon { position: relative; padding-top: 40px; }
.p-cupon::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 17px;
  border-top: 1.5px dashed rgba(241, 239, 225, 0.32);
}
.p-cupon::after {
  content: "\2702\FE0E";        /* las tijeras, como letra y no como dibujo de colores */
  position: absolute;
  top: 6px;
  left: 30px;
  padding: 0 6px;
  background: var(--ink);
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
}

/* --- Móvil --- */
@media (max-width: 820px) {
  .p-hero-grid, .p-como { grid-template-columns: minmax(0, 1fr); }
  /* En el móvil, la tarjeta primero: es lo que se ve al abrir, y el titular justo debajo */
  .p-escena { order: -1; padding-top: 4px; gap: 12px; }
  .p-tarjeta { width: min(50vw, 210px); }
  .p-hero { padding-top: 28px; }
  .p-ticket { margin-top: 8px; }
  .p-sello { right: -6px; }
  .p-socio { grid-template-columns: minmax(0, 1fr); }
  .p-formas li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .p-formas .store-map { min-height: 44px; }
}
/* En una pantalla baja (un portátil pequeño, o con la barra de marcadores puesta) se aprieta un poco y, si aun así no
   cabe, fuera los tres datos del talonario: ya se dicen más abajo, y mejor eso que unos botones cortados. Van aquí,
   después de sus reglas de siempre, para ganarles */
@media (min-width: 821px) and (max-height: 760px) {
  .p-hero { --p-aire: 18px; }
  .p-titular { margin-bottom: 20px; }
}
@media (min-width: 821px) and (max-height: 700px) {
  .p-datos { display: none; }
  .p-hero .lede { font-size: 18px; }
  .p-hero .hero-actions { margin-top: 20px; }
}
@media (max-width: 560px) {
  .p-datos li { padding-right: 12px; margin-right: 12px; }
  .p-moneda { width: 24px; height: 24px; top: -13px; font-size: 13px; }
}

/* Con «reducir movimiento», todo quieto: la tarjeta gira igual, pero sin ondas, sin flotar y sin viajes */
@media (prefers-reduced-motion: reduce) {
  .p-tarjeta, .p-ondas i, .p-moneda, .p-lema-ondas i, .p-titular-final::after { animation: none !important; }
  .p-ondas i { opacity: 0.25; transform: scale(0.9); }
  .p-ondas i:nth-child(n+2) { display: none; }
  .p-moneda { left: 50%; }
  .p-tarjeta-giro { transition-duration: 0.01s; }
  .js .p-pasos:not(.visto) .bd-fill { background: var(--gold); border-color: var(--gold); }
  .js .p-ticket:not(.visto) .p-sello { opacity: 0.92; }
  .js .p-ticket:not(.visto) :is(.p-ticket-papel li, .p-ticket-total, .p-ticket-pie) { opacity: 1; }
  .p-ticket.visto :is(.p-ticket-papel, .p-ticket-papel li, .p-ticket-total, .p-ticket-pie, .p-sello) { animation: none !important; }
}

/* --- Móvil: lo que sobra (repaso del 17 de noviembre) ---
   Medía once pantallas de alto. En el teléfono se queda lo que un vecino necesita: la tarjeta, cómo funciona,
   dónde vale, lo del tendero y cómo pedirla. Lo que repite los botones de arriba (las tres entradas), lo que adorna
   (el dinero que da la vuelta, el lema) y lo que se lee desde una oficina (las dos patas, el Ayuntamiento) sigue en
   el ordenador y el iPad. */
@media (max-width: 599px) {
  .p-solo-ancho { display: none; }
  /* Sin las entradas debajo, la portada no necesita sus 36 px de más; y la tarjeta, algo más pequeña, deja ver el
     titular y los dos botones en la primera pantalla */
  .p-hero { min-height: 0; padding: 20px 0 32px; }
  .p-tarjeta { width: min(38vw, 160px); }
  .p-escena { gap: 6px; }
}

/* El sello del ticket cae desde más grande (p-sello, escala 1,9) y en el teléfono asomaba por la derecha: la página
   se dejaba arrastrar de lado al llegar a él. «clip» recorta sin hacer de la sección una caja con su propio scroll. */
#vecinos { overflow-x: hidden; overflow-x: clip; }


/* --- El mapa con todas las tiendas del club (static/js/mapa_publico.js; Sergio, 19 de noviembre). Sale al pulsar
   «Ver todas en el mapa». Las chinchetas son las de los paneles (.mapa-pin de sistema.css), con los colores de aquí:
   la portada no carga aquella hoja --- */
.club-mapa-caja { margin-top: 32px; text-align: center; scroll-margin-top: 90px; }
/* «.btn» pone su propio display, que le gana a «hidden»: sin esto el botón saldría también sin JavaScript */
.club-mapa-caja [hidden] { display: none; }
/* Los mercados (mapa_mercados.css), con el oro de la portada */
.club-mapa { --mm-oro: var(--gold); --mm-oro-texto: var(--gold-dark); }
.club-mapa { height: min(72vh, 620px); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); text-align: left; background: var(--paper-white); z-index: 0; }
.club-pin {
  box-sizing: border-box; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--ink); border: 3px solid var(--paper-white); box-shadow: -1px 2px 6px rgba(0, 0, 0, .35);
  display: flex; align-items: center; justify-content: center;
}
.club-pin span { width: 8px; height: 8px; border-radius: 50%; background: var(--paper-white); }
.club-pin.oro { width: 38px; height: 38px; background: var(--gold); }
.club-pin.oro span { width: 11px; height: 11px; background: var(--ink); }
.club-pin.con-marca { width: 36px; height: 36px; }
.club-pin.con-marca.oro { width: 44px; height: 44px; }
.club-pin .club-pin-dibujo { width: 58%; height: 58%; transform: rotate(45deg); flex: none; }
.club-pin.con-foto { overflow: hidden; background: var(--paper-white); }
.club-pin .club-pin-foto { width: 142%; height: 142%; max-width: none; object-fit: cover; transform: rotate(45deg); flex: none; }
.club-ficha { display: grid; gap: 4px; font-family: var(--font-body); font-size: 16px; line-height: 1.35; color: var(--ink); }
.club-ficha strong { font-size: 18px; }
.club-ficha-cat { color: var(--sage); font-size: 14px; }
.club-mapa .club-ficha a.btn { margin-top: 8px; min-height: 48px; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.club-mapa .club-ficha a { color: var(--ink); font-weight: 600; }
.club-mapa .club-ficha a.club-ficha-llegar { margin-top: 6px; color: var(--gold-dark); text-decoration: none; }
.club-mapa-boton {
  min-height: 48px; padding: 6px 16px; border-radius: 12px; border: 1px solid rgba(0, 0, 0, .15); background: var(--paper-white);
  color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
@media (max-width: 700px) { .club-mapa { height: 68vh; border-radius: 14px; } .club-mapa-caja .btn { width: 100%; } }
