/* JV Fitness — estilos del panel. Usa los tokens de jvfitness-v3.css. */

/* ---------- Barra superior ---------- */
.panel-top { border-bottom: 1px solid var(--c-line); }
.panel-top__bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; min-height: var(--header-h); padding-block: .5rem; }
.panel-top__tag { font-family: var(--f-display); font-weight: 800; font-stretch: 70%; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: var(--c-black); background: var(--c-plate); padding: .15rem .5rem; border-radius: var(--radius); }
.panel-nav { display: flex; gap: 1.5rem; margin-left: 1rem; }
.panel-nav a { text-decoration: none; font-weight: 600; padding: .4rem 0; border-bottom: 2px solid transparent; }
.panel-nav a:hover { color: var(--c-plate); }
.panel-nav a[aria-current="page"] { border-bottom-color: var(--c-plate); }
.panel-top__user { margin-left: auto; display: flex; align-items: center; gap: 1rem; color: var(--c-muted); font-size: .95rem; }
.panel-top__user form { margin: 0; }
@media (max-width: 640px) {
  .panel-nav { order: 3; width: 100%; margin-left: 0; }
  .panel-top__name { display: none; }
}

/* ---------- Login ---------- */
.auth { min-height: calc(100svh - var(--header-h)); display: grid; place-items: center; padding-block: clamp(2.5rem, 8vw, 5rem); }
.auth__card { width: 100%; max-width: 28rem; }
.auth h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 4rem); }
.auth__submit { width: 100%; margin-top: .5rem; }

/* ---------- Campos ---------- */
.field { display: grid; gap: .4rem; margin-bottom: 1.25rem; align-content: start; }
.field label, .checks legend { font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: .75rem 1rem; font: inherit; color: var(--c-text);
  background: var(--c-iron); border: 1px solid var(--c-line); border-radius: var(--radius); transition: border-color .15s;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field select { appearance: none; padding-right: 2.5rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--c-plate) 50%), linear-gradient(135deg, var(--c-plate) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 50%, calc(100% - .9rem) 50%; background-size: .35rem .35rem; background-repeat: no-repeat; }
.field input::-webkit-calendar-picker-indicator { filter: invert(1); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #3a3a3a; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--c-plate); }
.field [aria-invalid="true"] { border-color: var(--c-plate); border-width: 2px; }
.field__error { color: var(--c-plate); font-size: .9rem; font-weight: 600; }
.field__error::before { content: "⚠ "; }

.alert { padding: 1rem 1.25rem; margin-bottom: 1.5rem; border-left: 4px solid var(--c-plate); background: var(--c-iron); }

/* ---------- Secciones del panel ---------- */
.panel-section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.panel-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.panel-title { font-size: clamp(2.6rem, 1.4rem + 4.5vw, 5rem); margin: 0; }
.client-code { font-family: var(--f-display); font-weight: 800; font-stretch: 70%; font-size: 1.4rem; color: var(--c-plate); letter-spacing: .04em; }

/* ---------- Tablero ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); list-style: none; margin: 0; padding: 0; }
.stat { display: grid; gap: .5rem; height: 100%; padding: 1.5rem; background: var(--c-black); text-decoration: none; transition: background-color .15s; }
a.stat:hover { background: var(--c-iron); }
.stat__num { font-family: var(--f-display); font-weight: 900; font-stretch: 62%; font-size: clamp(3rem, 2rem + 3vw, 4.5rem); line-height: .85; color: var(--c-plate); }
.stat__label { color: var(--c-muted); font-weight: 600; }

/* ---------- Filtros y tabla ---------- */
.filters { display: grid; gap: 0 1rem; grid-template-columns: 1fr; align-items: end; margin-bottom: .5rem; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr 1fr 1fr auto; } }
.filters__btn { margin-bottom: 1.25rem; }
.results-count { font-size: .95rem; margin-bottom: 1rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--c-line); }
.table { width: 100%; border-collapse: collapse; min-width: 44rem; }
.table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); font-weight: 700; padding: .9rem 1rem; border-bottom: 1px solid var(--c-line); background: var(--c-iron); }
.table td { padding: 1rem; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--c-iron); }
.table__code { font-family: var(--f-display); font-weight: 800; font-stretch: 75%; color: var(--c-plate); white-space: nowrap; }
.table__name { font-weight: 600; }
.table__actions { text-align: right; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .95rem; }
.status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; }
.status--on::before { background: var(--c-plate); }
.status--off { color: var(--c-muted); }
.status--off::before { border: 2px solid var(--c-muted); }
.empty { padding: 2.5rem 1.5rem; text-align: center; border: 1px dashed var(--c-line); color: var(--c-muted); }
.pager { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-top: 1.5rem; }

