/* ==========================================================================
   Luna — Ibiza Hikes · components.css
   --------------------------------------------------------------------------
   Ibiza Bohemia poster + MoMoney wall-of-type components.
   Poster-flat surfaces, chunky type, inked rules, solid-colour full-bleed
   bands. Assouline magenta for CTAs, Miami butter for highlights, MoMoney
   blue for the monumental wall. Tilted Polaroids on forest-green for the
   "photos of the hike" treatment.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Top nav — solid cream bar with inked underline
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  padding: 14px clamp(16px, 3vw, 44px);
  background: var(--paper);
  border-bottom: var(--bd-ink);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.nav__brand:hover { color: var(--magenta); }

.nav__logo {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  color: var(--clay);
  transition: transform var(--t-med) var(--ease-spring);
}
.nav__brand:hover .nav__logo { transform: rotate(18deg); }

/* Heart-trail brand mark. The trail line strokes itself on, the heart fill
   blooms, a hiker dot walks the route, then one soft beat. Colours sit on
   the elements so the mark reads rose regardless of nav text colour, and so
   the hover-rotate (above) is replaced by a gentle beat. */
.nav__logo--heart { color: var(--rose, #D6336C); overflow: visible; }
.nav__brand:hover .nav__logo--heart { transform: none; }
.nav__logo-fill {
  fill: var(--rose, #D6336C);
  transform-box: fill-box;
  transform-origin: center;
}
.nav__logo-trail {
  stroke: var(--rose-deep, #B7245A);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav__logo-hiker {
  fill: var(--forest, #1E3A2C);
  stroke: var(--bone, #F8F0DB);
  stroke-width: 1.2;
}
.nav__logo-beat { transform-box: fill-box; transform-origin: center; }
/* Hover gives the heart a quick, reliable squeeze (transition, not keyframe,
   so it re-fires every hover). */
.nav__brand:hover .nav__logo-beat { transform: scale(1.12); }
.nav__logo-beat { transition: transform var(--t-med, 200ms) var(--ease-spring, ease); }

.nav__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: var(--track-tight);
  color: var(--forest);
  line-height: 1;
}

.nav__sub {
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--ink);
  margin-left: 4px;
  padding: 3px 8px;
  background: var(--butter);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-sm);
}

.nav__links {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  margin-left: auto;
}

.nav__links a {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  padding: 4px 2px;
  border-bottom: 3px solid transparent;
  transition: color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.nav__links a:hover,
.nav__links a.nav__link--active,
.nav__links a[aria-current="page"] {
  color: var(--magenta);
  border-bottom-color: var(--magenta);
}

.nav__dice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--magenta);
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.nav__dice:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--magenta-deep);
}
.nav__dice:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.nav__dice svg { width: 18px; height: 18px; color: currentColor; }

/* --------------------------------------------------------------------------
   2. Buttons — Assouline/MoMoney poster buttons with hard drop-shadow
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-bd: var(--ink);
  --btn-shadow: 3px 3px 0 var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  min-height: 48px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 2px solid var(--btn-bd);
  border-radius: var(--r-pill);
  box-shadow: var(--btn-shadow);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease, background var(--t-fast) ease, color var(--t-fast) ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--btn-bd);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--btn-bd);
}

.btn--primary {
  /* magenta-deep (not bright magenta) so bone text clears WCAG AA — 5.3:1
     vs 3.3:1. Bright --magenta stays for large display headings. */
  --btn-bg: var(--magenta-deep);
  --btn-fg: var(--bone);
  --btn-bd: var(--ink);
}
.btn--primary:hover { background: #9C2550; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--ink);
}

.btn--roll svg {
  width: 18px;
  height: 18px;
  color: currentColor;
}

.btn--large {
  padding: 16px 30px;
  min-height: 58px;
  font-size: 1.0625rem;
}

/* --------------------------------------------------------------------------
   3. Eyebrows, titles, hairlines
   -------------------------------------------------------------------------- */

.page-header {
  padding: 28px 0 40px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 48px;
}

.page-header__eyebrow {
  display: inline-block;
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--ink);
  margin-bottom: 22px;
  padding: 4px 10px;
  background: var(--butter);
  border: 1.5px solid var(--ink);
}

.page-header__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--forest);
  line-height: 0.92;
  letter-spacing: var(--track-tight);
  margin: 0;
}

.page-header__sub {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1rem, 0.5vw + 0.95rem, 1.25rem);
  color: var(--ink);
  max-width: 52ch;
  line-height: 1.45;
  margin: 22px 0 0;
}

.section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  margin-bottom: 36px;
  border-bottom: 2px solid var(--ink);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 2vw + 1rem, 3rem);
  color: var(--forest);
  letter-spacing: var(--track-tight);
  margin: 0;
  line-height: 0.95;
}

.section__sub {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  font-size: clamp(0.9375rem, 0.3vw + 0.85rem, 1.125rem);
  max-width: 48ch;
  margin: 0;
}

/* --------------------------------------------------------------------------
   4. Hero title — retained for the living style guide (design.html).
   The runtime home-page hero lives in section 25 (`.hero-dice`).
   -------------------------------------------------------------------------- */

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-wall);
  line-height: 0.88;
  letter-spacing: var(--track-tighter);
  color: var(--forest);
  margin: 0 0 28px;
  max-width: 15ch;
  font-variation-settings: "wdth" 100, "opsz" 48;
  text-transform: uppercase;
}

.hero__title .em {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: normal;
  color: var(--magenta);
  letter-spacing: inherit;
  display: inline;
}

