:root {
  --bg: #050506;
  --bg-2: #0e0e10;
  --text: #ffffff;
  --muted: #a3a3a8;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #c9ccd1;          /* silver grey */
  --accent-hover: #ffffff;
  --accent-rgb: 201, 204, 209;
  --metal: linear-gradient(180deg, #ffffff 0%, #c9ccd1 55%, #8e9299 100%);
  --accent-ink: #050506;
  --accent-glow: rgba(255, 255, 255, 0.16);
  /* frosted glass */
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(18, 18, 20, 0.62);
  --glass-hover: rgba(255, 255, 255, 0.085);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  --blur: blur(22px) saturate(160%);
  --surface: var(--glass);
  --radius: 14px;
  --max: 1160px;
  --display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 69px; /* anchor jumps land below the fixed header */
  /* Nothing may push the page wider than the screen. Some Android WebViews
     (Instagram/Facebook in-app browsers) let you pan sideways into off-screen
     fixed elements, which drags the whole page and the header with it. */
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@supports (overflow: clip) { html { overflow-x: clip; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
  /* room for the fixed header (68px bar + 1px border) */
  padding-top: 69px;
}

/* Page background: a pre-blurred event photo (fixed, so it stays put while
   the frosted-glass panels scroll over it), with a dark tint + brand glow on top. */
body::before,
body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  /* Sized to the LARGEST viewport, not inset:0. On Android the URL bar hides
     while scrolling; with inset:0 the layer resized and the photo jumped. */
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
  backface-visibility: hidden; /* own GPU layer: no repaint while scrolling */
}
body::before {
  background: var(--bg) center 60% / cover no-repeat;
  transform: scale(1.06) translateZ(0); /* hides soft blurred edges */
  /* the photos are already desaturated (assets/bg-*-s.jpg); a CSS filter on a
     fixed layer is re-rendered every scroll frame in Android WebView */
}
body.page-index::before,
body.page-news::before,
body.page-profile::before,
body.page-award::before,
body.page-shop::before { background-image: url("../assets/bg-riders-s.jpg"); }
body.page-events::before,
body.page-event::before { background-image: url("../assets/bg-meet-s.jpg"); }
body::after {
  background:
    radial-gradient(40vw 40vw at 88% 6%, rgba(255, 255, 255, 0.10), transparent 70%),
    radial-gradient(45vw 45vw at 70% 100%, rgba(180, 184, 190, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(5, 5, 6, 0.55) 0%, rgba(5, 5, 6, 0.72) 45%, rgba(5, 5, 6, 0.86) 100%);
}

/* Reusable frosted-glass surface */
.glass,
.pillar,
.event-card,
.product-card,
.coming-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), 0 10px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
  margin: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 15px/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--metal); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 6px 24px var(--accent-glow); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: var(--glass-border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.1); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
/* Fixed, not sticky: a sticky bar is part of the page, so the pull-to-refresh /
   rubber-band overscroll at the top drags it down with the content. A fixed bar
   stays pinned to the screen while the page bounces under it. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(8, 8, 10, 0.55);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-border);
  transform: translateZ(0); /* keep the sticky bar on its own layer so it doesn't jitter */
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: 0.06em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark { width: 30px; height: 30px; }
.logo-word { height: 22px; width: auto; }
.logo-word { height: 24px; }
.site-footer .logo-mark { width: 44px; height: 44px; margin-bottom: 4px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  color: var(--muted);
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text); }

.cart-btn {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 16px;
  font: 600 14px/1 var(--body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cart-count {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 12px;
  display: inline-grid;
  place-items: center;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  padding: 8px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
}

@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(8, 8, 10, 0.92);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--glass-border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 16px 20px; font-size: 17px; }
  .nav-links .cart-li { padding: 14px 20px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 120px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.hero::before {
  /* road stripe */
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 42px;
  height: 6px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0 60px, transparent 60px 110px);
  opacity: 0.18;
  transform: skewX(-20deg);
}
.hero-wordmark { margin: 0; line-height: 0; }
.hero-wordmark img {
  width: min(100%, 760px);
  height: auto;
  filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.55));
}
.hero p.hero-tagline {
  font-family: var(--display);
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 22px 0 0;
}
.hero-tagline .accent {
  color: var(--accent);
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: #cdcdd2;
  font-size: clamp(17px, 2vw, 20px);
  max-width: 560px;
  margin: 24px 0 36px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.page-hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.page-hero h1 { font-size: clamp(56px, 10vw, 112px); }
.page-hero p { color: var(--muted); max-width: 560px; margin: 16px 0 0; font-size: 18px; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
section + section { border-top: 1px solid var(--line); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(44px, 7vw, 72px); }
.section-head a { color: var(--muted); font-weight: 600; text-decoration: none; }
.section-head a:hover { color: var(--accent); }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-grid h2 { font-size: clamp(44px, 7vw, 76px); }
.about-copy p { color: #cfcfd4; font-size: 18px; margin: 0 0 18px; }
.about-stats { margin: 32px 0 0; gap: 12px 32px; }
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
}
.pillar {
  border-radius: var(--radius);
  padding: 26px;
}
.pillar .num {
  font-family: var(--display);
  color: var(--accent);
  font-size: 28px;
}
.pillar h3 { font-size: 30px; margin: 8px 0 8px; }
.pillar p { color: var(--muted); margin: 0; font-size: 15px; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .pillars { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .pillars { grid-template-columns: 1fr; }
}

/* ---------- Events ---------- */
.event-list { display: grid; gap: 16px; }
.event-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 28px;
  align-items: center;
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.15s;
}
.event-card:hover { border-color: rgba(255, 255, 255, 0.28); background: var(--glass-hover); }
.event-date {
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 24px;
}
.event-date .day { font-family: var(--display); font-size: 56px; line-height: 1; }
.event-date .month {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.event-date .tba { font-family: var(--display); font-size: 34px; line-height: 1; color: var(--muted); }
.event-body h3 { font-size: 38px; }
.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 10px;
}
.event-body p { margin: 0; color: #cfcfd4; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.event-action { text-align: right; }
.event-action small { display: block; color: var(--muted); font-size: 12px; margin-top: 8px; }

@media (max-width: 760px) {
  .event-card { grid-template-columns: 1fr; gap: 16px; }
  .event-date {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 14px;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 10px;
  }
  .event-action { text-align: left; }
}

/* ---------- Past events timeline ---------- */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin-bottom: 40px;
}
.stat .n { font-family: var(--display); font-size: 56px; line-height: 1; color: var(--accent); }
.stat .l { color: var(--muted); font-size: 14px; }

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 34px;
  position: relative;
  display: grid;
  gap: 22px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(255, 255, 255, 0.12) 85%);
  border-radius: 2px;
}
.tl-year {
  font-family: var(--display);
  font-size: 40px;
  line-height: 1;
  color: var(--text);
  margin: 18px 0 -4px;
  position: relative;
}
.tl-year:first-child { margin-top: 0; }
.tl-item { position: relative; }
.tl-dot {
  position: absolute;
  left: -31px;
  top: 26px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.10);
}
.tl-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), 0 10px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transition: border-color 0.15s, background 0.15s;
}
.tl-card:hover { border-color: rgba(255, 255, 255, 0.28); background: var(--glass-hover); }
.tl-poster {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: rgba(255, 255, 255, 0.05);
  align-self: start;
}
.tl-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.tl-poster:hover img { transform: scale(1.04); }
.tl-body { display: flex; flex-direction: column; min-width: 0; }
.tl-date {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}
.tl-body h3 { font-size: 36px; }
.tl-body p { margin: 0; color: #cfcfd4; }
.tl-with { margin-top: 12px !important; font-size: 14px; color: var(--muted) !important; }
.tl-with a { color: var(--text); text-decoration: none; }
.tl-with a:hover { color: var(--accent); }
.tl-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.tl-foot small { color: var(--muted); font-size: 12px; }
.tl-link { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--accent); }
.tl-link:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .timeline { padding-left: 26px; }
  .timeline::before { left: 5px; }
  .tl-dot { left: -27px; }
  .tl-card { grid-template-columns: 96px 1fr; gap: 14px; padding: 14px; }
  .tl-body h3 { font-size: 28px; }
}
@media (max-width: 420px) {
  .tl-card { grid-template-columns: 1fr; }
  .tl-poster { max-width: 220px; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}
.contact-grid h2 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 18px; }
.socials { display: grid; gap: 14px; }
.social-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), 0 10px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.social-card:hover { border-color: rgba(255, 255, 255, 0.3); background: var(--glass-hover); transform: translateY(-2px); }
.social-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: var(--metal);
  box-shadow: 0 6px 22px var(--accent-glow);
}
.social-text { display: flex; flex-direction: column; min-width: 0; }
.social-name { font-family: var(--display); font-size: 30px; line-height: 1; }
.social-handle { color: var(--accent); font-weight: 600; font-size: 15px; margin-top: 2px; }
.social-note { color: var(--muted); font-size: 14px; margin-top: 4px; }
.social-arrow { font-size: 22px; color: var(--muted); transition: color 0.15s, transform 0.15s; }
.social-card:hover .social-arrow { color: var(--text); transform: translate(2px, -2px); }

