/* ==========================================================================
   BULLDER · rutinas (prefijo rt-): pestaña Entrenar, constructor, detalle, compartidas y programas
   ========================================================================== */

/* ------------------------------------------------------------------ Entrenar */
.rt-train { display: flex; flex-direction: column; }
.rt-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.rt-quick-main { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--sp-2); }
.rt-tile { display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 68px; }
.rt-tile-title { display: block; font: 650 14.5px/1.2 var(--font); }
.rt-tile-sub { display: block; font-size: 12px; color: var(--text-3); margin-top: 3px; line-height: 1.25; }
.rt-tile-chev { color: var(--text-3); display: none; }
.rt-sk-hero { height: 54px; border-radius: var(--r); margin-bottom: var(--sp-3); }
.rt-sk-tile { height: 68px; border-radius: var(--r); }
.rt-sk-gap { height: var(--sp-6); }

.rt-head { align-items: center; margin-top: var(--sp-6); }
.rt-head h2 { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.rt-head-count { font: 650 12.5px/1 var(--font); color: var(--text-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-full); padding: 4px 8px; font-variant-numeric: tabular-nums; }
.rt-head-actions { display: flex; align-items: center; gap: 4px; }
.rt-head-actions .btn-sm { min-height: 40px; }

.rt-folders { display: flex; flex-direction: column; gap: var(--sp-2); }
.rt-folder-head { display: flex; align-items: center; gap: 2px; min-height: 48px; }
.rt-folder-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 4px 0 0; text-align: left; border-radius: var(--r-sm); }
.rt-folder-chev { width: 20px; height: 20px; color: var(--text-3); transition: transform .2s var(--ease); }
.rt-folder.is-collapsed .rt-folder-chev { transform: rotate(-90deg); }
.rt-folder-name { font: 650 15px/1.2 var(--font); color: var(--text-2); }
.rt-folder-count { font: 650 12px/1 var(--font); color: var(--text-3); font-variant-numeric: tabular-nums; }
.rt-folder.is-collapsed .rt-folder-body { display: none; }
.rt-folder.is-drop .rt-folder-head { background: var(--accent-soft); border-radius: var(--r-sm); }
.rt-folder.is-drop .rt-folder-name { color: var(--accent); }
.rt-folder-body { padding-bottom: var(--sp-2); }
.rt-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
.rt-folder-empty { display: none; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 56px; padding: 6px 8px 6px var(--sp-4); border: 1.5px dashed var(--line-strong); border-radius: var(--r); color: var(--text-3); font-size: 13.5px; }
.rt-folder.is-empty .rt-folder-empty { display: flex; }
.rt-folder.is-empty .rt-list:not(:has(.rt-sort-ph)) { display: none; }
.rt-folder.is-empty .rt-list:has(.rt-sort-ph) + .rt-folder-empty { display: none; }
/* "Sin carpeta" vacía solo aparece como destino mientras se arrastra */
.rt-folder.is-loose.is-empty { display: none; }
.is-sorting .rt-folder.is-loose.is-empty { display: block; }

.rt-card { padding: 12px 12px 12px 4px; display: flex; flex-direction: column; gap: 8px; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.rt-card:hover { border-color: var(--line-strong); }
.rt-card-top { display: flex; align-items: flex-start; gap: 2px; }
.rt-grip { width: 34px; height: 44px; display: grid; place-items: center; flex: none; color: var(--text-3); border-radius: 10px; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.rt-grip .ic { width: 20px; height: 20px; }
.rt-grip:hover { color: var(--text); background: var(--surface-2); }
.rt-card-main { flex: 1; min-width: 0; padding: 3px 0 0; }
.rt-card-name { display: flex; align-items: center; gap: 8px; font: 700 17px/1.25 var(--font-display); }
.rt-card-muscles { font-size: 13px; color: var(--text-2); margin-top: 3px; font-weight: 550; }
.rt-card-menu { margin: -2px -4px 0 0; color: var(--text-2); }
.rt-card-body { display: block; padding-left: 36px; }
.rt-card-preview { font-size: 13.5px; line-height: 1.4; color: var(--text-3); min-height: 2.8em; }
.rt-card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding-left: 36px; margin-top: 2px; }
.rt-card-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.rt-stack { display: flex; align-items: center; }
.rt-stack-img { width: 34px; height: 34px; border-radius: 10px; margin-right: -8px; box-shadow: 0 0 0 2px var(--surface); }
.rt-stack-more { margin-left: 14px; font: 650 12px/1 var(--font); color: var(--text-3); font-variant-numeric: tabular-nums; }
.rt-card-last { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-3); font-weight: 550; }
.rt-card-last .ic { width: 14px; height: 14px; }
.rt-start { min-height: 44px; padding: 0 16px; border-radius: var(--r-sm); font-size: 14.5px; flex: none; align-self: flex-end; }