/* --------------------------------------------------------------------------
   5. Chips (filters) — chunky rounded pills with inked borders
   -------------------------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  min-height: 40px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-fast) ease;
}

.chip:hover {
  background: var(--butter);
  color: var(--ink);
  border-color: var(--ink);
}

.chip--active {
  background: var(--magenta-deep); /* AA contrast with bone text */
  color: var(--bone);
  border-color: var(--ink);
}

.chip__remove {
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0 0 4px;
  margin-left: 2px;
  cursor: pointer;
}

.chip-row,
.filter-group__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.filter-group__label {
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
}

/* --------------------------------------------------------------------------
   6. Score badge — butter-yellow sticker with inked border
   -------------------------------------------------------------------------- */

.score {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 4px 10px;
  background: var(--butter);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.1;
}

.score::before { display: none; }

.score::after {
  content: "/5";
  font-family: var(--font-body);
  font-size: 0.6875rem;
  color: var(--ink);
  opacity: 0.65;
  font-weight: 500;
  letter-spacing: var(--track-wide);
  margin-left: 3px;
}

.score--big {
  font-size: 1.75rem;
  padding: 8px 14px;
  background: var(--magenta);
  color: var(--bone);
}
.score--big::after {
  font-size: 0.875rem;
  color: var(--bone);
  opacity: 0.75;
  margin-left: 4px;
}

/* --------------------------------------------------------------------------
   7. Trail card — inked-border poster tile on cream
   -------------------------------------------------------------------------- */

.trail-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: transparent;
  padding: 0;
  text-decoration: none;
  color: var(--ink);
  transition: transform var(--t-med) var(--ease-spring);
}

.trail-card:hover { transform: translateY(-4px); }

/* Retained for the living style guide (design.html). Runtime cards use
   `.trail-card__illustration-wrap` (section 21). */
.trail-card__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--linen);
  margin-bottom: 18px;
  border: 2px solid var(--ink);
  border-radius: var(--r-poster);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--t-med) ease;
}
.trail-card:hover .trail-card__photo {
  box-shadow: 6px 8px 0 rgba(20, 22, 15, 0.16);
}
.trail-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out);
}
.trail-card:hover .trail-card__photo img {
  transform: scale(1.04);
}

.trail-card__index {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--track-wider);
  color: var(--ink);
  background: var(--butter);
  padding: 4px 10px;
  border: 1.5px solid var(--ink);
  text-transform: uppercase;
}

.trail-card__score {
  position: absolute;
  bottom: 12px;
  right: 12px;
  color: var(--bone);
  background: var(--magenta);
  padding: 4px 12px;
  border: 1.5px solid var(--ink);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: var(--r-pill);
}
.trail-card__score::before,
.trail-card__score::after { display: none; }

.trail-card__eyebrow {
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.trail-card__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.375rem, 0.8vw + 1.1rem, 1.75rem);
  color: var(--forest);
  margin: 0 0 8px;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: none;
}
.trail-card:hover .trail-card__name { color: var(--magenta); }

.trail-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
  color: var(--ink);
  font-size: 0.875rem;
  font-family: var(--font-body);
  font-weight: 500;
  margin-bottom: 8px;
}
.trail-card__dot { color: var(--ink-faint); }

.trail-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.tag,
.trail-card__tag {
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--ink-soft);
  padding: 0;
  background: none;
  border: 0;
  border-bottom: 0;
}
.tag::after {
  content: "·";
  color: var(--ink-faint);
  margin-left: 6px;
}
.tag:last-child::after { content: ""; }

/* --------------------------------------------------------------------------
   8. Trail grid / hikes list
   -------------------------------------------------------------------------- */

.trail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  column-gap: 32px;
  row-gap: 56px;
  margin-top: 12px;
}

@media (max-width: 640px) {
  .trail-grid { column-gap: 20px; row-gap: 44px; }
}

.hikes__content {
  padding-top: 16px;
}

.filter-bar {
  padding: 20px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  margin: 0 0 40px;
}

.filter-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.view-toggle {
  display: inline-flex;
  gap: 0;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: 14px;
}
.view-toggle__btn {
  padding: 10px 22px;
  background: var(--paper);
  border: 0;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.view-toggle__btn--active {
  background: var(--ink);
  color: var(--butter);
}

.tag-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--ink);
}
.tag-line__label {
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   9. Polaroid tarot card — tilted, on a forest-green background
   -------------------------------------------------------------------------- */

.tarot {
  --w: 300px;
  --tilt: -2.5deg;
  width: var(--w);
  flex: 0 0 var(--w);
  display: flex;
  flex-direction: column;
  background: var(--bone);
  padding: 14px 14px 18px;
  border: 2px solid var(--ink);
  border-radius: var(--r-polaroid);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-polaroid);
  transform: rotate(var(--tilt));
  transition: transform var(--t-med) var(--ease-spring), box-shadow var(--t-med) ease;
}

.tarot:nth-child(2n)   { --tilt: 2deg; }
.tarot:nth-child(3n)   { --tilt: -1.5deg; }
.tarot:nth-child(4n)   { --tilt: 3deg; }
.tarot:nth-child(5n+1) { --tilt: -3deg; }

.tarot:hover {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 0 22px 38px -18px rgba(20, 22, 15, 0.55),
              0 6px 12px -4px rgba(20, 22, 15, 0.3);
  z-index: 2;
}

.tarot__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  padding: 0;
  background: var(--linen);
  overflow: hidden;
  border: 0;
}

