/* ========================================
   SNAKE RECAP — story-format recap of a finished Slake Snake (static/js/race-recap.js).
   The section sits above the race panel (layouts/partials/race-day.html); the viewer is one overlay on <body>.
   Built on app.css / events.css tokens. Colours and glyphs come from the event's own artwork
   (the save-the-date sheet, static/images/snake-recap/): brand colours, so they don't change with the theme.
   AA: ink on pink / yellow / white, white on black. Never white text on pink; red is for fills and art only.
   ======================================== */

.rr {
  container-type: inline-size;
  --rr-pink: #F18174;
  --rr-yellow: #FAD24B;
  --rr-gold: #F5BD1A;
  --rr-red: #DE2A2E;
  --rr-orange: #F6B149;
  --rr-ink: #111;
  --rr-white: #fff;
  scroll-margin-top: var(--ev-sticky-top, 64px);
}

.rr h3 {
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}

/* The photo gallery's slot below the recap (static/js/snake-photos.js fills it): no flex gap while it's empty */
[data-snake-photos-gallery]:empty { display: none; }

/* ── Hero + Your Snake ─────────────────── */

.rr-top {
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 560px) {
  .rr-top.has-mine { grid-template-columns: 3fr 2fr; }
}

.rr-hero,
.rr-mine,
.rr-tile {
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.rr-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  min-height: 176px;
  padding: var(--space-5) calc(var(--space-4) + 112px) var(--space-5) var(--space-5);
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--rr-pink);
  color: var(--rr-ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: transform var(--dur-base, 200ms) var(--ease-out, ease), box-shadow var(--dur-base, 200ms);
}

.rr-hero:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28); }
.rr-hero:focus-visible,
.rr-mine:focus-visible,
.rr-tile:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.rr-hero-kicker {
  padding: 0.15rem 0.45rem;
  background: var(--rr-ink);
  color: var(--rr-white);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rr-hero-title {
  font-weight: 700;
  font-size: clamp(2rem, 1.4rem + 3vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.rr-hero-stats {
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.rr-nowrap { white-space: nowrap; }

.rr-hero-play {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--rr-ink);
  color: var(--rr-white);
  font-size: var(--text-sm);
  font-weight: 700;
}

.rr-hero > span { position: relative; z-index: 1; }

/* the snake on a bike, in its own column on the right (the hero's right padding keeps text clear of it) */
.rr-hero-art {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  width: 112px;
  height: auto;
  transform: translateY(-50%) rotate(4deg);
  pointer-events: none;
}

.rr-mine {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--ev-coral-line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  transition: background var(--dur-fast, 120ms);
}

.rr-mine:hover { background: var(--surface-3); }

.rr-mine-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.rr-mine-title {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text-strong);
}

.rr-mine-sub { font-size: var(--text-sm); color: var(--text-default); font-variant-numeric: tabular-nums; }
.rr-mine-lock { font-size: var(--text-xs); color: var(--text-subtle); }
.rr-mine-play { color: var(--rr-pink); }

/* ── Podium rows (story bubbles): the top 3 per row, three equal columns, nothing to scroll ── */

.rr-rows {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

/* Room for all three rows side by side (a wide column): one calm band of podiums */
@container (min-width: 54rem) {
  .rr-rows { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
}

.rr-row { min-width: 0; }

.rr-row-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-subtle);
  margin-bottom: var(--space-2) !important;
}
.rr-row-sponsor { display: block; font-size: var(--text-xs); font-weight: 500; opacity: 0.85; }

.rr-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.rr-tiles > li { min-width: 0; }

.rr-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  width: 100%;
  padding: var(--space-1) 2px;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
}

.rr-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 200deg, var(--rr-yellow), var(--rr-pink), var(--rr-red), var(--rr-yellow));
}

.is-seen .rr-ring { background: var(--border-strong); }

.rr-avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--bg-color, #576C5C);
  background: var(--rr-ink);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.rr-tile-rank {
  position: absolute;
  right: -2px;
  bottom: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--rr-yellow);
  color: var(--rr-ink);
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 2px solid var(--bg-color, #576C5C);
}

.rr-tile-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-strong);
}

.rr-tile-val {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

.rr-tile:hover .rr-avatar { background: #2a2a2a; }

/* ========================================
   VIEWER
   ======================================== */

html.rr-open,
html.rr-open body { overflow: hidden; }

.rr-viewer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 16, 13, 0.94);
  font-family: var(--font-sans, 'Tide Sans', 'Poppins', system-ui, sans-serif);
}

