/* TecVision Totem — frontend propio (sin cloud), v4 — rediseño corporativo
   Lenguaje visual: instrumento de precisión / calibración óptica — coherente
   con que TecVision calibra cámaras (DLT, keypoints) y mide con exactitud.
   Superficies claras, jerarquía por tipografía y color (no mayúsculas
   trackeadas), un único acento cálido reservado para el dato más importante
   de cada pantalla. Tema claro por defecto — no hay modo oscuro. */

:root {
  /* -- tinta / texto -- */
  --ink:        #161B22;
  --ink-soft:   #5C6672;
  --ink-mute:   #97A0AB;

  /* -- superficies -- */
  --surface:    #F1F3F5;   /* fondo de la app */
  --surface-1:  #FFFFFF;   /* tarjetas / paneles */
  --surface-2:  #EAEDF1;   /* huecos: inputs, readouts, filas alternas */
  --line:       #E1E5EA;
  --line-strong:#CBD2DA;

  /* -- marca -- */
  --brand:      #1E4A68;
  --brand-dark: #123249;
  --brand-tint: #E7EEF3;

  /* -- acento único (usarlo con moderación: dato hero + CTA principal) -- */
  --accent:      #B8752A;
  --accent-dark: #935C1E;
  --accent-tint: #F6ECDC;

  /* -- semantica de resultado -- */
  --in:      #2E7D5B;
  --in-tint: #E4F1EA;
  --out:     #B23B34;
  --out-tint:#FAEAE8;
  --net:     #B8752A;
  --net-tint:#F6ECDC;

  --side-a: var(--brand);
  --side-b: #2E7A78;

  /* -- pista (leidas directamente por app.js via var(--...)) -- */
  --court-clay:       #EDF2F5;
  --court-line:       #1E4A68;
  --court-wall:       #98A3AE;
  --court-zone-label: #97A2AD;
  --scope-fg:         var(--brand);
  --result-in:         var(--in);
  --result-out:        var(--out);
  --result-net:        var(--net);
  --text-soft:          var(--ink-soft);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --tap: 58px;
  --tap-sm: 46px;

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;

  --shadow-1: 0 1px 2px rgba(20, 27, 38, .05);
  --shadow-2: 0 10px 28px -8px rgba(20, 27, 38, .18);

  color-scheme: light;
}

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

html, body { height: 100%; margin: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}

/* lavado ambiental muy sutil — sin grano ni vineta de "consola" */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(120% 60% at 18% -10%, rgba(30, 74, 104, .05), transparent 55%), var(--surface);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; color: var(--ink); }
button { font-family: inherit; }
input { font-family: inherit; }

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.hidden { display: none !important; }

/* ============================================================ */
/* SHELL: topbar fija + area de pantallas                        */
/* ============================================================ */

#app {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* -- topbar -- */

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  height: 64px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; flex: 0 0 auto;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 15px; height: 15px; display: block; }
.brand-name {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  letter-spacing: -.01em; color: var(--ink);
  white-space: nowrap;
}

.topnav {
  flex: 1;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  height: 100%;
  align-items: center;
}
.topnav::-webkit-scrollbar { display: none; }

.nav-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-body); font-weight: 500; font-size: .87rem;
  cursor: pointer; white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-btn:hover { color: var(--ink); background: var(--surface-2); }
.nav-btn .nav-led { display: none; }
.nav-btn.is-placeholder { color: var(--ink-mute); }
.nav-btn.active {
  color: var(--brand);
  background: var(--brand-tint);
  font-weight: 600;
}
.nav-btn.active:hover { background: var(--brand-tint); }

.topbar-status {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.conn {
  display: flex; align-items: center; gap: 7px;
}
.conn-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-mute);
}
.conn-dot.alive { background: var(--in); }
.conn-dot.dead  { background: var(--out); }
.conn-label {
  font-size: .78rem; font-weight: 500; color: var(--ink-soft);
  white-space: nowrap;
}

