.ybt-content, .ybt-content * {
  font-family: 'DM Sans', system-ui, sans-serif;
}
code, .mono { font-family: 'DM Mono', monospace; }

/* ── CSS Variables ── */
:root {
  --accent:       #3B82F6;
  --accent-dim:   rgba(59,130,246,.12);
  --accent-2:     #10B981;
  --accent-2-dim: rgba(16,185,129,.12);
  --danger:       #EF4444;
  --danger-dim:   rgba(239,68,68,.10);
  --warn:         #F59E0B;
  --warn-dim:     rgba(245,158,11,.12);

  --card:         #ffffff;
  --card-2:       #f8f8f7;
  --bg:           #f2f1ef;
  --bg-soft:      #f5f4f2;
  --border:       rgba(0,0,0,.09);
  --border-mid:   rgba(0,0,0,.15);
  --text:         #1a1a18;
  --muted:        #6b6b67;
  --muted-2:      #9b9b96;
  --shadow:       0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
  --shadow-hover: 0 2px 8px rgba(0,0,0,.10), 0 8px 24px rgba(0,0,0,.07);
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    18px;

  /* Chart colors */
  --chart-line:   #3B82F6;
  --chart-fill:   rgba(59,130,246,.08);
  --chart-grid:   rgba(0,0,0,.06);
  --chart-text:   #6b6b67;
}

/* Dark theme */
body.theme-dark, .dark-mode {
  --card:         #1e1e1c;
  --card-2:       #252523;
  --bg:           #151513;
  --bg-soft:      #1a1a18;
  --border:       rgba(255,255,255,.08);
  --border-mid:   rgba(255,255,255,.14);
  --text:         #e8e6e1;
  --muted:        #888882;
  --muted-2:      #5a5a56;
  --shadow:       0 1px 3px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.2);
  --shadow-hover: 0 2px 8px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
  --chart-grid:   rgba(255,255,255,.06);
  --chart-text:   #888882;
}

/* ── Layout ── */
.main-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  padding: 0 16px 100px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 980px) {
  .main-grid { grid-template-columns: 1fr; }
}
.left-col, .right-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Stats strip ── */
.stats-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 16px 12px;
  margin: 8px auto 0;
}
.stat-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 18px 10px 14px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  flex: 1;
  min-width: 80px;
  cursor: default;
  transition: box-shadow .2s ease, transform .2s ease;
  position: relative;
  overflow: hidden;
}
.stat-pill::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--border-mid);
  border-radius: 0 3px 3px 0;
  transition: background .2s;
}
.stat-pill:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.stat-pill.accent::before { background: var(--accent); }
.stat-val {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.5px;
  font-feature-settings: 'tnum';
}
.stat-pill.accent .stat-val { color: var(--accent); }
.stat-lbl {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .7px;
  font-weight: 500;
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .25s ease;
}
.card:hover { box-shadow: var(--shadow-hover); }

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card-2);
}
.card-head--between { justify-content: space-between; }
.card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.1px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.icon-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--muted-2);
  border-radius: 50%;
  flex-shrink: 0;
  transition: background .2s;
}
.icon-dot.accent { background: var(--accent); }
.card:hover .card-title .icon-dot { background: var(--accent); }

.card-body { padding: 14px 16px; }

.head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border-mid);
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  white-space: nowrap;
  transition: all .15s ease;
  line-height: 1;
}
.btn-sm  { padding: 6px 12px; font-size: 12px; }
.btn-xs  { padding: 4px 8px;  font-size: 11px; }

.btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); box-shadow: none; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #2563EB;
  border-color: #2563EB;
  color: #fff;
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.btn-ghost:hover { color: var(--text); }
.btn-danger {
  background: var(--danger-dim);
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover { background: var(--danger); color: #fff; box-shadow: 0 0 0 3px var(--danger-dim); }
.btn-success {
  background: var(--accent-2-dim);
  border-color: var(--accent-2);
  color: var(--accent-2);
}

/* ── Day chips ── */
.day-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 10px;
}
.chip {
  padding: 5px 13px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--muted);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: .2px;
  transition: all .18s cubic-bezier(.34,1.56,.64,1);
  user-select: none;
}
.chip:hover:not(.active):not(.chip--busy) {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--accent-dim);
}
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 3px 10px var(--accent-dim);
  transform: scale(1.05);
}
.chip.chip--busy { opacity: .55; cursor: wait; pointer-events: none; }

/* ── Week progress dots ── */
.week-bar {
  display: flex;
  gap: 4px;
}
.wdot {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  transition: all .25s ease;
  cursor: default;
}
.wdot.has-exercises { background: rgba(59,130,246,.4); }
.wdot.is-current {
  background: var(--accent);
  transform: scaleY(1.7);
  box-shadow: 0 1px 5px var(--accent-dim);
}
/* Web */
.grupo-tag--cardio { background: color-mix(in oklab, var(--accent) 15%, transparent); color: var(--accent); }
/* ── Inputs & Selects ── */
.ybt-input, .ybt-select {
  display: block;
  padding: 8px 12px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  color: var(--text);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
  height: fit-content;
}
.ybt-input:focus, .ybt-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.ybt-select--sm { padding: 5px 8px; font-size: 12px; width: auto; }

