/* A walk's row card (blocks/parts/WalkRow.astro): its cover at the left with its price, the
   shelf card's own, so a list of them is in sight at once. The home's ways in by occasion
   (blocks/home/Occasions.astro) stand three abreast from 56rem, the cover on top; a walk's
   door to its town's other walks (blocks/walk/CityDoor.astro), a shorter card of a title and
   one line, has its cover on top at any width, a card of one size on its rail (below,
   .puerta-ciudad-lista), the player's farewell too. The whole card is the door: its heading's link is stretched over it. */
.planes-lista { display: grid; gap: var(--hueco-3); margin-top: var(--hueco-4); }
.plan {
  position: relative;
  display: grid;
  grid-template-columns: 6.6rem minmax(0, 1fr);
  background: var(--papel-claro);
  border: 1px solid var(--linea);
  border-radius: var(--curva);
  box-shadow: var(--sombra-carta);
}
.plan:has(.plan-enlace:focus-visible) { outline: 2px solid var(--estampilla); outline-offset: 3px; }
.plan-portada { position: relative; }
/* the cover takes the card's corners itself, so the price (landing.css, .ficha-valor) sticks
   out of its corner as on the shelf's card */
.plan-tapa { height: 100%; overflow: hidden; border-radius: var(--curva) 0 0 var(--curva); }
.plan-tapa picture { height: 100%; }
.plan-foto { display: block; width: 100%; height: 100%; min-height: 8.2rem; object-fit: cover; }
.plan-cuerpo { padding: 0.7rem 0.85rem 0.8rem; }
.plan-motivo { margin: 0; font-family: var(--f-prosa); font-style: italic; font-weight: 500; font-size: 1.28rem; line-height: 1.15; }
.plan-enlace { text-decoration: none; }
.plan-enlace::after { content: ''; position: absolute; inset: 0; }
.plan-obra { margin: var(--hueco-1) 0 0; font-family: var(--f-prosa); font-size: 0.95rem; line-height: 1.3; color: var(--tinta-suave); }
.plan-obra cite { font-style: normal; color: var(--tinta); }
.plan-meta { margin: var(--hueco-2) 0 0; font-family: var(--f-ui); font-size: 0.86rem; font-weight: 500; line-height: 1.35; }
.plan-hora {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: var(--hueco-2) 0 0;
  font-family: var(--f-ui);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--estampilla);
}
.plan-hora::before { content: ''; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--hecho); }
/* the shelf's door, the quiet button (base.css): as wide as the cards on a phone */
.planes-todos { display: block; margin-top: var(--hueco-4); }
/* The town's other walks (blocks/walk/CityDoor.astro, the player's farewell): their cards, all
   one size, on a rail that scrolls by hand where they do not fit and stands still where they do.
   The rail keeps to the sheet, its side padding the page's own --sangria, and its cards dissolve
   at the far edge (--velo) rather than being sliced there. */
.puerta-ciudad-lista {
  --velo: 3rem;
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  /* one axis only: overflow-y would compute to auto, and a rail that can move even a pixel up
     and down takes the vertical swipe from the sheet around it */
  overflow-y: hidden;
  /* the swipe stops at the rail's ends: the page must not slide, nor a touchpad walk history back */
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  /* air for the card's shadow and the focus ring, which the scroll box would cut off */
  padding: 0.5rem var(--velo) 1rem var(--sangria);
  margin: 1.3rem calc(-1 * var(--sangria)) 0;
  scroll-padding-inline: var(--sangria) var(--velo);
  /* the near edge fades only across its own padding, so the first card is whole at rest */
  -webkit-mask-image: linear-gradient(to right,
    transparent 0, #000 var(--sangria), #000 calc(100% - var(--velo)), transparent 100%);
  mask-image: linear-gradient(to right,
    transparent 0, #000 var(--sangria), #000 calc(100% - var(--velo)), transparent 100%);
}
.puerta-ciudad-lista:empty { display: none; }
.puerta-ciudad-lista > .plan { flex: 0 0 auto; width: min(74vw, 14.5rem); scroll-snap-align: start; grid-template-columns: 1fr; align-content: start; }
.puerta-ciudad-lista .plan-tapa { border-radius: var(--curva) var(--curva) 0 0; }
.puerta-ciudad-lista .plan-foto { height: 9rem; min-height: 0; }
.puerta-ciudad-lista .plan-cuerpo { padding: var(--hueco-3) var(--hueco-4) var(--hueco-4); }

@media (min-width: 56rem) {
  .planes-lista { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hueco-5); }
  .planes-lista .plan { grid-template-columns: 1fr; align-content: start; }
  .planes-lista .plan-foto { height: 11.5rem; min-height: 0; }
  .planes-lista .plan-tapa { border-radius: var(--curva) var(--curva) 0 0; }
  .planes-lista .plan-cuerpo { padding: var(--hueco-4) 1.1rem 1.1rem; }
  .planes-lista .plan-motivo { font-size: 1.5rem; }
  .planes-todos { display: inline-block; margin-top: var(--hueco-6); }
}