.info-card {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), 0 10px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.info-card + .info-card { margin-top: 16px; }
.info-card h3 { font-size: 30px; margin-bottom: 8px; }
.info-card p { color: #cfcfd4; margin: 0 0 16px; }
.info-card ul { margin: 0 0 18px; padding-left: 18px; color: #cfcfd4; }
.info-card li { margin-bottom: 6px; }
.info-card .spot-name { font-weight: 700; color: var(--text); margin-bottom: 2px; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* Clickable timeline cards */
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { color: var(--accent-hover); }
.tl-card { position: relative; }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tl-poster, .tl-ig { position: relative; z-index: 1; }
.tl-ig {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  color: var(--muted);
}
.tl-ig:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.4); }
.tl-card:hover .tl-link { text-decoration: underline; }

/* Community (collaborators & local talent) */
.community { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.community .info-card + .info-card { margin-top: 0; }
.people { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 12px; }
.people li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin: 0 !important; }
.people li:last-child { border-bottom: 0; padding-bottom: 0; }
.people .who a { color: var(--text); font-weight: 600; text-decoration: none; }
.people .who a:hover { text-decoration: underline; }
.people .what { color: var(--muted); font-size: 13px; }
.people .what a { color: var(--muted); }
.people .what a:hover { color: var(--text); }
@media (max-width: 760px) { .community { grid-template-columns: 1fr; } }

/* Partnerships */
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.partner-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), 0 10px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.partner-top { display: flex; gap: 18px; align-items: center; }
.partner-mono {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
  background: var(--metal);
}
.partner-logo {
  flex: none;
  width: 132px;
  height: 84px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--glass-border);
}
.partner-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 420px) {
  .partner-top { flex-direction: column; align-items: flex-start; }
  .partner-logo { width: 100%; height: 110px; }
}
.partner-card h3 { font-size: 38px; }
.partner-card .tag { margin-bottom: 4px; }
.partner-handle { color: var(--muted); font-size: 14px; font-weight: 600; }
.partner-card p { margin: 0; color: #cfcfd4; }
.partner-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: auto; }
.partner-foot .chip { text-decoration: none; }
.partner-foot .chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.4); }
.partner-foot .tl-link { margin-left: auto; }

