/* Self-hosted Patrick Hand (OFL) — main font, from .local/patrick-hand.zip.
 * Subset from PatrickHand-Regular.ttf (400 only); bold weights synthesize. */
@font-face {
  font-family: "Patrick Hand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/patrick-hand-ext.ttf") format("truetype");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Patrick Hand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/patrick-hand-latin.ttf") format("truetype");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Painting With Chocolate (freeware, mooze) — merch teaser title on the
 * lander, from .local/painting-with-chocolate.zip. Single latin subset;
 * missing glyphs (ÄÖÜß–) fall back to Patrick Hand. */
@font-face {
  font-family: "Painting With Chocolate";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/painting-with-chocolate-latin.ttf") format("truetype");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Self-hosted Caveat variable (OFL) — currently unused, kept for future accents. */
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/caveat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/caveat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #f4f4f1;
  --text: #161615;
  --muted: #55554f;
  --border: #dededb;
  --btn: #161615;
  --btn-text: #ffffff;
  /* Focus ring — used globally via :focus-visible */
  --focus-ring: 0 0 0 3px rgba(22, 22, 21, 0.18);
  /* Shared easing for micro-interactions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Brand-coloured text selection */
::selection {
  background: rgba(22, 22, 21, 0.12);
  color: var(--text);
}

* { box-sizing: border-box; }

/* Global focus-visible ring — replaces the browser default blue outline
 * with a subtle dark ring that matches the palette. Interactive elements
 * that need a different ring (e.g. viewer buttons) override this locally. */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

html {
  overflow-x: hidden;
  scrollbar-width: none; /* Firefox: hide scrollbar, page still scrolls */
  -ms-overflow-style: none; /* legacy Edge/IE */
}

/* Chromium/Safari: hide scrollbar, page still scrolls */
::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  font-family: "Patrick Hand", "Segoe Print", "Bradley Hand", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  /* Remove the grey tap flash on iOS for all clickable elements */
  -webkit-tap-highlight-color: transparent;
}

/* Entire background is the container — no card for the hero. */
.wrap {
  width: 100%;
  max-width: 620px;
  padding: 96px 24px 72px;
  text-align: center;
}

/* Hero fills 90% of the viewport height and centers its content.
 * Positioned: the scroll hint pins to its bottom edge. */
.hero {
  position: relative;
  min-height: 90vh;
  min-height: 90svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 24px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--muted);
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1.error-code {
  font-size: clamp(56px, 10vw, 84px);
}

.sub {
  margin: 0 auto 40px;
  max-width: 34ch;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
  text-wrap: balance;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  display: block;
  padding: 15px 28px;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out);
  cursor: pointer;
  border: none;
}

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn:hover    { opacity: 0.82; }
.btn:active   { transform: scale(0.97); opacity: 0.9; }
.btn:focus-visible {
  box-shadow: var(--focus-ring);
  border-radius: 999px;
}

/* Social/API links as a numbered directory — hairline rows with index,
 * title + description and an external arrow. No cards, no lift. */

.more {
  margin: 56px 0 0;
  padding-top: 36px;
  border-top: 2px dashed var(--border);
  text-align: left;
}

.more h2 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.more ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.more li {
  border-bottom: 1px solid var(--border);
}

