/* ═══════════════════════════════════════════════════════════
   NIGHT RUN CREW — check-in app
   Matches the main site: volt on night-black, Anton display,
   Kaushan Script accent, Space Grotesk body, pill selectors.
   ═══════════════════════════════════════════════════════════ */

/* ── Self-hosted fonts (no third-party requests) ── */
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/anton.woff2') format('woff2');
}
@font-face {
  font-family: 'Kaushan Script';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/kaushan-script.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk.woff2') format('woff2');
}

:root {
  --bg:      #05070B;
  --bg-2:    #090C12;
  --surface: #0D1119;
  --line:    rgba(255, 255, 255, 0.09);
  --volt:    #D8FF3A;
  --cobalt:  #7D88FF;
  --text:    #EEF1E8;
  --muted:   rgba(238, 241, 232, 0.56);
  --mono-xs: 0.6875rem;
  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-script: 'Kaushan Script', cursive;
  --font-body: 'Space Grotesk', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--volt); color: #05070B; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; }

/* Film grain over everything */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Chrome ── */
.topbar {
  display: flex; justify-content: center;
  padding: 1.2rem 1.25rem 0;
}
.brand {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.6rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.script-accent {
  font-family: var(--font-script);
  color: var(--volt);
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.18em;
  line-height: 1;
  display: inline-block;
  transform: rotate(-4deg) translateY(0.04em);
  margin-left: 0.08em;
}
.foot {
  text-align: center;
  font-size: var(--mono-xs);
  letter-spacing: 0.28em;
  color: rgba(238, 241, 232, 0.3);
  padding: 2.5rem 1rem 2rem;
}
.foot-credit { margin-top: 0.5rem; letter-spacing: 0.18em; color: var(--volt); text-transform: uppercase; }
.foot-credit a { color: var(--volt); text-underline-offset: 3px; }
.foot-credit a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 460px; margin: 0 auto; padding: 0 1.25rem 2rem; }
.wrap.wide { max-width: 1080px; }

/* ── Admin dashboard ── */
.admin-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem; flex-wrap: wrap;
  padding: 1.6rem 0 1.3rem;
}
.admin-head .kicker { margin-bottom: 0.35rem; }
.admin-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.2rem;
}
.tile b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1;
  margin-bottom: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.tile span { font-size: var(--mono-xs); letter-spacing: 0.18em; color: var(--muted); }
.tile-volt b { color: var(--volt); text-shadow: 0 0 30px rgba(216, 255, 58, 0.3); }
.tile-cobalt b { color: var(--cobalt); }
.tabs-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem; flex-wrap: wrap;
  margin-top: 1.4rem; margin-bottom: 1.2rem;
}
.tabs-row .reg-tabs { margin-bottom: 0; flex: 1 1 auto; }
.tabs-actions { display: flex; gap: 0.5rem; padding-bottom: 0.5rem; }

.tile-btn { cursor: pointer; text-align: left; text-decoration: none; display: block; transition: border-color 0.18s, transform 0.18s var(--ease-out); }
.tile-btn:hover { border-color: rgba(216, 255, 58, 0.5); transform: translateY(-2px); }
button.tile-btn:hover { border-color: var(--cobalt); }

