/* COMPONENTES BEM */

/* Auth */
.auth-notice {
  background: rgba(230,161,23,0.07);
  border: 1px solid rgba(230,161,23,0.18);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 16px 0;
  text-align: left;
  max-width: 340px;
  width: 100%;
}
.auth-notice__title {
  font-size: 13px;
  font-weight: 700;
  color: #c99010;
  margin-bottom: 4px;
}
.auth-notice__text {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.5;
}

/* Health Form (post-registro) */
.health-form {
  text-align: left;
  width: 100%;
  max-width: 380px;
}
.health-form__title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}
.health-form__sub {
  font-size: 14px;
  color: var(--text3);
  margin-bottom: 20px;
}
.health-form__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Rueda de altura */
.hwheel {
  position: relative;
  width: 100%;
  max-width: 168px;
  height: 188px;
  margin: 10px auto 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  -webkit-user-select: none;
  user-select: none;
}
.hwheel-scroll {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hwheel-scroll::-webkit-scrollbar { display: none; }
.hwheel-pad { height: 72px; }
.hwheel-item {
  height: 44px;
  line-height: 44px;
  text-align: center;
  scroll-snap-align: center;
  font-size: 17px;
  color: var(--text3);
  cursor: pointer;
  transition: color 0.15s ease, font-size 0.15s ease, opacity 0.15s ease;
  opacity: 0.45;
}
.hwheel-item.sel {
  color: var(--text);
  font-size: 27px;
  font-weight: 800;
  opacity: 1;
}
.hwheel-band {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 72px;
  height: 44px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border-radius: 10px;
  pointer-events: none;
  z-index: 0;
}
.hwheel-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 56px;
  pointer-events: none;
  z-index: 2;
}
.hwheel-fade--top { top: 0; background: linear-gradient(to bottom, var(--card), transparent); }
.hwheel-fade--bottom { bottom: 0; background: linear-gradient(to top, var(--card), transparent); }
.hwheel-unit {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  pointer-events: none;
  z-index: 3;
}
#alturaBlock { margin-bottom: 28px; }
.altura-note {
  font-size: 12px;
  color: var(--text3);
  margin: 10px 0 14px;
  line-height: 1.4;
  text-align: center;
}
.field-edit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}
.field-cancel-link {
  background: none;
  border: none;
  padding: 0;
  min-height: 44px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text3);
  cursor: pointer;
}
.altura-locked {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
}
.field-edit-link {
  display: inline-block;
  background: none;
  border: none;
  padding: 8px 0 4px;
  font-family: inherit;
  font-size: 12px;
  color: var(--green);
  text-decoration: underline;
  cursor: pointer;
}
.cond-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  margin-top: 2px;
  white-space: pre-wrap;
}
.cond-empty {
  font-size: 14px;
  color: var(--text3);
  margin-top: 2px;
}
#condBlock { margin-bottom: 8px; }
.altura-add-btn {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}@media (hover: hover) {
  .altura-add-btn:hover { border-color: var(--green); color: var(--green); }
}

/* Menu */
.menu-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
}
.menu-badge--super {
  background: rgba(130,100,200,0.2);
  color: #9b7dd4;
}
.menu-badge--profe {
  background: var(--bg2);
  color: var(--text3);
  border: 1px solid var(--border);
}
.menu-stats {
  font-size: 10px;
  color: var(--text3);
  margin-top: 8px;
  letter-spacing: 0.2px;
}

/* Payment Success */
.payment-success-icon--violet {
  background: rgba(139,92,246,0.12);
}
.payment-success-icon__svg--violet {
  stroke: #8b5cf6;
}

/* Loading / Error States */
.loading-text {
  color: var(--text3);
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
}
.loading-text--sm {
  color: var(--text3);
  font-size: 14px;
  padding: 4px 0;
}
.error-text {
  color: #dc5050;
  text-align: center;
  font-size: 14px;
}

/* Tab pills (picker tabs) */
.picker-tab {
  flex: 0 0 auto;
  padding: 12px 20px;
}

/* Text / Loading States */
.text-muted {
  color: var(--text3);
  font-size: 13px;
  padding: 12px 0;
}
.loading-lg {
  text-align: center;
  padding: 30px 0;
  color: var(--text3);
  font-size: 13px;
}
.loading-md {
  text-align: center;
  padding: 32px 0;
  color: var(--text3);
  font-size: 14px;
}
.text-error {
  color: var(--red);
  font-size: 13px;
}
.empty-text {
  padding: 20px;
  color: var(--text3);
  font-size: 14px;
}
.title-lg {
  font-size: 18px;
  font-weight: 700;
}
.text-stat {
  font-size: 10px;
  color: var(--text3);
  margin-top: 8px;
}
.text-empty {
  color: var(--text3);
  font-size: 13px;
  margin-bottom: 14px;
}

/* Plan Action Button */
.plan-action-btn--inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  width: auto;
}

/* Empty State Icon */
.icon-empty {
  color: var(--text3);
  opacity: 0.25;
  display: block;
  margin: 0 auto 10px;
}

/* Text / Label Components */
.text-semi {
  font-weight: 600;
  font-size: 13px;
}
.text-strong {
  font-size: 13px;
  font-weight: 600;
}
.text-sub {
  font-size: 14px;
  color: var(--text3);
  margin-top: 2px;
}
.label-tiny {
  font-size: 9px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.label-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 4px;
}
.label-section--sm {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}
.empty-state-lg {
  padding: 40px;
  text-align: center;
  color: var(--text3);
}
.routines-empty { padding: 52px 24px; }
.routines-empty__icon { width: 46px; height: 46px; stroke: var(--text3); fill: none; display: block; margin: 0 auto 16px; }
.routines-empty__cta {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 7px;
  background: var(--green); color: #fff; border: none; border-radius: 12px;
  padding: 12px 20px; font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.routines-empty__cta svg { width: 16px; height: 16px; }
.routines-empty__cta:active { filter: brightness(0.94); }

/* Icon Sizes */
.icon-13 {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round;
  margin-right: 5px; vertical-align: -2px;
}
.icon-13--shrink {
  flex-shrink: 0;
}
.icon-13--static {
  width: 13px; height: 13px;
  stroke: var(--text3); fill: none;
  stroke-width: 2; flex-shrink: 0;
}
.icon-14 {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round;
}
.icon-16--static {
  width: 16px; height: 16px;
  stroke: var(--text3); fill: none;
  stroke-width: 2; flex-shrink: 0;
}

/* Stat Numbers */
.stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

/* Pagination Buttons */
.btn-page {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text2);
}