.more a {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-block: 2px;
  padding: 13px 8px;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.more a:hover { background: rgba(22, 22, 21, 0.04); }
.more a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.more__index {
  flex-shrink: 0;
  min-width: 28px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.more__text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.more__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  text-wrap: balance;
}

.more__desc {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.5;
  text-wrap: pretty;
}

.more__arrow {
  flex-shrink: 0;
  color: var(--muted);
  opacity: 0.45;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.more a:hover .more__arrow,
.more a:focus-visible .more__arrow {
  opacity: 1;
  color: var(--text);
}

.more__all {
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.more__all a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  border-radius: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.more__all a:hover {
  color: var(--text);
  border-color: var(--text);
}
.more__all a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ─── Stories Section ───────────────────────────────────────────────────── */

.stories {
  margin: 40px 0 0;
}

.stories h2 {
  margin: 0 0 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Deck container.
 * --card-w is the single source of truth for card size: the deck height is
 * derived from it (card height 16/9 + fan spread + slack), so both scale
 * together on small screens instead of drifting apart.
 *
 * Mobile-first sizing strategy:
 *  - Phone  (<480px): card fills ~60vw — feels like a real story preview
 *  - Tablet (480-620px): fixed 220px — comfortable and prominent
 *  - Desktop (>620px): 200px — balanced within the 620px max-width layout
 *
 * The deck's max-width must accommodate the card plus the rightmost fan cards
 * (3 cards at 10px offset each = +30px) plus some breathing room. */
.story-deck {
  --card-w: 200px;
  position: relative;
  height: calc(var(--card-w) * 16 / 9 + 72px);
  max-width: 460px;
  margin: 0 auto;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* Touch starting on a card claims the whole gesture (JS toggles this for
 * touch pointers only): the page never steals vertical drags mid-swipe.
 * Removed on release/cancel/open, so scrolling from outside the cards and
 * with mouse/pen always keeps working. */
.story-deck.no-scroll { touch-action: none; }

/* ── Cards ── */
/* Latest story (--i: 0) is on top via z-index. Background cards fan below. */
.story-card {
  position: absolute;
  left: 50%;
  top: 0;
  display: block;
  width: var(--card-w, 200px);
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.55);
  background: var(--bg);
  /* Layered shadow: soft spread + crisp focus */
  box-shadow:
    0 2px 8px rgba(22, 22, 21, 0.06),
    0 12px 32px rgba(22, 22, 21, 0.16);
  z-index: calc(var(--n, 1) - var(--i, 0));
  transform:
    translateX(-50%)
    translate(
      calc(min(var(--i, 0), 3) * 10px - 15px),
      calc(min(var(--i, 0), 3) * 14px)
    )
    rotate(calc((min(var(--i, 0), 3) - 1.2) * 4.5deg));
  transition:
    transform 0.38s cubic-bezier(.22,.68,0,1.2),
    opacity   0.38s ease,
    box-shadow 0.25s ease;
  cursor: pointer;
  outline: none;
}

/* Top card: lift on hover, focus ring on keyboard focus */
.story-card:first-child {
  outline: none;
}

.story-card:first-child:hover {
  /* Keep the resting fan offset (-15px, -5.4deg) and only add lift + scale,
   * otherwise the card visibly jumps sideways when hovered. */
  transform: translateX(-50%) translate(-15px, -10px) rotate(-5.4deg) scale(1.025);
  box-shadow:
    0 4px 12px rgba(22, 22, 21, 0.08),
    0 20px 48px rgba(22, 22, 21, 0.22);
}

.story-card:first-child:focus-visible {
  transform: translateX(-50%) translate(-15px, -10px) rotate(-5.4deg) scale(1.025);
  box-shadow:
    0 4px 12px rgba(22, 22, 21, 0.08),
    0 20px 48px rgba(22, 22, 21, 0.22),
    var(--focus-ring);
}

.story-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Dragging state — disable transition for 1:1 tracking */
.story-card.dragging {
  transition: none;
  cursor: grabbing;
}

/* Leaving animation — card flies out */
.story-card.leaving {
  transition: transform 0.38s ease, opacity 0.38s ease;
  pointer-events: none;
}

/* ── Auto-advance shimmer on top card ── */
.story-card:first-child::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: var(--adv-pct, 0%);
  height: 3px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0 2px 0 0;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── Counter badge ── */
.story-deck__counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.story-deck__count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.story-deck__dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.25s ease, transform 0.25s ease;
}

.story-deck__dot--current {
  background: var(--text);
  transform: scale(1.3);
}

/* Hint text below the counter */
.story-hint {
  margin: 60px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  opacity: 0.7;
  letter-spacing: 0.02em;
}

/* ── Mobile: card fills most of the viewport width ──
 * On phones the deck is the hero of the page — give it real estate.
 * clamp(180px, 60vw, 240px) means:
 *   ≤300px wide phone  → 180px card (still comfortable)
 *   375px iPhone       → 225px card
 *   430px iPhone Pro   → 240px card (capped)
 * The deck max-width is removed so it can breathe; the card width already
 * self-limits. Extra bottom space ensures counter + hint never clip. */
@media (max-width: 480px) {
  .story-deck {
    --card-w: clamp(180px, 60vw, 240px);
    max-width: 100%;
  }
  .story-card {
    border-radius: 18px;
  }
  .story-hint {
    margin-top: 56px;
  }
}

/* ── Small tablet / large phone: step up to 220px ── */
@media (min-width: 481px) and (max-width: 620px) {
  .story-deck {
    --card-w: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-card,
  .story-card:first-child::after { transition: none; }
}

/* ─── Story Lightbox Viewer ──────────────────────────────────────────────── */

.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Entry animation */
  animation: sv-in 0.22s ease forwards;
}

@keyframes sv-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.story-viewer[hidden] { display: none !important; }

/* Progress bar */
.story-viewer__progress-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.2);
  z-index: 10;
}

.story-viewer__progress-bar {
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* Close button */
.story-viewer__close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top, 16px));
  right: 16px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease;
}

