/* IronQx — Builder: superseries, técnicas, revisión del plan, volumen y duplicar
   (js/30b-builder-pro.js), y cómo se ven en la rutina y el modo entrenamiento.
   Mismo diseño que IronBase con el dorado de IronQx. */
#m-routine-builder, .rbd-sheet, .rnw, #wp { --bxp-acc: var(--rn-acc, #C9A84C); }
#m-routine-builder .rb-ex-row { position: relative; }
#m-routine-builder .rb-ex-row:has(.rb-ss-link) { margin-bottom: 18px; }
/* Botón «Unir» entre dos ejercicios, centrado sobre el espacio que los separa */
.rb-ss-link { position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px 0 7px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: var(--bg, #121212);
  color: var(--muted, #888); font: inherit; font-size: 10px; font-weight: 800; letter-spacing: .03em; cursor: pointer; opacity: .75; }
.rb-ss-link svg { width: 13px; height: 13px; }
.rb-ss-link:active { transform: translateX(-50%) scale(.95); }
.rb-ss-link.is-on { opacity: 1; color: var(--bxp-acc); border-color: color-mix(in srgb, var(--bxp-acc) 55%, transparent); background: color-mix(in srgb, var(--bxp-acc) 14%, var(--bg, #121212)); }
/* Ejercicios de una superserie: borde de color que los une */
#m-routine-builder .rb-ex-row.is-ss { border-left: 3px solid var(--bxp-acc) !important; }
#m-routine-builder .rb-ex-row.is-ss:not(.is-ss-last) { border-bottom-left-radius: 6px; }
#m-routine-builder .rb-ex-row.is-ss:not(.is-ss-first) { border-top-left-radius: 6px; }
.rb-ss-tag { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 900; letter-spacing: .02em; vertical-align: 1px;
  color: #fff; background: color-mix(in srgb, var(--bxp-acc) 82%, #000); }
.rb-pill-tech { color: #c084fc !important; background: rgba(192,132,252,.12) !important; }
.rb-pill-tempo { color: #5eead4 !important; background: rgba(94,234,212,.1) !important; }

/* Revisión del plan */
.rbr-card { margin: 0 0 14px; padding: 14px; border-radius: 18px; border: 1px solid rgba(255,255,255,.09); background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); }
.rbr-card.has-warn { border-color: rgba(245,158,11,.3); }
.rbr-card.is-ok { border-color: rgba(52,211,153,.28); }
.rbr-head { display: flex; align-items: center; gap: 10px; }
.rbr-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; font-size: 15px; flex-shrink: 0; color: #111; background: #f59e0b; }
.rbr-card.is-ok .rbr-ic { background: #34d399; }
.rbr-head b { display: block; font-size: 14px; font-weight: 800; color: var(--txt, #fff); }
.rbr-head small { display: block; margin-top: 1px; font-size: 11.5px; color: var(--muted, #888); }
.rbr-days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.rbr-day { flex: 1 1 calc(50% - 3px); min-width: 0; display: inline-flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 11px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.rbr-day b { font-size: 11.5px; font-weight: 800; color: var(--txt, #fff); }
.rbr-day i { font-style: normal; font-size: 10.5px; color: var(--muted, #888); }
.rbr-day.is-long { border-color: rgba(245,158,11,.4); }
.rbr-day.is-long i { color: #fbbf24; }
.rbr-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.rbr-list li { position: relative; padding: 9px 10px 9px 30px; border-radius: 11px; font-size: 12px; line-height: 1.5; color: var(--txt2, #c8c8c8); background: rgba(255,255,255,.03); }
.rbr-list li b { color: var(--txt, #fff); }
.rbr-list li::before { position: absolute; left: 10px; top: 9px; font-weight: 900; font-size: 12px; }
.rbr-list li.is-warn::before { content: '!'; color: #fbbf24; left: 13px; }
.rbr-list li.is-ok::before { content: '✓'; color: #34d399; }

/* Hoja de duplicar día */
.rbd-sheet { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: flex-end; justify-content: center; }
.rbd-bg { position: absolute; inset: 0; background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: rbd-fade .2s ease both; }
.rbd-card { position: relative; width: 100%; max-width: 520px; display: grid; gap: 8px; padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 16px); border-radius: 24px 24px 0 0;
  background: var(--bg2, #16161a); border: 1px solid rgba(255,255,255,.1); border-bottom: 0; animation: rbd-up .28s cubic-bezier(.2,.8,.2,1) both; }
.rbd-grip { width: 40px; height: 5px; margin: 0 auto 8px; border-radius: 999px; background: rgba(255,255,255,.18); }
.rbd-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--bxp-acc); }
.rbd-card > strong { font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--txt, #fff); margin-bottom: 6px; }
.rbd-opt { display: grid; gap: 3px; width: 100%; padding: 13px 14px; border-radius: 15px; text-align: left; cursor: pointer; font: inherit;
  border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.04); color: var(--txt, #fff); }
.rbd-opt:active { background: color-mix(in srgb, var(--bxp-acc) 14%, transparent); }
.rbd-opt b { font-size: 14.5px; font-weight: 800; }
.rbd-opt span { font-size: 12px; line-height: 1.45; color: var(--muted, #999); }
.rbd-note { margin: 4px 2px 0; font-size: 11.5px; line-height: 1.5; color: var(--muted, #888); }
.rbd-cancel { min-height: 46px; margin-top: 4px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: none; color: var(--txt, #fff); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
@keyframes rbd-fade { from { opacity: 0; } }
@keyframes rbd-up { from { transform: translateY(30px); opacity: 0; } }
#m-routine-builder .rb-ex-row.is-editing .rb-ss-link { display: none; }
#m-routine-builder .rb-ex-row.is-editing:has(.rb-ss-link) { margin-bottom: 8px; }
.rb-ss-link { font-family: "Inter", sans-serif; }
.rbd-card > strong { font: 900 24px/1 "Barlow Condensed", sans-serif; letter-spacing: .6px; text-transform: uppercase; }
.rbd-opt, .rbd-cancel { font-family: "Inter", sans-serif; }
.rbx-edit-help { margin: 0; font: 500 11.5px/1.5 "Inter", sans-serif; color: rgba(236,238,245,.55); }

/* Revisión y volumen arriba de las sesiones */
.rbx-pro { display: grid; gap: 12px; }
.rbx-pro:empty { display: none; }
.rbx-vol { margin: 0; }
.rbx-vol .ti-head h2 { font-size: 22px; }
.rbx-score { flex-shrink: 0; display: grid; justify-items: end; font: 700 13px/1 "Inter", sans-serif; color: rgba(236,238,245,.5); }
.rbx-score b { font: 900 30px/1 "Barlow Condensed", sans-serif; color: var(--txt); }
.rbx-score small { margin-top: 4px; font: 800 9px/1 "Inter", sans-serif; letter-spacing: 1.2px; text-transform: uppercase; }

/* Duplicar sesión */
.rbx-dup { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 12px; border-radius: 13px; cursor: pointer;
  border: 1px solid rgba(201,168,76,.28); background: rgba(201,168,76,.06); color: #f1d77a; font: 800 12.5px "Inter", sans-serif; -webkit-tap-highlight-color: transparent; }
.rbx-dup svg { width: 15px; height: 15px; }
.rbx-dup:active { transform: scale(.98); }

/* Rutina del paciente: etiquetas en la ruta del día */
.rn-tl-name .rb-ss-tag { vertical-align: 2px; }
.rn-tl-specs b.is-tech { color: #d8b4fe; background: rgba(192,132,252,.1); border-color: rgba(192,132,252,.22); }
.rn-tl-specs b.is-tempo { color: #5eead4; background: rgba(94,234,212,.08); border-color: rgba(94,234,212,.2); }
.rn-tl-extra { margin: 0 0 8px; font: 500 12.5px/1.5 "Inter", sans-serif; color: rgba(236,238,245,.7); }
.rn-tl-extra b { color: var(--txt); }

/* Modo entrenamiento: superserie, técnica y tempo */
.wp-ss { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
  background: rgba(var(--rn-acc-rgb, 201,168,76), .1); border: 1px solid rgba(var(--rn-acc-rgb, 201,168,76), .32); }
.wp-ss-tag { flex-shrink: 0; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center;
  font: 900 17px/1 "Barlow Condensed", sans-serif; letter-spacing: .5px; color: var(--rn-acc-ink, #0b0c0f); background: linear-gradient(150deg, var(--rn-acc-hi2, #F2CB68), var(--rn-acc, #C9A84C)); }
.wp-ss b { display: block; font: 800 13.5px/1.3 "Inter", sans-serif; color: var(--txt); }
.wp-ss span:not(.wp-ss-tag) { display: block; margin-top: 2px; font: 500 12px/1.45 "Inter", sans-serif; color: rgba(236,238,245,.6); }
.wp-tech-note { margin: 0; padding: 11px 14px; border-radius: 14px; font: 500 12.5px/1.5 "Inter", sans-serif; color: rgba(236,238,245,.65);
  background: rgba(192,132,252,.08); border: 1px solid rgba(192,132,252,.24); }
.wp-tech-note b { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 800; color: #d8b4fe; }
.wp-tech-note.is-tempo { background: rgba(94,234,212,.07); border-color: rgba(94,234,212,.22); }
.wp-tech-note.is-tempo b { color: #5eead4; }
.rbx-vol > summary { list-style: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rbx-vol > summary::-webkit-details-marker { display: none; }
.rbx-vol:not([open]) { padding-bottom: 16px; }
/* Encima del builder (modal a pantalla completa) */
.rbd-sheet { z-index: 12000; }
.rbd-card { background: #121317; }
