:root {
  --bg: #0b1220;
  --bg-elev: #121a2b;
  --bg-card: #162033;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eef8;
  --muted: #9aabc4;
  --green: #2ecc71;
  --green-dim: #1f9d55;
  --gold: #d4a017;
  --gold-soft: #f0d78c;
  --danger: #ef6b6b;
  --warn: #e6b84d;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", "Trebuchet MS", "Verdana", sans-serif;
  --display: "Trebuchet MS", "Segoe UI", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(46, 204, 113, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(212, 160, 23, 0.1), transparent 50%),
    linear-gradient(180deg, #0b1220 0%, #0e1626 40%, #0a101c 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--gold-soft); }

.wrap {
  width: min(960px, calc(100% - 1.5rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(11, 18, 32, 0.85);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--green), #0f6b3a);
  box-shadow: inset 0 0 0 2px rgba(240, 215, 140, 0.35);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}
.nav-links { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.nav-links a { color: var(--muted); font-size: 0.92rem; }
.nav-links a:hover { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(180deg, var(--green), var(--green-dim));
  color: #04140a;
  box-shadow: 0 8px 24px rgba(46, 204, 113, 0.25);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #2a1c00;
}
.btn-block { width: 100%; }

.hero {
  padding: 2.2rem 0 1.5rem;
  animation: rise .5s ease both;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 6vw, 3rem);
  line-height: 1.1;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
.hero .lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
  margin: 0 0 1.25rem;
}
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(46, 204, 113, 0.12);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.disclaimer {
  font-size: 0.8rem;
  color: var(--muted);
  border-left: 3px solid var(--gold);
  padding-left: 0.75rem;
  margin: 1rem 0 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}
@media (max-width: 800px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
  animation: rise .55s ease both;
}
.card h2, .card h3 {
  margin: 0 0 0.65rem;
  font-family: var(--display);
}
.muted { color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(step);
  width: 1.7rem; height: 1.7rem;
  border-radius: 50%;
  background: rgba(212, 160, 23, 0.18);
  color: var(--gold-soft);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.kpi strong {
  font-size: 1.8rem;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}
.kpi span { color: var(--muted); font-size: 0.85rem; }

.field { margin-bottom: 0.85rem; }
.field label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.field-input, .field select, textarea.field-input {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
}
.field-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.9rem;
  margin: 0.65rem 0;
}
.field-check input { margin-top: 0.2rem; width: 1.1rem; height: 1.1rem; }
.errorlist { color: var(--danger); font-size: 0.85rem; padding-left: 1rem; }
.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.messages li {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.45rem;
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.25);
}
.messages li.error, .messages .error {
  background: rgba(239, 107, 107, 0.12);
  border-color: rgba(239, 107, 107, 0.3);
}

.prize-sim .slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}
.prize-sim input[type=range] { flex: 1; }
.prize-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--line);
  font-variant-numeric: tabular-nums;
}
.prize-row.gold strong { color: var(--gold-soft); }
.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.5rem;
  background: var(--bg-elev);
}
.faq summary { cursor: pointer; font-weight: 700; }

.section { padding: 1.25rem 0; }
.footer {
  margin-top: 2rem;
  padding: 1.5rem 0 calc(5.5rem + var(--safe-bottom));
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
}

/* Painel + bottom nav */
.app-shell { padding-bottom: calc(4.75rem + var(--safe-bottom)); }
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  padding: 0.45rem 0.5rem calc(0.45rem + var(--safe-bottom));
  background: rgba(10, 16, 28, 0.96);
  border-top: 1px solid var(--line);
  z-index: 50;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.35rem;
  border-radius: 10px;
}
.bottom-nav a.active, .bottom-nav a:hover { color: var(--green); background: rgba(46,204,113,.08); }
.bottom-nav .ico { font-size: 1.15rem; }