.story-viewer__close:hover { background: rgba(255,255,255,0.25); }
.story-viewer__close:focus-visible {
  background: rgba(255,255,255,0.25);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.5);
  border-radius: 50%;
}

/* Counter chip (e.g. "3 / 6") */
.story-viewer__counter {
  position: absolute;
  top: max(20px, calc(env(safe-area-inset-top, 0px) + 20px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
  pointer-events: none;
  white-space: nowrap;
}

/* Media area — fills the screen (portrait constraint) */
.story-viewer__media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-viewer__media img,
.story-viewer__media video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 0;
}

/* Contain to story aspect ratio on wider viewports */
@media (min-width: 500px) {
  .story-viewer__media img,
  .story-viewer__media video {
    max-width: min(100vw, calc(100vh * 9 / 16));
    max-height: 100vh;
    border-radius: 12px;
  }
}

/* Navigation arrows — visible on desktop/tablet, hidden on touch-only phones
 * where the tap zones (left 40% / right 40%) handle navigation instead. */
.story-viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, opacity 0.2s ease;
}

.story-viewer__nav:hover { background: rgba(255,255,255,0.25); }
.story-viewer__nav:focus-visible {
  background: rgba(255,255,255,0.25);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.5);
  border-radius: 50%;
}

.story-viewer__nav:disabled {
  opacity: 0.25;
  cursor: default;
}

.story-viewer__nav--prev { left: 12px; }
.story-viewer__nav--next { right: 12px; }

/* On mobile, tap zones handle navigation — hide arrows to keep UI clean */
@media (max-width: 480px) and (pointer: coarse) {
  .story-viewer__nav { display: none; }
  /* Wider volume slider — 90px is fiddly for thumbs */
  .story-viewer__vol-slider { width: 120px; }
}

/* Tap zones (invisible) for full-height prev/next navigation */
.story-viewer__tap-prev,
.story-viewer__tap-next {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  z-index: 5;
  cursor: pointer;
}

.story-viewer__tap-prev { left: 0; }
.story-viewer__tap-next { right: 0; }