.tarot__illustration {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
}
.tarot__illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tarot__body {
  padding: 14px 4px 0;
}

.tarot__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--forest);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.tarot__stats {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono-caps);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.tarot__score {
  display: inline-block;
  padding: 3px 10px;
  background: var(--butter);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-top: 4px;
}

.tarot__quote,
.tarot__quote.em {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  margin-top: 8px;
  line-height: 1.4;
  transform: none;
  padding: 0;
  letter-spacing: 0;
}

.tarot-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 36px;
  padding: 32px 0 48px;
}

.dip-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 24px 0 40px;
  flex-wrap: wrap;
  border-top: 2px solid var(--ink);
}

/* --------------------------------------------------------------------------
   10. Lucky Dip sheet
   -------------------------------------------------------------------------- */

.dip-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
}
.dip-sheet[aria-hidden="false"] {
  pointer-events: auto;
  visibility: visible;
}

.dip-sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 15, 0.55);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease-out);
}
.dip-sheet[aria-hidden="false"] .dip-sheet__scrim {
  opacity: 1;
}

.dip-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 28px 28px 20px;
  transform: translateY(40px);
  opacity: 0;
  box-shadow: var(--shadow-float);
  transition: transform var(--t-slow) var(--ease-out), opacity var(--t-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dip-sheet[aria-hidden="false"] .dip-sheet__panel {
  transform: translateY(0);
  opacity: 1;
}

.dip-sheet__handle { display: none; }

.dip-sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.dip-sheet__close:hover {
  background: var(--ink);
  color: var(--butter);
}

.dip-sheet__header {
  margin-bottom: 24px;
  padding-right: 52px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--ink);
}

.dip-sheet__eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  background: var(--butter);
  border: 1.5px solid var(--ink);
}

.dip-sheet__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.875rem, 2vw + 1rem, 2.75rem);
  color: var(--forest);
  margin: 0;
  line-height: 0.95;
  letter-spacing: var(--track-tight);
}

.dip-sheet__sub {
  color: var(--ink);
  font-size: 0.9375rem;
  font-family: var(--font-body);
  font-weight: 500;
  margin: 8px 0 0;
}

.dip-sheet__body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
  padding: 2px;
  margin-bottom: 24px;
}

.dip-sheet__footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

@media (min-width: 641px) {
  .dip-sheet { align-items: center; }
  .dip-sheet__panel {
    border-bottom: 2px solid var(--ink);
    border-radius: var(--r-lg);
    margin: 24px;
  }
}

/* --------------------------------------------------------------------------
   11. Map
   -------------------------------------------------------------------------- */

.map-page__wrap,
.map-wrapper {
  position: relative;
  margin-bottom: 32px;
}

.map,
#full-map,
#detail-map {
  width: 100%;
  height: clamp(460px, 70vh, 820px);
  background: var(--linen);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: 6px 6px 0 rgba(20, 22, 15, 0.12);
  filter: saturate(0.9);
}

.map-page__filters {
  margin-top: 24px;
  padding: 24px;
  background: var(--bone);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
}

.leaflet-container { font-family: var(--font-body) !important; }
.leaflet-popup-content-wrapper {
  background: var(--bone);
  color: var(--ink);
  border-radius: var(--r-sm);
  box-shadow: 4px 4px 0 rgba(20, 22, 15, 0.22);
  border: 2px solid var(--ink);
}
.leaflet-popup-content { margin: 14px 18px; font-family: var(--font-body); }
.leaflet-popup-content h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1875rem;
  margin: 0 0 4px;
  color: var(--forest);
  letter-spacing: -0.01em;
}
.leaflet-popup-content a {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--magenta);
}

.leaflet-popup-tip { background: var(--bone); border: 2px solid var(--ink); }

.trail-marker {
  background: transparent;
  border: 0;
}
.trail-marker__ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--bone);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 3px 3px 0 rgba(20, 22, 15, 0.25);
  transition: transform var(--t-med) var(--ease-spring);
}
.trail-marker__ring img {
  width: 100%; height: 100%; object-fit: cover;
}
.trail-marker__fallback {
  color: var(--clay);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
}

