/* ============================================================
   Jrtrainer — hoja de estilos
   Identidad negro y dorado, mobile-first, con aspecto de app nativa.
   Paleta basada en el sistema de diseño de referencia (dataviz skill),
   con el dorado como acento de marca en lugar del azul por defecto.
   ============================================================ */

:root {
  color-scheme: dark;
  --page-plane:     #0a0a0a;
  --surface-1:      #161513;
  --surface-2:      #1f1d19;
  --surface-3:      #292521;
  --text-primary:   #ffffff;
  --text-secondary: #c9c4b6;
  --text-muted:     #8f8878;
  --border-hairline: rgba(212,175,55,0.16);
  --gridline:       #2c2822;
  --baseline:       #3a352c;

  --accent-blue:    #3987e5;
  --accent-blue-ink:#cde2fb;
  --accent-orange:  #d95926;
  --accent-aqua:    #199e70;
  --accent-yellow:  #c98500;
  --accent-magenta: #d55181;
  --accent-violet:  #9085e9;
  --accent-gold:        #d4af37;
  --accent-gold-bright: #f0cf6b;
  --accent-gold-deep:   #a9781a;
  --on-gold:            #1c1608;

  --status-good:    #0ca30c;
  --status-warning: #fab219;
  --status-serious: #ec835a;
  --status-critical:#e66767;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-plane);
  color: var(--text-primary);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { min-height: 100vh; }

a { color: var(--accent-gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; }

/* ------------------------------ APP SHELL ------------------------------ */

.app-shell {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--page-plane);
  display: flex;
  flex-direction: column;
  position: relative;
}

@media (min-width: 540px) {
  .app-shell {
    min-height: calc(100vh - 32px);
    margin: 16px auto;
    border-radius: 28px;
    border: 1px solid var(--border-hairline);
    box-shadow: 0 20px 60px rgba(0,0,0,0.55);
    overflow: hidden;
  }
}

.view-root {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(88px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}

/* -------------------------------- HEADER -------------------------------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + var(--safe-top)) 18px 14px;
  background: rgba(13,13,13,0.9);
  backdrop-filter: blur(10px);
  border-bottom: none;
}
.app-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #000000 0%, var(--accent-gold) 50%, #000000 100%);
}

.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  border: 1px solid rgba(0,0,0,0.35);
  color: var(--on-gold); font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.02em;
}
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: 0.02em; }

.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--border-hairline);
  color: var(--text-primary); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:active { background: var(--surface-3); }

.pill-btn {
  padding: 8px 16px; border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  color: var(--on-gold); border: none;
  font-weight: 700; font-size: 13.5px; cursor: pointer;
}

/* -------------------------------- SECTIONS ------------------------------- */

.section { padding: 20px 18px 8px; }
.page-title { font-size: 22px; margin: 4px 0 4px; }
h2 { font-size: 17px; margin: 24px 0 10px; }
h3 { font-size: 15px; margin: 0 0 4px; }
h4 { font-size: 13px; margin: 16px 0 8px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
p { line-height: 1.5; color: var(--text-secondary); margin: 0 0 10px; }
.muted { color: var(--text-muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }

/* --------------------------------- HERO --------------------------------- */

.hero { padding: 28px 18px 8px; }
.hero-badge {
  display: inline-block; padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--border-hairline);
  color: var(--accent-gold-bright); font-size: 12px; font-weight: 600;
  margin-bottom: 14px;
}
.hero h1 { font-size: 30px; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
.hero-sub { font-size: 15px; margin-bottom: 20px; }
.hero-actions { display: flex; flex-direction: column; gap: 10px; }

/* -------------------------------- BUTTONS -------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 18px; border-radius: var(--radius-md);
  font-size: 15px; font-weight: 600; cursor: pointer; border: none;
  transition: transform 0.05s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep)); color: var(--on-gold); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border-hairline); }
.cta-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.quick-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }

/* -------------------------------- FEATURES ------------------------------- */

.feature-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.feature-card {
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 16px;
}
.feature-icon {
  width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
  color: var(--accent-gold-bright); font-size: 16px;
}
.feature-card p { margin: 0; font-size: 13.5px; }

/* ------------------------------ TESTIMONIALS ------------------------------ */

.testimonial-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.testimonial-card {
  flex: 0 0 82%; scroll-snap-align: start;
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 16px;
}
.testimonial-card p { font-style: italic; margin-bottom: 10px; color: var(--text-primary); }
.testimonial-author { font-size: 13px; font-weight: 600; }

.cta-section { text-align: center; padding-bottom: 32px; }
.cta-section .btn { margin-bottom: 10px; }

/* --------------------------------- MÉTODO --------------------------------- */

.method-flow { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.method-step {
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 16px; text-align: center;
}
.method-step h3 { margin: 6px 0 4px; }
.method-step-num {
  width: 30px; height: 30px; border-radius: 50%; margin: 0 auto;
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  color: var(--on-gold); font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.method-arrow {
  text-align: center; color: var(--accent-gold-bright); font-size: 18px;
  padding: 2px 0; opacity: 0.7;
}

/* -------------------------------- SOBRE MÍ -------------------------------- */

.about-card {
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 18px; margin-top: 14px;
}
.about-card p:first-child { margin-top: 0; }
.instagram-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  color: var(--accent-gold-bright); text-decoration: none; font-weight: 700; font-size: 14px;
}
.instagram-link:hover { text-decoration: underline; }

/* ------------------------------- CONTENT LIST ------------------------------ */

.content-list { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.content-card {
  display: flex; gap: 12px; background: var(--surface-1);
  border: 1px solid var(--border-hairline); border-radius: var(--radius-md);
  padding: 14px; cursor: pointer;
}
.content-thumb {
  flex: 0 0 52px; height: 52px; border-radius: 10px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  color: var(--accent-gold-bright);
}
.content-type { font-size: 11.5px; color: var(--accent-gold-bright); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.content-body p { margin: 4px 0 0; font-size: 13px; }

.upsell-box {
  background: var(--surface-2); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 16px; margin-top: 18px;
}
.upsell-box p { color: var(--text-secondary); font-size: 13.5px; }
.upsell-box .btn { margin-top: 8px; }

/* --------------------------------- QUIZ ---------------------------------- */

.progress-bar-track { height: 6px; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; margin: 14px 0 18px; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-gold-deep), var(--accent-gold-bright)); border-radius: var(--radius-pill); transition: width 0.2s ease; }

.quiz-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.quiz-question { font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.option-btn {
  text-align: left; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  color: var(--text-primary); font-size: 14px; cursor: pointer;
}
.option-btn.selected { border-color: var(--accent-gold); background: rgba(212,175,55,0.14); color: #fff; }

.result-card {
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg); padding: 22px; margin: 10px 0 4px;
}
.result-tag {
  display: inline-block; padding: 5px 12px; border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  color: var(--on-gold); font-weight: 800;
  font-size: 12.5px; margin-bottom: 10px; letter-spacing: 0.03em;
}
.result-card p { color: var(--text-primary); margin: 0; }

/* --------------------------------- FORMS --------------------------------- */

.form { display: flex; flex-direction: column; gap: 14px; margin: 14px 0; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.form input, .form select, .form textarea {
  font-family: inherit; font-size: 15px; padding: 11px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-hairline);
  background: var(--surface-1); color: var(--text-primary);
}
.form input::placeholder, .form textarea::placeholder { color: var(--text-muted); }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--accent-gold);
}
.form textarea { resize: vertical; font-family: inherit; }
.form-group { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-secondary); font-weight: 600; }

.rubric-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0; }
.rubric-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 4px; border-radius: var(--radius-sm); background: var(--surface-1);
  border: 1px solid var(--border-hairline); cursor: pointer; font-family: inherit;
}
.rubric-btn.selected { border-color: var(--accent-gold); background: rgba(212,175,55,0.1); }
.rubric-value {
  width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2);
  color: var(--accent-gold-bright); font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.rubric-btn.selected .rubric-value {
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  color: var(--on-gold);
}
.rubric-label { font-size: 10.5px; line-height: 1.25; color: var(--text-secondary); text-align: center; }
.rubric-btn.selected .rubric-label { color: var(--text-primary); }
.rubric-hint { margin: 4px 0 0; min-height: 15px; }

.pill-toggle { display: flex; gap: 8px; margin: 8px 0; }
.pill-btn {
  flex: 1; padding: 12px 10px; border-radius: var(--radius-pill); background: var(--surface-1);
  border: 1px solid var(--border-hairline); color: var(--text-secondary); font-family: inherit;
  font-size: 14px; font-weight: 700; cursor: pointer; text-align: center;
}
.pill-btn.selected {
  border-color: var(--accent-gold); color: var(--on-gold);
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
}

.search-input {
  width: 100%; font-size: 15px; padding: 11px 14px; margin: 12px 0 12px;
  border-radius: var(--radius-pill); border: 1px solid var(--border-hairline);
  background: var(--surface-1); color: var(--text-primary);
}
.search-input:focus { outline: none; border-color: var(--accent-gold); }

.error-box {
  background: rgba(230,103,103,0.14); border: 1px solid rgba(230,103,103,0.4);
  color: #ffb3b3; padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; margin: 10px 0;
}

.demo-code-box {
  background: rgba(212,175,55,0.12); border: 1px dashed var(--accent-gold-deep);
  color: var(--accent-gold-bright); border-radius: var(--radius-sm);
  padding: 14px; margin: 10px 0 16px; text-align: center;
  font-size: 28px; font-weight: 800; letter-spacing: 0.2em; font-variant-numeric: tabular-nums;
}

.legal-draft-notice {
  background: rgba(212,175,55,0.08); border: 1px dashed var(--accent-gold-deep);
  border-radius: var(--radius-md); padding: 12px 14px; margin: 12px 0 18px;
}
.legal-draft-notice p { margin: 0; font-size: 13px; color: var(--text-secondary); }
.legal-draft-notice strong { color: var(--accent-gold-bright); }
.legal-text p {
  font-size: 13.5px; line-height: 1.6; color: var(--text-secondary);
  margin: 0 0 14px; white-space: pre-line;
}

/* --------------------------------- CARDS ---------------------------------- */

.card {
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px;
}

/* -------------------------------- STAT ROW -------------------------------- */

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 6px; }
.stat-tile {
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 14px 8px; text-align: center;
}
.stat-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* -------------------------------- ROUTINES -------------------------------- */