.rr-viewer[hidden] { display: none; }
.rr-viewer *, .rr-viewer *::before, .rr-viewer *::after { box-sizing: border-box; }

.rr-story {
  --rr-bg: #F18174;
  --rr-fg: #111;
  --rr-soft: rgba(17, 17, 17, 0.86);
  --rr-accent: #111;
  --rr-pop: #fff;
  --rr-track: rgba(17, 17, 17, 0.14);
  --rr-kbg: #111;
  --rr-kfg: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  container-type: size;
  background: var(--rr-bg);
  color: var(--rr-fg);
  transition: background-color 0.35s ease;
}

@media (min-width: 600px) {
  .rr-story {
    height: min(92vh, 880px);
    height: min(92dvh, 880px);
    width: calc(min(92dvh, 880px) * 9 / 16);
    min-width: 320px;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}

/* Card colours: one per card, picked in race-recap.js. Mostly pink, black and white; yellow now and then.
   --rr-accent is for text (AA on its card); --rr-pop is for fills and highlights only; --rr-kbg/kfg the label bars. */
.rr-bg-pink   { --rr-bg: #F18174; --rr-fg: #111; --rr-soft: rgba(17, 17, 17, 0.86); --rr-accent: #111; --rr-pop: #fff; --rr-track: rgba(17, 17, 17, 0.14); --rr-kbg: #111; --rr-kfg: #fff; }
.rr-bg-black  { --rr-bg: #111; --rr-fg: #fff; --rr-soft: rgba(255, 255, 255, 0.82); --rr-accent: #FAD24B; --rr-pop: #FAD24B; --rr-track: rgba(255, 255, 255, 0.2); --rr-kbg: #FAD24B; --rr-kfg: #111; }
.rr-bg-white  { --rr-bg: #fff; --rr-fg: #111; --rr-soft: rgba(17, 17, 17, 0.78); --rr-accent: #111; --rr-pop: #DE2A2E; --rr-track: rgba(17, 17, 17, 0.1); --rr-kbg: #111; --rr-kfg: #fff; }
.rr-bg-yellow { --rr-bg: #FAD24B; --rr-fg: #111; --rr-soft: rgba(17, 17, 17, 0.84); --rr-accent: #111; --rr-pop: #DE2A2E; --rr-track: rgba(17, 17, 17, 0.14); --rr-kbg: #111; --rr-kfg: #fff; }

/* ── Progress + header ─────────────────── */

.rr-progress {
  display: flex;
  gap: 4px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 0;
  position: relative;
  z-index: 3;
}

.rr-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--rr-track);
  overflow: hidden;
}

.rr-seg-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--rr-fg);
  transform-origin: left center;
  transform: scaleX(0);
}

.rr-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 6px 0 14px;
}

.rr-head-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rr-icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--rr-fg);
  font-size: 1.05rem;
  cursor: pointer;
}

.rr-icon-btn:hover { background: var(--rr-track); }
.rr-icon-btn:focus-visible { outline: 2px solid var(--rr-fg); outline-offset: -4px; }

/* ── Stage + card ──────────────────────── */

.rr-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.rr-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}

.rr-nav--prev { left: 0; cursor: w-resize; }
.rr-nav--next { right: 0; cursor: e-resize; }
.rr-nav:focus-visible { outline: 2px dashed var(--rr-fg); outline-offset: -8px; }

