    /* CONTROLES DE VIDEO DE EJERCICIO */
    video.ex-video, .banco-d-media, .ex-media-strip-slide, .ex-vid-scrub, .ex-vid-speed {
      -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
    }
    .ex-vid-scrub {
      position: absolute; left: 0; right: 0; bottom: 0; height: 9px; z-index: 4;
      background: rgba(255,255,255,0.22); cursor: pointer; touch-action: pan-y; user-select: none;
    }
    .ex-vid-scrub-fill { height: 100%; width: 0; background: var(--green); transition: width 0.05s linear; }
    .ex-vid-speed {
      position: absolute; top: 8px; right: 8px; z-index: 5;
      background: rgba(0,0,0,0.55); color: #fff; font-size: 12px; font-weight: 700;
      padding: 5px 11px; border-radius: 999px; letter-spacing: 0.5px;
      border: none; cursor: pointer; font-family: inherit; line-height: 1;
      -webkit-tap-highlight-color: transparent;
    }
    .ex-vid-speed.on { background: var(--green); }

    /* MOBILE INPUT POPUP */
    .mobile-input-overlay {
      position: fixed; inset: 0; z-index: 1350;
      background: var(--glass-overlay);
      backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
      display: flex; align-items: center; justify-content: center;
      opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; padding: 20px;
    }
    .mobile-input-overlay.active { opacity: 1; visibility: visible; }
    .mobile-input-card {
      background: var(--glass-modal); border-radius: 24px; padding: 24px;
      width: 100%; max-width: 340px;
      backdrop-filter: blur(var(--glass-thick-blur)) saturate(2.2);
      -webkit-backdrop-filter: blur(var(--glass-thick-blur)) saturate(2.2);
      border: 1px solid var(--glass-border);
      box-shadow: 0 24px 56px rgba(0,0,0,0.45);
    }
    .mobile-input-close {
      position: absolute; top: 14px; right: 14px; z-index: 2; width: 30px; height: 30px;
      border-radius: 50%; border: none; cursor: pointer; padding: 0;
      display: flex; align-items: center; justify-content: center;
      background: var(--bg2); color: var(--text3);
      -webkit-tap-highlight-color: transparent;
    }
    .mobile-input-close:active { color: var(--text); }
    .mobile-input-label {
      font-size: 14px; font-weight: 600; color: var(--text3);
      text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
      padding-right: 34px;
    }
    .mobile-input-field {
      width: 100%; background: var(--bg2); border: 2px solid var(--border);
      color: var(--text); font-family: inherit; font-size: 18px;
      padding: 14px 16px; border-radius: 10px; outline: none; text-align: center;
    }
    .mobile-input-field:focus { border-color: #7189a8; }
    textarea.mobile-input-field { max-height: 45vh; overflow-y: auto; resize: none; text-align: left; }
    .mobile-input-prefixwrap { display: flex; align-items: stretch; }
    .mobile-input-prefix {
      display: flex; align-items: center; white-space: nowrap;
      background: var(--bg2); border: 2px solid var(--border); border-right: none;
      color: var(--text3); font-size: 14px; padding: 0 2px 0 14px;
      border-radius: 10px 0 0 10px;
    }
    .mobile-input-field--prefixed {
      border-left: none; border-radius: 0 10px 10px 0;
      text-align: left; padding-left: 2px;
    }
    .mobile-input-hint { font-size: 11px; color: var(--text3); margin-top: 8px; text-align: center; }
    .mobile-input-hint:empty { display: none; }
    .mobile-input-confirm {
      width: 100%; margin-top: 12px; padding: 14px;
      background: linear-gradient(135deg, #34d399, #8b5cf6, #3b82f6, #34d399); background-size: 400% 400%; animation: aurora 8s ease infinite; color: #fff; border: none;
      border-radius: 10px; font-family: inherit; font-size: 15px;
      font-weight: 700; cursor: pointer; text-transform: uppercase; letter-spacing: 1px;
    }
    .mobile-input-confirm:active { opacity: 0.8; }
    .mobile-input-actions { display: flex; flex-direction: column; align-items: stretch; }
    .mobile-input-actions .mobile-input-confirm { order: 1; }
    .mobile-input-clear { order: 2; align-self: center; margin-top: 10px; background: none; border: none; color: var(--text3); font-size: 13px; font-family: inherit; cursor: pointer; padding: 4px 12px; -webkit-tap-highlight-color: transparent; }
    .mobile-input-clear:active { color: var(--text); }
    .mobile-input-clear:disabled { opacity: 0.4; cursor: default; }
    .mobile-input-clear:disabled:active { color: var(--text3); }

    /* INLINE VIDEO PLAYER */
    .inline-video-panel {
      background: #000; border-radius: 0 0 var(--rs) var(--rs);
      margin-top: -2px; overflow: hidden;
      animation: inlineVideoOpen 0.3s ease;
    }
    @keyframes inlineVideoOpen {
      from { max-height: 0; opacity: 0; }
      to { max-height: 500px; opacity: 1; }
    }
    .inline-video-close {
      position: absolute; top: 8px; right: 8px; z-index: 10;
      background: rgba(0,0,0,0.6); border: none; color: #fff;
      font-size: 20px; width: 32px; height: 32px; border-radius: 50%;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      line-height: 1;
    }
    .inline-slider { position: relative; overflow: hidden; }
    .inline-slider-track { display: flex; transition: transform 0.3s ease; touch-action: pan-y; }
    .inline-slide { width: 100%; flex-shrink: 0; position: relative; aspect-ratio: 16/9; overflow: hidden; cursor: pointer; }
    .inline-slide iframe { width: 100%; aspect-ratio: 16/9; border: none; display: block; }
    .inline-slide img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
    .inline-slide .media-slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
    .inline-slide .play-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.3); }
    .inline-slide .play-icon svg { width: 40px; height: 40px; fill: #fff; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
    .inline-dots { display: flex; justify-content: center; gap: 6px; padding: 8px; background: var(--bg2); }
    .inline-dot {
      width: 8px; height: 8px; border-radius: 50%; border: none;
      background: var(--text3); cursor: pointer; padding: 0; opacity: 0.4; transition: all 0.2s;
    }
    .inline-dot.active { background: var(--green); opacity: 1; }
    .inline-slider-arrow {
      position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
      width: 28px; height: 28px; border-radius: 50%;
      background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.2);
      color: #fff; font-size: 16px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
    }
    .inline-slider-arrow.prev { left: 6px; }
    .inline-slider-arrow.next { right: 6px; }

    /* Mini-slider de medios en sets-panel expandido */
    .ex-media-strip { position: relative; overflow: hidden; background: #fff; aspect-ratio: 16 / 9; }
    .ex-media-strip-track { display: flex; transition: transform 0.3s ease; height: 100%; }
    .ex-media-strip-slide { width: 100%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; height: 100%; position: relative; }
    .ex-media-strip-slide--loading { background: var(--bg2); }
    .ex-media-strip-slide img,
    .ex-media-strip-slide video { width: 100%; height: 100%; object-fit: contain; display: block; }
    .ex-media-strip-dots { display: flex; justify-content: center; gap: 6px; padding: 8px; background: var(--bg2); }
    .ex-media-strip-dot { width: 7px; height: 7px; border-radius: 50%; border: none; padding: 0; cursor: pointer; background: var(--text3); opacity: 0.4; transition: all 0.2s; }
    .ex-media-strip-dot.active { background: var(--green); opacity: 1; }
    .ex-media-strip-arrow {
      position: absolute; top: 50%; transform: translateY(-50%) translateZ(0); z-index: 6;
      width: 28px; height: 28px; border-radius: 50%;
      background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.2);
      color: #fff; font-size: 18px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
    }
    .ex-media-strip-arrow.prev { left: 6px; }
    .ex-media-strip-arrow.next { right: 6px; }

    /* Exercise Detail Bottom Sheet */
    .ex-detail-overlay {
      position: fixed; inset: 0; z-index: 500;
      background: var(--glass-overlay);
      backdrop-filter: blur(12px) saturate(1.6);
      -webkit-backdrop-filter: blur(12px) saturate(1.6);
      opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
    }
    .ex-detail-overlay.open { opacity: 1; visibility: visible; }
    .ex-detail-sheet {
      position: fixed; bottom: 0; left: 50%; z-index: 501;
      width: 100%; max-width: 540px;
      background: var(--glass-modal);
      backdrop-filter: blur(var(--glass-thick-blur)) saturate(2.0);
      -webkit-backdrop-filter: blur(var(--glass-thick-blur)) saturate(2.0);
      border: 1px solid var(--glass-border);
      border-radius: 24px 24px 0 0; max-height: 90vh;
      display: flex; flex-direction: column;
      transform: translateX(-50%) translateY(100%);
      transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
      padding-bottom: env(safe-area-inset-bottom);
      box-shadow: 0 -12px 48px rgba(0,0,0,0.3);
      overflow: hidden;
    }
    .ex-detail-overlay.open .ex-detail-sheet { transform: translateX(-50%) translateY(0); }
    .ex-detail-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--border); margin: 12px auto 4px; flex-shrink: 0; }
    .ex-detail-header {
      padding: 8px 16px 12px; border-bottom: 1px solid var(--border);
      display: flex; align-items: flex-start; justify-content: space-between; flex-shrink: 0;
    }
    .ex-detail-names { flex: 1; min-width: 0; }
    .ex-detail-name { font-size: 15px; font-weight: 700; line-height: 1.3; }
    .ex-detail-name-en { font-size: 11px; color: var(--text3); margin-top: 2px; }
    .ex-detail-close {
      background: none; border: none; color: var(--text3); cursor: pointer;
      font-size: 22px; padding: 0 0 0 10px; line-height: 1; flex-shrink: 0;
      -webkit-tap-highlight-color: transparent;
    }
    .ex-detail-body { overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; padding: 16px 20px 24px; }
    .ex-detail-empty { font-size: 13px; color: var(--text3); text-align: center; padding: 20px 8px; }
    .ex-detail-media-wrap {
      position: relative; overflow: hidden; background: #000; flex-shrink: 0;
    }
    .ex-detail-media-track { display: flex; transition: transform 0.3s ease; }
    .ex-detail-media-slide { width: 100%; flex-shrink: 0; aspect-ratio: 1/1; overflow: hidden; }
    .ex-detail-media-slide img { width: 100%; height: 100%; object-fit: contain; background: var(--bg2); display: block; }
    .ex-detail-media-dots { display: flex; justify-content: center; gap: 6px; padding: 8px; background: var(--bg2); }
    .ex-detail-media-dot { width: 7px; height: 7px; border-radius: 50%; border: none; padding: 0; cursor: pointer; background: var(--text3); opacity: 0.4; transition: all 0.2s; }
    .ex-detail-media-dot.active { background: var(--green); opacity: 1; }
    .ex-detail-media-arrow {
      position: absolute; top: 50%; transform: translateY(-50%) translateZ(0); z-index: 6;
      width: 28px; height: 28px; border-radius: 50%;
      background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.2);
      color: #fff; font-size: 18px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
    }
    .ex-detail-media-arrow.prev { left: 8px; }
    .ex-detail-media-arrow.next { right: 8px; }
    .ex-detail-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 6px; }
    .ex-chip {
      font-size: 11px; padding: 4px 10px; border-radius: 20px;
      background: color-mix(in srgb, var(--accent) 12%, transparent);
      border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
      color: var(--text); font-weight: 500;
    }
    .ex-detail-section { padding: 4px 16px 12px; }
    .ex-detail-section-title { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; color: var(--text3); text-transform: uppercase; margin-bottom: 7px; }
    .ex-secondary-chips { display: flex; flex-wrap: wrap; gap: 5px; }
    .ex-secondary-chip { font-size: 11px; padding: 3px 9px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--border); color: var(--text2); }
    .ex-instruction-list { list-style: none; padding: 0; margin: 0; }
    .ex-instruction-step {
      display: flex; gap: 10px; padding: 8px 0;
      border-bottom: 1px solid var(--border);
      font-size: 13px; color: var(--text2); line-height: 1.5;
    }
    .ex-instruction-step:last-child { border-bottom: none; }
    .ex-instruction-num {
      width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
      background: color-mix(in srgb, var(--accent) 15%, transparent);
      color: var(--accent); font-size: 11px; font-weight: 700;
      display: flex; align-items: center; justify-content: center; margin-top: 1px;
    }
    .ex-yt-btn {
      display: flex; align-items: center; justify-content: center; gap: 7px;
      width: 100%; padding: 14px 16px;
      background: none; border: none; border-top: 1px solid var(--border);
      color: #ff4444; font-size: 13px; font-weight: 600;
      cursor: pointer; -webkit-tap-highlight-color: transparent;
    }

    /* Template list */
    .tpl-card {
      background: var(--card); border-radius: var(--r); padding: 16px;
      margin-bottom: 8px; cursor: pointer; transition: all 0.2s;
      -webkit-tap-highlight-color: transparent;
    }
    .tpl-card:active { background: var(--card-h); }
    .tpl-card--static { cursor: default; }
    .tpl-card--static:active { background: var(--card); }
    .rt-swipe { position: relative; overflow: hidden; border-radius: var(--r); margin-bottom: 8px; }
    .rt-swipe .tpl-card { margin-bottom: 0; }
    .rt-swipe-surface { position: relative; z-index: 1; transition: transform 0.25s cubic-bezier(0.22,1,0.36,1); touch-action: pan-y; }
    .rt-swipe-bg {
      position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; gap: 9px;
      padding: 0 22px; font-size: 14px; font-weight: 700; opacity: 0; transition: opacity 0.12s;
    }
    .rt-swipe-bg span { white-space: nowrap; }
    .rt-swipe-bg svg { width: 21px; height: 21px; transition: transform 0.15s; }
    .rt-swipe-bg--dup { justify-content: flex-start; background: var(--green); color: #0a1210; }
    .rt-swipe-bg--del { justify-content: flex-end; background: var(--red); color: #fff; }
    .rt-swipe--dup .rt-swipe-bg--dup { opacity: 1; }
    .rt-swipe--del .rt-swipe-bg--del { opacity: 1; }
    .rt-swipe--arm .rt-swipe-bg svg { transform: scale(1.18); }
    .tpl-card-menu-btn {
      width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
      border: 1px solid var(--border); background: var(--card-h); color: var(--text);
      display: flex; align-items: center; justify-content: center; cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
    }
    .tpl-card-menu-btn:active { background: var(--border); border-color: var(--text3); }
    .tpl-card-menu-btn svg { width: 22px; height: 22px; }
    .tpl-card--reveal { opacity: 0; transform: translateY(10px); animation: tplCardReveal 0.34s ease forwards; }
    @keyframes tplCardReveal { to { opacity: 1; transform: translateY(0); } }
    @media (prefers-reduced-motion: reduce) {
      .tpl-card--reveal { opacity: 1; transform: none; animation: none; }
      .tagfilter-chips--animating { transition: none; }
    }
    .tpl-name { font-size: 14px; font-weight: 700; }
    .tpl-meta { font-size: 11px; color: var(--text2); margin-top: 4px; }
    .tpl-meta--tight { margin-top: 2px; }
    .tpl-dup-btn {
      width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
      background: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; -webkit-tap-highlight-color: transparent; transition: all 0.2s;
    }
    .tpl-dup-btn svg { width: 16px; height: 16px; stroke: var(--text2); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }@media (hover: hover) {
      .tpl-dup-btn:hover { background: var(--card-h); border-color: var(--text3); }
    }@media (hover: hover) {
      .tpl-dup-btn:hover svg { stroke: var(--text); }
    }
    .tpl-dup-btn:active { background: var(--card-h); }

    /* Template Editor */
    .tpl-day-card {
      background: var(--glass-card);
      backdrop-filter: blur(20px) saturate(1.5);
      -webkit-backdrop-filter: blur(20px) saturate(1.5);
      border-radius: var(--r); margin-bottom: 12px; overflow: hidden;
      position: relative; z-index: 1;
      -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
    }
    .tpl-day-card input,
    .tpl-day-card textarea,
    .tpl-day-card [contenteditable="true"] {
      -webkit-user-select: text; user-select: text;
    }
    .tpl-day-card.csel-active { overflow: visible; z-index: 10; }
    .tpl-day-header {
      padding: 12px; display: flex; align-items: center; gap: 8px;
      border-bottom: 1px solid var(--border);
      -webkit-tap-highlight-color: transparent; cursor: pointer;
    }
    .tpl-day-header .tpl-collapse-icon {
      width: 22px; height: 22px; color: var(--text3); transition: transform 0.2s;
      flex-shrink: 0;
    }
    .tpl-day-card.collapsed .tpl-day-header { border-bottom: none; }
    .tpl-day-card.collapsed .tpl-day-header .tpl-collapse-icon { transform: rotate(-90deg); }
    .tpl-day-card.collapsed .tpl-day-body { display: none; }
    .tpl-day-num {
      width: 32px; height: 32px; border-radius: 8px; display: flex;
      align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #fff;
      text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }
    .tpl-day-title { flex: 1 1 auto; font-size: 15px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
    .tpl-block-count { flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--text3); min-width: 16px; text-align: center; }
    .tpl-more-btn svg { width: 18px; height: 18px; }
    .tpl-day-edit {
      width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
      background: none; color: var(--text3); cursor: pointer; display: flex;
      align-items: center; justify-content: center; flex-shrink: 0;
    }
    .tpl-day-edit:active { background: var(--card-h); }
    .tpl-day-edit svg { width: 16px; height: 16px; }
    .tpl-day-body { padding: 10px; }
    .tpl-ex-item {
      display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px;
      background: var(--ex-bg); border-radius: 8px; margin-bottom: 4px;
      cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .tpl-ex-item > .tpl-collapse-icon { margin-top: 3px; }
    .tpl-collapse-icon--14 { width: 14px; height: 14px; flex-shrink: 0; }
    .tpl-ex-item > .tpl-ex-sets-input { margin-top: -1px; }
    .tpl-ex-item > .tpl-ex-del { margin-top: -8px; }
    .tpl-ex-thumb {
      width: 42px; height: 42px; border-radius: 8px; background: var(--bg2);
      overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    }
    .tpl-ex-thumb img { width: 100%; height: 100%; object-fit: contain; background: var(--bg2); }
    .tpl-ex-info { flex: 1; min-width: 0; }
    .tpl-ex-name { font-size: 14px; font-weight: 600; }
    .tpl-ex-cap {
      display: inline-flex; align-items: center; gap: 2px;
      height: 26px; padding: 0 9px 0 6px; border-radius: 13px; box-sizing: border-box;
      background: rgba(107,155,150,0.15); color: var(--green);
      flex-shrink: 0; margin-top: 1px;
    }
    .tpl-ex-cap-chev { width: 11px; height: 11px; flex-shrink: 0; }
    .tpl-ex-cap-letter { font-size: 11px; font-weight: 700; letter-spacing: 0.3px; line-height: 1; }
    .tpl-ex-sets-input {
      width: 96px; background: var(--bg2); border: 1px solid var(--border); color: var(--text);
      font-family: inherit; font-size: 14px; font-weight: 600; padding: 8px 6px;
      border-radius: 8px; text-align: center; outline: none;
    }
    .tpl-unit-toggle {
      display: inline-flex; background: var(--bg2); border: 1px solid var(--border);
      border-radius: 8px; padding: 2px; gap: 2px;
    }
    .tpl-unit-opt {
      font-family: inherit; font-size: 10px; font-weight: 600; letter-spacing: 0.3px;
      color: var(--text3); background: transparent; border: 0; cursor: pointer;
      padding: 3px 8px; border-radius: 6px; line-height: 1.2;
    }
    .tpl-unit-opt.active { background: var(--card); color: var(--text); }
    .tpl-prep-field { margin-top: 8px; }
    .tpl-metric-pill {
      display: flex; align-items: center; gap: 8px; width: 100%; height: 40px;
      padding: 0 12px; box-sizing: border-box;
      background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
      color: var(--text); cursor: pointer; text-align: left;
      -webkit-tap-highlight-color: transparent;
      transition: border-color .15s ease, background .15s ease;
    }
    .tpl-metric-pill:active { background: var(--card-h); }
    .tpl-metric-ico { flex: 0 0 auto; display: flex; }
    .tpl-metric-ico svg { width: 16px; height: 16px; display: block; color: var(--green); }
    .tpl-metric-val { font-size: 18px; font-weight: 700; line-height: 1; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .tpl-metric-unit { font-size: 12px; font-weight: 600; color: var(--text3); }
    .tpl-metric-edit { margin-left: auto; flex: 0 0 auto; display: flex; }
    .tpl-metric-edit svg { width: 15px; height: 15px; display: block; color: var(--text3); }
    .tpl-metric-pill.is-empty .tpl-metric-val { color: var(--text3); font-weight: 600; font-size: 14px; }

    .metric-seg {
      display: flex; gap: 4px; background: var(--bg2); border: 1px solid var(--border);
      border-radius: 10px; padding: 4px; margin-bottom: 18px;
    }
    .metric-tab {
      flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
      height: 52px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
      color: var(--text3); font-family: inherit; font-size: 12px; font-weight: 600;
      -webkit-tap-highlight-color: transparent; transition: background .15s ease, color .15s ease;
    }
    .metric-tab svg { width: 18px; height: 18px; }
    .metric-tab.active { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
    .metric-tab.active svg { color: var(--green); }
    .metric-pane { display: flex; flex-direction: column; gap: 10px; }
    .metric-lbl { font-size: 12px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.04em; }
    .metric-stepper { display: flex; align-items: stretch; gap: 10px; }
    .metric-step {
      flex: 0 0 52px; height: 52px; border: 1px solid var(--border); border-radius: 10px;
      background: var(--bg2); color: var(--text); font-size: 24px; cursor: pointer;
      -webkit-tap-highlight-color: transparent; display: flex; align-items: center; justify-content: center;
    }
    .metric-step:active { background: var(--card-h); }
    .metric-num {
      flex: 1; min-width: 0; height: 52px; text-align: center;
      background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
      color: var(--text); font-family: inherit; font-size: 22px; font-weight: 700; outline: none;
    }
    .metric-num:focus { border-color: var(--green); }
    .metric-num::placeholder { color: var(--text3); opacity: 0.5; }
    .metric-dist-head { display: flex; align-items: center; justify-content: space-between; }
    .metric-sub { display: flex; gap: 2px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
    .metric-sub-opt {
      min-width: 44px; height: 34px; border: 0; border-radius: 6px; background: transparent;
      color: var(--text3); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .metric-sub-opt.on { background: var(--green); color: #fff; }
    .metric-num-wrap { display: flex; align-items: center; gap: 8px; }
    .metric-num-wrap .metric-num { flex: 1; }
    .metric-num-sfx { flex: 0 0 auto; font-size: 14px; font-weight: 600; color: var(--text3); min-width: 24px; }
    .metric-time-btn {
      height: 56px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg2);
      color: var(--text); font-family: inherit; font-size: 22px; font-weight: 700; cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .metric-time-btn.is-empty { font-size: 15px; font-weight: 600; color: var(--text3); }
    .metric-time-btn:active { background: var(--card-h); }

    .tpl-spx-row { display: flex; align-items: center; gap: 10px; }
    .tpl-spx-series { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
    .tpl-spx-series-k { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; color: var(--text3); text-transform: uppercase; }
    .tpl-spx-series-in {
      width: 44px; height: 40px; text-align: center; font-size: 18px; font-weight: 700; color: var(--text);
      background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; outline: none; font-family: inherit;
    }
    .tpl-spx-x { color: var(--text3); font-size: 15px; }
    .tpl-spx-row .tpl-metric-pill { flex: 1; }
    .tpl-spx-foot { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin-top: 12px; }
    .tpl-spx-int { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
    .tpl-spx-int-k { font-size: 11px; font-weight: 700; color: var(--text3); }
    .tpl-spx-int-k--tog { display: inline-block; min-width: 26px; text-align: center; }
    .tog-cube { position: relative; display: inline-block; vertical-align: middle; transform-style: preserve-3d; }
    .tog-cube-face {
      position: absolute; inset: 0; text-align: center; white-space: nowrap;
      backface-visibility: hidden; -webkit-backface-visibility: hidden;
    }
    .tog-shimmer {
      --tog-hl: #a8d4cf;
      background: linear-gradient(100deg, var(--green) 42%, var(--tog-hl) 50%, var(--green) 58%);
      background-size: 200% 100%;
      -webkit-background-clip: text; background-clip: text;
      color: transparent; -webkit-text-fill-color: transparent;
      animation: togShimmer 1000ms ease-in-out 1;
    }
    [data-theme="light"] .tog-shimmer { --tog-hl: #4d7d78; }
    @keyframes togShimmer { from { background-position: 0% 0; } to { background-position: 100% 0; } }
    .tpl-spx-int-in {
      width: 48px; height: 34px; text-align: center; font-family: inherit;
      background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
      font-size: 14px; font-weight: 700; color: var(--text); outline: none;
    }
    .tpl-spx-note { font-size: 12px; color: var(--text3); }
    .tpl-spx-foot .tpl-sp-link { margin-left: auto; white-space: nowrap; flex: 0 0 auto; }
    /* Input numerico custom — solo digitos, sin spinners nativos */
    .num-input {
      background: var(--bg2); border: 1px solid var(--border); color: var(--text);
      font-family: inherit; font-size: 14px; font-weight: 600; padding: 8px 6px;
      border-radius: 6px; text-align: center; outline: none;
      -moz-appearance: textfield;
    }
    .num-input::-webkit-outer-spin-button,
    .num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .tpl-ex-del {
      background: none; border: 1px solid transparent; color: var(--text3); font-size: 11px;
      cursor: pointer; padding: 6px; border-radius: 8px; transition: all 0.2s;
      display: flex; align-items: center; justify-content: center;
      width: 36px; height: 36px; flex-shrink: 0;
      -webkit-tap-highlight-color: transparent;
    }
    .tpl-ex-del:active { background: rgba(255,68,68,0.15); border-color: rgba(255,68,68,0.3); color: var(--red); }
    .tpl-ex-del svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
    .tpl-add-btn {
      width: 100%; padding: 12px; background: none; border: 1px dashed var(--border);
      color: var(--text3); font-size: 14px; font-family: inherit; border-radius: 8px;
      cursor: pointer; text-transform: uppercase; letter-spacing: 1px; margin-top: 6px;
    }
    .tpl-add-btn:active { background: var(--card); }
    .tpl-add-btn--my4 { margin: 8px 0; }
    .tpl-block-add-row { display: flex; gap: 6px; margin: 4px 0; }

    /* Serie card (simple / biserie / triserie) */
    .serie-card {
      margin-bottom: 10px; border: 1px solid var(--border); border-radius: var(--rs); overflow: hidden;
    }
    .serie-header {
      display: flex; align-items: center; gap: 8px; padding: 8px 12px;
      background: var(--bg); border-bottom: 1px solid var(--border);
    }
    .serie-type-badge {
      font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
      padding: 3px 8px; border-radius: 10px; white-space: nowrap;
    }
    .serie-type-badge.simple { background: rgba(255,255,255,0.06); color: var(--text3); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.08); }
    [data-theme="light"] .serie-type-badge.simple { background: rgba(0,0,0,0.04); color: var(--text3); border-color: rgba(0,0,0,0.06); }
    .serie-type-badge.biserie { background: rgba(77,182,172,0.15); color: var(--st-biserie); }
    .serie-type-badge.triserie { background: rgba(129,199,132,0.15); color: var(--st-triserie); }
    .serie-type-badge.prep { background: rgba(76,163,106,0.14); color: var(--bt-prep, #4ca36a); }
    .serie-body { padding: 8px; }
    .serie-rest {
      display: flex; align-items: center; gap: 6px; padding: 6px 10px;
      font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px;
    }
    .serie-rest input {
      width: 50px; background: var(--bg2); border: 1px solid var(--border); color: var(--text);
      font-family: inherit; font-size: 11px; font-weight: 600; padding: 4px 6px;
      border-radius: 4px; text-align: center; outline: none;
    }
    .serie-detail-input {
      width: 100%; background: var(--bg2); border: 1px solid var(--border); color: var(--text);
      font-family: inherit; font-size: 13px; line-height: 1.4; padding: 10px;
      border-radius: 6px; outline: none; margin-top: 6px; resize: none; display: block;
    }
    .serie-detail-input:focus { border-color: #9b7dd4; }
    .serie-detail-input::placeholder { color: var(--text3); }

    /* Redesigned editor: exercise-first */
    .tpl-exercise {
      background: none; border-radius: 0; margin-bottom: 0;
      padding: 12px 0; position: relative;
    }
    .tpl-exercise + .tpl-exercise::before {
      content: ''; position: absolute; top: 0; left: 10%; right: 10%;
      height: 1px; background: var(--border);
    }
    .tpl-exercise .tpl-ex-item { padding: 0; background: none; margin-bottom: 0; }
    .tpl-superset {
      border: 1px solid var(--border); border-radius: var(--rs);
      margin-bottom: 8px; overflow: visible;
      background: var(--glass-card);
      backdrop-filter: blur(16px) saturate(1.4);
      -webkit-backdrop-filter: blur(16px) saturate(1.4);
    }
    .tpl-superset-header {
      display: flex; align-items: center; gap: 8px; padding: 8px 12px;
      border-bottom: 1px solid var(--border);
      background: rgba(255,255,255,0.04);
      cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .tpl-superset-header .tpl-collapse-icon {
      width: 16px; height: 16px; color: var(--text3); transition: transform 0.2s;
      flex-shrink: 0;
    }
    .tpl-superset.collapsed .tpl-superset-header { border-bottom: none; }
    .tpl-superset.collapsed .tpl-superset-header .tpl-collapse-icon { transform: rotate(-90deg); }
    .tpl-superset.collapsed .tpl-superset-body { display: none; }
    .tpl-superset-body { padding: 4px 12px 8px; }
    .tpl-superset-body > .tpl-exercise {
      padding: 9px 10px; margin: 4px 0;
      background: var(--ex-bg, var(--bg2)); border-radius: 10px;
    }
    .tpl-superset-body > .tpl-exercise + .tpl-exercise::before {
      display: none;
    }
    .tpl-fields-row {
      display: flex; gap: 6px; margin-top: 10px; flex-wrap: nowrap; align-items: flex-end;
    }
    .tpl-field {
      display: flex; flex-direction: column; gap: 4px; font-size: 10px;
      color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px;
    }
    .tpl-field > span { font-size: 9px; letter-spacing: 0.8px; font-weight: 600; }
    .tpl-field-lbl { display: inline-flex; align-items: center; gap: 4px; }
    .tpl-field-info {
      background: none; border: none; padding: 2px; margin: 0; display: inline-flex;
      color: var(--text3); cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .tpl-field-info svg { width: 13px; height: 13px; }
    .tpl-type-info {
      background: none; border: none; padding: 2px; margin: 0; display: inline-flex;
      align-items: center; color: var(--text3); cursor: pointer;
      flex-shrink: 0; -webkit-tap-highlight-color: transparent;
    }
    .tpl-type-info svg { width: 15px; height: 15px; }
    .tpl-field input, .tpl-field select {
      background: var(--bg2); border: 1px solid var(--border); color: var(--text);
      font-family: inherit; font-size: 14px; padding: 8px 6px;
      border-radius: 6px; outline: none;
    }
    .tpl-field .csel { margin-bottom: 0; }
    .tpl-field .csel-trigger {
      font-size: 11px; padding: 7px 8px; min-height: 32px;
    }
    .tpl-field input { width: 56px; text-align: center; }
    .tpl-field input.tempo-input { width: 56px; }
    .tpl-fields-toggle {
      background: none; border: none; color: var(--text3); font-size: 10px;
      cursor: pointer; padding: 4px 0; font-family: inherit;
      letter-spacing: 0.5px; text-transform: uppercase;
    }@media (hover: hover) {
      .tpl-fields-toggle:hover { color: var(--text2); }
    }
    .method-tag {
      display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
      text-transform: uppercase; padding: 2px 6px; border-radius: 4px;
      background: rgba(107,143,130,0.15); color: #6b8f82;
    }
    .method-tag.drop_set { background: rgba(139,127,170,0.15); color: #8b7faa; }
    .method-tag.rest_pause { background: rgba(113,137,168,0.15); color: #7189a8; }
    .method-tag.cluster { background: rgba(176,141,87,0.15); color: #b08d57; }
    .method-tag.ael { background: rgba(168,107,107,0.15); color: #a86b6b; }
    .method-tag.myo_reps { background: rgba(107,143,130,0.15); color: #6b8f82; }
    .method-tag--multi { background: rgba(155,125,212,0.15); color: #8b7faa; }
    .tpl-method-params {
      display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
      margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--bg2);
    }
    .tpl-method-info {
      flex-basis: 100%; display: inline-flex; align-items: center; gap: 6px;
      width: fit-content; background: none; border: none; padding: 4px 0; margin: 0;
      color: var(--text2); font-family: inherit; font-size: 13px; font-weight: 600;
      cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .tpl-method-info svg { width: 15px; height: 15px; flex-shrink: 0; stroke: var(--text3); }
    .tpl-method-note { flex-basis: 100%; font-size: 12px; line-height: 1.4; color: var(--text3); }
    .tpl-field--off { opacity: 0.4; }
    .stepper--off { opacity: 0.55; }
    .stepper--off .stepper-btn { cursor: not-allowed; }
    .tpl-field-req { color: var(--green); font-weight: 700; }
    .tempo-input--req { border-color: var(--green); }
    .tpl-method-field { display: flex; flex-direction: column; gap: 4px; }
    .tpl-method-field > span {
      font-size: 9px; letter-spacing: 0.8px; font-weight: 600;
      color: var(--text3); text-transform: uppercase;
    }
    .tpl-method-field .num-input { width: 72px; }
    .tpl-method-field .tempo-input {
      width: 96px; background: var(--bg2); border: 1px solid var(--border);
      color: var(--text); font-family: inherit; font-size: 14px; font-weight: 600;
      padding: 8px 6px; border-radius: 6px; text-align: center; outline: none;
    }
    .tpl-method-field .stepper-val {
      width: 56px; background: var(--bg2); border: 1px solid var(--border);
      border-radius: 6px; padding: 8px 6px; text-align: center;
    }
    .tpl-method-unit { text-transform: none; letter-spacing: 0; font-weight: 500; }
    .tpl-method-bool { align-self: center; margin-top: 14px; }

    /* Carga de series v2 — metodo-primero (sets_plan) */
    .tpl-sp { margin-top: 12px; }
    .tpl-sp-head {
      display: flex; align-items: center; justify-content: space-between;
      gap: 10px; margin-bottom: 10px;
      max-height: 48px; overflow: hidden;
      transition: max-height .3s ease, opacity .22s ease, margin-bottom .3s ease;
    }
    .tpl-sp.is-time .tpl-sp-head { max-height: 0; opacity: 0; margin-bottom: 0; pointer-events: none; }
    .tpl-sp-cell--int, .tpl-sp-cell-sep--con {
      overflow: hidden; max-width: 90px;
      transition: max-width .3s ease, opacity .22s ease, padding .3s ease;
    }
    .tpl-sp.is-time .tpl-sp-cell--int,
    .tpl-sp.is-time .tpl-sp-cell-sep--con { max-width: 0; opacity: 0; padding: 0; pointer-events: none; }
    .tpl-sp.is-time .tpl-sp-tempo { display: none; }
    .tpl-sp-lbl {
      font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
      text-transform: uppercase; color: var(--text3);
    }
    .tpl-sp-lbl-grp { display: inline-flex; align-items: center; gap: 3px; }
    .tpl-sp-lbl-grp .tpl-type-info svg { width: 13px; height: 13px; }
    .tpl-sp-tempo { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
    .tpl-sp-tempo .tempo-input {
      width: 92px; height: 36px; background: var(--bg2); border: 1px solid var(--border);
      color: var(--text); font-family: inherit; font-size: 14px; font-weight: 600;
      padding: 0 8px; border-radius: 8px; text-align: center; outline: none; cursor: pointer;
    }
    .tpl-int-toggle {
      display: inline-flex; background: var(--bg2); border: 1px solid var(--border);
      border-radius: 8px; padding: 2px; gap: 2px;
    }
    .tpl-int-opt {
      font-family: inherit; font-size: 10px; font-weight: 700; letter-spacing: 0.3px;
      color: var(--text3); background: transparent; border: 0; cursor: pointer;
      padding: 4px 11px; border-radius: 6px; line-height: 1.2;
      -webkit-tap-highlight-color: transparent;
    }
    .tpl-int-opt.active { background: var(--card); color: var(--text); }

    .tpl-sp-express {
      display: flex; align-items: flex-end; gap: 6px; flex-wrap: wrap;
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: 10px; padding: 12px 10px;
    }
    .tpl-sp-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
    .tpl-sp-cell-k {
      font-size: 8px; font-weight: 700; letter-spacing: 0.6px;
      text-transform: uppercase; color: var(--text3);
    }
    .tpl-sp-cell-in {
      width: 50px; background: var(--card); border: 1px solid var(--border); color: var(--text);
      font-family: inherit; font-size: 16px; font-weight: 700; padding: 7px 4px;
      border-radius: 8px; text-align: center; outline: none;
    }
    .tpl-sp-reps-in { width: 56px; }
    .tpl-sp-time-btn {
      width: 64px; cursor: pointer; -webkit-tap-highlight-color: transparent;
      display: inline-flex; align-items: center; justify-content: center;
    }
    .tpl-sp-time-btn svg { width: 17px; height: 17px; display: block; stroke: var(--text3); }
    .tpl-sp-cell-in::placeholder, .tpl-srow-input::placeholder { color: var(--text3); opacity: 0.55; font-weight: 600; }
    .tpl-sp-cell-sep { font-size: 12px; color: var(--text3); padding-bottom: 10px; }
    .tpl-sp-express-foot {
      display: flex; align-items: center; justify-content: space-between;
      gap: 10px; flex-wrap: wrap; margin-top: 11px;
    }
    .tpl-sp-detail-head {
      display: flex; align-items: center; justify-content: space-between;
      gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
    }
    .tpl-sp-summary {
      font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: 0.2px;
    }
    .tpl-sp-link {
      display: inline-flex; align-items: center; gap: 1px;
      background: none; border: none; padding: 4px 0; font-family: inherit;
      font-size: 12px; font-weight: 700; color: var(--green); cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .tpl-sp-link--detail { font-size: 11px; }
    .tpl-sp-link-arrow { font-size: 13px; line-height: 1; }
    .tpl-sp-link-chev { width: 14px; height: 14px; flex-shrink: 0; transition: transform 0.22s ease; }
    .tpl-sp-link--detail.is-open .tpl-sp-link-chev { transform: rotate(180deg); }

    .tpl-sp-table {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: 10px; padding: 12px; box-sizing: border-box; width: 100%;
    }
    .tpl-sp-table-head {
      display: flex; align-items: center; justify-content: space-between;
      gap: 8px; margin-bottom: 10px; flex-wrap: wrap;
    }
    .tpl-sp-table-t {
      font-size: 9px; font-weight: 700; letter-spacing: 0.7px;
      text-transform: uppercase; color: var(--text3);
    }
    .tpl-sp-pyramid {
      display: inline-flex; align-items: center; background: var(--card);
      border: 1px solid var(--border); border-radius: 999px; overflow: hidden;
    }
    .tpl-sp-pyramid-lbl { font-size: 10px; font-weight: 700; color: var(--text2); padding: 5px 7px 5px 11px; }
    .tpl-sp-pyramid-btn {
      font-family: inherit; font-size: 12px; font-weight: 700; color: var(--text2);
      background: none; border: none; border-left: 1px solid var(--border);
      padding: 9px 12px; cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .tpl-sp-pyramid-btn:active { background: var(--card-h); color: var(--text); }
    .tpl-sp-manage-link {
      margin-left: auto; color: var(--text2); text-decoration: underline;
      text-underline-offset: 3px; font-size: 11px; padding: 4px 2px;
    }
    .tpl-sp-manage-link.is-active { color: var(--red); }
    .tpl-sp-addrow {
      width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
      margin-top: 2px; padding: 9px; font-family: inherit; font-size: 12px; font-weight: 700;
      color: var(--green); background: transparent; border: 1px dashed var(--border);
      border-radius: 10px; cursor: pointer; -webkit-tap-highlight-color: transparent;
    }

    .tpl-srow-swipe { margin-bottom: 6px; border-radius: 10px; }
    .tpl-srow-swipe .tpl-srow { margin-bottom: 0; }
    .tpl-srow-del {
      display: none; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
      background: var(--red); color: #fff; border: none; align-items: center; justify-content: center;
      font-size: 16px; font-weight: 800; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .sp-managing .tpl-srow-del { display: flex; }
    .sp-managing .tpl-srow-n { display: none; }

    .tpl-srow {
      display: flex; align-items: center; gap: 7px;
      background: var(--card); border: 1px solid var(--border);
      border-radius: 10px; padding: 8px 9px; margin-bottom: 6px;
      box-sizing: border-box; width: 100%;
    }
    .tpl-srow.has-tech { border-color: rgba(155,125,212,0.45); }
    .tpl-srow-n {
      width: 21px; height: 21px; flex: 0 0 21px; border-radius: 50%;
      background: var(--text); color: var(--bg); font-size: 11px; font-weight: 800;
      display: flex; align-items: center; justify-content: center;
    }
    .tpl-srow-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
    .tpl-srow-k {
      font-size: 7.5px; font-weight: 700; letter-spacing: 0.5px;
      text-transform: uppercase; color: var(--text3);
    }
    .tpl-srow-input {
      width: 52px; min-width: 0; max-width: 100%; box-sizing: border-box;
      font-size: 14px; font-weight: 700; padding: 6px 4px;
    }
    .tpl-srow-pickbtn { width: auto; min-width: 52px; padding: 6px 8px; cursor: pointer; line-height: 1.3; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
    .editor-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
    .editor-topbar .workout-back { margin-bottom: 0; }
    .preview-btn {
      display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; flex-shrink: 0;
      font-size: 14px; font-weight: 600; font-family: inherit; color: var(--green);
      background: rgba(52,211,153,0.12); border: 1px solid var(--green); border-radius: 20px;
      cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
    }
    .preview-btn:active { background: rgba(52,211,153,0.2); }
    .preview-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .tpl-srow-int {
      margin-left: auto; font-size: 11px; font-weight: 700;
      border-radius: 999px; padding: 4px 9px;
      background: rgba(155,125,212,0.16); color: #8b7faa;
    }
    .tpl-srow-plus {
      margin-left: auto; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px;
      background: var(--card); border: 1px dashed var(--border); color: var(--text3);
      font-size: 15px; font-weight: 700; cursor: pointer; display: flex;
      align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent;
    }
    .tpl-srow.has-tech { flex-wrap: wrap; row-gap: 8px; }
    .tpl-srow.has-tech .tpl-srow-plus { margin-left: 0; }
    .tpl-srow-plus.is-on { color: #8b7faa; border-color: rgba(155,125,212,0.45); border-style: solid; }
    .tpl-srow-techwrap {
      flex: 1 1 100%; display: flex; align-items: center;
      justify-content: space-between; gap: 8px;
    }
    .tpl-srow-techwrap .tpl-srow-int.is-tech { margin-left: 0; flex: 1 1 auto; text-align: center; }
    .tpl-srow-tech {
      flex: 1 1 100%; width: 100%; box-sizing: border-box;
      display: flex; flex-direction: column; gap: 10px;
      margin: 0 -9px -8px; padding: 11px;
      background: rgba(155,125,212,0.07); border-radius: 0 0 9px 9px;
    }
    .tpl-srow-tech .tpl-method-params { margin-top: 0; }
    .tpl-srow.tech-collapsed .tpl-srow-tech { display: none; }
    .tpl-srow-n--tech {
      width: auto; flex: 0 0 auto; border: none; border-radius: 11px;
      padding: 0 8px 0 5px; gap: 2px; cursor: pointer; font-family: inherit;
      -webkit-tap-highlight-color: transparent;
    }
    .tpl-srow-n-chev { width: 11px; height: 11px; flex-shrink: 0; transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1); }
    .tpl-srow-n--tech.is-collapsed .tpl-srow-n-chev { transform: rotate(-90deg); }
    .tpl-srow-n-num { font-size: 11px; font-weight: 800; line-height: 1; }

    @keyframes spTechIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
    .sp-tech-overlay {
      position: fixed; inset: 0; z-index: 1200; display: flex;
      align-items: center; justify-content: center;
      padding: max(20px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
      background: rgba(0,0,0,0.45);
    }
    .sp-tech-sheet {
      position: relative; width: 100%; max-width: 380px; max-height: 86dvh; overflow-y: auto;
      -webkit-overflow-scrolling: touch; background: var(--card);
      border: 1px solid var(--border); border-radius: 20px;
      padding: 18px 18px 20px; box-shadow: 0 18px 50px rgba(0,0,0,0.4);
      animation: spTechIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
    }
    .sp-tech-sheet-head {
      font-size: 16px; font-weight: 700; color: var(--text);
      margin-bottom: 14px; padding-right: 34px;
    }
    .sp-tech-x {
      position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; padding: 0;
      display: inline-flex; align-items: center; justify-content: center;
      background: var(--bg2); border: 1px solid var(--border); border-radius: 50%;
      color: var(--text2); cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .sp-tech-x svg { width: 15px; height: 15px; }
    .sp-tech-sheet-list { display: flex; flex-direction: column; gap: 6px; }
    .sp-tech-opt {
      width: 100%; text-align: left; font-family: inherit; font-size: 14px; font-weight: 600;
      color: var(--text); background: var(--bg2); border: 1px solid var(--border);
      border-radius: 10px; padding: 12px 14px; cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .sp-tech-opt.is-on { border-color: var(--green); color: var(--green); }

    .vmod-overlay {
      position: fixed; inset: 0; z-index: 1250; display: flex;
      align-items: center; justify-content: center; padding: 16px;
      background: rgba(0,0,0,0.45);
    }
    .vmod-card {
      width: 100%; max-width: 380px; max-height: 85dvh; display: flex; flex-direction: column;
      background: var(--card); border-radius: 18px; overflow: hidden;
      box-shadow: 0 10px 40px rgba(0,0,0,0.32);
    }
    .vmod-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 10px; }
    .vmod-title { font-size: 15px; font-weight: 700; color: var(--text); }
    .vmod-hint { font-size: 12px; color: var(--text3); margin-top: 2px; line-height: 1.35; }
    .vmod-x {
      flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: inline-flex;
      align-items: center; justify-content: center; background: var(--bg2);
      border: 1px solid var(--border); color: var(--text2); cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .vmod-x svg { width: 17px; height: 17px; }
    .vmod-list { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 4px 12px calc(14px + env(safe-area-inset-bottom)); overflow-y: auto; }
    .vmod-plain {
      width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
      text-align: left; font-family: inherit; background: var(--bg2);
      border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px;
      cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .vmod-acc { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
    .vmod-head {
      width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
      text-align: left; font-family: inherit; background: var(--bg2); border: none;
      padding: 13px 14px; cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .vmod-name { font-size: 14px; font-weight: 600; color: var(--text); }
    .vmod-head-r { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; }
    .vmod-check { display: none; width: 16px; height: 16px; color: #4db6ac; flex-shrink: 0; }
    .vmod-chev { width: 18px; height: 18px; color: var(--text3); flex-shrink: 0; transition: transform .2s ease; }
    .vmod-acc.is-open .vmod-chev { transform: rotate(180deg); }
    .vmod-body { display: none; padding: 0 14px 13px; }
    .vmod-acc.is-open .vmod-body { display: block; }
    .vmod-desc { font-size: 13px; color: var(--text2); line-height: 1.5; }
    .vmod-ex { font-size: 12px; color: var(--text2); margin-top: 8px; line-height: 1.45; }
    .vmod-ex-k { font-weight: 600; color: var(--text); }
    .vmod-row.is-sel, .vmod-acc.is-sel { border-color: rgba(77,182,172,0.5); }
    .vmod-acc.is-sel .vmod-head, .vmod-plain.is-sel { background: rgba(77,182,172,0.12); }
    .vmod-row.is-sel .vmod-name, .vmod-acc.is-sel .vmod-name { color: #4db6ac; }
    .is-sel .vmod-check { display: inline-block; }

    .picker-none {
      width: 100%; font-family: inherit; font-size: 14px; font-weight: 600; text-align: center;
      color: var(--text2); background: var(--bg2); border: 1px dashed var(--border);
      border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer;
      -webkit-tap-highlight-color: transparent; transition: border-color 0.15s ease, color 0.15s ease;
    }
    .picker-none.is-on { border-style: solid; border-color: var(--green); color: var(--green); }
    .tempo-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
    .tempo-row {
      display: flex; align-items: center; gap: 12px; width: 100%;
      background: var(--bg2); border: 1.5px solid var(--border); border-radius: 12px;
      padding: 10px 14px; font-family: inherit; cursor: pointer; text-align: left;
      -webkit-tap-highlight-color: transparent; transition: border-color 0.15s ease, background 0.15s ease;
    }
    .tempo-row.is-sel { border-color: var(--green); background: var(--card); }
    .tempo-row-v {
      flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
      font-size: 22px; font-weight: 700; color: var(--text); line-height: 1;
      background: var(--card); border: 1px solid var(--border); border-radius: 10px;
    }
    .tempo-row.is-sel .tempo-row-v { border-color: var(--green); color: var(--green); }
    .tempo-row-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
    .tempo-row-l {
      font-size: 13px; font-weight: 700; letter-spacing: 0.2px;
      color: var(--text); line-height: 1.2;
    }
    .tempo-row-sub {
      font-size: 11px; font-weight: 500; color: var(--text3); line-height: 1.2;
    }
    .tempo-row-unit { flex-shrink: 0; font-size: 11px; font-weight: 600; color: var(--text3); }
    .tempo-row--step { cursor: default; gap: 10px; }
    .tempo-row--step .tempo-row-txt { flex: 1; }
    .tempo-xchip {
      flex-shrink: 0; font-family: inherit; font-size: 13px; font-weight: 800; color: var(--green);
      background: none; border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px;
      cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }
    .tempo-xchip.is-on { background: var(--green); border-color: var(--green); color: #fff; }
    .tempo-stepper { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
    .tempo-step {
      width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--border);
      background: var(--card); color: var(--text); font-size: 22px; font-weight: 700; line-height: 1;
      display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .tempo-step:active { background: var(--card-h); }
    .tempo-step-v { min-width: 24px; text-align: center; font-size: 21px; font-weight: 800; color: var(--text); }
    .tempo-modal-actions { display: flex; gap: 10px; }
    .tempo-btn { flex: 1; font-family: inherit; font-size: 15px; font-weight: 700; border-radius: 12px; padding: 13px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .tempo-btn--ghost { background: none; border: 1px solid var(--border); color: var(--text2); }
    .tempo-btn--save { background: var(--green); border: 1px solid var(--green); color: #fff; }

    .int-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
    .int-opt {
      display: flex; flex-direction: column; align-items: center; gap: 5px;
      background: var(--bg2); border: 1.5px solid var(--border); border-radius: 10px;
      padding: 10px 4px; font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .int-opt.is-on { border-color: var(--green); }
    .int-opt-v { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1; }
    .int-opt-d {
      font-size: 9px; font-weight: 600; color: var(--text3); text-align: center; line-height: 1.2;
      min-height: 22px; display: flex; align-items: center; justify-content: center;
    }

    .ai-tag {
      display: inline-flex; align-items: center; gap: 3px;
      font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
      text-transform: uppercase; padding: 2px 6px; border-radius: 4px;
      background: rgba(155,125,212,0.15); color: #9b7dd4;
    }
    .ai-tag svg { width: 10px; height: 10px; }
    .workout-ex-meta .method-tag {
      font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
      padding: 3px 8px; border-radius: 5px;
      display: inline-flex; align-items: center;
      text-transform: none;
    }
    .tpl-add-exercise {
      width: 100%; padding: 14px; background: none; border: 2px dashed var(--border);
      color: var(--text2); font-size: 13px; font-family: inherit; border-radius: var(--rs);
      cursor: pointer; text-transform: uppercase; letter-spacing: 1px; margin-top: 6px;
      font-weight: 600; transition: all 0.2s;
    }
    .tpl-add-exercise:active { background: var(--card); border-color: var(--text3); }
    /* Item group (superserie dentro de un bloque) */
    .tpl-item-group {
      border: 1px solid var(--border); border-radius: 12px;
      margin: 6px 0; overflow: hidden;
      position: relative;
      background: var(--card); padding: 0;
    }
    .tpl-item-group + .tpl-item-group::before {
      display: none;
    }
    .tpl-item-header {
      display: flex; align-items: center; gap: 6px; padding: 9px 10px;
      background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .tpl-item-header .tpl-collapse-icon { color: var(--text3); transition: transform 0.2s; flex-shrink: 0; }
    .tpl-item-group.collapsed .tpl-item-header .tpl-collapse-icon { transform: rotate(-90deg); }
    .tpl-item-group.collapsed .tpl-item-body { display: none; }
    .tpl-item-summary { font-size: 12px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
    .tpl-item-group:not(.collapsed) .tpl-item-summary { display: none; }
    .tpl-item-header--stacked { flex-direction: column; align-items: stretch; gap: 7px; }
    .tpl-item-header-top { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
    .tpl-item-header-type { display: flex; align-items: center; gap: 6px; padding-left: 52px; }
    .tpl-variant-badge {
      font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
      padding: 3px 8px; border-radius: 10px; white-space: nowrap;
      color: var(--text2); background: var(--bg2); border: 1px solid var(--border);
    }
    .tpl-item-body { padding: 0 10px 10px; }
    .tpl-item-group--single .tpl-item-body { padding-bottom: 0; }
    .tpl-item-body .tpl-exercise {
      padding: 12px 10px; margin: 0 -10px;
      background: var(--ex-bg, var(--bg2)); border-radius: 0;
    }
    .tpl-item-body .tpl-exercise + .tpl-exercise::before { display: none; }
    .tpl-item-body .tpl-exercise + .tpl-exercise { border-top: 1px solid var(--border); }

    /* Footer de superserie en editor */
    .tpl-superset-footer {
      display: flex; align-items: flex-end; gap: 12px;
      padding: 8px 0 4px; border-top: 1px solid var(--border); margin-top: 8px;
    }
    .tpl-variant-chip {
      display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
      font-size: 11px; font-weight: 700; color: var(--text2);
      background: var(--bg2); border: 1px dashed var(--border); border-radius: 999px;
      padding: 9px 14px; cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .tpl-variant-chip.is-set {
      border-style: solid; color: #4db6ac;
      border-color: rgba(77,182,172,0.4); background: rgba(77,182,172,0.12);
    }
    .tpl-variant-x { font-size: 14px; line-height: 1; opacity: 0.85; }

    .tpl-cm { margin-top: 10px; }
    .tpl-cm-head {
      display: flex; align-items: center; justify-content: space-between;
      gap: 8px; margin-bottom: 8px;
    }
    .tpl-cm-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
    .tpl-cm-field { display: flex; flex-direction: column; gap: 4px; }
    .tpl-cm-k {
      font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
      text-transform: uppercase; color: var(--text3);
    }
    .tpl-cm-k--tog { display: inline-flex; align-items: center; justify-content: center; align-self: center; min-width: 22px; }
    .tpl-cm-in { width: 64px; }
    .tpl-cm-field .tempo-input {
      width: 84px; background: var(--bg2); border: 1px solid var(--border);
      color: var(--text); font-family: inherit; font-size: 14px; font-weight: 600;
      padding: 8px 6px; border-radius: 6px; text-align: center; outline: none;
    }
    .tpl-cm-tech {
      align-self: flex-end; font-family: inherit; font-size: 11px; font-weight: 700;
      color: var(--text2); background: var(--card); border: 1px solid var(--border);
      border-radius: 999px; padding: 8px 13px; cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .tpl-cm-tech.is-on { color: #9b7dd4; border-color: rgba(155,125,212,0.45); }
    /* Info descanso/vueltas en vista alumno */
    .group-rest-line {
      font-size: 13px; color: var(--text3); padding: 10px 12px;
      display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    }
    .group-rest-line .rounds-tag {
      font-weight: 800; color: var(--text2); text-transform: uppercase;
      letter-spacing: 0.5px; background: var(--bg2); padding: 4px 10px;
      border-radius: 6px; font-size: 14px;
    }
    .group-rest-line .group-rest-sep { color: var(--text3); opacity: 0.6; margin: 0 2px; }
    .group-rest-line .group-rest-txt { flex: 1; min-width: 0; }

    /* Bloque simple: visual diferenciado */
    .tpl-block-simple { margin-bottom: 12px; }
    .tpl-simple-rx {
      width: 100%; background: var(--bg2); border: 1px solid var(--border); color: var(--text);
      font-family: inherit; font-size: 13px; padding: 10px 12px;
      border-radius: 8px; outline: none;
    }
    .tpl-simple-rx::placeholder { color: var(--text3); }
    /* Exercise collapse/expand */
    .tpl-ex-collapse .tpl-collapse-icon {
      transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
    }
    .tpl-ex-collapse.collapsed .tpl-collapse-icon {
      transform: rotate(-90deg);
    }
    .tpl-ex-collapse .tpl-ex-details {
      max-height: 2400px;
      transition: max-height 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.2s ease, margin 0.3s ease;
      opacity: 1; margin-top: 8px; overflow: visible;
    }
    .tpl-ex-collapse.collapsed .tpl-ex-details {
      max-height: 0; opacity: 0; margin-top: 0; overflow: hidden;
    }
    .tpl-adv-toggle {
      display: flex; align-items: center; gap: 6px; margin-top: 8px;
      font-size: 11px; color: var(--text3); cursor: pointer;
      text-transform: uppercase; letter-spacing: 0.5px;
      -webkit-tap-highlight-color: transparent;
    }
    .tpl-adv-toggle input[type="checkbox"] {
      width: 20px; height: 20px; cursor: pointer;
      -webkit-appearance: none; appearance: none; margin: 0;
      border-radius: 6px; border: 2px solid var(--border);
      background: var(--bg2); transition: all 0.25s ease; flex-shrink: 0; position: relative;
    }
    .tpl-adv-toggle input[type="checkbox"]:checked {
      border-color: transparent;
      background: linear-gradient(135deg, #34d399, #8b5cf6, #3b82f6, #34d399);
      background-size: 400% 400%; animation: aurora 8s ease infinite;
    }
    .tpl-adv-toggle input[type="checkbox"]:checked::after {
      content: ''; position: absolute; top: 2px; left: 5px;
      width: 5px; height: 10px;
      border: solid #fff; border-width: 0 2.5px 2.5px 0;
      transform: rotate(45deg);
    }
    .tpl-ex-collapse.collapsed ~ .rest-trigger-row {
      max-height: 0; opacity: 0; overflow: hidden; margin-top: 0;
      transition: max-height 0.3s ease, opacity 0.2s ease, margin-top 0.3s ease;
    }
    .rest-trigger-row {
      transition: max-height 0.3s ease, opacity 0.2s ease, margin-top 0.3s ease;
      max-height: 120px; opacity: 1;
    }

    /* Custom stepper (RPE) */
    .stepper {
      display: inline-flex; align-items: center; border: 1px solid var(--border);
      border-radius: 8px; overflow: hidden; background: var(--bg2);
    }
    .stepper-btn {
      width: 36px; height: 38px; border: none; background: none;
      color: var(--text2); font-size: 14px; font-weight: 600; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      -webkit-tap-highlight-color: transparent; transition: background 0.15s;
    }
    .stepper-btn:active { background: rgba(255,255,255,0.08); }
    .stepper-val {
      width: 16px; text-align: center; font-size: 14px; font-weight: 600;
      color: var(--text); background: none; border: none; border-left: 1px solid var(--border);
      border-right: 1px solid var(--border); font-family: inherit;
      padding: 0; outline: none; -moz-appearance: textfield; height: 32px;
    }
    .stepper-val::-webkit-inner-spin-button,
    .stepper-val::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
    [data-theme="light"] .stepper-btn:active { background: rgba(0,0,0,0.05); }

    /* Serie/superserie suelta (sin bloque) y botonera del día */
    .tpl-loose { margin-bottom: 10px; }
    .day-add-row { display: flex; gap: 6px; margin: 14px 0 8px; }

    /* Drag & drop del editor */
    .tpl-drag {
      display: inline-flex; align-items: center; justify-content: center;
      width: 26px; height: 26px; flex-shrink: 0; color: var(--text3);
      cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent;
    }
    .tpl-drag:active { cursor: grabbing; color: var(--text2); }
    .tpl-drag svg { width: 16px; height: 16px; }
    .dnd-clone {
      position: fixed; z-index: 9999; pointer-events: none; margin: 0 !important;
      opacity: 0.96; background: var(--card); border-radius: 14px;
      box-shadow: 0 12px 30px rgba(0,0,0,0.35); transform: rotate(1deg);
    }
    .dnd-clone .tpl-ex-details,
    .dnd-clone .tpl-ex-sets-input,
    .dnd-clone .tpl-prep-field,
    .dnd-clone .tpl-superset-footer,
    .dnd-clone .tpl-block-add-row,
    .dnd-clone .rest-trigger-row,
    .dnd-clone .ex-rest-chip,
    .dnd-clone .tpl-ex-del,
    .dnd-clone .tpl-swipe-del,
    .dnd-clone .tpl-day-edit { display: none !important; }
    .dnd-clone .tpl-swipe-surface { transform: none !important; }
    .dnd-placeholder {
      border: 2px dashed var(--green); border-radius: 12px;
      background: rgba(52,211,153,0.08); margin: 6px 0; box-sizing: border-box;
    }
    .dnd-dragging { display: none !important; }

    /* Swipe para eliminar (bloque / grupo / ejercicio) */
    .tpl-swipe {
      position: relative; overflow: hidden;
      touch-action: pan-y;
    }
    .tpl-superset > .tpl-swipe[data-swipe-block] {
      border-radius: var(--rs) var(--rs) 0 0;
    }
    .tpl-superset.collapsed > .tpl-swipe[data-swipe-block] { border-radius: var(--rs); }
    .tpl-item-group > .tpl-swipe[data-swipe-item] { border-radius: 8px; }
    .tpl-ex-collapse > .tpl-swipe[data-swipe-ex] { border-radius: 8px; }
    .tpl-swipe-del {
      position: absolute; top: 0; right: 0; bottom: 0;
      width: 100%; background: var(--red);
      display: flex; align-items: center; justify-content: flex-end;
      padding-right: 22px; color: #fff;
    }
    .tpl-swipe-del svg { width: 20px; height: 20px; }
    .tpl-swipe .tpl-swipe-del { opacity: 0; pointer-events: none; }
    .tpl-swipe.swipe-open .tpl-swipe-del,
    .tpl-swipe.swipe-active .tpl-swipe-del { opacity: 1; }
    .tpl-swipe.swipe-open .tpl-swipe-del { pointer-events: auto; }
    .tpl-swipe.swipe-arm .tpl-swipe-del { background: var(--red); filter: brightness(1.12); }
    .tpl-swipe-surface {
      position: relative; z-index: 1;
      transition: transform 0.26s cubic-bezier(0.22,1,0.36,1);
      will-change: transform;
    }
    .tpl-swipe-surface.tpl-superset-header { background: var(--card); }
    [data-theme="light"] .tpl-swipe-surface.tpl-superset-header { background: var(--card); }
    .tpl-swipe-surface.tpl-item-header { background: var(--card); border-radius: 0; }
    .tpl-swipe-surface.tpl-ex-item { background: var(--ex-bg, var(--bg2)); }
    .tpl-exercise .tpl-swipe-surface.tpl-ex-item { background: var(--ex-bg, var(--bg2)); }
    @media (prefers-reduced-motion: reduce) {
      .tpl-swipe-surface { transition: none; }
    }

    @keyframes dndFlash {
      0%, 100% { background: transparent; }
      30% { background: rgba(52,211,153,0.22); }
    }
    .tpl-item-group.dnd-flash { animation: dndFlash 1s ease; border-radius: 12px; }

    /* Simple prescription badge en vista alumno */
    .simple-rx-badge {
      display: inline-block; font-size: 13px; font-weight: 600; color: var(--text2);
      background: var(--bg2); padding: 3px 10px; border-radius: 5px; margin-top: 4px;
    }

    /* Workout view: method/rpe/tempo badges */
    .workout-ex-meta {
      display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px;
    }
    .workout-ex-meta .meta-badge {
      font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
      padding: 3px 8px; border-radius: 5px;
      background: rgba(255,255,255,0.06); color: var(--text2);
    }

