/* NYC27 · sistema visual
   Hermano de gymnyc: el mismo grafito, las mismas tarjetas y la misma navegación. Lo propio de NYC27
   es el metro de Nueva York (cada tipo de sesión es una línea, con su círculo de color), el skyline
   con el Verrazzano y el naranja de la línea F, que es el acento y el botón principal. */

:root {
  --bg: #14161b;
  --bg-2: #181b21;
  --surface: #1d2027;
  --surface-2: #252932;
  --surface-3: #313641;
  --line: rgba(237, 233, 225, 0.08);
  --line-2: rgba(237, 233, 225, 0.15);
  --text: #ede9e1;
  --muted: #a0a6b1;
  --dim: #6e747f;
  --accent: #ff6319; /* línea F */
  --accent-2: #ff8a4a;
  --accent-ink: #1f0b02;
  --ok: #7bd389;
  --warn: #e8892b;
  --bad: #ff6b6b;
  --body: #b79cff; /* lo que decide tu cuerpo: check-in y sensaciones */

  /* Líneas del metro */
  --m-orange: #ff6319;
  --m-gray: #a7a9ac;
  --m-yellow: #fccc0a;
  --m-teal: #00add0;
  --m-blue: #2a5bd7;
  --m-green: #6cbe45;
  --m-brown: #996633;
  --m-red: #ee352e;

  /* Tiempo */
  --wx-good: #6cbe45;
  --wx-fair: #fccc0a;
  --wx-poor: #ff8a3d;
  --wx-bad: #ee352e;
  --on-wx: #14100a;

  --sans: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --num: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", system-ui, sans-serif;
  --sign: "Helvetica Neue", Helvetica, Arial, sans-serif; /* letras de las líneas, como en el metro */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font: 15px/1.45 var(--sans);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 70% -180px, rgba(255, 120, 50, 0.13), transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.has-sheet { overflow: hidden; }
body::before { content: ""; position: fixed; z-index: 56; inset: 0 0 auto 0; height: var(--safe-t); background: rgba(20, 22, 27, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); pointer-events: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.ico { width: 22px; height: 22px; flex: none; }
.muted { color: var(--muted); }
.fine { color: var(--dim); font-size: 12.5px; line-height: 1.45; }
.fine b { color: var(--muted); }
.fine svg { vertical-align: -3px; }
.center { text-align: center; }
.big-num { font-family: var(--num); font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -0.02em; }
.ok-txt { color: var(--ok); }
.warn-txt { color: var(--warn); }
[hidden] { display: none !important; }

/* ── Disposición */
#app { position: relative; }
.view { position: relative; max-width: 580px; margin: 0 auto; padding: calc(18px + var(--safe-t)) 16px calc(104px + var(--safe-b)); display: grid; gap: 14px; align-content: start; }
.view > * { position: relative; z-index: 1; min-width: 0; }
.page-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 6px 2px 0; }
.page-h h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.page-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.section-h { font-size: 21px; font-weight: 800; letter-spacing: -0.025em; padding: 10px 2px 0; }
.eyebrow { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.loading { min-height: 100vh; display: grid; place-items: center; }
.loading .bullet { animation: pulse 1.2s ease-in-out infinite; }

/* ── Botones y piezas */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 14px; text-decoration: none; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; font-size: 14.5px;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 34px; padding: 0 12px; border-radius: 11px; font-size: 13px; }
.btn.big { min-height: 56px; width: 100%; border-radius: 16px; font-size: 16.5px; }
.btn.primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent) 60%, #e5530d);
  color: var(--accent-ink); border-color: rgba(0, 0, 0, 0.2); font-weight: 750;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.14), 0 10px 26px -12px rgba(255, 99, 25, 0.75);
}
.btn.file { position: relative; overflow: hidden; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; color: var(--muted); flex: none; text-decoration: none; }
.icon-btn:active { background: var(--surface-2); }
.icon-btn:disabled { opacity: 0.3; }
.link { color: var(--muted); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; justify-self: start; }
.link.center { justify-self: center; }
.link.danger { color: var(--bad); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 > * { min-width: 0; }
.row2.wide-first { grid-template-columns: 1.5fr 1fr; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 10px; border-radius: 99px;
  background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tag.line { padding-left: 3px; color: var(--text); }
.tag.ok { color: var(--ok); background: rgba(123, 211, 137, 0.1); }
.tag.warn { color: var(--warn); background: rgba(232, 137, 43, 0.12); }
.tag.bad { color: var(--bad); background: rgba(255, 107, 107, 0.12); }
.tag.body { color: var(--body); background: rgba(183, 156, 255, 0.12); }
.tag.dim { color: var(--dim); }
.tag .wxi { color: inherit; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.card h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card h3 small { color: var(--dim); font-weight: 500; font-size: 12.5px; }
.card h3 svg { color: var(--muted); }
.bar { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.avatar {
  position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 800; font-size: 18px; text-decoration: none;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35), transparent 45%), var(--accent); color: var(--accent-ink);
}
.sync-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg); background: var(--dim); }
.sync-dot.is-on { background: var(--ok); }
.sync-dot.is-dirty { background: var(--warn); }
.kmline { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kmline .big-num { font-size: 30px; line-height: 1; }
.kmline span { color: var(--muted); font-size: 13.5px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpis > div { background: var(--bg-2); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.kpis dt { color: var(--dim); font-size: 12px; font-weight: 650; }
.kpis dd { font-size: 22px; line-height: 1.15; margin-top: 2px; }
.kpis dd small { font-family: var(--sans); font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--muted); }
.kv b { color: var(--text); font-weight: 650; }
.notes { display: grid; gap: 7px; }
.notes li { display: flex; gap: 8px; font-size: 13px; color: var(--muted); align-items: flex-start; }
.notes li svg { width: 16px; height: 16px; margin-top: 1px; color: var(--accent); }
.notes li.is-warn svg { color: var(--warn); }
.notes li.is-body svg { color: var(--body); }
.menu { display: grid; gap: 6px; }
.menu-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 10px 10px 10px 8px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.menu-item b { display: block; font-size: 14.5px; font-weight: 650; }
.menu-item small { display: block; color: var(--dim); font-size: 12.5px; }
.menu-item > svg { color: var(--dim); }
.mi-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.lrows { display: grid; gap: 6px; }
.lrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--bg-2); }
.lrow > svg { color: var(--muted); }
.lrow-m { display: grid; gap: 1px; min-width: 0; }
.lrow-m b { font-size: 14px; font-weight: 650; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lrow-m small { color: var(--dim); font-size: 12.5px; }
.lrow.now { box-shadow: inset 0 0 0 1px rgba(42, 91, 215, 0.6); }
.lrow .dl { color: var(--dim); font-size: 12px; font-weight: 700; width: 30px; }
.lrow .num { font-family: var(--num); font-weight: 750; font-variant-numeric: tabular-nums; }
.mini-list { display: grid; gap: 4px; }
.mini-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list small { color: var(--dim); white-space: nowrap; }
.fold { display: grid; gap: 12px; }
.fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h3 { color: var(--text); }
.fold > summary > svg, .fold-r > svg { transition: transform 0.2s; color: var(--dim); }
.fold[open] > summary > svg, .fold[open] .fold-r > svg { transform: rotate(180deg); }
.fold-r { display: flex; align-items: center; gap: 8px; color: var(--dim); }

/* ── Líneas del metro: cada tipo de sesión es una línea */
.bullet {
  --b: 30px;
  width: var(--b); height: var(--b); border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; color: #fff; text-align: center;
  font: 700 calc(var(--b) * 0.56) / 1 var(--sign); letter-spacing: -0.03em;
  background: var(--m-orange);
}
.bullet > span { display: block; }
.bullet svg { width: 60%; height: 60%; }
.bullet-sm { --b: 22px; }
.bullet-lg { --b: 44px; }
.bullet-xl { --b: 64px; }
.bullet.is-diamond { border-radius: 4px; transform: rotate(45deg) scale(0.84); }
.bullet.is-diamond > span { transform: rotate(-45deg); }
.b-F, .b-M { background: var(--m-orange); }
.b-L { background: var(--m-gray); color: #15171b; }
.b-Q { background: var(--m-yellow); color: #111; }
.b-T { background: var(--m-teal); color: #04161b; }
.b-R { background: var(--m-red); font-size: calc(var(--b) * 0.42); }
.b-C { background: var(--m-blue); }
.b-Z { background: var(--m-brown); }
.b-G { background: var(--m-green); color: #0d1a07; }

/* ── Skyline */
.skyline { display: block; width: 100%; height: 100%; }
.skyline .ink { fill: rgba(237, 233, 225, 0.055); }
.skyline .cable { fill: none; stroke: rgba(237, 233, 225, 0.075); }
.skyline .sun { fill: var(--accent); opacity: 0.4; filter: drop-shadow(0 0 30px rgba(255, 99, 25, 0.6)); }

/* ── Hoy */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.hello h1 { font-size: 27px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.eyebrow-date { color: var(--muted); font-size: 13.5px; margin-bottom: 2px; display: flex; flex-wrap: wrap; gap: 2px 10px; }
.eyebrow-date .where { display: inline-flex; align-items: center; gap: 3px; color: var(--dim); }
.race-card {
  position: relative; overflow: hidden; display: grid; gap: 58px; padding: 14px 14px 12px; border-radius: 22px; cursor: pointer;
  background: linear-gradient(180deg, #262a35 0%, #1b1e25 100%); border: 1px solid var(--line-2);
}
.race-card > :not(svg) { position: relative; z-index: 1; }
.race-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7.8%; background: #2c313c; }
.rc-art { position: absolute; inset: auto 0 0 0; width: 100%; height: 100%; }
.rc-art .ink { fill: #2c313c; }
.rc-art .cable { stroke: rgba(255, 99, 25, 0.6); }
.rc-art .sun { opacity: 0.85; filter: drop-shadow(0 0 22px rgba(255, 99, 25, 0.55)); }
.rc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rc-week { display: grid; gap: 5px; }
.rc-week p { color: var(--muted); font-size: 12.5px; }
.rc-week b { color: var(--text); font-family: var(--num); }
.rc-week .bar { background: rgba(255, 255, 255, 0.1); }
.rs-main { display: flex; align-items: center; gap: 10px; }
.rs-main .bullet { --b: 36px; }
.rs-main .big-num { font-size: 34px; display: block; line-height: 1; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5); }
.rs-main span { color: var(--muted); font-size: 12px; }
.gym-chip { display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 99px; background: var(--surface-2); font-family: var(--num); font-weight: 750; }

.hero-card {
  position: relative; display: grid; gap: 12px; align-content: start; padding: 20px 18px 18px; border-radius: 26px; overflow: hidden;
  background: linear-gradient(165deg, #262a33 0%, var(--surface) 55%);
  border: 1px solid var(--line-2);
}
.hero-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--ln, var(--accent)); }
.ln-F, .ln-M { --ln: var(--m-orange); }
.ln-L { --ln: var(--m-gray); }
.ln-Q { --ln: var(--m-yellow); }
.ln-T { --ln: var(--m-teal); }
.ln-R { --ln: var(--m-red); }
.ln-C { --ln: var(--m-blue); }
.ln-Z, .hero-card.rest-day, .hero-card.soon { --ln: var(--surface-3); }
.ln-G { --ln: var(--m-green); }
.hero-card.done-card { --ln: var(--ok); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.hero-head > div { display: grid; gap: 4px; }
.hero-title { font-size: 30px; line-height: 1.04; font-weight: 820; letter-spacing: -0.035em; }
.hero-sub { color: var(--muted); font-size: 14px; }
.hero-amount { display: grid; justify-items: end; line-height: 1; }
.hero-amount .big-num { font-size: 40px; }
.hero-amount span { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 2px; }
.hero-cta { display: grid; gap: 8px; margin-top: -2px; }

.steps { display: grid; gap: 0; }
.step { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 12px; align-items: baseline; padding: 9px 0 9px 20px; border-bottom: 1px solid var(--line); position: relative; }
.step:last-child { border-bottom: 0; }
.step::before { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 3px; background: var(--surface-3); }
.step::after { content: ""; position: absolute; left: 0; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted); }
.step.k-main::after, .step.k-race::after { background: var(--ln, var(--accent)); border-color: var(--ln, var(--accent)); }
.step:first-child::before { top: 50%; }
.step:last-child::before { bottom: 50%; }
.st-t { font-weight: 650; font-size: 14px; min-width: 0; }
.st-t small { display: block; font-weight: 400; color: var(--dim); font-size: 12.5px; margin-top: 1px; }
.st-a { font-family: var(--num); font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-p { color: var(--accent-2); font-family: var(--num); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13.5px; min-width: 0; }
.st-p small { color: var(--dim); font-family: var(--sans); font-weight: 500; font-size: 11.5px; }
.steps.compact .step { padding-top: 7px; padding-bottom: 7px; }
.pace-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 13px; }
.pace-line .big-num { color: var(--accent-2); font-size: 20px; }
.pace-line small { color: var(--dim); margin-left: -6px; }

.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { display: grid; justify-items: center; gap: 3px; padding: 8px 0 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.day .dl { font-size: 11px; color: var(--dim); font-weight: 700; }
.day .dn { font-family: var(--num); font-size: 17px; font-weight: 750; }
.day .dm { height: 22px; display: grid; place-items: center; }
.day .dg { height: 14px; display: grid; place-items: center; }
.day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.day.past:not(.done) .dn { color: var(--dim); }
.day.missed .bullet { opacity: 0.35; }
.done-dot { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: #0e2412; }
.done-dot.lg { width: 30px; height: 30px; }
.rest-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); }
.g-dot { font: 800 9px/14px var(--sign); width: 14px; height: 14px; border-radius: 50%; text-align: center; font-style: normal; color: var(--m-green); box-shadow: inset 0 0 0 1.5px var(--m-green); }
.g-dot.is-done { background: var(--m-green); color: #0d1a07; }
.chips-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips-row::-webkit-scrollbar { display: none; }
.qchip { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.qchip.on { color: #8fa3ff; border-color: rgba(143, 163, 255, 0.4); }
.ask .seg { margin-top: 2px; }
.changes { padding: 0; gap: 0; }
.fold-h { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; text-align: left; }
.fold-h > span { display: grid; }
.fold-h b { font-size: 15px; font-weight: 700; }
.fold-h small { color: var(--dim); font-size: 12.5px; }
.fold-h > svg { color: var(--dim); transition: transform 0.2s; }
.fold-h[aria-expanded="true"] > svg { transform: rotate(180deg); }
.changes-b { display: grid; gap: 10px; padding: 0 16px 14px; }
.changes-list { display: grid; gap: 9px; }
.changes-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; font-size: 13.5px; color: var(--muted); align-items: start; }
.changes-list time { display: block; color: var(--dim); font-size: 11.5px; margin-top: 1px; font-variant-numeric: tabular-nums; }
.cl-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 800 12px/1 var(--sign); background: var(--surface-2); color: var(--muted); }
.cl-ico.is-warn { background: var(--m-yellow); color: #111; }
.cl-ico.is-bad { background: var(--m-red); color: #fff; }
.cl-ico.is-you { background: var(--m-green); color: #0d1a07; }
.cl-ico.is-trip { background: var(--m-blue); color: #fff; }
.cl-ico.is-body { background: rgba(183, 156, 255, 0.18); color: var(--body); }
.cl-ico.is-wx { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }

/* ── Plan */
.week-nav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.week-nav h2 { font-size: 23px; font-weight: 800; letter-spacing: -0.03em; }
.pdays { display: grid; gap: 8px; }
.pday { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.pday.today { border-color: rgba(255, 99, 25, 0.55); box-shadow: inset 0 0 0 1px rgba(255, 99, 25, 0.35); }
.pday.past { opacity: 0.78; }
.pday.off { background: repeating-linear-gradient(135deg, var(--surface) 0 10px, var(--bg-2) 10px 20px); }
.pd-side { display: grid; justify-items: center; align-content: start; gap: 1px; padding-top: 2px; }
.pd-side .dl { font-size: 11px; font-weight: 700; color: var(--dim); }
.pday.today .pd-side .dl { color: var(--accent); }
.pd-side .dn { font-family: var(--num); font-size: 22px; font-weight: 800; line-height: 1.05; }
.dwx { display: grid; justify-items: center; font-size: 11.5px; color: var(--muted); font-family: var(--num); font-weight: 700; margin-top: 3px; }
.pd-main { display: grid; gap: 6px; min-width: 0; }
.srow { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; padding: 4px 2px; border-radius: 12px; }
.srow:active { background: var(--surface-2); }
.srow-m { display: grid; gap: 1px; min-width: 0; }
.srow-m b { font-size: 15px; font-weight: 700; }
.srow-m small { color: var(--dim); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.srow-a { font-family: var(--num); font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.srow-a small { font-family: var(--sans); font-size: 11.5px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.srow.is-dropped .srow-m b, .srow.is-missed .srow-m b { text-decoration: line-through; color: var(--dim); }
.srow.is-dropped .bullet, .srow.is-missed .bullet, .srow.is-untracked .bullet { opacity: 0.4; }
.srow.is-rest .srow-m b { color: var(--muted); font-weight: 600; }
.srow.is-rest .bullet { opacity: 0.6; }
.srow.is-free .link { padding: 0 0 0 6px; font-size: 12px; }
.s-note { font-size: 12.5px; color: var(--dim); padding-left: 42px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.s-note.is-body { color: var(--body); }
.s-note.is-warn { color: var(--warn); align-items: flex-start; flex-wrap: nowrap; }
.s-note.is-warn svg { margin-top: 2px; }
.s-note > span { min-width: 0; }
.s-note .link { padding: 0; font-size: 12.5px; }
.g-line { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 2px 2px 0 4px; color: var(--muted); }
.g-line .bullet { --b: 22px; }
.g-line small { color: var(--dim); }
.g-line > svg { color: var(--ok); width: 15px; height: 15px; }
.g-line.is-done span { color: var(--text); }

.chart-wrap { position: relative; }
.plan-chart { width: 100%; height: clamp(170px, 30vw, 240px); display: block; }
.plan-chart rect.target { cursor: pointer; }
.chart-y span { position: absolute; left: 4px; transform: translateY(-115%); font-size: 11px; font-weight: 700; color: var(--dim); pointer-events: none; }
.plan-chart .band-alt { fill: rgba(255, 255, 255, 0.025); }
.plan-chart .grid { stroke: var(--line); stroke-width: 1; }
.ph-base { fill: #5f6675; background: #5f6675; }
.ph-pre { fill: #a46a3c; background: #a46a3c; }
.ph-especifico { fill: var(--accent); background: var(--accent); }
.ph-taper { fill: var(--m-green); background: var(--m-green); }
.plan-chart .target.is-light { opacity: 0.45; }
.plan-chart .actual { fill: var(--text); }
.plan-chart .actual.act-fair { fill: var(--m-yellow); }
.plan-chart .actual.act-poor { fill: var(--m-red); }
.plan-chart .mark { fill: var(--m-teal); }
.plan-chart .now { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 4 3; }
.plan-chart .race { fill: var(--m-red); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 12.5px; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sw-actual { background: var(--text); }
.sw-accent { background: var(--accent); }
.sw-line { width: 16px; height: 2px; background: var(--text); border-radius: 1px; }
.cp { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.cp:first-of-type { border-top: 0; padding-top: 0; }
.cp > div { display: grid; gap: 4px; justify-items: start; }
.cp-title { font-weight: 700; }
.cp-title small { color: var(--dim); font-weight: 500; margin-left: 4px; }
.checklist { display: grid; }
.checklist label { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.checklist li:first-child label { border-top: 0; }
.checklist input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.checklist input:checked + span { color: var(--dim); text-decoration: line-through; }
.lines-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; }
.lines-legend > span { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.weeks { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.weeks th { text-align: left; font-weight: 700; color: var(--dim); font-size: 12px; padding: 8px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--surface); }
.weeks td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.weeks tbody tr { cursor: pointer; }
.weeks .num { text-align: right; font-family: var(--num); font-variant-numeric: tabular-nums; font-weight: 650; }
.weeks small { color: var(--dim); }
.weeks tr.is-current td { background: rgba(255, 99, 25, 0.1); }
.weeks tr.is-current td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.weeks tr.is-cutback td { color: var(--muted); }
.weeks .ph { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* ── Progreso */
.bento { display: grid; gap: 14px; }
.bento > * { min-width: 0; }
.predict-time { font-size: clamp(56px, 17vw, 84px); line-height: 0.95; }
.predict-time.is-under { color: var(--ok); }
.predict-bar { position: relative; height: 8px; background: var(--surface-3); border-radius: 4px; margin: 26px 4px 24px; }
.predict-bar span { position: absolute; top: -6px; bottom: -6px; width: 3px; border-radius: 2px; background: var(--muted); }
.predict-bar span b { position: absolute; top: 24px; transform: translateX(-50%); font-size: 11px; color: var(--dim); white-space: nowrap; font-weight: 650; }
.predict-bar span.is-goal { background: var(--accent); }
.predict-bar span.is-goal b { transform: translateX(calc(-100% + 3px)); color: var(--accent-2); }
.predict-bar span.is-me { width: 18px; height: 18px; top: -5px; margin-left: -9px; border-radius: 50%; background: var(--text); border: 4px solid var(--surface); box-shadow: 0 0 0 2px var(--text); }
.predict-bar span.is-me b { top: -24px; color: var(--text); }
.course { padding: 30px 8px 34px; }
.course-track { position: relative; height: 8px; border-radius: 4px; background: var(--surface-3); }
.course-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; }
.stop { position: absolute; top: 50%; }
.stop i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line-2); }
.stop.is-passed i { border-color: var(--accent); background: var(--text); }
.stop b { position: absolute; white-space: nowrap; font-size: 11px; font-weight: 700; color: var(--dim); }
.stop.is-passed b { color: var(--muted); }
.stop.lab-t b { bottom: 14px; }
.stop.lab-b b { top: 13px; }
.stop.al-center b { transform: translateX(-50%); }
.stop.al-start b { left: -6px; }
.stop.al-end b { right: -6px; }
.course-me { position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 2; }
.course-me .bullet { box-shadow: 0 0 0 3px var(--surface), 0 4px 14px rgba(255, 99, 25, 0.6); font-size: 10px; }
.gauge { margin: 4px 0 0; }
.gauge-track { position: relative; height: 10px; border-radius: 5px; background: var(--surface-3); }
.gauge-safe { position: absolute; top: 0; bottom: 0; background: rgba(123, 211, 137, 0.3); border-radius: 5px; }
.gauge-mark { position: absolute; top: -5px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--text); border: 4px solid var(--surface); box-shadow: 0 0 0 2px var(--text); }
.gauge.is-good .gauge-mark { background: var(--ok); box-shadow: 0 0 0 2px var(--ok); }
.gauge.is-warn .gauge-mark { background: var(--m-yellow); box-shadow: 0 0 0 2px var(--m-yellow); }
.gauge.is-bad .gauge-mark { background: var(--m-red); box-shadow: 0 0 0 2px var(--m-red); }
.gauge-scale { position: relative; height: 18px; margin-top: 6px; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.gauge-scale span { position: absolute; transform: translateX(-50%); }
.gauge-scale span:first-child { transform: none; }
.gauge-scale span:last-child { transform: translateX(-100%); }
.load-chart { width: 100%; height: clamp(110px, 18vw, 160px); display: block; }
.load-chart .bar { fill: var(--accent); opacity: 0.85; }
.load-chart .bar.is-now { opacity: 0.45; }
.load-chart .ctl { fill: none; stroke: var(--text); stroke-width: 2; }
.load-chart .grid { stroke: var(--line-2); stroke-width: 1; }
.load-x { display: grid; font-size: 11px; font-weight: 700; color: var(--dim); text-align: center; font-variant-numeric: tabular-nums; }
.timetable { width: 100%; border-collapse: collapse; }
.timetable td { padding: 9px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.timetable tr:first-child td { border-top: 0; }
.timetable td:first-child { width: 42px; }
.timetable .tt-name { font-weight: 700; font-size: 14px; }
.timetable .tt-name small { display: block; font-weight: 400; color: var(--dim); font-size: 12.5px; }
.timetable .tt-pace { text-align: right; font-size: 20px; white-space: nowrap; }
.timetable .tt-pace small { font-family: var(--sans); font-size: 12px; color: var(--dim); font-weight: 600; }
.calc-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.calc-out div { background: var(--bg-2); border-radius: 14px; padding: 10px 12px; }
.calc-out dt { font-size: 12px; color: var(--dim); font-weight: 650; }
.calc-out dd { font-size: 24px; line-height: 1.1; margin-top: 2px; }

.pv-wrap { display: grid; gap: 4px; }
.pv-chart { width: 100%; height: 170px; display: block; overflow: visible; }
.pv-plan { fill: var(--surface-3); }
.pv-plan.is-light { fill: #2a2f39; }
.pv-plan.is-now { fill: #3d4350; }
.pv-real { fill: var(--accent); }
.pv-real.fair { fill: var(--m-yellow); }
.pv-real.poor { fill: var(--m-red); }
.pv-val { fill: var(--muted); font: 700 9px var(--num); }
.pv-x { display: grid; text-align: center; font: 700 10.5px var(--num); color: var(--dim); }
.pv-x .is-now { color: var(--accent); }
.sw-plan { background: var(--surface-3); }
.sw-fair { background: var(--m-yellow); }
.sw-poor { background: var(--m-red); }
.hs { display: flex; gap: 14px; align-items: center; }
.hs b { display: block; font-size: 16px; }
.hs small { color: var(--muted); font-size: 13px; }
.hs-dots { display: flex; gap: 5px; }
.hs-dot { width: 12px; height: 26px; border-radius: 4px; background: var(--surface-3); }
.hs-dot.on { background: var(--body); }
.hs-dot.warn { background: var(--warn); }
.rg-list { display: grid; gap: 6px; }
.rg-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--bg-2); font-size: 13px; }
.rg-list li.is-now { box-shadow: inset 0 0 0 1px rgba(255, 99, 25, 0.5); }
.rg-w { color: var(--dim); font-weight: 700; font-size: 12px; }
.rg-run b { font-family: var(--num); font-size: 15px; }
.rg-run small, .rg-gym small { display: block; color: var(--dim); font-size: 11.5px; }
.rg-gym i { font-style: normal; font-weight: 650; margin-right: 6px; }
.rg-legs { color: var(--warn); }
.rg-upper { color: var(--m-green); }
.rg-none { color: var(--dim); }
.rg-conf { font-size: 12px; font-weight: 650; }
.rg-conf.ok { color: var(--ok); }
.rg-conf.warn { color: var(--warn); }
@media (min-width: 980px) { .bento > .wide { grid-column: 1 / -1; } }

/* ── Ajustes y viajes */
.who { display: flex; gap: 12px; align-items: center; }
.who div { display: grid; }
.who small { color: var(--dim); font-size: 12.5px; }
.gym-card .row2 { margin-top: 2px; }
.passes { display: grid; gap: 8px; }
.pass { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 14px 10px 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--m-blue); }
.pass.now { box-shadow: inset 0 0 0 1px rgba(42, 91, 215, 0.6); }
.pass.past { opacity: 0.6; }
.pass-main { display: grid; gap: 6px; }
.pass-route { display: flex; align-items: center; gap: 10px; }
.pass-route b { font-family: var(--num); font-size: 26px; font-weight: 800; letter-spacing: 0.02em; }
.pass-route svg { color: var(--dim); }
.pass-city { font-weight: 650; display: flex; gap: 8px; align-items: center; }
.empty-card { justify-items: center; text-align: center; padding: 24px 16px; }
.geo-list { display: grid; gap: 6px; }
.geo-opt { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.geo-opt span { display: grid; }
.geo-opt small { color: var(--dim); font-size: 12.5px; }
.geo-opt.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* ── Campos */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span:first-child { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.field > span:first-child svg { color: var(--dim); }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); width: 100%; min-width: 0;
}
textarea { padding: 10px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input[type="date"] { color-scheme: dark; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row input { flex: 1; }
.unit-in { display: flex; align-items: center; gap: 6px; }
.unit-in input { text-align: right; font-family: var(--num); font-weight: 700; font-size: 18px; }
.unit-in i { color: var(--dim); font-style: normal; }
.out-pace { min-height: 44px; display: flex; align-items: center; gap: 4px; font-family: var(--num); font-weight: 800; font-size: 20px; }
.out-pace small { font-family: var(--sans); font-size: 12px; color: var(--dim); font-weight: 600; }
.time-inputs { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 6px; align-items: center; }
.time-inputs input { text-align: center; font-family: var(--num); font-weight: 700; font-size: 18px; }
.time-inputs b { color: var(--dim); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts.center-row { justify-content: center; }
.opt { position: relative; display: inline-flex; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.opt > span { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 13.5px; font-weight: 600; transition: background 0.15s, color 0.15s; }
.opt > span small { color: var(--dim); font-weight: 500; font-size: 12px; }
.opt input:checked + span { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.opt input:checked + span small { color: rgba(31, 11, 2, 0.7); }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.opts.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.opt-card > span { display: grid; gap: 2px; justify-items: start; border-radius: 16px; padding: 12px 14px; min-height: 0; width: 100%; }
.opt-card b { font-size: 16px; }
.opt-card .big-num { font-size: 28px; color: var(--text); }
.opt-card input:checked + span .big-num, .opt-card input:checked + span b { color: var(--accent-ink); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale.is-10 { grid-template-columns: repeat(10, 1fr); gap: 4px; }
.scale .opt > span { width: 100%; justify-content: center; padding: 0 4px; border-radius: 12px; font-family: var(--num); font-weight: 750; font-size: 14px; }
.scale.is-10 .opt > span { min-height: 40px; border-radius: 10px; }
.scale-ends { display: flex; justify-content: space-between; color: var(--dim); font-size: 11.5px; margin-top: 4px; }
.opts.feel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.opts.feel .opt > span { width: 100%; justify-content: center; padding: 0 4px; border-radius: 12px; font-size: 12.5px; text-align: center; line-height: 1.15; }
.seg { display: inline-flex; gap: 3px; padding: 3px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.seg.wide { display: flex; }
.seg > button, .seg-opt > span { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 13.5px; transition: background 0.18s, color 0.18s; }
.seg > button.on, .seg-opt input:checked + span { background: var(--accent); color: var(--accent-ink); }
.seg-opt { flex: 1; display: flex; position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; cursor: pointer; font-weight: 600; font-size: 14px; }
.switch-row span small { display: block; color: var(--dim); font-weight: 400; font-size: 12.5px; }
.switch { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; cursor: pointer; transition: background 0.2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); transition: transform 0.2s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }
.pain-levels { display: grid; gap: 6px; }
.pain-level { display: grid; grid-template-columns: 80px minmax(0, 1fr) 46px; gap: 10px; align-items: center; font-size: 13.5px; }
.pain-level input { accent-color: var(--warn); width: 100%; }
.pain-level output { font-family: var(--num); font-weight: 750; text-align: right; }
.gpx-drop { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line-2); background: var(--bg-2); cursor: pointer; color: var(--muted); }
.gpx-drop span { display: grid; }
.gpx-drop b { color: var(--text); font-size: 14px; }
.gpx-drop small { color: var(--dim); font-size: 12.5px; }
.stepper { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; gap: 10px; align-items: center; }
.stepper .icon-btn { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); color: var(--text); font-size: 26px; }
.stepper input { min-height: 72px; text-align: center; font-family: var(--num); font-weight: 800; font-size: 44px; border-radius: 18px; }

.picks { display: grid; gap: 6px; }
.pick { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); cursor: pointer; }
.pick input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.pick b { display: block; font-size: 14px; font-weight: 650; }
.pick small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.pick:has(input:not(:checked)) b { color: var(--dim); text-decoration: line-through; }

/* ── Hojas inferiores */
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(8, 9, 12, 0.6); animation: fade 0.22s; }
.sheet {
  position: fixed; z-index: 71; left: 0; right: 0; bottom: 0; margin: 0 auto; width: 100%; max-width: 640px; max-height: min(92vh, calc(100vh - var(--safe-t) - 12px));
  display: grid; grid-template-rows: auto auto 1fr; border-radius: 26px 26px 0 0; background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0;
  animation: up 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, 0.7);
}
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 8px auto 0; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 6px 20px; }
.sheet-t { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sheet-h h2 { font-size: 20px; font-weight: 780; line-height: 1.2; letter-spacing: -0.02em; }
.sheet-sub { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.sheet-b { overflow-y: auto; padding: 6px 20px calc(24px + var(--safe-b)); display: block; overscroll-behavior: contain; }
.sheet-b > * + * { margin-top: 14px; }
.sheet-b > h3 { font-size: 13.5px; color: var(--muted); font-weight: 700; margin-top: 18px; }
.sheet-cta { display: grid; gap: 8px; }
.sd-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sd-figs div { background: var(--bg-2); border-radius: 14px; padding: 10px 12px; display: grid; gap: 1px; min-width: 0; }
.sd-figs b { font-size: 22px; line-height: 1.15; white-space: nowrap; }
.sd-figs b.sm { font-size: 16.5px; line-height: 1.6; }
.sd-figs small { color: var(--dim); font-size: 11.5px; font-weight: 650; }
.purpose { color: var(--muted); font-size: 13.5px; border-left: 3px solid var(--accent); padding-left: 10px; }
.ctx-line { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(108, 190, 69, 0.08); border: 1px solid rgba(108, 190, 69, 0.25); font-size: 13.5px; color: var(--muted); }
.expect { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); padding: 9px 12px; border-radius: 12px; background: rgba(183, 156, 255, 0.08); border: 1px solid rgba(183, 156, 255, 0.2); }
.expect svg { color: var(--body); margin-top: 1px; }
.expect b { color: var(--text); font-weight: 650; }
.verdict { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; }
.verdict small { display: block; color: var(--dim); font-weight: 400; margin-top: 2px; }
.verdict.is-right { border-color: rgba(123, 211, 137, 0.4); } .verdict.is-right svg { color: var(--ok); }
.verdict.is-hard { border-color: rgba(232, 137, 43, 0.5); } .verdict.is-hard svg { color: var(--warn); }
.verdict.is-easy { border-color: rgba(143, 163, 255, 0.5); } .verdict.is-easy svg { color: #8fa3ff; }
.opts.feel.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opts.feel.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-line.is-legs .bullet { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--warn); }
.decision { font-size: 16px; font-weight: 650; line-height: 1.35; }
.ready { display: flex; gap: 14px; align-items: center; }
.ready b { font-size: 16px; }
.ring { flex: none; }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; }
.ring.is-good .ring-fg { stroke: var(--ok); }
.ring.is-low .ring-fg { stroke: var(--warn); }
.ring text { fill: var(--text); font: 800 18px var(--num); }
.result-hero { display: flex; gap: 14px; align-items: center; }
.result-hero .big-num { font-size: 34px; line-height: 1; }
.move-days { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mday { position: relative; display: grid; gap: 2px; text-align: left; padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.mday:disabled { opacity: 0.45; }
.mday b { font-size: 14px; padding-right: 44px; }
.mday b .fine { display: block; font-weight: 500; }
.mday small { color: var(--dim); font-size: 12px; }
.mday.warn { border-color: rgba(232, 137, 43, 0.4); }
.mday.cur { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mwx { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 2px; font-family: var(--num); font-weight: 700; font-size: 12.5px; color: var(--muted); }
.ribbon { display: flex; flex-wrap: wrap; gap: 10px; }
.rib-group { display: flex; gap: 3px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.rib-group::-webkit-scrollbar { display: none; }
.rib-cell { display: grid; justify-items: center; gap: 2px; min-width: 42px; padding: 6px 4px; border-radius: 10px; color: var(--on-wx); }
.rib-cell .wxi { color: var(--on-wx); opacity: 0.8; }
.rib-t { font: 700 15px/1 var(--num); font-variant-numeric: tabular-nums; }
.rib-h { font-size: 11px; font-weight: 700; opacity: 0.7; font-variant-numeric: tabular-nums; }
.rib-cell.is-picked { box-shadow: inset 0 0 0 3px var(--text); }
.wx-good { background: var(--wx-good); }
.wx-fair { background: var(--wx-fair); }
.wx-poor { background: var(--wx-poor); }
.wx-bad { background: var(--wx-bad); }
.wx-blocked { background: repeating-linear-gradient(135deg, var(--wx-bad) 0 6px, #8c1f1a 6px 12px); color: #fff; }
.wx-blocked .wxi { color: #fff; }
.slot-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 12.5px; }
.slot-facts span { display: inline-flex; align-items: center; gap: 4px; }
.wxi { display: inline-grid; place-items: center; color: var(--muted); }
.wxi-clear { color: #ffb36b; }
.wxi-clear.is-night { color: var(--muted); }
.wxi-rain, .wxi-drizzle { color: #8fb4ff; }
.wxi-storm { color: var(--m-yellow); }
.wxi-snow { color: #e8f1ff; }

/* ── Avisos */
#toast {
  position: fixed; z-index: 95; left: 50%; top: calc(14px + var(--safe-t)); transform: translate(-50%, -160%);
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(520px, calc(100% - 24px)); padding: 11px 12px 11px 16px; border-radius: 14px;
  background: #f1ede5; color: #17181c; font-weight: 600; font-size: 14px;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.7); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#toast.on { transform: translate(-50%, 0); }
.toast-undo { flex: none; padding: 6px 10px; border-radius: 10px; background: #17181c; color: #f1ede5; font-weight: 700; font-size: 13px; }
.banner { position: fixed; z-index: 96; left: 12px; right: 12px; top: calc(12px + var(--safe-t)); display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--warn); }
.banner .btn { min-height: 38px; }

/* ── Navegación */
.tabbar {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + var(--safe-b)); background: rgba(20, 22, 27, 0.86); border-top: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 6px 0 4px; text-decoration: none; color: var(--dim); font-size: 11px; font-weight: 650; }
.tabbar a.on { color: var(--accent); }
.tabbar a.on::before { content: ""; position: absolute; top: -6px; width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }

/* ── Bienvenida y alta */
.login { min-height: 100vh; display: grid; justify-items: center; align-content: start; position: relative; overflow: hidden; padding: calc(28px + var(--safe-t)) 18px calc(28px + var(--safe-b)); }
.login-sky { position: absolute; left: 0; right: 0; top: 0; height: 36vh; min-height: 220px; pointer-events: none; border-bottom: 1px solid var(--line); }
.login-sky .ink { fill: #262a33; }
.login-sky .cable { stroke: rgba(255, 99, 25, 0.6); }
.login-sky .sun { opacity: 0.85; filter: drop-shadow(0 0 30px rgba(255, 99, 25, 0.55)); }
.login-inner { position: relative; width: 100%; max-width: 420px; display: grid; gap: 16px; padding-top: max(calc(36vh - 4px), 196px); }
.wordmark { font-size: 64px; line-height: 0.95; font-weight: 300; letter-spacing: -0.055em; }
.wordmark b { font-weight: 850; color: var(--accent); }
.wordmark.sm { font-size: 24px; letter-spacing: -0.04em; }
.lede { color: var(--muted); font-size: 16px; max-width: 32ch; }
.login-form { margin-top: 6px; }
.err { color: var(--bad); font-size: 13.5px; }
.countdown { display: flex; align-items: center; gap: 12px; }
.countdown .big-num { font-size: 52px; line-height: 1; color: var(--text); }
.countdown span { color: var(--muted); font-size: 13.5px; max-width: 22ch; }
.seed-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.seed-note svg { color: var(--accent); margin-top: 2px; }
.features { display: grid; gap: 10px; margin-top: 8px; }
.feature { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.feature b { font-size: 14.5px; }
.install-hint { display: flex; gap: 8px; }
.wizard { max-width: 620px; }
.wiz-top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.wiz-line { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); padding-top: 4px; }
.wiz-line::before { content: ""; position: absolute; left: 10%; right: 10%; top: 15px; height: 4px; border-radius: 2px; background: var(--surface-3); }
.wiz-line .fill { position: absolute; left: 10%; top: 15px; height: 4px; border-radius: 2px; background: var(--accent); transition: width 0.3s; }
.wiz-stop { position: relative; display: grid; justify-items: center; gap: 4px; font-size: 11.5px; color: var(--dim); font-weight: 650; }
.wiz-stop i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--sign); font-style: normal; background: var(--surface-2); border: 2px solid var(--surface-3); color: var(--muted); }
.wiz-stop.is-done i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wiz-stop.is-now i { background: var(--text); border-color: var(--accent); color: var(--bg); }
.wiz-stop.is-now { color: var(--text); }
.wiz-q { font-size: 30px; font-weight: 820; letter-spacing: -0.035em; line-height: 1.08; }
.wiz-q em { font-style: normal; color: var(--accent); }
.wiz-lead { color: var(--muted); }
.wiz-nav { display: flex; justify-content: space-between; gap: 10px; }
.wiz-nav .btn.primary { margin-left: auto; min-width: 150px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.summary-grid div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.summary-grid dt { color: var(--dim); font-size: 12px; font-weight: 650; }
.summary-grid dd { font-family: var(--num); font-weight: 800; font-size: 24px; }
.phases { display: flex; gap: 3px; height: 10px; }
.phases span { border-radius: 3px; }

/* ── Escritorio */
@media (min-width: 980px) {
  body { padding-left: 92px; }
  body.is-welcome { padding-left: 0; }
  .tabbar { top: 0; right: auto; width: 92px; grid-template-columns: 1fr; grid-auto-rows: 72px; align-content: center; gap: 6px;
    padding: 20px 8px; border-top: 0; border-right: 1px solid var(--line); }
  .tabbar a { align-content: center; }
  .tabbar a.on::before { top: 50%; left: -8px; width: 3px; height: 26px; transform: translateY(-50%); border-radius: 0 3px 3px 0; }
  .view { max-width: 760px; padding: 28px 24px 60px; }
  .view.progress { max-width: 1040px; }
  .bento { grid-template-columns: 1fr 1fr; align-items: start; }
  .sheet { bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 26px; border-bottom: 1px solid var(--line-2); animation: fade 0.25s; max-height: 88vh; }
  .sheet.wide { max-width: 720px; }
  .grab { display: none; }
  .sheet-h { padding-top: 16px; }
  .chips-row { margin: 0; padding: 0; flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .hero-title { font-size: 26px; }
  .hero-amount .big-num { font-size: 34px; }
  .race-card { gap: 46px; }
  .rs-main .big-num { font-size: 28px; }
  .scale.is-10 { grid-template-columns: repeat(5, 1fr); }
  .step { grid-template-columns: minmax(0, 1fr) auto; }
  .st-p { grid-column: 1 / -1; }
  .kpis dd { font-size: 19px; }
  .move-days { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hide-s { display: none; }
}

/* ── Movimiento */
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.9); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