/* Volume control row — bottom-centre of viewer */
.story-viewer__volume {
  position: absolute;
  bottom: max(20px, env(safe-area-inset-bottom, 20px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 8px 14px 8px 10px;
}

.story-viewer__vol-btn {
  border: none;
  background: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.story-viewer__vol-btn:focus-visible {
  outline: 2px solid rgba(255,255,255,0.6);
  border-radius: 4px;
}

/* Range slider — custom cross-browser */
.story-viewer__vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.3);
  outline: none;
  cursor: pointer;
  accent-color: #fff; /* modern browsers */
}

.story-viewer__vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.story-viewer__vol-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Hide volume row for image stories (controlled via JS .vol-hidden class) */
.story-viewer__volume.vol-hidden {
  display: none;
}

/* The speaker icons are inline <svg> — enforce [hidden] explicitly so a
 * missing/expired UA rule can never leave both icons visible at once
 * (JS toggles the content attribute, see syncVolUI in stories.js). */
.story-viewer__volume [hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .story-viewer { animation: none; }
  .story-viewer__progress-bar { transition: none; }
  .btn { transition: none; }
  .more a { transition: none; }
}


/* ─── Language Switcher ────────────────────────────────────────────────── */

.lang {
  margin-top: 36px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.lang a {
  color: inherit;
  text-decoration: none;
  padding: 10px 14px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.lang a:hover {
  color: var(--text);
  background: rgba(22, 22, 21, 0.06);
}

.lang a[aria-current="true"] {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.lang a:focus-visible {
  box-shadow: var(--focus-ring);
  color: var(--text);
}

/* ─── Footer ──────────────────────────────────────────────────────────────
 * Unified site footer: brand line, pill legal links, provider credits.
 * Same markup on every page. No cards, pill language matches .btn. */

.site-footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.site-footer__brand {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.site-footer__brand a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  border-radius: 2px;
  transition: color 0.15s ease;
}

.site-footer__brand a:hover { color: var(--muted); }
.site-footer__brand a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.site-footer__legal {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.site-footer__legal a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.site-footer__legal a:hover {
  color: var(--text);
  border-color: var(--text);
  background: rgba(22, 22, 21, 0.04);
}
.site-footer__legal a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 999px;
}

.site-footer__credits {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.7;
  text-wrap: balance;
}

.site-footer__credits a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  border-radius: 2px;
  transition: color 0.15s ease;
}

.site-footer__credits a:hover { color: var(--text); }
.site-footer__credits a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ─── Merch Teaser (landing page) ──────────────────────────────────────────
 * Clean open duo — no card, lots of air. Marker title, bundle shot + small
 * worn lifestyle shot (getragen) offset into whitespace via margins (never
 * translateY), muted caption, pill CTA. Hover is scale-only. */

.merch-teaser {
  margin: 72px 0 0;
  padding: 44px 0 8px;
  border-top: 2px dashed var(--border);
  text-align: center;
}

.merch-teaser__title {
  margin: 0 0 10px;
  font-family: "Painting With Chocolate", "Patrick Hand", "Segoe Print", cursive;
  font-weight: 400;
  font-size: clamp(40px, 10vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
  text-wrap: balance;
  rotate: -1deg;
}

.merch-teaser__sub {
  margin: 0 auto;
  max-width: 38ch;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  text-wrap: balance;
}

/* Open stage: the two photos share one airy canvas. */
.merch-teaser__stage {
  margin: 28px auto 0;
  max-width: 480px;
}

.merch-teaser__main,
.merch-teaser__worn {
  display: block;
  line-height: 0;
  text-decoration: none;
}
.merch-teaser__main:focus-visible,
.merch-teaser__worn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.merch-teaser__main img,
.merch-teaser__worn img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #ececea;
  transition: transform 0.3s var(--ease-out);
}

.merch-teaser__main img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 30%;
}

.merch-teaser__main:hover img { transform: scale(1.015); }

/* Worn lifestyle shot: small, neatly offset over the main photo's corner
 * with negative margin (no translateY). */
.merch-teaser__worn {
  width: min(44%, 200px);
  margin: -64px 4px 0 auto;
}

.merch-teaser__worn img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(22, 22, 21, 0.14);
}

.merch-teaser__worn:hover img { transform: scale(1.03); }

.merch-teaser__body { padding: 20px 4px 0; }

.merch-teaser__cta {
  display: inline-block;
  text-align: center;
  min-width: 220px;
}

.merch-teaser__note {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

@media (min-width: 640px) {
  .merch-teaser__title { font-size: 60px; }
  .merch-teaser__sub { font-size: 16px; }
  .merch-teaser__stage {
    max-width: 560px;
    min-height: 400px;
  }
  /* Desktop: calm diagonal — main left, worn floating right and lower,
   * surrounded by whitespace. */
  .merch-teaser__main { width: min(68%, 380px); }
  .merch-teaser__main img { aspect-ratio: 1 / 1; }
  .merch-teaser__worn {
    width: 210px;
    margin: -160px 0 0 auto;
  }
  .merch-teaser__body { padding-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .merch-teaser__main img,
  .merch-teaser__worn img { transform: none; transition: none; }
  .merch-teaser__title { rotate: 0deg; }
}

/* ─── Merch Lightbox (Amazon-inspired) ───────────────────────────────────
 * Light commerce viewer, not a dark photo overlay: dim backdrop + white
 * dialog, thumbnail rail on the left (Amazon signature), large stage in
 * the centre, counter + close in the header. Vertical centring uses flex
 * and margin:auto — never translateY(). */

.merch-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.merch-lightbox[hidden] { display: none !important; }

.merch-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 17, 0.62);
  cursor: zoom-out;
}

.merch-lightbox__dialog {
  position: relative;
  z-index: 2;
  width: min(94vw, 960px);
  max-height: min(90vh, 860px);
  max-height: min(90svh, 860px);
  background: #fff;
  color: var(--text);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  animation: mlb-in 0.22s var(--ease-out);
}

@keyframes mlb-in {
  from { opacity: 0; scale: 0.98; }
  to { opacity: 1; scale: 1; }
}

.merch-lightbox__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.merch-lightbox__count {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.merch-lightbox__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}

.merch-lightbox__close {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.merch-lightbox__close:hover { background: rgba(22, 22, 21, 0.06); border-color: var(--text); }
.merch-lightbox__close:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.merch-lightbox__main {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  min-height: 0;
  flex: 1;
}

.merch-lightbox__rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  min-height: 0;
  max-height: 100%;
  scrollbar-width: none;
}
.merch-lightbox__rail::-webkit-scrollbar { display: none; }
.merch-lightbox__rail li { flex-shrink: 0; }

.merch-lightbox__thumb {
  display: block;
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f1f1ee;
  line-height: 0;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.merch-lightbox__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.merch-lightbox__thumb:hover { opacity: 1; border-color: var(--text); }
.merch-lightbox__thumb:focus-visible { outline: none; box-shadow: var(--focus-ring); opacity: 1; }
.merch-lightbox__thumb[aria-current="true"] {
  opacity: 1;
  border: 2px solid var(--text);
  box-shadow: 0 0 0 2px rgba(22, 22, 21, 0.12);
}

.merch-lightbox__stage {
  position: relative;
  margin: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: #f4f4f1;
  border: 1px solid var(--border);
  overflow: hidden;
}

.merch-lightbox__imgwrap {
  position: relative;
  flex: 1;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.merch-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: min(58vh, 560px);
  max-height: min(58svh, 560px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  -webkit-user-drag: none;
}

.merch-lightbox__cap {
  margin: 0;
  padding: 10px 16px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
  border-top: 1px solid var(--border);
  background: #fff;
}

/* Side arrows: full-height flex columns, button centred via margin:auto —
 * no absolute top:50% + translateY() trick. */
.merch-lightbox__prev,
.merch-lightbox__next {
  position: absolute;
  top: 0;
  bottom: 0;
  margin-top: auto;
  margin-bottom: auto;
  height: 44px;
  width: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(22, 22, 21, 0.14);
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
  z-index: 2;
}
.merch-lightbox__prev { left: 10px; }
.merch-lightbox__next { right: 10px; }
.merch-lightbox__prev:hover,
.merch-lightbox__next:hover { background: #fff; border-color: var(--text); }
.merch-lightbox__prev:focus-visible,
.merch-lightbox__next:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.merch-lightbox__prev:disabled,
.merch-lightbox__next:disabled { opacity: 0.3; cursor: default; }

@media (max-width: 640px) {
  .merch-lightbox { padding: 10px; }
  .merch-lightbox__dialog { width: 100%; border-radius: 16px; }
  .merch-lightbox__main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .merch-lightbox__rail {
    flex-direction: row;
    order: 2;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
  }
  .merch-lightbox__thumb { width: 56px; height: 56px; }
  .merch-lightbox__img { max-height: 52vh; max-height: 52svh; }
  .merch-lightbox__title { display: none; }
  .merch-lightbox__prev { left: 6px; }
  .merch-lightbox__next { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .merch-lightbox__dialog { animation: none; }
  .merch-lightbox__thumb,
  .merch-lightbox__prev,
  .merch-lightbox__next,
  .merch-lightbox__close { transition: none; }
}

/* Gallery triggers hint zoom affordance */
button[data-merch-thumb],
a[data-merch-view] { cursor: zoom-in; }

/* ─── Merch Detail Page (/merch/check-das) ───────────────────────────────
 * Amazon-inspired, single-card commerce layout: plain gallery (rail +
 * stage, no card wrappers), centre info column, one bordered buy panel.
 * Hover states use border/opacity/scale only — never translateY(). */

/* ─── Merch Breadcrumbs ──────────────────────────────────────────────────
 * Visible trail (Home › Merch › Bundle) mirroring the JSON-LD
 * BreadcrumbList. Plain text links with a separator — no pills, no cards. */

.merch-crumbs { margin: 0 0 18px; text-align: left; }
.merch-crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 13px;
  font-weight: 500;
}
.merch-crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  min-width: 0;
}
.merch-crumbs li + li::before {
  content: "›";
  color: var(--border);
  font-weight: 600;
}
.merch-crumbs a {
  color: var(--muted);
  text-decoration: none;
  border-radius: 3px;
  transition: color 0.15s ease;
}
.merch-crumbs a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.merch-crumbs a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.merch-crumbs [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
}

/* ─── Merch Index Page (/merch) ────────────────────────────────────────────
 * Collection listing: head + one entry per product (currently one).
 * Single bordered entry per product — the content itself, no extra cards. */

.merch-index__head { text-align: left; margin: 0 0 20px; }
.merch-index__head h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.merch-index__head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  text-wrap: balance;
}

.merch-index__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.merch-index__item {
  display: grid;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(22, 22, 21, 0.05);
  text-align: left;
}

.merch-index__media {
  display: block;
  line-height: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #ececea;
}
.merch-index__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transition: transform 0.3s var(--ease-out);
}
.merch-index__media:hover img { transform: scale(1.02); }
.merch-index__media:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.merch-index__info {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 2px 2px 4px;
}
.merch-index__info h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.merch-index__info h2 a {
  color: var(--text);
  text-decoration: none;
}
.merch-index__info h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.merch-index__sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  text-wrap: balance;
}
.merch-index__price {
  margin: 4px 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.merch-index__cta { justify-self: start; min-width: 200px; text-align: center; }

@media (min-width: 640px) {
  .merch-index__item {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    padding: 18px;
    align-items: center;
  }
  .merch-index__info h2 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .merch-index__media img { transform: none; transition: none; }
}

/* Wider canvas than the landing page: the three-column product layout
 * needs room (gallery rail + summary + buy box). Higher specificity than
 * .wrap so the generic padding rules never override it. */
.wrap.merch-page {
  max-width: 1080px;
  padding-top: 40px;
}

/* ── Summary (title block, Amazon centre-column top) ── */
.merch-detail__summary { grid-area: summary; text-align: left; }
.merch-detail__summary h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
.merch-detail__sub {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  text-wrap: balance;
}
/* ── Grid areas: stacked zones on mobile, Amazon-style columns above ── */
.merch-detail {
  display: grid;
  gap: 22px;
  grid-template-areas:
    "summary"
    "gallery"
    "buybox"
    "about";
}

.merch-detail__gallery { grid-area: gallery; }
.merch-detail__buybox { grid-area: buybox; }
.merch-detail__about { grid-area: about; }

/* ── Gallery: rail + stage, no card wrappers ── */
.merch-detail__gallery {
  display: grid;
  gap: 10px;
  margin: 0 auto;
  width: 100%;
  max-width: 480px;
}

.merch-detail__feature {
  margin: 0;
  order: -1;
}

.merch-detail__stage-btn {
  display: block;
  width: 100%;
  padding: 0;
  line-height: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #ececea;
  cursor: zoom-in;
}
.merch-detail__stage-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.merch-detail__feature img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  background: #ececea;
  transition: transform 0.3s var(--ease-out);
}

