/* Charles County Elite Athlete Hub: live site styles.
   Visual language follows the designed prototype app: black and gold
   palette, dark cards with rounded corners, big pill and tile buttons,
   red reserved for join type actions, and a fixed bottom nav bar. */

:root {
  --black: #0b0b0d;
  --panel: #16161a;
  --panel-2: #1e1e24;
  --gold: #f2b01e;
  --gold-dark: #c78f0a;
  --gold-soft: #f5d97e;
  --red: #d8232a;
  --text: #f5f2ea;
  --muted: #a9a49a;
  --line: #2c2c33;
  --radius: 18px;
}

* { box-sizing: border-box; }

img { max-width: 100%; }

html, body { margin: 0; padding: 0; }
html { overscroll-behavior: none; }
/* The public home fits the screen exactly, so while it is showing there is
   nothing to scroll: lock the page in place (no drag, no rubber band).
   app.js adds this class only for the signed-out home view; the signed-in
   home is taller (member sections) and scrolls normally. */
html.lock-scroll, body.lock-scroll { overflow: hidden; }

body {
  background: var(--black);
  color: var(--text);
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* Room for the fixed bottom nav bar: the bar is 58px of button plus 12px
     of its own padding, plus the phone safe area it already pads itself. */
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

a { color: var(--gold); }

.hidden { display: none !important; }
.muted { color: var(--muted); }

button { font: inherit; }

/* Header */
.site-header {
  background: #000;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark {
  background: var(--gold);
  color: #000;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 15px;
}
.brand-name { font-weight: 700; font-size: 17px; line-height: 1.15; }
.brand-sub { color: var(--gold); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }

.auth-area { display: flex; align-items: center; gap: 10px; }
.auth-email { font-size: 13px; color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons */
.btn {
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { background: var(--gold-dark); color: #000; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 600; }
.btn-ghost:hover { border-color: var(--gold); }
.btn-red { background: var(--red); color: #fff; }
.btn:active, .tile:active, .tab-btn:active { transform: scale(.98); }

/* Layout */
main { flex: 1; width: 100%; min-height: 0; display: flex; flex-direction: column; }
.view { max-width: 1080px; margin: 0 auto; padding: 20px 16px 40px; }
/* The home page is short enough to fit a phone screen whole; trim its
   top and bottom air so it does not scroll when everything already fits. */
#view-home { padding-top: 8px; padding-bottom: 6px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view-title { font-size: 26px; margin: 6px 0 14px; letter-spacing: .02em; }

/* Home hero, replicating the prototype Public home: a split hero that
   stays two columns at every width, copy left (about 52%) and the team
   picture right (about 48%) with its caption bar under it */
.hero {
  background: #000;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  margin-top: 6px;
  overflow: hidden;
  /* The hero absorbs whatever screen height is left after the header,
     the contact block, and the bottom bar clearance, so the public home
     fits the screen exactly instead of scrolling a few pixels. */
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.hero-grid {
  display: grid;
  grid-template-columns: 52fr 48fr;
  flex: 1;
  min-height: 0;
}
.hero-copy {
  padding: 30px 26px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.hero h1 { font-size: 34px; margin: 0; letter-spacing: .04em; text-transform: uppercase; line-height: 1.12; }
.hero-title-gold { display: block; color: var(--gold); }
.tagline { color: var(--gold-soft); font-weight: 600; font-size: 16px; line-height: 1.5; max-width: 620px; margin: 14px 0 0; }

.clubhouse-band { margin-top: 22px; }
.band-label {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.pill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.pill-btn {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  min-height: 44px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  min-width: 0;
}
.pill-dark { background: var(--panel-2); color: var(--text); }
.pill-dark:hover { border-color: var(--gold); }
.pill-gold { background: var(--gold); border-color: var(--gold); color: #000; }
.pill-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.pill-red { background: var(--red); border-color: var(--red); color: #fff; }
.pill-btn:active { transform: scale(.98); }

.hero-stats { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 22px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 23px; line-height: 1.15; }
.hero-stats span { color: var(--muted); font-size: 12px; max-width: 118px; margin-top: 2px; }

.hero-media { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.hero-img { flex: 1; min-height: 0; }
.hero-img img { width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-caption {
  background: #000;
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  text-align: center;
}
.hero-caption b { display: block; font-size: 14.5px; }
.hero-caption span { color: var(--gold); font-weight: 800; font-size: 14.5px; }

/* Home contact block, under the hero */
.contact-block { margin-top: 8px; }
.contact-block h2 {
  font-size: 20px;
  margin: 0 0 8px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.contact-block p { margin: 4px 0; font-size: 16px; }

/* Home Clubhouse tiles: two column grid of big tappable cards */
.tiles-band { margin-top: 24px; }
.tiles-label {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
  min-height: 112px;
  padding: 18px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.tile:hover { border-color: var(--gold); }
.tile-ico { color: var(--gold); display: inline-flex; margin-bottom: 6px; flex: none; }
.tile-ico svg { width: 27px; height: 27px; }
.tile-name { font-size: 19px; font-weight: 800; line-height: 1.2; }
.tile-sub { color: var(--muted); font-size: 13px; }
.tile-gold { background: var(--gold); border-color: var(--gold); color: #000; }
.tile-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.tile-gold .tile-ico { color: #000; }
.tile-gold .tile-sub { color: rgba(0, 0, 0, .62); }

/* Panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 18px;
}
.panel-label {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.star-panel { border-color: var(--gold); }
.star-name { font-size: 24px; font-weight: 800; margin: 0 0 2px; }
.star-meta { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.star-note { font-size: 16px; margin: 0; }
.star-link { margin-top: 12px; display: inline-block; }

.meet-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.meet-row:last-child { border-bottom: none; }
.meet-name { font-weight: 700; }
.meet-dates { color: var(--muted); font-size: 14px; }

/* Schedule view: the indoor season as meet cards, ported from the
   prototype's schedule page */
.sched-title { text-transform: uppercase; }
.sched-title .title-red { color: var(--red); }
.sched-intro { color: #cfc9ba; margin: 0 0 18px; max-width: 640px; }
.meet-card {
  display: flex;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.meet-chip {
  background: #000;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  text-align: center;
  min-width: 76px;
  height: fit-content;
}
.meet-chip b { display: block; font-size: 17px; line-height: 1.2; }
.meet-chip span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.meet-main { flex: 1; min-width: 0; }
.meet-card-name {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: 17px;
  line-height: 1.25;
}
.meet-host { color: var(--red); font-weight: 700; font-size: 14px; margin-top: 2px; }
.meet-where { color: #cfc9ba; font-size: 14.5px; margin-top: 4px; }
.meet-note { color: var(--gold); font-size: 13.5px; font-weight: 600; margin-top: 6px; }
.meet-arrival { text-align: right; min-width: 88px; }
.meet-arrival span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.meet-arrival b { color: var(--red); font-size: 16.5px; line-height: 1.3; }

/* Roster */
.search-row input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 16px;
}
.search-row input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.athlete-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  color: var(--text);
  width: 100%;
  font: inherit;
}
.athlete-card:hover { border-color: var(--gold); }
.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 10px;
  background: var(--panel-2);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  color: var(--gold);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 104px; height: 104px; font-size: 32px; }
.card-name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.card-group { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* Athlete detail */
.athlete-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.athlete-head h1 { margin: 0 0 4px; font-size: 28px; }
.athlete-facts { color: var(--muted); font-size: 14px; }
.athlete-tagline { font-style: italic; margin-top: 6px; color: var(--text); }

.pb-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pb-tile {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 120px;
}
.pb-event { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.pb-mark { font-size: 20px; font-weight: 800; }

.result-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.result-table th, .result-table td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.result-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.meet-heading { margin: 18px 0 6px; font-size: 17px; }
.meet-heading .meet-dates { font-weight: 400; }

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}
.badge-gold { background: var(--gold); color: #000; }
.badge-silver { background: #cfd2d6; color: #000; }
.badge-bronze { background: #c47b42; color: #000; }

.simple-list { list-style: none; margin: 0; padding: 0; }
.simple-list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.simple-list li:last-child { border-bottom: none; }

/* Forms */
#signin-form { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
#signin-form label { font-weight: 600; font-size: 14px; }
#signin-form input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 16px;
}
.form-message { min-height: 1.4em; }
.form-message.ok { color: var(--gold); }
.form-message.err { color: var(--red); }

/* My Family: the link request form and the coach approval queue */
.link-form { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.link-form label { font-weight: 600; font-size: 14px; }
.link-form select {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 16px;
}
.queue-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.queue-row:last-child { border-bottom: none; }
.queue-who { flex: 1; min-width: 200px; }

/* Footer */
.site-footer {
  background: #000;
  border-top: 3px solid var(--gold);
  margin-top: auto;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 16px 24px;
  display: flex;
  gap: 8px 28px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}
.footer-club { font-weight: 700; color: var(--text); width: 100%; }

/* Bottom nav bar: fixed, on every view, modeled on the prototype tabs */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: #000;
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .45);
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
}
.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 58px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 6px 2px;
  cursor: pointer;
}
.tab-btn .tab-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 27px;
  border-radius: 999px;
}
.tab-btn svg { width: 21px; height: 21px; }
.tab-btn.is-active { color: var(--text); }
.tab-btn.is-active .tab-ico { background: var(--gold); color: #000; }

@media (min-width: 900px) {
  /* On wide screens the bar floats as a rounded pill, like the prototype. */
  .bottom-nav {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 16px;
    width: min(680px, calc(100vw - 32px));
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 8px;
  }
  body { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  /* The hero stays split on phones, like the prototype: smaller type,
     tighter padding, same two columns */
  .hero h1 { font-size: 17px; line-height: 1.08; }
  .hero-copy { padding: 12px 12px 8px; }
  .tagline { font-size: 12px; margin-top: 9px; line-height: 1.42; }
  .clubhouse-band { margin-top: 11px; }
  .band-label { font-size: 10px; margin-bottom: 6px; }
  .pill-grid { gap: 6px; }
  .pill-btn { font-size: 11.5px; padding: 7px 5px; min-height: 36px; }
  .hero-stats { gap: 8px; margin-top: 10px; flex-wrap: nowrap; }
  .hero-stats div { flex: 1 1 0; min-width: 0; }
  .hero-stats b { font-size: 14px; }
  .hero-stats span { font-size: 9px; max-width: none; line-height: 1.35; }
  .hero-img { min-height: 0; }
  .hero-caption { padding: 6px 8px; }
  .hero-caption b, .hero-caption span { font-size: 11px; }
  .contact-block { margin-top: 6px; }
  .contact-block h2 { font-size: 17px; margin-bottom: 5px; }
  .meet-card { gap: 10px; padding: 13px; }
  .meet-chip { min-width: 62px; padding: 7px 6px; }
  .meet-chip b { font-size: 14.5px; }
  .meet-chip span { font-size: 9.5px; }
  .meet-card-name { font-size: 15px; }
  .meet-host { font-size: 12.5px; }
  .meet-where { font-size: 13px; }
  .meet-arrival { min-width: 70px; }
  .meet-arrival b { font-size: 14.5px; }
  .contact-block p { font-size: 14.5px; margin: 2px 0; line-height: 1.4; }
  .header-inner { gap: 8px; }
  .auth-email { display: none; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .tile { min-height: 104px; padding: 15px 13px; }
  .tile-name { font-size: 17px; }
  .staff-grid, .biz-grid, .fee-grid, .press-strip { grid-template-columns: 1fr; }
}

/* Clubhouse pages (About, News, Yearbook, Alumni, Training, Join):
   content ported from the prototype's Public pages, in the live palette */
.pg em { color: var(--gold); font-style: normal; }
.pg-lede { font-size: 16.5px; line-height: 1.55; margin: 4px 0 14px; }
.pg-h2 { font-size: 21px; margin: 28px 0 10px; }
.pg-h3 { font-size: 18px; margin: 20px 0 8px; }
.panel .pg-h3:first-child { margin-top: 0; }
.pg .sub { color: var(--muted); }
.pg .hint { color: var(--muted); font-size: 13.5px; margin-top: 12px; }
.story p { margin: 0 0 12px; line-height: 1.6; }
.text-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--gold);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* About: staff cards, All-American counts, policies */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.staff-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.staff-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.staff-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold);
  color: #000;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.staff-avatar.red { background: var(--red); color: #fff; }
.staff-card h3 { margin: 0; font-size: 18px; line-height: 1.25; }
.staff-role { color: var(--gold); font-weight: 700; font-size: 13.5px; margin: 2px 0 0; }
.staff-card p { line-height: 1.6; }
.staff-facts, .pack-list { list-style: none; padding: 0; margin: 12px 0 0; }
.staff-facts li, .pack-list li {
  padding: 7px 0 7px 18px;
  position: relative;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.staff-facts li::before, .pack-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}
.staff-certs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
}
.chip .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 7px;
}
.aa-stats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; }
.aa-stats div { display: flex; flex-direction: column; }
.aa-stats b { font-size: 24px; color: var(--gold); line-height: 1.15; }
.aa-stats span { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.policy-text h4 { margin: 16px 0 6px; font-size: 15.5px; }
.policy-text p { margin: 0 0 10px; line-height: 1.6; }
.policy-text ul { margin: 0 0 10px; padding-left: 20px; }
.policy-text li { margin-bottom: 5px; line-height: 1.55; }
.about-call {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
}

/* News */
.news-list { list-style: none; padding: 0; margin: 6px 0 0; }
.news-list li { padding: 13px 0; border-bottom: 1px solid var(--line); }
.news-list li:last-child { border-bottom: none; }
.news-list a { font-weight: 800; font-size: 16.5px; text-decoration: none; }
.news-list a:hover { text-decoration: underline; }
.news-headline { font-weight: 800; font-size: 16.5px; }
.news-meta { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; }

/* Yearbook (Club Archives) */
.yb-toggle {
  display: flex;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  max-width: 540px;
  margin: 6px 0 4px;
}
.yb-toggle button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 9px 6px;
  min-height: 42px;
  font-weight: 800;
  font-size: 13.5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.yb-toggle button[aria-pressed="true"] { background: var(--gold); color: #000; }
.yb-empty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 12px;
}
.yb-empty p { margin-bottom: 0; line-height: 1.6; }

/* Alumni */
.alumni-entry { margin-top: 20px; }
.alumni-photo-ph {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 2px;
}
.alumni-panel { margin-top: 12px; }
.alumni-sub-red { color: var(--red); font-weight: 800; }
.alumni-cap { color: var(--muted); font-size: 13px; margin-top: 8px; }
.star-badge {
  display: inline-block;
  background: var(--gold);
  color: #000;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Training and Recovery */
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.card-actions .btn { text-decoration: none; display: inline-block; }
.biz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.biz {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.biz h3 { margin: 0 0 4px; font-size: 16.5px; }
.biz .price {
  color: var(--gold);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.biz p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.55; }
.biz .btn { margin-top: 10px; display: inline-block; text-decoration: none; }

/* Join */
.fee-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.fee-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.fee-card b { display: block; font-size: 15px; line-height: 1.3; }
.fee-card .amt { display: block; font-size: 24px; font-weight: 800; color: var(--gold); margin: 6px 0; }
.fee-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.press-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.press-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  display: block;
}
.press-outlet {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.press-read { display: block; margin-top: 8px; color: var(--gold); font-weight: 700; font-size: 13.5px; }

/* Alumni photos and Archives gallery (prototype replica pass) */
.alumni-photo-img { display: block; width: 100%; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 10px; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.archive-grid a { display: block; }
.archive-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* Store (prototype replica pass): section toggle, product grid, nutrition, fundraiser */
.store-toggle {
  display: flex;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  max-width: 540px;
  margin: 6px 0 4px;
}
.store-toggle button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 9px 6px;
  min-height: 42px;
  font-weight: 800;
  font-size: 13.5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.store-toggle button[aria-selected="true"] { background: var(--gold); color: #000; }
.store-note { margin: 14px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
@media (min-width: 900px) { .store-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) { .store-grid { grid-template-columns: 1fr; } }
.product {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.product img { display: block; width: 100%; height: 200px; object-fit: cover; }
.product .prod-body { padding: 14px 16px 16px; }
.product h3 { margin: 0; font-size: 17px; }
.product .price { display: block; font-weight: 800; color: var(--gold); font-size: 16px; margin-top: 4px; }
.product p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 6px 0 0; }
.product .size-list { color: var(--text); font-size: 13px; font-weight: 700; margin-top: 10px; }
.nutrition-panel { margin-top: 14px; }
.nutrition-visual {
  height: 170px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 20px;
}
.nutrition-visual .nut-kicker { color: var(--gold-soft); font-weight: 800; letter-spacing: 2px; font-size: 12px; text-transform: uppercase; }
.nutrition-visual .nut-title { font-size: 40px; font-weight: 800; line-height: 1; text-transform: uppercase; }
.nutrition-visual .nut-sub { color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.35; max-width: 220px; }
.panel-inset {
  background: var(--panel-2);
  margin-top: 14px;
}
.panel-inset p { margin: 0; }
.fund-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff8e6;
  color: #1a130a;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 800;
}
.fund-badge i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex: none; }
.fund-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; }
.fund-stats div b { display: block; font-size: 26px; line-height: 1; }
.fund-stats div span { font-size: 13px; color: var(--muted); }
.fund-progress-track {
  height: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}
.fund-progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--red)); border-radius: 999px; }
.fund-recent {
  margin: 20px 0 4px;
  font-size: 12.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red);
}
.donor-list { list-style: none; margin: 8px 0 0; padding: 0; }
.donor-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.donor-list li:last-child { border-bottom: 0; }
.donor-list b { white-space: nowrap; color: var(--gold); }
.impact-list { list-style: none; margin: 8px 0 0; padding: 0; }
.impact-list li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; font-size: 14.5px; line-height: 1.55; }
.impact-list li:last-child { border-bottom: 0; }
.impact-list li::before { content: "\2665"; color: var(--red); flex: none; }

/* Three-view home (public / member / admin) and the coach extras. */
.tab-btn { position: relative; }
.tab-badge {
  position: absolute; top: 1px; right: calc(50% - 21px);
  background: var(--red); color: #fff; font-size: 10px; font-weight: 800;
  min-width: 17px; height: 17px; line-height: 17px; border-radius: 999px;
  text-align: center; padding: 0 4px;
}
.admin-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.admin-actions .pill-btn { width: 100%; }
.admin-actions .admin-wide { grid-column: 1 / -1; }
.pay-badge {
  background: #fff; color: var(--red); border-radius: 999px;
  padding: 1px 8px; font-size: 11px; font-weight: 800; margin-left: 6px;
  white-space: nowrap;
}
.gold-star { color: var(--gold); }
#preview-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #241a12; border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 10px; margin-bottom: 10px; font-size: 13px;
}
.control-center {
  background: linear-gradient(160deg, #8e1f1f, #6d1414);
  border-radius: 16px; padding: 16px 14px; color: #fff; margin-top: 14px;
}
.control-center h2 { margin: 0 0 8px; font-size: 19px; text-transform: uppercase; letter-spacing: .02em; }
.control-center p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #f3dede; }
.kpi-row { display: flex; gap: 8px; margin-top: 12px; }
.kpi-row > div {
  flex: 1 1 0; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08); border-radius: 12px; padding: 10px;
}
.kpi-row b { display: block; font-size: 20px; }
.kpi-row span { font-size: 11px; color: #f3dede; line-height: 1.3; display: block; margin-top: 2px; }
.flow-panel { margin-top: 14px; }
.flow-step { margin-top: 12px; }
.flow-step b { font-size: 14.5px; }
.flow-step p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: var(--red);
  color: #fff; font-size: 12px; margin-right: 6px; vertical-align: 2px;
}

/* Player card (athlete page), ported from the prototype. */
.card-scene { perspective: 1400px; -webkit-perspective: 1400px; margin: 14px auto 0; max-width: 340px; }
.pcard { position: relative; aspect-ratio: 5 / 7; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2,.7,.3,1); }
.pcard.flipped { transform: rotateY(180deg); }
/* iOS Safari drops backface-visibility when a face has busy children, so
   the faces also swap visibility halfway through the flip (the .4s delay
   is half the .8s turn), the same fix the prototype uses. */
.pface {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 18px; overflow: hidden; border: 3px solid var(--gold);
  display: flex; flex-direction: column;
  transition: visibility 0s linear .4s;
}
.pfront { background: linear-gradient(165deg, #241b0e, #12100c 60%); color: #f7ecd7; transform: rotateY(0deg); visibility: visible; }
.pback { background: var(--panel-2); color: var(--text); transform: rotateY(180deg); visibility: hidden; padding: 16px; overflow-y: auto; }
.pcard.flipped .pfront { visibility: hidden; }
.pcard.flipped .pback { visibility: visible; }
.pimg {
  height: 54%; position: relative; flex: none;
  background: radial-gradient(120% 90% at 50% 0%, #3a2a10 0%, #1c1509 55%, #100d08 100%);
  display: flex; align-items: center; justify-content: center;
}
.pimg img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.pimg-initials { font-size: 84px; font-weight: 800; color: var(--gold); letter-spacing: .02em; }
.masthead {
  position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between;
  padding: 10px 12px; font-weight: 800; font-size: 12px; letter-spacing: .14em; color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.pbody { padding: 12px 14px 14px; }
.pbody .series { margin: 0; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); }
.pbody h3 { margin: 4px 0 0; font-size: 24px; }
.pbody .nick { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.pr-strip { display: flex; gap: 8px; margin-top: 12px; }
.pr-strip .pr { flex: 1 1 0; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.pr-strip .pr span { font-size: 11px; color: var(--muted); display: block; }
.pr-strip .pr b { display: block; font-size: 15px; margin-top: 1px; }
.medal-row { margin-top: 10px; font-size: 13px; color: var(--gold-soft); }
.pback h3 { margin: 0; font-size: 22px; }
.pback .nick { color: var(--red); margin: 2px 0 4px; font-size: 13px; }
.pback h4 { margin: 14px 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.pback ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.55; }
.card-actions { display: flex; justify-content: center; margin-top: 12px; }

/* Channels: the Board and Race Day Live */
.chan-note { margin: 4px 0 12px; }
.composer { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 14px; }
.composer textarea, .edit-area {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); padding: 10px; font: inherit; font-size: 16px; resize: vertical;
}
.composer-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.msg-list { display: flex; flex-direction: column; gap: 12px; }
.msg { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.msg.pinned { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.msg-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.msg-name { font-weight: 700; }
.coach-tag { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.msg-time { color: var(--muted); font-size: 12px; font-weight: 400; }
.pin-badge { color: #14100c; background: var(--gold); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.edited-tag { color: var(--muted); font-size: 11px; }
.msg-body { margin-top: 6px; line-height: 1.5; overflow-wrap: anywhere; }
.msg-body a, .comment-body a { color: var(--gold-soft); }
.msg-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.msg-act { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.msg-act.danger { color: #ff9a94; }
.comments { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.comment-head { font-size: 13px; font-weight: 600; }
.comment-body { font-size: 14px; line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; }
.comment-form { display: flex; gap: 8px; }
.comment-form input {
  flex: 1 1 auto; min-width: 0; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); padding: 9px 10px; font: inherit; font-size: 16px;
}
.archived-banner { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; color: var(--muted); }
.rd-head { background: linear-gradient(160deg, #3d0f0d, #1c0f0c); border: 1px solid var(--red); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.rd-title { font-size: 20px; font-weight: 800; }
.rd-sub { color: var(--gold-soft); margin-top: 2px; }
.rd-status { color: var(--muted); margin-top: 6px; font-size: 14px; }
.past-btn { margin: 0 8px 8px 0; }

/* Family edit panel (athlete page) */
.edit-panel .fld { display: block; margin-top: 12px; }
.edit-panel .fld span {
  display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 5px;
}
.edit-panel .fld input[type="text"] {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); padding: 10px; font: inherit; font-size: 16px;
}
.edit-panel .fld input[type="file"] { font: inherit; font-size: 14px; color: var(--muted); }
.share-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

/* Progress graph (athlete page) */
.event-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.chip.is-active { background: var(--gold); border-color: var(--gold); color: #14100c; }
.progress-svg { width: 100%; height: auto; display: block; }
.pg-line { fill: none; stroke: var(--gold); stroke-width: 2.5; }
.pg-dot { fill: var(--gold); stroke: #14100c; stroke-width: 1.5; }
.pg-val { fill: var(--gold-soft); font-size: 12px; font-weight: 700; text-anchor: middle; }
.pg-meet { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.pg-axis { stroke: var(--line); stroke-width: 1; }
.chart-note { margin-top: 6px; }

/* Schedule week view and change star */
.seg-toggle { display: flex; gap: 8px; margin: 14px 0 4px; }
.seg-btn {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.seg-btn.is-active { background: var(--gold); border-color: var(--gold); color: #14100c; }
.week-day { margin-top: 16px; }
.week-day-head { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.today-tag {
  background: var(--red); color: #fff; border-radius: 999px; padding: 1px 9px;
  font-size: 11px; font-weight: 700; vertical-align: 2px;
}
.week-none { margin: 0 0 4px; }
.week-item {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 8px;
}
.week-item-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-item-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.week-item-note { font-size: 13.5px; margin-top: 5px; line-height: 1.45; }
.week-item.is-cancelled .week-item-main b { text-decoration: line-through; }
.cancel-chip {
  background: var(--red); color: #fff; border-radius: 999px; padding: 1px 9px;
  font-size: 11px; font-weight: 700;
}
.change-chip, .meet-chip-mini {
  background: rgba(216,164,65,.16); color: var(--gold-soft); border: 1px solid rgba(216,164,65,.45);
  border-radius: 999px; padding: 1px 9px; font-size: 11px; font-weight: 700;
}
.band-badge {
  background: rgba(216,164,65,.16); color: var(--gold-soft); border: 1px solid rgba(216,164,65,.45);
  border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700;
}

/* Schedule week view and change star */
.seg-toggle { display: flex; gap: 8px; margin: 14px 0 6px; }
.seg-btn {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 7px 18px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.seg-btn.is-active { background: var(--gold); border-color: var(--gold); color: #14100c; }
.week-day { margin-top: 16px; }
.week-day-head { font-weight: 800; font-size: 16px; margin-bottom: 8px; }
.today-tag {
  background: var(--red); color: #fff; border-radius: 999px; padding: 1px 9px;
  font-size: 11px; font-weight: 800; vertical-align: 2px;
}
.week-item {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 8px;
}
.week-item.is-cancelled { opacity: .75; }
.week-item.is-cancelled .week-item-main b { text-decoration: line-through; }
.week-item-main { display: flex; align-items: center; gap: 8px; }
.week-item-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.week-item-note { font-size: 14px; margin-top: 6px; line-height: 1.45; }
.week-none { margin: 0 0 8px; }
.cancel-chip {
  background: var(--red); color: #fff; border-radius: 999px; padding: 1px 9px;
  font-size: 11px; font-weight: 800;
}
.change-chip {
  background: var(--gold); color: #14100c; border-radius: 999px; padding: 1px 9px;
  font-size: 11px; font-weight: 800;
}
.meet-chip-mini {
  background: rgba(216,164,65,.16); color: var(--gold-soft); border: 1px solid rgba(216,164,65,.45);
  border-radius: 999px; padding: 1px 9px; font-size: 11px; font-weight: 800;
}
.sched-star {
  position: absolute; top: 1px; right: calc(50% - 21px);
  background: var(--red); color: #fff; font-size: 9px; font-weight: 800;
  width: 17px; height: 17px; line-height: 17px; border-radius: 999px;
  text-align: center;
}
.band-badge {
  background: rgba(216,164,65,.16); color: var(--gold-soft); border: 1px solid rgba(216,164,65,.45);
  border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700;
}

/* Channel photos and Meet Day Memories */
.composer-tools { display: inline-flex; gap: 8px; align-items: center; }
.photo-staged { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.msg-photo { width: 100%; border-radius: 12px; margin-top: 8px; display: block; }
.mem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mem-item { margin: 0; }
.mem-item img { width: 100%; border-radius: 12px; display: block; }
.mem-item figcaption { font-size: 13px; margin-top: 5px; }
.mem-cap { display: block; color: var(--muted); margin-top: 2px; }

/* Roster grid: two cards across on phones, three on wider screens */
#roster-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { #roster-grid { grid-template-columns: repeat(3, 1fr); } }
#roster-grid > p { grid-column: 1 / -1; }
#roster-grid .athlete-card { padding: 12px 8px; }
#roster-grid .avatar { width: 56px; height: 56px; margin-bottom: 8px; }
#roster-grid .card-name { font-size: 14.5px; line-height: 1.25; }

/* Live banner: Race Day strip, public bar, Meet Eve card */
.live-strip {
  background: var(--red); color: #fff; border-radius: 14px;
  padding: 10px 12px; margin-bottom: 12px;
}
.live-strip.gold { background: var(--gold); color: #14100c; }
a.live-strip { display: block; text-decoration: none; }
.live-strip.gold .live-dot { background: var(--red); }
.live-cta {
  margin-left: auto; background: #14100c; color: #fff; border-radius: 999px;
  padding: 5px 12px; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.live-row { display: flex; align-items: center; gap: 8px; }
.live-row .btn { margin-left: 2px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; flex: none; }
.live-meet-name { font-weight: 800; margin-top: 6px; }
.btn-sm { padding: 5px 12px; font-size: 13px; min-height: 32px; }
.meet-eve {
  background: var(--panel); border: 1px solid var(--gold); border-radius: 14px;
  padding: 12px; margin-top: 12px; text-align: left;
}
.meet-eve-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meet-eve-head span { color: var(--muted); font-size: 13.5px; }
.meet-eve-head .btn { margin-left: auto; }
.bring-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.bring-chip {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px; font-size: 12.5px; font-weight: 700;
}
.eve-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 4px 0; }
.eve-line span { color: var(--muted); }
.eve-line b { text-align: right; }
.eve-gear { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 4px; }
.race-preview { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.race-preview .seg-toggle { margin: 0; }

/* The strip's live dot pulses, like a broadcast light */
.live-dot { animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* Control Center needs-attention tiles */
.cc-items { display: grid; gap: 8px; margin-top: 12px; }
.cc-item {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.35);
  border-radius: 12px; padding: 10px 12px; color: #fff; font: inherit; cursor: pointer;
}
.cc-item b { font-size: 20px; color: var(--gold); flex: none; }
.cc-item b.cc-dot { font-size: 12px; }
.cc-item span { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.3; }
.cc-item .cc-go { flex: none; font-size: 18px; }
.cc-clear { color: #f3dede; font-size: 14px; margin: 12px 0 0; }

/* Things to Remember: a heading over the Meet Eve card's items, not a row */
.eve-remember-head {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 0; margin: 10px 0 2px; font: inherit; font-size: 15.5px;
  font-weight: 800; color: var(--gold); letter-spacing: .01em;
}
button.eve-remember-head { cursor: pointer; }

/* Relays section */
.squad {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-top: 8px; background: var(--panel-2);
}
.squad-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.squad-name { font-weight: 800; font-size: 15px; }
.squad-mark { font-weight: 800; color: var(--gold); white-space: nowrap; }
.squad-event { color: var(--muted); font-size: 13px; margin-top: 1px; }
.squad-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.squad-member {
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px; font-size: 12.5px; font-weight: 600; color: var(--text); font: inherit;
}
button.squad-member { cursor: pointer; }

/* Results section */
.result-event { font-weight: 800; font-size: 14.5px; margin: 12px 0 2px; }
.result-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.result-row:last-child { border-bottom: 0; }
.result-name {
  background: none; border: 0; padding: 0; font: inherit; font-weight: 600;
  color: var(--text); cursor: pointer; text-align: left;
}
.result-note { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.result-mark { margin-left: auto; font-weight: 800; white-space: nowrap; }

/* Ride Share, ported from the demo */
.ride-rules {
  background: var(--panel); border: 1px solid var(--gold); border-radius: 14px;
  padding: 14px 16px; margin: 14px 0 18px;
}
.ride-rules > b { font-size: 17px; text-transform: uppercase; letter-spacing: .03em; }
.ride-rules > b em { font-style: normal; color: var(--gold); }
.ride-rules p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.ride-form .seg-toggle { margin-top: 2px; }
.ride-meet { margin-top: 26px; }
.ride-meet-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ride-meet-head h3 { margin: 0; font-size: 22px; text-transform: uppercase; }
.ride-meet-head span { color: var(--muted); font-size: 13.5px; font-weight: 700; }
.ride-meet-loc { color: var(--muted); font-size: 14px; margin: 2px 0 10px; }
.ride-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 700px) { .ride-cols { grid-template-columns: 1fr; } }
.ride-col-head { font-size: 17px; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 8px; font-weight: 800; }
.ride-col-count {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 10px; font-size: 12px; font-weight: 800; text-transform: none; letter-spacing: 0;
}
.ride-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px;
}
.ride-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ride-card h4 { margin: 0; font-size: 15.5px; line-height: 1.3; }
.ride-detail { font-weight: 800; color: var(--gold); font-size: 14px; margin: 3px 0 0; }
.ride-note { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.ride-status {
  flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; border-radius: 999px; padding: 4px 10px;
}
.ride-status.open { background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.ride-status.connected { background: var(--gold); color: #14100c; }
.ride-status.waiting { border: 2px solid var(--red); color: #ff8f8f; }
.ride-status.confirmed { background: var(--red); color: #fff; }
.ride-pair { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 14px; }
.ride-pair p { margin: 0 0 8px; }
.ride-confirm-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ride-done { font-size: 13px; font-weight: 800; color: var(--muted); }
.ride-connect { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.ride-connect label {
  display: block; font-size: 12px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.ride-connect-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ride-connect-row select { flex: 1 1 160px; }
.ride-empty {
  border: 1px dashed var(--gold); background: var(--panel-2); border-radius: 14px;
  padding: 14px 16px; color: var(--muted); font-size: 14px; margin: 0 0 10px;
}

/* Follow an athlete (bell) and result alerts */
.athlete-card { position: relative; }
.follow-ico { width: 16px; height: 16px; flex: none; }
.follow-btn {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 10px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13.5px;
  font-weight: 700; cursor: pointer;
}
.follow-btn.is-following { background: var(--gold); color: #14100c; border-color: var(--gold); }
.follow-bell {
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(10, 10, 12, .72); border: 1px solid var(--line);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3;
}
.follow-bell .follow-ico { width: 17px; height: 17px; }
.follow-bell.is-following { background: var(--gold); color: #14100c; border-color: var(--gold); }
.pimg .follow-bell { top: auto; bottom: 8px; }
#follow-bar { margin-top: 12px; }
.follow-hint {
  color: var(--muted); font-size: 13.5px; line-height: 1.45;
  border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin: 0;
}
.follow-bar-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 14px; }
.follow-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.follow-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 10px;
  font-size: 13px; font-weight: 600;
}
.follow-chip .follow-ico { width: 13px; height: 13px; color: var(--gold); }
.follow-chip button {
  background: none; border: 0; color: var(--muted); font-size: 16px;
  line-height: 1; cursor: pointer; padding: 0 4px; font: inherit;
}
#alerts-stack { display: flex; flex-direction: column; gap: 8px; }
#alerts-stack:not(:empty) { margin-bottom: 10px; }
.alert-banner {
  display: flex; align-items: center; gap: 10px; background: #fff; color: #14100c;
  border-radius: 14px; padding: 10px 12px; box-shadow: 0 8px 22px rgba(0, 0, 0, .35); cursor: pointer;
}
.alert-bell {
  flex: none; width: 34px; height: 34px; border-radius: 50%; background: #14100c;
  color: var(--gold); display: flex; align-items: center; justify-content: center;
}
.alert-bell .follow-ico { width: 17px; height: 17px; }
.alert-text { font-size: 14px; font-weight: 600; line-height: 1.35; }
.alert-x {
  margin-left: auto; flex: none; background: none; border: 0; font-size: 20px;
  line-height: 1; color: #555; cursor: pointer; padding: 2px 6px; font: inherit;
}
.follow-test { margin-top: 10px; }
