/* ---------- Entrenamiento en curso ---------- */
.wk { padding-bottom: 140px; }
.wk-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 4px; margin: -18px -16px 0; padding: 10px 12px; background: rgba(var(--bg-rgb), .96); backdrop-filter: blur(12px); }
@media (min-width: 900px) { .wk-top { margin: -28px -36px 0; padding: 12px 36px; } }
.wk-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.wk-title b { font-size: 1.12rem; }
.icon-btn.on { color: var(--warn); }
.wk-stats { display: flex; gap: 10px; margin: 0 -16px 14px; padding: 10px 16px 14px; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .wk-stats { margin: 0 -36px 18px; padding: 10px 36px 16px; } }
.wk-stats > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wk-stats .l { font-size: .78rem; color: var(--text-2); }
.wk-stats b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
#wk-dur { color: var(--accent-text); }
#wk-dur.paused { color: var(--warn); }
.wk-paused { border-color: rgba(255, 179, 0, .5); }
.wk-ex { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 12px 10px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.wk-ex.ss { border-left: 4px solid var(--ss); }
.wk-ex.ss-cont { margin-top: -10px; border-top-left-radius: 0; border-top-right-radius: 0; }
.ss-tag { align-self: flex-start; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ss); }
.wk-ex-head { display: flex; align-items: center; gap: 10px; }
.wk-ex-ic { flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; padding: 0; border: 1px solid var(--line); background: var(--stage); cursor: pointer; display: grid; place-items: center; }
.wk-ex-ic .ex-thumb { width: 100%; height: 100%; border: 0; border-radius: 0; }
.wk-ex-ic.letter { font-weight: 800; color: var(--accent-text); cursor: default; }
.wk-ex-name { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; color: var(--accent-text); font: inherit; font-size: 1.08rem; font-weight: 750; cursor: pointer; }
b.wk-ex-name { cursor: default; color: var(--text); }
.wk-note { display: flex; gap: 6px; align-items: flex-start; color: var(--text-2); font-size: .9rem; margin: 0; }
.wk-note svg { color: var(--muted); margin-top: 2px; }
.wk-grid, .wk-row-in { display: grid; grid-template-columns: 34px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 46px; gap: 8px; align-items: center; }
.noprev .wk-row-in, .wk-grid.noprev { grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 46px; }
.wk-head { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 0 0 2px; }
.wk-head svg { width: 16px; height: 16px; }
.wk-sets { display: flex; flex-direction: column; gap: 6px; }
.wk-row { position: relative; border-radius: 12px; overflow: hidden; }
.wk-row-in { position: relative; z-index: 1; background: var(--surface); padding: 4px 0; touch-action: pan-y; transition: transform .2s ease, background .2s; border-radius: 12px; }
.wk-row.done .wk-row-in { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.wk-num { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: .9rem; margin: 0 auto; }
.wk-row.done .wk-num { background: var(--accent); color: var(--accent-ink); }
.wk-prev { text-align: center; color: var(--muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-in { width: 100%; min-width: 0; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); text-align: center; font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0 4px; }
.wk-in::placeholder { color: var(--muted); opacity: .75; font-weight: 600; }
.wk-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15); }
.wk-in.bad { border-color: var(--danger); }
.wk-in.wk-ro { display: flex; align-items: center; justify-content: center; border-style: dashed; background: transparent; }
.wk-in.wk-ro.ph { color: var(--muted); font-weight: 600; }
.wk-row.done .wk-in { border-color: transparent; background: transparent; }
.wk-check { width: 42px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s, transform .1s; }
.wk-check svg { width: 22px; height: 22px; stroke-width: 3; }
.wk-check:active { transform: scale(.92); }
.wk-row.done .wk-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wk-del { position: absolute; inset: 0 0 0 auto; width: 76px; border: 0; background: var(--danger); color: #fff; display: grid; place-items: center; cursor: pointer; border-radius: 0 12px 12px 0; }
.wk-del svg { width: 24px; height: 24px; }
.wk-del { visibility: hidden; }
.wk-row.open .wk-del, .wk-row.swiping .wk-del { visibility: visible; }
.wk-foot { margin-top: 18px; }
.wk-restbar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 40; background: var(--surface); border-top: 1px solid rgba(var(--accent-rgb), .45); padding: 10px 16px 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 -10px 30px rgba(0, 0, 0, .5); }
@media (min-width: 900px) { .wk-restbar { left: var(--side-w); bottom: 0; } }
.wk-restbar .timer { font-size: 1.8rem; color: var(--accent-text); }
.menu-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 10px; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; text-align: left; border-radius: 12px; cursor: pointer; }
.menu-item:hover { background: var(--surface-2); }
.menu-item svg { color: var(--text-2); width: 20px; height: 20px; }
.menu-item.danger, .menu-item.danger svg { color: var(--danger); }
.rest-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { flex: 1; position: relative; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 10px; border-radius: 9px; color: var(--text-2); font-weight: 650; font-size: .9rem; cursor: pointer; }
.seg label input:checked + span { background: rgba(var(--accent-rgb), .14); color: var(--accent-text); }
.seg label input:focus-visible + span { outline: 2px solid var(--accent); }