.trail-marker:hover .trail-marker__ring { transform: scale(1.08) translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.trail-marker--bloom .trail-marker__ring { transform: scale(1.25); }

/* Route end flag (point-to-point trails) — smaller butter chip */
.trail-marker__ring--end {
  width: 32px; height: 32px;
  background: var(--butter, #F4C84A);
}
.trail-marker__flag { font-size: 0.95rem; line-height: 1; }

/* Detail-map start marker — a clean GPS-style dot instead of a photo ring.
   The old 56px photo marker cropped to sky and read as a big blue blob over
   the route; this sits cleanly on the trailhead like AllTrails/Wikiloc. */
.trail-marker--start { background: transparent; border: 0; }
.trail-pin {
  position: relative;
  display: block;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 3px solid var(--bone, #F8F0DB);
  box-shadow: 0 0 0 1.5px var(--ink), 0 3px 7px rgba(20, 22, 15, 0.45);
}
.trail-pin--start { background: var(--forest, #1E3A2C); }
.trail-pin--start::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bone, #F8F0DB);
}

/* Clustered trailheads on the overview map */
.trail-cluster { background: transparent; border: 0; }
.trail-cluster__bubble {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--forest, #1E3A2C);
  color: var(--bone, #F8F0DB);
  font-family: var(--font-mono-caps, monospace);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 3px 3px 0 rgba(20, 22, 15, 0.28);
  transition: transform var(--t-med, 180ms) var(--ease-spring, ease);
}
.trail-cluster:hover .trail-cluster__bubble {
  transform: scale(1.08) translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.trail-popup__muni {
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--ink-soft);
  margin-bottom: 2px;
}
.trail-popup__meta {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin: 4px 0 10px;
}

/* --------------------------------------------------------------------------
   12. Detail page
   -------------------------------------------------------------------------- */

.detail {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 901px) {
  .detail { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); align-items: start; }
}

.detail__score {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
}
.detail__score::before { display: none; }

.detail__title,
.detail__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 6vw + 1rem, 5.5rem);
  color: var(--forest);
  letter-spacing: var(--track-tighter);
  line-height: 0.9;
  margin: 24px 0 6px;
  text-transform: none;
}

.detail__municipality {
  font-family: var(--font-mono-caps);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  margin: 0 0 28px;
  display: inline-block;
  padding: 4px 10px;
  background: var(--butter);
  border: 1.5px solid var(--ink);
  font-style: normal;
}

.detail__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0;
  padding: 0;
  border: 2px solid var(--ink);
  margin: 0 0 32px;
  background: var(--bone);
}

.detail__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border-right: 1.5px solid var(--ink);
}
.detail__stat:last-child { border-right: 0; }
.detail__stat .big {
  font-family: var(--font-display);
  font-size: 1.625rem;
  color: var(--forest);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.detail__stat .label {
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
}

.detail__description {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
  max-width: 64ch;
  margin: 0 0 28px;
  column-width: 480px;
  column-gap: 36px;
}

.detail__warning {
  padding: 16px 20px;
  border: 2px solid var(--ink);
  background: var(--butter);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  margin: 0 0 32px;
}

.detail__gallery-strip,
.gallery-strip {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  scrollbar-width: none;
}
.detail__gallery-strip::-webkit-scrollbar,
.gallery-strip::-webkit-scrollbar { display: none; }
.gallery-strip__item {
  flex: 0 0 72%;
  scroll-snap-align: start;
  max-width: 360px;
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bone);
  box-shadow: var(--shadow-card);
}
.gallery-strip__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.gallery-strip__credit {
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--ink-soft);
  padding: 8px 12px;
  margin: 0;
}

.detail__swim {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--blue-wash);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}
.detail__swim strong {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--forest);
  letter-spacing: -0.01em;
}

.detail__quote,
.detail__quotes blockquote {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--ink);
  padding: 20px 24px;
  background: var(--bone);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  margin: 0 0 18px;
  box-shadow: var(--shadow-card);
}
.detail__quote footer {
  font-family: var(--font-mono-caps);
  font-style: normal;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--ink-soft);
  margin-top: 10px;
}

.detail__links-row,
.detail__links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.detail__cta {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid var(--ink);
}

/* --------------------------------------------------------------------------
   13. Photos-of-the-hike section: forest-green full-bleed with Polaroids
   (the "green" example the user shared). Lives on the home + map pages.
   -------------------------------------------------------------------------- */

.photos-block {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: clamp(56px, 7vw, 120px) var(--gutter) clamp(80px, 10vw, 180px);
  background: var(--forest);
  color: var(--bone);
  overflow: hidden;
}

.photos-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.5;
}

.photos-block__inner {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
}

.photos-block__eyebrow {
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--butter);
  margin-bottom: 18px;
  display: inline-block;
  padding: 4px 10px;
  background: var(--forest-deep);
  border: 1.5px solid var(--butter);
}

.photos-block__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw + 1rem, 6rem);
  line-height: 0.9;
  letter-spacing: var(--track-tighter);
  color: var(--butter);
  margin: 0 0 18px;
  max-width: 14ch;
}

.photos-block__sub {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--bone);
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.25rem);
  max-width: 48ch;
  margin: 0 0 56px;
  opacity: 0.88;
}

/* Scroll rail of tilted Polaroids — the hero example the user shared. */
.photos-rail {
  display: flex;
  gap: 36px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 12px 0 36px;
  scroll-snap-type: x proximity;
}
.photos-rail::-webkit-scrollbar { display: none; }
.photos-rail > * { scroll-snap-align: start; }

/* When the Polaroids live on the forest block they need a cream body */
.photos-block .tarot {
  background: var(--bone);
  color: var(--ink);
}
.photos-block .tarot__name { color: var(--forest); }

/* --------------------------------------------------------------------------
   14. Map preview (home)
   -------------------------------------------------------------------------- */

.map-preview {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--linen);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-poster);
  transition: transform var(--t-med) var(--ease-spring), box-shadow var(--t-med) ease;
}
.map-preview:hover {
  transform: translate(-2px, -2px);
  box-shadow: 10px 14px 0 rgba(20, 22, 15, 0.16);
}
.map-preview__canvas { width: 100%; height: 100%; }
.map-preview__overlay {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 8px 14px;
  background: var(--magenta);
  color: var(--bone);
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   15. Vibe chapters — poster-flat grid with big chunky numerals
   -------------------------------------------------------------------------- */

.vibe-bouquet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.vibe-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 28px;
  min-height: 220px;
  background: transparent;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  text-decoration: none;
  color: var(--ink);
  position: relative;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.vibe-card:nth-child(3n) { border-right: 0; }
.vibe-card:hover {
  background: var(--forest);
  color: var(--butter);
}
.vibe-card:hover .vibe-card__title { color: var(--butter); }
.vibe-card:hover .vibe-card__blurb { color: var(--bone); }
.vibe-card:hover .vibe-card__icon  { color: var(--butter); opacity: 1; }

.vibe-card__icon {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: var(--track-tight);
  color: var(--magenta);
  line-height: 1;
}

.vibe-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--forest);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
}