.tab-row { display: flex; gap: 8px; margin: 14px 0 16px; }
.tab-btn {
  flex: 1; padding: 10px 8px; border-radius: var(--radius-sm);
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  color: var(--text-secondary); font-size: 13px; font-weight: 600; cursor: pointer;
}
.tab-btn.active { background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep)); border-color: var(--accent-gold-deep); color: var(--on-gold); }

.routine-list { display: flex; flex-direction: column; gap: 12px; }
.routine-card {
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); overflow: hidden; cursor: pointer;
}
.routine-card-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px; gap: 10px; }
.routine-level-tag { color: var(--accent-gold-bright); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.chevron { color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.routine-detail { padding: 0 16px 16px; }
.routine-table { width: 100%; border-collapse: collapse; margin-bottom: 4px; }
.routine-table tr { border-top: 1px solid var(--border-hairline); cursor: pointer; }
.routine-table td { padding: 10px 4px; font-size: 13.5px; }
.routine-table td:last-child { text-align: right; }
.cue-list { margin: 0 0 14px; padding-left: 18px; color: var(--text-secondary); font-size: 13.5px; line-height: 1.6; }

.day-focus { margin: 0 0 12px; }
.set-card-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.set-card {
  background: var(--surface-2); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm); padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 10px;
}
.set-card.is-done { border-color: var(--accent-gold-deep); background: rgba(212,175,55,0.06); }
.set-card-check {
  flex: 0 0 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-hairline);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  color: var(--on-gold); font-weight: 800; background: var(--surface-1); cursor: pointer; margin-top: 2px; padding: 0;
}
.set-card.is-done .set-card-check {
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  border-color: var(--accent-gold-deep);
}
.set-card-body { flex: 1; min-width: 0; cursor: pointer; }
.set-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.set-card-head h4 { margin: 0; font-size: 14px; }
.set-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.set-stat { text-align: center; background: var(--surface-1); border-radius: 8px; padding: 6px 2px; }
.set-stat-value { display: block; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.set-stat-label { display: block; font-size: 9.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 1px; }

/* -------------------------------- EXERCISES -------------------------------- */

.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.chip-btn {
  flex: 0 0 auto; padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  color: var(--text-secondary); font-size: 13px; cursor: pointer; white-space: nowrap;
}
.chip-btn.active { background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep)); border-color: var(--accent-gold-deep); color: var(--on-gold); }

