:root {
  --bg: #0b0b0d;
  --bg-2: #121216;
  --cream: #f2ede3;
  --red: #ff0f27;  /* brand red "B" (owner, 11-08-26) */
  --muted: rgba(242, 237, 227, .58);
  --line: rgba(242, 237, 227, .1);
  --gap: 6px;
  --radius: 8px;
  --pill-bg: rgba(18, 18, 22, .62);
  --pill-border: rgba(242, 237, 227, .1);
  --tile-ratio: 4 / 5;
  --cols: 4;
  --pill-h: 46px;
  --display: "Archivo Black", Inter, system-ui, sans-serif;
  color-scheme: dark;
}
@media (max-width: 1100px) { :root { --cols: 3; } }
@media (max-width: 640px)  { :root { --cols: 2; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: var(--red); color: #0b0b0d; }

/* ---------- top pill nav ---------- */
.pill {
  position: fixed;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .4);
}
.pill--top {
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 24px);
  height: var(--pill-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 4px 0 10px;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: .08em;
  white-space: nowrap;
}
.brand { color: var(--red); }  /* one color (owner, 11-08-26): NYC DALE RUNCLUB all red */
.brand em { font-style: normal; }
.navlinks {
  display: flex;
  gap: 2px;
  align-items: center;
  padding-left: 8px;
  border-left: 1px solid var(--pill-border);
}
.navlinks a {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.navlinks a:hover { color: var(--cream); }
/* Red pill link that stays visible on phones (Merch) */
.navlinks-cta { background: var(--red); color: #0b0b0d !important; }
.navlinks-cta:hover { background: var(--cream); }
/* Phones: only Stickers and Merch (red) stay in the pill, tightened so brand + both links fit down to 320px. */
@media (max-width: 560px) {
  .navlinks a:not(.navlinks-cta):not(.navlinks-stickers) { display: none; }
  .navlinks-stickers { color: var(--cream) !important; }
  .pill--top { gap: 6px; padding: 6px 6px 6px 4px; }
  .brand { gap: 5px; padding: 0 2px 0 10px; font-size: 13px; letter-spacing: .05em; }
  .navlinks { padding-left: 4px; gap: 0; }
  .navlinks a { padding: 7px 9px; font-size: 10px; letter-spacing: .08em; }
}
@media (max-width: 380px) {
  .brand { font-size: 12px; letter-spacing: .03em; padding-left: 8px; }
  .navlinks a { padding: 7px 7px; font-size: 9.5px; letter-spacing: .05em; }
}

/* ---------- scroll-driven hero ---------- */
.hero { height: 240vh; position: relative; }
.hero:not(.has-video) { height: 160vh; } /* shorter pin while the placeholder runs */
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
}
#hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s ease;
}
.hero.has-video #hero-video { opacity: 1; }

/* Placeholder until real footage exists: a drifting red glow, scroll-reactive via --p. */
.hero-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120vmax 80vmax at calc(20% + var(--p, 0) * 60%) 110%, rgba(255, 15, 39, .16), transparent 55%),
    radial-gradient(90vmax 70vmax at calc(85% - var(--p, 0) * 55%) -15%, rgba(255, 15, 39, .12), transparent 60%),
    var(--bg);
}
.hero.has-video .hero-fallback { display: none; }

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11, 11, 13, .45), transparent 30%, transparent 62%, var(--bg));
  pointer-events: none;
}
.hero-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 16px;
  transform: translateY(calc(var(--p, 0) * -8vh));
  opacity: calc(1 - var(--p, 0) * 1.3);
}
/* Title lockup: small NYC top left, big ¡DALE!, RUN CLUB underneath.
   inline-block so the block is exactly as wide as ¡DALE! and the other lines align to it. */
.wordmark-lockup {
  display: inline-block;
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1;
  color: var(--red);  /* the logo is red, one color (owner, 11-08-26) */
  text-shadow: 0 10px 60px rgba(0, 0, 0, .55);
  text-transform: uppercase;
}
.wordmark {
  display: block;
  font-size: clamp(64px, 21vw, 220px);
  line-height: .9;
  letter-spacing: .02em;
}
.wm-x { color: inherit; }  /* one color lettering (owner, 11-08-26): the marks match the rest of the logo */
/* letter-spacing leaves a gap after the last letter: RUN CLUB balances it with equal left padding
   so it stays centered. NYC is left-aligned over the "¡", where the trailing gap doesn't matter. */