.rank-list { display: flex; flex-direction: column; gap: 0.45rem; }
.rank-row {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
}
.rank-row.podium-1 { border-color: rgba(212,160,23,.55); background: linear-gradient(90deg, rgba(212,160,23,.14), var(--bg-card)); }
.rank-row.podium-2 { border-color: rgba(180,190,210,.4); }
.rank-row.podium-3 { border-color: rgba(184,115,51,.45); }
.rank-row.me { outline: 1px solid rgba(46,204,113,.55); }
.pos {
  font-weight: 800;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}
.delta { font-size: 0.75rem; color: var(--muted); }
.delta.up { color: var(--green); }
.delta.down { color: var(--danger); }

.pix-box {
  background: var(--bg-elev);
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid var(--line);
}
.pix-box img {
  display: block;
  width: min(220px, 70vw);
  margin: 0.75rem auto;
  background: #fff;
  border-radius: 12px;
  padding: 0.5rem;
}
.copia-cola {
  word-break: break-all;
  font-size: 0.78rem;
  background: #0a101c;
  padding: 0.75rem;
  border-radius: 10px;
  max-height: 7rem;
  overflow: auto;
}

.status-pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(230,184,77,.15);
  color: var(--warn);
}
.status-pill.ok { background: rgba(46,204,113,.15); color: var(--green); }

.org-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.org-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 0.85rem;
  border: 1px solid var(--line);
}
.org-nav a:hover { color: var(--text); border-color: var(--green); }

.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
}
table.data input.field-input { min-height: 40px; padding: 0.4rem 0.5rem; }

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 900px) {
  .app-shell { padding-bottom: 2rem; }
  .bottom-nav { display: none; }
  .footer { padding-bottom: 2rem; }
}

/* ===== Corrida de cavalos (painel) ===== */
.race-card {
  margin: 1rem 0 1.25rem;
  overflow: hidden;
}
.race-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}
.race-card .race-sub {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
}
.race-empty {
  text-align: center;
  color: var(--muted);
  padding: 1.25rem 0.5rem;
  margin: 0;
}
.race-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.55rem 0.75rem;
  border-radius: 14px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.03) 0 12px,
      rgba(255,255,255,0.01) 12px 24px
    ),
    linear-gradient(180deg, #0e1a14 0%, #122018 100%);
  border: 1px solid rgba(46, 204, 113, 0.18);
  min-height: 120px;
}
.race-finish {
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  right: 8%;
  width: 3px;
  background: repeating-linear-gradient(
    180deg,
    #fff 0 6px,
    #111 6px 12px
  );
  border-radius: 2px;
  opacity: 0.85;
  pointer-events: none;
  z-index: 1;
}
.race-finish span {
  position: absolute;
  top: -0.15rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold-soft);
  background: rgba(11,18,32,0.85);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}
.race-lane {
  display: grid;
  grid-template-columns: minmax(96px, 34%) 1fr;
  gap: 0.45rem;
  align-items: center;
  min-height: 2.6rem;
}
.race-lane.is-me .race-label {
  outline: 1px solid rgba(46, 204, 113, 0.55);
  background: rgba(46, 204, 113, 0.1);
}
.race-label {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.35rem;
  row-gap: 0.05rem;
  padding: 0.3rem 0.45rem;
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
  font-size: 0.72rem;
}
.race-pos {
  grid-row: 1 / span 2;
  align-self: center;
  font-weight: 800;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}