.merch-detail__stage-btn:hover img { transform: scale(1.015); }

.merch-detail__feature figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

.merch-detail__thumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.merch-detail__thumbs li { min-width: 0; }

/* Thumb buttons: flat bordered swatches, active = dark outline.
 * No shadows, no lift — border + opacity only. */
.merch-detail__thumbs button {
  display: block;
  width: 100%;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f1ee;
  border: 1px solid var(--border);
  line-height: 0;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.merch-detail__thumbs button:hover {
  opacity: 1;
  border-color: var(--text);
}

.merch-detail__thumbs button:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
  opacity: 1;
}

.merch-detail__thumbs button[aria-current="true"] {
  opacity: 1;
  border: 2px solid var(--text);
  box-shadow: 0 0 0 2px rgba(22, 22, 21, 0.1);
}

.merch-detail__thumbs img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #ececea;
}

/* ── Buy panel: the single card on this page ── */
.merch-detail__buybox {
  display: grid;
  gap: 14px;
  margin: 0 auto;
  width: 100%;
  max-width: 480px;
  align-content: start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 2px 8px rgba(22, 22, 21, 0.05);
}

.merch-detail__price {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.merch-detail__shipping {
  margin: -10px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.merch-detail__cta.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.merch-detail__cta svg { flex-shrink: 0; }

.merch-detail__desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  text-wrap: balance;
}

.merch-detail__secure {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.6;
}

/* About this item — plain bullets, no card. */
.merch-detail__about {
  margin: 0 auto;
  width: 100%;
  max-width: 480px;
  text-align: left;
}

.merch-detail__about-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.merch-detail__about ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.merch-detail__about li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.merch-detail__about li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #1f7a38;
}