.rt-empty { padding: 0; }
.rt-empty-actions { display: flex; flex-direction: column; gap: var(--sp-2); width: 100%; max-width: 300px; margin-top: 6px; }
.rt-empty-actions .btn { margin-top: 0; }

/* arrastre */
.rt-sort-ph { border: 1.5px dashed var(--accent); border-radius: var(--r); background: var(--accent-soft); min-height: 44px; }
.is-dragging { position: fixed !important; z-index: 90; pointer-events: none; margin: 0 !important; box-shadow: var(--shadow); border-color: var(--accent) !important; transform: scale(1.02) rotate(.6deg); opacity: .97; }
.is-dragging .rt-grip { cursor: grabbing; color: var(--accent); }
.rt-noselect, .rt-noselect * { -webkit-user-select: none !important; user-select: none !important; cursor: grabbing !important; }

@media (min-width: 720px) {
  .rt-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .rt-empty-actions { flex-direction: row; max-width: none; justify-content: center; }
}
@media (min-width: 960px) {
  .rt-quick { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .rt-quick-main { grid-column: auto; justify-content: center; }
  .rt-quick-main .btn-lg { min-height: 68px; }
  .rt-quick-main .rt-resume { min-height: 54px; }
  .rt-tile { padding: 14px var(--sp-4); }
  .rt-tile-chev { display: block; }
  .rt-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--sp-4); }
}

/* ------------------------------------------------------------------ piezas compartidas */
.rt-pill { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--r-full); background: var(--surface-2); color: var(--text-2); font: 600 13px/1 var(--font); white-space: nowrap; max-width: 100%; transition: background .15s, color .15s; }
.rt-pill::after { content: ""; position: absolute; inset: -5px 0; }
.rt-pill:hover { background: var(--surface-3); color: var(--text); }
.rt-pill .ic { width: 15px; height: 15px; }
.rt-pill > span { overflow: hidden; text-overflow: ellipsis; }
.rt-pill.is-on { color: var(--text); }
.rt-pill.is-ss { background: color-mix(in srgb, var(--rt-ss, var(--c1)) 18%, transparent); color: var(--rt-ss, var(--c1)); }

/* ------------------------------------------------------------------ constructor */
.rt-b { display: flex; flex-direction: column; gap: var(--sp-3); max-width: 720px; margin: 0 auto; }
.rt-b-draft { align-items: center; }
.rt-b-top { display: flex; flex-direction: column; gap: 2px; padding-bottom: var(--sp-2); }
.rt-b-name { width: 100%; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 6px 0; font: 700 26px/1.2 var(--font-display); letter-spacing: -.01em; color: var(--text); border-radius: 0; transition: border-color .15s; }
.rt-b-name::placeholder { color: var(--text-3); }
.rt-b-name:focus { outline: none; border-bottom-color: var(--accent); }
.rt-b-name.is-invalid { border-bottom-color: var(--danger); }
.rt-b-notes { width: 100%; border: 0; background: transparent; resize: none; padding: 6px 0; min-height: 34px; font-size: 15px; line-height: 1.45; color: var(--text-2); overflow: hidden; }
.rt-b-notes::placeholder { color: var(--text-3); }
.rt-b-notes:focus { outline: none; color: var(--text); }
.rt-b-meta { display: flex; align-items: center; gap: var(--sp-3); margin-top: 6px; min-width: 0; }
.rt-b-meta .rt-pill { flex: 0 1 auto; min-width: 0; }
.rt-b-sum { font-size: 12.5px; color: var(--text-3); font-weight: 550; white-space: nowrap; margin-left: auto; font-variant-numeric: tabular-nums; }
.rt-exlist { display: flex; flex-direction: column; gap: var(--sp-3); }
.rt-exlist:empty { display: none; }
.rt-b-empty { padding: 0; border-style: dashed; border-color: var(--line-strong); background: transparent; }
.rt-add-ex { border-style: dashed; }