.exercise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.exercise-card {
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 14px; cursor: pointer;
}
.exercise-card-top { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.difficulty { color: var(--accent-yellow); font-size: 11px; letter-spacing: 1px; }

.chip-row { display: flex; gap: 8px; margin: 10px 0 12px; }
.chip {
  padding: 5px 11px; border-radius: var(--radius-pill); background: var(--surface-2);
  border: 1px solid var(--border-hairline); font-size: 12px; color: var(--text-secondary);
}

/* -------------------------------- PROGRESS/CHART -------------------------------- */

.chart-card { padding: 14px 10px 6px; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-grid { stroke: var(--gridline); stroke-width: 1; }
.chart-baseline { stroke: var(--baseline); stroke-width: 1; }
.chart-bar { fill: var(--accent-gold-bright); }
.chart-bar-label { fill: var(--text-secondary); font-size: 9px; font-variant-numeric: tabular-nums; }
.chart-axis-label { fill: var(--text-muted); font-size: 8px; }

.history-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 10px; }
.history-date { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.history-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px;
}
.history-item:last-child { margin-bottom: 0; }
.history-item-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* --------------------------------- PROFILE --------------------------------- */

.profile-card { text-align: center; padding: 12px 0 20px; }
.avatar {
  width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  border: 1px solid rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: var(--on-gold);
}
.profile-card h2 { margin: 0 0 2px; }
.profile-card p { margin: 0; }

/* ---------------------------- PERFIL (PREMIUM) ---------------------------- */

.profile-header-card {
  text-align: center; padding: 22px 16px 18px; margin: 4px 0 16px;
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
}
.profile-header-card.is-pro {
  border-color: var(--accent-gold-deep);
  background: linear-gradient(180deg, rgba(212,175,55,0.08), var(--surface-1) 55%);
}
.profile-avatar-wrap { position: relative; width: 68px; margin: 0 auto 12px; }
.profile-avatar-wrap .avatar { margin: 0; }
.profile-crown-badge {
  position: absolute; top: -4px; right: -4px; width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  color: var(--on-gold); font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface-1);
}
.profile-header-card h2 { margin: 0 0 8px; }
.profile-status-tag {
  display: inline-block; padding: 3px 11px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--text-secondary);
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em; margin-bottom: 12px;
}
.profile-status-tag.is-pro {
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  color: var(--on-gold);
}
.profile-discipline-chip {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 700; margin-bottom: 6px;
}
.profile-discipline-chip svg { display: block; }
.profile-header-card .muted { text-align: center; }
.profile-stat-row { margin-top: 0; }