.wm-nyc {
  display: block;
  text-align: left;
  font-size: clamp(14px, 3.25vw, 34px);
  letter-spacing: .35em;
  margin-bottom: .3em;
}
.wm-runclub {
  --track: .3em;
  display: block;
  text-align: center;
  font-size: clamp(20px, 6.5vw, 68px);
  letter-spacing: var(--track);
  padding-left: var(--track);
  margin-top: .18em;
}
.hero-sub {
  margin: 16px 0 0;
  font-size: clamp(11px, 1.6vw, 14px);
  font-weight: 600;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-slogan {
  margin: 24px 0 0;
  font-family: var(--display);
  font-size: clamp(20px, 3.2vw, 30px);
  line-height: 1.1;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 6px 30px rgba(0, 0, 0, .6);
}
.hero-tag {
  margin: 10px auto 0;
  max-width: 440px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--cream);
}
.btn {
  display: inline-block;
  margin-top: 28px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: transform .15s ease, background .2s;
}
/* display above beats the hidden attribute, so hidden buttons (e.g. the RSVP button on a run with no link)
   showed up as empty black pills until 11-09-26. */
.btn[hidden] { display: none; }
.btn--red { background: var(--red); color: #0b0b0d; }
.btn--red:hover { background: var(--cream); transform: translateY(-2px); }

.hero-handle { margin: 22px 0 0; }
.hero-handle a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s;
}
.hero-handle a:hover { color: var(--red); }
.hero-handle .dot { margin: 0 10px; color: var(--muted); }
/* Phones: Instagram, Strava and Pie fit on one line */
@media (max-width: 480px) {
  .hero-handle a { font-size: 11px; letter-spacing: .1em; }
  .hero-handle .dot { margin: 0 6px; }
}

.scroll-cue {
  position: absolute;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-cue span {
  display: block;
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--red), transparent);
  animation: cueDrop 1.6s ease-in-out infinite;
}
@keyframes cueDrop { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); } 100% { opacity: 0; } }
.hero.is-scrolled .scroll-cue { opacity: 0; transition: opacity .4s; }

/* ---------- sections ---------- */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 20px 24px;
}
.section-title {
  margin: 0 0 32px;
  font-family: var(--display);
  font-size: clamp(32px, 6vw, 56px);
  letter-spacing: .01em;
  text-transform: uppercase;
  line-height: 1;
}
.section-title span { color: var(--red); }
.section-title span.is-event { color: var(--cream); }
.section-empty { color: var(--muted); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.all-hint { margin: 18px 0 0; font-size: 11px; letter-spacing: .16em; }

/* ---------- next run (red card) ---------- */
.next-card {
  border-radius: 16px;
  background: var(--red);
  color: #140505;
  padding: clamp(28px, 5vw, 52px);
  box-shadow: 0 24px 80px rgba(255, 15, 39, .22);
}
.next-card--event { background: var(--cream); color: #0b0b0d; box-shadow: 0 24px 80px rgba(242, 237, 227, .12); }
.next-card--empty { background: var(--bg-2); color: var(--cream); box-shadow: none; border: 1px solid var(--line); }
.next-card .kind-tag { color: inherit; margin-bottom: 16px; }
.next-card--empty .next-meta { color: var(--muted); }
.next-date {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 6.5vw, 64px);
  line-height: 1;
  text-transform: uppercase;
}
.next-title { margin: 14px 0 4px; font-size: 18px; font-weight: 600; }
.next-meta { margin: 2px 0 0; font-size: 14px; font-weight: 500; opacity: .85; }
.next-note { margin: 12px 0 0; font-size: 13px; opacity: .75; max-width: 560px; }

/* ---------- runs list ---------- */
.runs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.run-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 4px 24px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
}
.run-when {
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--red);
}
.run-when small { display: block; font-family: Inter, sans-serif; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .08em; }
.run-row--event .run-when { color: var(--cream); }

/* RUN / EVENT tags: red for runs, white for events */
.kind-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.kind-tag--run { color: var(--red); }
.kind-tag--event { color: var(--cream); }
.run-what { min-width: 0; }
.run-title { margin: 0; font-size: 15px; font-weight: 600; }
.run-meta { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .run-row { grid-template-columns: 1fr; } }

