/* ═══════════════════════════════════════════════════════
   CUBS — Directory + Profiles + Edit
   Revamp v3: CRM row layout, storytelling hero
═══════════════════════════════════════════════════════ */

/* ── DIRECTORY HERO ───────────────────────────────────── */
.cubs-hero {
  position: relative;
  background: var(--c-midnight);
  padding: 56px 0 44px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cubs-hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 80% at 10% 60%, rgba(192,57,43,0.09) 0%, transparent 55%),
    radial-gradient(ellipse 45% 60% at 85% 30%, rgba(212,175,55,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 30% 50% at 50% 100%, rgba(212,175,55,0.04) 0%, transparent 60%);
}
.cubs-hero__inner {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cubs-hero__left { flex: 1; min-width: 0; max-width: 560px; }

.cubs-hero__kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--c-gold);
  margin-bottom: 14px; opacity: 0.85;
}
.cubs-hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 900; color: var(--c-text-100);
  letter-spacing: -0.02em; line-height: 1;
  margin: 0 0 14px;
}
.cubs-hero__sub {
  font-size: 15px; line-height: 1.75;
  color: var(--c-text-55); margin-bottom: 28px;
}
.cubs-hero__actions {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.cubs-hero__cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 22px; border-radius: 8px;
  background: var(--c-gold); color: #03040a;
  font-weight: 800; font-size: 13px; text-decoration: none;
  transition: opacity 0.2s; white-space: nowrap;
}
.cubs-hero__cta:hover { opacity: 0.88; }
.cubs-hero__cta--secondary {
  background: rgba(255,255,255,0.07); color: var(--c-text-75);
  border: 1px solid rgba(255,255,255,0.13);
}
.cubs-hero__cta--secondary:hover { background: rgba(255,255,255,0.12); opacity: 1; }
.cubs-hero__cta--ghost {
  background: transparent; color: var(--c-text-35);
  border: 1px solid rgba(255,255,255,0.09);
}
.cubs-hero__cta--ghost:hover { color: var(--c-text-75); background: rgba(255,255,255,0.05); opacity: 1; }
.cubs-hero__badge {
  background: var(--c-gold); color: #03040a;
  border-radius: 10px; padding: 1px 7px; font-size: 11px;
}

/* Stats strip (right of hero) */
.cubs-hero__stats-strip {
  display: flex; align-items: center; gap: 24px;
  flex-shrink: 0;
  padding: 22px 32px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
}
.cubs-hero__stat { text-align: center; }
.cubs-hero__stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 28px; font-weight: 900;
  color: var(--c-gold); line-height: 1;
}
.cubs-hero__stat-lbl {
  display: block;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--c-text-35); margin-top: 5px;
}
.cubs-hero__stat-div {
  width: 1px; height: 36px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}


/* ── DIRECTORY TOOLBAR ────────────────────────────────── */
.cubs-grid-wrap { padding: 32px 0 72px; }

.cubs-toolbar-card {
  margin-bottom: 18px;
  padding: 16px 20px;
  background: var(--c-navy-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
}
.cubs-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px auto;
  gap: 12px;
  align-items: end;
}
.cubs-toolbar__label {
  display: block;
  margin-bottom: 7px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--c-text-35);
}
.cubs-toolbar__search-wrap,
.cubs-toolbar__per-page-wrap { min-width: 0; }

.cubs-toolbar__search-input-wrap {
  position: relative;
}
.cubs-toolbar__search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--c-text-35); pointer-events: none;
}
.cubs-toolbar__clear-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--c-text-35); font-size: 12px; padding: 4px;
  transition: color 0.15s;
}
.cubs-toolbar__clear-btn:hover { color: var(--c-text-75); }

.cubs-toolbar__search,
.cubs-toolbar__select {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--c-text-100); font-size: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.cubs-toolbar__search { padding-left: 36px; }
.cubs-toolbar__search:focus,
.cubs-toolbar__select:focus {
  border-color: rgba(212,175,55,0.45);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.08);
}
.cubs-toolbar__search::placeholder { color: var(--c-text-35); }