/* ---------- Formulario de entrenado ---------- */
.client-form { max-width: 60rem; }
.box { border: 1px solid var(--c-line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); margin: 0 0 1.5rem; background: var(--c-black); }
.box > legend { font-family: var(--f-display); font-weight: 800; font-stretch: 70%; text-transform: uppercase; font-size: 1.5rem; line-height: 1; padding: 0 .5rem; margin-left: -.5rem; }
.form-grid { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.checks { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
.checks legend { padding: 0; margin-bottom: .6rem; }
.checks__list { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-iron); font-weight: 600; transition: background-color .15s, border-color .15s, color .15s; }
.chip--lg span { min-width: 9rem; justify-content: center; font-family: var(--f-display); font-stretch: 75%; text-transform: uppercase; font-size: 1.05rem; }
.chip input:hover + span { border-color: #3a3a3a; }
.chip input:checked + span { background: var(--c-plate); border-color: var(--c-plate); color: var(--c-black); }
.chip input:checked + span::before { content: "✓"; margin-right: .4rem; }
.chip input:focus-visible + span { outline: 3px solid var(--c-focus); outline-offset: 3px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }

/* ---------- Perfil del entrenado ---------- */
.table__name a { text-decoration: none; }
.table__name a:hover { color: var(--c-plate); text-decoration: underline; text-underline-offset: 4px; }
.profile-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.25rem 2rem; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.profile-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin-bottom: .75rem; }
.profile-head__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 .6rem; border: 1px solid var(--c-line); border-radius: var(--radius); font-size: .9rem; font-weight: 600; color: var(--c-text); }
.stats--compact { margin-bottom: 1.5rem; }
.stats--compact .stat__num { font-size: clamp(2.4rem, 1.8rem + 2vw, 3.4rem); }
.info-grid { display: grid; gap: 0 1.5rem; }
@media (min-width: 900px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.box__title { font-size: 1.5rem; font-stretch: 70%; margin-bottom: 1.25rem; }
.dl { margin: 0; display: grid; }
.dl__row { display: grid; grid-template-columns: minmax(8rem, 40%) 1fr; gap: 1rem; padding-block: .7rem; border-bottom: 1px solid var(--c-line); }
.dl__row:last-child { border-bottom: 0; }
.dl dt { color: var(--c-muted); }
.dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.weight-form { display: grid; gap: 0 1rem; grid-template-columns: 1fr; align-items: end; margin-bottom: 1rem; }
@media (min-width: 760px) { .weight-form { grid-template-columns: 11rem 9rem 1fr auto; } }
.weight-form__btn { margin-bottom: 1.25rem; }
.table--compact { min-width: 36rem; }
.table td form { margin: 0; display: inline; }
.link-btn { background: none; border: 0; padding: .25rem 0; font: inherit; font-weight: 600; color: var(--c-muted); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.link-btn:hover { color: var(--c-plate); }
.notes { color: #dcdcdc; max-width: 48rem; }

/* ---------- Editor de entrenamientos ---------- */
.plan-for { margin-top: .75rem; }
.tag--draft { border-color: var(--c-plate); color: var(--c-plate); }
.plan-form { max-width: 76rem; }
.plan-form__name { grid-column: 1 / -1; }
.days { display: grid; gap: 1.25rem; }
.day { border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-black); padding: clamp(1rem, 2.5vw, 1.5rem); }
.day.is-dragging, .ex.is-dragging { opacity: .45; outline: 2px dashed var(--c-plate); outline-offset: 2px; }
.day__head { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: .75rem 1rem; margin-bottom: 1rem; }
.day__title { font-size: 1.9rem; font-stretch: 65%; margin: 0; color: var(--c-plate); white-space: nowrap; }
.day__name input, .ex__f input {
  width: 100%; min-height: 46px; padding: .6rem .8rem; font: inherit; color: var(--c-text);
  background: var(--c-iron); border: 1px solid var(--c-line); border-radius: var(--radius); transition: border-color .15s;
}
.day__name input { font-weight: 600; }
.day__name input:hover, .ex__f input:hover { border-color: #3a3a3a; }
.day__name input:focus-visible, .ex__f input:focus-visible { border-color: var(--c-plate); }
.day__tools, .ex__tools { display: flex; align-items: center; gap: .25rem; }
.day__tools .link-btn { margin-left: .5rem; }
.day__add { margin-top: .75rem; }
.add-day { margin: 1.25rem 0 1.5rem; }

.drag { display: inline-grid; place-items: center; width: 36px; min-height: 44px; padding: 0; background: none; border: 0; color: var(--c-muted); font-size: 1.2rem; cursor: grab; }
.drag:hover { color: var(--c-plate); }
.drag:active { cursor: grabbing; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; background: none; border: 1px solid transparent; border-radius: var(--radius); color: var(--c-muted); font: inherit; font-weight: 700; cursor: pointer; }
.icon-btn:hover { color: var(--c-plate); border-color: var(--c-line); }

.ex-list { display: grid; gap: .5rem; }
.ex { display: grid; gap: .5rem .75rem; grid-template-columns: auto 1fr 1fr; align-items: end; padding: .75rem; background: var(--c-iron); border: 1px solid var(--c-line); border-radius: var(--radius); }
.ex .ex__f input { background: var(--c-black); }
.ex__f { display: grid; gap: .25rem; min-width: 0; }
.ex__lbl { font-size: .8rem; font-weight: 600; color: var(--c-muted); }
.ex__name, .ex__notes { grid-column: 2 / -1; }
.ex .drag { grid-row: 1; }
.ex__tools { grid-column: 1 / -1; justify-content: flex-end; }
.ex-head { display: none; }

@media (min-width: 1000px) {
  .ex-head, .ex { grid-template-columns: 36px minmax(14rem, 2.4fr) 4.5rem 5.5rem 6.5rem 4rem minmax(10rem, 2fr) auto; }
  .ex-head { display: grid; gap: .75rem; padding: 0 .75rem .4rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
  .ex { align-items: center; padding: .4rem .75rem; background: transparent; border-color: transparent; border-bottom-color: var(--c-line); border-radius: 0; }
  .ex:hover { background: var(--c-iron); }
  .ex .ex__f input { background: var(--c-iron); }
  .ex__name, .ex__notes, .ex__tools { grid-column: auto; }
  .ex__lbl { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
@media (max-width: 640px) {
  .day__head { grid-template-columns: auto 1fr; }
  .day__name, .day__tools { grid-column: 1 / -1; }
}

.chip--confirm { margin-bottom: 1.5rem; }
.chip--confirm span { min-height: 52px; }
.form-actions--sticky { position: sticky; bottom: 0; z-index: 5; padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--c-black) 75%, transparent); }
.danger-zone { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--c-line); }

/* ---------- Documento del plan (vista previa / consulta) ---------- */
.table__second { margin-left: 1.25rem; }
.profile-head__actions form { margin: 0; }
.preview-note { margin-bottom: 1.25rem; }
.plan-doc { border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-black); max-width: 64rem; }
.plan-doc__head { padding: clamp(1.5rem, 4vw, 2.5rem); border-bottom: 1px solid var(--c-line); background: linear-gradient(180deg, var(--c-iron), var(--c-black)); }
.plan-doc__brand { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1.75rem; }
.plan-doc__team { font-family: var(--f-display); font-weight: 800; font-stretch: 70%; text-transform: uppercase; letter-spacing: .06em; color: var(--c-plate); }
.plan-doc__client { font-size: clamp(2.4rem, 1.5rem + 3.5vw, 4rem); margin: 0 0 1.25rem; }
.plan-doc__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.plan-doc__meta dt { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
.plan-doc__meta dd { margin: .2rem 0 0; font-weight: 600; }
.plan-doc__notes { margin: 1.5rem 0 0; padding-left: 1rem; border-left: 3px solid var(--c-plate); color: #dcdcdc; }
.plan-doc__day { padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) 0; }
.plan-doc__day:last-of-type { padding-bottom: clamp(1.25rem, 3vw, 2rem); }
.plan-doc__day-title { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); font-stretch: 65%; margin: 0 0 1rem; }
.plan-doc__day-title span { color: var(--c-plate); margin-right: .35rem; }
.plan-doc__table { min-width: 34rem; }
.plan-doc__n { width: 2.5rem; color: var(--c-muted); }
.plan-doc__vol { font-family: var(--f-display); font-weight: 800; font-stretch: 75%; font-size: 1.15rem; white-space: nowrap; }
.plan-doc__foot { padding: 1.5rem clamp(1rem, 3vw, 2rem); border-top: 1px solid var(--c-line); text-align: center; }
.plan-doc__quote { font-family: var(--f-display); font-weight: 800; font-stretch: 70%; text-transform: uppercase; font-size: 1.3rem; margin-bottom: .5rem; }

/* ---------- Versiones del PDF ---------- */
.doc-versions { max-width: 64rem; margin-top: 1.5rem; }
.doc-versions__list { list-style: none; margin: 0 0 1rem; padding: 0; }
.doc-versions__list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding-block: .7rem; border-bottom: 1px solid var(--c-line); }

/* ---------- Botones: misma altura sean enlace o botón de formulario ---------- */
.btn { line-height: 1.2; }
button.btn { font-family: var(--f-display); -webkit-appearance: none; appearance: none; }
.profile-head__actions, .form-actions { align-items: stretch; }
.profile-head__actions form, .form-actions form { display: flex; margin: 0; }
.profile-head__actions .btn, .form-actions .btn { min-height: 52px; }
.form-actions .text-link { align-self: center; }

/* =========================================================================
   Portal del entrenado
   ========================================================================= */
.eyebrow { font-family: var(--f-display); font-weight: 800; font-stretch: 75%; text-transform: uppercase; letter-spacing: .1em; color: var(--c-plate); font-size: .95rem; margin-bottom: .5rem; }
.auth__lead { margin-bottom: 1.5rem; }
.auth__help { margin-top: 1.5rem; font-size: .95rem; }
.hint { font-size: .9rem; }
.portal-jump { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.portal-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem 1rem; border: 1px solid var(--c-line); border-radius: var(--radius); text-decoration: none; font-weight: 600; transition: border-color .15s, color .15s; }
.portal-jump a:hover { border-color: var(--c-plate); color: var(--c-plate); }
.portal-block { padding-bottom: clamp(2.5rem, 6vw, 4rem); scroll-margin-top: 1rem; }
.portal-h2 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem); margin: 0 0 1.25rem; }
.panel-head .portal-h2 { margin: 0; }
.plan-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--c-line); border-radius: var(--radius); }
.plan-list__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--c-line); }
.plan-list__item:last-child { border-bottom: 0; }
.plan-list__name { font-weight: 700; margin: 0 0 .25rem; }
.plan-list__meta { margin: 0; font-size: .95rem; }
.plan-list__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.portal-note { margin: 1rem 0 0; font-size: .95rem; }
.account { margin-top: 1rem; }
.portal-foot { border-top: 1px solid var(--c-line); padding-block: 2rem calc(2rem + env(safe-area-inset-bottom, 0px)); }
.portal-foot p { margin: 0 0 .5rem; }

