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

:root {
  --green:      #00443C;
  --green-dark: #002e28;
  --green-mid:  #005c52;
  --green-lt:   #006e62;
  --orange:     #FF4D00;
  --orange-lt:  #ff6a26;
  --pink:       #FFD4E6;
  --pink-dk:    #ffb8d5;
  --yellow:     #f5f36a;
  --black:      #000000;
  --white:      #ffffff;
  --off-white:  #faf9f7;
  --gray-lt:    #f2f2f0;
  --gray-mid:   #e0deda;
  --gray:       #b0aca6;
  --text:       #0a0a0a;
  --text-mid:   #444;
  --text-lt:    #888;

  --font-head:  'Montserrat', sans-serif;
  --font-body:  'Manrope', sans-serif;

  --radius:     14px;
  --radius-sm:  8px;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.07);
  --shadow-md:  0 8px 28px rgba(0,0,0,0.11);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.16);
}

html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--green);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#root { min-height: 100vh; }

/* ── Confetti ── */
#confetti-canvas {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* ── Auth Screen ── */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-dark);
  position: relative;
  overflow: hidden;
}
.auth-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 15% 85%, rgba(255,77,0,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(245,243,106,0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0,68,60,0.6) 0%, transparent 80%);
}
.auth-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 24px,
    rgba(255,255,255,0.015) 24px,
    rgba(255,255,255,0.015) 25px
  );
}
.auth-card {
  position: relative;
  background: var(--white);
  border-radius: 24px;
  padding: 52px 44px 44px;
  width: min(460px, calc(100vw - 32px));
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: fadeUp 0.55s cubic-bezier(0.22,1,0.36,1) both;
}
.auth-wordmark {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}
.auth-title {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 6px;
}
.auth-title span { color: var(--orange); }
.auth-rule {
  width: 40px; height: 3px;
  background: var(--orange);
  border-radius: 2px;
  margin: 20px auto;
}
.auth-intro {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 32px;
  font-weight: 400;
}
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  background: var(--green);
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0,68,60,0.25);
}
.google-btn:hover:not(:disabled) {
  background: var(--green-mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,68,60,0.35);
}
.google-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-footer { margin-top: 20px; font-size: 12px; color: var(--text-lt); }

/* ── App Shell ── */
.app {
  min-height: 100vh;
  background: var(--off-white);
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.header {
  background: var(--green);
  height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-emblem {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.header-brand-name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.01em;
  line-height: 1;
}
.header-brand-sub {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.header-center {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}
.progress-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: all 0.3s;
}
.progress-dot.done { background: var(--yellow); }
.progress-dot.active { background: var(--white); width: 20px; border-radius: 4px; }
.header-right { display: flex; align-items: center; gap: 8px; }
.header-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--orange);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 800;
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.header-user-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  display: none;
}
@media (min-width: 500px) { .header-user-name { display: block; } }
.header-signout {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.header-signout:hover { background: rgba(255,255,255,0.15); color: var(--white); }

/* ── Tab Bar ── */
.tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--white);
  border-top: 1px solid var(--gray-mid);
  display: flex;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.07);
}
.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px;
  transition: all 0.15s;
  position: relative;
}
.tab-btn.locked { cursor: default; opacity: 0.4; }
.tab-btn::after {
  content: '';
  position: absolute;
  top: 0; left: 25%; right: 25%;
  height: 2px;
  background: var(--green);
  border-radius: 0 0 2px 2px;
  opacity: 0;
  transition: opacity 0.15s;
}
.tab-btn.active::after { opacity: 1; }
.tab-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gray);
  transition: color 0.15s;
}
.tab-btn.active .tab-label { color: var(--green); }
.tab-btn.active .tab-icon-el { color: var(--green); }
.tab-icon-el { color: var(--gray); transition: color 0.15s; }
.tab-btn.admin-tab .tab-label { color: var(--orange); opacity: 0.7; }
.tab-btn.admin-tab.active .tab-label { color: var(--orange); opacity: 1; }
.tab-btn.admin-tab.active::after { background: var(--orange); }
.tab-btn.admin-tab .tab-icon-el { color: var(--orange); opacity: 0.7; }
.tab-btn.admin-tab.active .tab-icon-el { opacity: 1; }

