/* RUNLAB · ROAD TO 42K
   Negro puro, acento volt, Archivo condensada pesada para las cifras. */

:root {
  color-scheme: dark;
  --bg: #000000;
  --raise: #141414;
  --raise-2: #1f1f1f;
  --line: #2a2a2a;
  --ink: #ffffff;
  --ink-2: #a6a6a6;
  --ink-3: #737373;
  --volt: #d6ff2e;
  --on-volt: #000000;
  --bad: #ff5a4e;
  --warn: #f5b700;

  --z1: #7d8fa3;
  --z2: #d6ff2e;
  --z3: #f5b700;
  --z4: #ff6b2c;
  --z5: #e8338f;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(16px, 4vw, 40px);
  --r-sm: 4px;
  --r-md: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- marca ---------- */
.brand {
  font-weight: 900;
  font-stretch: 62%;
  font-style: italic;
  font-size: 30px;
  letter-spacing: -0.01em;
  line-height: 1;
  text-transform: uppercase;
}
.brand span { color: var(--volt); }
.brand--big { font-size: 64px; }

/* ---------- cabecera y pestañas ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 14px var(--pad) 0;
}
.top-row, .tabs { max-width: calc(1280px - 2 * var(--pad)); margin-left: auto; margin-right: auto; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#detail { scroll-margin-top: 130px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.sync-info { color: var(--ink-3); font-size: 13px; }
.tabs {
  display: flex; gap: 26px; margin-top: 14px; margin-bottom: 0;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  background: none; border: 0; padding: 8px 0 12px; cursor: pointer;
  color: var(--ink-2); font-weight: 700; font-size: 15px; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--volt); }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; padding: 7px 16px; font-weight: 700; font-size: 14px;
  cursor: pointer; text-decoration: none; border: 1px solid transparent;
  min-height: 36px;
}
.btn--volt { background: var(--volt); color: var(--on-volt); }
.btn--volt:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink-3); }
.btn[disabled] { opacity: .5; cursor: progress; }
.linklike { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; font-size: 13px; }
.linklike:hover { color: var(--ink); }

.banner {
  width: calc(100% - 2 * var(--pad)); max-width: calc(1280px - 2 * var(--pad));
  margin: 16px auto 0; padding: 14px 18px; border-radius: var(--r-md);
  background: var(--raise); border: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.banner--preview { border-color: var(--volt); }

/* ---------- estructura ---------- */
.view { padding: 24px var(--pad) 64px; max-width: 1280px; margin: 0 auto; outline: none; }
.loading, .empty { color: var(--ink-2); }
.section { margin-top: 40px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
h2 {
  margin: 0; font-weight: 900; font-stretch: 75%; font-size: 26px; line-height: 1.1;
  text-transform: uppercase; letter-spacing: .005em;
}
h3 { margin: 0; font-weight: 800; font-size: 16px; line-height: 1.3; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.small { font-size: 13px; }
.explain { color: var(--ink-2); font-size: 14px; max-width: 68ch; margin: 4px 0 0; }

.panel { background: var(--raise); border-radius: var(--r-md); padding: 20px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- noticias ---------- */
.news { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 28px; }
@media (max-width: 980px) { .news { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .news { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-right: calc(-1 * var(--pad)); padding-right: var(--pad); scrollbar-width: none; }
  .news::-webkit-scrollbar { display: none; }
  .news-card { flex: 0 0 80%; scroll-snap-align: start; }
}
.news-card {
  background: var(--raise); border-radius: var(--r-md); padding: 14px; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 8px; min-height: 132px; border: 1px solid transparent;
}
a.news-card:hover { border-color: var(--ink-3); }
.news-card--ghost { opacity: .5; }
.news-tags { display: flex; align-items: center; gap: 8px; }
.news-tag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: var(--r-sm); }
.news-tag--mara { background: var(--volt); color: var(--on-volt); }
.news-tag--ultra { background: var(--z4); color: #000; }
.news-scope { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.news-title { font-weight: 700; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-foot { margin-top: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-empty { grid-column: 1 / -1; margin: 0; }

/* ---------- héroe: cuenta regresiva ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px; align-items: end;
  padding-bottom: 28px; border-bottom: 1px solid var(--line);
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.count { display: flex; align-items: flex-end; gap: 18px; }
.count-num {
  font-weight: 900; font-stretch: 62%; font-size: clamp(132px, 22vw, 260px);
  line-height: .78; letter-spacing: -0.03em; color: var(--volt);
}
.count-txt { padding-bottom: 6px; }
.count-word {
  display: block; font-weight: 900; font-stretch: 62%; font-size: clamp(40px, 6vw, 72px);
  line-height: .9; text-transform: uppercase;
}
.count-race { display: block; margin-top: 10px; color: var(--ink-2); font-size: 15px; }

.count-rest { display: block; color: var(--ink-3); font-size: 14px; margin-top: 2px; }
.count-name {
  display: block; margin-top: 8px; font-weight: 900; font-stretch: 75%; font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.05; text-transform: uppercase; color: var(--ink-2);
}

/* ---------- cuentas regresivas ---------- */
.ev-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 980px) { .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .ev-grid { grid-template-columns: 1fr; } }
.ev {
  background: var(--raise); border-radius: var(--r-md); padding: 18px; min-height: 176px;
  display: flex; flex-direction: column; border: 1px solid transparent; text-align: left;
}
.ev--next { border-color: var(--volt); }
.ev--past { opacity: .55; }
.ev-name { font-size: 15px; line-height: 1.3; }
.ev-count { padding-top: 14px; display: flex; align-items: baseline; gap: 8px; }
.ev-count b { font-weight: 900; font-stretch: 62%; font-size: 64px; line-height: .85; }
.ev--next .ev-count b { color: var(--volt); }
.ev-count span { font-weight: 800; font-stretch: 75%; font-size: 18px; text-transform: uppercase; color: var(--ink-2); }
.ev-rest { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.ev-meta { color: var(--ink-3); font-size: 13px; margin-top: auto; padding-top: 12px; line-height: 1.4; }
.ev--add {
  background: transparent; border: 1px dashed var(--line); cursor: pointer; color: var(--ink);
  align-items: flex-start; justify-content: flex-end; gap: 4px; font-weight: 700;
}
.ev--add:hover { border-color: var(--ink-3); }
.ev-plus { font-weight: 900; font-stretch: 62%; font-size: 56px; line-height: .8; color: var(--volt); margin-bottom: auto; }

.ev-editor { display: grid; gap: 14px; }
.ev-row {
  display: grid; grid-template-columns: minmax(180px, 2fr) 150px 104px 80px minmax(120px, 1.4fr) auto;
  gap: 10px; align-items: end; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
@media (max-width: 980px) {
  .ev-row { grid-template-columns: 1fr 1fr; }
  .ev-row .fld--name, .ev-row .fld--place { grid-column: 1 / -1; }
  .ev-row .ev-del { justify-self: start; }
}
.fld { display: grid; gap: 4px; min-width: 0; }
.fld span { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.fld input { width: 100%; min-height: 40px; }
input[type="date"], input[type="time"] {
  background: var(--raise-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 10px; color-scheme: dark;
}
.ev-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ev-actions-right { display: flex; gap: 8px; }

.week-card { background: var(--raise); border-radius: var(--r-md); padding: 20px; }
.week-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.week-mins { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.week-mins b { font-weight: 900; font-stretch: 62%; font-size: 56px; line-height: .9; }
.meter { height: 8px; border-radius: 4px; background: var(--raise-2); overflow: hidden; margin: 12px 0 16px; }
.meter > i { display: block; height: 100%; background: var(--volt); border-radius: 4px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* chips de estado de sesión */
.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  padding: 4px 11px 4px 9px; font-size: 13px; font-weight: 700; border: 1px solid var(--line);
  background: transparent; color: var(--ink-2); cursor: default;
}
button.chip { cursor: pointer; }
.chip svg { width: 12px; height: 12px; flex: none; }
.chip--hecho { background: var(--volt); color: var(--on-volt); border-color: var(--volt); }
.chip--parcial { border-color: var(--volt); color: var(--ink); }
.chip--hoy { border-color: var(--ink); color: var(--ink); }
.chip--no_hecho { border-color: var(--bad); color: var(--ink); }
.chip--no_hecho svg { color: var(--bad); }
.chip--salteado { color: var(--ink-3); border-style: dashed; }

/* ---------- tarjetas de métricas ---------- */
.tile { background: var(--raise); border-radius: var(--r-md); padding: 18px 18px 16px; min-height: 140px; display: flex; flex-direction: column; }
.tile-label { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.tile-value { margin-top: auto; padding-top: 10px; font-weight: 900; font-stretch: 62%; font-size: 52px; line-height: .9; }
.tile-value small { font-size: 20px; font-stretch: 75%; font-weight: 800; color: var(--ink-2); margin-left: 4px; }
.tile-sub { color: var(--ink-3); font-size: 13px; margin-top: 6px; }
.tile select { margin-top: 2px; width: 100%; }
.tiles-edit .tile { outline: 1px dashed var(--ink-3); outline-offset: -1px; }

select, input[type="text"], input[type="password"], textarea {
  background: var(--raise-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 7px 10px; min-height: 36px;
}
textarea { width: 100%; resize: vertical; min-height: 64px; }

/* ---------- plan ---------- */
.week { border-top: 1px solid var(--line); padding: 20px 0; }
.week:first-of-type { border-top: 0; }
.week--current { position: relative; }
.week--current::before { content: ""; position: absolute; left: calc(-1 * var(--pad) + 4px); top: 22px; bottom: 22px; width: 4px; border-radius: 2px; background: var(--volt); }
@media (max-width: 760px) { .week--current::before { left: -10px; } }
.week-head { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: baseline; }
.week-title { font-weight: 900; font-stretch: 75%; font-size: 22px; text-transform: uppercase; }
.week-sessions { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 14px; }
@media (max-width: 860px) { .week-sessions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .week-sessions { grid-template-columns: 1fr; } }
.sess {
  background: var(--raise); border-radius: var(--r-md); padding: 14px; text-align: left;
  border: 1px solid transparent; display: flex; flex-direction: column; gap: 6px; min-height: 128px;
}
button.sess { cursor: pointer; }
button.sess:hover { border-color: var(--ink-3); }
.sess--opcional { background: transparent; border: 1px dashed var(--line); }
.sess--carrera { border-color: var(--volt); }
.phases { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.phase { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.phase:last-child { border-color: var(--volt); }
.sess--nota { background: transparent; border: 1px solid var(--line); min-height: 0; }
.sess--feriado .sess-title { color: var(--ink-2); }
.chip--fuerza { border-color: var(--z3); color: var(--ink); }
.chip--feriado { color: var(--ink-3); border-style: dashed; }
.sess-date { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.sess-title { font-weight: 800; font-size: 16px; line-height: 1.25; }
.sess-detail { color: var(--ink-3); font-size: 13px; line-height: 1.4; }
.sess-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------- tabla de sesiones ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th.num, td.num { text-align: right; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--raise); }
tbody tr.is-open td { background: var(--raise); }
td .name { font-weight: 700; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--raise-2); color: var(--ink-2); }
.tag--fondo { color: var(--volt); }

/* ---------- detalle ---------- */
.detail { margin-top: 18px; background: var(--raise); border-radius: var(--r-md); padding: 22px; }
.detail-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.detail-title { font-weight: 900; font-stretch: 75%; font-size: 30px; line-height: 1; text-transform: uppercase; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 18px 14px; margin: 22px 0 6px; }
.stat-v { font-weight: 900; font-stretch: 62%; font-size: 40px; line-height: .95; }
.stat-v small { font-size: 16px; font-stretch: 75%; color: var(--ink-2); margin-left: 3px; font-weight: 800; }
.stat-l { color: var(--ink-2); font-size: 13px; }
.label-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.label-form .custom { width: 160px; }

/* barra de zonas */
.zonebar { display: flex; gap: 2px; height: 14px; margin-top: 8px; }
.zonebar i { display: block; height: 100%; min-width: 0; }
.zonebar i:first-child { border-radius: 4px 0 0 4px; }
.zonebar i:last-child { border-radius: 0 4px 4px 0; }
.zonelegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.zonelegend span { display: inline-flex; align-items: center; gap: 6px; }
.zonelegend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.zonelegend b { color: var(--ink); font-weight: 700; }

/* ---------- gráficos ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart .ref line { stroke: var(--ink-3); stroke-dasharray: 4 4; }
.chart .ref text { fill: var(--ink-2); font-size: 11px; stroke: var(--raise); stroke-width: 4px; paint-order: stroke; stroke-linejoin: round; }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; }
.chart-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chart-legend { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.chart-legend i.box { height: 10px; width: 10px; }
.chart-legend i.outline { height: 10px; width: 10px; background: transparent !important; border: 1.5px solid var(--ink-2); }
.chart-empty { color: var(--ink-3); font-size: 14px; padding: 28px 0; }

.tip {
  position: fixed; z-index: 50; pointer-events: none;
  background: #ffffff; color: #000000; border-radius: 8px; padding: 8px 10px;
  font-size: 13px; line-height: 1.35; max-width: 240px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
}
.tip b { font-weight: 800; }
.tip .row { display: flex; justify-content: space-between; gap: 14px; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-box { width: 100%; max-width: 340px; }
.login .brand--big { font-size: 64px; margin-bottom: 8px; }
.login-tag {
  margin: 0 0 32px; font-weight: 800; font-stretch: 75%; font-style: italic;
  font-size: 18px; letter-spacing: 0.18em; line-height: 1; text-transform: uppercase; color: var(--ink-2);
}
.login-tag span { color: var(--volt); }
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 48px; }
.pw-toggle {
  position: absolute; top: 0; right: 0; height: 100%; width: 46px;
  display: grid; place-items: center; background: none; border: 0; cursor: pointer;
  color: var(--ink-2); border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.pw-toggle:hover { color: var(--ink); }
.pw-toggle svg { width: 20px; height: 20px; }
.pw-toggle .eye-closed, .pw-toggle[aria-pressed="true"] .eye-open { display: none; }
.pw-toggle[aria-pressed="true"] .eye-closed { display: block; }
.login form { display: grid; gap: 10px; }
.login label { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.login input { min-height: 44px; }
.login .btn { min-height: 44px; margin-top: 6px; }
.form-error { color: var(--bad); margin: 0; font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #000; padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; z-index: 60;
}

@media (prefers-reduced-motion: no-preference) {
  .meter > i { transition: width .6s ease-out; }
}
@media (max-width: 560px) {
  .sync-info { display: none; }
  .brand { font-size: 26px; }
  .tile-value { font-size: 44px; }
  .detail { padding: 16px; }
}

/* ---------- v2: detalle, carga, rendimiento, hábitos ---------- */
.ink { color: var(--ink); }
h4.group { margin: 22px 0 0; font-size: 13px; font-weight: 700; color: var(--ink-3); }
h4.group + .stats { margin-top: 10px; }
.panel--inset { background: var(--raise-2); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; }
.seg button { background: none; border: 0; border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: 13px; color: var(--ink-2); cursor: pointer; min-height: 30px; }
.seg button[aria-checked="true"] { background: var(--ink); color: #000; }
.map { height: 360px; border-radius: var(--r-sm); overflow: hidden; margin-top: 12px; background: #111; }
.map-legend { margin-top: 10px; align-items: center; }
.map-legend .ramp { width: 120px; height: 8px; border-radius: 4px; display: inline-block; }
.leaflet-container { font-family: var(--font); }
.rpe { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.rpe-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.rpe-btns button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--raise-2); color: var(--ink-2); font-weight: 800; cursor: pointer; }
.rpe-btns button:hover { border-color: var(--ink-3); color: var(--ink); }
.rpe-btns button[aria-checked="true"] { background: var(--volt); color: #000; border-color: var(--volt); }
td.splitbar { width: 28%; min-width: 80px; }
td.splitbar i { display: block; height: 8px; border-radius: 4px; background: var(--volt); }
table.compact td, table.compact th { padding: 7px 8px; }
.heat-wrap { overflow-x: auto; padding-bottom: 6px; }
.heat { display: flex; gap: 3px; align-items: flex-end; }
.heat { --cell: 14px; }
.heat-dows, .heat-col { display: grid; grid-template-rows: 16px repeat(7, var(--cell)); gap: 4px; }
.heat-dows span { font-size: 11px; color: var(--ink-3); line-height: var(--cell); padding-right: 6px; }
.heat-dows::before { content: ''; }
.heat-m { font-size: 10px; color: var(--ink-3); line-height: 16px; white-space: nowrap; }
.heat-c { width: var(--cell); height: var(--cell); border-radius: 4px; display: block; background: #1c1c1c; cursor: default; }
.heat-c.l1 { background: #3d4a12; } .heat-c.l2 { background: #6f8a1a; } .heat-c.l3 { background: #a6cc22; } .heat-c.l4 { background: #d6ff2e; }
.heat-c.plan { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.heat-c.today { box-shadow: inset 0 0 0 2px var(--ink); }
.heat-c.race { box-shadow: inset 0 0 0 2px var(--volt); }
.heat-legend .heat-c { width: 14px; height: 14px; }
.heat-legend { display: flex; align-items: center; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.shoe { margin-top: 14px; }
.shoe-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.shoe .meter { margin: 8px 0 0; }
@media (max-width: 560px) { .map { height: 280px; } }

/* ---------- Recuperación (Garmin) ---------- */
.ready { background: var(--raise); border-radius: var(--r-md); padding: 18px 20px; border-left: 4px solid var(--ink-3); }
.ready--ok { border-left-color: var(--volt); }
.ready--warn { border-left-color: var(--warn); }
.ready--bad { border-left-color: var(--bad); }
.ready-head { display: flex; align-items: flex-start; gap: 12px; }
.ready-head > div { flex: 1; min-width: 0; }
.ready-head h3 { margin: 0 0 2px; font-size: 22px; }
.ready-head .linklike { white-space: nowrap; }
.ready-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--ink-3); }
.ready--ok .ready-dot { background: var(--volt); box-shadow: 0 0 0 4px rgba(214, 255, 46, .15); }
.ready--warn .ready-dot { background: var(--warn); box-shadow: 0 0 0 4px rgba(245, 183, 0, .15); }
.ready--bad .ready-dot { background: var(--bad); box-shadow: 0 0 0 4px rgba(255, 90, 78, .15); }
.ready-advice { margin: 12px 0 0; font-size: 16px; color: var(--ink); }
.ready-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.ready-list li { position: relative; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.ready-list li::before { content: ''; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--volt); }
.ready-list li.p1::before { background: var(--warn); }
.ready-list li.p2::before { background: var(--bad); }
.howto { margin-top: 10px; }
.howto summary { cursor: pointer; color: var(--ink-2); font-size: 14px; }
.howto p { max-width: 80ch; margin: 8px 0 0; }
.phases { display: grid; gap: 8px; margin-top: 12px; }
.ph-row { display: grid; grid-template-columns: 88px 1fr 58px; align-items: center; gap: 10px; }
.ph-day { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.ph-bar { display: flex; height: 16px; border-radius: 4px; overflow: hidden; background: var(--raise-2); align-items: center; }
.ph-bar i { display: block; height: 100%; }
.ph-bar .dim { padding-left: 8px; }
.ph-deep { background: #4b6cff; } .ph-light { background: #8fa8ff; } .ph-rem { background: #c78bff; } .ph-awake { background: var(--ink-3); }
.ph-tot { font-size: 13px; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rd { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line, #333); }
.rd--ok { color: var(--volt); border-color: var(--volt); }
.rd--warn { color: var(--warn); border-color: var(--warn); }
.rd--bad { color: var(--bad); border-color: var(--bad); }
@media (max-width: 560px) { .ph-row { grid-template-columns: 70px 1fr 50px; } .ready-head h3 { font-size: 19px; } }

/* ---------- Lectura de Claude ---------- */
.coach { background: var(--raise-2); border-radius: var(--r-md); padding: 14px 16px; margin: 16px 0 6px; border-left: 3px solid var(--volt); }
.coach--off { border-left-color: var(--ink-3); }
.coach--compact { margin: 12px 0 16px; }
.coach-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.coach-tag { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--volt); }
.coach--off .coach-tag { color: var(--ink-3); }
.coach-text { margin: 8px 0 6px; font-size: 16px; line-height: 1.55; color: var(--ink); max-width: 80ch; }
.coach button:disabled { opacity: .6; cursor: wait; }

/* ---------- Siesta ---------- */
.nap { background: var(--raise); border-radius: var(--r-md); padding: 14px 18px; margin-top: 12px; display: grid; gap: 8px; }
.nap-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.nap-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nap-day { width: 44px; color: var(--ink-2); font-size: 14px; }
.nap-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.nap-btns .chip { cursor: pointer; }
.nap-btns .chip:disabled { opacity: .5; cursor: wait; }

/* ---------- Como app instalada en el celular ---------- */
@media (display-mode: standalone) {
  .top { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
  body { overscroll-behavior-y: none; }
}