/* ----------------------------- SKILL SHIELDS ------------------------------ */

.shield-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 6px;
  margin: 14px 0 22px; justify-items: center;
}
.shield-item { text-align: center; width: 100%; }
.shield-svg { display: block; margin: 0 auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4)); }
.shield-svg.is-locked { filter: none; }
.shield-item-name { font-size: 12px; font-weight: 700; margin-top: 4px; }
.shield-item-count { margin-top: 1px; }

.insight-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.insight-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 10px 14px;
}
.insight-item .shield-svg { flex: 0 0 auto; }
.insight-item > div:last-child { flex: 1; min-width: 0; }
.insight-item p { margin: 2px 0 0; }
.insight-strength { border-color: rgba(25,158,112,0.35); }
.insight-weakness { border-color: rgba(217,89,38,0.3); }

/* --------------------------------- MODAL ---------------------------------- */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: flex-end; justify-content: center; z-index: 50;
}
.modal-sheet {
  width: 100%; max-width: 480px; max-height: 86vh; overflow-y: auto;
  background: var(--surface-1); border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(24px + var(--safe-bottom));
  border: 1px solid var(--border-hairline); border-bottom: none;
  animation: sheet-up 0.18s ease-out;
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
.modal-handle { width: 36px; height: 4px; border-radius: var(--radius-pill); background: var(--border-hairline); margin: 8px auto 14px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.modal-header h3 { margin: 0; font-size: 18px; }

.video-placeholder {
  height: 160px; border-radius: var(--radius-md); background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; margin: 14px 0;
}
.play-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  color: var(--on-gold); display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.doc-placeholder {
  height: 100px; border-radius: var(--radius-md); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-size: 34px; margin: 14px 0;
}
.video-embed {
  position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 14px 0;
  border-radius: var(--radius-md); overflow: hidden; background: #000;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --------------------------------- TOAST ---------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom));
  transform: translate(-50%, 12px);
  background: #ffffff; color: #0b0b0b; padding: 11px 18px; border-radius: var(--radius-pill);
  font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease; z-index: 60; max-width: 88%;
  text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* -------------------------------- BOTTOM NAV -------------------------------- */

.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: 480px;
  display: flex; background: rgba(17,17,16,0.94); backdrop-filter: blur(12px);
  border-top: none;
  padding: 8px 6px calc(8px + var(--safe-bottom));
  z-index: 30;
}
.bottom-nav::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, #000000 0%, var(--accent-gold) 50%, #000000 100%);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: var(--text-muted); padding: 6px 2px;
  cursor: pointer; border-radius: 10px;
}
.nav-item.active { color: var(--accent-gold-bright); }
.nav-icon { font-size: 18px; }
.nav-label { font-size: 10.5px; font-weight: 600; }
.nav-item.is-pro-nav { color: var(--accent-gold-deep); }
.nav-item.is-pro-nav.active { color: var(--accent-gold-bright); }

/* -------------------------------- VISTA DE ORDENADOR -------------------------------- */
/* Mismo HTML y misma navegación que en móvil — a partir de aquí se reorganiza
   en un layout de escritorio: menú lateral en vez de barra inferior, cabecera
   junto al menú, y contenido más ancho. Por debajo de este ancho la app se ve
   y se comporta exactamente igual que antes (vista de app / móvil). */

@media (min-width: 900px) {
  body { padding: 0; }

  .app-shell {
    max-width: 1180px;
    min-height: 100vh;
    margin: 0 auto;
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--border-hairline);
    border-right: 1px solid var(--border-hairline);
    box-shadow: none;
    overflow: visible;
    display: grid;
    grid-template-columns: 236px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "nav header"
      "nav main";
  }

  .app-header {
    grid-area: header;
    padding: 18px 32px;
  }
  .app-header::after { display: none; }

  .view-root {
    grid-area: main;
    max-width: 900px;
    padding: 4px 32px 56px;
  }
  .view-root .section,
  .view-root .hero { padding-left: 0; padding-right: 0; }

  .bottom-nav {
    grid-area: nav;
    position: sticky;
    top: 0; left: auto; bottom: auto; transform: none;
    width: auto; max-width: none; height: 100vh;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 4px; padding: 24px 14px;
    background: var(--surface-1);
    border-right: 1px solid var(--border-hairline);
    backdrop-filter: none;
  }
  .bottom-nav::before { display: none; }
  .nav-item {
    flex: none;
    flex-direction: row; justify-content: flex-start; gap: 12px;
    padding: 11px 14px; border-radius: 12px;
  }
  .nav-item.active { background: var(--surface-2); }
  .nav-icon { font-size: 17px; width: 20px; text-align: center; }
  .nav-label { font-size: 13.5px; }

  .modal-backdrop { align-items: center; }
  .modal-sheet { border-radius: 20px; max-height: 82vh; }

  .feature-grid,
  .module-grid,
  .exercise-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }

  .content-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }

  .testimonial-scroll {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .testimonial-card { flex: 1 1 260px; scroll-snap-align: none; }
}

