/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --primary:       #005659;
  --primary-light: #007a7e;
  --bg:            #eef4f4;
  --card:          #ffffff;
  --border:        #cddede;
  --text:          #1b2c2e;
  --muted:         #4d6a6e;
  --gold:          #c9940a;
  --gold-bg:       #fdf8ec;
  --silver:        #7a8fa6;
  --silver-bg:     #f4f6f9;
  --bronze:        #9e5c2a;
  --bronze-bg:     #fdf3ed;
  --men:           #1d6fb8;
  --women:         #b8265a;
  --shadow-sm:     0 1px 3px rgba(0,86,89,.08);
  --shadow-md:     0 4px 16px rgba(0,86,89,.12);
  --radius:        12px;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg); min-height: 100vh; }

/* ── Site header ─────────────────────────────────────────────────────────── */
.site-header { background: #0d0d1f; padding: 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.site-header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 600; font-size: 17px; }
.site-logo img { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; background: rgba(255,255,255,.15); padding: 3px; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav-link { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.65); text-decoration: none; padding: 5px 11px; border-radius: 7px; white-space: nowrap; transition: color .15s, background .15s; }
.site-nav-link:hover, .site-nav-link.active { color: #fff; background: rgba(255,255,255,.1); }
@media (max-width: 520px) { .site-nav-link:not(.site-nav-link.active) { display: none; } }
.container { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }

/* ── Loading ─────────────────────────────────────────────────────────────── */
.screen-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; gap: 16px; color: var(--muted); }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.results-hero {
  background: linear-gradient(135deg, #0d0d1f 0%, #1a1a2e 55%, #0d2b4f 100%);
  color: #fff;
  padding: 44px 0 36px;
  position: relative;
  overflow: hidden;
}
.results-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .6; margin-bottom: 8px; }
.hero-title { font-size: clamp(22px, 4vw, 36px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 14px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.hero-meta-item { font-size: 13px; opacity: .8; font-weight: 500; }
.hero-meta-item:empty { display: none; }

/* ── Race selector ───────────────────────────────────────────────────────── */
.race-selector-wrap { margin-top: 16px; }
.race-selector { display: flex; flex-wrap: wrap; gap: 8px; }
.race-btn {
  padding: 7px 16px; border: 1.5px solid rgba(255,255,255,.25); border-radius: 20px;
  background: transparent; color: rgba(255,255,255,.8); font-family: inherit;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.race-btn:hover { border-color: rgba(255,255,255,.55); color: #fff; }
.race-btn.active { background: rgba(255,255,255,.18); border-color: #fff; color: #fff; font-weight: 600; }

/* ── Stats bar ───────────────────────────────────────────────────────────── */
.stats-bar { background: var(--card); border-bottom: 2px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); }
.stat-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 12px; border-right: 1px solid var(--border);
  transition: background .15s;
}
.stat-card:last-child { border-right: none; }
.stat-value {
  font-size: 24px; font-weight: 800; letter-spacing: -.03em;
  color: var(--primary); line-height: 1; font-variant-numeric: tabular-nums;
}
.stat-value.stat-men    { color: var(--men); }
.stat-value.stat-women  { color: var(--women); }
.stat-value.stat-gold   { color: var(--gold); }
.stat-value.stat-time   { font-size: 17px; letter-spacing: 0; }
.stat-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 5px; }

/* ── Section heading ─────────────────────────────────────────────────────── */
.section-heading {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); margin-bottom: 24px;
}

/* ── Podium section ──────────────────────────────────────────────────────── */
.podium-section {
  background: linear-gradient(180deg, #f5fafa 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 32px 0 0;
}

.podium-display { overflow-x: auto; padding-bottom: 0; }

.podium-row {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 10px; min-width: 560px;
}

.podium-place {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; max-width: 240px;
}
.podium-place.podium-empty { opacity: 0; pointer-events: none; }

.podium-card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 20px 16px;
  width: 100%;
  text-align: center;
  margin-bottom: 0;
  border: 1px solid var(--border);
  transition: transform .2s;
}
.podium-card:hover { transform: translateY(-3px); }
.podium-rank-1 .podium-card { border-color: #f0d060; box-shadow: 0 8px 24px rgba(201,148,10,.18); }
.podium-rank-2 .podium-card { border-color: #b8c6d6; }
.podium-rank-3 .podium-card { border-color: #d4a880; }

.podium-medal-emoji { font-size: 36px; line-height: 1; margin-bottom: 10px; display: block; }

.podium-runner-name {
  font-size: 15px; font-weight: 700; color: var(--text);
  line-height: 1.3; margin-bottom: 6px;
}
.podium-runner-lastname { font-size: 13px; font-weight: 600; color: var(--muted); }

.podium-runner-club {
  font-size: 12px; color: var(--muted); margin-bottom: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}

.podium-runner-time {
  font-size: 20px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-bottom: 4px;
}
.podium-rank-1 .podium-runner-time { color: var(--gold); font-size: 22px; }

.podium-runner-gap { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 8px; min-height: 1.4em; }

.podium-runner-meta { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; }
.podium-gender-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.podium-gender-dot.men   { background: var(--men); }
.podium-gender-dot.women { background: var(--women); }
.podium-runner-dorsal { font-size: 12px; font-weight: 700; color: var(--muted); }

/* Wrappers semánticos: transparentes en desktop */
.podium-card-info { display: contents; }
.podium-card-time { display: contents; }

/* Stands */
.podium-stand {
  width: 100%; display: flex; align-items: center; justify-content: center;
  border-radius: 6px 6px 0 0; color: rgba(255,255,255,.9);
  font-weight: 800; font-size: 20px; letter-spacing: -.02em; margin-top: 12px;
}
.podium-stand-1 { height: 80px; background: linear-gradient(180deg, #f5c842 0%, #c9940a 100%); }
.podium-stand-2 { height: 56px; background: linear-gradient(180deg, #c8d4e0 0%, #7a8fa6 100%); }
.podium-stand-3 { height: 40px; background: linear-gradient(180deg, #d4a880 0%, #9e5c2a 100%); }

/* ── View toggle ─────────────────────────────────────────────────────────── */
.results-section { padding: 24px 0 56px; }

.view-toggle {
  display: flex; gap: 6px; margin-bottom: 24px;
  border-bottom: 2px solid var(--border); padding-bottom: 0;
}
.view-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; border: none; border-radius: 0;
  background: transparent; color: var(--muted);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: color .15s;
  position: relative; bottom: -2px;
  border-bottom: 2px solid transparent;
}
.view-btn:hover { color: var(--primary); }
.view-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Filters ─────────────────────────────────────────────────────────────── */
.results-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-tabs { display: flex; gap: 4px; }
.filter-tab {
  padding: 7px 14px; border: 1.5px solid var(--border); border-radius: 20px;
  background: var(--card); color: var(--muted); font-family: inherit;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.filter-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.filter-tab-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; align-self: center; }
.filter-tab--local.active { background: #92400e; border-color: #92400e; color: #fff; }
.filter-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.filter-select {
  height: 36px; padding: 0 10px; border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); font-family: inherit; font-size: 13px;
  outline: none; cursor: pointer;
}
.filter-select:focus { border-color: var(--primary); }
.search-wrap { position: relative; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.filter-search {
  height: 36px; padding: 0 12px 0 32px; border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); font-family: inherit; font-size: 13px;
  width: 200px; outline: none; transition: border-color .15s;
}
.filter-search:focus { border-color: var(--primary); }

.results-count { font-size: 13px; color: var(--muted); margin-bottom: 10px; font-weight: 500; }

/* ── Table ───────────────────────────────────────────────────────────────── */
.table-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.results-table { width: 100%; border-collapse: collapse; }
.results-table thead { background: #f6fafa; border-bottom: 2px solid var(--border); }
.results-table th {
  padding: 10px 12px; text-align: left;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); white-space: nowrap;
}
.results-table th.col-pos    { width: 52px; text-align: center; }
.results-table th.col-dorsal { width: 68px; text-align: center; }
.results-table th.col-cat    { width: 160px; }
.results-table th.col-time   { text-align: right; }
.results-table th.col-gap    { text-align: right; }
.results-table th.col-pace   { text-align: right; }

.results-table tbody tr { border-bottom: 1px solid #f0f5f5; transition: background .1s; }
.results-table tbody tr:last-child { border-bottom: none; }
.results-table tbody tr:hover { background: #f2fafa; }
.results-table tbody tr.row-gold   { background: var(--gold-bg); }
.results-table tbody tr.row-silver { background: var(--silver-bg); }
.results-table tbody tr.row-bronze { background: var(--bronze-bg); }
.results-table tbody tr.row-gold:hover   { background: #faf1cc; }
.results-table tbody tr.row-silver:hover { background: #edf0f5; }
.results-table tbody tr.row-bronze:hover { background: #f8e8dd; }
.results-table td { padding: 10px 12px; font-size: 14px; vertical-align: middle; }

.pos-cell { text-align: center; font-weight: 700; }
.pos-medal { font-size: 20px; line-height: 1; display: block; }
.pos-num { color: var(--muted); font-size: 14px; }

.dorsal-cell { text-align: center; }
.dorsal-badge {
  display: inline-block; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 8px; font-size: 12.5px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--text);
}

.name-cell { font-weight: 600; }
.name-main { display: flex; align-items: center; gap: 7px; }
.name-text { font-size: 14px; }
.gender-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.gender-dot.men   { background: var(--men); }
.gender-dot.women { background: var(--women); }

.club-cell { font-size: 13px; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cat-cell { font-size: 12.5px; white-space: nowrap; }
.cat-medal { font-size: 14px; margin-right: 4px; }
.cat-name { font-weight: 500; }
.cat-pos { color: var(--muted); font-size: 11.5px; }

.time-cell { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.time-leader { color: var(--gold); }

.gap-cell  { text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pace-cell { text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.no-results-msg { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.results-updated { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: right; }

/* subtítulo de categoría visible solo en móvil (cuando col-cat está oculta) */
.name-sub { display: none; font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.3; }

.col-diploma { width: 44px; padding: 0 8px 0 0; }
.diploma-cell { text-align: center; padding: 0 8px 0 0; }
.diploma-btn {
  background: none; border: none; cursor: pointer;
  font-size: 16px; line-height: 1;
  padding: 5px 6px; border-radius: 6px;
  transition: background .15s, transform .1s;
  color: var(--muted); display: inline-flex; align-items: center;
}
.diploma-btn:hover { background: var(--primary-bg); transform: scale(1.15); }
.diploma-btn:disabled { opacity: 0.45; cursor: wait; }

/* ── Podium blocks (general + femenino) ─────────────────────────────────── */
.podium-block { margin-bottom: 28px; }
.podium-block:last-child { margin-bottom: 0; }
.podium-block-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); margin-bottom: 16px;
}

/* ── Split rows ──────────────────────────────────────────────────────────── */
.row-expandable { cursor: pointer; }
.row-expandable:hover { background: #edf8f8 !important; }
.row-expanded { background: #e8f4f4 !important; }

.expand-chevron {
  display: block; font-size: 11px; color: var(--muted); line-height: 1;
  margin-top: 2px; transition: transform .18s;
}

.split-row td { padding: 0 !important; border-bottom: 1px solid var(--border) !important; }
.split-cell { padding: 0 !important; }
.split-container {
  display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap;
  padding: 10px 16px 12px 52px;
  background: #f0fafa;
  border-top: 1px dashed var(--border);
}
.split-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); white-space: nowrap; padding-top: 4px;
}
.split-list { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.split-arrow { color: var(--muted); font-size: 13px; padding: 0 2px; }
.split-chip {
  display: flex; flex-direction: column; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; min-width: 80px; text-align: center;
  transition: box-shadow .15s;
}
.split-chip:hover { box-shadow: var(--shadow-sm); }
.split-chip-name {
  font-size: 10.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; line-height: 1; margin-bottom: 4px;
}
.split-chip-dist { font-weight: 400; }
.split-chip-time {
  font-size: 15px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1;
}
.split-chip-pace {
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
  margin-top: 3px; line-height: 1;
}

/* ── Category podium ─────────────────────────────────────────────────────── */
.cat-podium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cat-podium-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s;
}
.cat-podium-card:hover { box-shadow: var(--shadow-md); }

.cat-podium-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: #f6fafa;
  border-bottom: 1px solid var(--border);
}
.cat-podium-title { font-size: 13px; font-weight: 700; color: var(--text); }
.cat-podium-count { font-size: 11px; color: var(--muted); font-weight: 600; }

.cat-podium-runners { padding: 8px 0; }

.cat-podium-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  border-left: 3px solid transparent;
  transition: background .1s;
}
.cat-podium-row:hover { background: #f8fcfc; }
.cpod-rank-gold   { border-left-color: var(--gold); background: var(--gold-bg); }
.cpod-rank-silver { border-left-color: var(--silver); }
.cpod-rank-bronze { border-left-color: var(--bronze); }
.cpod-rank-gold:hover   { background: #faf1cc; }

.cpod-medal { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }

.cpod-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cpod-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 5px;
}
.cpod-club { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cpod-gender-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.cpod-gender-dot.men   { background: var(--men); }
.cpod-gender-dot.women { background: var(--women); }

.cpod-time {
  font-size: 13px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0;
}
.cpod-rank-gold .cpod-time { color: var(--gold); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { background: #0d0d1f; color: rgba(255,255,255,.4); padding: 20px 0; text-align: center; font-size: 13px; margin-top: 40px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

/* Tablet ≤ 900px */
@media (max-width: 900px) {
  .cat-podium-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-card:nth-child(3) { border-right: none; }
  .stat-card:nth-child(n+4) { border-top: 1px solid var(--border); }
}

/* Medio ≤ 700px */
@media (max-width: 700px) {
  .results-table th.col-club,    .results-table td.club-cell    { display: none; }
  .results-table th.col-pace,    .results-table td.pace-cell    { display: none; }
  .results-table th.col-diploma, .results-table td.diploma-cell { display: none; }
  .filter-right { margin-left: 0; width: 100%; }
  .filter-search { width: 100%; flex: 1; }
  .cat-podium-grid { grid-template-columns: 1fr; }
}

/* Móvil ≤ 560px */
@media (max-width: 560px) {
  /* Stats */
  .stat-card { padding: 12px 6px; }
  .stat-value { font-size: 18px; }
  .stat-value.stat-time { font-size: 13px; }
  .stat-label { font-size: 9px; letter-spacing: .03em; }

  /* Headings / toggles */
  .section-heading { font-size: 12px; margin-bottom: 14px; }
  .view-btn { font-size: 12.5px; padding: 9px 11px; gap: 5px; }

  /* Filtros */
  .results-filters { gap: 8px; }
  .filter-tab { padding: 6px 11px; font-size: 12.5px; }

  /* Tabla: scroll horizontal + ocultar cat + ajustar padding */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .results-table th.col-gap, .results-table td.gap-cell { display: none; }
  .results-table th.col-cat, .results-table td.cat-cell { display: none; }
  .results-table th.col-pos    { width: 38px; }
  .results-table th.col-dorsal { width: 50px; }
  .results-table td { padding: 9px 8px; font-size: 13px; }
  .time-cell { font-size: 14px; }
  .dorsal-badge { padding: 2px 5px; font-size: 11.5px; }
  /* Mostrar categoría como subtítulo dentro del nombre */
  .name-sub { display: block; }

  /* Pódium: lista vertical, cada tarjeta = fila horizontal */
  .podium-section { padding: 20px 0 0; }
  .podium-block { margin-bottom: 20px; }
  .podium-row {
    flex-direction: column;
    min-width: 0;
    align-items: stretch;
    gap: 8px;
  }
  .podium-place {
    flex: none;
    max-width: 100%;
    min-height: 0 !important;
  }
  .podium-stand { display: none; }

  /* Tarjeta horizontal */
  .podium-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 14px 16px;
    min-height: 0 !important;
  }
  .podium-card:hover { transform: none; }

  .podium-medal-emoji {
    flex-shrink: 0;
    font-size: 32px;
    margin-bottom: 0;
    line-height: 1;
  }

  /* Bloque central: nombre + club */
  .podium-card-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
  }
  .podium-runner-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
    text-align: left;
    line-height: 1.3;
  }
  /* Evitar salto de línea forzado: apellido en la misma línea */
  .podium-runner-name br { display: none; }
  .podium-runner-lastname { font-size: 14px; font-weight: 700; color: var(--text); }
  .podium-runner-club {
    font-size: 12px;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .podium-runner-meta {
    justify-content: flex-start;
    margin-top: 4px;
    font-size: 11px;
  }
  .podium-runner-dorsal { font-size: 11px; }

  /* Bloque derecho: tiempo + diferencia */
  .podium-card-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 2px;
  }
  .podium-runner-time {
    font-size: 17px;
    margin-bottom: 0;
    text-align: right;
  }
  .podium-rank-1 .podium-runner-time { font-size: 19px; }
  .podium-runner-gap {
    font-size: 11px;
    margin-bottom: 0;
    min-height: 0;
    text-align: right;
  }

  /* Parciales */
  .split-container { padding: 8px 10px; gap: 8px; }
  .split-label { font-size: 9.5px; }
  .split-chip { padding: 5px 8px; min-width: 64px; }
  .split-chip-name { font-size: 9.5px; }
  .split-chip-time { font-size: 13px; }
  .split-chip-pace { font-size: 10px; }
}

/* Muy pequeño ≤ 400px */
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card:nth-child(2) { border-right: none; }
  .stat-card:nth-child(n+3) { border-top: 1px solid var(--border); }
  .filter-tabs { flex-wrap: wrap; }
  .filter-tab { font-size: 12px; padding: 5px 10px; }
  .results-section { padding: 16px 0 40px; }
}