.cubs-toolbar__select-shell { position: relative; }
.cubs-toolbar__select {
  appearance: none; -webkit-appearance: none;
  cursor: pointer; padding-right: 36px;
  font-weight: 700;
}
.cubs-toolbar__select-icon {
  position: absolute; top: 50%; right: 12px;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--c-gold); pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.cubs-toolbar__select-icon svg { width: 10px; height: 6px; }

.cubs-toolbar__actions {
  display: flex; align-items: center; gap: 8px;
}
.cubs-toolbar__btn,
.cubs-toolbar__reset {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; border-radius: 9px;
  text-decoration: none; font-size: 13px; font-weight: 800;
  white-space: nowrap;
}
.cubs-toolbar__btn {
  border: none; cursor: pointer;
  background: var(--c-gold); color: #03040a;
  transition: opacity 0.2s;
}
.cubs-toolbar__btn:hover { opacity: 0.88; }
.cubs-toolbar__reset {
  background: rgba(255,255,255,0.05);
  color: var(--c-text-55);
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.15s;
}
.cubs-toolbar__reset:hover { background: rgba(255,255,255,0.09); }

.cubs-toolbar-meta {
  margin-top: 10px;
  display: flex; justify-content: space-between;
  align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12px; color: var(--c-text-35);
}
.cubs-toolbar-meta__count strong { color: var(--c-text-55); }
.cubs-toolbar-meta__race {
  display: flex; align-items: center; gap: 6px;
  color: var(--c-gold); font-weight: 600;
}
.cubs-toolbar-meta__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-gold); flex-shrink: 0;
  animation: cubsDotPulse 2s ease-in-out infinite;
}
@keyframes cubsDotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}


/* ── CUBS LIST (CRM row layout) ───────────────────────── */
.cubs-empty {
  text-align: center; padding: 72px 0;
}
.cubs-empty__icon { font-size: 36px; margin-bottom: 12px; }
.cubs-empty__title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 900; color: var(--c-text-100);
  margin-bottom: 8px;
}
.cubs-empty__sub { font-size: 14px; color: var(--c-text-35); }
.cubs-empty__sub a { color: var(--c-gold); }

/* List wrapper */
.cubs-list {
  display: flex; flex-direction: column;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; overflow: hidden;
  background: var(--c-navy-card);
}

/* Column header */
.cubs-list::before {
  content: '';
  display: block;
}

/* Each row */
.cub-row {
  display: grid;
  grid-template-columns: 52px 1fr 200px 100px 140px;
  align-items: center;
  gap: 0;
  padding: 0 16px 0 12px;
  min-height: 68px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
}
.cub-row:last-child { border-bottom: none; }
.cub-row:hover { background: rgba(255,255,255,0.03); }