/* ----------------------------- MÓDULOS DE INICIO ---------------------------- */

.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 4px; }
.module-card {
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 16px 14px; cursor: pointer;
}
.module-icon {
  width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
  color: var(--accent-gold-bright); font-size: 16px;
}
.module-card h3 { margin: 0 0 4px; font-size: 14.5px; }
.module-card p { margin: 0; font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

/* --------------------------------- SKILLS --------------------------------- */

.skill-icon-badge {
  width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
  color: var(--accent-gold-bright);
}
.exercise-card.is-goal { border-color: var(--accent-gold); background: rgba(212,175,55,0.06); }
.chip-goal {
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep)) !important;
  color: var(--on-gold) !important; border-color: var(--accent-gold-deep) !important; font-weight: 700;
}
.exercise-card.is-completed:not(.is-goal) { border-color: #4fae72; background: rgba(79,174,114,0.07); }
.chip-done {
  background: rgba(79,174,114,0.18) !important; color: #6fd193 !important;
  border-color: rgba(79,174,114,0.4) !important; font-weight: 700;
}

/* ------------------------------ PROGRESIONES ------------------------------- */

.routine-card.is-goal { border-color: var(--accent-gold); }
.routine-card.is-completed:not(.is-goal) { border-color: #4fae72; }
.routine-card.is-completed:not(.is-goal) .routine-level-tag { color: #6fd193; }
.step-list { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 16px; }
.step-item { display: flex; gap: 12px; }
.step-num {
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  color: var(--on-gold); font-weight: 800; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.step-item h4 { margin: 0 0 2px; font-size: 13.5px; }
.step-item p { margin: 0; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.step-item.is-done-step { opacity: 0.55; }
.step-item.is-done-step .step-num { background: var(--surface-2); color: var(--accent-gold-bright); }
.step-item.is-current-step h4 { color: var(--accent-gold-bright); }

.goal-progress-bar { height: 6px; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; margin: 2px 0 16px; }
.goal-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-gold-deep), var(--accent-gold-bright)); border-radius: var(--radius-pill); transition: width 0.2s ease; }

/* ------------------------- OBJETIVO A CORTO PLAZO (INICIO) ------------------------- */

.goal-card {
  background: var(--surface-1); border: 1px solid var(--accent-gold-deep);
  border-radius: var(--radius-md); padding: 16px; margin: 18px 0 4px; cursor: pointer;
}
.goal-card-empty { border-color: var(--border-hairline); }
.goal-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.goal-card-tag { font-size: 11.5px; font-weight: 700; color: var(--accent-gold-bright); text-transform: uppercase; letter-spacing: 0.03em; }
.goal-card h3 { margin: 0 0 4px; font-size: 15px; }
.goal-card p { margin: 0 0 8px; }
.goal-card .goal-progress-bar { margin-bottom: 0; }

/* --------------------------- DESCUBRE TU NIVEL --------------------------- */

.level-result-grid { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.level-result-card {
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 16px;
}
.level-result-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.level-result-card h3 { margin: 2px 0 10px; font-size: 16px; }

/* ------------------------------ CALENTAMIENTO ------------------------------ */

.warmup-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 20px; }
.warmup-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 12px 14px; cursor: pointer;
}
.warmup-item.done { border-color: var(--accent-gold-deep); background: rgba(212,175,55,0.08); }
.warmup-check {
  flex: 0 0 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-hairline);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  color: var(--on-gold); font-weight: 800;
}
.warmup-item.done .warmup-check {
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  border-color: var(--accent-gold-deep);
}
.warmup-item-body { flex: 1; min-width: 0; }
.warmup-item-body h4 { margin: 0 0 2px; font-size: 14px; }
.warmup-item-body p { margin: 0; font-size: 12px; color: var(--text-secondary); }
.warmup-scheme { font-size: 11.5px; color: var(--accent-gold-bright); font-weight: 700; white-space: nowrap; text-align: right; }