/* Badge Current */
.badge-current {
  background: linear-gradient(135deg, #34d399, #8b5cf6);
  color: #fff;
  width: auto;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(52, 211, 153, 0.3);
}

/* Textarea Card */
.textarea-card {
  width: 100%;
  background: var(--bg2);
  border: 2px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
  resize: none;
  min-height: 120px;
}

/* Glass Card Variants */
.glass-card--sm {
  background: var(--glass-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: 12px 16px;
}
.glass-card--md {
  background: var(--glass-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: 16px;
}
.glass-card--center {
  background: var(--glass-card);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

/* Media Close Button */
.media-close-btn {
  position: absolute;
  top: 6px; right: 6px;
  z-index: 2;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Badge Tag */
.badge-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--bg2);
  color: var(--text3);
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 6px;
  border: 1px solid var(--border);
}

/* Card Variants */
.card-stacked {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-center {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}

/* Grid 2 columns */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

/* Image fit modal */
.img-fit-modal {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
}

/* Media preview (archivos medicos) */
.med-preview-pdf {
  width: min(500px, 92vw);
  height: 85vh;
  border: none;
  border-radius: 12px;
  background: #fff;
}
.med-preview-fallback {
  text-align: center;
  color: #fff;
  padding: 32px 16px;
}
.med-preview-fallback__text {
  margin: 0 0 16px;
  font-size: 15px;
}
.med-preview-fallback__download {
  display: inline-block;
  padding: 10px 20px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
}
.med-preview-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 36px 26px;
  max-width: 84vw;
  background: rgba(255,255,255,0.07);
  border-radius: 18px;
}
.med-preview-open-icon svg { width: 56px; height: 56px; color: rgba(255,255,255,0.9); }
.med-preview-open-name { font-size: 15px; color: rgba(255,255,255,0.85); line-height: 1.45; word-break: break-word; }
.med-preview-open-btn {
  background: #fff;
  color: #141414;
  border: none;
  border-radius: 11px;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.med-preview-open-btn:active { opacity: 0.85; }

/* Alert Green */
.alert-green {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(107,155,150,0.1);
  border: 1px solid rgba(107,155,150,0.3);
  border-radius: 10px;
  margin-bottom: 14px;
}

/* Ghost Button */
.btn-ghost {
  background: none;
  border: none;
  font-size: 11px;
  color: var(--text3);
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Thumb 80 */
.thumb-80 {
  width: 80px;
  height: 80px;
}

/* Auth */
.auth-input--pass {
  padding-right: 44px;
}

/* Media */
.media-slide.media-slide--white {
  background: #fff;
}
.iframe-vid {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}
.vid-fit {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.renew-nudge {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 12px;
  padding: 14px;
  margin: 0 16px 12px;
  text-align: center;
}
.renew-nudge-title {
  font-size: 14px;
  font-weight: 700;
  color: #f59e0b;
}
.renew-nudge-text {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
  line-height: 1.4;
}
.renew-nudge-btn {
  margin-top: 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #f59e0b;
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.renew-nudge-btn:active {
  opacity: 0.85;
}

.confirm-q-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.confirm-q-text {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.55;
  text-wrap: pretty;
}

/* Mis pesos / historial por ejercicio */
.exweights-sub {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.5;
  margin: 4px 0 16px;
}
.exweights-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.exweights-empty {
  text-align: center;
  color: var(--text3);
  font-size: 13px;
  padding: 18px 0;
}
.exweights-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.exweights-card:active {
  transform: scale(0.99);
  border-color: var(--text3);
}
.exweights-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.exweights-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
}
.exweights-last {
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  flex-shrink: 0;
}
.exweights-spark {
  margin: 8px 0 4px;
}
.exweights-meta {
  font-size: 12px;
  color: var(--text3);
}
.exhist-spark {
  margin-bottom: 12px;
}
.exhist-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.exhist-stat {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
}
.exhist-stat-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.exhist-stat-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  margin-left: 2px;
}
.vgsel-desc { font-size: 12px; color: var(--text3); line-height: 1.4; margin-bottom: 12px; }
.vgsel { display: flex; align-items: center; gap: 14px; }
.vgsel-thumb { position: relative; width: 90px; height: 90px; border-radius: 12px; overflow: hidden; background: var(--card); flex-shrink: 0; }
.vgsel-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.28s ease; }
.vgsel-thumb img.on { opacity: 1; }
.vgsel-right { flex: 1; min-width: 0; }
.vgsel-seg { display: flex; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.vgsel-seg button { flex: 1; background: transparent; border: none; color: var(--text3); font-family: inherit; font-size: 13px; font-weight: 700; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: all 0.18s; -webkit-tap-highlight-color: transparent; }
.vgsel-seg button.on { background: linear-gradient(135deg, #34d399, #8b5cf6); color: #fff; }
.vgsel-right .field-note { margin-top: 8px; }
.exhist-stat-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  margin-top: 2px;
}
.exhist-empty {
  font-size: 13px;
  color: var(--text3);
  text-align: center;
  padding: 40px 0;
}
.exhist-noset {
  font-size: 12px;
  color: var(--text3);
  font-style: italic;
  margin-top: 4px;
}
.exhist-delta {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.exhist-delta-up { color: var(--green); }
.exhist-delta-down { color: #c98a2e; }
.exhist-delta-eq { color: var(--text3); }
.exhist-group {
  border-bottom: 1px solid var(--border);
}
.exhist-group-hd {
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.exhist-group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.exhist-group-meta {
  font-size: 12px;
  color: var(--text3);
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 10px;
  text-align: right;
}
.exhist-group-sub {
  white-space: nowrap;
}
.exhist-group-chev {
  width: 16px;
  height: 16px;
  color: var(--text3);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.exhist-group-hd.open .exhist-group-chev {
  transform: rotate(180deg);
}
.exhist-group-body {
  display: none;
  padding-bottom: 8px;
}
.exhist-group-body.open {
  display: block;
}
.exhist-stat-date {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
  white-space: nowrap;
}
.exhist-sess {
  padding: 10px 0;
}
.exhist-sess + .exhist-sess {
  border-top: 1px solid var(--border);
}
.exhist-sess-hd {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.exhist-sess-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.exhist-sets-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.exhist-set-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
}
.exhist-set-reps {
  color: var(--text3);
  font-weight: 500;
}
.exhist-set-x {
  color: var(--text3);
  font-weight: 400;
  margin: 0 4px;
}
.exhist-set-chip--nodata {
  color: var(--text3);
  font-weight: 500;
}
.exhist-set-chip--tech {
  flex: 0 0 100%;
  white-space: normal;
}
.exhist-set-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.exhist-set-top .method-tag {
  text-transform: none;
  letter-spacing: 0.2px;
}
.exhist-set-detail {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
  margin-top: 5px;
}
.exhist-set-detail b {
  color: var(--text2);
  font-weight: 700;
}
.exhist-tech-arrow {
  color: var(--text3);
  opacity: 0.6;
}
.exhist-tech-total {
  color: var(--text3);
  opacity: 0.85;
}
.exhist-tech-total::before {
  content: "· ";
}

.student-actions-row {
  padding-bottom: 4px;
}

.student-link-btn {
  background: none;
  border: none;
  color: var(--text3);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.5px;
  cursor: pointer;
  padding: 4px 0;
  opacity: 0.6;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}@media (hover: hover) {
  .student-link-btn:hover {
  opacity: 1;
}
}

.student-link-btn--underline {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.attendance-link {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 11px;
  font-family: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: color 0.2s;
}@media (hover: hover) {
  .attendance-link:hover {
  color: var(--text);
}
}
.attendance-link--block {
  display: block;
}

.fsheet-ov { position: fixed; inset: 0; z-index: 1300; background: rgba(0,0,0,0); display: flex; align-items: center; justify-content: center; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); transition: background-color 0.2s; }
.fsheet-ov.open { background: rgba(0,0,0,0.5); }
.fsheet { background: var(--card); width: 100%; max-width: 440px; max-height: min(82dvh, 600px); display: flex; flex-direction: column; border-radius: 18px; padding: 14px 18px 16px; opacity: 0; transform: scale(0.94); will-change: transform, opacity; box-shadow: 0 18px 50px rgba(0,0,0,0.4); transition: opacity 0.2s, transform 0.22s cubic-bezier(0.34,1.1,0.64,1); }
.fsheet-ov.open .fsheet { opacity: 1; transform: none; }
.fsheet-handle { display: none; }
.fsheet-head { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.fsheet-head-actions { display: flex; align-items: center; gap: 10px; }
.fsheet-title { font-size: 15px; font-weight: 700; color: var(--text); }
.fsheet-x { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; background: var(--border); border: none; border-radius: 50%; font-size: 19px; line-height: 1; color: var(--text); cursor: pointer; padding: 0; font-family: inherit; -webkit-tap-highlight-color: transparent; transition: background 0.2s; }
.fsheet-x:active { background: var(--text3); }
.fsheet-scroll { overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: 6px; }
.fsheet-group-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text3); margin: 14px 0 8px; }
.fsheet-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fsheet-chip { background: var(--bg2); border: 1px solid var(--border); color: var(--text2); font-size: 12px; padding: 7px 12px; border-radius: 18px; cursor: pointer; font-family: inherit; -webkit-tap-highlight-color: transparent; }
.fsheet-chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.fsheet-clear-link { background: none; border: none; font-size: 13px; color: var(--green); cursor: pointer; font-family: inherit; padding: 2px 4px; text-decoration: underline; text-underline-offset: 3px; -webkit-tap-highlight-color: transparent; }
.fsheet-foot { flex-shrink: 0; display: flex; gap: 8px; padding-top: 12px; }
.fsheet-clear { flex: 1; background: transparent; border: 1px solid var(--border); color: var(--text2); border-radius: 11px; padding: 12px; font-size: 13px; cursor: pointer; font-family: inherit; }
.fsheet-apply { flex: 1; background: var(--green); border: none; color: #fff; border-radius: 11px; padding: 12px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.fsheet-link { display: inline-block; margin-top: 18px; padding: 0; background: none; border: none; font-size: 13px; font-family: inherit; color: var(--green); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.catmgr-ov { position: fixed; inset: 0; z-index: 1300; background: rgba(0,0,0,0); display: flex; align-items: center; justify-content: center; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); transition: background-color 0.2s; }
.catmgr-ov.open { background: rgba(0,0,0,0.5); }
.catmgr { background: var(--card); width: 100%; max-width: 440px; max-height: min(86dvh, 640px); display: flex; flex-direction: column; border-radius: 18px; padding: 16px 18px; opacity: 0; transform: scale(0.94); box-shadow: 0 18px 50px rgba(0,0,0,0.4); transition: opacity 0.2s, transform 0.22s cubic-bezier(0.34,1.1,0.64,1); }
.catmgr-ov.open .catmgr { opacity: 1; transform: none; }
.catmgr-head { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; margin-bottom: 6px; }
.catmgr-title { font-size: 15px; font-weight: 700; color: var(--text); }
.catmgr-x { flex-shrink: 0; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: var(--bg2); border: none; border-radius: 50%; color: var(--text2); cursor: pointer; padding: 0; }
.catmgr-x svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; }
.catmgr-scroll { overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.catmgr-sect { margin-top: 14px; }
.catmgr-sect-head { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text3); margin-bottom: 8px; }
.catmgr-row { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--bg2); border-radius: 10px; margin-bottom: 6px; }
.catmgr-val { flex: 1; min-width: 0; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catmgr-count { font-size: 11px; color: var(--text3); }
.catmgr-act { flex-shrink: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: none; border: none; color: var(--text2); cursor: pointer; padding: 0; }
.catmgr-act svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.catmgr-act--del { color: var(--red); }
.catmgr-empty { font-size: 12px; color: var(--text3); padding: 2px 2px 6px; }
.catmgr-add { width: 100%; background: transparent; border: 1px dashed var(--border); color: var(--text2); border-radius: 10px; padding: 10px; font-size: 13px; cursor: pointer; font-family: inherit; -webkit-tap-highlight-color: transparent; }
.catmgr-row--base { background: transparent; padding: 7px 2px; margin-bottom: 0; }
.catmgr-row--base .catmgr-val { color: var(--text2); }
.catmgr-tag { margin-left: auto; font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.4px; }
.fsheet-chip--add { background: transparent; border: 1px dashed var(--border); color: var(--text3); }
.filter-btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 9px 14px; font-size: 13px; cursor: pointer; font-family: inherit; -webkit-tap-highlight-color: transparent; white-space: nowrap; touch-action: manipulation; }
.filter-btn .fb-count { background: var(--green); color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

.scroll-top-btn { position: fixed; right: 24px; bottom: 24px; z-index: 199; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.18); opacity: 0; transform: translateY(8px) scale(0.92); pointer-events: none; transition: opacity 0.2s, transform 0.2s; -webkit-tap-highlight-color: transparent; }
.scroll-top-btn.show { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top-btn.above-fab { bottom: 92px; right: 29px; }
.scroll-top-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.scroll-top-btn:active { transform: scale(0.9); }

.llm-search-btn { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; align-self: center; padding: 0 14px; height: 44px; border-radius: 14px; border: 1px solid var(--green); background: rgba(52,211,153,0.12); color: var(--green); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.llm-search-btn svg { width: 15px; height: 15px; }
.llm-search-btn:active { background: rgba(52,211,153,0.22); }
.llm-sheet { max-width: 420px; display: flex; flex-direction: column; max-height: 85dvh; overflow: hidden; }
.llm-sheet .modal-title { flex-shrink: 0; }
.llm-sheet #llmResultsBody { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.llm-sheet .modal-actions { flex-shrink: 0; }
.llm-query { flex-shrink: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0 0 2px; padding: 0; font-size: 13px; color: var(--text); line-height: 1.4; }
.llm-query-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text3); }
.llm-state { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px 12px; text-align: center; }
.llm-msg { font-size: 14px; color: var(--text2); line-height: 1.45; }
.llm-cands { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; margin-top: 12px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.llm-cand { display: flex; align-items: center; gap: 11px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg2); cursor: pointer; transition: border-color 0.15s, background 0.15s; -webkit-tap-highlight-color: transparent; }
.llm-cand:active { background: var(--card); }
.llm-cand.selected { border-color: var(--green); background: rgba(52,211,153,0.08); }
.llm-cand-thumb { width: 46px; height: 46px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--card); display: flex; align-items: center; justify-content: center; }
.llm-cand-thumb img { width: 100%; height: 100%; object-fit: cover; }
.llm-cand-ph { color: var(--text3); font-size: 18px; }
.llm-cand-info { flex: 1; min-width: 0; }
.llm-cand-name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.25; }
.llm-cand-reason { font-size: 12px; color: var(--text3); line-height: 1.35; margin-top: 2px; }
.llm-badge { display: inline-block; margin-top: 5px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.llm-badge--banco { background: rgba(155,125,212,0.15); color: #9b7dd4; }
.llm-badge--biblioteca { background: rgba(52,211,153,0.15); color: var(--green); }
.llm-cand-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; transition: all 0.15s; }
.llm-cand.selected .llm-cand-check { border-color: transparent; background: var(--green); }
.llm-size-q { font-size: 14px; font-weight: 600; color: var(--text); margin: 14px 0 10px; }
.llm-size-opts { display: flex; gap: 8px; }
.llm-size-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg2); color: var(--text); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color 0.15s, background 0.15s; }
.llm-size-btn:active { background: var(--card); border-color: var(--green); }
.llm-size-n { font-size: 22px; font-weight: 800; color: var(--green); line-height: 1; }
.llm-prop { padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg2); cursor: pointer; transition: border-color 0.15s, background 0.15s; -webkit-tap-highlight-color: transparent; }
.llm-prop:active { background: var(--card); border-color: var(--green); }
.llm-prop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.llm-prop-title { font-size: 13px; font-weight: 700; color: var(--text); }
.llm-prop-exs { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.llm-prop-ex { display: flex; align-items: center; gap: 9px; }
.llm-prop-ex-thumb { width: 38px; height: 38px; border-radius: 9px; overflow: hidden; flex-shrink: 0; background: var(--card); display: flex; align-items: center; justify-content: center; }
.llm-prop-ex-thumb img { width: 100%; height: 100%; object-fit: cover; }
.llm-prop-ex-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.25; }
.llm-prop-ex .llm-badge { margin-top: 0; flex-shrink: 0; }
.llm-prop-cta { margin-top: 12px; text-align: center; padding: 9px; border-radius: 11px; background: rgba(52,211,153,0.12); color: var(--green); font-size: 13px; font-weight: 700; }
.serie-type-badge.superserie { background: rgba(77,182,172,0.15); color: var(--st-biserie); }
.tpl-ex-reps { font-size: 12px; font-weight: 500; color: var(--text3); margin-bottom: 3px; }
.ro-set-grid { display: grid; grid-template-columns: 18px auto 1fr; row-gap: 7px; column-gap: 10px; align-items: center; margin: 4px 0 2px; }
.ro-set-n { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(107,155,150,0.15); color: var(--green); font-size: 10px; font-weight: 700; }
.ro-set-tgt { font-size: 14px; font-weight: 600; color: var(--text); }
.ro-set-int { font-size: 13px; color: var(--text2); }
.ro-set-tempo { margin-top: 11px; padding-top: 9px; border-top: 0.5px solid var(--border); font-size: 12px; color: var(--text2); }
.ro-ex-meta { font-size: 12px; color: var(--text2); margin-top: 4px; }
.ro-ex-pct { display: inline-block; font-size: 11px; font-weight: 700; color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); border-radius: 7px; padding: 2px 8px; margin-top: 3px; }
.ro-ex-row { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; }
.ro-ex-row:first-of-type { padding-top: 2px; }
.ro-ex-label {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: rgba(107,155,150,0.15); color: var(--green);
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
  /* el badge (28px) es mas alto que el primer renglon del nombre: lo subo para centrar su circulo en la primera linea cuando el texto ocupa 2-3 renglones */
  margin-top: -4px;
}
.ro-ex-name-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; padding: 0; margin: 0 0 2px;
  font-family: inherit; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* el ojo va fijo a la derecha de cada fila y alineado al primer renglon (posicion consistente en filas cortas y largas) */
.ro-ex-eye {
  flex-shrink: 0; align-self: flex-start;
  background: none; border: none; cursor: pointer;
  padding: 1px 2px 8px 8px; color: var(--text3); opacity: 0.7;
  -webkit-tap-highlight-color: transparent;
}
.ro-ex-eye svg { width: 18px; height: 18px; display: block; }
.ro-ex-eye:active { opacity: 0.5; }
.ro-ex-name-btn:active { opacity: 0.6; }
.plan-count-chip { display: inline-block; margin-top: 4px; font-size: 10px; font-weight: 600; color: var(--green); background: rgba(52,211,153,0.12); border-radius: 8px; padding: 2px 7px; }
.plan-count-chip.is-zero { color: var(--text3); background: var(--bg2); }
.lib-preview-meta { display: flex; justify-content: center; padding: 10px 0 2px; }
.meta-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text2); background: var(--bg2); border: 1px solid var(--border); border-radius: 9px; padding: 4px 9px; white-space: nowrap; }
.meta-chip svg { width: 13px; height: 13px; flex-shrink: 0; stroke: currentColor; }
.meta-chip.is-count { background: transparent; font-weight: 600; color: var(--text2); }
.meta-chips-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ex-rest-chip { display: none; align-items: center; gap: 4px; font-size: 11px; color: var(--text3); margin-top: 3px; }
.ex-rest-chip svg { width: 12px; height: 12px; flex-shrink: 0; stroke: currentColor; }
.tpl-ex-collapse.collapsed .ex-rest-chip { display: inline-flex; }
.tpl-ex-badges-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.tpl-ex-badges-row .ex-rest-chip { margin-top: 0; }
.tpl-ex-presc { display: none; font-size: 12px; font-weight: 600; color: var(--text2); margin-top: 2px; }
.tpl-ex-collapse.collapsed .tpl-ex-presc { display: block; }
.tpl-ex-collapse.collapsed .tpl-prep-field { display: none; }

.rest-trigger-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rest-trigger {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--text2);
  background: var(--bg2); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 12px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, color 0.15s;
}@media (hover: hover) {
  .rest-trigger:hover { border-color: var(--text3); color: var(--text); }
}
.rest-trigger:active { border-color: var(--text3); color: var(--text); }
.rest-trigger-icon svg { width: 14px; height: 14px; display: block; stroke: currentColor; }
.rest-trigger-label { color: var(--text3); }
.rest-trigger-val { color: var(--text); font-weight: 700; }
.rest-trigger-chev svg { width: 13px; height: 13px; display: block; stroke: currentColor; opacity: 0.7; }
.rest-trigger--wide {
  flex: 1 1 100%; width: 100%; display: flex; align-items: center; gap: 11px;
  white-space: normal; border-radius: 12px; padding: 10px 14px; text-align: left;
}
.rest-trigger--wide .rest-trigger-icon svg { width: 17px; height: 17px; }
.rest-trigger-stack { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.rest-trigger--wide .rest-trigger-label { font-size: 11px; font-weight: 600; color: var(--text3); }
.rest-trigger--wide .rest-trigger-val { font-size: 15px; font-weight: 700; color: var(--text); }
.rest-trigger--wide .rest-trigger-chev { flex-shrink: 0; }
.rest-trigger--wide .rest-trigger-chev svg { width: 15px; height: 15px; }

#restPickerOverlay { z-index: 1200; }
#cpromptOverlay { z-index: 1390; }
#confirmOverlay { z-index: 1400; }
.rest-picker-sheet .modal-body { padding-top: 4px; }
.libdet { padding: 4px 0 2px; }
.libdet-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 2px; }
.libdet-chip { font-size: 11px; background: var(--bg2); color: var(--text2); border-radius: 8px; padding: 4px 9px; }
.libdet-sec { font-size: 11px; color: var(--text3); margin-top: 8px; }
.libdet-sect { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; color: var(--text3); margin: 18px 0 9px; }
.libdet-step { display: flex; gap: 11px; font-size: 13.5px; color: var(--text); line-height: 1.5; margin-bottom: 12px; align-items: flex-start; }
.libdet-stepnum { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--bg2); color: var(--text2); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.libdet-tips { background: var(--bg2); border-radius: 12px; padding: 13px 15px; margin-top: 4px; }
.libdet-tip { display: flex; gap: 10px; font-size: 13px; color: var(--text2); line-height: 1.5; align-items: flex-start; }
.libdet-tip + .libdet-tip { margin-top: 10px; }
.libdet-tip::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-top: 7px; }
.rest-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rest-chip {
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 9px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text2); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: border-color 0.15s, background 0.15s, color 0.15s;
}@media (hover: hover) {
  .rest-chip:hover { border-color: var(--text3); color: var(--text); }
}
.rest-chip.sel { background: var(--text); color: var(--card); border-color: var(--text); }
.rest-chip--none { border-style: dashed; }
.rest-mode { display: flex; gap: 4px; margin-top: 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.rest-mode-opt {
  flex: 1; font-family: inherit; font-size: 12px; font-weight: 700; color: var(--text3);
  background: none; border: none; border-radius: 999px; padding: 7px 10px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rest-mode-opt.active { background: var(--text); color: var(--card); }
.rest-range-pills { display: flex; gap: 8px; margin-bottom: 12px; }
.rest-range-pills.hidden { display: none; }
.rest-pill {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: inherit; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px 6px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.rest-pill span { font-size: 9px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text3); }
.rest-pill strong { font-size: 15px; font-weight: 700; color: var(--text); }
.rest-pill.active { border-color: var(--text); background: var(--card); }
.rest-div { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; }
.rest-div::before, .rest-div::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.rest-div span { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text3); }
.rest-wheels { display: flex; gap: 6px; justify-content: center; align-items: flex-start; position: relative; }
.rest-wheels-band {
  position: absolute; left: 0; right: 0; top: 44px; height: 44px;
  border-radius: 10px; background: color-mix(in srgb, var(--text) 6%, transparent);
  pointer-events: none;
}
.rest-wheels-col { display: flex; flex-direction: column; align-items: center; }
.rest-wheels-colon { font-size: 24px; font-weight: 700; color: var(--text3); margin-top: 42px; }
.rest-wheel {
  height: 132px; width: 96px; overflow-y: scroll; scroll-snap-type: y mandatory;
  position: relative; scrollbar-width: none; -ms-overflow-style: none; touch-action: pan-y;
}
.rest-wheel::-webkit-scrollbar { display: none; }
.rest-wheel-pad { height: 44px; }
.rest-wheel-item {
  height: 44px; scroll-snap-align: center; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--text3); font-variant-numeric: tabular-nums;
  transition: color 0.15s, font-weight 0.15s;
}
.rest-wheel-item.on { color: var(--text); font-weight: 700; }
.rest-wheel-unit { font-size: 11px; color: var(--text3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.orm-readout { text-align: center; margin-bottom: 16px; }
.orm-readout-val { display: block; font-size: 38px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.orm-readout-pct { font-size: 20px; color: var(--text3); margin-left: 2px; }
.orm-readout-hint { display: block; font-size: 12px; font-weight: 600; color: var(--green); margin-top: 2px; min-height: 15px; }
.orm-wheels .rest-wheels-band { left: 50%; transform: translateX(-50%); width: 120px; }
.llm-mode-sub { font-size: 10px; font-weight: 500; color: var(--text3); margin-top: 3px; text-align: center; }
.llm-setup { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.llm-setup-lbl { font-size: 12px; font-weight: 600; color: var(--text2); margin: 14px 0 8px; }
.llm-setup-lbl:first-child { margin-top: 4px; }
.llm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.llm-chip { padding: 9px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg2); color: var(--text2); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.llm-chip:active { background: var(--card); }
.llm-chip.on { border-color: var(--green); background: rgba(52,211,153,0.12); color: var(--green); }
.llm-chip-more { border-style: dashed; color: var(--text3); }
.tagfilter-row { display: flex; align-items: flex-start; gap: 6px; }
.tagfilter-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
.tagfilter-row--collapsed .tagfilter-chips { max-height: 26px; overflow: hidden; }
.tagfilter-chips--animating { overflow: hidden; transition: max-height 0.32s cubic-bezier(0.22, 0.61, 0.36, 1); }
.tag-filter-btn { font-size: 10px; line-height: 1.4; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--border); cursor: pointer; font-family: inherit; white-space: nowrap; transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease; }
.tag-filter-btn:active { transform: scale(0.94); }
.tagfilter-toggle { flex-shrink: 0; font-size: 10px; font-weight: 600; line-height: 1.4; padding: 4px 11px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg2); color: var(--text2); cursor: pointer; font-family: inherit; white-space: nowrap; transition: border-color 0.18s ease; }
.tagfilter-toggle:active { border-color: var(--text3); }
#exPickerFilters { padding: 12px 20px; }
#exPickerFilters .fx-row-end { align-items: stretch; }
#exPickerFilters .csel { margin-bottom: 0; }
#exPickerFilters .csel-trigger { min-height: 40px; padding: 9px 14px; font-size: 13px; }
#exPickerFilters .csel-trigger > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#exPickerFilters .filter-btn { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.llm-prop-ex-info { flex: 1; min-width: 0; }
.llm-prop-ex-presc { font-size: 11px; color: var(--text3); line-height: 1.3; margin-top: 2px; }
.llm-blk-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text); margin: 2px 0 2px; }
.llm-blk-adv { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 2px 8px; border-radius: 999px; background: rgba(155,125,212,0.15); color: #9b7dd4; }
.llm-blk-item { padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg2); display: flex; flex-direction: column; gap: 8px; }
.llm-blk-item.ss { background: rgba(77,182,172,0.07); }
.llm-blk-rest { font-size: 11px; font-weight: 600; color: var(--text2); margin-top: 2px; }
.llm-aviso { display: flex; align-items: flex-start; gap: 8px; background: rgba(245,158,11,0.12); color: var(--text); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-size: 12.5px; line-height: 1.4; }
.llm-aviso svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: #f59e0b; }
.llm-explica { display: flex; align-items: flex-start; gap: 8px; background: rgba(52,211,153,0.1); color: var(--text); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-size: 12.5px; line-height: 1.45; }
.llm-explica svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: var(--green); }
.llm-explica-lbl { font-weight: 700; }
.tpl-add-ai { display: flex; align-items: center; justify-content: center; gap: 6px; border-color: var(--green); color: var(--green); }
.tpl-add-ai:active { background: rgba(52,211,153,0.1); border-color: var(--green); }

