/* FightPlan v2 (2026-10-14): estructura Hoy · Cuerpo · + · Entreno · Coach.
   Paleta alineada con el emblema: negro de fondo, rojo solo como acento de marca y
   selección, verde/ámbar/rojo solo para estados. Diseño: DOCUMENTOS/04_app_movil/rediseno-ux-v2.md */
:root {
  /* Paleta grafito, marfil y azul eléctrico (2026-10-28, DOCUMENTOS/06_bjj/ux-jiujitsu-y-primer-dia.md): el azul es el único
     acento. --brand para rellenar (botones, +) y --brand-ink para texto e iconos sobre oscuro. El rojo queda para peligro. */
  --bg: #101114; --panel: #191b1f; --panel-2: #23252a; --ink: #f1eee8; --muted: #9d9a93; --faint: #6b6a66;
  --line: #2a2b2f; --brand: #0066ff; --brand-ink: #5b8cff; --brand-soft: #0d1d38; --rival: #d9774b;
  --green: #7cc29a; --green-soft: #12241b; --orange: #e2b464; --orange-soft: #2a2110; --red: #e5484d; --red-soft: #2c1214;
  --bjj: #5b8cff; --box: #d9a066; --fza: #aab4c3; --cam: #8a8a8a; --otro: #b48cff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.4; }
button { font: inherit; color: inherit; cursor: pointer; }
.shell { width: min(560px, 100%); margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 16px 100px; }
header.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.brand strong { font-size: 18px; letter-spacing: .01em; }
.icon-btn { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; width: 40px; height: 40px; display: grid; place-items: center; }
.icon-btn svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 1.8; }
.view { display: none; } .view.active { display: block; }
h2.screen { font-size: 24px; margin: 2px 0 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.card-h b { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.card-h a { color: var(--muted); font-size: 13px; text-decoration: none; }
.muted { color: var(--muted); } .small { font-size: 13px; } .faint { color: var(--faint); }
.example { display: inline-block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--otro); border: 1px solid #3b2e57; border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }

/* Frescura */
.fresh { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; }
.chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; }

/* Veredicto + pilares */
.verdict { border-radius: 18px; padding: 18px 16px 14px; margin-bottom: 12px; border: 1px solid; }
.verdict.l2 { background: linear-gradient(160deg, #173322, #0d1711); border-color: #23452f; }
.verdict.l1 { background: linear-gradient(160deg, #33270f, #17120a); border-color: #4a3818; }
.verdict.l0 { background: linear-gradient(160deg, #351513, #170b0a); border-color: #4c1d1a; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.l2 .eyebrow { color: var(--green); } .l1 .eyebrow { color: var(--orange); } .l0 .eyebrow { color: var(--red); }
.verdict h1 { margin: 6px 0; font-size: 27px; line-height: 1.12; }
.verdict p { margin: 0 0 14px; color: #dcdcdc; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pillar { background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px 8px; text-align: center; }
.ring { width: 58px; height: 58px; margin: 0 auto 4px; position: relative; }
.ring svg { width: 58px; height: 58px; transform: rotate(-90deg); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.pillar b { display: block; font-size: 12.5px; }
.pillar small { display: block; font-size: 11.5px; color: var(--muted); }

/* Qué toca hoy */
.pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pick button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 2px; font-size: 13.5px; }
.pick button.on { border-color: var(--brand); background: var(--brand-soft); }
.advice { display: none; margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--panel-2); font-size: 14px; }
.advice.show { display: block; }
.advice b { display: block; margin-bottom: 4px; }
.advice .go, .bjj-hoy .go { margin-top: 10px; width: 100%; background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 10px; font-weight: 700; }

/* Línea de tiempo */
.tl { position: relative; padding-left: 18px; }
.tl::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-day { position: relative; z-index: 1; background: var(--panel); padding: 3px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 7px 0 3px -18px; }
.tl-item { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0; }
.tl-item::before { content: ""; position: absolute; left: -17px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--faint)); border: 2px solid var(--panel); }
.tl-item .t { font-weight: 600; font-size: 14.5px; }
.tl-item .m { font-size: 13px; color: var(--muted); }
.tag { font-size: 12px; padding: 4px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid; }
.tag.todo { background: var(--orange-soft); color: var(--orange); border-color: #4a3818; }
.tag.done { background: var(--green-soft); color: var(--green); border-color: #23452f; }

/* Cuerpo */
.score-big { display: flex; align-items: center; gap: 14px; }
.score-big .ring, .score-big .ring svg { width: 84px; height: 84px; }
.score-big .ring span { font-size: 26px; }
.factors { margin-top: 12px; }
.factor { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.factor .ok { color: var(--green); } .factor .warn { color: var(--orange); } .factor .bad { color: var(--red); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips button { flex: none; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); }
.chips button.on { color: var(--ink); border-color: var(--ink); }
.range { display: flex; gap: 4px; background: var(--panel-2); border-radius: 10px; padding: 3px; margin: 10px 0; }
.range button { flex: 1; background: none; border: 0; border-radius: 8px; padding: 6px; font-size: 13px; color: var(--muted); }
.range button.on { background: #2a2a2a; color: var(--ink); }
.chart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.readout { font-size: 13.5px; color: var(--muted); min-height: 20px; margin: 4px 0 6px; }
.readout b { color: var(--ink); font-size: 16px; }
.chart-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.chart-sum div { background: var(--panel-2); border-radius: 10px; padding: 8px 10px; }
.chart-sum span { display: block; font-size: 11.5px; color: var(--muted); }
.chart-sum b { font-size: 17px; }
.explain { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.insight { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.insight:first-of-type { border-top: 0; padding-top: 0; }
.insight small { display: block; color: var(--faint); font-size: 12px; margin-top: 3px; }
.zones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; opacity: .75; }
.zones div { background: var(--panel-2); border-radius: 8px; padding: 8px; font-size: 12.5px; display: flex; justify-content: space-between; }
.empty { background: var(--panel-2); border-radius: 12px; padding: 12px; font-size: 14px; }
.empty button { margin-top: 10px; width: 100%; background: var(--brand); border: 0; border-radius: 10px; padding: 10px; color: #fff; font-weight: 600; }

/* Entreno */
.week-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.week-top div { background: var(--panel-2); border-radius: 10px; padding: 8px 10px; }
.week-top span { display: block; font-size: 11.5px; color: var(--muted); }
.week-top b { font-size: 18px; }
.track { position: relative; height: 10px; background: var(--panel-2); border-radius: 999px; margin: 8px 0 4px; }
.track .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.track .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.sport-chips { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 8px 0; margin-bottom: 4px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cal-head button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 30px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .h { font-size: 11px; color: var(--muted); text-align: center; }
.cal .d { aspect-ratio: 1; border-radius: 8px; background: var(--panel-2); font-size: 11.5px; padding: 4px; position: relative; color: var(--muted); }
.cal .d.has { color: var(--ink); }
.cal .d.blank { background: transparent; }
.cal .d.today { outline: 2px solid var(--ink); }
.cal .d.fut { opacity: .35; }
.cal .d .bars { position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; gap: 2px; }
.cal .d .bars i { flex: 1; height: 5px; border-radius: 3px; }
.keys { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.keys i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.wk-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 2px 6px; display: flex; justify-content: space-between; }
.sess { display: grid; grid-template-columns: 5px 1fr auto; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin-bottom: 6px; }
.sess .bar { width: 5px; align-self: stretch; border-radius: 3px; }
.sess .t { font-weight: 600; font-size: 14.5px; }
.sess .m { font-size: 12.5px; color: var(--muted); }
[data-ses] { cursor: pointer; }
/* Ficha de sesión */
.ses-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 4px; }
.ses-stats div { background: var(--panel-2); border-radius: 12px; padding: 9px 6px; text-align: center; }
.ses-stats b { display: block; font-size: 19px; }
.ses-stats span { font-size: 11.5px; color: var(--muted); }
.ses-sec { margin-top: 16px; }
.ses-sec > b { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.ses-carga { display: flex; align-items: baseline; gap: 8px; }
.ses-carga strong { font-size: 26px; }
.nivel { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
.nivel.baja { color: #9ad0ff; background: #10202e; } .nivel.normal { color: var(--green); background: var(--green-soft); }
.nivel.alta { color: var(--orange); background: var(--orange-soft); } .nivel.muy-alta { color: var(--red); background: var(--red-soft); }
.rango { position: relative; height: 10px; border-radius: 5px; background: var(--panel-2); margin: 10px 0 4px; }
.rango .banda { position: absolute; top: 0; bottom: 0; background: #2b3a2f; border-radius: 5px; }
.rango .yo { position: absolute; top: -4px; width: 4px; height: 18px; border-radius: 2px; background: var(--ink); transform: translateX(-2px); }
.zonas { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--panel-2); }
.zonas i { display: block; height: 100%; }
.zonas-l { display: grid; grid-template-columns: repeat(5, 1fr); font-size: 11.5px; color: var(--muted); margin-top: 5px; text-align: center; }
.zonas-l b { color: var(--ink); font-weight: 600; }
.te { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.te div { background: var(--panel-2); border-radius: 12px; padding: 9px 10px; }
.te b { font-size: 17px; } .te span { display: block; font-size: 12px; color: var(--muted); }
.ex-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ex-row:first-child { border-top: 0; }
.ex-row .t { font-weight: 600; font-size: 14px; }
.ex-row .m { font-size: 12.5px; color: var(--muted); }
.dec { font-size: 12px; padding: 3px 8px; border-radius: 6px; align-self: center; white-space: nowrap; }
.dec.subir { background: #10223a; color: var(--fza); } .dec.repetir { background: var(--panel-2); color: var(--muted); } .dec.bajar { background: var(--orange-soft); color: var(--orange); }
.routines { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.routine { text-align: left; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.routine b { display: block; } .routine small { color: var(--muted); font-size: 12px; }
.routine.main { border-color: var(--fza); }
.routine.new { border-style: dashed; color: var(--muted); }

/* Coach */
.notice { font-size: 12.5px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.bubble { max-width: 88%; padding: 10px 12px; border-radius: 14px; margin-bottom: 8px; font-size: 14.5px; }
.bubble.me { margin-left: auto; background: var(--brand-soft); border: 1px solid #1d3a6b; border-bottom-right-radius: 4px; }
.bubble.bot { background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble .src { display: block; margin-top: 6px; font-size: 11.5px; color: var(--faint); }
.composer { display: flex; gap: 6px; margin-top: 8px; }
.composer input { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: var(--ink); font: inherit; }
.composer button { background: var(--brand); border: 0; border-radius: 12px; padding: 0 16px; color: #fff; font-weight: 600; }

/* Portada de jiu-jitsu (tanda 2 de UX, 2026-10-28) */
html.mapa-abierto, html.mapa-abierto body { overscroll-behavior-y: none; }
.bjj-busca input { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; color: var(--ink); font: inherit; }
#bjjRes { display: grid; } #bjjRes:not(:empty) { margin-top: 6px; }
.bres { display: block; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 9px 2px; color: var(--ink); } .bres:last-child { border-bottom: 0; }
.bres small { display: block; color: var(--muted); font-size: 12px; }
.semana-bjj { display: flex; gap: 14px; align-items: center; } .semana-bjj svg { width: 64px; height: 64px; flex: none; }
.repaso-carta { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 10px 0 12px; } .repaso-carta ol { padding-left: 18px; margin: 8px 0 0; } .repaso-carta li { margin: 3px 0; }
/* Hojas y overlays */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.62); display: none; z-index: 44; }
.sheet-bg.show { display: block; }
.sheet { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(560px, 100%); max-height: 88vh; overflow: auto; overscroll-behavior: contain; background: var(--panel); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 10px 16px 26px; z-index: 45; display: none; }
.sheet.show { display: block; }
.grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 12px; }
.sheet h4 { margin: 0 0 2px; font-size: 19px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px; margin-top: 8px; }
.opt i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.opt small { display: block; color: var(--muted); font-size: 12.5px; }
.field { margin-top: 16px; }
.field > span { display: block; font-size: 13.5px; margin-bottom: 8px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 38px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 4px; font-size: 14px; }
.seg button.on { background: var(--brand-soft); border-color: var(--brand); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
textarea { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); padding: 10px; font: inherit; }
.primary { width: 100%; margin-top: 18px; background: var(--brand); border: 0; border-radius: 12px; padding: 14px; font-weight: 700; color: #fff; }
.overlay { position: fixed; inset: 0; background: var(--bg); z-index: 40; overflow: auto; display: none; }
.overlay.bjj-ov { z-index: 50; overflow: hidden; } .bjj-ov iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }
.overlay.show { display: block; }
.ov-in { width: min(560px, 100%); margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 16px 120px; }
.ov-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ov-head b { font-size: 18px; } .ov-head small { display: block; color: var(--muted); }
.ov-head button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.ov-head button.finish { background: var(--fza); color: #06101f; border: 0; font-weight: 700; }
.ex { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.ex-top { display: flex; justify-content: space-between; gap: 8px; }
.ex-top b { font-size: 16px; }
.last { font-size: 13px; color: var(--muted); margin: 6px 0 2px; }
.suggest { font-size: 13px; color: var(--fza); margin-bottom: 10px; }
.set { display: grid; grid-template-columns: 24px 1fr 14px 1fr 38px; gap: 6px; align-items: center; margin-bottom: 6px; }
.set .n { color: var(--muted); font-size: 13px; text-align: center; }
.stepper { display: flex; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.stepper button { width: 34px; height: 38px; background: none; border: 0; color: var(--muted); font-size: 18px; }
.stepper span { flex: 1; text-align: center; font-weight: 600; }
.stepper em { font-style: normal; color: var(--muted); font-size: 11px; margin-left: 2px; }
.check { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); }
.check.on { background: var(--green-soft); border-color: #23452f; color: var(--green); }
.add-set { background: none; border: 1px dashed var(--line); border-radius: 10px; width: 100%; padding: 8px; color: var(--muted); font-size: 13px; margin: 4px 0 6px; }
.ex.folded .body { display: none; }
.rest-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: #10223a; border-top: 1px solid #1e3a5f; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); display: none; }
.rest-bar.show { display: block; }
.rest-in { width: min(560px, 100%); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.rest-in b { font-size: 22px; color: var(--fza); font-variant-numeric: tabular-nums; }
.rt { display: block; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; margin-bottom: 8px; }
.rt-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rt b { font-size: 16px; } .rt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.rt-list { font-size: 12.5px; color: var(--faint); margin-top: 6px; }
.rt.main { border-color: var(--fza); }
.rt.empty-rt { border-style: dashed; }
.prep-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.prep-row:first-child { border-top: 0; }
.prep-row .t { font-weight: 600; font-size: 14.5px; } .prep-row .m { font-size: 12.5px; color: var(--muted); }
.prep-row.nuevo .t::after { content: " · añadido hoy"; color: var(--fza); font-weight: 400; font-size: 12px; }
.grip { color: var(--muted); font-size: 16px; line-height: 1; padding: 10px 4px; margin: -10px -4px; cursor: grab; touch-action: none; user-select: none; }
.prep-row.arrastrando { background: var(--panel-2); border-radius: 10px; opacity: .9; }
.x { width: 34px; height: 34px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.ex-top .x { width: 30px; height: 30px; flex: none; }
.removed { font-size: 12.5px; color: var(--faint); margin-top: 8px; }
.removed button { background: none; border: 0; color: var(--fza); font-size: 12.5px; padding: 0 4px; }
.search { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); padding: 11px 12px; font: inherit; margin: 12px 0 4px; }
.lib-g { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 2px; }
.lib-row { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 10px 2px; }
.lib-row small { display: block; color: var(--muted); font-size: 12px; }
.lib-row b { color: var(--fza); font-size: 20px; padding: 0 6px; }
.lib-row.used b { color: var(--green); font-size: 16px; }
.lib-row.used { opacity: .6; }
.change-box { background: #0f1d31; border: 1px solid #1e3a5f; border-radius: 14px; padding: 14px; margin-top: 12px; }
.change-box .opts { display: grid; gap: 6px; margin-top: 10px; }
.change-box .opts button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px; text-align: left; }
.change-box .opts button small { display: block; color: var(--muted); font-size: 12px; }
.change-box .opts button.on { border-color: var(--fza); background: #10223a; }
.rest-chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.rest-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; }
.rest-pick[hidden] { display: none; }
.rest-pick button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 13px; }
.rest-pick button.on { border-color: var(--fza); color: var(--fza); }
.rest-pick small { width: 100%; color: var(--faint); font-size: 11.5px; }
.param { display: grid; grid-template-columns: 1fr 150px; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 14px; }
.modo-p[hidden] { display: none; }
.modo-p .result { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.timer-btn { width: 100%; background: var(--red-soft); border: 1px solid #4c1d1a; color: var(--ink); border-radius: 10px; padding: 11px; font-weight: 700; margin: 6px 0 4px; }
.check.wide { width: 100%; height: 40px; margin-top: 4px; }
.seg.modo { margin-bottom: 12px; }
.seg.modo button { font-size: 13px; padding: 9px 2px; }
.splits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.splits span { background: var(--panel-2); border-radius: 8px; padding: 4px 8px; }
.splits b { color: var(--ink); }
.splits .media { background: #10223a; } .splits .media b { color: var(--fza); }
.chip.hit { background: var(--ink); color: #000; font-weight: 800; padding: 10px 16px; font-size: 15px; border: 0; }
.int-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 42; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); display: none; border-top: 1px solid var(--line); }
.int-bar.show { display: block; }
.int-bar.on { background: #4a1014; } .int-bar.off { background: #10223a; } .int-bar.fin { background: var(--green-soft); }
.int-bar .rest-in span { display: block; font-size: 22px; font-weight: 800; letter-spacing: .04em; }
.int-bar .rest-in small { color: var(--muted); }
.int-bar .rest-in b { font-size: 34px; color: var(--ink); font-variant-numeric: tabular-nums; }
.rest-in .adj { display: flex; align-items: center; gap: 6px; }
.ex-actions { display: flex; gap: 6px; align-items: center; }
.x.info { color: var(--fza); font-weight: 700; display: inline-grid; place-items: center; }
.ex-top .x.info { width: 30px; height: 30px; }
.lib-row .x.info { width: 28px; height: 28px; font-size: 13px; }
.stepper.pc { justify-content: center; color: var(--muted); font-size: 12.5px; height: 40px; }
.stepper.pc span { font-weight: 400; }
.anim { position: relative; margin: 12px 0 6px; border-radius: 12px; overflow: hidden; background: #fff; aspect-ratio: 4 / 3; }
.anim img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.anim img.b { animation: alterna 1.8s steps(1) infinite; }
@keyframes alterna { 0% { opacity: 0; } 50% { opacity: 1; } }
.anim .noimg { display: grid; place-items: center; height: 100%; color: #666; background: var(--panel-2); }
.cues { margin: 10px 0 8px 18px; padding: 0; font-size: 14.5px; }
.cues li { margin-bottom: 6px; }
.video { color: var(--fza); font-size: 14px; text-decoration: none; }
.ref { font-size: 12.5px; color: var(--muted); margin: -6px 0 10px; }
.seg.rir button { display: grid; gap: 1px; padding: 8px 4px; }
.seg.rir button small { font-size: 11px; color: var(--muted); }
.next { font-size: 13.5px; margin-top: 8px; min-height: 18px; }
.next.subir { color: var(--fza); } .next.bajar { color: var(--orange); } .next.repetir { color: var(--muted); }
.prog { font-size: 14px; background: var(--panel-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.prog b { display: block; margin-bottom: 2px; }
.set-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0 6px; }
.set-actions button { margin: 0; }
.rm-set { background: none; border: 1px dashed var(--line); border-radius: 10px; padding: 8px; color: var(--muted); font-size: 13px; }
.sum-row { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.sum-row:first-child { border-top: 0; }
.list-row { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.list-row:first-of-type { border-top: 0; }
/* Check-in de la mañana */
.seg.ck button { font-size: 12.5px; padding: 9px 2px; }
.field input[type="number"] { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); padding: 10px; font-size: 16px; }
.ck-hecho { font-size: 14px; color: var(--muted); }
.ck-hecho b { color: var(--ink); }
/* Coach: elegir modelo */
.modelos { display: grid; gap: 6px; }
.modelos button { text-align: left; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.modelos button.on { border-color: var(--brand); background: var(--brand-soft); }
.modelos small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.copia-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.copia-btns button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 6px; font-size: 13.5px; }

/* Barra inferior */
nav.bottom { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(16,17,20,.97); border-top: 1px solid var(--line); padding: 6px 8px max(8px, env(safe-area-inset-bottom)); z-index: 20; }
nav.bottom .in { width: min(560px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; }
nav.bottom button { background: none; border: 0; padding: 6px 0; display: grid; justify-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); }
nav.bottom svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
nav.bottom button.on { color: var(--ink); }
nav.bottom button.on svg { stroke: var(--brand-ink); }
nav.bottom .plus { width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 28px; line-height: 1; display: grid; place-items: center; margin: -18px auto 0; box-shadow: 0 8px 22px rgba(0,102,255,.35); }

/* --- App real (2026-10-14): ajustes desplegables, avisos y formulario de valoración --- */
details.how { border-top: 1px solid var(--line); padding: 10px 0; font-size: 14px; }
details.how:first-of-type { border-top: 0; }
details.how summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details.how summary::after { content: "›"; color: var(--muted); }
details.how[open] summary::after { content: "⌄"; }
details.how p { color: var(--muted); margin: 8px 0 0; font-size: 13.5px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; z-index: 60; background: var(--ink); color: #000; border-radius: 999px; padding: 10px 16px; font-size: 14px; font-weight: 600; display: none; }
.toast.show { display: block; }
.status-msg { font-size: 13px; color: var(--muted); margin-top: 8px; min-height: 18px; }
.manual-only { display: none; }
.sheet.manual .manual-only { display: block; }
.sheet.molestia .no-molestia { display: none; }
.field input[type="date"], .field input[type="text"], .field select { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); padding: 10px; font: inherit; }
.loading { color: var(--muted); text-align: center; padding: 30px 0; }
.chip:disabled { opacity: .5; }
.verdict.l- { background: var(--panel); border-color: var(--line); }
.verdict.l- .eyebrow { color: var(--muted); }

/* Ejercicio plegado durante la sesión: solo título y resumen de las series hechas (2026-10-15). */
.ex-resumen { display: none; font-size: 13px; color: var(--muted); margin-top: 4px; }
.ex.folded .ex-resumen { display: block; }
.ex.folded .last, .ex.folded .suggest, .ex.folded .ref { display: none; }
.ex .ex-top { cursor: pointer; }

/* Cambiar ejercicio por otro equivalente (2026-10-24) */
.fat { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 0 6px; margin-left: 4px; vertical-align: 1px; }
.fat.B { background: var(--green-soft); color: var(--green); } .fat.M { background: var(--orange-soft); color: var(--orange); } .fat.A { background: var(--red-soft); color: var(--red); }
#swapZona { flex-wrap: wrap; }

/* Tu semana: planificación con el coach (semana.js, 2026-10-24) */
.smplan { background: var(--panel); border: 1px solid #3a3a3a; border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
.smpasos { display: flex; gap: 6px; margin-bottom: 10px; }
.smpasos span { flex: 1; text-align: center; font-size: 12px; color: var(--faint); border-bottom: 2px solid var(--line); padding-bottom: 5px; }
.smpasos span.on { color: var(--ink); border-color: var(--ink); } .smpasos span.hecho { color: var(--muted); border-color: var(--muted); }
.smcta { display: block; width: 100%; background: var(--ink); color: #0a0a0a; border: 0; border-radius: 12px; padding: 12px; font-weight: 700; margin-top: 10px; }
.smcta[disabled] { opacity: .4; }
.smlink { background: none; border: 0; color: var(--muted); font-size: 13px; padding: 8px 0 0; text-decoration: underline; }
.smcheck { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 10px; cursor: pointer; }
.smcheck .box { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--muted); display: grid; place-items: center; font-weight: 800; flex: none; }
.smcheck.on .box { background: var(--ink); color: #0a0a0a; border-color: var(--ink); }
.smday { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; margin-bottom: 8px; }
.smday.hoy { border-color: #5a5a5a; } .smday.pasado { opacity: .7; }
.smday-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.smday-h b { font-size: 14px; }
.smses { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; margin-top: 6px; cursor: pointer; }
.smses .bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c); }
.smses .t { font-weight: 600; } .smses .m { font-size: 12.5px; color: var(--muted); }
.smses .r { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.smses .tag { font-size: 11px; border-radius: 6px; padding: 1px 6px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.smses .tag.det { color: var(--orange); border-color: #5a4320; } .smses .tag.acad { color: var(--brand-ink); border-color: #23395c; } .smses .tag.modo { color: var(--fza); border-color: #23395c; }
.smses .tag.dura { color: #ff8a80; border-color: #5a2320; background: var(--red-soft); }
.smduro { font-size: 12px; border-radius: 999px; padding: 4px 10px; border: 1px dashed #5a2320; color: #ff8a80; background: none; white-space: nowrap; }
.smduro.on { border-style: solid; background: var(--red-soft); font-weight: 600; }
.smmas { display: block; width: 100%; margin-top: 6px; background: none; border: 1px dashed var(--line); border-radius: 10px; padding: 6px; color: var(--muted); font-size: 13px; }
.smmenu { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.smmenu button { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 6px 11px; font-size: 13px; }
.smprop { background: var(--orange-soft); border: 1px solid #5a4320; border-radius: 12px; padding: 10px; margin-top: 8px; font-size: 13.5px; }
.smprop.aviso { background: var(--panel-2); border-color: var(--line); }
.smprop .acc { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.smprop .acc button { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 13px; }
.smprop .acc button.si { background: var(--ink); color: #0a0a0a; border-color: var(--ink); font-weight: 600; }
.smaviso { display: block; width: 100%; text-align: left; margin-top: 8px; background: var(--orange-soft); border: 1px solid #5a4320; color: var(--orange); border-radius: 12px; padding: 9px 10px; font-size: 13.5px; }
.smhueco { border-top: 1px solid var(--line); padding: 9px 0; }
.smhueco .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.smcambiar { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px; font-size: 13px; flex: none; }
.smalts { margin-top: 6px; }
.smgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 6px; }
.smgrid button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 7px 0; font-weight: 600; }
.smgrid button.on { background: var(--ink); color: #0a0a0a; }
.smtira { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.smtira-d { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; border-radius: 10px; font-size: 12px; color: var(--muted); }
.smtira-d.hoy { background: var(--panel-2); color: var(--ink); font-weight: 700; }
.smtira-d i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.smtira-d i.dura { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px #ff8a80; }
.plan-aviso { background: #11233f; border: 1px solid #23395c; color: #bcd4ff; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-size: 13.5px; }

/* Copia local: la app se abrió desde el móvil porque no respondía (2026-10-25) */
.copia-local { background: var(--orange-soft); border: 1px solid #5a4320; color: #ffd8a8; border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: 13px; }
.copia-local b { color: var(--orange); display: block; margin-bottom: 2px; }

/* Calentamiento antes de la fuerza (2026-10-25) */
.calienta { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.calienta-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.calienta-i { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 9px 0; font-size: 14px; }
.calienta-i:first-of-type { border-top: 0; }
.calienta-i small { display: block; color: var(--muted); font-size: 12px; }
.calienta-i .cb { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--muted); flex: none; margin-top: 1px; }
.calienta-i.on .cb { background: var(--green); border-color: var(--green); }
.calienta-i.on > span:last-child { color: var(--muted); text-decoration: line-through; }
.smses .tag.hecha { color: var(--green); border-color: #1f4a2c; background: var(--green-soft); }
.smaviso.mov { background: var(--panel-2); border-color: var(--line); color: var(--ink); }

/* Entrada sin sesión (fase 3, 2026-10-27): tapa la app hasta entrar con Google. */
.entrada { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.entrada-in { width: min(420px, 100%); text-align: center; }
.entrada img { width: 76px; height: 76px; border-radius: 20px; }
.entrada h1 { margin: 14px 0 6px; font-size: 28px; }
.entrada p { color: var(--muted); margin: 0 0 8px; }
.entrada .copia-local { text-align: left; margin-top: 12px; }

/* Más (fase 5, 2026-10-27): separa las secciones de los ajustes. */
.mas-sep { margin: 22px 4px 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* El BJJ de hoy dentro del consejo de "Hoy entrenas" (2026-10-27). */
.bjj-hoy { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
/* En la portada de Jiu-jitsu va dentro de su propia tarjeta: sin la raya de separación (2026-10-29). */
.card > .bjj-hoy { margin-top: 0; padding-top: 0; border-top: 0; }

/* Módulos por persona (fase 4, 2026-10-27): lo que no es de sus módulos no se ve. Con solo jiu-jitsu, la barra queda en
   Jiu-jitsu · + · Coach. */
[data-mod][hidden] { display: none !important; }
body.solo-bjj nav.bottom .in { grid-template-columns: repeat(3, 1fr); }
/* Pantalla de carga (2026-10-29): después de la de Android, que pone el icono pequeño, el logo en grande. */
#arranque { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: grid; place-content: center; justify-items: center; gap: 18px; transition: opacity .35s ease; }
#arranque img { width: min(58vw, 280px); height: auto; border-radius: 26%; }
#arranque span { font-weight: 800; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
#arranque.fuera { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #arranque { transition: none; } }