.search-row {
  display: flex;
  gap: 7px;
  margin-bottom: 10px;
  align-items: center;
}
.search-row .ybt-input  { flex: 1; }
.search-row .ybt-select { min-width: 110px; width: auto; }

/* ── Catalog list ── */
.cat-card .card-body { flex: 1; }
.cat-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 48vh;
  overflow-y: auto;
  padding-right: 3px;
}
.cat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  gap: 8px;
  transition: border-color .15s ease, transform .15s ease;
}
.cat-item:hover {
  border-color: var(--accent);
  transform: translateX(2px);
}
.ex-name { font-size: 13px; font-weight: 500; color: var(--text); }
.ex-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.empty-cat {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  border: 1px dashed var(--border-mid);
  border-radius: var(--radius-sm);
}

/* ── Meta section ── */
.meta-section { border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.meta-fields {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.meta-fields .ybt-input { flex: 1 1 160px; min-width: 140px; }
.meta-fields .ybt-select { flex: 1 1 160px; min-width: 140px; height: fit-content; }

.vigencia-field {
  display: inline-flex;
  flex: 1 1 160px;
  min-width: 140px;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  margin: 0;
}
.vigencia-lbl {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
}
.vigencia-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  color: var(--text);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.vigencia-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.vigencia-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

/* ── Table section ── */
.table-section { padding-top: 12px; }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
thead th {
  padding: 9px 10px;
  text-align: left;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  background: var(--card-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}
tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
tbody tr { transition: background .1s ease; }
tbody tr:hover { background: var(--accent-dim); }
tbody tr:last-child td { border-bottom: none; }
tbody tr.dragging {
  opacity: .45;
  background: var(--accent-dim);
}
.col-num {
  width: 32px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
  cursor: grab;
  user-select: none;
}
.col-num:active { cursor: grabbing; }
.col-sm  { width: 70px; }
.col-md  { width: 88px; }
.col-notes { min-width: 130px; }

.tbinput {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-family: 'DM Mono', monospace;
  transition: border-color .12s ease, background .12s ease;
  box-sizing: border-box;
}
.tbinput:hover  { border-color: var(--border-mid); background: var(--card-2); }
.tbinput:focus  { outline: none; border-color: var(--accent); background: var(--card-2); box-shadow: 0 0 0 2px var(--accent-dim); }
.tbinput::-webkit-outer-spin-button,
.tbinput::-webkit-inner-spin-button { margin: 0; }
.row-actions { display: flex; gap: 4px; }

/* Grupo tag pill */
.grupo-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(59,130,246,.25);
  white-space: nowrap;
}
.badge-sets {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(59,130,246,.25);
  white-space: nowrap;
  font-feature-settings: 'tnum';
}

.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.drag-hint { opacity: .5; letter-spacing: 1px; }
.muted { color: var(--muted); font-size: 11px; }

/* ── Empty state ── */
.empty-state {
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border-mid);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-size: 13px;
  line-height: 1.7;
}
.empty-icon {
  font-size: 30px;
  display: block;
  margin-bottom: 8px;
  opacity: .45;
}

/* ── Sets editor ── */
.sets-editor {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 14px 16px;
  animation: slideDown .2s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sets-editor-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sets-editor-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.sets-name-input {
  flex: 1;
  min-width: 160px;
  opacity: .8;
  cursor: default;
}
.sets-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 38vh;
  overflow-y: auto;
  padding-right: 3px;
}
.set-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  transition: border-color .15s ease;
}
.set-row:hover { border-color: var(--accent); }
.set-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  min-width: 46px;
  font-family: 'DM Mono', monospace;
}
.set-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 70px;
}
.set-field-lbl {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted-2);
}
.set-input { padding: 5px 8px !important; font-size: 12px !important; }
.sets-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.sets-actions { display: flex; gap: 6px; }

/* ── Progress panel ── */
.progress-card {}

.prog-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.prog-tab {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: color .15s, border-color .15s;
}
.prog-tab:hover { color: var(--text); }
.prog-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.prog-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.prog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  flex-wrap: wrap;
}
.prog-meta-item { color: var(--muted); }
.prog-meta-item strong { color: var(--text); font-weight: 600; font-family: 'DM Mono', monospace; }
.prog-meta-delta {
  font-weight: 600;
  color: var(--accent-2) !important;
  font-family: 'DM Mono', monospace;
}
.prog-meta-delta.neg { color: var(--danger) !important; }

.chart-wrap {
  position: relative;
  width: 100%;
  height: 200px;
}
.prog-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 13px;
  border: 1px dashed var(--border-mid);
  border-radius: var(--radius-sm);
}
.prog-empty svg { opacity: .4; }
.prog-empty p { margin: 0; }
#prog-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }

/* ── Historial de sets ── */
.hist-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}
.hist-sesion {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.hist-sesion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--card-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.hist-sesion-head:hover { background: var(--accent-dim); }
.hist-sesion-date { font-family: 'DM Mono', monospace; color: var(--muted); font-size: 11px; }
.hist-sets {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hist-set-row {
  display: flex;
  gap: 16px;
  padding: 6px 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  color: var(--muted);
}
.hist-set-row span strong { color: var(--text); font-weight: 500; }

/* ── Historial de rutinas guardadas ── */
.hist-rutinas-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hist-rutina-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  gap: 8px;
  flex-wrap: wrap;
}
.hist-rutina-item:hover { border-color: var(--accent); }
.hist-rutina-name { font-size: 13px; font-weight: 600; color: var(--text); }
.hist-rutina-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Toast ──
   Reglas locales eliminadas: el toast global vive en style-toast.css con
   posicionamiento abajo-derecha (.toast-root). Esto evitaba que el global
   apareciera centrado al medio porque .toast era un selector genérico que
   pisaba al global. */

/* ── Scrollbars ── */
.cat-list::-webkit-scrollbar,
.sets-list::-webkit-scrollbar,
.hist-list::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar { width: 4px; height: 4px; }
.cat-list::-webkit-scrollbar-thumb,
.sets-list::-webkit-scrollbar-thumb,
.hist-list::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  background: var(--border-mid);
  border-radius: 8px;
}
.cat-list::-webkit-scrollbar-track,
.sets-list::-webkit-scrollbar-track,
.hist-list::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track { background: transparent; }

/* ── Skeleton loader ── */
.skeleton {
  border-radius: var(--radius-sm);
  height: 38px;
  background: linear-gradient(90deg, var(--border) 25%, var(--card-2) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── Light-mode specific overrides ── */
body:not(.theme-dark) .grupo-tag  { }
body:not(.theme-dark) .badge-sets { }

#btn-actualizar-rutina {
  background: var(--accent-2-dim);
  border-color: var(--accent-2);
  color: var(--accent-2);
}
#btn-actualizar-rutina:hover {
  background: var(--accent-2);
  color: #fff;
  box-shadow: 0 0 0 3px var(--accent-2-dim);
}
/* ── Input bloqueado (nombre ejercicio read-only) ── */
.tbinput--locked {
  color: var(--muted);
  cursor: default;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  font-style: italic;
}
.tbinput--locked:hover,
.tbinput--locked:focus {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.badge-bw      { font-size:9px; padding:1px 5px; border-radius:3px; background:rgba(52,211,153,.18); color:#34d399; font-weight:700; }
.badge-uni     { font-size:9px; padding:1px 5px; border-radius:3px; background:rgba(251,191,36,.15);  color:#f59e0b; font-weight:700; }
.badge-dif--principiante { font-size:9px; padding:1px 5px; border-radius:3px; background:rgba(96,165,250,.15); color:#60a5fa; }
.badge-dif--avanzado     { font-size:9px; padding:1px 5px; border-radius:3px; background:rgba(248,113,113,.15); color:#f87171; }
.badge-dif--intermedio   { font-size:9px; padding:1px 5px; border-radius:3px; background:rgba(251,146,60,.15);  color:#fb923c; }
.badge-dif--avanzado     { font-size:9px; padding:1px 5px; border-radius:3px; background:rgba(248,113,113,.15); color:#f87171; }
.corporal-tag  { font-size:9px; padding:1px 4px; border-radius:3px; background:rgba(52,211,153,.18); color:#34d399; font-weight:700; margin-right:4px; }
.peso-unit-toggle { display:inline-flex; gap:2px; border:1px solid var(--border); border-radius:6px; padding:2px; }
.peso-unit-toggle .btn.active { background:var(--accent); color:#fff; }
/* ── Agregar al final de style-rutinas.css ── */

@media (max-width: 640px) {

  .main-grid {
    padding: 0 1px 90px;
    gap: 10px;
  }

  /* ══ FIX PRINCIPAL: left-col no se desborde ══ */
  .left-col,
  .right-col {
    min-width: 0;      /* permite que el grid item se encoja */
    max-width: 100%;
    overflow: hidden;
  }

  /* Catálogo search row: apilar */
  .search-row {
    flex-direction: column;
  }
  .search-row .ybt-select {
    min-width: 0;
    width: 100%;
  }

  /* Meta fields: apilar */
  .meta-fields {
    flex-direction: column;
  }
  .meta-fields .ybt-input,
  .meta-fields .ybt-select {
    min-width: 0;
    width: 100%;
    flex: unset;
  }
  .meta-fields .vigencia-field {
    width: 100%;
  }
  .meta-fields .vigencia-input {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  /* Head actions: wrap sin desbordar */
  .head-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  /* Stats strip */
  .stat-pill {
    min-width: 0;
    flex: 1 1 calc(50% - 6px);
  }

  /* Tabla: permitir scroll controlado */
  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }

  /* Sets editor */
  .sets-editor-head {
    flex-direction: column;
    align-items: stretch;
  }
  .sets-name-input {
    min-width: 0;
    width: 100%;
  }

  /* Progress selector */
  .prog-selector {
    flex-direction: column;
    align-items: stretch;
  }
}
.vigencia-lbl[title] {
  cursor: help;
  border-bottom: 1px dotted currentColor;
}