.rt-ex { padding: 0; position: relative; overflow: hidden; }
.rt-ex.is-superset::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--rt-ss); }
.rt-ex-head { display: flex; align-items: center; gap: 8px; padding: 10px 6px 10px 2px; }
.rt-ex-head .rt-grip { height: 48px; width: 32px; }
.rt-ex-name { font: 700 16px/1.25 var(--font-display); }
.rt-ex-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.rt-ex-body { padding: 0 12px 6px; }
.rt-pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 10px; }
.rt-note { display: block; width: 100%; border: 0; resize: none; overflow: hidden; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; min-height: 40px; font-size: 14.5px; line-height: 1.4; color: var(--text); margin-bottom: 10px; }
.rt-note::placeholder { color: var(--text-3); }
.rt-note:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.rt-sets-head, .rt-set-row { display: grid; align-items: center; gap: 8px; }
.rt-sets-head { padding: 0 0 4px; }
.rt-sets-head span { font: 700 11px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); text-align: center; }
.rt-set { position: relative; overflow: hidden; border-radius: 10px; }
.rt-set-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding-right: 14px; background: var(--danger-soft); color: var(--danger); font: 650 13px/1 var(--font); border-radius: 10px; transition: background .15s, color .15s; }
.rt-set.is-armed .rt-set-bg { background: var(--danger); color: #fff; }
.rt-set-row { position: relative; background: var(--surface); padding: 3px 0; transition: transform .18s var(--ease); }
.rt-set-num { position: relative; width: 36px; height: 36px; margin: 0 auto; border-radius: 10px; background: var(--surface-2); font: 700 15px/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--text); transition: background .15s; }
.rt-set-num::after { content: ""; position: absolute; inset: -4px; }
.rt-set-num:hover { background: var(--surface-3); }
.rt-set.is-warmup .rt-set-num { color: var(--set-warmup); background: var(--warn-soft); }
.rt-set.is-drop .rt-set-num { color: var(--set-drop); background: color-mix(in srgb, var(--set-drop) 16%, transparent); }
.rt-set.is-failure .rt-set-num { color: var(--set-failure); background: var(--danger-soft); }
.rt-in { width: 100%; min-width: 0; height: 44px; border: 1.5px solid transparent; border-radius: 10px; background: var(--surface-2); text-align: center; padding: 0 4px; font: 650 16px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text); transition: border-color .15s, background .15s; }
.rt-in::placeholder { color: var(--text-3); font-weight: 500; font-size: 14px; }
.rt-in:focus { outline: none; border-color: var(--accent); background: var(--surface-3); }
.rt-range { display: grid; grid-template-columns: minmax(0, 1fr) 8px minmax(0, 1fr); align-items: center; gap: 3px; }
.rt-range i { font-style: normal; color: var(--text-3); text-align: center; }
.rt-set-x { width: 40px; height: 44px; display: grid; place-items: center; color: var(--text-3); border-radius: 10px; transition: color .15s, background .15s; }
.rt-set-x:hover { color: var(--danger); background: var(--danger-soft); }
.rt-set-x[disabled] { opacity: .3; pointer-events: none; }
.rt-add-set { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; margin-top: 4px; border-radius: 10px; color: var(--text-2); font: 650 13.5px/1 var(--font); transition: background .15s, color .15s; }
.rt-add-set:hover { background: var(--surface-2); color: var(--text); }
.rt-add-set[disabled] { opacity: .4; pointer-events: none; }

/* al arrastrar, las tarjetas se pliegan a su cabecera para mover con precisión */
.rt-b.is-sorting .rt-ex-body, .is-sorting .rt-ex .rt-ex-body, .rt-ex.is-dragging .rt-ex-body { display: none; }
.is-sorting .rt-savebar { opacity: 0; pointer-events: none; }

.rt-savebar { position: sticky; bottom: calc(var(--safe-b) + 12px); z-index: 20; margin-top: var(--sp-2); transition: opacity .15s, transform .2s var(--ease); }
.rt-savebar::before { content: ""; position: absolute; inset: -16px -16px calc(-32px - var(--safe-b)); background: linear-gradient(to bottom, transparent, var(--bg) 42%); pointer-events: none; z-index: -1; }
.rt-savebar .btn { box-shadow: var(--shadow-sm); }
.app[data-dock="1"] .rt-savebar { bottom: calc(var(--safe-b) + 84px); }
.rt-typing .rt-savebar { opacity: 0; pointer-events: none; transform: translateY(12px); }

