/* ============================================================
   WS-B — Entreno en vivo v2 (overhaul 2026-07-14)
   Complementa el bloque "LIVE GUIDED WORKOUT" de app.css
   (.ex-hero, .set-dots, .logset, .rest-overlay, .finish-hero…).
   Solo tokens del design system — theme-aware gratis.
   ============================================================ */

/* ---------- picker polish ---------- */
.day-pick-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dp-ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}

/* ---------- hero: imagen del ejercicio (crossfade 2 frames) ---------- */
.ex-hero .eh-img {
  position: relative; height: 168px; margin: -8px -6px 10px;
  border-radius: var(--r); overflow: hidden; background: #fff;
}
.ex-hero .eh-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: center;
}
.ex-hero .eh-img img.f2 { opacity: 0; animation: eh-frames 1.7s steps(1) infinite; }
@keyframes eh-frames { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }

.ex-hero .eh-name { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.eh-info {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; color: var(--text-3); vertical-align: middle;
}
.eh-info:active { transform: scale(.92); color: var(--accent); }

/* ---------- ghost values (columna PREVIOUS estilo Hevy) ---------- */
.ghost-chips { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ghost-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  padding: 7px 13px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
  background: var(--card-2); color: var(--text-2); box-shadow: var(--shadow-sm);
  transition: transform .1s var(--ease);
}
.ghost-chip:active { transform: scale(.95); }
.ghost-chip.obj { background: var(--accent-soft); color: var(--accent); }

/* ---------- logset 3 campos: kg + reps arriba, RIR abajo ---------- */
.logset.three { grid-template-columns: 1fr 1fr; }
.logset.three .ls-field:nth-child(3) { grid-column: 1 / -1; }
.logset.three .ls-field:nth-child(3) .stepper-num { max-width: 240px; margin: 0 auto; }
.ls-tool {
  display: inline-grid; place-items: center; width: 26px; height: 26px;
  margin: -6px 0 -8px 2px; border-radius: 8px; vertical-align: middle;
  background: var(--accent-soft); color: var(--accent);
}
.ls-tool:active { transform: scale(.9); }

/* ---------- acciones de registro (tipo + registrar) ---------- */
.log-actions { display: flex; gap: 10px; margin-top: 14px; align-items: stretch; }
.log-actions .log-go { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.tipo-chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px;
  padding: 0 14px; border-radius: var(--r); font-size: 13px; font-weight: 700;
  background: var(--card); box-shadow: var(--shadow-sm); color: var(--text-2);
}
.tipo-chip:active { transform: scale(.96); }
.tipo-chip .tc-letra {
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  border-radius: 7px; font-size: 12px; font-weight: 800;
  background: var(--card-2); color: var(--text-2);
}
.tipo-chip.t-c .tc-letra { background: rgba(255,159,10,.16); color: var(--orange); }
.tipo-chip.t-d .tc-letra { background: var(--accent-soft); color: var(--accent); }
.tipo-chip.t-f .tc-letra { background: rgba(255,69,58,.14); color: var(--red); }

/* tipos en set-dots (hero) y chips (lista) */
.set-dot.done.t-c { background: var(--orange); border-color: var(--orange); }
.set-dot.done.t-d { background: var(--accent); border-color: var(--accent); }
.set-dot.done.t-f { background: var(--red); border-color: var(--red); }
.set-dot.current.t-c { border-color: var(--orange); color: var(--orange); box-shadow: 0 0 0 4px rgba(255,159,10,.16); }
.set-dot.current.t-d { border-color: var(--accent); color: var(--accent); }
.set-dot.current.t-f { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 4px rgba(255,69,58,.14); }
.set-chip .sc-t { font-weight: 800; }
.set-chip .sc-t.t-c { color: var(--orange); }
.set-chip .sc-t.t-d { color: var(--accent); }
.set-chip .sc-t.t-f { color: var(--red); }

/* ---------- menú de tipo de serie ---------- */
.tipo-menu { display: grid; gap: 8px; }
.tipo-opt {
  display: flex; align-items: center; gap: 12px; min-height: 52px;
  padding: 10px 14px; border-radius: var(--r); background: var(--card-2);
  font-size: 15px; font-weight: 600; text-align: left;
}
.tipo-opt .to-letra {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 9px; font-weight: 800; background: var(--hair); color: var(--text-2);
}
.tipo-opt.t-c .to-letra { background: rgba(255,159,10,.16); color: var(--orange); }
.tipo-opt.t-d .to-letra { background: var(--accent-soft); color: var(--accent); }
.tipo-opt.t-f .to-letra { background: rgba(255,69,58,.14); color: var(--red); }
.tipo-opt .to-label { flex: 1; }
.tipo-opt.sel { outline: 2px solid var(--accent); color: var(--accent); }
.tipo-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; line-height: 1.4; }

/* ---------- progreso global: segmento saltado ---------- */
.tp-seg.skip { background: var(--hair); opacity: .5; }

/* ---------- lista: menú ⋯, nota, saltado, agregar ---------- */
.exm-btn {
  flex: none; width: 44px; height: 44px; margin: -8px -8px -8px 0;
  display: grid; place-items: center; border-radius: 50%; color: var(--text-3);
}
.exm-btn:active { transform: scale(.9); color: var(--accent); }
.ex-nota { font-size: 12px; color: var(--text-3); margin-top: 3px; font-style: italic; }
.ex-card.skipped { opacity: .55; }
.ex-card.skipped .ex-name { text-decoration: line-through; }
.ex-num.skip { color: var(--text-3); }
.add-ex-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; border-radius: var(--r); border: 1.5px dashed var(--hair-strong);
  color: var(--accent); font-weight: 600; font-size: 15px;
}
.add-ex-btn:active { transform: scale(.98); background: var(--accent-soft); }