.vibe-card__blurb {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 640px) {
  .vibe-card { border-right: 0 !important; }
}

/* --------------------------------------------------------------------------
   17. Empty state
   -------------------------------------------------------------------------- */

.empty-state {
  text-align: center;
  padding: 64px 24px;
  border: 2px dashed var(--ink);
  margin: 32px 0;
  background: var(--bone);
  border-radius: var(--r-md);
}

.empty-state__icon {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--magenta);
  margin: 0 0 12px;
}
.empty-state__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--forest);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.empty-state__sub {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  font-size: 1rem;
  max-width: 46ch;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   18. Toast
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--ink);
  color: var(--butter);
  padding: 14px 20px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  box-shadow: 3px 3px 0 var(--magenta);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-med) ease, transform var(--t-med) ease;
  z-index: 120;
  max-width: 360px;
  pointer-events: none;
}
.toast--show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   19. About page
   -------------------------------------------------------------------------- */

.about {
  max-width: 70ch;
}
.about__h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--forest);
  margin: 48px 0 18px;
  letter-spacing: var(--track-tight);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.about__list { margin: 0; padding: 0; list-style: none; }
.about__list li {
  padding: 14px 0;
  border-bottom: 1.5px solid var(--ink);
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.about__list li strong {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--forest);
  min-width: 140px;
  letter-spacing: -0.01em;
}
.about__list li span {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  flex: 1;
}

/* --------------------------------------------------------------------------
   20. Leaflet controls tidy-up
   -------------------------------------------------------------------------- */

.leaflet-control-zoom a {
  background: var(--bone) !important;
  color: var(--ink) !important;
  border: 2px solid var(--ink) !important;
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
}

/* --------------------------------------------------------------------------
   21. Hike illustration — branded SVG hero + card thumb
   --------------------------------------------------------------------------
   Every hike ships a `/ibiza/static/illustrations/<id>.svg`. Cards and the
   detail hero prefer it. If it 404s (e.g. before the illustration pipeline
   has generated them), the image element swaps to the first photo; we mark
   it with `.hike-illustration--fallback` so we can quietly fit-to-cover.
   ========================================================================== */

.hike-illustration {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--linen);
}
.hike-illustration--fallback { object-fit: cover; }

/* Card thumb — swap for the tile. Reuses the inked poster border + lift
   treatment from `.trail-card__photo`. */
.trail-card__illustration-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--linen);
  margin-bottom: 18px;
  border: 2px solid var(--ink);
  border-radius: var(--r-poster);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--t-med) ease, transform var(--t-med) ease;
}
.trail-card:hover .trail-card__illustration-wrap {
  box-shadow: 6px 8px 0 rgba(20, 22, 15, 0.16);
}
.trail-card__illustration {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--linen);
  transition: transform 900ms var(--ease-out);
}
.trail-card__illustration.hike-illustration--fallback { object-fit: cover; }
.trail-card:hover .trail-card__illustration { transform: scale(1.03); }

/* Tarot (home tile) illustration. The Polaroid frame handles its own
   border + tilt, so the image just fills the frame. */
.tarot__illustration-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--linen);
}
.tarot__illustration-img.hike-illustration--fallback { object-fit: cover; }

/* --------------------------------------------------------------------------
   22. Detail hero — full-width branded SVG
   -------------------------------------------------------------------------- */

.hike-hero {
  position: relative;
  width: 100%;
  max-height: 60vh;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-poster);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin: 0 0 28px;
}
.hike-hero__img {
  width: 100%;
  height: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: var(--paper);
  display: block;
}
.hike-hero__img.hike-illustration--fallback { object-fit: cover; }
.hike-hero .detail__score {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
}

/* --------------------------------------------------------------------------
   23. Featured photos strip — tilted Polaroids, 3-col desktop, 1-col mobile
   -------------------------------------------------------------------------- */

.featured-photos {
  margin: 32px 0 40px;
}
.featured-photos__eyebrow {
  margin-bottom: 20px;
  display: inline-flex;
}
.featured-photos__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.4vw, 32px);
  padding: 12px 0 8px;
}
.featured-photos__item {
  --tilt: -2deg;
  position: relative;
  margin: 0;
  padding: 12px 12px 16px;
  background: var(--bone);
  border: 2px solid var(--ink);
  border-radius: var(--r-polaroid);
  box-shadow: 3px 4px 0 var(--ink);
  transform: rotate(var(--tilt));
  transition: transform var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) ease;
  overflow: hidden;
}
.featured-photos__item:nth-child(3n+1) { --tilt: -2.5deg; }
.featured-photos__item:nth-child(3n+2) { --tilt: 2deg; }
.featured-photos__item:nth-child(3n)   { --tilt: -1.2deg; }
.featured-photos__item:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 5px 7px 0 var(--ink);
  z-index: 2;
}
.featured-photos__item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border: 1.5px solid var(--ink);
  background: var(--linen);
}
.featured-photos__credit {
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--ink-soft);
  margin: 10px 2px 0;
}

/* --------------------------------------------------------------------------
   24. More photos — flat gallery, hidden when empty
   -------------------------------------------------------------------------- */