/* hoja de descanso */
.rt-rest { display: flex; flex-direction: column; gap: var(--sp-4); }
.rt-rest-stepper { display: flex; align-items: center; justify-content: center; gap: var(--sp-4); }
.rt-rest-step { width: 52px; height: 52px; background: var(--surface-2); }
.rt-rest-value { min-width: 150px; text-align: center; font: 700 44px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.rt-rest-value.is-off { font-size: 22px; color: var(--text-2); line-height: 44px; }
.rt-rest-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rt-rest-grid .chip { justify-content: center; height: 44px; padding: 0 4px; font-variant-numeric: tabular-nums; }
.rt-rest-grid .chip:first-child { grid-column: span 2; }
.rt-rest-all { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 48px; padding: 4px 0; font-weight: 600; cursor: pointer; }

/* hoja de compartir */
.rt-share-link { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 50px; border-radius: var(--r-sm); background: var(--surface); border: 1.5px solid var(--line); color: var(--text-3); }
.rt-share-url { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font-size: 15px; text-overflow: ellipsis; }
.rt-share-url:focus { outline: none; }
.rt-share-actions { display: flex; gap: var(--sp-2); }
.rt-share-actions .btn { flex: 1; }
.rt-share-off { align-self: center; min-height: 44px; }

/* ------------------------------------------------------------------ detalle y compartida */
.rt-d { display: flex; flex-direction: column; gap: var(--sp-3); max-width: 720px; margin: 0 auto; }
.rt-d-head { display: flex; flex-direction: column; gap: 10px; padding: 2px 0 var(--sp-2); }
.rt-d-name { font-size: 28px; line-height: 1.15; overflow-wrap: anywhere; }
.rt-d-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.rt-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 550; }
.rt-tag .ic { width: 15px; height: 15px; color: var(--text-3); }
.rt-d-notes { color: var(--text-2); font-size: 14.5px; line-height: 1.5; white-space: pre-line; padding: 10px 14px; border-left: 3px solid var(--line-strong); background: var(--surface); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.rt-stats { gap: var(--sp-2); }
.rt-stats .stat { padding: 12px 14px; }
.rt-stats .stat-value { font-size: 22px; }
.rt-muscles { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-muscle { height: 32px; padding: 0 12px; font-size: 13px; cursor: default; }
.rt-muscle i { font-style: normal; font: 700 11.5px/1 var(--font); color: var(--text-3); background: var(--surface-2); border-radius: 6px; padding: 3px 6px; margin-left: 2px; font-variant-numeric: tabular-nums; }
.rt-cap { display: block; }
.rt-cap::first-letter { text-transform: uppercase; }
.rt-block { display: block; }
.rt-d-history .list-item .li-sub { font-variant-numeric: tabular-nums; }
.rt-cta { margin-top: var(--sp-4); }

.rt-xl-item { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; gap: 12px; }
.rt-xl-item.is-superset { box-shadow: inset 3px 0 0 var(--rt-ss); }
.rt-xl-n { width: 18px; flex: none; padding-top: 18px; font: 700 12px/1 var(--font); color: var(--text-3); text-align: center; font-variant-numeric: tabular-nums; }
.rt-xl-main { display: flex; flex-direction: column; gap: 3px; }
.rt-xl-name { font: 650 15.5px/1.3 var(--font); }
.rt-xl-sub { font-size: 12.5px; color: var(--text-3); }
.rt-xl-sets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rt-xl-set, .rt-xl-rest { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 8px; background: var(--surface-2); font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rt-xl-set b { color: var(--text); font-weight: 700; }
.rt-xl-set i { font-style: normal; font-weight: 650; }
.rt-xl-set.is-warmup i { color: var(--set-warmup); }
.rt-xl-set.is-drop i { color: var(--set-drop); }
.rt-xl-set.is-failure i { color: var(--set-failure); }
.rt-xl-rest { background: transparent; padding: 0 4px; color: var(--text-3); }
.rt-xl-rest .ic { width: 14px; height: 14px; }
.rt-xl-ss { display: inline-flex; align-items: center; gap: 5px; font: 650 12px/1 var(--font); color: var(--rt-ss); margin-top: 4px; }
.rt-xl-ss .ic { width: 14px; height: 14px; }
.rt-xl-note { font-size: 13px; color: var(--text-2); line-height: 1.4; margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--line-strong); }
.rt-xl-item .li-end { align-self: center; }

.rt-author { display: flex; align-items: center; gap: 12px; padding: 12px var(--sp-4); }
.rt-author-over { display: block; font: 700 11px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.rt-author-name { display: block; font-size: 15.5px; }
.rt-author > .ic { color: var(--text-3); }

/* ------------------------------------------------------------------ programas */
.rt-p { display: flex; flex-direction: column; gap: var(--sp-3); }
.rt-p-intro { color: var(--text-2); font-size: 14.5px; max-width: 620px; }
.rt-p-filters .chip .ic-sm { width: 15px; height: 15px; }
.rt-p-filters .chip .ic-sm:last-child { opacity: .7; margin-left: -2px; }
.rt-p-count { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.rt-p-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
.rt-sk-prog { height: 214px; border-radius: var(--r); }
.rt-prog { display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.rt-prog::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--rt-goal); opacity: .85; }
.rt-prog-top { display: flex; align-items: flex-start; gap: 12px; }
.rt-prog-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--rt-goal) 16%, transparent); color: var(--rt-goal); }
.rt-prog-goal { display: block; font: 700 11px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--rt-goal); margin: 3px 0 6px; }
.rt-prog-name { font: 700 17.5px/1.22 var(--font-display); }
.rt-prog-kicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; margin-bottom: 4px; }
.rt-prog-kicker .rt-prog-goal { margin: 0; }
.rt-prog-kicker .badge { flex: none; height: 20px; font-size: 11px; padding: 0 7px; }
.rt-prog-kicker .badge .ic { width: 13px; height: 13px; }
.rt-prog-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.rt-prog-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.rt-prog-meta span { display: inline-flex; align-items: center; gap: 5px; }
.rt-prog-meta .ic { width: 15px; height: 15px; color: var(--text-3); }
.rt-prog-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: auto; padding-top: 2px; }
.rt-prog-time { font-size: 12.5px; color: var(--text-3); font-weight: 600; font-variant-numeric: tabular-nums; }

