/* Homepage style gallery and world-reach map. Shared by every collection: themes only
   supply colors through tokens (themerules.md). Text sits directly on the setting. */
.style-gallery, .world-reach {
  max-width: 960px; margin: 0 auto; padding: 28px 20px; text-align: center;
  color: var(--setting-ink); text-shadow: var(--setting-text-shadow); background: transparent;
}
.style-gallery[hidden], .world-reach[hidden] { display: none; }
.style-gallery .eyebrow, .world-reach .eyebrow { margin: 0; color: var(--setting-muted); }
.style-gallery h2, .world-reach h2 {
  font: 400 29px/1.13 var(--font-display); letter-spacing: -.5px; margin: 10px 0 12px;
}
.style-gallery > p:not(.eyebrow), .world-reach > p:not(.eyebrow) {
  font-size: 14px; line-height: 1.65; color: var(--setting-muted); margin: 0 auto 18px; max-width: 520px;
}

/* Phones and small tablets: one swipeable row inside the section; the page never scrolls sideways. */
.style-gallery-list {
  display: grid; grid-auto-flow: column; grid-auto-columns: 148px; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px;
  margin: 0 -20px; padding: 6px 20px 14px; overscroll-behavior-x: contain;
}
.style-tile {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
  scroll-snap-align: start; padding: 0 0 6px; border: 0; background: none; color: inherit;
  font: inherit; text-shadow: inherit; cursor: pointer; border-radius: 10px;
}
.style-tile img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 8px; margin-bottom: 8px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--setting-ink) 22%, transparent), 0 8px 18px -10px #0007;
  transition: box-shadow var(--motion-duration) ease, transform var(--motion-duration) ease;
}
.style-tile-name { font: 400 16px/1.3 var(--font-display); }
.style-tile-name::after { content: " ✓"; visibility: hidden; }
.style-tile-description { font-size: 11px; line-height: 1.45; color: var(--setting-muted); }
.style-tile:hover img { transform: translateY(-2px); }
.style-tile[aria-pressed="true"] img { box-shadow: 0 0 0 3px var(--setting-ink), 0 8px 18px -10px #0007; }
.style-tile[aria-pressed="true"] .style-tile-name::after { visibility: visible; }
.style-tile:focus-visible { outline: 2px solid var(--setting-ink); outline-offset: 4px; }

@media (min-width: 768px) {
  .style-gallery-list { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 6px 0 0; }
  .style-gallery h2, .world-reach h2 { font-size: 34px; }
}

.world-reach-map { margin: 0 auto 10px; max-width: 760px; }
.world-reach-map svg { display: block; width: 100%; height: auto; }
.reach-country { fill: color-mix(in srgb, var(--setting-ink) 15%, transparent); stroke: none; }
.reach-country.is-reached { fill: var(--setting-ink); fill-opacity: .64; }
.world-reach .world-reach-note { font-size: 11px; margin-bottom: 0; }
/* Illustrative arcs: each draws in, rests, then fades; nine arcs take turns on a 10s loop. */
.reach-arc {
  fill: none; stroke: var(--setting-ink); stroke-width: .7; stroke-linecap: round; opacity: 0;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: reach-arc 10s ease-in-out var(--arc-delay, 0s) infinite;
}
.reach-dot { fill: var(--setting-ink); opacity: 0; animation: reach-dot 10s ease-in-out var(--arc-delay, 0s) infinite; }
@keyframes reach-arc {
  0% { stroke-dashoffset: 1; opacity: 0; }
  4% { opacity: .75; }
  18% { stroke-dashoffset: 0; opacity: .75; }
  32% { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes reach-dot {
  0%, 100% { opacity: 0; }
  6%, 26% { opacity: .9; }
  34% { opacity: 0; }
}
.world-reach .world-reach-cities { font: italic 400 15px/1.7 var(--font-display); color: var(--setting-ink); max-width: 640px; margin-top: -8px; }
.world-reach .world-reach-cities[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .style-tile img { transition: none; }
  .style-tile:hover img { transform: none; }
  /* Still arcs instead of motion. */
  .reach-arc { animation: none; stroke-dashoffset: 0; opacity: .35; }
  .reach-dot { animation: none; opacity: .6; }
}