.more-photos {
  margin: 40px 0;
}
.more-photos__eyebrow {
  margin-bottom: 18px;
  display: inline-flex;
}
.more-photos__rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.more-photos__rail::-webkit-scrollbar { display: none; }
.more-photos__item {
  flex: 0 0 72%;
  scroll-snap-align: start;
  max-width: 360px;
}
@media (min-width: 901px) {
  .more-photos__rail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    overflow: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }
  .more-photos__item {
    flex: initial;
    max-width: none;
  }
}

/* --------------------------------------------------------------------------
   25. Hero dice — roll-a-hike opening block (home page)
   --------------------------------------------------------------------------
   Sits at the very top of the home view. The animated SVG backdrop lives in
   `.hero-dice__bg` (positioned absolute, low opacity). Foreground content —
   eyebrow, headline, sub, chip filter bar, Roll button, "More filters" link
   — sits in `.hero-dice__inner`.

   Chips are <details>/<summary> for free keyboard a11y; the disclosure
   triangle is suppressed via list-style + ::-webkit-details-marker. The
   menu is a positioned <ul> below the chip with the option list.
   -------------------------------------------------------------------------- */

.hero-dice {
  position: relative;
  /* Sit above the following sections so an open chip menu doesn't get
     painted under the next block. We don't use `isolation: isolate` here
     because that would trap the menu inside this stacking context (the
     photos-block below has `position: relative`, which would beat it on
     paint order). */
  z-index: 5;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: clamp(48px, 6vw, 96px) var(--gutter) clamp(56px, 6vw, 96px);
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  /* Note: deliberately NOT overflow:hidden — chip dropdown menus need to
     escape the hero block. The decorative SVG below is clipped via its own
     wrapper instead. */
}

.hero-dice__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* Low overall opacity so foreground text + chips stay legible. */
  opacity: 0.7;
}
.hero-dice__bg-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-dice__inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-dice__eyebrow {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--ink);
  padding: 4px 10px;
  background: var(--butter);
  border: 1.5px solid var(--ink);
  margin-bottom: 6px;
}

.hero-dice__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  color: var(--forest);
  line-height: 0.9;
  letter-spacing: var(--track-tighter);
  margin: 0;
  text-transform: none;
}
.hero-dice__title .em { color: var(--magenta); }

.hero-dice__sub {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  font-size: clamp(1rem, 0.5vw + 0.95rem, 1.25rem);
  margin: 0;
  max-width: 48ch;
}

/* The chip + button row */
.hero-dice__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.hero-dice__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.hero-dice__chip {
  position: relative;
  display: inline-block;
  /* Suppress native details disclosure triangle. */
}
.hero-dice__chip > summary {
  list-style: none;
}
.hero-dice__chip > summary::-webkit-details-marker {
  display: none;
}
.hero-dice__chip > summary::marker {
  content: "";
}

.hero-dice__chip-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 44px;
  background: var(--bone);
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
  cursor: pointer;
  user-select: none;
  transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease, background var(--t-fast) ease;
}
.hero-dice__chip-summary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--butter);
}
.hero-dice__chip[open] > .hero-dice__chip-summary {
  background: var(--magenta);
  color: var(--bone);
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.hero-dice__chip-key {
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  opacity: 0.7;
}
.hero-dice__chip[open] .hero-dice__chip-key { opacity: 0.9; }

.hero-dice__chip-val {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
}

.hero-dice__chip-caret {
  font-size: 0.7em;
  margin-left: 2px;
  opacity: 0.55;
  transition: transform var(--t-fast) ease;
}
.hero-dice__chip[open] .hero-dice__chip-caret { transform: rotate(180deg); opacity: 0.95; }

/* Dropdown menu — anchored under the chip. */
.hero-dice__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 200px;
  padding: 6px;
  margin: 0;
  list-style: none;
  background: var(--bone);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: 6px 8px 0 rgba(20, 22, 15, 0.18);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-dice__menu-item {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
  letter-spacing: -0.005em;
  outline: none;
}
.hero-dice__menu-item:hover,
.hero-dice__menu-item:focus-visible {
  background: var(--butter);
}
.hero-dice__menu-item.is-active {
  background: var(--magenta-deep);
  color: var(--bone);
}

.hero-dice__roll {
  flex: 0 0 auto;
}

.hero-dice__more-row {
  margin-top: 4px;
}
.hero-dice__more {
  background: transparent;
  border: 0;
  padding: 6px 0;
  color: var(--ink-soft);
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  cursor: pointer;
  transition: color var(--t-fast) ease;
}
.hero-dice__more:hover { color: var(--magenta); }

/* Top-pick illustration override — keeps the Polaroid frame, but ensures the
   illustration is `contain`-sized on cream so the SVG art reads cleanly.
   Falls back to `cover` when we drop to a photo (the SVG 404'd). */
.top-pick__illustration {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bone);
  display: block;
}
.top-pick__illustration.hike-illustration--fallback {
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   26. Hero-dice: region chip (tiny pill shown next to Roll once a region
       is selected on the map below).
   -------------------------------------------------------------------------- */

.hero-dice__region {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 14px;
  background: var(--magenta);
  color: var(--bone);
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.hero-dice__region[hidden] { display: none; }
.hero-dice__region:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
.hero-dice__region-key {
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  opacity: 0.8;
}
.hero-dice__region-clear {
  font-size: 1.1em;
  line-height: 1;
  opacity: 0.85;
  padding-left: 2px;
}

/* --------------------------------------------------------------------------
   27. Roll overlay + dice tumble + card reveal
   -------------------------------------------------------------------------- */

.roll-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  animation: roll-overlay-in 300ms ease both;
}
.roll-overlay.is-closing { animation: roll-overlay-out 200ms ease both; }

.roll-overlay__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 720px at 50% 40%, rgba(30, 58, 44, 0.20), rgba(20, 22, 15, 0.44));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.roll-overlay__stage {
  position: relative;
  z-index: 1;
  width: min(920px, 94vw);
  max-height: 92vh;
  overflow: auto;
  padding: clamp(24px, 4vw, 48px) clamp(20px, 4vw, 48px) clamp(32px, 4vw, 56px);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--r-xl);
  box-shadow:
    0 40px 80px -20px rgba(20, 22, 15, 0.55),
    10px 14px 0 var(--ink);
  /* A subtle paper texture via stacked gradients */
  background-image:
    radial-gradient(1.5px 1.5px at 10% 10%, rgba(20, 22, 15, 0.04), transparent 60%),
    radial-gradient(1.5px 1.5px at 80% 70%, rgba(20, 22, 15, 0.04), transparent 60%),
    linear-gradient(var(--paper), var(--paper));
}