/* ── Main content ── */
.main {
  flex: 1;
  padding: 24px 16px 80px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* ── Horse thumb strip ── */
.horse-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.horse-strip::-webkit-scrollbar { display: none; }
.horse-thumb {
  flex-shrink: 0;
  width: 60px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--green);
  overflow: hidden;
  transition: all 0.2s;
  position: relative;
}
.horse-thumb.active {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(255,77,0,0.2);
}
.horse-thumb-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--green-mid);
  display: flex;
  align-items: center;
  justify-content: center;
}
.horse-thumb-label {
  padding: 4px 4px;
  text-align: center;
  font-family: var(--font-head);
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  background: rgba(0,0,0,0.3);
}
.horse-thumb.active .horse-thumb-label { color: var(--yellow); }
.horse-thumb-check {
  position: absolute;
  top: 3px; right: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #22c55e;
  border: 1.5px solid white;
  display: flex; align-items: center; justify-content: center;
}

/* ── Section header ── */
.section-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-lt);
  margin-bottom: 6px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 4px;
}
.section-title em { font-style: italic; color: var(--orange); }

/* ── Horse Card ── */
.horse-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}
.horse-hero {
  height: 230px;
  background: var(--green);
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.horse-hero-bg {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 20px,
    rgba(255,255,255,0.025) 20px,
    rgba(255,255,255,0.025) 21px
  );
}
.horse-hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(0,68,60,0.3) 0%, rgba(0,0,0,0.5) 100%);
}
.horse-photo-placeholder {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 1;
}
.horse-photo-ph-icon {
  width: 64px; height: 64px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1.5px dashed rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
}
.horse-photo-ph-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.06em;
}
.horse-hero-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--orange);
  border-radius: 20px;
  padding: 4px 12px;
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  z-index: 2;
}
.horse-hero-info {
  position: relative;
  z-index: 2;
  padding: 16px;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.1) 100%);
}

/* ── SIRE × DAM headline ── */
.horse-lineage { margin-bottom: 8px; }
.horse-lineage-headline {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.horse-lineage-headline .x-sep {
  color: var(--orange);
  margin: 0 6px;
  font-style: normal;
}
.horse-lineage-sub {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
}
.horse-meta-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.horse-meta-chip {
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 3px 10px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
}

/* ── Fun Fact ── */
.fun-fact {
  margin: 14px 16px 0;
  background: var(--yellow);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.fun-fact-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.fun-fact-text {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--green-dark);
  line-height: 1.5;
}
.fun-fact-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 2px;
}

/* ── Reactions ── */
.reactions-row {
  padding: 12px 16px 0;
  display: flex;
  gap: 8px;
}
.reaction-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--gray-lt);
  border: 1.5px solid var(--gray-mid);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.reaction-pill:hover { background: var(--yellow); border-color: #e8e66a; transform: scale(1.1); }
.reaction-pill.reacted { background: var(--yellow); border-color: #e8e66a; transform: scale(1.05); }
.reaction-pill { position: relative; overflow: visible; }
.reaction-pill.reaction-burst { animation: pill-burst 0.3s ease-out; }
.reaction-emoji-pop { display: inline-block; animation: emoji-pop 0.3s cubic-bezier(0.34,1.56,0.64,1); }
.reaction-float {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  animation: emoji-float 0.6s ease-out forwards;
  font-size: 20px;
  line-height: 1;
}
@keyframes pill-burst {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1.05); }
}
@keyframes emoji-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}
@keyframes emoji-float {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-48px) scale(1.4); }
}