/* ------------------------- COLORES POR DISCIPLINA ------------------------- */
/* Cada disciplina tiene su propio color e icono (definidos en app.js) para
   diferenciarse de un vistazo, manteniendo el negro/dorado como base. */

.feature-card {
  border-top: 3px solid var(--d-color, var(--border-hairline));
}
.feature-icon svg { display: block; }

.result-card { border-top: 3px solid var(--d-color, var(--border-hairline)); }
.result-icon {
  width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}

.discipline-line { display: flex; align-items: center; gap: 6px; }
.discipline-line-icon { display: inline-flex; }
.discipline-line-icon svg { display: block; }

.discipline-tab-btn { display: flex; align-items: center; justify-content: center; gap: 5px; }
.discipline-tab-icon { display: inline-flex; }
.discipline-tab-icon svg { display: block; }

.routine-icon-badge {
  width: 44px; height: 44px; border-radius: 12px; flex: 0 0 44px;
  display: flex; align-items: center; justify-content: center;
}
.routine-icon-badge svg { display: block; }
.routine-card-title { flex: 1; min-width: 0; }
.routine-card.expanded { border-color: var(--d-color, var(--accent-gold-deep)); }

.discipline-preview-chip {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px;
  border: 1px solid var(--d-color, var(--border-hairline)); border-radius: var(--radius-sm);
  background: var(--surface-1); margin-top: -4px;
}
.discipline-preview-chip svg { display: block; flex-shrink: 0; margin-top: 2px; }
.discipline-preview-chip p { margin: 0; }

/* ---------------------- AMBIENTE SEGÚN DÓNDE ENTRENAS ---------------------- */
/* El fondo del portal cambia según el lugar de entrenamiento del alumno:
   parque, casa/estudio pequeño o gimnasio — un patrón sutil y oscuro que no
   compromete la legibilidad (las tarjetas siguen con su fondo sólido). */