/* ---------- Mismo ancho para todas las secciones del portal ---------- */
.portal-block .plan-doc,
.portal-block .plan-list,
.portal-block .stats,
.portal-block .table-wrap,
.portal-block .box,
.portal-block .empty,
.panel-section .plan-doc { max-width: none; width: 100%; }
.portal-block .stats { margin-bottom: 1.25rem; }
.portal-block .box { margin-bottom: 0; }

/* ---------- Foto de perfil ---------- */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; object-fit: cover; background: var(--c-iron); border: 2px solid var(--c-line); }
.avatar--sm { width: 36px; height: 36px; }
.avatar--md { width: 48px; height: 48px; }
.avatar--lg { width: 72px; height: 72px; }
.avatar--xl { width: 120px; height: 120px; }
.avatar--initials { background: var(--c-plate); border-color: var(--c-plate); color: var(--c-black); font-family: var(--f-display); font-weight: 900; font-stretch: 75%; line-height: 1; }
.avatar--sm.avatar--initials { font-size: .85rem; }
.avatar--md.avatar--initials { font-size: 1.1rem; }
.avatar--lg.avatar--initials { font-size: 1.7rem; }
.avatar--xl.avatar--initials { font-size: 2.8rem; }
.hello { display: flex; align-items: center; gap: 1.25rem; }
.hello .panel-title { margin: 0; }
.hello__avatar { position: relative; display: inline-flex; text-decoration: none; border-radius: 50%; }
.hello__avatar:hover .avatar { border-color: var(--c-plate); }
.hello__add { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c-text); color: var(--c-black); font-weight: 900; line-height: 1; border: 2px solid var(--c-black); }
.photo-box { margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--c-line); }
.photo-box__row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.5rem; }
.photo-box__row > div { flex: 1 1 16rem; }
.photo-form { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: .5rem 0; }
.photo-form__file { max-width: 100%; font: inherit; font-size: .9rem; color: var(--c-muted); }
.photo-form__file::file-selector-button { margin-right: .75rem; padding: .55rem 1rem; font: inherit; font-weight: 700; color: var(--c-text); background: var(--c-iron); border: 1px solid var(--c-line); border-radius: var(--radius); cursor: pointer; }