.routine-block-card { border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px 2px; margin-bottom: 10px; background: var(--bg2); }
.routine-block-card__title { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

:root { --bt-prep: #4ca36a; --bt-trabajo: #cf4f4f; --bt-abierto: #c08a3e; }
:root { --st-biserie: #4db6ac; --st-triserie: #81c784; --st-circuito: #6b9b96; }

.tpl-block-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tpl-block-dot--preparacion { background: var(--bt-prep); }
.tpl-block-dot--trabajo { background: var(--bt-trabajo); }
.tpl-block-dot--abierto { background: var(--bt-abierto); }

.ro-block-type { font-size: 9px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.ro-block-type--preparacion { background: rgba(76,163,106,.14); color: var(--bt-prep); }
.ro-block-type--trabajo { background: rgba(207,79,79,.14); color: var(--bt-trabajo); }
.ro-block-type--abierto { background: rgba(192,138,62,.14); color: var(--bt-abierto); }
.routine-block-card--abierto { background: rgba(192,138,62,.05); border-color: rgba(192,138,62,.28); padding-bottom: 12px; }
.ro-block-note { font-size: 14px; color: var(--text2); line-height: 1.5; white-space: pre-line; }

.routine-ro-section { margin-bottom: 14px; }
.routine-ro-section__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; padding: 0 2px; }
.routine-ro-section__title { font-size: 14px; font-weight: 800; color: var(--text); }
.routine-ro-section__desc { font-size: 12.5px; color: var(--text2); line-height: 1.4; margin: -4px 2px 10px; }
.routine-ro-section__groups { display: flex; flex-direction: column; }

.routine-ro-group { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; background: var(--bg2); margin-bottom: 8px; }
.routine-ro-group__header { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.routine-ro-section__groups .routine-ro-group__header .tpl-block-dot { display: none; }
.routine-ro-group__letter { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; background: var(--card); border: 1px solid var(--border); color: var(--text2); }
.routine-ro-group__heading { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--text3); }
.ro-group-variant { font-weight: 500; opacity: 0.6; }
.routine-ro-group--preparacion .routine-ro-group__heading { color: var(--bt-prep); }
.routine-ro-group--trabajo.routine-ro-group--compound .routine-ro-group__heading { color: var(--bt-trabajo); }
.routine-ro-group__footer { margin-top: 8px; }

.bt-sheet-ov { position: fixed; inset: 0; z-index: 1200; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.bt-sheet { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.3); }
.bt-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bt-sheet-title { font-size: 15px; font-weight: 700; color: var(--text); }
.bt-sheet-close { background: none; border: none; color: var(--text3); width: 28px; height: 28px; cursor: pointer; padding: 0; }
.bt-sheet-close svg { width: 18px; height: 18px; }
.bt-option { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin-bottom: 8px; cursor: pointer; transition: border-color .15s, background .15s; font-family: inherit; }
.bt-option:last-child { margin-bottom: 0; }@media (hover: hover) {
  .bt-option:hover { background: var(--card); }
}@media (hover: hover) {
  .bt-option--preparacion:hover { border-color: var(--bt-prep); }
}@media (hover: hover) {
  .bt-option--trabajo:hover { border-color: var(--bt-trabajo); }
}@media (hover: hover) {
  .bt-option--abierto:hover { border-color: var(--bt-abierto); }
}
.bt-option-icon { flex: 0 0 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.bt-option-icon svg { width: 19px; height: 19px; }
.bt-option--preparacion .bt-option-icon { background: rgba(76,163,106,.14); color: var(--bt-prep); }
.bt-option--trabajo .bt-option-icon { background: rgba(207,79,79,.14); color: var(--bt-trabajo); }
.bt-option--abierto .bt-option-icon { background: rgba(192,138,62,.14); color: var(--bt-abierto); }
.bt-option-text { display: flex; flex-direction: column; gap: 3px; }
.bt-option-label { font-size: 14px; font-weight: 700; color: var(--text); }
.bt-option-desc { font-size: 12px; color: var(--text3); line-height: 1.35; }

.saved-block-search { margin: 0 0 10px; }
.saved-block-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.saved-block-empty { font-size: 13px; color: var(--text3); line-height: 1.4; text-align: center; padding: 18px 8px; }
.saved-block-row { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; background: var(--bg2); overflow: hidden; }
.saved-block-top { display: flex; align-items: center; gap: 8px; padding: 6px; }
.saved-block-pick { flex: 1; display: flex; align-items: center; gap: 10px; text-align: left; background: none; border: none; padding: 6px 6px 6px 8px; cursor: pointer; font-family: inherit; min-width: 0; }
.saved-block-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.saved-block-name { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-block-meta { font-size: 12px; color: var(--text3); }
.saved-block-toggle, .saved-block-del { flex: 0 0 34px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--border); border-radius: 9px; color: var(--text3); cursor: pointer; padding: 0; }
.saved-block-toggle svg, .saved-block-del svg { width: 16px; height: 16px; }
.saved-block-toggle { transition: transform .2s ease, color .15s; }
.saved-block-toggle.is-open { transform: rotate(180deg); color: var(--text); }@media (hover: hover) {
  .saved-block-del:hover { color: var(--red); border-color: var(--red); }
}
.saved-block-panel { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.saved-block-panel.is-open { max-height: 60vh; overflow-y: auto; }
.saved-block-panel-in { padding: 2px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.saved-block-empty-panel { font-size: 12px; color: var(--text3); padding: 6px 8px; }

.tpl-block-type { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: none; cursor: default; font-family: inherit; }
.tpl-block-type-ic { display: inline-flex; }
.tpl-block-type-ic svg { width: 11px; height: 11px; }
.tpl-block-type--preparacion { background: rgba(76,163,106,.14); color: var(--bt-prep); }
.tpl-block-type--trabajo { background: rgba(207,79,79,.14); color: var(--bt-trabajo); }
.tpl-block-type--abierto { background: rgba(192,138,62,.14); color: var(--bt-abierto); }

.tpl-coach-hint {
  display: flex; align-items: flex-start; gap: 9px;
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.22);
  border-radius: 12px;
  padding: 9px 10px 9px 11px;
  margin: -2px 2px 12px;
  font-size: 12.5px; line-height: 1.42;
  overflow: hidden;
  transition: height .26s cubic-bezier(.4,0,.2,1), opacity .2s ease, margin .26s ease, padding .26s ease, border-width .26s ease;
}
.tpl-coach-hint.closing { opacity: 0; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-top-width: 0; border-bottom-width: 0; }
.tpl-coach-hint-ico { flex: 0 0 16px; color: #f59e0b; margin-top: 1px; }
.tpl-coach-hint-ico svg { width: 16px; height: 16px; display: block; }
.tpl-coach-hint-text { flex: 1; color: var(--text2); }
.tpl-coach-hint-text b { color: #f9b54a; font-weight: 700; }
.tpl-coach-hint-x { flex: 0 0 auto; background: none; border: none; color: var(--text3); cursor: pointer; padding: 3px; margin: -3px -3px 0 0; line-height: 0; border-radius: 7px; -webkit-tap-highlight-color: transparent; }
.tpl-coach-hint-x svg { width: 15px; height: 15px; }@media (hover: hover) {
  .tpl-coach-hint-x:hover { color: var(--text); background: rgba(255,255,255,.05); }
}

.tpl-superset--abierto .tpl-superset-body { padding: 10px; }
.tpl-block-note-input { display: block; width: 100%; margin: 0; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; font-family: inherit; font-size: 14px; color: var(--text); line-height: 1.45; resize: none; min-height: 84px; outline: none; }
.tpl-block-note-input:focus { border-color: var(--bt-abierto); }

.limit-notice { border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; text-align: center; }
.limit-notice--warn { background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.18); color: #f59e0b; }
.limit-notice--danger { background: rgba(220,80,80,0.06); border: 1px solid rgba(220,80,80,0.18); }

.card-list { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.tag-pill { font-size: 9px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; background: var(--bg2); color: var(--text3); padding: 2px 7px; border-radius: 8px; border: 1px solid var(--border); }

/* Routine viewer / student calendar modals */
.routine-view-sheet { max-width: 500px; padding: 10px; display: flex; flex-direction: column; overflow: hidden; max-height: 85vh; position: relative; }
.routine-view-close { position: absolute; top: 10px; right: 10px; z-index: 5; }
.routine-view-body { overflow-y: auto; padding: 10px 10px 0 10px; flex: 1; }
.rv-header { margin-bottom: 0; }
.rv-title { font-size: 16px; }
.stcal-sheet { max-width: 480px; padding: 0; display: flex; flex-direction: column; overflow: hidden; max-height: 90vh; transform: none; }
.stcal-head { flex-shrink: 0; padding: 16px 20px 0; display: flex; align-items: center; justify-content: space-between; }
.stcal-head-name { font-size: 15px; font-weight: 700; }
.stcal-body { overflow-y: auto; padding: 12px 16px 24px; flex: 1; min-height: 420px; position: relative; }

/* Exercise picker layout */
.ex-picker-header .ex-picker-search-wrap { flex: 1; margin-bottom: 0; height: 44px; }
.ex-picker-filters { flex-shrink: 0; overflow: visible; padding: 6px 12px 0; border-bottom: 1px solid var(--border); position: relative; z-index: 10; }
.ex-picker-create-btn { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); right: max(16px, env(safe-area-inset-right)); z-index: 10; background: var(--green); color: #fff; border: none; border-radius: 24px; padding: 12px 20px; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.35); display: none; align-items: center; gap: 6px; }
.tpl-add-ai svg { width: 15px; height: 15px; }

.modal-sheet.confirm-sheet { padding: 22px 20px 16px; }
.confirm-sheet .modal-actions { margin-top: 18px; gap: 8px; }
.admin-save.confirm-ok-btn { padding: 14px 20px; font-size: 14px; text-transform: none; letter-spacing: 0; }
.admin-save.confirm-ok-btn--danger { background: var(--red); animation: none; box-shadow: none; }
.confirm-cancel-btn { width: 100%; padding: 13px 20px; background: var(--card-h); border: 1px solid var(--border); color: var(--text2); font-family: inherit; font-size: 14px; cursor: pointer; border-radius: 12px; }
.confirm-cancel-btn:active { background: var(--card); }

.tpl-card-btn { background: none; border: 1px solid var(--border); color: var(--text3); font-size: 11px; font-weight: 600; font-family: inherit; padding: 6px 10px; border-radius: 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: all 0.15s; }@media (hover: hover) {
  .tpl-card-btn:hover { border-color: var(--text2); color: var(--text2); }
}

.tpl-card-students { color: #8b7faa; }

.active-plan-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 10px; font-weight: 700; color: #4caf7d; background: rgba(76,175,125,0.12); border-radius: 20px; padding: 2px 8px; width: fit-content; }
.active-plan-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: #4caf7d; flex-shrink: 0; }

.gift-templates-head { margin-top: 28px; padding: 16px 0 12px; border-top: 1px solid var(--border); }
.gift-templates-icon { width: 18px; height: 18px; stroke: #9b7dd4; fill: none; stroke-width: 2; flex-shrink: 0; }

.icon-13--cur { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.icon-13--mr4 { margin-right: 4px; }
.icon-15--green { width: 15px; height: 15px; stroke: var(--green); fill: none; stroke-width: 2; flex-shrink: 0; }
.icon-15--cur { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }

.email-sug {
  position: absolute; z-index: 3000;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.email-sug.hidden { display: none; }
.email-sug-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; }
.email-sug-row + .email-sug-row { border-top: 1px solid var(--border); }@media (hover: hover) {
  .email-sug-row:hover { background: var(--bg2); }
}
.email-sug-row.active { background: var(--bg2); }
.email-sug-row svg { width: 16px; height: 16px; stroke: var(--text3); fill: none; stroke-width: 2; flex-shrink: 0; }
.email-sug-row span { font-size: 15px; color: var(--text); }
.email-sug-dom { color: var(--green); }

.myplan-templates-link { background: none; border: none; color: var(--text3); font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; padding: 0; line-height: 1; }

.routine-tag-chip__x { background: none; border: none; color: inherit; cursor: pointer; padding: 0 2px; display: inline-flex; align-items: center; }
.add-tag-wrap { position: relative; display: inline-block; }
.add-tag-btn { font-size: 13px; padding: 8px 16px; border-radius: 20px; border: 1px dashed var(--border); background: none; color: var(--text3); cursor: pointer; font-family: inherit; font-weight: 500; }
.tag-options-list { max-height: 220px; overflow-y: auto; }
.tag-create-plus { color: #7189a8; }

.cprompt-input { width: 100%; background: var(--bg2); border: 2px solid var(--border); color: var(--text); font-family: inherit; font-size: 15px; padding: 12px 14px; border-radius: 10px; outline: none; margin-bottom: 12px; }
.cprompt-input--emoji { font-size: 40px; padding: 16px; text-align: center; margin-bottom: 0; }
.tag-color-grid { display: grid; grid-template-columns: repeat(8, 28px); gap: 10px; justify-content: center; }

.thumb-fade { opacity: 0; transition: opacity 240ms ease; }
.thumb-fade.loaded { opacity: 1; }

.nov-badge {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  background: var(--green);
  color: #0a0a0a;
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 19px;
  text-align: center;
}
.nov-badge.hidden { display: none; }
.nov-toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 9400;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.nov-toast.is-visible { opacity: 1; transform: translateY(0); }
.nov-toast-txt { flex: 1 1 auto; font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4; }
.nov-toast-link {
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: var(--green);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
}
.nov-toast-close {
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: var(--text3);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.nov-item { padding: 14px 0; }
.nov-item + .nov-item { border-top: 1px solid var(--border); }
.nov-item-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.nov-chip {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text2);
  background: var(--bg2);
  border-radius: 6px;
  padding: 2px 8px;
}
.nov-item-date { font-size: 11.5px; color: var(--text3); }
.nov-new {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #0a0a0a;
  background: var(--green);
  border-radius: 6px;
  padding: 2px 7px;
}
.nov-item-t { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.nov-item-d { font-size: 13px; color: var(--text2); line-height: 1.55; }
.nov-empty { padding: 24px 0; text-align: center; font-size: 13px; color: var(--text3); }