/* ---------- Ajustes ---------- */
.set-group { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .grow { display: flex; flex-direction: column; gap: 2px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); position: relative; cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); transition: transform .2s, background .2s; }
.switch:checked { background: var(--accent); border-color: var(--accent); }
.switch:checked::after { transform: translateX(18px); background: var(--accent-ink); }

/* ---------- Terminar y resumen ---------- */
.fin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .fin-grid { grid-template-columns: repeat(4, 1fr); } }
.fin-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.fin-stat b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.fin-stat span { font-size: .8rem; color: var(--text-2); }
.fin-xp { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.fin-xp b { font-size: 2.2rem; color: var(--accent-text); font-weight: 900; }
.fin-xp.off b { color: var(--muted); }
.fin h3 { display: flex; align-items: center; gap: 8px; }
.fin h3 svg, .fin label svg { color: var(--accent-text); }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.media-grid:empty { display: none; }
.media-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; text-align: center; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item.loading { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.media-x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .7); color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.media-badge { position: absolute; left: 6px; bottom: 6px; font-size: .7rem; font-weight: 700; background: rgba(0, 0, 0, .7); padding: 2px 6px; border-radius: 6px; }
.radio-list { display: flex; flex-direction: column; gap: 8px; }
.radio-list label { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio-list label:has(input:checked) { border-color: var(--accent); background: rgba(var(--accent-rgb), .06); }
.radio-list input { accent-color: var(--accent); margin-top: 3px; width: 18px; height: 18px; flex: none; }
.radio-list span { display: flex; flex-direction: column; gap: 2px; }
.sum-ex { padding: 12px 0; border-bottom: 1px solid var(--line); }
.sum-ex:last-child { border-bottom: 0; }
.sum-sets { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.sum-set { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.sum-set .wk-num { margin: 0; width: 26px; height: 26px; font-size: .8rem; }

/* ---------- Ampliar foto de perfil ---------- */
.avatar-zoom { position: relative; background: none; border: 0; padding: 0; cursor: zoom-in; border-radius: 50%; }
.avatar-zoom .zoom-ic { position: absolute; right: 2px; bottom: 2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); border: 2px solid var(--bg); }
.avatar-zoom .zoom-ic svg { width: 15px; height: 15px; }
.avatar-full { min-height: calc(100vh - 60px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; cursor: zoom-out; }
.avatar-full img { width: min(92vw, 560px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .5); }
.avatar.huge { width: min(80vw, 420px); height: min(80vw, 420px); }

/* ---------- Biblioteca: músculos y variantes ---------- */
.sub-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.sub-head { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 2px 6px; }
.ex-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ex-card .ex-row { border: 0; border-radius: 0; background: none; }
.ex-vars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 10px 10px 76px; }
.chip.sm { height: 28px; padding: 0 10px; font-size: .78rem; }
.tag-btn { cursor: pointer; color: var(--accent-text); border-color: rgba(var(--accent-rgb), .35); font: inherit; font-size: .74rem; font-weight: 700; }

/* ---------- Tipos de serie y récords ---------- */
button.wk-num { border: 0; cursor: pointer; position: relative; font: inherit; font-weight: 800; color: var(--text); }
.wk-num.t-warmup { background: rgba(255, 179, 0, .18); color: #ffb300; }
.wk-num.t-failure { background: rgba(255, 77, 109, .18); color: #ff4d6d; }
.wk-num.t-drop { background: rgba(124, 77, 255, .22); color: #b69cff; }
.wk-row.done .wk-num.t-warmup { background: #ffb300; color: #1f1400; }
.wk-row.done .wk-num.t-failure { background: #ff4d6d; color: #fff; }
.wk-row.done .wk-num.t-drop { background: #7c4dff; color: #fff; }
.wk-pr { position: absolute; top: -7px; right: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); color: #2a1600; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.wk-pr svg { width: 12px; height: 12px; stroke-width: 2.6; }
.menu-item.set-type { align-items: center; }
.menu-item.set-type .wk-num { margin: 0; flex: none; }
.menu-item.set-type.on { background: var(--surface-2); }
.menu-item.set-type > svg { color: var(--accent-text); }
.ss-tag { display: inline-flex; align-items: center; gap: 6px; }
.ss-tag svg { width: 14px; height: 14px; }
.wk-restbar.work { border-top-color: rgba(255, 179, 0, .6); }
.wk-restbar.work .timer { color: #ffb300; }
.sum-set .wk-num { position: relative; overflow: visible; }
.sum-set .wk-pr { top: -6px; right: -8px; width: 16px; height: 16px; }
.sum-set .wk-pr svg { width: 11px; height: 11px; }
.sum-set.is-pr { background: rgba(255, 211, 107, .08); border-radius: 10px; padding: 4px 6px; margin: 0 -6px; }
.pr-tag { color: var(--gold); border-color: rgba(255, 211, 107, .4); }

/* ---------- Rangos: subrangos Bronce · Plata · Oro · Platino ---------- */
.rank-badge.tier-0:not(.legend) { color: #e0a36b; background: rgba(205, 127, 50, .14); border-color: rgba(205, 127, 50, .45); }
.rank-badge.tier-1:not(.legend) { color: #d7dde5; background: rgba(192, 200, 210, .12); border-color: rgba(192, 200, 210, .45); }
.rank-badge.tier-2:not(.legend) { color: #ffd36b; background: rgba(255, 196, 0, .13); border-color: rgba(255, 196, 0, .45); }
.rank-badge.tier-3:not(.legend) { color: #8ff0e4; background: rgba(110, 230, 215, .13); border-color: rgba(110, 230, 215, .45); }
.ladder.future { opacity: .55; }
.ladder.current b { color: var(--accent-text); }
.tier-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tier-pill { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; border: 1px solid var(--line); color: var(--muted); }
.tier-pill small { font-weight: 600; opacity: .8; }
.tier-pill.done.tier-0, .tier-pill.now.tier-0 { color: #e0a36b; border-color: rgba(205, 127, 50, .6); }
.tier-pill.done.tier-1, .tier-pill.now.tier-1 { color: #d7dde5; border-color: rgba(192, 200, 210, .6); }
.tier-pill.done.tier-2, .tier-pill.now.tier-2 { color: #ffd36b; border-color: rgba(255, 196, 0, .6); }
.tier-pill.done.tier-3, .tier-pill.now.tier-3 { color: #8ff0e4; border-color: rgba(110, 230, 215, .6); }
.tier-pill.now { background: rgba(var(--accent-rgb), .12); box-shadow: 0 0 0 1px var(--accent) inset; }
.levelup .lu-num.lu-tier { font-size: 3.6rem; }
.wk-xp { color: var(--accent-text); }
.fig-steps figcaption { color: #a7afbd; }

/* ---------- Apariencia ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); background: var(--sw); cursor: pointer; padding: 0; position: relative; display: grid; place-items: center; }
.swatch.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--sw); border-color: transparent; }
.swatch.custom { background: conic-gradient(#ff4d4d, #ffc400, #00e676, #00e5ff, #448aff, #b388ff, #ff4fa3, #ff4d4d); color: #fff; }
.swatch.custom.on { background: var(--sw); }
.swatch.custom svg { width: 16px; height: 16px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* ---------- Frase del día ---------- */
/* Frase del día: siempre sobre negro (como el banner), con entrada escalonada y salida suave */
.daily-quote { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 28px 24px; color: #f4f6f8;
  /* Mismo fondo que la app (Atomic Night): órbitas del acento y halos suaves */
  background:
    var(--atom-orbits, none) no-repeat calc(100% + 34vmax) -30vmax / 92vmax 92vmax,
    var(--atom-orbits, none) no-repeat -26vmax calc(100% + 24vmax) / 64vmax 64vmax,
    radial-gradient(70% 45% at 50% 28%, rgba(var(--accent-rgb), .10), transparent 70%),
    radial-gradient(60% 42% at 92% -4%, rgba(var(--accent-rgb), .15), transparent 72%),
    radial-gradient(52% 40% at -8% 42%, rgba(var(--accent2-rgb), .08), transparent 70%),
    radial-gradient(70% 45% at 40% 112%, rgba(var(--accent-rgb), .07), transparent 70%),
    radial-gradient(130% 70% at 50% -10%, rgba(52, 78, 140, .16), transparent 62%),
    #06090f;
  animation: dqFade .6s ease both; }
.dq-share.busy { opacity: .7; }
.daily-quote.out { animation: dqOut .45s ease forwards; }
.dq-inner { max-width: 520px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.dq-banner { width: min(250px, 64vw); height: auto; display: block; mix-blend-mode: screen; animation: dqRise .9s cubic-bezier(.2, .8, .2, 1) both; }
.dq-body { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dq-date { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(244, 246, 248, .55); animation: dqRise .8s .35s cubic-bezier(.2, .8, .2, 1) both; }
.dq-hello { color: rgba(244, 246, 248, .75); font-weight: 600; animation: dqRise .8s .45s cubic-bezier(.2, .8, .2, 1) both; }
.dq-text { margin: 14px 0 0; font-size: clamp(1.35rem, 5.4vw, 1.9rem); line-height: 1.35; font-weight: 600; letter-spacing: -.01em; color: #fff; text-wrap: balance;
  animation: dqRise 1s .7s cubic-bezier(.2, .8, .2, 1) both; }
.dq-text .dq-q { color: #7dff3a; font-weight: 700; font-size: 1.15em; padding: 0 .06em; }
.dq-btn { min-width: 220px; height: 52px; font-size: 1.05rem; animation: dqRise .8s 1.2s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes dqFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dqOut { to { opacity: 0; transform: scale(1.02); } }
@keyframes dqRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .daily-quote, .daily-quote *, .daily-quote.out { animation-duration: .01s !important; animation-delay: 0s !important; } }

/* ---------- Insignias de rango ---------- */
.insignia { flex: none; display: block; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); }
.insignia.legend { animation: insGlow 3s ease-in-out infinite; } /* solo Leyenda tiene efecto especial */
@keyframes insGlow { 50% { filter: drop-shadow(0 0 10px rgba(255, 200, 80, .75)); } }
@media (prefers-reduced-motion: reduce) { .insignia.legend { animation: none; } }
.ins-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.ins-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 12px; text-align: center; }
.ins-cell span { font-size: .72rem; font-weight: 700; }
.ins-cell small { font-size: .66rem; color: var(--muted); }
.ins-cell.todo .insignia { filter: grayscale(1) brightness(.75); opacity: .55; }
.ins-cell.now { background: rgba(var(--accent-rgb), .12); box-shadow: 0 0 0 1px var(--accent) inset; }
.lu-insignia { animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.steps-dots { display: flex; gap: 8px; font-size: .78rem; font-weight: 700; }
.steps-dots span { flex: 1; padding: 6px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-align: center; }
.steps-dots span.on { background: rgba(var(--accent-rgb), .15); color: var(--accent-text); }
.steps-dots span.done { color: var(--text-2); }
.ph-num::placeholder { color: var(--text-2); opacity: .55; font-weight: 600; }
/* Barra de datos del entreno que acompaña al desplazarse (ajuste «Barra de datos que acompaña») */
.wk.sticky-stats .wk-stats { position: sticky; top: 56px; z-index: 29; background: rgba(var(--bg-rgb), .96); backdrop-filter: blur(12px); }
.vis-toggle { width: auto; flex: none; }
.vis-toggle label span { padding: 6px 10px; font-size: .8rem; }
.today-card { border-color: rgba(var(--accent-rgb), .45); }
.day-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.day { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font: inherit; font-weight: 800; cursor: pointer; }
.day.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Insignias de la escalera de rangos: estáticas (sin brillo animado) */
.ins-cell .insignia.legend { animation: none; }
/* Botones de cámara y galería al terminar */
.media-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.media-act { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-weight: 700; font-size: .85rem; cursor: pointer; overflow: hidden; }
.media-act svg { width: 26px; height: 26px; color: var(--accent-text, var(--accent)); }
.media-act:active { transform: scale(.97); }
.media-act input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.media-act:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.hint.ok { color: var(--good); }
.hint.bad { color: var(--danger); }
.contact-card .cat-dot svg { width: 20px; height: 20px; }
/* Modo claro: colores de los subrangos con contraste suficiente sobre fondo blanco */
:root[data-theme="light"] .rank-badge.tier-0:not(.legend) { color: #8a4b17; }
:root[data-theme="light"] .rank-badge.tier-1:not(.legend) { color: #56606c; background: rgba(150, 160, 175, .16); }
:root[data-theme="light"] .rank-badge.tier-2:not(.legend) { color: #8a6200; }
:root[data-theme="light"] .rank-badge.tier-3:not(.legend) { color: #13786c; }
:root[data-theme="light"] .tier-pill.done.tier-0, :root[data-theme="light"] .tier-pill.now.tier-0 { color: #8a4b17; }
:root[data-theme="light"] .tier-pill.done.tier-1, :root[data-theme="light"] .tier-pill.now.tier-1 { color: #56606c; }
:root[data-theme="light"] .tier-pill.done.tier-2, :root[data-theme="light"] .tier-pill.now.tier-2 { color: #8a6200; }
:root[data-theme="light"] .tier-pill.done.tier-3, :root[data-theme="light"] .tier-pill.now.tier-3 { color: #13786c; }
:root[data-theme="light"] .card.hero { background: radial-gradient(120% 140% at 0% 0%, rgba(var(--accent-rgb), .22), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(var(--accent-rgb), .14), transparent 55%), var(--surface); }
/* Selector de ejercicios (modo varios): ejercicio ya incluido en la rutina */
.btn.added { color: var(--accent-text); background: rgba(var(--accent-rgb), .14); border-color: rgba(var(--accent-rgb), .55); }
.btn.added svg { color: var(--accent-text); }
/* Lista de cambios de la rutina al guardar */
.change-list { list-style: none; margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow: auto; }
.change-list li { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; }
.change-list li svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent-text); }

/* Cambios de rutina: la opción queda marcada hasta pulsar «Continuar» */
.menu-item.choice { border: 2px solid transparent; position: relative; }
.menu-item.choice::after { content: ''; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); }
.menu-item.choice.on { border-color: var(--accent); background: rgba(var(--accent-rgb), .08); }
.menu-item.choice.on::after { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 45%, transparent 50%); }

/* Guardar entrenamiento: lugar en tarjetas (sustituye al desplegable nativo, que se veía transparente en Android) */
.gym-input { position: relative; display: flex; align-items: center; }
.gym-input .input { padding-right: 44px; }
.gym-input .icon-btn { position: absolute; right: 4px; width: 36px; height: 36px; }
.field > .label { font-weight: 650; font-size: .88rem; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.place-card .place-name { display: block; font-size: 1.05rem; margin: 2px 0 4px; }
.place-card .toggle-row { margin-top: 10px; }

/* v1.16: «Compartir» la frase del día (arriba a la derecha) */
.dq-share { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: #f4f6f8;
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; animation: dqFade .8s 1.2s ease both; }
.dq-share svg { width: 17px; height: 17px; }
.dq-share:active { transform: scale(.97); }
.dq-share:disabled { opacity: .6; }

/* v1.17: ejercicios solo por tiempo (correr, bici, comba, plancha…): cronómetro por serie, sin Kg ni Descanso */
.wk-grid.timeonly, .wk-row-in.timeonly { grid-template-columns: 34px minmax(0, 1.1fr) minmax(0, 1.5fr) 46px; }
.noprev .wk-row-in.timeonly, .wk-grid.timeonly.noprev { grid-template-columns: 34px minmax(0, 1fr) 46px; }
.wk-sw { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.wk-sw svg { width: 16px; height: 16px; color: var(--accent-text); }
.wk-sw.on { border-color: var(--accent); background: rgba(var(--accent-rgb), .14); }
.wk-row.running .wk-row-in { background: rgba(var(--accent-rgb), .08); }

/* v1.24: seguimiento de carreras (GPS, cinta y manual) */
.wk-run { display: flex; align-items: center; gap: 6px; padding: 0 12px 8px 52px; font-size: .82rem; color: var(--accent); font-weight: 600; }
.wk-run svg { width: 14px; height: 14px; }
.wk-trackbar { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: inherit; cursor: pointer; }
.wk-trackbar.on { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .35); }
.trk { display: flex; flex-direction: column; gap: 16px; min-height: 100%; }
.trk-head { display: flex; align-items: center; gap: 10px; }
.trk-head h2 { font-size: 1.15rem; }
.trk-live { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.trk-sig { align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface); border: 1px solid var(--line); }
.trk-sig svg { width: 14px; height: 14px; }
.trk-sig.ok { color: var(--accent); border-color: rgba(var(--accent-rgb), .45); }
.trk-sig.wait { color: var(--warn, #ffb300); }
.trk-sig.bad { color: var(--danger); }
.trk-big { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 10px 0; }
.trk-big b { font-size: clamp(3.4rem, 18vw, 5.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.trk-big span { color: var(--text-2); font-weight: 600; }
.trk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.trk-grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.trk-grid .l { font-size: .74rem; color: var(--text-2); }
.trk-grid b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.trk-grid small { font-size: .7rem; color: var(--text-2); font-weight: 500; }
.trk-target { display: flex; flex-direction: column; gap: 6px; }
.trk-paused { color: var(--warn, #ffb300); display: flex; gap: 6px; align-items: center; }
.trk-actions { display: flex; gap: 10px; margin-top: 6px; }
.trk-actions .btn { flex: 1; }
.trk-modes { width: 100%; }
.trk-splits { display: flex; flex-direction: column; gap: 6px; }
.trk-splits h3 { font-size: .95rem; margin-bottom: 4px; }
.trk-split { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 10px; font-size: .86rem; }
.trk-split .track { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.trk-split .track i { display: block; height: 100%; border-radius: 99px; background: rgba(var(--accent-rgb), .55); }
.trk-split.best .track i { background: var(--accent); }
.trk-split b { text-align: right; font-variant-numeric: tabular-nums; }
.btn.danger-soft { color: var(--danger); }

/* v1.25: pantalla de carrera (entrenamiento solo de correr) */
.run { display: flex; flex-direction: column; gap: 14px; padding-bottom: 28px; }
.run-top { display: flex; align-items: center; gap: 10px; }
.run-top b { font-size: 1.05rem; }
.run-modes { width: 100%; }
.run-goal { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 16px; background: rgba(var(--accent-rgb), .08); border: 1px solid rgba(var(--accent-rgb), .3); }
.run-goal svg { width: 18px; height: 18px; color: var(--accent); }
.run-goal span { flex: 1; color: var(--text-2); }
.run-goal b { font-size: 1.15rem; }
.run-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.run-card h3 { font-size: .95rem; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.run-card .eyebrow { display: block; margin-bottom: 6px; }
.run-prev .row { gap: 10px; }
.run-start-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 10px 0; }
.run-start-wrap .run-card { width: 100%; }
.run-start { width: min(62vw, 230px); aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; color: #04110a; font-weight: 800; font-size: 1.35rem; letter-spacing: .02em;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(circle at 30% 25%, #b8ff7a, var(--accent) 55%, #009a4f); box-shadow: 0 0 0 10px rgba(var(--accent-rgb), .12), 0 18px 50px rgba(var(--accent-rgb), .35); }
.run-start svg { width: 52px; height: 52px; }
.run-start:active { transform: scale(.97); }
.run-start:disabled { opacity: .6; }
.run-hint { text-align: center; max-width: 34ch; }
.run-sig { display: flex; justify-content: center; min-height: 30px; }
.run-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; }
.run-hero b { font-size: clamp(4.4rem, 26vw, 7.2rem); font-weight: 800; letter-spacing: -.04em; line-height: .95; font-variant-numeric: tabular-nums; }
.run-hero span { color: var(--text-2); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
.run.paused .run-hero b { color: var(--warn, #ffb300); }
.run-target { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.run-target .bar { width: 100%; }
.run-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.run-grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.run-grid .l { font-size: .74rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.run-grid b { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.run-grid small { font-size: .72rem; color: var(--text-2); font-weight: 500; }
.run-paused { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--warn, #ffb300); font-weight: 600; }
.run-controls { display: flex; justify-content: center; gap: 22px; padding: 8px 0 4px; }
.run-btn { position: relative; width: 96px; height: 96px; border-radius: 50%; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 700; font-size: .72rem; color: #fff; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.run-btn svg { width: 30px; height: 30px; }
.run-btn.pause { background: var(--surface); border: 2px solid var(--line); color: inherit; }
.run-btn.go { background: var(--accent); color: #04110a; }
.run-btn.stop { background: #2a1016; color: #ff6b8a; border: 2px solid rgba(255, 61, 113, .45); }
.run-btn.stop span { max-width: 74px; text-align: center; line-height: 1.1; }
.run-btn .ring { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; }
.run-btn .ring circle { fill: none; stroke: #ff3d71; stroke-width: 4; stroke-dasharray: 289; stroke-dashoffset: 289; }
.run-btn.holding .ring circle { stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.run-done { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--accent); font-weight: 700; }
.run-done svg { width: 20px; height: 20px; }
.run-goal-res { text-align: center; color: var(--text-2); display: flex; justify-content: center; gap: 6px; align-items: center; }
.run-goal-res.ok { color: var(--gold, #ffd36b); font-weight: 700; }
.run-actions { display: flex; gap: 10px; }
.run-actions .btn { flex: 1; }
.run-actions.col { flex-direction: column; }
.input.lg { font-size: 1.3rem; padding: 14px; }