/* Above the tap zones so a card's own button (Share your shots) is reachable; everything else taps through */
.rr-card { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.rr-card .rr-action { pointer-events: auto; }

.rr-card-in {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(6px, 1.4cqh, 14px);
  height: 100%;
  padding: 4cqh 7cqw 16cqh;
  overflow: hidden;
  animation: rr-in 0.4s var(--ease-out, ease) both;
}

@keyframes rr-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.rr-card-in > * { margin: 0; position: relative; z-index: 1; }

.rr-kicker {
  align-self: flex-start;
  padding: 0.2em 0.5em 0.15em;
  background: var(--rr-kbg);
  color: var(--rr-kfg);
  font-size: clamp(0.74rem, 3.4cqw, 0.98rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* The poster's closing strip: "SEE YOU @ SLAKE SNAKE 2027!" */
.rr-banner {
  align-self: stretch;
  padding: 0.4em 0.6em 0.35em;
  background: var(--rr-kbg);
  color: var(--rr-kfg);
  font-size: clamp(0.95rem, 4.6cqw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

/* Glyphs from the artwork: in the flow, so they never sit on top of text or numbers */
.rr-art { display: block; height: auto; pointer-events: none; }
.rr-card-in > .rr-glyph { align-self: flex-start; width: auto; max-width: 62%; height: 20cqh; margin-bottom: 0.5cqh !important; }
.rr-card-in > .rr-art--snake-bike { height: 27cqh; }
.rr-card-in > .rr-art--checker { height: 13cqh; }
.rr-card-in > .rr-art--slow-slow { height: 22cqh; }
.rr-card-in > .rr-strip { align-self: center; width: 78%; max-width: 360px; margin-top: 1.5cqh !important; }
/* a card with art drops the drawn snake and the room kept for it */
.rr-card-in:has(.rr-art) { padding-bottom: 7cqh; }
.rr-card-in:has(.rr-art) > .rr-card-snake { display: none; }

.rr-card-in .rr-title {
  font-size: clamp(1.5rem, 8.4cqw, 2.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--rr-fg);
}

.rr-big {
  font-size: clamp(3.4rem, 25cqw, 7.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  animation: rr-pop 0.5s var(--ease-out, ease) 0.05s both;
}

.rr-big--s { font-size: clamp(2.6rem, 17cqw, 5.2rem); }

@keyframes rr-pop {
  from { transform: scale(0.86); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.rr-pre,
.rr-unit {
  font-size: 0.36em;
  letter-spacing: 0;
  font-weight: 600;
}

.rr-pre { margin-right: 0.04em; vertical-align: 0.9em; }
.rr-unit { margin-left: 0.18em; }

.rr-sub {
  font-size: clamp(1.02rem, 5cqw, 1.35rem);
  line-height: 1.3;
  font-weight: 500;
}

.rr-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  list-style: none;
  font-size: clamp(0.92rem, 4.3cqw, 1.12rem);
  line-height: 1.35;
  color: var(--rr-soft);
}

.rr-lines strong,
.rr-rank strong,
.rr-thanks strong { color: var(--rr-fg); font-weight: 700; }

.rr-or { opacity: 0.75; font-size: 0.9em; }

.rr-eq {
  font-size: clamp(0.85rem, 3.8cqw, 1rem);
  color: var(--rr-soft);
  margin-top: 4px !important;
}

.rr-rank {
  font-size: clamp(1rem, 4.8cqw, 1.3rem);
}

.rr-note {
  font-size: clamp(0.72rem, 3.2cqw, 0.85rem);
  color: var(--rr-soft);
  line-height: 1.35;
}

.rr-tag,
.rr-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill, 999px);
  background: var(--rr-fg);
  color: var(--rr-bg);
  font-size: clamp(0.78rem, 3.5cqw, 0.95rem);
  font-weight: 700;
}

.rr-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.rr-cta {
  font-size: clamp(0.85rem, 3.8cqw, 1rem);
  color: var(--rr-soft);
  margin-top: 1cqh !important;
}

.rr-thanks {
  font-size: clamp(0.85rem, 3.9cqw, 1.02rem);
  line-height: 1.4;
  color: var(--rr-soft);
}

.rr-emoji-row {
  font-size: clamp(1.4rem, 7.5cqw, 2.2rem);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.rr-avatar-xl {
  display: grid;
  place-items: center;
  width: clamp(84px, 30cqw, 128px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.8rem, 10cqw, 3rem);
  box-shadow: inset 0 0 0 6px #FAD24B;
}

/* Sparkline */
.rr-spark { margin-top: 8px !important; }
.rr-spark svg { display: block; width: 100%; height: clamp(70px, 16cqh, 140px); }
.rr-spark rect { fill: var(--rr-fg); opacity: 0.4; }
.rr-spark rect.is-hi { fill: var(--rr-pop); opacity: 1; }
.rr-spark-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--rr-soft);
  font-variant-numeric: tabular-nums;
}

/* Winning times, year by year */
.rr-years {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  list-style: none;
}
.rr-years li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--rr-track);
  font-size: clamp(1rem, 4.8cqw, 1.3rem);
  font-variant-numeric: tabular-nums;
}
.rr-years-y { font-weight: 600; }
.rr-years-t { font-weight: 700; }
.rr-years li.is-hi { background: var(--rr-fg); color: var(--rr-bg); }

/* Two times side by side */
.rr-duo {
  display: grid;
  gap: clamp(10px, 2.4cqh, 22px);
}

.rr-duo > div { display: flex; flex-direction: column; gap: 2px; }
.rr-duo-label { font-size: clamp(0.85rem, 4cqw, 1.05rem); color: var(--rr-soft); font-weight: 600; }
.rr-duo-val {
  font-size: clamp(2.4rem, 15cqw, 4.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Lists: podium, knockout path, champions, sponsors, summary */
.rr-podium,
.rr-ko,
.rr-champs,
.rr-sponsors {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.rr-pod {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--rr-track);
  font-size: clamp(1rem, 4.8cqw, 1.3rem);
}

.rr-pod-rank {
  display: grid;
  place-items: center;
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
  background: var(--rr-fg);
  color: var(--rr-bg);
  font-weight: 700;
  font-size: 0.85em;
}

.rr-pod--1 .rr-pod-rank { background: #FAD24B; color: #111; }
.rr-pod--2 .rr-pod-rank { background: #fff; color: #111; }
.rr-pod--3 .rr-pod-rank { background: #F6B149; color: #111; }
.rr-pod-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-pod-val { font-variant-numeric: tabular-nums; white-space: nowrap; }

.rr-ko li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--rr-track);
  font-size: clamp(0.9rem, 4.2cqw, 1.1rem);
}

.rr-ko-round { grid-column: 1 / -1; font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rr-soft); }
.rr-ko-vs { font-weight: 600; }
.rr-ko-res { font-weight: 700; }
.rr-ko .is-won .rr-ko-res { color: var(--rr-accent); }
.rr-ko .is-lost { opacity: 0.8; }
.rr-ko .is-open .rr-ko-res { color: var(--rr-soft); font-weight: 600; }

/* Card button (Share your shots) */
.rr-action-row { margin-top: 1.5cqh !important; }
.rr-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.25rem;
  border: 0;
  border-radius: var(--radius-pill, 999px);
  background: var(--rr-fg);
  color: var(--rr-bg);
  font: inherit;
  font-size: clamp(0.95rem, 4.4cqw, 1.1rem);
  font-weight: 700;
  cursor: pointer;
}
.rr-action[hidden] { display: none; }
.rr-action:focus-visible { outline: 3px solid var(--rr-fg); outline-offset: 3px; }

.rr-champs li {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--rr-track);
}

.rr-champ-cat { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rr-soft); font-weight: 600; }
.rr-champ-name { font-size: clamp(1.6rem, 9cqw, 2.4rem); font-weight: 700; color: var(--rr-accent); line-height: 1.1; }
.rr-champ-sub { font-size: clamp(0.85rem, 3.8cqw, 1rem); color: var(--rr-soft); }

/* Thank you card: Slake Brewing as the feature block; Visit The County and Doug’s Bikes a block each;
   then identical tiles for everyone else, two to a row */
.rr-feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  color: #111;
  box-shadow: 4px 4px 0 #111;
}