/* ── Mid widths: gallery left, summary + buy + about stacked right ── */
@media (min-width: 720px) {
  .merch-detail__summary h1 { font-size: 36px; }
  .merch-detail__sub { font-size: 16px; }
  .merch-detail {
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-areas:
      "gallery summary"
      "gallery buybox"
      "gallery about";
    gap: 20px 28px;
    align-items: start;
  }
  /* Vertical thumbnail rail left of the stage (Amazon signature). */
  .merch-detail__gallery {
    grid-template-columns: 60px minmax(0, 1fr);
    align-items: start;
    margin: 0;
    max-width: none;
  }
  .merch-detail__feature { grid-column: 2; grid-row: 1; margin: 0; order: 0; }
  .merch-detail__thumbs { grid-column: 1; grid-row: 1; grid-template-columns: 1fr; align-content: start; gap: 8px; }
  .merch-detail__buybox { margin: 0; max-width: none; position: sticky; top: 24px; }
  .merch-detail__about { margin: 0; max-width: none; }
  .merch-detail__desc { text-wrap: pretty; }
}

/* ── Wide: full three-column shopping layout ──
 * Gallery rail | summary + about | sticky buy box. */
@media (min-width: 1020px) {
  .wrap.merch-page { padding-top: 48px; }
  .merch-detail {
    grid-template-columns: 1.35fr 1fr 260px;
    grid-template-areas:
      "gallery summary buybox"
      "gallery about buybox";
    gap: 20px 32px;
  }
}