/* ── Data table (members) ── */
.table-tools {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.pager { display: flex; align-items: center; gap: 0.5rem; }
.pager-label { font-size: var(--mono-xs); letter-spacing: 0.12em; color: var(--muted); font-variant-numeric: tabular-nums; }
.pager-size {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}
.pager .btn:disabled { opacity: 0.35; cursor: default; transform: none; }
.search {
  width: min(340px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 0.55rem 1.1rem;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.search::placeholder { color: rgba(238, 241, 232, 0.35); }
.search:focus {
  outline: none;
  border-color: var(--volt);
  box-shadow: 0 0 0 3px rgba(216, 255, 58, 0.18);
}
/* .card.table-wrap beats .card's own padding regardless of rule order. */
.card.table-wrap { overflow: auto; max-height: 62vh; padding: 0; }
.card.scroll-card { overflow: auto; max-height: 55vh; }
/* Slim themed scrollbar hugging the card edge; none shown when the rows fit. */
.table-wrap, .scroll-card { scrollbar-width: thin; scrollbar-color: rgba(238, 241, 232, 0.25) transparent; }
.table-wrap::-webkit-scrollbar, .scroll-card::-webkit-scrollbar { width: 8px; height: 8px; }
.table-wrap::-webkit-scrollbar-track, .scroll-card::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb, .scroll-card::-webkit-scrollbar-thumb {
  background: rgba(238, 241, 232, 0.18);
  border-radius: 999px;
}
.table-wrap::-webkit-scrollbar-thumb:hover, .scroll-card::-webkit-scrollbar-thumb:hover { background: rgba(216, 255, 58, 0.45); }
/* border-collapse:separate keeps the sticky header solid — collapsed borders
   scroll with the rows and let content peek through the header line. */
.card.table-wrap { position: relative; isolation: isolate; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table thead { position: sticky; top: 0; z-index: 5; background: var(--surface); }
.table th {
  font-size: var(--mono-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-align: left;
  padding: 0.9rem 1.2rem 0.7rem;
  border-bottom: 0;
  box-shadow: 0 1px 0 var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}
.table .badge { margin-left: 0.55rem; vertical-align: middle; }
/* Regulars: the name itself goes volt — no pill. */
.table .is-regular { color: var(--volt); text-shadow: 0 0 18px rgba(216, 255, 58, 0.25); }
.table .action .btn { padding: 0.3rem 0.85rem; font-size: 0.75rem; }
/* Long names/emails crop with an ellipsis; clicking the row expands them. */
.table .crop {
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.table tbody tr { cursor: pointer; }
.member-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.member-name.is-regular { color: var(--volt); text-shadow: 0 0 24px rgba(216, 255, 58, 0.3); }
.modal .run-meta em { overflow-wrap: anywhere; text-align: right; }
.table td {
  padding: 0.75rem 1.2rem;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9rem;
  vertical-align: middle;
}
.table td.num, .table td.action { white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.table td b { font-weight: 600; }
.table .muted { color: var(--muted); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .action { text-align: right; }

/* ── Pending review modal ── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(3, 4, 7, 0.8);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--surface);
  border: 1px solid rgba(125, 136, 255, 0.45);
  border-radius: 18px;
  width: min(520px, 100%);
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.9rem; }
.modal-close { font-size: 1.6rem; line-height: 1; color: var(--muted); }
.modal-close:hover { color: var(--volt); }
.row-actions { display: flex; gap: 0.5rem; flex-basis: 100%; justify-content: flex-end; margin-top: 0.4rem; }

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.2rem;
}
@media (max-width: 860px) {
  .admin-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .admin-head { align-items: flex-start; flex-direction: column; }
}

/* ── Hero ── */
.hero-min { text-align: center; padding: 1.2rem 0 1.3rem; }
.kicker {
  font-size: var(--mono-xs);
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--volt);
  margin-bottom: 0.7rem;
}
.kicker a { color: var(--volt); text-decoration: none; }
.kicker a:hover { text-decoration: underline; text-underline-offset: 4px; }
h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 6.5vw, 2.3rem);
  line-height: 1;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  text-shadow: 0 4px 60px rgba(0, 0, 0, 0.55);
}
.sub { color: var(--muted); font-size: 0.9375rem; margin-top: 0.7rem; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1rem;
}
.card-kicker {
  font-size: var(--mono-xs);
  letter-spacing: 0.24em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.card-kicker:not(:first-child) { margin-top: 1.6rem; }

/* ── Fields ── */
.field { display: block; margin-bottom: 1.2rem; }
.field > span {
  display: block;
  font-size: var(--mono-xs);
  letter-spacing: 0.24em;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.field input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.field input::placeholder { color: rgba(238, 241, 232, 0.3); }
.field input:focus {
  outline: none;
  border-color: var(--volt);
  box-shadow: 0 0 0 3px rgba(216, 255, 58, 0.18);
}
.field input[type="time"], .field input[type="datetime-local"] { color-scheme: dark; }
.field select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23D8FF3A' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}
.field select:focus { outline: none; border-color: var(--volt); box-shadow: 0 0 0 3px rgba(216, 255, 58, 0.18); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
/* Two joined inputs under one label, e.g. date + time. Wraps on narrow screens.
   span.field-duo outranks the generic .field span caption rule. */
span.field-duo { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }
.field-duo > input:first-child, .field-duo > select:first-child { flex: 1 1 10rem; min-width: 0; }
.field-duo .duo-time { flex: 0 0 8.5rem; width: 8.5rem; text-align: center; }
select.duo-time { text-align: left; padding-right: 2.2rem; }
/* Time stepper: hour / minutes / am-pm as three compact dropdowns. */
span.time-trio { display: flex; gap: 0.4rem; flex: 0 0 auto; margin: 0; }
.time-trio select {
  width: auto;
  padding: 0.85rem 1.7rem 0.85rem 0.7rem;
  background-position: right 0.55rem center;
}
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; gap: 0; } }
.field textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  resize: vertical;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.field textarea::placeholder { color: rgba(238, 241, 232, 0.3); }
.field textarea:focus { outline: none; border-color: var(--volt); box-shadow: 0 0 0 3px rgba(216, 255, 58, 0.18); }

/* ── Website photo picker (weekly form) ── */
.photo-pick { display: flex; align-items: center; gap: 0.9rem; }
.photo-pick img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.photo-pick .form-note { margin: 0; text-align: left; }
.field[hidden] { display: none; }
/* The hidden attribute always wins, even over display:grid/flex rules. */
[hidden] { display: none !important; }

/* ── Merch admin ── */
.item-actions { display: flex; justify-content: center; gap: 2rem; margin-top: 1.1rem; }
.merch-prod { display: flex; align-items: center; gap: 0.7rem; color: var(--text); text-decoration: none; }
.merch-prod:hover b { color: var(--volt); }
.merch-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.merch-thumb-empty { display: inline-block; background: var(--bg-2); }
.merch-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.merch-actions form { display: inline-flex; }
.icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  transition: border-color 0.18s, color 0.18s;
}
.icon-btn:hover:not(:disabled) { border-color: var(--volt); color: var(--volt); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.size-grid { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.size-cell { display: flex; flex-direction: column; gap: 0.4rem; width: 4.2rem; }
.pill.pill-sm { padding: 0.35rem 0.5rem; font-size: 0.8125rem; min-width: 0; }
/* Muted selected state for the compact size pills. */
.pill-wrap input:checked + .pill.pill-sm {
  background: rgba(216, 255, 58, 0.14);
  border-color: rgba(216, 255, 58, 0.5);
  color: var(--volt);
  font-weight: 600;
  box-shadow: none;
}
.size-qty {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  padding: 0.4rem 0.5rem;
  text-align: center;
}
.size-qty::placeholder { color: rgba(238, 241, 232, 0.3); }
.size-qty:focus { outline: none; border-color: var(--volt); }
.merch-photos { display: flex; gap: 1rem; flex-wrap: wrap; }
.photo-slot[hidden] { display: none; }
.slot-prev[hidden] { display: none; }
.photo-slot { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; width: 130px; }
.slot-prev {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.photo-slot .form-note { margin: 0; text-align: left; }

/* Check-in state as words next to the card's time — clearer than an icon. */
.sum-status { font-style: normal; margin-left: 0.45rem; font-size: 0.85em; letter-spacing: 0.08em; }
.sum-status.is-ok { color: var(--volt); }
.sum-status.is-pending { color: var(--cobalt); }

.roster-name { cursor: pointer; }
.roster-name:hover { color: var(--volt); }
.roster-row { align-items: center; }
.roster-row b { flex: 1 1 auto; }
.roster-row .row-actions { flex-basis: auto; margin-top: 0; }

/* ── Run night photos (admin roster page) ── */
.night-photos { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1rem; }
.night-photos:empty { margin-bottom: 0; }
.night-photo { position: relative; width: 110px; height: 110px; }
.night-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.np-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(5, 7, 11, 0.8);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  border: 1px solid var(--line);
}
.np-x:hover { color: #FF8A8A; border-color: rgba(255, 77, 77, 0.5); }
.np-move { top: auto; bottom: 4px; }
.np-move:hover { color: var(--volt); border-color: rgba(216, 255, 58, 0.5); }
.np-left { left: 4px; right: auto; }
.np-right { right: 4px; }

/* ── Run picker (several runs open at once) ── */
.run-picker { margin-bottom: 1.1rem; }
.run-picker .pill { text-decoration: none; flex: 0 1 auto; }
.run-picker .pill.is-active {
  background: var(--volt);
  border-color: var(--volt);
  color: #05070B;
  font-weight: 600;
}

/* ── Tabs (I'm running / Aid station) ── */
.reg-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.2rem;
}
.reg-tab {
  padding: 0.7rem 1.2rem;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.18s, border-color 0.18s;
}
.reg-tab:hover { color: var(--text); }
.reg-tab.is-active { color: var(--volt); border-bottom-color: var(--volt); }
.reg-panel { animation: panelIn 0.4s var(--ease-out); }

.rule { border: 0; border-top: 1px dashed var(--line); margin: 1.5rem 0 1.4rem; }

/* ── Distance pills ── */
.pills { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pill-wrap { position: relative; flex: 1 1 auto; display: flex; }
.pill-wrap input { position: absolute; opacity: 0; pointer-events: none; }
.pill-wrap .pill { width: 100%; }
.pill-wrap input:checked + .pill {
  background: var(--volt);
  border-color: var(--volt);
  color: #05070B;
  font-weight: 600;
  box-shadow: 0 0 26px rgba(216, 255, 58, 0.25);
}
.pill-wrap input:focus-visible + .pill { outline: 2px solid var(--volt); outline-offset: 3px; }
.idtabs { margin-bottom: 1.3rem; }
.idtabs .pill { font-size: 0.9rem; }
.pill {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.18s var(--ease-out);
  flex: 1 1 auto;
  text-align: center;
  min-width: 5.2rem;
}
.pill:hover { border-color: rgba(216, 255, 58, 0.5); color: var(--text); transform: translateY(-2px); }
.pill:active { transform: translateY(1px); }
.pill.is-active {
  background: var(--volt);
  border-color: var(--volt);
  color: #05070B;
  font-weight: 600;
  box-shadow: 0 0 26px rgba(216, 255, 58, 0.25);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), border-color 0.18s, color 0.18s;
}
.btn:active { transform: translateY(1px); }
.btn-volt { background: var(--volt); color: #05070B; }
.btn-volt:hover { transform: translateY(-2px); box-shadow: 0 6px 32px rgba(216, 255, 58, 0.35); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.32); color: var(--muted); }
.btn-ghost:hover { border-color: var(--volt); color: var(--volt); transform: translateY(-2px); }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.8125rem; }
.btn-full { width: 100%; margin-top: 0.4rem; }

.link-btn { color: var(--muted); text-decoration: underline; text-underline-offset: 4px; font-size: 0.8125rem; }
.link-btn:hover { color: var(--volt); }
.inline-form { text-align: center; margin-top: 0.9rem; }

/* ── Returning runner ── */
.returning {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
}
.returning summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.returning summary:hover { color: var(--volt); }
.returning form { margin-top: 1.2rem; }

/* ── Bib card (you're in) ── */
.bib-card {
  border: 1.5px dashed rgba(216, 255, 58, 0.6);
  border-radius: 18px;
  padding: 2.25rem 2rem;
  text-align: center;
  background: var(--surface);
  margin-bottom: 1rem;
  animation: panelIn 0.5s var(--ease-out);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.bib-kicker { font-size: var(--mono-xs); letter-spacing: 0.3em; color: var(--volt); margin-bottom: 1rem; }
.bib-num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 14vw, 5rem);
  line-height: 1;
  color: var(--volt);
  text-shadow: 0 0 40px rgba(216, 255, 58, 0.35);
  margin-bottom: 0.4rem;
}
.bib-num span { font-size: 0.38em; letter-spacing: 0.1em; }
.bib-name { font-weight: 600; font-size: 1.125rem; margin-bottom: 1.4rem; }
.bib-station {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--volt);
  text-shadow: 0 0 40px rgba(216, 255, 58, 0.35);
  margin-bottom: 0.5rem;
}
.bib-code {
  font-size: var(--mono-xs);
  letter-spacing: 0.24em;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  max-width: 280px;
  margin: 0 auto 1.2rem;
  padding-top: 1rem;
}
.bib-note { font-size: 0.875rem; color: var(--muted); }

/* ── Event meta (venue / aid stations / after) ── */
.run-meta { list-style: none; }
.run-meta li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line);
  text-align: right;
}
.run-meta li:last-child { border-bottom: 0; }
.run-meta li span { color: var(--muted); font-size: var(--mono-xs); letter-spacing: 0.2em; text-align: left; white-space: nowrap; }
.run-meta li em { font-style: normal; }
.spots { color: var(--volt); font-variant-numeric: tabular-nums; }
.spots.is-full { color: #FF8A8A; }

/* ── +Editor rows (distances, aid stations) ── */
.aid-row { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.6rem; }
.aid-row select, .aid-row input {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 0.5rem 0.8rem;
}
.aid-row select { cursor: pointer; }
.aid-row .aid-type { flex: 0 0 auto; width: 78px; }
.aid-row input[type="number"] { width: 64px; }
.aid-row .aid-name { flex: 1 1 auto; min-width: 220px; }
/* No spinner arrows on km/number fields */
.aid-row input[type="number"]::-webkit-inner-spin-button,
.aid-row input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button,
.field input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.aid-row input[type="number"], .field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.aid-row select:focus, .aid-row input:focus {
  outline: none;
  border-color: var(--volt);
  box-shadow: 0 0 0 3px rgba(216, 255, 58, 0.18);
}
.aid-del { color: var(--muted); font-size: 1.3rem; line-height: 1; padding: 0 0.3rem; }
.aid-del:hover { color: #FF8A8A; }
#aidRows, #distRows { margin-top: 0.3rem; }

/* ── Geolocation status ── */
.geo-status {
  display: flex; align-items: center; gap: 0.55rem;
  font-size: var(--mono-xs);
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-top: 0.9rem;
}
.geo-status i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
  animation: blink 1.6s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }
.geo-status.is-on { color: var(--volt); }
.geo-status.is-on i { background: var(--volt); animation: none; }
.geo-status.is-off { color: var(--cobalt); }
.geo-status.is-off i { background: var(--cobalt); animation: none; }

/* ── Status badges + pending state ── */
.badge {
  font-style: normal;
  font-size: var(--mono-xs);
  letter-spacing: 0.14em;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  vertical-align: middle;
}
.badge-ok { color: var(--volt); border: 1px solid rgba(216, 255, 58, 0.45); }
.badge-pending { color: var(--cobalt); border: 1px solid rgba(125, 136, 255, 0.55); }
.badge-cancelled { color: #FF8A8A; border: 1px solid rgba(255, 77, 77, 0.5); }
.badge-vol { color: var(--moon, #9DB8FF); border: 1px solid rgba(157, 184, 255, 0.5); }
.bib-card.is-pending { border-color: rgba(125, 136, 255, 0.6); }
.bib-card.is-pending .bib-kicker { color: var(--cobalt); }
.bib-card.is-pending .bib-num { color: var(--cobalt); text-shadow: 0 0 40px rgba(125, 136, 255, 0.35); }
.approve-form { flex-basis: 100%; text-align: right; margin-top: 0.3rem; }

/* ── No run / next run / tonight ── */
.next-run { text-align: center; }
.tonight-card { text-align: center; border-color: rgba(216, 255, 58, 0.3); }
.tonight-card.is-cancelled { border-color: rgba(255, 77, 77, 0.4); }
.tonight-card.is-cancelled .next-run-title { text-decoration: line-through; color: var(--muted); }

/* Slim tonight bar on the dashboard */
.tonight-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  padding: 0.9rem 1.5rem;
  border-color: rgba(216, 255, 58, 0.3);
}
.tonight-bar.is-cancelled { border-color: rgba(255, 77, 77, 0.4); }
.tonight-bar.is-cancelled .tonight-title { text-decoration: line-through; color: var(--muted); }
.tonight-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.tonight-sub {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-left: 0.6rem;
}
.tonight-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.next-run-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.row.is-tonight { border-left-color: var(--volt); background: rgba(216, 255, 58, 0.05); }
.toolbar .btn + .btn { margin-left: 0.5rem; }

/* ── Volunteer sign-up list ── */
.vol-event summary {
  cursor: pointer;
  display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap;
  list-style: none;
}
.vol-event summary::-webkit-details-marker { display: none; }
.vol-event summary b { font-weight: 600; letter-spacing: 0.04em; }
.vol-event summary span { color: var(--muted); font-size: 0.8125rem; }
.vol-event summary:hover b { color: var(--volt); }
.vol-event[open] summary { margin-bottom: 0.9rem; }
.vol-event .run-meta { margin-bottom: 1.1rem; }
.vol-in { color: var(--volt); text-align: left; margin: 0; }

/* ── Mini stats strip ── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.stats-strip.one { grid-template-columns: 1fr; }
.stats-strip .stat { border-left: 1px solid var(--line); padding-left: 0.9rem; }
.stats-strip .stat b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 8vw, 2.7rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.25rem;
}
.stats-strip .stat span { font-size: var(--mono-xs); letter-spacing: 0.18em; color: var(--muted); }
.stats-strip .stat-volt { border-left-color: var(--volt); }
.stats-strip .stat-volt b { color: var(--volt); text-shadow: 0 0 30px rgba(216, 255, 58, 0.3); }
.stats-strip .stat-volt span { color: var(--volt); }

/* ── Consent + POPIA ── */
.consent-check {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--volt);
  margin-bottom: 1.1rem;
  cursor: pointer;
}
.consent-check.plain { color: var(--text); }
.consent-check input {
  width: 1.05rem; height: 1.05rem;
  margin-top: 0.15rem;
  accent-color: var(--volt);
  flex-shrink: 0;
}
.popia {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.9rem;
}
.popia summary { cursor: pointer; font-size: 0.8125rem; color: var(--muted); }
.popia summary:hover { color: var(--text); }
.popia p { font-size: 0.8125rem; color: var(--muted); margin-top: 0.7rem; line-height: 1.55; }

/* ── Notes + errors ── */
.form-note { font-size: 0.8125rem; color: var(--muted); text-align: center; margin-top: 1rem; }
.error {
  border: 1px solid rgba(255, 77, 77, 0.5);
  background: rgba(255, 77, 77, 0.08);
  color: #FFB3B3;
  border-radius: 12px;
  padding: 0.8rem 1.1rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ── Admin lists ── */
.toolbar { text-align: center; margin-bottom: 1.2rem; }
.list { padding: 0.25rem 0; }
.row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  flex-wrap: wrap;
  padding: 0.95rem 1.5rem;
  border-bottom: 1px dashed var(--line);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background-color 0.18s, border-color 0.18s;
}
.row:last-child { border-bottom: 0; }
a.row:hover { background: rgba(216, 255, 58, 0.05); border-left-color: var(--volt); }
/* Share chip inside a row link: sits at the right edge, doesn't inherit the row's link look. */
.row .share-btn { margin-left: auto; font-style: normal; cursor: pointer; flex: none; }
.share-btn { cursor: pointer; }
/* Runner card share link sits under the card content, quiet until needed. */
details.vol-event .link-btn.share-btn { display: block; margin-top: 0.9rem; }
.row b { font-weight: 600; letter-spacing: 0.04em; }
.row span { color: var(--muted); font-size: 0.8125rem; letter-spacing: 0.04em; }

/* ── QR poster ── */
.poster { text-align: center; padding-top: 2.5rem; }
.poster img {
  width: min(78vw, 320px);
  border-radius: 18px;
  margin: 1.8rem auto;
  background: #fff;
  padding: 14px;
  border: 1.5px dashed rgba(216, 255, 58, 0.6);
}
.poster .form-note a { color: var(--volt); }

@media print {
  body { background: #fff; color: #000; }
  .grain, .no-print, .foot { display: none; }
  .kicker, .script-accent { color: #000; }
  .sub { color: #333; }
  h1 { text-shadow: none; }
  .poster img { border-color: #000; padding: 0; }
}