.rr-feature-label {
  align-self: flex-start;
  padding: 0.15em 0.45em;
  background: #111;
  color: #fff;
  font-size: clamp(0.68rem, 3cqw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.rr-feature-row { display: flex; align-items: center; gap: 12px; }
/* the wordmark is low resolution: keep it at its 2× size or smaller, on white */
.rr-feature-logo { flex: none; width: 86px; height: auto; }
.rr-feature-role { font-size: clamp(0.85rem, 3.9cqw, 1.02rem); line-height: 1.3; font-weight: 500; }

.rr-sponsors {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.rr-sponsors li {
  flex: 0 0 calc(50% - 4px);
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(2.4em + 16px);
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--rr-track);
  text-align: center;
  font-size: clamp(0.92rem, 4.3cqw, 1.12rem);
  font-weight: 700;
  line-height: 1.2;
}

/* Supported by Visit The County (in their brand: deep green on their mint) and Doug’s Bikes, prize sponsor
   (no logo): side by side under Slake, each its own block */
.rr-partners {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rr-partner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px 12px;
  border-radius: 14px;
  box-shadow: 4px 4px 0 #111;
}

.rr-partner-label {
  align-self: flex-start;
  padding: 0.15em 0.45em;
  font-size: clamp(0.62rem, 2.8cqw, 0.76rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.rr-partner--vtc { background: #DEEEEA; color: #003D2E; }
.rr-partner--vtc .rr-partner-label { background: #003D2E; color: #fff; }
.rr-vtc-logo { display: block; width: 100%; max-width: 170px; height: auto; }

.rr-partner--prize { background: #111; color: #fff; }
.rr-partner--prize .rr-partner-label { background: #FAD24B; color: #111; }
.rr-prize-name {
  font-size: clamp(1.25rem, 6.4cqw, 1.7rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

/* Fuel check: a couple of big, playful treat lines */
.rr-treats {
  font-size: clamp(1.15rem, 5.6cqw, 1.5rem);
  color: var(--rr-fg);
  gap: 6px;
}

.rr-sum {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 0;
}

.rr-sum > div {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--rr-track);
}

.rr-sum dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rr-soft); }
.rr-sum dd { margin: 2px 0 0; font-size: clamp(1.1rem, 5.6cqw, 1.6rem); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Decorative snake on every card */
.rr-card-snake {
  position: absolute !important;
  right: 5%;
  bottom: 3cqh;
  width: 68%;
  z-index: 0 !important;
  opacity: 0.2;
  pointer-events: none;
}

.rr-snake-body {
  fill: none;
  stroke: currentColor;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 320;
  stroke-dashoffset: 0;
  animation: rr-slither 1.1s var(--ease-out, ease) both;
}

.rr-snake-head { fill: currentColor; }
.rr-snake-eye { fill: var(--rr-bg, #F18174); }
.rr-snake-tongue { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

@keyframes rr-slither { from { stroke-dashoffset: 320; } to { stroke-dashoffset: 0; } }

/* Hold: a little "paused" cue */
.rr-viewer.is-held .rr-head,
.rr-viewer.is-held .rr-progress { opacity: 0.35; transition: opacity 0.2s; }

/* Toast */
.rr-toast {
  position: absolute;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  margin: 0;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill, 999px);
  background: rgba(15, 20, 16, 0.92);
  color: #fff;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  text-align: center;
}

.rr-toast[hidden] { display: none; }

/* ── Reduced motion: no animation, instant colour changes ── */
@media (prefers-reduced-motion: reduce) {
  .rr-story { transition: none; }
  .rr-card-in,
  .rr-big,
  .rr-snake-body { animation: none; }
  .rr-hero { transition: none; }
  .rr-hero:hover { transform: none; }
}

/* ── Photos (static/js/snake-photos.js gallery): "Photos from the day", "Spotted on the Snake" ── */

.rr-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6cqw;
  margin: 0.6cqh 0 0 !important;
  padding: 0;
  list-style: none;
}
.rr-mosaic--1 { grid-template-columns: 1fr; }
.rr-mosaic--2,
.rr-mosaic--4 { grid-template-columns: repeat(2, 1fr); }
.rr-mosaic--5 li:first-child { grid-row: span 2; }

.rr-photo {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 3px solid var(--rr-fg);
  background: var(--rr-track);
  overflow: hidden;
  cursor: zoom-in;
  pointer-events: auto;
}
.rr-mosaic--1 .rr-photo { aspect-ratio: 4 / 3; }
.rr-mosaic--5 li:first-child .rr-photo { aspect-ratio: auto; }
.rr-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.rr-photo:disabled { cursor: default; }
.rr-photo:focus-visible { outline: 3px solid var(--rr-pop); outline-offset: 2px; }

.rr-photo-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(17, 17, 17, 0.62);
  color: #fff;
  font-size: clamp(1.1rem, 6cqw, 1.6rem);
  font-weight: 800;
}

.rr-photo-credit {
  font-size: clamp(0.78rem, 3.6cqw, 0.95rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--rr-soft);
}

/* "Download my photos" on "Spotted on the Snake" (one zip, built by static/js/snake-photos.js) */
.rr-dl-row { margin-top: 1.2cqh !important; }
.rr-dl-ico { flex: none; display: block; }
.rr-action.is-busy { cursor: progress; font-variant-numeric: tabular-nums; }
.rr-dl-note {
  min-height: 1.3em;
  margin-top: 0.6cqh !important;
  font-size: clamp(0.78rem, 3.6cqw, 0.95rem);
  font-weight: 700;
  line-height: 1.3;
}
.rr-dl-note:empty { display: none; }