.race-team {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.race-pts {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.race-path {
  position: relative;
  height: 2.4rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  overflow: hidden;
}
.race-horse {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(0, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  --progress: 8%;
  --horse: #2ecc71;
}
.race-horse.is-running {
  left: var(--progress);
  transform: translate(-50%, -50%);
  transition: left 1.35s cubic-bezier(0.22, 0.9, 0.3, 1);
  transition-delay: var(--delay, 0s);
}
.horse-svg {
  width: 2.6rem;
  height: 1.6rem;
  overflow: visible;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.35));
}
.horse-svg .horse-body,
.horse-svg .horse-neck,
.horse-svg .horse-head,
.horse-svg .horse-ear,
.horse-svg .horse-tail,
.horse-svg .leg {
  fill: var(--horse);
}
.horse-svg .horse-head { stroke: rgba(0,0,0,0.2); stroke-width: 0.4; }
.horse-name {
  display: block;
  margin-top: -0.1rem;
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  max-width: 4.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.race-horse.is-galloping .horse-svg {
  animation: gallop-bob 0.38s ease-in-out infinite;
}
.race-horse.is-galloping .leg-2,
.race-horse.is-galloping .leg-4 {
  transform-origin: top center;
  animation: gallop-leg 0.38s ease-in-out infinite;
}
.race-horse.is-galloping .leg-3,
.race-horse.is-galloping .leg-1 {
  transform-origin: top center;
  animation: gallop-leg 0.38s ease-in-out infinite reverse;
}

@keyframes gallop-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-3px) rotate(2deg); }
}
@keyframes gallop-leg {
  0%, 100% { transform: rotate(-18deg); }
  50% { transform: rotate(16deg); }
}

@media (prefers-reduced-motion: reduce) {
  .race-horse.is-galloping .horse-svg,
  .race-horse.is-galloping .leg-1,
  .race-horse.is-galloping .leg-2,
  .race-horse.is-galloping .leg-3,
  .race-horse.is-galloping .leg-4 {
    animation: none !important;
  }
  .race-horse.is-running {
    transition: none !important;
  }
}

@media (max-width: 520px) {
  .race-lane {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .race-label {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
    align-items: center;
  }
  .race-pos { grid-row: auto; }
  .race-pts { text-align: right; }
}

/* ===== Derby arena (painel) — inspirado em corrida virtual ===== */
.derby-root { margin-top: 0.25rem; }
.derby-layout {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 0.75rem;
}
@media (max-width: 860px) {
  .derby-layout { grid-template-columns: 1fr; }
}
.derby-arena {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0a1520;
  min-height: 280px;
}
.derby-hud {
  position: absolute;
  z-index: 5;
  left: 0; right: 0; top: 0;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  background: linear-gradient(180deg, rgba(5,10,18,0.85), transparent);
  pointer-events: none;
}
.derby-hud strong { display: block; font-size: 0.95rem; }
.derby-hud span { color: var(--muted); font-size: 0.75rem; }
.derby-hud-right { display: flex; align-items: center; gap: 0.5rem; }
.derby-badge {
  background: rgba(46,204,113,0.18) !important;
  color: var(--green) !important;
  font-weight: 800 !important;
  font-size: 0.65rem !important;
  letter-spacing: .06em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}
#derby-timer {
  font-variant-numeric: tabular-nums;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
}
.derby-stage {
  position: relative;
  height: clamp(240px, 42vw, 360px);
  background:
    linear-gradient(180deg, rgba(8,14,24,0.35), rgba(8,14,24,0.55)),
    url('/static/img/race-track-bg.jpg') center/cover no-repeat;
}
.derby-horses {
  position: absolute;
  inset: 0;
}
.derby-marker {
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 0;
  z-index: 3;
  will-change: transform;
}
.derby-marker.is-me .derby-tag {
  box-shadow: 0 0 0 2px rgba(46,204,113,0.7);
}
.derby-tag {
  position: absolute;
  left: 50%;
  bottom: 2.1rem;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(10,16,28,0.92);
  border: 1px solid color-mix(in srgb, var(--c) 70%, #fff);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.derby-num {
  display: inline-grid;
  place-items: center;
  min-width: 1.1rem;
  height: 1.1rem;
  border-radius: 4px;
  background: var(--c);
  color: #111;
  font-size: 0.62rem;
  font-weight: 900;
  margin-right: 0.15rem;
}
.derby-silks {
  position: absolute;
  left: 50%;
  top: -0.15rem;
  width: 0.85rem;
  height: 0.85rem;
  transform: translate(-50%, -120%);
  border-radius: 3px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2);
}
.derby-pony {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -40%);
  font-size: 1.55rem;
  filter: drop-shadow(0 3px 2px rgba(0,0,0,0.45));
  animation: derby-bob 0.45s ease-in-out infinite;
}
.derby-marker.face-left .derby-pony { transform: translate(-50%, -40%) scaleX(-1); }
@media (prefers-reduced-motion: reduce) {
  .derby-pony { animation: none !important; }
}
@keyframes derby-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3px; }
}