/* ---------- gallery grid (ported from pics site) ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { color: var(--cream); border-color: rgba(242, 237, 227, .3); }
.chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #0b0b0d; }

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gap);
}
.tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: var(--tile-ratio);
  background: var(--bg-2);
  outline-offset: 2px;
}
.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .45s ease, transform .4s ease;
}
.tile img.is-loaded { opacity: 1; }
.tile:hover img { transform: scale(1.03); }

.tile-meta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
  padding: 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, .18) 55%, transparent);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.tile:hover .tile-meta,
.tile:focus-visible .tile-meta { opacity: 1; }
.tile-title {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.tile-date { font-size: 11px; color: var(--red); letter-spacing: .06em; }
@media (hover: none) { .tile-meta { display: none; } }

@media (prefers-reduced-motion: no-preference) {
  .tile {
    animation: tileIn .32s ease both;
    animation-delay: min(calc(var(--i, 0) * 14ms), 300ms);
  }
  @keyframes tileIn { from { opacity: 0; transform: scale(.97); } }
}

/* ---------- about ---------- */
.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 860px) { .about-cols { grid-template-columns: 1fr; } }
.about-lede {
  margin: 0;
  font-size: clamp(19px, 2.6vw, 26px);
  line-height: 1.5;
  font-weight: 500;
}
.about-lede em { color: var(--red); font-style: normal; font-family: var(--display); }
.about-slogan {
  margin: 28px 0 0;
  font-family: var(--display);
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--red);
}
.about-slogan span { color: var(--cream); }
.about-body p { margin: 0 0 18px; font-size: 15px; line-height: 1.75; color: rgba(242, 237, 227, .82); }
.about-cta a { color: var(--red); border-bottom: 1px solid var(--red); }
.about-cta a:hover { color: var(--cream); border-color: var(--cream); }
.about-handle {
  margin-top: 26px !important;
  font-size: 12px !important;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.about-handle--next { margin-top: 10px !important; }
.about-handle a { color: var(--red); }
.about-handle a:hover { color: var(--cream); }

/* This week on Strava: numbers from /strava-week.json (the uploader reads Strava's club widget every 6 hours;
   the widget itself is blank on iPhones, so it isn't embedded). Hidden until the data loads. */
.strava-week { margin-top: 30px; max-width: 460px; padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.strava-week-label {
  margin: 0 0 14px !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted) !important;
}
.strava-week-label span { margin-left: 8px; color: var(--cream); letter-spacing: .12em; }
.strava-week-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.strava-week-stats dt { margin-bottom: 4px; font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.strava-week-stats dd { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.1; color: var(--red); white-space: nowrap; }
.strava-week-stats dd small { margin-left: 3px; font-family: Inter, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.strava-week-link { display: inline-block; margin-top: 16px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.strava-week-link:hover { color: var(--cream); }
@media (max-width: 480px) { .strava-week-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; } }

/* RSVP links on calendar entries that came from a Strava or Pie event. */
.next-rsvp { margin-top: 18px; background: #0b0b0d; color: var(--cream); }
.next-rsvp:hover { background: #1c1c22; transform: translateY(-2px); }
.run-rsvp { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
.run-rsvp:hover { color: var(--cream); }
.next-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.next-actions[hidden] { display: none; }
.next-actions .next-rsvp { margin-top: 0; }
.run-actions { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 6px; }
.run-actions .run-rsvp { margin-top: 0; }

/* ---------- footer ---------- */
.footer {
  margin-top: 56px;
  padding: 56px 20px calc(44px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-mark { margin: 0; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; }
.footer-links a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-links a:hover { color: var(--red); }
.footer-credit { margin: 6px 0 0; font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.footer-credit a { color: var(--cream); border-bottom: 1px solid var(--line); }
.footer-credit a:hover { color: var(--red); border-color: var(--red); }

/* ---------- lightbox (ported) ---------- */
.lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  background: transparent;
  color: var(--cream);
  overflow: hidden;
}
.lightbox::backdrop {
  background: rgba(8, 8, 10, .95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
html.lb-open { overflow: hidden; }

.lb-figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 56px 16px 24px;
  pointer-events: none;
}
#lb-img {
  max-width: min(96vw, 1800px);
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  pointer-events: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  pointer-events: auto;
}
.lb-date { color: var(--red); }
.lb-original { color: var(--muted); }
.lb-original:hover { color: var(--cream); text-decoration: underline; }

.lb-btn {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(242, 237, 227, .08);
  color: var(--cream);
  font-size: 26px;
  line-height: 1;
  transition: background .2s;
}
.lb-btn:hover { background: rgba(242, 237, 227, .18); }
.lb-btn:disabled { opacity: .25; cursor: default; }
.lb-close { top: 14px; right: 14px; font-size: 22px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lb-prev, .lb-next { display: none; }
  #lb-img { max-height: 76vh; }
}

/* ---------- merch page ---------- */
.merch-page .section { padding-top: 110px; }
.merch-intro { max-width: 620px; margin: -12px 0 40px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.merch-items { display: flex; flex-direction: column; gap: 56px; }
.merch-item {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
@media (max-width: 860px) { .merch-item { grid-template-columns: 1fr; } }
.merch-main { border-radius: 14px; overflow: hidden; background: var(--bg-2); }
/* Capped height keeps each item about one screen tall; contain shows the whole garment. */
.merch-main img { display: block; width: 100%; height: auto; max-height: min(68vh, 720px); object-fit: contain; }
@media (max-width: 860px) { .merch-main img { max-height: 56vh; } }
.merch-gallery.is-empty .merch-main { aspect-ratio: 4 / 5; display: grid; place-items: center; }
.merch-gallery.is-empty .merch-main::after {
  content: "Photos coming soon";
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.merch-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.merch-thumb {
  width: 68px; height: 68px; padding: 0; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; background: var(--bg-2); opacity: .7; transition: opacity .2s, border-color .2s;
}
.merch-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.merch-thumb:hover { opacity: 1; }
.merch-thumb[aria-pressed="true"] { border-color: var(--red); opacity: 1; }
.merch-name {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1;
  text-transform: uppercase;
}
.merch-price { margin: 12px 0 0; font-family: var(--display); font-size: 22px; color: var(--red); }
.merch-desc { margin: 16px 0 0; font-size: 15px; line-height: 1.7; color: rgba(242, 237, 227, .82); white-space: pre-line; }
.merch-form { margin-top: 28px; }
.merch-sizes, .merch-colors, .merch-fits { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; border: 0; }
.merch-sizes legend, .merch-colors legend, .merch-fits legend { width: 100%; margin-bottom: 10px; padding: 0; }
.merch-color-name { color: var(--cream); letter-spacing: .08em; }
.merch-colors.is-single legend { margin-bottom: 0; } /* one color: just "Color: Black", no swatches */
.color-opt input { position: absolute; opacity: 0; pointer-events: none; }
.color-opt span {
  display: block; width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--bg); box-shadow: 0 0 0 1.5px var(--line); transition: box-shadow .2s;
}
.color-opt span:hover { box-shadow: 0 0 0 1.5px rgba(242, 237, 227, .5); }
.color-opt input:checked + span { box-shadow: 0 0 0 2.5px var(--red); }
.color-opt input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 3px; }
.size-opt input { position: absolute; opacity: 0; pointer-events: none; }
.size-opt span {
  display: inline-grid; place-items: center; min-width: 54px; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--cream);
  cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.size-opt span:hover { border-color: rgba(242, 237, 227, .4); }
.size-opt input:checked + span { background: var(--red); border-color: var(--red); color: #140505; }
.size-opt input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.merch-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.merch-fields .span-2 { grid-column: span 2; }
@media (max-width: 560px) {
  .merch-fields { grid-template-columns: 1fr; }
  .merch-fields .span-2 { grid-column: span 1; }
}
.merch-form .btn { margin-top: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.zelle-confirm {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px;
  border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer;
  font-size: 14px; line-height: 1.5; color: var(--cream); transition: border-color .2s;
}
.zelle-confirm:has(input:checked) { border-color: var(--red); }
.zelle-confirm input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--red); cursor: pointer; }
.zelle-confirm strong { overflow-wrap: anywhere; } /* wrap the whole address to the next line before splitting it */

/* ---------- upload / admin page ---------- */
.admin-page .section { padding-top: 76px; }
.admin-page .section + .section { padding-top: 0; margin-top: 48px; }

/* Tabs: one admin section at a time (Photos, Calendar, Merch, Orders, Brand); the strip sticks under the top pill */
.admin-tabs {
  position: sticky;
  top: calc(12px + var(--pill-h) + 6px);
  z-index: 10;
  display: flex;
  gap: 4px;
  margin: 0 0 28px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 18, 22, .86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs [role="tab"] {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.admin-tabs [role="tab"]:hover { color: var(--cream); }
.admin-tabs [role="tab"][aria-selected="true"] { background: var(--red); color: #0b0b0d; }
.tab-count {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--cream);
  color: #0b0b0d;
  font-size: 10px;
  letter-spacing: 0;
}
.admin-panel > .section-title,
.admin-brand > .section-title { margin: 0 0 18px; font-size: clamp(30px, 6vw, 56px); }

/* "Add from a Strava or Pie link" box at the top of the Calendar tab */
.link-import { margin-bottom: 16px; }
.link-row { display: flex; gap: 10px; margin-top: 8px; }
.link-row .field { flex: 1 1 auto; min-width: 0; }
.link-row .btn { margin-top: 0; flex: 0 0 auto; }
.link-import .form-msg { margin-top: 12px; }

/* Brand files: under whichever tab is open, at the bottom of the admin page */
.admin-brand { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--line); }

/* "+ Add" forms fold away until needed (Edit and Duplicate open them) */
.add-box > summary { list-style: none; display: inline-flex; margin-top: 0; }
.add-box > summary::-webkit-details-marker { display: none; }
.add-box[open] > summary { display: none; }
.add-box[open] { padding-bottom: 22px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.past-runs { margin-top: 22px; }
.past-runs > summary { display: inline-flex; flex-direction: row; gap: 6px; cursor: pointer; }
.past-runs .admin-runs { margin-top: 12px; }

@media (max-width: 560px) {
  .admin-page .section { padding-left: 12px; padding-right: 12px; }
  .admin-tabs { margin-bottom: 22px; }
  .admin-tabs { gap: 2px; padding: 3px; }
  .admin-tabs [role="tab"] { flex: 1 1 auto; padding: 9px 6px; font-size: 10px; letter-spacing: .06em; }
  .navlinks-signout { white-space: nowrap; }
  .admin-page .card { padding: 16px; border-radius: 14px; }
  /* Top pill: brand + Sign out only */
  .admin-page .navlinks a { display: none; }
}
.navlinks-signout {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.navlinks-signout:hover { color: var(--red); }

.gate-text { max-width: 420px; color: var(--muted); line-height: 1.7; }
.gate-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.gate-form .btn { margin-top: 0; }

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
  padding: clamp(20px, 3.5vw, 32px);
}
.field {
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--cream);
  font: inherit;
  font-size: 14px;
  padding: 11px 14px;
  min-width: 0;
}
.field:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
/* appearance: none above drops the native arrow, so dropdowns draw their own (red chevron) to read as tappable. */
select.field {
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23ff0f27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
select.field:hover { border-color: rgba(242, 237, 227, .3); }
.field-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; max-width: 480px; }
.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.dropzone {
  border: 1.5px dashed rgba(255, 15, 39, .4);
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--red); background: rgba(255, 15, 39, .05); }
.dropzone p { margin: 0 0 6px; font-size: 14px; }
.dropzone strong { color: var(--red); }
.dz-hint { font-size: 12px !important; color: var(--muted); }

.file-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.file-list li, .admin-run {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.file-remove {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.file-remove:hover { background: rgba(255, 15, 39, .18); color: var(--red); }

.upload-actions { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.upload-actions .btn { margin-top: 0; }
.upload-actions progress { flex: 1; accent-color: var(--red); height: 8px; }
.btn:disabled { opacity: .35; cursor: default; transform: none; }

.form-msg, .form-error { margin: 14px 0 0; font-size: 13px; color: var(--cream); }
.form-msg.is-error, .form-error { color: var(--red); }

.run-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.run-form-grid .span-2 { grid-column: span 2; }
@media (max-width: 560px) {
  .run-form-grid { grid-template-columns: 1fr; }
  .run-form-grid .span-2 { grid-column: span 1; }
}
.run-form .btn { margin-top: 0; }
.admin-runs { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.admin-run.is-past { opacity: .45; }
.admin-run.is-editing { border-color: var(--red); opacity: 1; }
.admin-run.is-hidden { border-style: dashed; }

/* Merch admin */
textarea.field { resize: vertical; line-height: 1.5; font-family: inherit; }
.admin-hint { margin: 22px 0 0; }

/* Brand files (admin) */
.brand-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.brand-head > .dz-hint { margin: 0; flex: 1 1 320px; line-height: 1.5; }
.brand-bg { display: flex; align-items: center; gap: 8px; }
.brand-bg .dz-hint { margin: 0 4px 0 0; }
.brand-folder { margin-top: 26px; }
.brand-folder-title { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.brand-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.brand-tile { display: flex; flex-direction: column; gap: 8px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 8px; }
.brand-thumb {
  position: relative; aspect-ratio: 4 / 3; width: 100%; padding: 8px; border: 0; border-radius: 6px; cursor: pointer;
  display: grid; place-items: center; background: #1b1b1f; transition: background .2s;
}
.brand-files.is-light .brand-thumb { background: #f4f4f1; }
.brand-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-thumb.is-broken::after { content: 'Could not load'; font-size: 11px; color: var(--muted); }
.brand-ext { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--muted); }
.brand-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.brand-name { font-size: 12px; overflow-wrap: anywhere; line-height: 1.3; }
.brand-dl { padding: 7px 10px; font-size: 11px; width: 100%; }
/* Phones: two small tiles per row instead of one huge one */
@media (max-width: 560px) {
  .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .brand-tile { padding: 6px; }
  .brand-dl { padding: 6px 8px; font-size: 10px; }
}
.brand-view { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; color: var(--cream); overflow: visible; }
.brand-view::backdrop { background: rgba(5, 5, 6, .92); }
.brand-view[open] { display: grid; justify-items: center; gap: 10px; }
.brand-view-stage { background: #1b1b1f; border-radius: 8px; padding: 18px; max-width: 92vw; }
.brand-view.is-light .brand-view-stage { background: #f4f4f1; }
.brand-view-stage img { display: block; max-width: min(88vw, 1100px); max-height: 74vh; width: auto; height: auto; }
.brand-view-name { margin: 0; font-size: 13px; letter-spacing: .04em; }
.brand-view-close { position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2); color: var(--cream); font-size: 24px; line-height: 1; cursor: pointer; }
.admin-merch, .admin-requests { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.admin-merch-item { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 12px; }
.admin-merch-item.is-hidden { border-style: dashed; }
.admin-merch-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.admin-merch-head strong { font-size: 14px; }
.admin-merch-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.admin-merch-photo-wrap { display: flex; flex-direction: column; gap: 4px; width: 96px; }
.admin-color-select { padding: 5px 8px; font-size: 11px; border-radius: 6px; }
.admin-merch-head .admin-color-select { width: auto; }
.admin-merch-photo { position: relative; margin: 0; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; background: var(--bg-2); }
.admin-merch-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-merch-main, .admin-merch-act {
  position: absolute; left: 4px; bottom: 4px; padding: 3px 7px; border-radius: 999px;
  font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(11, 11, 13, .82); color: var(--cream);
}
.admin-merch-main { background: var(--red); color: #140505; }
.admin-merch-rm { left: auto; right: 4px; top: 4px; bottom: auto; font-size: 13px; padding: 1px 7px; }
.admin-merch-rm:hover { background: var(--red); color: #140505; }
.admin-request {
  display: flex; flex-direction: column; gap: 3px; font-size: 13px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
}
.admin-request a { color: var(--red); }
.admin-request-note { color: var(--muted); font-style: italic; }
.admin-run.is-hidden .admin-run-info > span:not(.hidden-tag):not(.kind-tag) { opacity: .5; }
.hidden-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form-actions .btn { margin-top: 0; }
.btn--ghost { border: 1px solid var(--line); color: var(--muted); }
.btn--ghost:hover { color: var(--cream); border-color: rgba(242, 237, 227, .35); }
.admin-run-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-run-info .kind-tag { margin-bottom: 0; }
.admin-run-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* Phones: calendar and merch rows put the entry on top and its buttons on one line under it */
@media (max-width: 560px) {
  .admin-run, .admin-merch-head { flex-wrap: wrap; }
  .admin-run-info { flex: 1 1 100%; }
  .admin-run-actions { width: 100%; justify-content: flex-start; gap: 4px; }
  .admin-run-actions .flip-kind { padding: 5px 8px; font-size: 9.5px; letter-spacing: .08em; }
  .admin-run-actions .file-remove { margin-left: auto; }
}
.flip-kind {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.flip-kind:hover { color: var(--cream); border-color: rgba(242, 237, 227, .35); }

/* Run / Event picker on the calendar form */
.kind-pick { display: flex; gap: 8px; align-items: center; margin: 0; padding: 0; border: 0; }
.kind-pick legend { float: left; margin-right: 6px; padding: 0; }
.kind-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kind-opt span {
  display: inline-block;
  padding: 8px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.kind-opt--run input:checked + span { background: var(--red); border-color: var(--red); color: #140505; }
.kind-opt--event input:checked + span { background: var(--cream); border-color: var(--cream); color: #0b0b0d; }
.kind-opt input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