/* ── Card Body ── */
.card-body { padding: 20px 16px 16px; }
.vote-heading {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.voted-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #dcfce7;
  color: #166534;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ── Name Options ── */
.name-options { display: flex; flex-direction: column; gap: 9px; }
.name-opt {
  position: relative;
  border: 2px solid var(--gray-mid);
  border-radius: 10px;
  padding: 13px 14px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.22,1,0.36,1);
  overflow: hidden;
  background: var(--white);
}
.name-opt:hover:not(.name-opt--voted) {
  border-color: var(--green);
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}
.name-opt.name-opt--selected { border-color: var(--green); background: #f0faf8; }
.name-opt.name-opt--my-vote  { border-color: var(--green); background: #f0faf8; }
.name-opt.name-opt--voted    { cursor: default; }
.name-opt.name-opt--flash    { animation: vote-flash 0.6s ease-out; }
@keyframes vote-flash {
  0%   { background: rgba(255,77,0,0.12); }
  100% { background: transparent; }
}
.name-opt.name-opt--winner   { border-color: var(--orange); background: #fff5f0; }
.name-opt-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(0,68,60,0.07);
  border-radius: 8px 0 0 8px;
  transition: width 0.9s cubic-bezier(0.22,1,0.36,1);
  z-index: 0;
}
.name-opt--winner .name-opt-bar { background: rgba(255,77,0,0.09); }
.name-opt-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.name-opt-radio {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gray-mid);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s;
  background: var(--white);
}
.name-opt--selected .name-opt-radio,
.name-opt--my-vote .name-opt-radio {
  border-color: var(--green);
  background: var(--green);
}
.name-opt--winner .name-opt-radio { border-color: var(--orange); background: var(--orange); }
.name-opt-radio-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: white;
  opacity: 0;
  transform: scale(0);
  transition: all 0.18s;
}
.name-opt--selected .name-opt-radio-dot,
.name-opt--my-vote .name-opt-radio-dot,
.name-opt--winner .name-opt-radio-dot { opacity: 1; transform: scale(1); }
.name-opt-text {
  flex: 1;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.name-opt-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.name-opt-votes {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
}
.name-opt-pct {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-lt);
  min-width: 34px;
  text-align: right;
}
.my-vote-tag {
  background: var(--green);
  color: white;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* ── Vote Button ── */
.vote-btn-area {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-lt);
}
.vote-btn {
  width: 100%;
  padding: 15px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.01em;
}
.vote-btn:hover:not(:disabled) {
  background: var(--green-mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,68,60,0.3);
}
.vote-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Navigation ── */
.horse-nav {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.nav-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--gray-mid);
  border-radius: 10px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.18s;
}
.nav-btn:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.nav-btn.primary {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}
.nav-btn.primary:hover:not(:disabled) { background: var(--orange-lt); border-color: var(--orange-lt); color: var(--white); }

/* ── Done Screen ── */
.done-screen {
  text-align: center;
  padding: 32px 0;
  animation: fadeUp 0.55s cubic-bezier(0.22,1,0.36,1) both;
}
.done-trophy {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 32px rgba(245,243,106,0.5);
  font-size: 40px;
}
.done-title {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}
.done-subtitle {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto 28px;
}
.picks-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  margin-bottom: 20px;
}
.picks-heading {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-lt);
  margin-bottom: 14px;
}
.pick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-lt);
}
.pick-row:last-child { border-bottom: none; padding-bottom: 0; }
.pick-horse { font-size: 13px; color: var(--text-mid); font-weight: 500; }
.pick-lineage {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  margin-top: 2px;
}
.pick-name {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 800;
  color: var(--green);
}

/* ── Results locked state ── */
.results-locked {
  text-align: center;
  padding: 48px 24px;
  animation: fadeUp 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
.results-locked-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--gray-lt);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
}
.results-locked-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}
.results-locked-sub {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto 24px;
}
.results-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border-radius: 20px;
  padding: 10px 20px;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  color: var(--green);
}

/* ── Leaderboard ── */
.leaderboard-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.lb-horse-header {
  background: var(--green);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lb-horse-name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  color: var(--white);
}
.lb-horse-lineage {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  margin-top: 2px;
}
.lb-vote-count {
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 4px 12px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--yellow);
}
.lb-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.lb-row { display: flex; align-items: center; gap: 10px; }
.lb-rank {
  width: 22px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-lt);
  flex-shrink: 0;
  text-align: center;
}
.lb-rank.first { color: var(--orange); }
.lb-name {
  flex: 1;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-bar-track {
  width: 80px;
  height: 7px;
  background: var(--gray-lt);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.lb-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--green-lt);
  transition: width 1s cubic-bezier(0.22,1,0.36,1);
}
.lb-bar-fill.first { background: var(--orange); }
.lb-pct {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mid);
  min-width: 34px;
  text-align: right;
  flex-shrink: 0;
}
.lb-votes-small {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-lt);
  min-width: 24px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Admin ── */
.admin-banner {
  background: var(--orange);
  padding: 8px 16px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-lt);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.firebase-notice {
  background: var(--yellow);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.firebase-notice-icon { font-size: 18px; flex-shrink: 0; }
.firebase-notice-text { font-size: 12px; color: var(--green-dark); line-height: 1.5; font-weight: 500; }
.firebase-notice-text strong { display: block; font-weight: 800; margin-bottom: 2px; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes cardOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-30px); }
}
.anim-in  { animation: cardIn  0.3s cubic-bezier(0.22,1,0.36,1) both; }
.anim-out { animation: cardOut 0.22s cubic-bezier(0.22,1,0.36,1) both; }