.state-badge {
  font-family: var(--font-body); font-weight: 600; font-size: .76rem;
  padding: 5px 12px; border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-soft);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.state-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55;
}
.state-badge.recording {
  color: var(--out); background: var(--out-tint); border-color: transparent;
}
.state-badge.recording::before { animation: statuspulse 1.8s ease-in-out infinite; opacity: 1; }
.state-badge.idle { color: var(--ink-soft); }

/* -- area de pantallas -- */

.screens {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transition: opacity .2s ease;
  z-index: 2;
  overflow-y: auto;
}
.screen.hidden {
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================ */
/* COMPONENTES REUTILIZABLES                                     */
/* ============================================================ */

/* -- panel = tarjeta base -- */
.panel {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-1);
}
.panel--flush  { display: flex; flex-direction: column; min-height: 0; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--font-body); font-weight: 600;
  color: var(--ink); font-size: .88rem;
  padding-bottom: 11px;
  margin-bottom: 13px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.engrave-label {
  font-family: var(--font-body); font-weight: 600; font-size: .76rem;
  color: var(--ink-soft);
}

/* -- indicador suelto (leyendas, filas de tabla) -- */
.led {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto;
  background: var(--ink-mute);
}
.led--red   { background: var(--out); }
.led--green { background: var(--in); }
.led--amber { background: var(--net); }
.led--blue  { background: #2E6FA6; }
.led--blink { animation: statuspulse 1.6s ease-in-out infinite; }

/* -- screen-display = zocalo de lectura (numeros/pista) -- */
.screen-display {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  overflow: hidden;
}
.screen-display--scope {
  background: var(--surface-1);
  padding: 8px;
}
.screen-readout {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5.6vw, 3rem);
  font-weight: 500;
  line-height: 1; text-align: center;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  position: relative; z-index: 1;
}
.screen-readout .unit {
  font-size: .34em; font-weight: 500; color: var(--ink-mute); margin-left: 6px;
  font-family: var(--font-body);
}
.screen-caption {
  position: relative; z-index: 1;
  text-align: center; margin-top: 6px;
  font-family: var(--font-body); font-size: .82rem; font-weight: 500; color: var(--ink-soft);
}

/* -- meter = mini indicador (KPIs) -- */
.meter {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 12px 14px;
}
.meter-screen {
  font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500; color: var(--ink);
  background: var(--surface-2); border-radius: 6px;
  padding: 6px 10px; display: flex; align-items: baseline; gap: 5px;
  font-variant-numeric: tabular-nums;
}
.meter-screen i { font-style: normal; font-size: .66rem; color: var(--ink-mute); font-family: var(--font-body); }
.meter-label {
  font-family: var(--font-body); font-size: .74rem; font-weight: 500; color: var(--ink-soft);
  margin-top: 8px;
}

/* -- botones -- */
.btn-hw {
  position: relative; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 0 26px; border-radius: var(--radius-md);
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  transition: background .15s, transform .06s, opacity .15s, box-shadow .15s;
}
.btn-hw:hover { background: var(--brand-dark); }
.btn-hw:active { transform: translateY(1px); }
.btn-hw:disabled { opacity: .4; cursor: not-allowed; background: var(--ink-mute); }
.btn-hw:disabled:hover { background: var(--ink-mute); }

.btn-hw--sm { min-height: var(--tap-sm); padding: 0 18px; font-size: .86rem; }