body.place-parque .app-shell {
  background-color: var(--page-plane);
  background-image:
    linear-gradient(180deg, rgba(8,14,10,0.72), rgba(6,10,8,0.86)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='none' stroke='%233a5c42' stroke-width='2' stroke-linecap='round' opacity='0.5'%3E%3Cpath d='M30 122 L30 96 M22 101 Q30 91 38 101 M20 109 Q30 97 40 109 M18 117 Q30 103 42 117'/%3E%3Cpath d='M8 129 L8 119 M14 131 L14 117 M116 127 L116 113 M124 129 L124 119'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-size: cover, 140px 140px;
  background-position: center, center;
}
body.place-casa .app-shell {
  background-color: var(--page-plane);
  background-image:
    linear-gradient(180deg, rgba(14,11,7,0.72), rgba(10,8,6,0.86)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='none' stroke='%234a3b28' stroke-width='2' stroke-linecap='round' opacity='0.5'%3E%3Crect x='14' y='108' width='46' height='16' rx='4'/%3E%3Cpath d='M90 20 L90 60 M70 40 L110 40'/%3E%3Crect x='68' y='18' width='44' height='44' rx='2'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-size: cover, 140px 140px;
  background-position: center, center;
}
body.place-gimnasio .app-shell {
  background-color: var(--page-plane);
  background-image:
    linear-gradient(180deg, rgba(9,11,13,0.72), rgba(7,9,11,0.86)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='none' stroke='%233d4a58' stroke-width='2' stroke-linecap='round' opacity='0.5'%3E%3Ccircle cx='36' cy='100' r='16'/%3E%3Ccircle cx='36' cy='100' r='5'/%3E%3Cpath d='M100 20 L100 90 M84 30 L116 30 M84 30 L84 22 M116 30 L116 22'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-size: cover, 140px 140px;
  background-position: center, center;
}

/* ================================ VERSIÓN PRO ================================ */

.pro-badge {
  display: inline-block; padding: 4px 10px; border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  color: var(--on-gold); font-weight: 800; font-size: 11px; letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.pro-banner {
  background: var(--surface-1); border: 1px solid var(--accent-gold-deep);
  border-radius: var(--radius-md); padding: 16px; margin: 4px 0 18px; cursor: pointer;
}
.pro-banner h3 { margin: 0 0 4px; font-size: 15px; }
.pro-banner p { margin: 0; font-size: 13px; color: var(--text-secondary); }

.pro-status-card {
  background: var(--surface-1); border: 1px solid var(--accent-gold-deep);
  border-radius: var(--radius-md); padding: 16px; margin-bottom: 18px;
}

.pro-feature-list { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.pro-feature-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 14px;
}
.pro-feature-icon {
  width: 44px; height: 44px; border-radius: 12px; flex: 0 0 44px;
  background: var(--surface-2); color: var(--accent-gold-bright);
  display: flex; align-items: center; justify-content: center;
}
.pro-feature-card h3 { margin: 0 0 4px; font-size: 14.5px; }
.pro-feature-card p { margin: 0; }
.pro-feature-card.is-clickable { cursor: pointer; }
.pro-feature-card.is-clickable:active { background: var(--surface-2); }

.pro-pricing-note {
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 16px;
}
.pro-pricing-note p { margin: 0 0 8px; font-size: 13px; color: var(--text-secondary); }
.pro-pricing-note p:last-child { margin-bottom: 0; }
.pro-pricing-note strong { color: var(--text-primary); }

.pro-future-services {
  background: var(--surface-1); border: 1px dashed var(--border-hairline);
  border-radius: var(--radius-md); padding: 14px 16px; margin-top: 18px;
}
.pro-future-services h3 { margin: 0 0 6px; font-size: 14px; color: var(--accent-gold-bright); }
.pro-future-list { margin: 8px 0 0; padding-left: 20px; }
.pro-future-list li { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }

/* ------------------------------ PLAN GUIADO ------------------------------ */

.plan-step-title { display: flex; align-items: center; gap: 8px; margin: 22px 0 4px; font-size: 16px; }
.plan-step-num {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px;
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  color: var(--on-gold); font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.plan-progress-bar { height: 6px; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; margin: 12px 0 4px; }
.plan-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-gold-deep), var(--accent-gold-bright)); border-radius: var(--radius-pill); transition: width 0.2s ease; }

.combo-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.combo-item {
  background: var(--surface-2); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm); padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 10px;
}
.combo-item.is-done { border-color: var(--accent-gold-deep); background: rgba(212,175,55,0.06); }
.combo-item.is-done .set-card-check {
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  border-color: var(--accent-gold-deep);
}
.combo-item-body { flex: 1; min-width: 0; }
.combo-item-body h4 { margin: 0 0 3px; font-size: 14px; }
.combo-item-body p { margin: 0 0 6px; }
.combo-scheme { font-size: 11.5px; color: var(--accent-gold-bright); font-weight: 700; }
.main-exercise-item { border-color: var(--accent-gold-deep); }
.main-exercise-item .chip-goal { margin-bottom: 6px; display: inline-block; }

/* ------------------------- NIVELES DE DIFICULTAD ------------------------- */

.tier-title { margin: 26px 0 2px; }
h1.page-title + .tier-title, h1.page-title + p + .tier-title { margin-top: 18px; }
.tier-intro { margin: 0 0 12px; }
.branch-title {
  margin: 14px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent-gold-bright);
}

/* Contexto de un paso: qué había antes, el paso actual (foco) y qué viene
   después, más la versión más difícil del skill como recordatorio. */
.step-context { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-hairline); }
.step-context-row { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 8px; }
.step-context-item { text-align: center; }
.step-context-item p { margin: 2px 0 0; font-size: 11.5px; line-height: 1.3; color: var(--text-secondary); }
.step-context-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); }
.step-context-current { background: rgba(212,175,55,0.1); border-radius: var(--radius-sm); padding: 4px 4px; }
.step-context-current .step-context-label { color: var(--accent-gold-bright); }
.step-context-current p { color: var(--text-primary); font-weight: 700; }
.step-context-final { margin: 10px 0 0; text-align: center; }

/* --------------------------------- CHAT --------------------------------- */

.chat-thread {
  display: flex; flex-direction: column; gap: 10px; margin: 14px 0;
  max-height: 52vh; overflow-y: auto; padding-right: 2px;
}
.chat-bubble-row { display: flex; }
.chat-bubble-row.is-user { justify-content: flex-end; }
.chat-bubble-row.is-bot { justify-content: flex-start; }
.chat-bubble {
  max-width: 80%; padding: 10px 13px; border-radius: 16px; font-size: 14px;
  background: var(--surface-2); border: 1px solid var(--border-hairline);
}
.chat-bubble p { margin: 0; }
.chat-bubble-row.is-user .chat-bubble {
  background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold-deep));
  color: var(--on-gold); border-color: var(--accent-gold-deep);
}
.chat-bot-tag { display: block; font-size: 10.5px; font-weight: 700; color: var(--accent-gold-bright); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 3px; }
.chat-typing p { opacity: 0.6; font-style: italic; }
.chat-input-row { display: flex; gap: 8px; position: sticky; bottom: 0; background: var(--page-plane); padding-top: 6px; }
.chat-input-row input {
  flex: 1; font-family: inherit; font-size: 15px; padding: 11px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-hairline);
  background: var(--surface-1); color: var(--text-primary);
}
.chat-input-row .btn { flex: 0 0 auto; padding: 0 18px; }