/* Avatar */
.cub-row__avatar-link {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cub-row__avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; display: block;
  border: 2px solid rgba(255,255,255,0.08);
  transition: border-color 0.2s;
}
.cub-row:hover .cub-row__avatar { border-color: rgba(212,175,55,0.3); }
.cub-row__avatar--initials {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 14px; font-weight: 900; color: white;
  background: var(--cub-colour, #1a3a6b);
}

/* Identity */
.cub-row__identity {
  padding: 12px 14px 12px 14px;
  min-width: 0;
}
.cub-row__name {
  display: block;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 900;
  color: var(--c-text-100); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.15s;
}
.cub-row__name:hover { color: var(--c-gold); }
.cub-row__tagline {
  display: block;
  font-size: 11px; color: var(--c-text-35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}

/* Pick column */
.cub-row__pick-col {
  padding: 0 12px;
}
.cub-row__pick {
  display: flex; align-items: center; gap: 8px;
}
.cub-row__silk {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; color: white;
  flex-shrink: 0; text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.cub-row__pick-info { min-width: 0; }
.cub-row__horse {
  display: block;
  font-size: 12px; font-weight: 700; color: var(--c-text-100);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cub-row__odds {
  display: block;
  font-size: 11px; font-weight: 700; color: var(--c-gold);
}
.cub-row__no-pick {
  font-size: 11px; color: var(--c-text-35); font-style: italic;
}

/* Record column */
.cub-row__record-col {
  padding: 0 12px;
}
.cub-row__record {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700;
}
.cub-row__w { color: var(--c-gold); }
.cub-row__l { color: rgba(224,92,76,0.8); }
.cub-row__d { color: var(--c-text-35); }
.cub-row__sep { color: rgba(255,255,255,0.15); font-size: 10px; }
.cub-row__record-none { font-size: 11px; color: var(--c-text-35); }

/* Action column */
.cub-row__action-col {
  padding: 0 0 0 8px;
  display: flex; justify-content: flex-end;
}
.cub-row__challenge-form { display: contents; }
.cub-row__btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 16px;
  border-radius: 8px; border: none; cursor: pointer;
  font-size: 12px; font-weight: 800; text-decoration: none;
  white-space: nowrap; transition: all 0.2s;
  font-family: var(--font-body);
}
.cub-row__btn--challenge {
  background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(192,57,43,0.12));
  color: var(--c-gold);
  border: 1px solid rgba(212,175,55,0.3);
}
.cub-row__btn--challenge:hover {
  background: linear-gradient(135deg, rgba(212,175,55,0.3), rgba(192,57,43,0.18));
  border-color: rgba(212,175,55,0.5);
}
.cub-row__btn--existing {
  background: rgba(45,189,122,0.1);
  color: #2DBD7A;
  border: 1px solid rgba(45,189,122,0.25);
}
.cub-row__btn--existing:hover { background: rgba(45,189,122,0.18); }
.cub-row__btn--self {
  background: rgba(255,255,255,0.06);
  color: var(--c-text-55);
  border: 1px solid rgba(255,255,255,0.1);
}
.cub-row__btn--self:hover { background: rgba(255,255,255,0.1); color: var(--c-text-100); }
.cub-row__btn--ghost {
  background: transparent;
  color: var(--c-text-35);
  border: 1px solid rgba(255,255,255,0.08);
}
.cub-row__btn--ghost:hover { background: rgba(255,255,255,0.05); color: var(--c-text-75); }
.cub-row__btn--waiting {
  background: transparent;
  color: var(--c-text-35);
  border: 1px dashed rgba(255,255,255,0.1);
  cursor: default; font-style: italic;
}


/* ── DIRECTORY PAGINATION ─────────────────────────────── */
.cubs-pagination { margin-top: 24px; }
.cubs-pagination__inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.cubs-pagination__pages {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.cubs-pagination__link,
.cubs-pagination__page {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 40px; padding: 0 12px;
  border-radius: 9px; text-decoration: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--c-text-75); font-size: 13px; font-weight: 700;
  transition: all 0.15s;
}
.cubs-pagination__link:hover { background: rgba(255,255,255,0.08); color: var(--c-text-100); }
.cubs-pagination__page--current {
  background: rgba(212,175,55,0.12);
  border-color: rgba(212,175,55,0.28);
  color: var(--c-gold);
}
.cubs-pagination__link--disabled { opacity: 0.35; pointer-events: none; }
.cubs-pagination__ellipsis { color: var(--c-text-35); padding: 0 4px; }


/* ══════════════════════════════════════════════════════════
   PUBLIC PROFILE HERO
══════════════════════════════════════════════════════════ */
.cub-profile-hero {
  position: relative; background: #05060d;
  padding: 48px 0 40px; overflow: hidden;
}
.cub-profile-hero__bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(192,57,43,0.07) 0%, transparent 65%);
}
.cub-profile-hero__inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}
.cub-profile__avatar-wrap { position: relative; flex-shrink: 0; }
.cub-profile__avatar {
  width: 120px; height: 120px; border-radius: 50%;
  object-fit: cover; display: block; position: relative; z-index: 1;
}
.cub-profile__avatar--initials {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 40px; font-weight: 900; color: white;
}
.cub-profile__ring {
  position: absolute; inset: -6px;
  border-radius: 50%; border: 3px solid; opacity: 0.5;
}
.cub-profile__identity { flex: 1; min-width: 0; }
.cub-profile__kicker {
  font-size: 10px; font-weight: 800; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--c-text-35); margin-bottom: 6px;
}
.cub-profile__name {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900; color: var(--c-text-100);
  letter-spacing: -0.02em; margin: 0 0 8px;
}
.cub-profile__tagline {
  font-size: 15px; font-style: italic; color: var(--c-text-55); margin-bottom: 16px;
}
.cub-profile__stats {
  display: flex; gap: 24px; margin-bottom: 20px; flex-wrap: wrap;
}
.cub-profile__stat { text-align: center; }
.cub-profile__stat-num {
  display: block; font-family: var(--font-display);
  font-size: 26px; font-weight: 900; color: var(--c-gold); line-height: 1;
}
.cub-profile__stat-lbl {
  display: block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--c-text-35); margin-top: 3px;
}
.cub-profile__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 8px;
  font-weight: 700; font-size: 13px; text-decoration: none;
  border: none; cursor: pointer; transition: all 0.2s; font-family: var(--font-body);
}
.cub-profile__btn--edit { background: rgba(255,255,255,0.08); color: var(--c-text-100); }
.cub-profile__btn--edit:hover { background: rgba(255,255,255,0.14); }
.cub-profile__btn--challenge { background: rgba(192,57,43,0.12); color: #e05c4c; border: 1px solid rgba(192,57,43,0.3); }
.cub-profile__btn--coming-soon { opacity: 0.6; cursor: default; }
.cub-badge-soon { font-size: 9px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(192,57,43,0.3); padding: 2px 6px; border-radius: 4px; margin-left: 4px; }
.cub-profile__btn--join { background: var(--c-gold); color: #03040a; }
.cub-profile__challenge-hint { font-size: 13px; color: var(--c-text-35); }
.cub-profile__challenge-hint a { color: var(--c-gold); }
/* Profile challenge form */
.cub-challenge-form { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 340px; }
.cub-challenge-msg {
  width: 100%; padding: 9px 13px; border-radius: 7px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: var(--c-text-100); font-family: var(--font-body); font-size: 13px;
  outline: none; box-sizing: border-box;
}
.cub-challenge-msg:focus { border-color: rgba(212,175,55,0.3); }
.cub-profile__btn--challenge { background: linear-gradient(135deg, rgba(192,57,43,0.18), rgba(212,175,55,0.12)); color: var(--c-gold); border: 1px solid rgba(212,175,55,0.3); width: 100%; }
.cub-profile__btn--challenge:hover { background: rgba(212,175,55,0.2); }
.cub-profile__btn--view-challenge { background: rgba(212,175,55,0.1); color: var(--c-gold); border: 1px solid rgba(212,175,55,0.25); }
.cub-profile__btn--challenges { background: rgba(192,57,43,0.1); color: #e07060; border: 1px solid rgba(192,57,43,0.25); }
.cub-profile__own-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cub-pending-badge { background: var(--c-gold); color: #03040a; border-radius: 10px; padding: 1px 7px; font-size: 11px; }

/* ── PROFILE BODY ── */
.cub-profile-body { padding: 36px 0 60px; }
.cub-profile-grid { display: grid; grid-template-columns: 1fr 300px; gap: 32px; }
.cub-section { margin-bottom: 32px; }
.cub-section__title { font-family: var(--font-display); font-size: 20px; font-weight: 900; color: var(--c-text-100); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.cub-section__text { font-size: 15px; line-height: 1.8; color: var(--c-text-75); }
.cub-section__empty { font-size: 14px; color: var(--c-text-35); font-style: italic; }
.cub-section--aside { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; padding: 20px; }
.cub-pick-card { display: flex; align-items: center; gap: 16px; padding: 16px; background: rgba(212,175,55,0.05); border: 1px solid rgba(212,175,55,0.2); border-radius: 10px; }
.cub-pick-card__silk { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cub-pick-card__num { font-size: 18px; font-weight: 900; color: white; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.cub-pick-card__info { flex: 1; }
.cub-pick-card__name { font-family: var(--font-display); font-size: 22px; font-weight: 900; color: var(--c-text-100); }
.cub-pick-card__meta { font-size: 12px; color: var(--c-text-35); margin: 3px 0 8px; }
.cub-pick-card__reason { font-size: 14px; font-style: italic; color: var(--c-text-55); padding-left: 12px; border-left: 3px solid rgba(212,175,55,0.3); }
.cub-record-bar { height: 6px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.cub-record-bar__fill--win { height: 100%; background: var(--c-gold); border-radius: 3px; }
.cub-record-str { font-size: 13px; color: var(--c-text-55); }

/* ── EDIT FORM ── */
.cub-edit-wrap { max-width: 900px; margin: 0 auto; padding: 40px var(--space-7) 80px; }
.cub-edit-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 10px; }
.cub-edit-header__title { font-family: var(--font-display); font-size: 32px; font-weight: 900; color: var(--c-text-100); }
.cub-edit-header__view { font-size: 13px; color: var(--c-gold); text-decoration: none; }
.cub-edit-header__view:hover { text-decoration: underline; }
.cub-alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.cub-alert--success { background: rgba(45,189,122,0.12); color: #2DBD7A; border: 1px solid rgba(45,189,122,0.3); }
.cub-alert--error   { background: rgba(224,92,76,0.12); color: #E05C4C; border: 1px solid rgba(224,92,76,0.3); }
.cub-edit-grid { display: grid; grid-template-columns: 280px 1fr; gap: 40px; }
.cub-edit-avatar-section { margin-bottom: 28px; }
.cub-edit-avatar-preview { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; margin: 0 auto 16px; border: 3px solid rgba(212,175,55,0.2); }
.cub-edit-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.cub-edit-avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 36px; font-weight: 900; color: white; }
.cub-edit-avatar-controls { text-align: center; }
.cub-upload-btn { display: inline-block; padding: 8px 18px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--c-text-75); transition: all 0.2s; margin-bottom: 8px; }
.cub-upload-btn:hover { background: rgba(255,255,255,0.12); }
.cub-upload-hint { display: block; font-size: 11px; color: var(--c-text-35); margin-bottom: 10px; }
.cub-remove-avatar { display: block; font-size: 12px; color: var(--c-text-35); cursor: pointer; }
.cub-remove-avatar input { margin-right: 5px; }
.cub-colour-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.cub-colour-option { cursor: pointer; }
.cub-colour-option input { display: none; }
.cub-colour-swatch { display: block; width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; transition: border-color 0.15s; }
.cub-colour-option input:checked + .cub-colour-swatch { border-color: white; box-shadow: 0 0 0 1px rgba(255,255,255,0.3); }
.cub-colour-option:hover .cub-colour-swatch { border-color: rgba(255,255,255,0.5); }
.cub-form-group { margin-bottom: 22px; }
.cub-form-label { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c-text-55); margin-bottom: 8px; }
.cub-form-counter { font-weight: 600; letter-spacing: 0; color: var(--c-text-35); }
.cub-form-input { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 11px 14px; font-family: var(--font-body); font-size: 14px; color: var(--c-text-100); outline: none; transition: border-color 0.2s; box-sizing: border-box; }
.cub-form-input:focus { border-color: rgba(212,175,55,0.4); }
.cub-form-textarea { resize: vertical; min-height: 100px; }
.cub-form-hint { font-size: 11px; color: var(--c-text-35); margin-top: 5px; }
.cub-current-pick { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: rgba(212,175,55,0.07); border: 1px solid rgba(212,175,55,0.25); border-radius: 10px; margin-bottom: 10px; }
.cub-current-pick__silk { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 900; color: white; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.cub-current-pick__info { flex: 1; min-width: 0; }
.cub-current-pick__name { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 900; color: var(--c-text-100); }
.cub-current-pick__odds { display: inline-block; font-size: 13px; font-weight: 700; color: var(--c-gold); margin-right: 10px; }
.cub-current-pick__note { font-size: 11px; color: var(--c-text-35); font-style: italic; }
.cub-pick-details { margin-bottom: 4px; }
.cub-pick-details__toggle { font-size: 12px; color: var(--c-text-35); cursor: pointer; padding: 6px 0; list-style: none; outline: none; display: inline-flex; align-items: center; gap: 6px; }
.cub-pick-details__toggle::-webkit-details-marker { display: none; }
.cub-pick-details__toggle::before { content: '▸'; font-size: 10px; }
.cub-pick-details[open] .cub-pick-details__toggle::before { content: '▾'; }
.cub-pick-details__toggle:hover { color: var(--c-text-75); }
.cub-runner-select { border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; overflow: hidden; display: none; }
.cub-runner-select--open { display: block; }
.cub-pick-details[open] .cub-runner-select { display: block; }
.cub-runner-option { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05); transition: background 0.15s; }
.cub-runner-option:last-child { border-bottom: none; }
.cub-runner-option:hover { background: rgba(255,255,255,0.04); }
.cub-runner-option input { display: none; }
.cub-runner-option--selected, .cub-runner-option:has(input:checked) { background: rgba(212,175,55,0.08); }
.cub-runner-silk { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; color: white; flex-shrink: 0; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.cub-runner-name { font-size: 13px; font-weight: 700; color: var(--c-text-100); }
.cub-runner-odds { font-size: 11px; color: var(--c-gold); margin-left: auto; }
.cub-edit-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.cub-save-btn { padding: 13px 32px; background: var(--c-gold); color: #03040a; border: none; border-radius: 8px; cursor: pointer; font-weight: 800; font-size: 14px; font-family: var(--font-body); transition: opacity 0.2s; }
.cub-save-btn:hover { opacity: 0.88; }
.cub-cancel-btn { font-size: 13px; color: var(--c-text-35); text-decoration: none; }
.cub-cancel-btn:hover { color: var(--c-text-75); }


/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */

/* Tablet — collapse record col, shrink pick */
@media (max-width: 900px) {
  .cub-row {
    grid-template-columns: 44px 1fr 160px 110px;
  }
  .cub-row__record-col { display: none; }
  .cubs-hero__stats-strip { display: none; }
}

/* Mobile — stack into 2-col (avatar + content block) */
@media (max-width: 640px) {
  .cubs-hero { padding: 40px 0 32px; }
  .cubs-hero__actions { flex-direction: column; align-items: stretch; }
  .cubs-hero__cta { justify-content: center; }

  .cubs-toolbar { grid-template-columns: 1fr; gap: 10px; }
  .cubs-toolbar__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cubs-toolbar__btn, .cubs-toolbar__reset { width: 100%; justify-content: center; }

  .cubs-list { border-radius: 10px; }

  .cub-row {
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
    padding: 12px;
    gap: 0;
    min-height: auto;
  }

  /* Avatar spans both rows on mobile */
  .cub-row__avatar-link {
    grid-row: 1 / 3;
    align-items: flex-start;
    padding-top: 2px;
    padding-right: 10px;
  }

  /* Identity takes row 1 */
  .cub-row__identity { grid-column: 2; grid-row: 1; padding: 0 0 4px 0; }

  /* Pick, record, action collapse into row 2 as a flex strip */
  .cub-row__pick-col,
  .cub-row__record-col,
  .cub-row__action-col {
    display: none;
  }

  /* Mobile action shown inline under identity */
  .cub-row__identity::after { display: none; }

  /* Rebuild row 2 as a data + action strip */
  .cub-row__mobile-strip {
    grid-column: 2; grid-row: 2;
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; min-width: 0;
  }

  .cubs-pagination__inner { justify-content: center; flex-direction: column; text-align: center; }
  .cub-profile-grid { grid-template-columns: 1fr; }
  .cub-edit-grid    { grid-template-columns: 1fr; }
  .cub-profile-hero__inner { flex-direction: column; text-align: center; }
  .cub-profile__stats { justify-content: center; }
}

/* ── COLUMN HEADERS ───────────────────────────────────── */
.cubs-list-header {
  display: grid;
  grid-template-columns: 52px 1fr 200px 100px 140px;
  padding: 0 16px 0 12px;
  margin-bottom: 4px;
}
.cubs-list-header span {
  font-size: 10px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--c-text-35);
  padding: 0 14px 8px 14px;
}
.cubs-list-header span:first-child,
.cubs-list-header span:last-child { padding: 0; }

/* ── MOBILE STRIP ─────────────────────────────────────── */
.cub-row__mobile-strip {
  display: none; /* shown via media query override below */
}
.cub-row__pick--mobile {
  display: flex; align-items: center; gap: 5px;
  flex: 1; min-width: 0;
}
.cub-row__pick--mobile .cub-row__silk {
  width: 20px; height: 20px; font-size: 9px;
}
.cub-row__pick--mobile .cub-row__horse {
  font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cub-row__pick--mobile .cub-row__odds { font-size: 10px; }
.cub-row__action-mobile { flex-shrink: 0; }
.cub-row__btn--xs {
  height: 28px; padding: 0 10px; font-size: 11px; border-radius: 6px;
}

@media (max-width: 900px) {
  .cubs-list-header {
    grid-template-columns: 44px 1fr 160px 110px;
  }
  .cubs-list-header span:nth-child(4) { display: none; }
}

@media (max-width: 640px) {
  .cubs-list-header { display: none; }
  .cub-row__pick-col,
  .cub-row__record-col,
  .cub-row__action-col { display: none; }
  .cub-row__mobile-strip { display: flex; }
}

/* ── CHALLENGE HISTORY (public profile aside) ─────────── */
.cub-history-list { display: flex; flex-direction: column; gap: 1px; }
.cub-history-row {
  display: grid;
  grid-template-columns: 1fr auto 28px;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  text-decoration: none;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  transition: background 0.12s;
  color: inherit;
}
.cub-history-row:hover { background: rgba(255,255,255,0.05); }
.cub-history-row__opponent { font-size: 13px; color: var(--c-text-75); }
.cub-history-row__opponent strong { color: var(--c-text-100); }
.cub-history-row__pick {
  font-size: 11px; color: var(--c-text-35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 90px;
}
.cub-history-row__result {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; flex-shrink: 0;
}
.cub-history-row__result--win  { background: rgba(212,175,55,0.15); color: var(--c-gold); }
.cub-history-row__result--loss { background: rgba(255,255,255,0.05); color: var(--c-text-35); }
.cub-history-row__result--draw { background: rgba(150,150,255,0.12); color: #9090ff; }


/* ── Pick result badges ────────────────────────────────────────────
   Shown after a race settles. Applied wherever a Cub's pick appears:
   directory grid, public profile pick card, my_profile pick card,
   leaderboard pick column.
   ─────────────────────────────────────────────────────────────── */

.pick-result-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--r-pill, 100px);
  white-space: nowrap;
  flex-shrink: 0;
}

/* 🏆 Winner — gold glow */
.pick-result-badge--winner {
  background: rgba(212,175,55,0.18);
  color: var(--c-gold);
  border: 1px solid rgba(212,175,55,0.45);
  box-shadow: 0 0 10px rgba(212,175,55,0.2);
}

/* 2nd / 3rd — silver tint */
.pick-result-badge--placed {
  background: rgba(200,200,220,0.1);
  color: rgba(220,220,240,0.85);
  border: 1px solid rgba(200,200,220,0.2);
}

/* 4th–16th — ran but unplaced */
.pick-result-badge--unplaced {
  background: rgba(255,255,255,0.05);
  color: var(--c-text-35);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Fell / Unseated / Pulled up */
.pick-result-badge--dnf {
  background: rgba(192,57,43,0.1);
  color: var(--c-red-lt, #E05C4C);
  border: 1px solid rgba(192,57,43,0.2);
}

/* Non-runner / Void */
.pick-result-badge--nr {
  background: rgba(255,255,255,0.04);
  color: var(--c-text-35);
  border: 1px solid rgba(255,255,255,0.06);
  text-decoration: line-through;
  opacity: 0.6;
}

/* ── Settled race pick card states ────────────────────────────── */

/* Pick card gets a subtle green border when race is settled and won */
.cub-pick-card--settled {
  border-color: rgba(45,189,122,0.2);
}

.cub-current-pick--settled {
  background: rgba(45,189,122,0.04);
  border-color: rgba(45,189,122,0.2);
}

/* Section title "Race settled" badge */
.cub-section__settled-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--r-pill, 100px);
  background: rgba(45,189,122,0.1);
  color: var(--c-emerald-lt, #2DBD7A);
  border: 1px solid rgba(45,189,122,0.25);
  margin-left: 10px;
  vertical-align: middle;
}