.roll-overlay__close {
  position: absolute;
  top: 14px; right: 18px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--bone);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 0.8;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform var(--t-fast) ease, background var(--t-fast) ease;
  z-index: 2;
}
.roll-overlay__close:hover {
  background: var(--magenta);
  color: var(--bone);
  transform: rotate(90deg);
}

.roll-stage__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  min-height: 360px;
}

.roll-stage__caption {
  font-family: var(--font-mono-caps);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--ink-soft);
  margin: 0;
  animation: roll-caption-in 300ms ease both;
  animation-delay: 80ms;
  text-align: center;
}

/* Cards: a horizontal tarot strip. On mobile stacks column-style. */
.roll-stage__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  width: 100%;
  margin-top: 8px;
  perspective: 1400px;
}
@media (max-width: 720px) {
  .roll-stage__cards {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-inline: auto;
  }
}

.roll-card {
  position: relative;
  aspect-ratio: 3 / 4;
  min-height: 320px;
  transform: rotate(var(--tilt, 0deg));
  opacity: 0;
  transform-style: preserve-3d;
  animation: none;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 240ms var(--ease-spring);
}
.roll-card:hover {
  transform: rotate(0deg) translateY(-4px) scale(1.02);
  z-index: 2;
}

.roll-stage__cards.is-revealed .roll-card {
  animation: roll-card-flip 1000ms cubic-bezier(0.22, 1.1, 0.3, 1) both;
  animation-delay: calc(120ms * var(--i, 0));
}

.roll-card__inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.roll-card__face {
  position: absolute;
  inset: 0;
  background: var(--bone);
  border: 2.5px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-polaroid);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
}

.roll-card__face--back {
  background:
    radial-gradient(circle at 50% 38%, var(--magenta) 0%, var(--magenta-deep) 60%, #8a1e4a 100%);
  color: var(--bone);
  display: grid;
  place-items: center;
  padding: 18px;
  /* Back starts face-up (card flipped) and hides behind the front once
     the card rotates 180° to reveal the hike. */
  transform: rotateY(180deg);
}
.roll-card__face--front {
  transform: rotateY(0deg);
}

.roll-card__back-pattern {
  position: absolute;
  inset: 10px;
  border-radius: 2px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background-image:
    repeating-linear-gradient(45deg,
      rgba(255, 255, 255, 0.08) 0 8px,
      transparent 8px 16px),
    repeating-linear-gradient(-45deg,
      rgba(255, 255, 255, 0.08) 0 8px,
      transparent 8px 16px);
  pointer-events: none;
}
.roll-card__back-emblem {
  position: relative;
  color: var(--butter);
  width: 72px; height: 72px;
  display: grid;
  place-items: center;
  background: rgba(20, 22, 15, 0.22);
  border-radius: 50%;
  border: 2px solid var(--butter);
}
.roll-card__back-emblem svg { width: 36px; height: 36px; color: currentColor; }

.roll-card__illustration-wrap {
  position: relative;
  flex: 1 1 auto;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  min-height: 0;
  overflow: hidden;
}
.roll-card__illustration {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 10px;
}
.roll-card__illustration--fallback { object-fit: cover; padding: 0; }

.roll-card__body {
  padding: 14px 14px 16px;
  background: var(--bone);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.roll-card__eyebrow {
  font-family: var(--font-mono-caps);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--ink-soft);
}
.roll-card__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.125rem, 1vw + 1rem, 1.375rem);
  color: var(--forest);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  /* Clamp to 2 lines so cards are consistent height */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.roll-card__meta {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin: 0;
  font-weight: 500;
}
.roll-card__score {
  position: absolute;
  bottom: 88px;
  left: 10px;
  background: var(--butter);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  padding: 4px 10px 5px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: -0.01em;
  box-shadow: 2px 2px 0 var(--ink);
}

.roll-stage__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: clamp(10px, 1.5vw, 16px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 320ms ease 240ms, transform 320ms ease 240ms;
}
.roll-stage__actions.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.roll-stage__again {
  background: var(--forest);
  color: var(--bone);
  border-color: var(--ink);
}

/* --------------------------------------------------------------------------
   28. Region map — "Where are you roaming?" selector
   -------------------------------------------------------------------------- */

.region-map {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: clamp(48px, 6vw, 96px) var(--gutter) clamp(56px, 6vw, 80px);
  background: var(--blue-wash);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}