/* ---------- Historial: nota legible y datos sin cortes ---------- */
.table--compact td { white-space: nowrap; }
.table--compact td.table__note { white-space: normal; min-width: 16rem; max-width: 28rem; line-height: 1.45; }

/* ---------- Mapa corporal: comparativo de medidas ---------- */
.body-map__title { font-size: 1.15rem; font-stretch: 75%; text-transform: uppercase; margin: .5rem 0 1rem; }
.body-map { margin: 0 0 2rem; padding: 1.25rem 1rem 1rem; border: 1px solid var(--c-line); border-radius: var(--radius); background: #050505; }
.body-map__svg { display: block; width: 100%; max-width: 30rem; height: auto; margin: 0 auto; font-family: inherit; }
.body-map__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.25rem; margin-top: 1rem; font-size: .85rem; font-weight: 600; color: #8a8a8a; }
.body-map__key--up { color: #3ecf6e; }
.body-map__key--down { color: #ff5a4f; }
.body-map__legend .muted { flex-basis: 100%; text-align: center; font-weight: 400; }

/* ---------- Guía de ejercicios ---------- */
.guide-head { padding-bottom: 1.5rem; }
.guide-back { margin: 0 0 1.5rem; }
.guide-intro { max-width: 38rem; color: var(--c-muted); margin: 1rem 0 0; }

.guide-nav { position: sticky; top: 0; z-index: 20; background: #000; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.guide-nav__inner { position: relative; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-top: .7rem; padding-bottom: .7rem; }
.guide-nav__inner::-webkit-scrollbar { display: none; }
.guide-nav__link { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: .35rem 1rem; border: 1px solid var(--c-line); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--c-muted); white-space: nowrap; transition: color .15s, border-color .15s, background-color .15s; }
.guide-nav__link:hover { color: var(--c-text); border-color: #444; }
.guide-nav__link.is-active { background: var(--c-plate); border-color: var(--c-plate); color: #000; }

.guide-body { padding: 1rem 0 clamp(3rem, 7vw, 5rem); }
.guide-group { padding-top: clamp(2rem, 5vw, 3rem); scroll-margin-top: 4.5rem; }
.guide-group__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.guide-group__title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); margin: 0; flex: none; }
.guide-group__rule { flex: 1; height: 6px; opacity: .35; background: repeating-linear-gradient(135deg, var(--c-plate) 0 2px, transparent 2px 6px); }

.guide-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(.75rem, 2vw, 1.25rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .guide-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.guide-grid > li { display: flex; }
.guide-card { position: relative; flex: 1; contain: layout paint; display: flex; flex-direction: column; text-decoration: none; color: var(--c-text); background: var(--c-iron); border: 1px solid var(--c-line); border-radius: 6px; overflow: hidden; transition: border-color .2s, transform .2s; }
.guide-card__media { position: relative; display: block; aspect-ratio: 1 / 1; min-height: 0; overflow: hidden; background: #fff; }
.guide-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; padding: 6%; transition: transform .35s ease; }
.guide-card__title { display: flex; align-items: center; min-height: 3.6rem; padding: .7rem .9rem; font-weight: 700; font-size: .95rem; line-height: 1.25; border-top: 3px solid transparent; transition: border-color .2s; }
.guide-card__zoom { position: absolute; top: .6rem; right: .6rem; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .75); color: var(--c-plate); opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s; }
.guide-card:hover, .guide-card:focus-visible { border-color: var(--c-plate); transform: translateY(-2px); }
.guide-card:hover .guide-card__media img, .guide-card:focus-visible .guide-card__media img { transform: scale(1.04); }
.guide-card:hover .guide-card__title, .guide-card:focus-visible .guide-card__title { border-top-color: var(--c-plate); }
.guide-card:hover .guide-card__zoom, .guide-card:focus-visible .guide-card__zoom { opacity: 1; transform: none; }
@media (hover: none) { .guide-card__zoom { opacity: 1; transform: none; } }

/* Visor */
html.viewer-open { overflow: hidden; }
.viewer { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: var(--c-text); }
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: rgba(0, 0, 0, .94); }
.viewer__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: max(1rem, env(safe-area-inset-top)) clamp(1rem, 4vw, 2.5rem) .75rem; }
.viewer__group { margin: 0 0 .25rem; font-family: var(--f-display); font-weight: 800; font-stretch: 75%; text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; color: var(--c-plate); }
.viewer__title { margin: 0; font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.4rem); line-height: 1; }
.viewer__close { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--c-line); background: var(--c-iron); color: var(--c-text); cursor: pointer; transition: border-color .15s, color .15s; }
.viewer__close:hover, .viewer__close:focus-visible { border-color: var(--c-plate); color: var(--c-plate); }
.viewer__stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 0 clamp(.5rem, 3vw, 2rem); }
.viewer__frame { margin: 0; height: 100%; max-width: 64rem; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; }
.viewer__frame img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; background: #fff; border-radius: 6px; padding: clamp(.5rem, 2vw, 1.25rem); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); transition: opacity .2s; }
.viewer.is-loading .viewer__frame img { opacity: .35; }
.viewer__arrow { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--c-plate); color: #000; cursor: pointer; box-shadow: 0 6px 24px rgba(0, 0, 0, .5); transition: background-color .15s, transform .15s; }
.viewer__arrow:hover, .viewer__arrow:focus-visible { background: var(--c-plate-hover); transform: scale(1.06); }
.viewer__strip { display: flex; gap: .5rem; overflow-x: auto; padding: .9rem clamp(1rem, 4vw, 2.5rem) max(1rem, env(safe-area-inset-bottom)); scrollbar-width: thin; scrollbar-color: #333 transparent; justify-content: safe center; }
.viewer__thumb { flex: none; width: 68px; height: 68px; padding: 3px; border-radius: 6px; border: 2px solid transparent; background: #fff; cursor: pointer; opacity: .5; transition: opacity .15s, border-color .15s; }
.viewer__thumb img { width: 100%; height: 100%; object-fit: contain; }
.viewer__thumb:hover, .viewer__thumb:focus-visible { opacity: .9; }
.viewer__thumb.is-active { opacity: 1; border-color: var(--c-plate); }
@media (max-width: 699px) {
  .viewer__stage { padding: 0 .5rem; }
  .viewer__arrow { position: absolute; bottom: .5rem; width: 48px; height: 48px; z-index: 2; }
  .viewer__arrow--prev { left: 1rem; }
  .viewer__arrow--next { right: 1rem; }
  .viewer__frame { padding-bottom: 4rem; }
  .viewer__thumb { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .guide-card, .guide-card__media img, .viewer__arrow { transition: none; }
}

/* ---------- Auto-registro de entrenados ---------- */
.signup { max-width: 56rem; }
.signup__intro { max-width: 42rem; color: var(--c-muted); margin: .75rem 0 2rem; }
.signup-form fieldset { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.25rem clamp(1rem, 3vw, 1.75rem) .5rem; margin: 0 0 1.5rem; background: var(--c-iron); min-width: 0; }
.signup-form legend { font-family: var(--f-display); font-weight: 800; font-stretch: 75%; text-transform: uppercase; letter-spacing: .05em; font-size: 1rem; color: var(--c-plate); padding: 0 .5rem; }
.su-grid { display: grid; gap: 0 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .su-grid { grid-template-columns: 1fr 1fr; } }
.signup-form .field__hint { font-size: .85rem; margin: 0; }
.signup-form__submit { width: 100%; margin-top: .5rem; }
@media (min-width: 620px) { .signup-form__submit { width: auto; min-width: 16rem; } }
.signup-done { border: 1px solid var(--c-line); border-left: 4px solid var(--c-plate); border-radius: var(--radius); background: var(--c-iron); padding: clamp(1.5rem, 4vw, 2.5rem); }
.signup-done h2 { margin: 0 0 .75rem; }
.signup-done p { color: var(--c-muted); margin: 0 0 1rem; }
.signup-done .btn { margin-top: .5rem; }

/* ---------- Campanita de notificaciones ---------- */
.bell { position: relative; }
.bell__btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; background: none; border: 1px solid var(--c-line); border-radius: 50%; color: var(--c-text); cursor: pointer; transition: border-color .15s, color .15s; }
.bell__btn:hover, .bell__btn[aria-expanded="true"] { border-color: var(--c-plate); color: var(--c-plate); }
.bell__dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; background: var(--c-plate); color: #000; font-size: .7rem; font-weight: 800; line-height: 1; }
.bell__panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; width: min(22rem, 90vw); background: var(--c-iron); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.6); overflow: hidden; }
.bell__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid var(--c-line); font-weight: 700; }
.bell__readall { margin: 0; }
.bell__link { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; font-weight: 600; color: var(--c-plate); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.bell__empty { margin: 0; padding: 1.5rem 1rem; text-align: center; color: var(--c-muted); }
.bell__list { list-style: none; margin: 0; padding: 0; max-height: 24rem; overflow-y: auto; }
.bell__item { border-bottom: 1px solid var(--c-line); }
.bell__item:last-child { border-bottom: 0; }
.bell__item > a, .bell__item { color: inherit; }
.bell__item > a { display: block; text-decoration: none; }
.bell__item a:hover { background: var(--c-black); }
.bell__item { padding: 0; }
.bell__item > a, .bell__item > :not(a) { display: block; padding: .8rem 1rem; }
.bell__item.is-unread { background: rgba(255,200,26,.06); border-left: 3px solid var(--c-plate); }
.bell__title { display: block; font-weight: 600; }
.bell__body { display: block; font-size: .88rem; color: var(--c-muted); margin-top: .15rem; }
.bell__time { display: block; font-size: .75rem; color: var(--c-muted); margin-top: .35rem; }

/* ---------- Registro: casilla de consentimiento ---------- */
.signup-consent { margin: .5rem 0 1.75rem; display: block; }
.signup-form .su-check { display: flex; gap: .75rem; align-items: flex-start; cursor: pointer; font-weight: 400; line-height: 1.5; margin: 0; }
.signup-form .su-check input[type="checkbox"] {
  appearance: auto; -webkit-appearance: checkbox;
  width: 1.4rem; height: 1.4rem; min-height: 0; max-width: 1.4rem;
  padding: 0; margin: .1rem 0 0; flex: 0 0 auto;
  background: var(--c-iron); border: 1px solid var(--c-line); border-radius: 0;
  accent-color: var(--c-plate); cursor: pointer;
}
.signup-form .su-check span { flex: 1; }
.su-check a { color: var(--c-plate); text-decoration: underline; text-underline-offset: 3px; }