/* ------------------------------ GRABAR SERIE ------------------------------ */

.record-modal-sheet { max-height: 92vh; }
.record-preview-wrap { position: relative; margin: 10px 0; }
.record-preview {
  width: 100%; max-height: 46vh; border-radius: var(--radius-md);
  background: #000; object-fit: cover; display: block;
}
.record-timer {
  position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.6);
  color: #fff; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: var(--radius-pill);
}
.record-stop-btn { background: var(--status-critical); color: #fff; }
.is-hidden { display: none !important; }

.clip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.clip-item { position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-1); border: 1px solid var(--border-hairline); }
.clip-item video { width: 100%; aspect-ratio: 9/12; object-fit: cover; display: block; background: #000; }
.clip-meta { padding: 6px 8px 8px; }
.clip-exercise { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--text-primary); }
.clip-date { margin: 1px 0 0; font-size: 11px; color: var(--text-muted); }
.clip-caption { margin: 3px 0 0; font-size: 12px; color: var(--text-secondary); }
.clip-delete {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; font-size: 12px;
  background: rgba(0,0,0,0.55); border-color: transparent;
}

.locked-teaser { cursor: pointer; border-style: dashed; }
.locked-teaser p { margin: 0; }

.checkbox-label {
  flex-direction: row !important; align-items: flex-start; gap: 8px !important;
  font-weight: 400 !important; cursor: pointer;
}
.checkbox-label input[type="checkbox"] { margin-top: 2px; width: 16px; height: 16px; flex: 0 0 16px; accent-color: var(--accent-gold-bright); }
.checkbox-label span { line-height: 1.4; }

/* ---------------------------- OBJETIVO: TARGET/INTENTOS ---------------------------- */

.step-target-chip {
  display: inline-block; margin-top: 6px; padding: 3px 9px; font-size: 11px;
  background: rgba(212,175,55,0.12); border-color: var(--accent-gold-deep); color: var(--accent-gold-bright);
}
.attempt-log-box {
  background: var(--surface-2); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 12px 14px; margin: 14px 0;
}
.attempt-log-box h4 { margin: 0 0 4px; font-size: 13.5px; }
.attempt-log-form { display: flex; gap: 8px; margin: 10px 0; }
.attempt-log-form input {
  flex: 1; min-width: 0; font-family: inherit; font-size: 13.5px; padding: 9px 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-hairline);
  background: var(--surface-1); color: var(--text-primary);
}
.attempt-log-form .btn { flex: 0 0 auto; padding: 0 14px; font-size: 12.5px; white-space: nowrap; }
.attempt-history { display: flex; flex-direction: column; gap: 6px; }
.attempt-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12.5px; color: var(--text-secondary); background: var(--surface-1);
  border-radius: var(--radius-sm); padding: 7px 10px;
}
.attempt-row.is-met { color: var(--accent-gold-bright); }
.attempt-met-tag { font-size: 11px; font-weight: 700; color: var(--accent-gold-bright); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ------------------------------- COMUNIDAD (PRO) ------------------------------- */

.community-feed { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.community-post {
  background: var(--surface-1); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); padding: 14px;
}
.community-post-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.community-post-author { display: flex; align-items: center; gap: 10px; }
.community-post-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px;
  display: flex; align-items: center; justify-content: center;
  color: #0b0b0b; font-weight: 800; font-size: 14px;
}
.community-post-name { margin: 0; font-weight: 700; font-size: 13.5px; }
.community-post-video {
  width: 100%; max-height: 50vh; border-radius: var(--radius-sm);
  background: #000; object-fit: cover; display: block; margin-bottom: 8px;
}
.community-post-caption { margin: 0 0 10px; font-size: 13.5px; }
.community-reactions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.community-reaction-btn {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border-hairline); color: var(--text-secondary);
  border-radius: var(--radius-pill); padding: 6px 12px; cursor: pointer;
}
.community-reaction-btn.is-active {
  background: rgba(212,175,55,0.14); border-color: var(--accent-gold-deep); color: var(--accent-gold-bright);
}
.community-comments { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.community-comment { font-size: 13px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 10px; }
.community-comment-author { font-weight: 700; margin-right: 6px; }
.community-comment-form { display: flex; gap: 8px; }
.community-comment-form input {
  flex: 1; font-family: inherit; font-size: 13.5px; padding: 9px 11px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-hairline);
  background: var(--surface-2); color: var(--text-primary);
}
.community-comment-form .btn { flex: 0 0 auto; padding: 0 14px; font-size: 13px; }

/* --------------------------------- MISC --------------------------------- */

::-webkit-scrollbar { width: 0; height: 0; }