.region-map::before {
  /* A soft sun-wash up top for atmosphere. */
  content: "";
  position: absolute;
  top: -120px; right: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--butter) 0%, transparent 65%);
  opacity: 0.45;
  pointer-events: none;
}

.region-map__header {
  max-width: var(--content-max);
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 20px;
  row-gap: 6px;
  align-items: end;
}
.region-map__eyebrow {
  grid-column: 1 / -1;
  font-family: var(--font-mono-caps);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--ink);
  padding: 4px 10px;
  background: var(--butter);
  border: 1.5px solid var(--ink);
  align-self: start;
  justify-self: start;
}
.region-map__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 6vw + 1rem, 5rem);
  color: var(--forest);
  line-height: 0.9;
  letter-spacing: var(--track-tighter);
  margin: 0;
  text-transform: none;
}
.region-map__title .em { color: var(--magenta); }
.region-map__sub {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  font-size: clamp(1rem, 0.5vw + 0.95rem, 1.125rem);
  margin: 0;
  align-self: end;
  padding-bottom: 6px;
  max-width: 36ch;
}

.region-map__canvas {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
}

.region-map__svg {
  width: 100%;
  height: auto;
  max-height: 640px;
  aspect-ratio: 1000 / 907;
  display: block;
}

.region-map__sea {
  fill: transparent;
}

.region-map__island {
  color: var(--bone);
  filter: drop-shadow(8px 12px 0 rgba(20, 22, 15, 0.14));
}

.region-map__island-hatch {
  pointer-events: none;
}

/* Region wedges — a soft coloured disk per region, overlaid on the
   island. Each region gets its own palette swatch. */
.region-map__wedge {
  fill: var(--region-color, var(--clay));
  opacity: 0.0;
  transition: opacity 180ms ease;
  cursor: pointer;
  pointer-events: all;
}

.region-map__wedge.is-hover,
.region-map__wedge.is-selected {
  opacity: 0.55;
}

/* Pins — the pill-shaped labels.
   The outer `.region-map__pin-pos` group carries the SVG-coord translate.
   The inner `.region-map__pin` carries the CSS class + the entrance
   animation — this keeps the CSS `transform: translateY/scale` from
   clobbering the position translate above. */
.region-map__pin-pos {
  /* Kept free of CSS transforms so the positioning attribute stays intact. */
  pointer-events: auto;
}
.region-map__pin {
  cursor: pointer;
  outline: none;
  transform-box: fill-box;
  transform-origin: center;
  animation: rm-pin-in 480ms cubic-bezier(0.22, 1.1, 0.3, 1) both;
  /* Stagger entrance by pin index (set inline as --pin-i) — works for any
     number of regions. */
  animation-delay: calc(60ms + var(--pin-i, 0) * 60ms);
}

.region-map__pin-pill {
  fill: var(--bone);
  stroke: #14160F;
  stroke-width: 3;
  filter: drop-shadow(3px 3px 0 rgba(20, 22, 15, 0.95));
  transition: fill 160ms ease, transform 160ms ease;
}
.region-map__pin-name {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: var(--ink);
  pointer-events: none;
  dominant-baseline: middle;
}
.region-map__pin-count-bg {
  fill: var(--butter);
  stroke: #14160F;
  stroke-width: 2.5;
}
.region-map__pin-count {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 800;
  font-size: 15px;
  fill: var(--ink);
  dominant-baseline: middle;
  pointer-events: none;
}
.region-map__pin:focus-visible .region-map__pin-pill,
.region-map__pin.is-hover .region-map__pin-pill,
.region-map__pin.is-selected .region-map__pin-pill {
  fill: var(--forest);
  transform: translateY(-2px);
}
.region-map__pin:focus-visible .region-map__pin-name,
.region-map__pin.is-hover .region-map__pin-name,
.region-map__pin.is-selected .region-map__pin-name {
  fill: var(--butter);
}

/* Mobile tiles: render the same six regions as a responsive grid below
   the map. On small screens the SVG gets compressed and pins overlap —
   the tiles give a dependable tap target. */
.region-tiles {
  list-style: none;
  padding: 0;
  margin: 28px auto 0;
  max-width: var(--content-max);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) {
  .region-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .region-tiles { grid-template-columns: 1fr; }
}

.region-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 11px;
  background: var(--bone);
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease, background var(--t-fast) ease, color var(--t-fast) ease;
}
.region-tile:hover,
.region-tile:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
  outline: none;
}
.region-tile:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
/* Tile hover/selection wash uses the per-region colour set inline. */
.region-tile:hover,
.region-tile:focus-visible,
.region-tile.is-selected { background: var(--region-color, var(--clay)); color: var(--bone); }

.region-tile__corner {
  font-family: var(--font-mono-caps);
  font-size: 0.6875rem;
  font-weight: 700;
  opacity: 0.6;
  padding-right: 6px;
  border-right: 1.5px solid currentColor;
}
.region-tile__name { flex: 1 1 auto; }
.region-tile__count {
  display: inline-grid;
  place-items: center;
  min-width: 26px; height: 26px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--butter);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.region-tile:hover .region-tile__corner { opacity: 0.85; }

/* Dim map pins a bit on very narrow screens so they don't collide. */
@media (max-width: 520px) {
  .region-map__pin-pill { stroke-width: 2.5; }
  .region-map__pin-name { font-size: 18px; }
  .region-map__pin-count { font-size: 17px; }
}

/* --------------------------------------------------------------------------
   29. Kill old artifacts
   -------------------------------------------------------------------------- */

.scene,
.scene__blob,
.scene__motif,
.bg-blob { display: none !important; }