.rt-pd { display: flex; flex-direction: column; gap: var(--sp-3); max-width: 720px; margin: 0 auto; }
.rt-pd-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: var(--sp-5) var(--sp-4); background: linear-gradient(160deg, color-mix(in srgb, var(--rt-goal) 14%, var(--surface)) 0%, var(--surface) 62%); }
.rt-pd-hero .rt-prog-icon { width: 52px; height: 52px; border-radius: 15px; }
.rt-pd-name { font-size: 25px; line-height: 1.15; }
.rt-pd-desc { color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.rt-pd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-pd-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.rt-pd-facts .stat { padding: 12px 14px; }
.rt-pd-facts .stat-value { font-size: 21px; }
.rt-pd-text { font-size: 15.5px !important; line-height: 1.3; font-family: var(--font) !important; font-weight: 650 !important; }
.rt-pd-facts .stat:nth-child(4) { grid-column: span 1; }
.rt-pd-wide { grid-column: span 2; }
.rt-pd-all { min-height: 36px; }
.rt-days { display: flex; flex-direction: column; gap: var(--sp-2); }
.rt-day-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px var(--sp-4); text-align: left; min-height: 64px; }
.rt-day-head:hover { background: var(--surface-2); }
.rt-day-n { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--rt-goal) 16%, transparent); color: var(--rt-goal); font: 700 15px/1 var(--font-display); }
.rt-day-name { display: block; font: 700 16px/1.25 var(--font-display); }
.rt-day-focus { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.rt-day-meta { display: block; font-size: 12px; color: var(--text-3); margin-top: 3px; font-weight: 600; }
.rt-day-chev { color: var(--text-3); transition: transform .2s var(--ease); }
.rt-day.is-open .rt-day-chev { transform: rotate(180deg); }
.rt-day-body { display: none; border-top: 1px solid var(--line); }
.rt-day.is-open .rt-day-body { display: block; }
.rt-day-body .list { border: 0; border-radius: 0; background: transparent; }

@media (min-width: 720px) {
  .rt-p-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-pd-facts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rt-pd-wide { grid-column: span 1; }
}
@media (min-width: 960px) {
  .rt-p-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
  .rt-p-filters { margin: 0; padding: 2px 0; flex-wrap: wrap; overflow: visible; }
  .rt-d-name { font-size: 32px; }
  .rt-pd-hero { padding: var(--sp-6); }
  .rt-pd-name { font-size: 30px; }
}

/* ------------------------------------------------------------------ ajustes finos */
.rt-head h2 { white-space: nowrap; }
@media (max-width: 419px) {
  .rt-new-folder { width: 40px; padding: 0; }
  .rt-new-folder span { display: none; }
}
/* portadas de fondo blanco: un filo sutil para que no se pierdan sobre tarjetas blancas (tema claro) */
.rt-train .ex-thumb, .rt-b .ex-thumb, .rt-xl .ex-thumb, .rt-p .ex-thumb { outline: 1px solid var(--line); outline-offset: -1px; }
.rt-stack-img { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line); }
/* verde sobre verde claro no alcanza contraste en tema claro: se oscurece el texto */
:root[data-theme="light"] .rt-start.btn-accent-soft { color: color-mix(in srgb, var(--accent) 52%, black); }
:root[data-theme="light"] .rt-prog .badge-accent { color: color-mix(in srgb, var(--accent) 52%, black); }
:root[data-theme="light"] .rt-d .link, :root[data-theme="light"] .rt-pd .link { color: color-mix(in srgb, var(--accent) 52%, black); }