.derby-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  padding: 0.45rem 0.35rem;
}
.derby-btn {
  min-width: 2.4rem;
  min-height: 2.2rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}
.derby-btn:hover { border-color: var(--green); }
.derby-seek {
  flex: 1;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.derby-seek-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), #7bed9f);
  transition: width 0.2s linear;
}
.derby-seek-label {
  font-size: 0.72rem;
  color: var(--muted);
  min-width: 4rem;
}

.derby-side {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem;
}
.derby-side-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}
.derby-rank-list { display: flex; flex-direction: column; gap: 0.45rem; }
.derby-rank-row {
  display: grid;
  grid-template-columns: 1.4rem 0.85rem 1fr auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.4rem 0.35rem;
  border-radius: 10px;
}
.derby-rank-row.is-me { background: rgba(46,204,113,0.1); }
.derby-rank-pos { font-weight: 800; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.derby-rank-silks {
  width: 0.85rem; height: 0.85rem; border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}
.derby-rank-meta strong {
  display: block;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.derby-bar {
  margin-top: 0.25rem;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.derby-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 0.25s linear;
}
.derby-rank-pts {
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.derby-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.derby-card {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.45rem;
  align-items: center;
  padding: 0.65rem 0.7rem;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--c);
}
.derby-card.is-me { outline: 1px solid rgba(46,204,113,0.45); }
.derby-card-avatar { font-size: 1.4rem; }
.derby-card-silks {
  width: 1rem; height: 1.15rem; border-radius: 3px;
  background: var(--c);
}
.derby-card-text strong { display: block; font-size: 0.82rem; }
.derby-card-text span { color: var(--muted); font-size: 0.72rem; }

.race-card h2 { display: flex; align-items: center; gap: 0.45rem; }
.race-card h2::before {
  content: '🏇';
  font-size: 1.1rem;
}

/* ===== Hero com visual da corrida (landing) ===== */
.hero-race {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.1rem;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-race { grid-template-columns: 1fr; }
}
.hero-race-copy h1 { margin-top: 0; }
.hero-race-visual { animation: rise .6s ease both; }
.hero-race-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(240, 215, 140, 0.28);
  box-shadow: 0 18px 50px rgba(0,0,0,0.4);
  min-height: 220px;
  background: #0a1520;
}
.hero-race-bg {
  display: block;
  width: 100%;
  height: clamp(200px, 34vw, 300px);
  object-fit: cover;
  transform: scale(1.02);
}
.hero-race-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.1rem 0.95rem 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(6,10,18,0.92));
}
.hero-race-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(46, 204, 113, 0.18);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: .03em;
  margin-bottom: 0.35rem;
}
.hero-race-overlay p {
  margin: 0;
  color: #dce7f5;
  font-size: 0.88rem;
  max-width: 22rem;
  line-height: 1.35;
}
.hero-mini-horses {
  position: absolute;
  inset: 18% 8% 28% 8%;
  pointer-events: none;
}
.mini-horse {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  background: rgba(10,16,28,0.9);
  border: 1px solid color-mix(in srgb, var(--c) 75%, #fff);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}
.mini-horse::before {
  content: '🏇';
  font-size: 0.95rem;
}
.mini-horse.h1 { left: 62%; top: 18%; animation: mini-run 4.8s ease-in-out infinite; }
.mini-horse.h2 { left: 48%; top: 42%; animation: mini-run 5.2s ease-in-out infinite .3s; }
.mini-horse.h3 { left: 34%; top: 58%; animation: mini-run 5.6s ease-in-out infinite .55s; }
.mini-horse.h4 { left: 22%; top: 36%; animation: mini-run 5s ease-in-out infinite .8s; }

@keyframes mini-run {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -4px); }
}

@media (prefers-reduced-motion: reduce) {
  .mini-horse { animation: none !important; }
}