/* ── Sticky mobile buy bar ──
 * Keeps the buy action reachable below the fold on phones. Merch page
 * only, hidden on desktop where the sticky info panel takes over.
 * The lightbox (z-index 9500) always renders above it. */
.merch-stickybuy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(244, 244, 241, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}

.merch-stickybuy__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.merch-stickybuy .btn {
  min-width: 0;
  flex-shrink: 0;
  padding: 10px 22px;
  font-size: 14px;
}

@media (min-width: 720px) {
  .merch-stickybuy { display: none; }
}

/* Bottom clearance so footer/lang never hide behind the sticky bar. */
@media (max-width: 719px) {
  .wrap.merch-page { padding-bottom: 120px; }
}

@media (max-width: 480px) {
  .wrap.merch-page { padding-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .merch-detail__feature img,
  .merch-detail__thumbs button { transform: none; transition: none; }
}

/* ─── Scroll Hint (hero) ─────────────────────────────────────────────────
 * Opacity-pulse cue below the hero buttons, anchored to the merch section.
 * No translate (bounce-free on purpose), disabled under reduced motion. */

html { scroll-behavior: smooth; }

.scroll-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
  margin: 0 auto;
  width: 52px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.scroll-hint__chev {
  display: block;
  opacity: 0.25;
  animation: scroll-hint-chev 2.2s ease-in-out infinite;
}

.scroll-hint__chev--late { margin-top: -9px; animation-delay: 0.35s; }

.scroll-hint:hover {
  color: var(--text);
  border-color: var(--text);
}
.scroll-hint:hover .scroll-hint__chev,
.scroll-hint:focus-visible .scroll-hint__chev {
  animation: none;
  opacity: 1;
}
.scroll-hint:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@keyframes scroll-hint-chev {
  0%, 100% { opacity: 0.2; }
  50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint__chev { animation: none; opacity: 0.7; }
}

/* ─── Responsive tweaks ─────────────────────────────────────────────────── */

@media (min-width: 480px) {
  .links { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .btn { min-width: 200px; }
}

/* Tighter top padding on small phones — still generous but not too much */
@media (max-width: 480px) {
  .wrap { padding-top: 64px; padding-bottom: 56px; }
}