.exm-menu { display: grid; gap: 6px; }
.exm-row {
  display: flex; align-items: center; gap: 12px; min-height: 50px;
  padding: 10px 14px; border-radius: var(--r-sm); background: var(--card-2);
  font-size: 15px; font-weight: 600; text-align: left;
}
.exm-row:active { background: var(--accent-soft); }
.exm-row.danger { color: var(--red); }
.exm-row .exm-ico { flex: none; display: grid; place-items: center; width: 28px; color: var(--text-2); }
.exm-row.danger .exm-ico { color: var(--red); }

/* ---------- nota / picker fallback ---------- */
.ns-txt {
  width: 100%; border: 1px solid var(--hair-strong); border-radius: var(--r-sm);
  background: var(--card-2); padding: 12px; font-size: 15px; resize: vertical;
}
.ns-txt:focus { outline: none; border-color: var(--accent); background: var(--card); }

/* ---------- calculadora de discos ---------- */
.pc-lab { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-2); margin: 10px 0 6px; }
.pc-input {
  width: 100%; min-height: 44px; border: 1px solid var(--hair-strong); border-radius: var(--r-sm);
  background: var(--card-2); padding: 10px 12px; font-size: 16px; font-weight: 600;
}
.pc-input:focus { outline: none; border-color: var(--accent); background: var(--card); }
.pc-row { display: flex; gap: 10px; }
.pc-col { flex: 1; min-width: 0; }
.pc-col.grow { flex: 2; }
.pc-out { margin-top: 6px; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-chip {
  background: var(--accent-soft); color: var(--accent); border-radius: var(--r-pill);
  padding: 7px 12px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.pc-total { margin-top: 10px; font-size: 14px; color: var(--text-2); }
.pc-total.ok b { color: var(--green); }
.pc-total.warn b { color: var(--orange); }
.pc-hint { font-size: 13px; color: var(--text-3); }

/* ---------- banner de PR en vivo ---------- */
.pr-banner {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(var(--safe-top) + 62px); z-index: 80;
  display: flex; align-items: center; gap: 11px; max-width: min(92vw, 420px);
  background: var(--card); color: var(--text); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 12px 16px; font-size: 14px; line-height: 1.35;
  animation: pop .3s var(--ease) both;
}
.pr-banner > svg { flex: none; color: var(--orange); }
.pr-banner .prb-prev { color: var(--text-3); font-size: 12px; }
.pr-banner.out { transition: opacity .35s, transform .35s; opacity: 0;
  transform: translateX(-50%) translateY(-10px); }

/* ---------- rest overlay extras ---------- */
#ro-ring { transition: stroke-dashoffset .9s linear; }
.rot90 { transform: rotate(90deg); }

/* ---------- ficha fallback ---------- */
.ff-mark { display: flex; gap: 10px; margin-bottom: 10px; }
.ff-stat {
  flex: 1; background: var(--card-2); border-radius: var(--r-sm);
  padding: 10px 12px; text-align: center;
}
.ff-stat span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-3); margin-bottom: 3px; }
.ff-stat b { font-size: 15px; }
.ff-next { font-size: 13px; color: var(--text-2); display: flex; gap: 7px; align-items: flex-start;
  background: var(--accent-soft); border-radius: var(--r-sm); padding: 10px 12px; margin: 4px 0 10px; }
.ff-next svg { flex: none; color: var(--accent); margin-top: 1px; }
.fh-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 2px; border-bottom: 1px solid var(--hair); font-size: 14px; }
.fh-row:last-child { border-bottom: none; }
.fh-row > span:first-child { color: var(--text-3); font-size: 12px; }
.fh-1rm { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- pantalla final (extiende .finish-hero de app.css) ---------- */
.fh-stats { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.fh-stat {
  min-width: 88px; background: var(--card); border-radius: var(--r);
  box-shadow: var(--shadow-sm); padding: 14px 10px;
}
.fh-stat b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; }
.fh-stat span { font-size: 12px; color: var(--text-2); font-weight: 600; }
.fh-delta { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  font-size: 13px; font-weight: 700; border-radius: var(--r-pill); padding: 7px 13px; }
.fh-delta.up { background: rgba(48,209,88,.14); color: var(--green); }
.fh-delta.down { background: rgba(255,159,10,.14); color: var(--orange); }
.fh-prs { margin-top: 18px; display: grid; gap: 8px; text-align: left; }
.fh-pr {
  display: flex; align-items: center; gap: 11px; background: var(--card);
  border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 12px 14px;
}
.fh-pr-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 11px; background: rgba(255,159,10,.16); color: var(--orange); }
.fh-pr-txt { font-size: 14px; line-height: 1.35; }
.fh-pr-prev { color: var(--text-3); font-size: 12px; margin-left: 4px; }
.sync-card {
  margin-top: 18px; background: var(--card); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 16px; text-align: left;
}
.sync-card .sc-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.sync-card .sc-title svg { color: var(--accent); }
.sync-card .sc-sub { color: var(--text-2); font-size: 13px; margin: 4px 0 12px; }
.sync-card .sc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- confirm sheet (ui.js confirmSheet) ---------- */
.confirm-sheet .cs-msg { color: var(--text-2); font-size: 15px; line-height: 1.45; margin-bottom: 16px; }
.confirm-sheet .cs-actions { display: grid; gap: 8px; }
.confirm-sheet .cs-actions .btn-ghost-danger { min-height: 48px; border-radius: var(--r); }