/* ---------- Single event page ---------- */
.event-page { padding-top: 40px; padding-bottom: 96px; } /* keep .container side padding */
.back { display: inline-block; color: var(--muted); text-decoration: none; font-weight: 600; margin-bottom: 28px; }
.back:hover { color: var(--text); }
.muted { color: var(--muted); }
.ev-head {
  display: grid;
  grid-template-columns: minmax(0, 400px) 1fr;
  gap: 48px;
  align-items: start;
}
.ev-head:not(:has(.ev-poster)) { grid-template-columns: 1fr; }
.ev-poster {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.ev-poster img { width: 100%; height: auto; }
.ev-info h1 { font-size: clamp(56px, 8vw, 96px); margin-bottom: 24px; }
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px 24px;
  margin: 0 0 20px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.facts dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd { margin: 4px 0 0; font-weight: 600; }
.facts dd a { color: var(--text); }
.ev-text { margin: 24px 0 28px; }
.ev-text p { color: #d6d6da; font-size: 18px; margin: 0 0 14px; }
.ev-text a { color: var(--text); }

.ev-block { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--line); }
.ev-block h2 { font-size: clamp(40px, 6vw, 60px); margin-bottom: 18px; }
.ev-block .sub { font-size: 30px; margin: 32px 0 14px; }
.ev-block > .muted { margin: -6px 0 20px; }
.winners { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.winners li {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.winners .award { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.winners .name { font-family: var(--display); font-size: 40px; line-height: 1; }
.winners .name a { color: inherit; text-decoration: none; }
.winners .bike { color: #cfcfd4; font-size: 14px; }
.ev-photo { margin: 24px 0 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--glass-border); }
.ev-photo img { width: 100%; max-height: 640px; object-fit: cover; object-position: center 62%; }
.ev-photo figcaption { padding: 10px 14px; color: var(--muted); font-size: 13px; background: var(--glass); }

.people-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.people-grid li {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.people-grid .role { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.people-grid .who { font-weight: 600; font-size: 17px; }
.people-grid .who a { color: var(--text); text-decoration: none; }
.people-grid .who a:hover { text-decoration: underline; }

.ev-nav { margin-top: 72px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ev-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  text-decoration: none;
  transition: border-color 0.15s;
}
.ev-nav a:hover { border-color: rgba(255, 255, 255, 0.35); }
.ev-nav a.next { text-align: right; }
.ev-nav small { color: var(--muted); font-weight: 600; }
.ev-nav span { font-family: var(--display); font-size: 28px; line-height: 1; }
.btn svg { flex: none; }

@media (max-width: 860px) {
  .ev-head { grid-template-columns: 1fr; gap: 28px; }
  .ev-poster { max-width: 420px; }
}
@media (max-width: 520px) {
  .ev-nav { grid-template-columns: 1fr; }
  .ev-nav a.next { text-align: left; }
}

/* ---------- Shop ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.product-card {
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.10), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
  display: grid;
  place-items: center;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media .placeholder { width: 34%; height: auto; opacity: 0.16; }
.product-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}
.product-info { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-info .cat {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.product-info h3 { font-size: 30px; }
.product-info p { margin: 0; color: var(--muted); font-size: 14px; }
.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}
.price { font-weight: 700; font-size: 18px; }
.price.tba { color: var(--muted); font-weight: 600; font-size: 15px; }

.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.size {
  min-width: 40px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: 600 13px/1 var(--body);
  cursor: pointer;
}
.size:hover { border-color: var(--muted); }
.size[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.coming-card {
  border-style: dashed;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 24px;
  min-height: 300px;
  color: var(--muted);
}
.coming-card h3 { font-size: 34px; color: var(--text); margin-bottom: 8px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 600 14px/1 var(--body);
  cursor: pointer;
}
.filter[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
a.filter { text-decoration: none; margin-left: auto; }
a.filter:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.4); }

/* ---------- Cart drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 90;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100%);
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-left: 1px solid var(--glass-border);
  transform: translateX(100%);
  visibility: hidden; /* fully out of the page while closed (see html overflow note) */
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.cart-open .drawer { transform: none; visibility: visible; transition: transform 0.25s ease; }
body.cart-open { overflow: hidden; }
.cart-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 34px; }
.icon-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.drawer-items { flex: 1; overflow-y: auto; padding: 8px 20px; }
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item .name { font-weight: 600; }
.cart-item .meta { color: var(--muted); font-size: 13px; }
.qty { display: inline-flex; align-items: center; gap: 10px; }
.qty button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.remove {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  justify-self: end;
}
.drawer-empty { color: var(--muted); text-align: center; padding: 48px 0; }
.drawer-foot { padding: 20px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; }
.note { color: var(--muted); font-size: 13px; margin: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 120;
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(135deg, rgba(232, 234, 237, 0.92), rgba(160, 164, 171, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 20px 60px var(--accent-glow);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--accent-ink);
  border-radius: 22px;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(42px, 6vw, 68px); max-width: 14ch; }
.cta-band .btn { background: var(--accent-ink); color: var(--text); }
@media (max-width: 600px) { .cta-band { padding: 40px 24px; } }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 36px;
  color: var(--muted);
  font-size: 14px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-grid .logo { color: var(--text); font-size: 28px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.copyright { margin-top: 32px; }

/* Focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Browsers without backdrop-filter: use more opaque panels so text stays readable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --glass: rgba(28, 28, 32, 0.92);
    --glass-strong: rgba(14, 14, 16, 0.97);
  }
  .site-header { background: rgba(8, 8, 10, 0.95); }
}

/* Phones and tablets: live backdrop blur is what makes panels and the header
   lag and "swim" over the background while scrolling in Android WebView. The
   background photo is already blurred, so use solid-ish glass instead. */
@media (hover: none) and (pointer: coarse) {
  :root {
    --glass: rgba(22, 22, 26, 0.80);
    --glass-hover: rgba(30, 30, 34, 0.86);
    --glass-strong: rgba(14, 14, 16, 0.96);
  }
  *, *::before, *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .site-header { background: rgba(8, 8, 10, 0.94); }
  .nav-links { background: rgba(8, 8, 10, 0.97); }
}

.hero-actions-gap { margin-top: 28px; }

/* ---------- Accounts, bikes, registration, admin ---------- */
.form { display: grid; gap: 16px; }
.form h3 { font-size: 30px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: #cfcfd4; }
.field small, .fine { color: var(--muted); font-size: 13px; margin: 0; }
.field input, .field select, .field textarea, .search, .admin-bar select, .code-box textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: 400 16px/1.4 var(--body); /* 16px stops iOS zooming in on focus */
}
.field textarea, .code-box textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search:focus { border-color: var(--accent); outline: none; }
.field input:user-invalid { border-color: #e5484d; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-msg { color: #ff8a8f; margin: 0; font-size: 14px; min-height: 0; }
.form-msg:empty { display: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; justify-self: start; }
.link-btn:hover { color: var(--text); }
.btn-danger { color: #ff8a8f; }
.btn-danger:hover { border-color: #ff8a8f; }

.page-account main > .container, .page-admin main > .container, .account-page { padding-top: 48px; padding-bottom: 96px; }
.auth-card {
  max-width: 460px;
  margin: 0 auto;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), 0 10px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.auth-tabs { margin-bottom: 22px; }
.auth-card .muted { margin: 0; }

.acct-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.acct-head h1 { font-size: clamp(48px, 8vw, 88px); }
.acct-head p { margin: 6px 0 0; }
.acct-actions { display: flex; gap: 10px; flex-wrap: wrap; }
section.acct-section { padding: 48px 0 0; border-top: 0; }
.acct-section h2 { font-size: 44px; }
.acct-section .section-head p { margin: 8px 0 0; }
.acct-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.acct-settings .info-card + .info-card { margin-top: 16px; }
.danger summary { cursor: pointer; font-weight: 600; color: #ff8a8f; }
.danger[open] summary { margin-bottom: 16px; }

.bike-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 20px; }
.bike-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight);
}
.bike-card h3 { font-size: 34px; }
.bike-card .eyebrow { margin-bottom: 6px; }
.bike-new { border-style: dashed; }
.plate { display: inline-block; margin-top: 6px; padding: 2px 8px; border: 1px solid #8a8a92; border-radius: 4px; font: 600 0.85rem/1.4 ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: 0.06em; color: #e6e6ea; background: rgba(255,255,255,0.06); white-space: nowrap; }
.bike-mods { color: #cfcfd4; margin: 8px 0 0; white-space: pre-line; }
.bike-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bike-actions .btn { padding: 10px 16px; font-size: 14px; }
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.photo { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, 0.35); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-del {
  position: absolute; top: 6px; right: 6px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--glass-border); background: rgba(0, 0, 0, 0.65); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer;
}
.photo-add {
  display: grid; place-items: center; cursor: pointer;
  border: 1px dashed var(--glass-border); color: var(--muted); font-weight: 600; font-size: 14px;
}
.photo-add:hover { color: var(--text); border-color: var(--accent); }
.photo-add.busy { cursor: progress; opacity: 0.7; }

.reg-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.reg-list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; }
.reg-list a { text-decoration: none; }

section.register-panel {
  margin-top: 40px;
  padding: 28px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--glass-highlight), 0 10px 40px rgba(0, 0, 0, 0.35);
  scroll-margin-top: 90px;
}
.register-panel h2 { font-size: 44px; margin-bottom: 12px; }
.register-panel > .muted { max-width: 560px; margin: 0 0 20px; }
.register-form { max-width: 460px; margin-top: 12px; }

.search { max-width: 460px; margin-bottom: 16px; }
.admin-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.admin-bar select { width: auto; max-width: 100%; flex: 1 1 260px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.admin-table tr:last-child td { border-bottom: 0; }
.user-detail { margin-top: 24px; }
.code-box { margin-top: 16px; padding: 16px; border: 1px solid var(--accent); border-radius: 10px; display: grid; gap: 10px; }
.code-box p { margin: 0; }
.code { font-size: 22px; letter-spacing: 0.12em; }
code { font-size: 13px; background: rgba(255, 255, 255, 0.08); padding: 1px 6px; border-radius: 6px; }

@media (max-width: 760px) {
  .acct-settings { grid-template-columns: 1fr; }
  .bike-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .field-row { grid-template-columns: 1fr; }
  .auth-card, section.register-panel { padding: 20px; }
}
.admin-title { font-size: clamp(48px, 8vw, 88px); margin-bottom: 28px; }
[hidden] { display: none !important; }

/* ---------- Tee mockup ---------- */
.teemock-canvas { display: block; width: 100%; height: auto; }
.view3d-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  font: 700 12px/1 var(--body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  padding: 9px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.view3d-btn:hover { border-color: rgba(255, 255, 255, 0.5); }

/* grey studio backdrop, like a merch flat-lay, so black tees stand out */
.tee-stage, .mockup-view {
  background: radial-gradient(ellipse at 50% 38%, #c6c6c8 0%, #a2a2a5 60%, #8c8c8f 100%);
  border-radius: var(--radius);
  padding: clamp(16px, 4vw, 48px);
}

.mockup-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
body.mockup-open { overflow: hidden; }
body.mockup-open .mockup-modal { display: grid; }
.mockup-box {
  width: min(980px, 100%);
  max-height: 100%;
  overflow: auto;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 12px;
}
.mockup-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; }
.mockup-head h2 { margin: 0; font-size: 26px; }
.mockup-loading { margin: 0; padding: 80px 0; text-align: center; color: #2a2a2d; }

/* tee.html */
.tee-designer { display: grid; gap: 20px; padding-top: 32px; padding-bottom: 64px; }
.tee-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tee-head h1 { margin: 0; font-size: clamp(40px, 6vw, 64px); line-height: 1; }
.back-link { display: inline-block; margin-bottom: 8px; text-decoration: none; }
.back-link:hover { color: var(--text); }
.tee-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tee-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tee-group {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 18px 20px 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  min-width: 0;
}
.tee-group legend { padding: 0 6px; font-weight: 700; }
.tee-file { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tee-file .btn { padding: 8px 14px; font-size: 14px; flex: none; }
.tee-file [data-file-name] { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tee-range { display: grid; grid-template-columns: 104px 1fr 92px; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: #cfcfd4; }
.tee-range input { width: 100%; accent-color: var(--accent); }
.tee-range output { text-align: right; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.tee-json-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.tee-json-box summary { cursor: pointer; font-weight: 600; }
.tee-json {
  margin: 10px 0 0;
  padding: 14px;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  color: #cfcfd4;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
}
@media (max-width: 760px) {
  .tee-panel { grid-template-columns: 1fr; }
  .tee-range { grid-template-columns: 88px 1fr 80px; }
}

/* ---------- News posts ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.post-card { border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post-media { aspect-ratio: 4 / 3; background: rgba(0, 0, 0, 0.35); }
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 22px 22px 24px; display: grid; gap: 10px; align-content: start; }
.post-body h3 { font-size: 34px; }
.post-body p { margin: 0; color: #cfcfd4; }
.post-body .btn { justify-self: start; margin-top: 6px; }
@media (max-width: 420px) { .post-grid { grid-template-columns: 1fr; } }

/* ---------- Admin ---------- */
.admin-wrap { padding-top: 40px; padding-bottom: 96px; }
/* Layout: sticky sidebar + content. Under 960px the sidebar slides in. */
.admin-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.page-admin main > .container.admin-shell { padding-top: 32px; padding-bottom: 96px; }
.admin-main { min-width: 0; }
.admin-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.admin-head .admin-title { margin: 0; font-size: clamp(44px, 6vw, 72px); }
.admin-side {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px;
  border-radius: var(--radius);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight);
}
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.side-head .eyebrow { margin: 0; }
.side-close, .side-open, .side-backdrop { display: none; }
.side-group { display: grid; gap: 2px; }
.side-group + .side-group { margin-top: 14px; }
.side-label {
  padding: 0 10px 6px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px; border-radius: 10px;
  color: #cfcfd4; text-decoration: none; font-weight: 600; font-size: 15px;
  transition: background 0.15s, color 0.15s;
}
.side-link svg { flex: none; opacity: 0.8; }
.side-link:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.side-link[aria-current="page"] { background: var(--text); color: var(--bg); }
.side-link[aria-current="page"] svg { opacity: 1; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 2px; }

@media (max-width: 960px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .side-open { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; }
  .side-close { display: inline-grid; }
  .admin-side {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(300px, 86vw);
    max-height: none;
    z-index: 120;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: rgba(12, 12, 14, 0.98);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }
  .side-open .admin-side { transform: none; visibility: visible; transition: transform 0.25s ease; }
  .side-backdrop {
    display: block; position: fixed; inset: 0; z-index: 110;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
  }
  .side-open .side-backdrop { opacity: 1; pointer-events: auto; }
  body.side-open { overflow: hidden; }
  .admin-head { flex-wrap: wrap; }
}
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-tile {
  display: grid; gap: 4px; padding: 18px 18px 16px; border-radius: var(--radius); text-decoration: none;
  background: var(--glass); border: 1px solid var(--glass-border);
}
.stat-tile:hover { border-color: rgba(255, 255, 255, 0.35); }
.stat-tile .n { font-family: var(--display); font-size: 48px; line-height: 1; }
.stat-tile .l { color: var(--muted); font-size: 13px; font-weight: 600; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.dash-grid .info-card + .info-card { margin-top: 0; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }
.info-card ul.dash-list { list-style: none; padding: 0; margin: 0 0 12px; }
.dash-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); margin: 0; }
.dash-list li:first-child { border-top: 0; }
.dash-right { text-align: right; flex: none; font-size: 14px; }
.dash-list.log li { font-size: 14px; }
.admin-table tr.warn td { color: #ff8a8f; }

.admin-list { display: grid; gap: 10px; }
.admin-item {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 12px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-border);
}
.admin-item.is-hidden { opacity: 0.6; }
.admin-thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, 0.35); }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-item-main { display: grid; gap: 2px; min-width: 0; }
.admin-item-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-item-main .muted { font-size: 13px; }
.admin-item-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--glass-border); font-size: 11px; font-weight: 700; color: var(--text); }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.icon-btn.sm { width: 32px; height: 32px; font-size: 16px; }
.icon-btn[disabled] { opacity: 0.3; cursor: default; }
.link-btn.danger { color: #ff8a8f; }
@media (max-width: 560px) {
  .admin-item { grid-template-columns: 48px minmax(0, 1fr); }
  .admin-thumb { width: 48px; height: 48px; }
  .admin-item-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

.admin-editor { margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid > .wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { font-size: 13px; font-weight: 600; color: #cfcfd4; padding: 0; margin-bottom: 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; padding-top: 22px; }
.checks .check { padding-top: 0; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.image-field > span { font-size: 13px; font-weight: 600; color: #cfcfd4; }
.image-pick { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.image-preview {
  width: 140px; aspect-ratio: 1; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--glass-border); font-size: 13px;
}
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.image-actions { display: grid; gap: 10px; flex: 1 1 220px; }
.image-actions .btn { justify-self: start; cursor: pointer; }
.image-path {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.35); color: var(--text); font: 13px/1.4 ui-monospace, monospace;
}
.advanced { margin-top: 4px; }
.advanced summary { cursor: pointer; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
textarea.code { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Home: upcoming event banners ---------- */
.banner-section { padding-top: 64px; }
.banner-section.top-banners { padding-top: 28px; padding-bottom: 72px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.banner-wordmark { width: min(100%, 560px); height: auto; filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.55)); }
.banner-brand .banner-content { gap: 20px; }
.banner-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  border-radius: 22px;
}
.banner-track::-webkit-scrollbar { display: none; }
.banner-track:focus-visible { outline-offset: 4px; }
.banner {
  position: relative;
  isolation: isolate;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
  min-height: 440px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: #0b0b0d;
}
.banner-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(18px) saturate(0.6) brightness(0.75);
  transform: scale(1.15);
}
.banner-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 5, 6, 0.92) 0%, rgba(5, 5, 6, 0.7) 55%, rgba(5, 5, 6, 0.35) 100%),
    repeating-linear-gradient(-20deg, transparent 0 22px, rgba(255, 255, 255, 0.025) 22px 24px);
}
.banner-content { display: grid; gap: 14px; justify-items: start; max-width: 640px; }
.banner-when { display: flex; align-items: center; gap: 14px; }
.banner-day { font-family: var(--display); font-size: clamp(72px, 10vw, 112px); line-height: 0.8; }
.banner-month {
  font-weight: 800; font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; line-height: 1.3; color: var(--muted);
}
.banner-count {
  margin-left: 6px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid var(--glass-border);
  font-size: 13px; font-weight: 700;
}
.banner-title { font-size: clamp(48px, 7vw, 92px); line-height: 0.9; }
.banner-summary { margin: 0; color: #d5d5da; font-size: 17px; max-width: 540px; }
.banner .hero-actions { margin-top: 8px; }
.banner-flag {
  font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
}
.banner-flag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 10px #3ddc84; }
.banner-poster {
  width: clamp(200px, 24vw, 300px);
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  transform: rotate(2deg);
}
.banner-poster img { width: 100%; height: auto; }
.banner-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.banner-dots { display: flex; gap: 8px; }
.banner-dot {
  width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.3); transition: width 0.2s, background 0.2s;
}
.banner-dot[aria-current="true"] { width: 26px; background: var(--text); }
@media (max-width: 760px) {
  .banner { grid-template-columns: 1fr; min-height: 0; gap: 24px; }
  .banner-shade { background: linear-gradient(180deg, rgba(5, 5, 6, 0.55) 0%, rgba(5, 5, 6, 0.92) 70%); }
  .banner-poster { display: none; }
  .banner-section { padding-top: 48px; }
  .banner-section.top-banners { padding-top: 16px; padding-bottom: 48px; }
  .banner { min-height: 460px; align-content: end; }
}

/* ---------- Awards ---------- */
.award-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.award-grid.one { grid-template-columns: 1fr; }
.award-card {
  --tier: #e8e9ec;
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: start;
  padding: 18px 20px; border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--tier) 14%, transparent), transparent 60%), var(--glass);
  border: 1px solid color-mix(in srgb, var(--tier) 40%, var(--glass-border));
}
.award-card.tier-gold { --tier: #e7c45a; }
.award-card.tier-silver { --tier: #cfd3da; }
.award-card.tier-bronze { --tier: #cd8b55; }
.award-card.tier-special { --tier: #ffffff; }
.award-card.is-revoked { opacity: 0.5; filter: grayscale(1); }
.award-medal { color: var(--tier); filter: drop-shadow(0 4px 14px color-mix(in srgb, var(--tier) 35%, transparent)); }
.award-medal svg { width: 56px; height: 56px; display: block; }
.award-body { display: grid; gap: 4px; min-width: 0; }
.award-body h3 { font-size: 30px; line-height: 1; }
.award-body p { margin: 0; font-size: 14px; color: #cfcfd4; }
.award-kind { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.award-verified { color: #3ddc84; }
.award-name { font-weight: 700; color: var(--text) !important; font-size: 16px !important; }
.award-bike { color: var(--text) !important; }
.award-code { margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); text-decoration: none; }
.award-code:hover { color: var(--text); }

/* ---------- Public profile ---------- */
.profile-page, .award-page { padding-top: 48px; padding-bottom: 96px; }
.profile-head { display: flex; gap: 24px; align-items: center; margin-bottom: 40px; flex-wrap: wrap; }
.profile-avatar {
  width: 112px; height: 112px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: var(--display); font-size: 64px; color: var(--accent-ink); background: var(--metal);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.profile-head h1 { font-size: clamp(52px, 8vw, 88px); margin: 6px 0 4px; }
.profile-head .muted { margin: 0; }
.profile-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-bio { margin: 12px 0 0; max-width: 620px; color: #d5d5da; font-size: 17px; }
.profile-section { margin-top: 40px; }
.profile-section h2 { font-size: 44px; margin-bottom: 16px; }

/* ---------- Award check ---------- */
.certificate {
  max-width: 720px; margin: 0 auto; padding: clamp(24px, 5vw, 48px); border-radius: 22px;
  background: var(--glass-strong); border: 1px solid var(--glass-border); display: grid; gap: 16px;
}
.certificate h1 { font-size: clamp(48px, 8vw, 80px); }
.certificate .facts { margin: 0; }
.certificate.is-invalid { border-color: rgba(255, 138, 143, 0.5); }
.verify-status { margin: 0; font-weight: 800; font-size: 18px; }
.verify-status.ok { color: #3ddc84; }
.verify-status.bad { color: #ff8a8f; }
.verify-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.verify-form .field { flex: 1 1 220px; }
.verify-form input { text-transform: uppercase; letter-spacing: 0.08em; }

/* account page public-profile form */
.public-form .field-row { align-items: center; }
.public-form .check { padding-top: 0; }
h3.sub { font-size: 26px; margin: 20px 0 10px; }

/* ---------- Header: account icon + menu ---------- */
.nav-links { margin-left: auto; }
.acct-nav { position: relative; margin-left: 24px; display: flex; align-items: center; }
.acct-signin {
  text-decoration: none; font-weight: 600; font-size: 14px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--glass-border); background: var(--glass);
}
.acct-signin:hover { border-color: rgba(255, 255, 255, 0.4); }
.acct-avatar {
  width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; flex: none;
  display: inline-grid; place-items: center;
  font: 400 22px/1 var(--display); color: var(--accent-ink); background: var(--metal);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}
.acct-avatar:hover, .acct-avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35); }
.acct-avatar.sm { width: 36px; height: 36px; font-size: 20px; cursor: default; }
.acct-avatar.lg { width: 96px; height: 96px; font-size: 54px; cursor: default; }
.acct-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: 248px;
  padding: 8px; border-radius: 14px; display: grid;
  background: rgba(14, 14, 16, 0.98); border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.acct-menu[hidden] { display: none; }
.acct-menu-head { display: flex; gap: 10px; align-items: center; padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.acct-menu-head div { display: grid; min-width: 0; }
.acct-menu-head strong, .acct-menu-head .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu-head .muted { font-size: 13px; }
.acct-menu a, .acct-menu button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px;
  text-decoration: none; color: #d5d5da; font: 500 15px/1.2 var(--body); background: none; border: 0; cursor: pointer;
}
.acct-menu a:hover, .acct-menu button:hover, .acct-menu a:focus-visible, .acct-menu button:focus-visible { background: rgba(255, 255, 255, 0.07); color: var(--text); outline: none; }
.acct-menu .acct-signout { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; color: #ff8a8f; }
@media (max-width: 760px) {
  .acct-nav { margin-left: auto; margin-right: 6px; }
  .acct-signin { padding: 8px 14px; }
  .acct-avatar { width: 36px; height: 36px; font-size: 20px; }
}

/* ---------- My account ---------- */
.acct-hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: clamp(22px, 4vw, 36px); border-radius: 20px;
  background: var(--glass-strong); border: 1px solid var(--glass-border);
}
.acct-hero h1 { font-size: clamp(44px, 7vw, 76px); margin: 4px 0; }
.acct-hero .muted { margin: 0; }
.acct-hero-main { min-width: 0; }
.acct-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.acct-stats a { display: grid; gap: 2px; text-decoration: none; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.acct-stats a:hover { background: rgba(255, 255, 255, 0.08); }
.acct-stats .n { font-family: var(--display); font-size: 40px; line-height: 1; }
.acct-stats .l { color: var(--muted); font-size: 13px; font-weight: 600; }
@media (max-width: 700px) {
  .acct-hero { grid-template-columns: auto minmax(0, 1fr); }
  .acct-hero .acct-actions { grid-column: 1 / -1; }
  .acct-avatar.lg { width: 72px; height: 72px; font-size: 40px; }
}
.acct-tip {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 16px; padding: 16px 20px; border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.03);
}
.acct-tip p { margin: 0; color: #d5d5da; max-width: 640px; }
.acct-block {
  margin-top: 20px; padding: clamp(20px, 3.5vw, 32px); border-radius: 18px;
  background: var(--glass); border: 1px solid var(--glass-border);
  scroll-margin-top: 90px;
}
.acct-block.form { display: grid; gap: 16px; }
.block-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.acct-block.form .block-head { margin-bottom: 0; }
.block-head h2 { font-size: clamp(34px, 5vw, 44px); }
.block-head p { margin: 6px 0 0; max-width: 620px; }
.block-link { font-weight: 600; text-decoration: none; color: var(--muted); white-space: nowrap; }
.block-link:hover { color: var(--text); }
.acct-block .reg-list { margin-top: 0; }
.past-regs { margin-top: 14px; }
.past-regs summary { cursor: pointer; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.bike-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.bike-mini {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 10px; border-radius: 12px; text-decoration: none;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
}
.bike-mini:hover { border-color: rgba(255, 255, 255, 0.3); }
.bike-mini-img { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, 0.35); }
.bike-mini-img img { width: 100%; height: 100%; object-fit: cover; }
.bike-mini > span:last-child { display: grid; gap: 2px; min-width: 0; }
.bike-mini .muted { font-size: 13px; }

/* ---------- Settings + bikes pages ---------- */
.settings-head { margin-bottom: 8px; }
.settings-head .back { margin-bottom: 12px; }
.settings-head h1 { font-size: clamp(48px, 8vw, 84px); }
.settings-head p { margin: 10px 0 0; max-width: 680px; }
.settings-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 12px; }
.settings-nav { position: sticky; top: 92px; display: grid; gap: 2px; padding-top: 20px; }
.settings-nav a { padding: 10px 14px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; }
.settings-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.settings-nav a[aria-current] { color: var(--bg); background: var(--text); }
.settings-nav .link-btn { margin: 14px 14px 0; color: #ff8a8f; }
@media (max-width: 860px) {
  .settings-shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .settings-nav {
    position: sticky; top: 68px; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 10px 0;
    background: rgba(5, 5, 6, 0.94); scrollbar-width: none;
  }
  .settings-nav a { flex: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
  .settings-nav .link-btn { display: none; }
  .settings-main .acct-block:first-child { margin-top: 8px; }
}
.type-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .type-cards { grid-template-columns: 1fr; } }
.type-card {
  position: relative; display: grid; gap: 6px; padding: 18px 18px 18px 52px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s, background 0.15s;
}
.type-card:hover { border-color: rgba(255, 255, 255, 0.35); }
.type-card:has(input:checked) { border-color: var(--text); background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px var(--text); }
.type-card input { position: absolute; left: 18px; top: 20px; width: 18px; height: 18px; accent-color: var(--accent); }
.type-card .type-icon { font-size: 22px; line-height: 1; }
.type-card strong { font-size: 17px; }
.type-card .muted { font-size: 14px; }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; }
.switch input {
  appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 26px; border-radius: 999px; margin: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.15); position: relative; transition: background 0.15s;
}
.switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform 0.15s;
}
.switch input:checked { background: #3ddc84; }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.danger-block { border-color: rgba(255, 138, 143, 0.35); }
.acct-block .field input:disabled { opacity: 0.6; }
@media (max-width: 760px) {
  .nav .logo { order: 0; }
  .nav .acct-nav { order: 1; }
  .nav .menu-toggle { order: 2; }
}

/* ---------- Profile tags ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tag-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.04);
  font-size: 14px; font-weight: 600; color: #d5d5da; cursor: pointer; user-select: none;
}
.tag-chip { position: relative; }
.tag-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.tag-chip:has(input:checked) { background: var(--text); color: var(--bg); border-color: var(--text); }
.tag-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.tag-chip.static, .tag-chip.locked { cursor: default; padding: 5px 12px; font-size: 13px; }
.tag-chip.locked, .tag-chip.given { border-color: rgba(61, 220, 132, 0.5); color: #8ff0b8; }
.tag-editor { margin-top: 8px; display: grid; gap: 10px; justify-items: start; }

/* ---------- Header cart: on the shop page, or anywhere once it has items ---------- */
.header-cart { display: none; margin-left: 20px; }
body.page-shop .header-cart, body.has-cart .header-cart { display: inline-flex; }
.header-cart svg { flex: none; }
@media (max-width: 760px) {
  .nav .header-cart { order: 1; margin-left: auto; padding: 8px 12px; }
  .nav .header-cart ~ .acct-nav { margin-left: 10px; }
  .header-cart .cart-label { display: none; }
}

@media (max-width: 700px) { .acct-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Limited editions ---------- */
.product-limited {
  position: absolute; right: 12px; top: 12px; padding: 5px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--metal); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.edition-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.edition-card {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start;
  padding: 14px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 55%), var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.edition-card.is-revoked { opacity: 0.5; filter: grayscale(1); }
.edition-img { position: relative; width: 112px; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, 0.4); }
.edition-img img { width: 100%; height: 100%; object-fit: cover; }
.edition-img img.placeholder { object-fit: contain; padding: 26px; opacity: 0.35; }
.edition-num {
  position: absolute; left: 6px; bottom: 6px; padding: 3px 8px; border-radius: 999px;
  font: 400 18px/1 var(--display); letter-spacing: 0.04em; color: var(--accent-ink); background: var(--metal);
}
.edition-body { display: grid; gap: 4px; min-width: 0; }
.edition-body h3 { font-size: 28px; line-height: 1; }
.edition-body p { margin: 0; font-size: 14px; color: #cfcfd4; }
.certificate .edition-grid { grid-template-columns: 1fr; }
.edition-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.edition-stat { display: grid; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-border); }
.edition-stat progress { width: 100%; height: 8px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.1); }
.edition-stat progress::-webkit-progress-bar { background: rgba(255, 255, 255, 0.1); }
.edition-stat progress::-webkit-progress-value { background: var(--text); border-radius: 999px; }
.edition-stat progress::-moz-progress-bar { background: var(--text); border-radius: 999px; }
@media (max-width: 420px) {
  .edition-card { grid-template-columns: 88px minmax(0, 1fr); }
  .edition-img { width: 88px; }
}

/* ---------- Event sponsors (logo grid) ---------- */
.sponsor-grid { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.sponsor-card {
  display: grid; justify-items: center; text-align: center; gap: 4px; height: 100%;
  padding: 20px 16px 18px; border-radius: var(--radius); text-decoration: none;
  background: var(--glass); border: 1px solid var(--glass-border);
  transition: border-color 0.15s, transform 0.15s;
}
a.sponsor-card:hover { border-color: rgba(255, 255, 255, 0.4); transform: translateY(-2px); }
.sponsor-logo { width: 100%; height: 120px; display: grid; place-items: center; margin-bottom: 10px; }
.sponsor-logo img { max-width: 100%; max-height: 120px; object-fit: contain; }
.sponsor-name { font-family: var(--display); font-size: 26px; line-height: 1; }
.sponsor-card .role { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.sponsor-handle { font-size: 13px; color: var(--muted); }
@media (max-width: 420px) { .sponsor-grid { grid-template-columns: 1fr 1fr; } .sponsor-logo { height: 90px; } .sponsor-logo img { max-height: 90px; } }

/* ---------- Shop: product-first merch grid ---------- */
.shop-head { padding: 64px 0 28px; }
.shop-head h1 { font-size: clamp(52px, 9vw, 96px); }
.shop-head p { color: var(--muted); max-width: 560px; margin: 10px 0 0; font-size: 16px; }
.shop-section { padding-top: 0; }
.shop-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding: 12px 0; margin-bottom: 32px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.shop-cats { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.shop-cat {
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  font: 700 12px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  border-bottom: 2px solid transparent;
}
.shop-cat:hover { color: var(--text); }
.shop-cat[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--text); }
.shop-tools { display: flex; align-items: center; gap: 20px; }
.shop-sort { display: flex; align-items: center; gap: 8px; }
.shop-sort span, .shop-count { font: 600 12px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.shop-sort select {
  background: transparent; color: var(--text); border: 0; padding: 6px 2px;
  font: 500 14px/1 var(--body); cursor: pointer;
}
.shop-sort select option { background: var(--bg-2); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 24px;
}
.product-tile { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--text); }
.pt-media {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 1; overflow: hidden;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.10), transparent 65%),
    linear-gradient(180deg, #1b1b1e, #111113);
}
.pt-media img.pt-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s ease, transform 0.5s ease; }
.pt-media .placeholder { width: 30%; height: auto; opacity: 0.16; }
.pt-media img.pt-back { opacity: 0; }
@media (hover: hover) {
  .product-tile:hover .pt-img { transform: scale(1.03); }
  .product-tile.has-back:hover .pt-img:not(.pt-back) { opacity: 0; }
  .product-tile.has-back:hover .pt-back { opacity: 1; }
  .product-tile:hover .pt-name { text-decoration: underline; text-underline-offset: 4px; }
}
.product-tile.is-out .pt-img { filter: grayscale(0.6) brightness(0.75); }
.pt-tags { position: absolute; left: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 1; }
.ptag {
  padding: 5px 9px; border-radius: 3px;
  font: 700 11px/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase;
  background: #050506; color: #fff; border: 1px solid rgba(255, 255, 255, 0.18);
}
.ptag-ltd { background: var(--metal); color: var(--accent-ink); border-color: transparent; }
.ptag-out { background: #fff; color: #050506; }
.pt-name {
  margin-top: 16px; max-width: 92%;
  font: 800 13px/1.35 var(--body); letter-spacing: 0.1em; text-transform: uppercase;
}
.pt-price { margin-top: 6px; font: 500 15px/1 var(--body); letter-spacing: 0.04em; color: #d6d6da; }
.coming-tile {
  display: grid; place-items: center; text-align: center; aspect-ratio: 1 / 1; padding: 20px;
  border: 1px dashed var(--line); border-radius: 6px; color: var(--muted);
}
.coming-tile h3 { font-size: 30px; color: var(--text); margin-bottom: 6px; }
.coming-tile p { margin: 0; font-size: 14px; }

@media (max-width: 860px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; }
  .shop-head { padding: 40px 0 20px; }
  .shop-bar { margin-bottom: 22px; }
  .pt-name { margin-top: 12px; font-size: 12px; }
  .pt-price { font-size: 14px; }
  .coming-tile h3 { font-size: 24px; }
}
@media (max-width: 560px) {
  .shop-tools { width: 100%; justify-content: space-between; }
  .pt-tags { left: 6px; bottom: 6px; }
  .ptag { font-size: 10px; padding: 4px 7px; }
}

/* ---------- Product page ---------- */
.product-page { padding-top: 40px; padding-bottom: 72px; }
.pp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: start; margin-top: 12px; }
.pp-main {
  position: relative; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.10), transparent 65%), linear-gradient(180deg, #1b1b1e, #111113);
}
.pp-main img { width: 100%; height: 100%; object-fit: cover; }
.pp-main img.placeholder { width: 30%; height: auto; opacity: 0.16; }
.pp-main .pt-tags { left: 14px; bottom: 14px; }
.pp-thumbs { display: flex; gap: 10px; margin-top: 10px; }
.pp-thumb {
  width: 76px; aspect-ratio: 1; padding: 0; border-radius: 4px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); background: #151517; color: var(--text);
}
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-thumb[aria-pressed="true"] { border-color: var(--text); }
.pp-3d { font: 700 10px/1.3 var(--body); letter-spacing: 0.08em; text-transform: uppercase; }
.pp-3d:hover { border-color: var(--muted); }
.pp-info { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 14px; }
.pp-cat { font: 700 12px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pp-info h1 { font-size: clamp(40px, 5vw, 60px); line-height: 0.95; }
.pp-price .price { font-size: 22px; font-weight: 600; }
.pp-ltd { margin: 0; color: #d6d6da; font-size: 14px; }
.pp-label { font: 700 12px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.pp-info .size { min-width: 52px; padding: 12px 12px; border-radius: 4px; font-size: 14px; }
.pp-add { width: 100%; justify-content: center; margin-top: 6px; padding-top: 16px; padding-bottom: 16px; }
.pp-desc { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; color: #d6d6da; font-size: 15px; line-height: 1.6; }
.pp-desc p { margin: 0; }
.pp-more { padding: 72px 0 0; }
.pp-more h2 { font-size: 36px; margin-bottom: 24px; text-align: center; }
.pp-more .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .product-page { padding-top: 24px; }
  .pp { grid-template-columns: 1fr; gap: 24px; }
  .pp-info { position: static; }
  .pp-more .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Fan favourite voting (vote.html, Admin › Fan vote, printed QR cards) ---------- */
.cat-scooter { --cat: #22b8ae; --cat-ink: #04201e; }
.cat-sport { --cat: #e5484d; --cat-ink: #ffffff; }
.cat-underbone { --cat: #f2a531; --cat-ink: #1d1200; }

.vote-page { max-width: 560px; padding-top: 32px; padding-bottom: 72px; }
.vote-page .lead, .vote-head .lead { color: #cfcfd4; font-size: 17px; }
.vote-card {
  border: 1px solid var(--glass-border);
  border-top: 6px solid var(--cat, var(--accent));
  border-radius: var(--radius);
  background: var(--glass-strong);
  padding: 0 20px 22px;
  overflow: hidden;
}
.vote-band {
  margin: 0 -20px 18px;
  padding: 10px 20px;
  background: var(--cat, var(--accent));
  color: var(--cat-ink, var(--accent-ink));
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 14px;
}
.vote-num { font-family: var(--display); font-size: 64px; line-height: 1; color: var(--cat, var(--text)); margin-top: 6px; }
.vote-bike { font-size: clamp(36px, 9vw, 52px); line-height: 1; margin: 4px 0 6px; overflow-wrap: anywhere; }
.vote-rider { color: var(--muted); margin: 0; }
.vote-action { margin-top: 20px; display: grid; gap: 10px; }
.vote-state { margin: 0; color: #e6e6ea; }
.vote-state.ok { color: #6be3a4; font-weight: 700; font-size: 18px; }
.vote-btn { font-size: 17px; padding-top: 16px; padding-bottom: 16px; }
.vote-mine { margin-top: 24px; }
.vote-mine h2 { font-size: 32px; margin-bottom: 8px; }
.vote-mine ul { list-style: none; margin: 0 0 10px; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.vote-mine li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.vote-mine li:first-child { border-top: 0; }
.vote-mine li > span:nth-child(2) { font-size: 13px; color: var(--muted); }
.vote-mine li strong { grid-column: 2; overflow-wrap: anywhere; }
.vote-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--cat, var(--accent)); grid-row: span 2; }
.vote-who { margin-top: 18px; }
.vote-head { margin-bottom: 20px; }
.vote-head h1 { font-size: clamp(48px, 12vw, 80px); }
.vote-results-grid { display: grid; gap: 16px; }
.vote-results { border: 1px solid var(--glass-border); border-radius: var(--radius); overflow: hidden; background: var(--glass-strong); padding: 0; }
.vote-results .vote-band { margin: 0; }
.vote-results ol { list-style: none; margin: 0; padding: 0; }
.vote-results li { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); }
.vote-results li:first-child { border-top: 0; }
.vote-results li.winner { background: rgba(255, 255, 255, 0.05); }
.vote-results li.winner .vote-place { color: var(--cat); }
.vote-place { font-family: var(--display); font-size: 26px; }
.vote-res-bike { display: grid; min-width: 0; }
.vote-res-bike strong { overflow-wrap: anywhere; }
.vote-count { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* admin */
.vote-status-card h3 { margin-top: 4px; }
.vote-tools { margin-top: 16px; }
.vote-warn { color: #ffcf7a; }
.vote-walkin { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.vote-table input, .vote-table select {
  width: 100%; min-width: 120px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text); font: inherit;
}
.vote-table td { vertical-align: middle; }
.vote-table tr.is-hidden td { opacity: 0.55; }
.row-actions { display: flex; gap: 12px; align-items: center; }
.vote-standing .admin-table td { white-space: normal; }
.vote-standing .admin-table td:nth-child(3) { width: 3em; }
.vote-standings-head { margin-top: 36px; align-items: end; }
.vote-standings-head h2 { font-size: 44px; }
.vote-standings { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.vote-standing h3 { font-size: 26px; display: flex; align-items: center; gap: 10px; }
.vote-standing .lead-row td { color: var(--cat); font-weight: 700; }
.vote-print { display: none; }
.vote-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }
.vote-in { color: #6be3a4; font-weight: 700; }
.vote-photo { display: block; max-width: none; width: calc(100% + 40px); margin: -18px -20px 16px; aspect-ratio: 4 / 3; object-fit: cover; background: #111; }
.vote-res-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.reg-card { display: flex; gap: 14px; align-items: center; border: 1px solid var(--glass-border); border-radius: 12px; padding: 12px 14px; margin: 8px 0 16px; background: rgba(255,255,255,0.04); }
.reg-card.is-in { border-color: rgba(107, 227, 164, 0.5); }
.reg-card-no { font-family: var(--display); font-size: 40px; line-height: 1; min-width: 56px; text-align: center; }
.reg-card strong { display: block; }
.reg-photo-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.reg-photo-row img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
.reg-photo-btn { cursor: pointer; }

/* printed QR cards: A6, four to an A4 sheet */
@media print {
  @page { size: A4 portrait; margin: 0; }
  body.printing-cards { background: #fff !important; padding: 0 !important; }
  body.printing-cards::before, body.printing-cards::after,
  body.printing-cards .site-header, body.printing-cards .site-footer, body.printing-cards .admin-side,
  body.printing-cards .side-backdrop, body.printing-cards .admin-head, body.printing-cards .drawer,
  body.printing-cards .drawer-backdrop, body.printing-cards .toast,
  body.printing-cards [data-admin] > :not([data-print-cards]) { display: none !important; }
  body.printing-cards main, body.printing-cards .admin-shell, body.printing-cards .admin-main { display: block !important; padding: 0 !important; margin: 0 !important; max-width: none !important; }
  body.printing-cards .vote-print { display: grid !important; grid-template-columns: 105mm 105mm; grid-auto-rows: 148.5mm; }
  .vpc {
    box-sizing: border-box; width: 105mm; height: 148.5mm; overflow: hidden;
    border: 0.3mm dashed #bbb; background: #fff; color: #111;
    display: flex; flex-direction: column; break-inside: avoid; page-break-inside: avoid;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .vpc-band { background: var(--cat); color: var(--cat-ink); font: 800 15pt/1 var(--body); text-transform: uppercase; letter-spacing: 0.05em; text-align: center; padding: 5mm 4mm; }
  .vpc-body { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 4mm 7mm 5mm; }
  .vpc-brand { font: 800 9pt/1.2 var(--body); letter-spacing: 0.16em; color: #555; }
  .vpc-event { font: 400 18pt/1.1 var(--display); color: #111; margin-top: 1mm; }
  .vpc-qr { width: 62mm; height: 62mm; margin: 3mm 0 1mm; image-rendering: pixelated; }
  .vpc-scan { font: 800 11pt/1.2 var(--body); text-transform: uppercase; letter-spacing: 0.08em; }
  .vpc-num { font: 400 34pt/1 var(--display); color: var(--cat); -webkit-text-stroke: 0.2mm #111; margin-top: 2mm; }
  .vpc-label { font: 700 12pt/1.2 var(--body); margin-top: 1mm; overflow-wrap: anywhere; max-height: 2.4em; overflow: hidden; }
  .vpc-foot { margin-top: auto; font: 500 7pt/1.4 var(--body); color: #666; }
}

/* ---------- Mobile app layout: bottom tab bar for signed-in riders ---------- */
.tabbar { display: none; }
.page-title { margin: 8px 0 16px; }
.page-title h1 { font-size: clamp(44px, 11vw, 72px); }
.seg { display: none; }

@media (max-width: 760px) {
  body.has-tabbar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80; /* above the page and header, below the cart drawer (90+) and toasts */
    height: calc(62px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #08080a;
    border-top: 1px solid var(--glass-border);
    transform: translateZ(0);
  }
  .tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    -webkit-tap-highlight-color: transparent;
  }
  .tab svg { transition: transform 0.15s ease; }
  .tab:active svg, .tab:active .tab-avatar { transform: scale(0.9); }
  .tab.is-active { color: var(--text); }
  .tab.is-active svg { stroke-width: 2.3; }
  .tab-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--metal); color: var(--accent-ink);
    font: 400 15px/1 var(--display);
    box-shadow: 0 0 0 2px transparent;
  }
  .tab.is-active .tab-avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
  body.has-tabbar .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  /* the tab bar replaces the account menu and the long footer */
  body.has-tabbar .acct-nav { display: none; }
  body.has-tabbar .site-footer .footer-grid { display: none; }
  body.has-tabbar .site-footer { padding: 20px 0 16px; }
  body.has-tabbar .site-footer .copyright { margin: 0; }
  .seg { display: flex; gap: 8px; margin-bottom: 8px; position: sticky; top: 69px; z-index: 5; padding: 8px 0; background: var(--bg); }
  .seg-btn { flex: 1; text-align: center; padding: 10px; border: 1px solid var(--glass-border); border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
  .seg-btn span { color: var(--muted); margin-left: 4px; }
}
.acct-links { display: grid; margin: 32px 0 8px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.acct-links > a, .acct-links > button { display: block; width: 100%; box-sizing: border-box; padding: 15px 16px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); text-align: left; text-decoration: none; font: 600 15px/1.2 var(--body); }
.acct-links > :first-child { border-top: 0; }
.acct-links > button.danger { color: #ff8a8f; text-decoration: none; }

/* ---------- Shop orders (orders.html, account, admin) ---------- */
.acct-stats.acct-stats-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .acct-stats.acct-stats-3 { grid-template-columns: repeat(3, 1fr); } .acct-stats-3 .n { font-size: 32px; } }
.acct-block-plain { margin-top: 28px; }
.acct-block-plain h2.sub { font-size: 32px; margin: 0 0 12px; }
.order-list { display: grid; gap: 14px; }
.order-card {
  padding: clamp(16px, 3vw, 24px); border-radius: 16px; scroll-margin-top: 90px;
  background: var(--glass); border: 1px solid var(--glass-border);
}
.order-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.04em; }
.order-items { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.order-items li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.order-total { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.order-admin-note { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); font-size: 14px; }
.order-pay { margin-top: 16px; padding: 16px; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, 0.25); }
.order-pay h3 { font-size: 26px; margin: 0 0 6px; }
.order-pay p { margin: 0 0 10px; }
.bank-box { display: grid; gap: 8px; margin: 0; }
.bank-box div { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bank-box dt { color: var(--muted); font-size: 14px; }
.bank-box dd { margin: 0; font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.03em; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.order-actions:empty { display: none; }
.order-actions label.btn { cursor: pointer; }
.checkout-box .btn-block { margin-top: 4px; }
.pill.order-placed { border-color: rgba(255, 200, 90, 0.55); color: #ffd27a; }
.pill.order-review { border-color: rgba(120, 180, 255, 0.55); color: #a9cdff; }
.pill.order-paid, .pill.order-ready { border-color: rgba(120, 220, 150, 0.5); color: #9be7b3; }
.pill.order-collected, .pill.order-cancelled { color: var(--muted); }
.admin-orders { display: grid; gap: 14px; margin-top: 14px; }
.admin-order p { margin: 10px 0 0; }
.receipt-row { display: flex; gap: 14px; align-items: center; margin-top: 14px; }
.receipt-thumb { width: 96px; height: 128px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; display: block; }
.order-edit { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 14px; }
.order-line { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 80px minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 8px; }
@media (max-width: 640px) {
  .order-edit { grid-template-columns: 1fr; }
  .order-line { grid-template-columns: 1fr 1fr; }
}
.admin-order .order-items { padding: 0; }
.admin-order .hero-actions { margin-top: 14px; }
[data-new-order] [data-add-line] { justify-self: start; }

/* Photos can't be long-pressed to save on phones or dragged out (js/main.js blocks right-click). */
body.no-photo-save img, body.no-photo-save canvas {
  -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; -webkit-user-select: none;
}