.btn-hw--rec .lens {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff;
}
.btn-hw--rec .rec-word { color: #fff; }

.btn-hw--stop {
  background: var(--out);
}
.btn-hw--stop:hover { background: #8f2f29; }
.btn-hw--stop .stop-ico {
  width: 11px; height: 11px; border-radius: 3px;
  background: #fff;
}

.btn-hw--amber {
  background: var(--brand);
  color: #fff;
}
.btn-hw--amber:hover { background: var(--brand-dark); }

.btn-hw--ghost {
  background: transparent; color: var(--ink-soft);
  border: 1px solid var(--line);
}
.btn-hw--ghost:hover { background: var(--surface-2); color: var(--ink); }

/* ============================================================ */
/* PANTALLA: SELECCION                                           */
/* ============================================================ */

.screen--select { align-items: center; }

.select-main {
  flex: 1; width: 100%; max-width: 1040px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 22px; padding: 40px 32px 34px;
}

.select-header { text-align: center; max-width: 720px; }
.select-header h1 { font-size: 2rem; margin: 0 0 8px; color: var(--ink); letter-spacing: -.01em; }
.select-header .subtitle { color: var(--ink-soft); font-size: 1rem; margin: 0; }

.sport-toggle {
  display: inline-flex; margin-top: 20px; padding: 4px; gap: 2px;
  background: var(--surface-2); border-radius: var(--radius-md);
}
.sport-option {
  border: none; background: transparent; color: var(--ink-soft);
  min-height: var(--tap-sm); padding: 0 22px; border-radius: 8px;
  font-family: var(--font-body); font-size: .88rem; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: background .15s, color .15s, box-shadow .15s;
}
.sport-option:hover { color: var(--ink); }
.sport-option.active {
  background: var(--surface-1);
  color: var(--brand);
  font-weight: 600;
  box-shadow: var(--shadow-1);
}

.select-toolbar { width: 100%; max-width: 420px; }
.player-search {
  width: 100%; background: var(--surface-1); border: 1px solid var(--line);
  color: var(--ink); padding: 12px 16px; border-radius: var(--radius-md);
  font-size: .95rem; outline: none; min-height: var(--tap-sm);
}
.player-search::placeholder { color: var(--ink-mute); }
.player-search:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

.players-grid {
  flex: 1; width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  align-content: center;
}

.player-card {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.player-card:hover { border-color: var(--line-strong); }
.player-card:active { transform: scale(.98); }
.player-card.is-filtered { display: none; }
.player-card.selected {
  border-color: var(--brand);
  box-shadow: var(--shadow-2), inset 0 0 0 1px var(--brand);
  background: var(--brand-tint);
}

.player-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--avatar-bg, var(--ink-mute));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 600;
  color: #fff;
  border: 3px solid var(--surface-1);
}
.player-card.selected .player-avatar {
  border-color: var(--surface-1);
  box-shadow: 0 0 0 2px var(--brand);
}

.player-name { font-weight: 600; font-size: 1rem; text-align: center; color: var(--ink); }
.player-level {
  font-family: var(--font-body); font-size: .78rem; color: var(--ink-soft);
}

.select-badge {
  position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; color: transparent; background: var(--surface-1);
}
.player-card.selected .select-badge { background: var(--brand); border-color: var(--brand); color: #fff; }

.select-footer { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.selection-hint {
  color: var(--ink-soft); font-size: .9rem;
}

/* ============================================================ */
/* PANTALLA: SESION EN VIVO                                      */
/* ============================================================ */

.screen--live { overflow: hidden; }

.live-header {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 22px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--line);
}

.live-players { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.live-players .vs { color: var(--ink-mute); font-weight: 400; font-size: .82rem; font-family: var(--font-body); }
.player-tag-name.role-a { color: var(--side-a); }
.player-tag-name.role-b { color: var(--side-b); }

.live-status { display: flex; align-items: center; gap: 14px; }

.sport-pill {
  border: 1px solid var(--line); border-radius: 100px; padding: 5px 12px;
  font-family: var(--font-body); font-size: .78rem; font-weight: 500; color: var(--ink-soft);
  background: var(--surface-2);
}

.live-body {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 400px) 1fr;
  gap: 16px;
  padding: 16px 20px 20px;
  overflow: hidden;
}

.court-panel { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.court-wrap {
  position: relative; flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
}
#court-svg { height: 100%; max-width: 100%; }

.court-empty {
  position: absolute; inset: 6px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  pointer-events: none;
}
.court-empty span {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 10px 18px; box-shadow: var(--shadow-1); font-size: .88rem; font-weight: 500;
}

.legend { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: .8rem; color: var(--ink-soft); flex: 0 0 auto; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-item--player { font-weight: 600; color: var(--ink); }

.stats-column { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; padding-right: 4px; }
.stats-column::-webkit-scrollbar { width: 7px; }
.stats-column::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }

.live-grid-top { display: grid; grid-template-columns: 1fr 1fr 1fr 1.3fr; gap: 10px; flex: 0 0 auto; }
.live-grid-mid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 0 0 auto; }

.hero-speed .screen-readout { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }

.breakdown-list { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.breakdown-empty, .shot-list-empty, .court-empty, .filter-empty { color: var(--ink-soft); font-size: .88rem; }
.breakdown-row { display: grid; grid-template-columns: 78px 1fr 26px; align-items: center; gap: 10px; }
.breakdown-label { font-size: .8rem; color: var(--ink); font-weight: 500; }
.breakdown-bar { width: 100%; height: 8px; overflow: visible; }
.breakdown-bar-bg { fill: var(--surface-2); }
.breakdown-bar-fill { fill: var(--side-a); transition: width .25s ease; }
.breakdown-bar-fill.side-b { fill: var(--side-b); }
.breakdown-count { text-align: right; font-family: var(--font-mono); font-size: .82rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.console-panel { flex: 1; min-height: 200px; display: flex; flex-direction: column; }
.console-log {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column-reverse; gap: 7px;
  padding-right: 2px;
}
.console-log::-webkit-scrollbar { width: 7px; }
.console-log::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }

.shot-row {
  display: grid; grid-template-columns: 8px 20px 1fr auto auto; align-items: center; gap: 11px;
  background: var(--surface-1); border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: .88rem; animation: shot-in .18s ease;
}
.shot-row.role-a { border-left-color: var(--side-a); }
.shot-row.role-b { border-left-color: var(--side-b); }
@keyframes shot-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }

.shot-row .badge { width: 8px; height: 8px; border-radius: 50%; }
.shot-row .badge.in { background: var(--in); }
.shot-row .badge.out { background: var(--out); }
.shot-row .badge.net, .shot-row .badge.let, .shot-row .badge.fault { background: var(--net); }

.shot-row .shot-icon { display: flex; align-items: center; justify-content: center; color: var(--ink-mute); }
.shot-row .category { color: var(--ink); font-weight: 500; }
.shot-row .player-tag { color: var(--ink-soft); font-size: .76rem; }
.shot-row .speed { font-family: var(--font-mono); color: var(--ink); font-weight: 500; white-space: nowrap; font-size: .92rem; }
.shot-row .result-label { font-family: var(--font-body); font-size: .72rem; font-weight: 600; }
.shot-row .result-label.in { color: var(--in); }
.shot-row .result-label.out { color: var(--out); }
.shot-row .result-label.net, .shot-row .result-label.let, .shot-row .result-label.fault { color: var(--net); }

/* ============================================================ */
/* PANTALLA: RESUMEN                                              */
/* ============================================================ */

.screen--summary { align-items: center; justify-content: center; padding: 30px; }

.summary-card {
  width: 100%; max-width: 620px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px;
}
.summary-card h1 { font-size: 1.6rem; color: var(--ink); }
.summary-card .subtitle { color: var(--ink-soft); font-size: .96rem; margin: 0; }

.summary-grid { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.summary-tile { text-align: center; padding: 16px 10px; }
.summary-tile--accent { border-color: var(--accent); }
.summary-value { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500; color: var(--ink); }
.summary-tile--accent .summary-value { color: var(--accent); }
.summary-label { font-family: var(--font-body); font-size: .76rem; color: var(--ink-soft); margin-top: 6px; }

/* ============================================================ */
/* PANTALLA: ESTADISTICAS                                        */
/* ============================================================ */

.screen--stats { padding: 18px 20px 24px; gap: 16px; }
.stats-toolbar { display: flex; flex-wrap: wrap; gap: 18px; }

.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn {
  min-height: var(--tap-sm); padding: 0 14px; border-radius: var(--radius-md);
  border: 1px solid var(--line); background: var(--surface-1);
  color: var(--ink-soft); font-family: var(--font-body); font-size: .82rem; font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background .15s, color .15s, border-color .15s;
}
.filter-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.filter-btn.active {
  color: var(--brand); background: var(--brand-tint); border-color: transparent; font-weight: 600;
}

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; flex: 1; }

.chart-area { width: 100%; height: 150px; }
.chart-area polyline.area-fill { fill: rgba(30, 74, 104, .08); stroke: none; }
.chart-area polyline.area-line { fill: none; stroke: var(--brand); stroke-width: 2; }
.chart-area circle.area-pt { fill: var(--brand); }
.chart-axis-label { font-family: var(--font-mono); font-size: 9px; fill: var(--ink-soft); }

.player-compare { display: flex; flex-direction: column; gap: 10px; }
.compare-row { display: grid; grid-template-columns: 90px 1fr 40px; align-items: center; gap: 10px; }
.compare-label { font-family: var(--font-body); font-size: .8rem; color: var(--ink); }

/* ============================================================ */
/* PANTALLA: HISTORIAL                                            */
/* ============================================================ */

.screen--history { padding: 20px 22px 24px; gap: 14px; }
.session-list { display: flex; flex-direction: column; gap: 8px; }
.session-row {
  display: grid; grid-template-columns: 10px 1fr auto auto auto; align-items: center; gap: 16px;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 13px 16px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.session-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.session-row:active { transform: scale(.997); }
.session-sport { font-family: var(--font-display); font-size: 1rem; color: var(--ink); font-weight: 600; }
.session-date { color: var(--ink-soft); font-size: .8rem; margin-top: 2px; }
.session-stat { font-family: var(--font-mono); color: var(--ink); font-size: .92rem; text-align: right; white-space: nowrap; }
.session-stat small { font-family: var(--font-body); color: var(--ink-mute); font-size: .64rem; font-weight: 500; letter-spacing: .04em; display: block; margin-top: 2px; }

/* ============================================================ */
/* PANTALLA: REPLAY                                               */
/* ============================================================ */

.screen--replay { overflow: hidden; }
.replay-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 16px; padding: 16px 20px 20px; overflow: hidden; }
.replay-timeline { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.replay-scrubber {
  flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px;
  background: var(--line-strong); outline: none;
}
.replay-scrubber::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); border: 3px solid var(--surface-1); box-shadow: var(--shadow-1);
  cursor: pointer;
}
.replay-time { font-family: var(--font-mono); color: var(--ink-soft); font-size: .84rem; white-space: nowrap; }

/* ============================================================ */
/* PLACEHOLDERS (fase 2)                                         */
/* ============================================================ */

.screen--placeholder { align-items: center; justify-content: center; padding: 30px; }
.placeholder-card { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.placeholder-card h2 { font-size: 1.25rem; color: var(--ink); }
.placeholder-card p { color: var(--ink-soft); font-size: .94rem; line-height: 1.55; margin: 0; max-width: 440px; }
.placeholder-icon { color: var(--ink-mute); }

@keyframes statuspulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

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

/* ============================================================ */
/* RESPONSIVE                                                     */
/* ============================================================ */

@media (max-width: 900px) {
  .live-body, .replay-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .court-panel { max-height: 38vh; }
  .live-grid-top { grid-template-columns: 1fr 1fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .topnav { order: 3; flex-basis: 100%; }
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 20px; }
}
