/* ==========================================================================
   EL CÓDIGO TÁCTICO · FM TENIS
   Hoja de estilos principal
   ========================================================================== */

/* ========== VARIABLES Y TEMAS ========== */
:root {
  --amarillo: #F6FF00;
  --amarillo-hover: #FFFF55;
  --calipso: #18FAF8;
  --calipso-hover: #5FFCFA;
  --verde: #37FF00;
  --fondo: #0B1D2B;
  --superficie: #112040;
  --superficie-2: #0D2B5C;
  --linea: #1A3A6A;
  --texto: #FFFFFF;
  --texto-suave: #C8D8E8;
  --lima: #F6FF00;
  --lima-suave: rgba(246, 255, 0, 0.08);
  --arcilla: #18FAF8;
  --radio: 16px;
  --radio-sm: 12px;
}

html[data-theme="light"] {
  --fondo: #F5F7FA;
  --superficie: #FFFFFF;
  --superficie-2: #E9EFF6;
  --linea: #C9D8E8;
  --texto: #0B1D2B;
  --texto-suave: #35547A;
  --lima: #0D2B5C;
  --lima-suave: rgba(13, 43, 92, 0.08);
  --arcilla: #0891AC;
}

/* ========== RESET Y BASE ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

::selection {
  background: var(--lima);
  color: var(--fondo);
}

body {
  background: var(--fondo);
  color: var(--texto);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ========== HEADER CON LOGOS Y TEMA ========== */
#app-header {
  background: linear-gradient(180deg, var(--superficie-2), var(--fondo));
  border-bottom: 1px solid var(--linea);
  box-shadow: 0 1px 0 rgba(200, 245, 66, 0.25);
  padding: 12px 14px;
  flex-shrink: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
}

#btn-back {
  background: var(--superficie);
  border: 1px solid var(--linea);
  color: var(--lima);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

.logo-fm {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: contain;
  flex-shrink: 0;
}

.header-text {
  flex: 1;
}

.brand-top {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--arcilla);
}

#app-header h1 {
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
}

#app-header h1 em {
  color: var(--lima);
  font-style: italic;
}

#btn-theme {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--linea);
  background: var(--superficie);
  color: var(--lima);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ajustes específicos del tema claro */
html[data-theme="light"] #bottom-nav {
  background: rgba(255, 255, 255, 0.94);
}

html[data-theme="light"] .hero::after,
html[data-theme="light"] .quiz-result-score::after,
html[data-theme="light"] .style-result-header::after {
  border-color: rgba(13, 43, 92, 0.15);
}

html[data-theme="light"] .py-1,
html[data-theme="light"] .py-2 {
  color: #FFF;
}

/* ========== ÁREA PRINCIPAL Y PANTALLAS ========== */
#app-main {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: 96px;
  -webkit-overflow-scrolling: touch;
}

#app-main::-webkit-scrollbar {
  width: 0;
}

.screen {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========== HERO + LOGO ECT + PROGRESO ========== */
.logo-ect {
  width: 120px;
  border-radius: 12px;
  margin-bottom: 12px;
  display: block;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--superficie-2), var(--superficie));
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 18px;
  margin-bottom: 14px;
}

.hero::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -46px;
  width: 150px;
  height: 150px;
  border: 2px dashed rgba(200, 245, 66, 0.22);
  border-radius: 50%;
}

.hero-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--arcilla);
  margin-bottom: 8px;
}

.hero h2 {
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 8px;
}

.hero h2 em {
  color: var(--lima);
  font-style: italic;
}

.hero-sub {
  font-size: 0.78rem;
  color: var(--texto-suave);
  line-height: 1.5;
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.stat-chip {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.68rem;
  color: var(--texto-suave);
}

.stat-chip strong {
  color: var(--lima);
  font-weight: 800;
}

.progress-card {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--arcilla);
}

.progress-pct {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--lima);
}

.progress-bar {
  height: 8px;
  background: var(--linea);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--calipso), var(--amarillo));
  border-radius: 999px;
  transition: width 0.5s ease;
  width: 0%;
}

.progress-detail {
  margin-top: 8px;
  font-size: 0.7rem;
  color: var(--texto-suave);
  line-height: 1.5;
}

/* ========== COMPONENTES GENÉRICOS ========== */
.screen-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.screen-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--lima);
}

.card {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:active {
  transform: scale(0.98);
  border-color: var(--lima);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--texto-suave);
  line-height: 1.45;
}

.card-icon {
  color: var(--lima);
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, margin-top 0.35s ease;
}

.card.open .accordion-content {
  max-height: 6000px;
  margin-top: 14px;
}

.card.open .card-icon {
  transform: rotate(45deg);
}

.card.open {
  border-color: var(--lima);
  background: var(--superficie-2);
}

.tactic-block {
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--arcilla);
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.tactic-block h4 {
  font-size: 0.72rem;
  color: var(--arcilla);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  font-weight: 700;
}

.tactic-block ul {
  list-style: none;
  padding: 0;
}

.tactic-block li {
  font-size: 0.82rem;
  color: var(--texto);
  line-height: 1.5;
  padding: 3px 0 3px 14px;
  position: relative;
}

.tactic-block li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--lima);
}

.list-item {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-left: 3px solid var(--lima);
  border-radius: var(--radio-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.search-input {
  width: 100%;
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio-sm);
  color: var(--texto);
  padding: 13px 14px;
  font-size: 0.95rem;
  margin-bottom: 14px;
  outline: none;
}

.search-input:focus {
  border-color: var(--lima);
}

.glossary-term {
  font-weight: 700;
  color: var(--lima);
  display: block;
  margin-bottom: 2px;
  font-size: 0.9rem;
}

.glossary-def {
  color: var(--texto-suave);
  font-size: 0.82rem;
  line-height: 1.45;
}

.no-results {
  text-align: center;
  color: var(--texto-suave);
  padding: 20px;
  font-size: 0.85rem;
}

.btn-primary {
  display: block;
  width: 100%;
  border: none;
  border-radius: var(--radio-sm);
  background: var(--amarillo);
  color: #0B1D2B;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 15px;
  cursor: pointer;
  margin-top: 10px;
}

.btn-primary:active {
  background: var(--amarillo-hover);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  display: block;
  width: 100%;
  border: 1px solid var(--linea);
  background: var(--superficie);
  color: var(--texto);
  border-radius: var(--radio-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 14px;
  cursor: pointer;
  margin-top: 10px;
}

/* ========== TABS GENÉRICOS ========== */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex-shrink: 0;
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--texto-suave);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tab.active {
  background: var(--lima);
  color: var(--fondo);
  border-color: var(--lima);
}

.tabcontent {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.tabcontent.active {
  display: block;
}

/* ========== QUIZ (DIAGNÓSTICO Y ESTILO) ========== */
.quiz-progress {
  margin-bottom: 20px;
}

.quiz-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--texto-suave);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.quiz-progress-bar {
  height: 6px;
  background: var(--linea);
  border-radius: 999px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--arcilla), var(--lima));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.quiz-question {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 18px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio-sm);
  padding: 14px;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.45;
}

.quiz-option.selected {
  border-color: var(--lima);
  background: var(--lima-suave);
}

.quiz-option-marker {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--linea);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.quiz-option.selected .quiz-option-marker {
  border-color: var(--lima);
  background: var(--lima);
}

.quiz-option.selected .quiz-option-marker::after {
  content: "✓";
  color: var(--fondo);
  font-size: 0.85rem;
  font-weight: 900;
}

.quiz-option-text {
  color: var(--texto-suave);
}

.quiz-option.selected .quiz-option-text {
  color: var(--texto);
}

.quiz-nav {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.quiz-nav .btn-secondary,
.quiz-nav .btn-primary {
  flex: 1;
  margin-top: 0;
}

.quiz-result-score {
  text-align: center;
  padding: 28px 20px;
  background: linear-gradient(135deg, var(--superficie-2), var(--superficie));
  border: 1px solid var(--lima);
  border-radius: var(--radio);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.quiz-result-number {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--lima);
  line-height: 1;
  margin-bottom: 4px;
}

.quiz-result-total {
  font-size: 0.78rem;
  color: var(--texto-suave);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.quiz-result-level {
  display: inline-block;
  background: var(--arcilla);
  color: var(--fondo);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 6px 14px;
  border-radius: 999px;
}

.result-block {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 16px;
  margin-bottom: 12px;
}

.result-block h3 {
  font-size: 0.78rem;
  color: var(--lima);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
  font-weight: 800;
}

.result-block p {
  font-size: 0.85rem;
  color: var(--texto);
  line-height: 1.5;
  margin-bottom: 8px;
}

.focus-tag {
  display: inline-block;
  background: var(--superficie-2);
  border: 1px solid var(--linea);
  color: var(--texto);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 999px;
  margin: 4px 4px 4px 0;
}

.focus-tag strong {
  color: var(--lima);
}

/* ========== RESULTADO DE ESTILO ========== */
.style-result-header {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(135deg, var(--superficie-2), var(--superficie));
  border: 1px solid var(--lima);
  border-radius: var(--radio);
  margin-bottom: 16px;
}

.style-icon {
  font-size: 3.5rem;
  margin-bottom: 10px;
  display: block;
}

.style-name {
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.style-tagline {
  font-size: 0.8rem;
  color: var(--texto-suave);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.style-distribution {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 16px;
  margin-bottom: 16px;
}

.dist-row {
  margin-bottom: 12px;
}

.dist-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.dist-bar {
  height: 8px;
  background: var(--linea);
  border-radius: 999px;
  overflow: hidden;
}

.dist-fill {
  height: 100%;
  border-radius: 999px;
}

.dist-fill.def { background: linear-gradient(90deg, #3B82F6, #60A5FA); }
.dist-fill.ver { background: linear-gradient(90deg, var(--arcilla), #F09050); }
.dist-fill.ofe { background: linear-gradient(90deg, #EF4444, #F87171); }

.dist-marker {
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--lima);
  font-weight: 700;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.col-card {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio-sm);
  padding: 14px;
}

.col-card h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  font-weight: 800;
}

.col-card.pos h4 { color: var(--lima); }
.col-card.neg h4 { color: var(--arcilla); }

.col-card ul {
  list-style: none;
  padding: 0;
}

.col-card li {
  font-size: 0.8rem;
  color: var(--texto-suave);
  line-height: 1.5;
  padding: 3px 0 3px 12px;
  position: relative;
}

.col-card.pos li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--verde);
  font-weight: 700;
}

.col-card.neg li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: var(--arcilla);
  font-weight: 700;
}

.players-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.player-card {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio-sm);
  padding: 12px;
}

.player-card h4 {
  font-size: 0.72rem;
  color: var(--lima);
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 800;
}

.player-card p {
  font-size: 0.8rem;
  color: var(--texto-suave);
  line-height: 1.4;
}

/* ========== CANCHA DE ZONAS (PARTE 8) ========== */
.court-net {
  background: #2a3a33;
  border: 1px solid var(--linea);
  border-radius: 8px 8px 0 0;
  padding: 7px;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: var(--texto-suave);
}

.court {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--linea);
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
}

.zone-band {
  padding: 15px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-bottom: 1px solid rgba(10, 15, 13, 0.5);
}

.zone-band:last-child {
  border-bottom: none;
}

.zone-band.selected {
  outline: 3px solid var(--lima);
  outline-offset: -3px;
  filter: brightness(1.2);
  z-index: 2;
}

.zone-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--fondo);
}

.zone-definicion { background: #C8F542; }
.zone-ataque     { background: #9CCB3E; }
.zone-presion    { background: #E0703A; }
.zone-neutral    { background: #4E7C5C; }
.zone-defensa    { background: #2C4A3E; }

.zone-neutral .zone-label,
.zone-defensa .zone-label {
  color: #FFF;
}

.zone-detail {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-left: 4px solid var(--lima);
  border-radius: var(--radio-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.zone-detail h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--lima);
  margin-bottom: 8px;
}

.zone-detail p {
  font-size: 0.82rem;
  color: var(--texto-suave);
  line-height: 1.5;
}

/* ========== ZONAS OBJETIVO (PARTE 9) ========== */
.target-court {
  background: #1a3a2a;
  border: 2px solid var(--linea);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.target-court-title {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--texto-suave);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.target-zones-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.target-zone {
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
}

.target-zone.selected {
  border-color: var(--lima);
}

.target-zone .tz-letter {
  font-size: 1.1rem;
  font-weight: 900;
  display: block;
  color: var(--fondo);
}

.target-zone .tz-desc {
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.6);
}

.tz-a, .tz-b { background: #C8F542; }
.tz-c        { background: #9CCB3E; }
.tz-d, .tz-e { background: #E0703A; }

/* Tarjetas de zona de finalización (juego en la red) */
.zone-card {
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
}

.zone-card.selected {
  border-color: var(--lima);
}

.zone-card .tz-letter {
  font-size: 1.5rem;
  font-weight: 900;
  display: block;
  color: var(--fondo);
}

.zone-card .tz-desc {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.6);
}

.zone-dark {
  background: #4E7C5C;
}

.zone-dark .tz-letter,
.zone-dark .tz-desc {
  color: #FFF;
}

/* ========== CAJAS DE FLUJO (CICLOS MENTALES/TÁCTICOS) ========== */
.flow {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.flow-box {
  border-radius: var(--radio-sm);
  padding: 12px;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.4;
  border: 1px solid var(--linea);
}

.flow-box .ft {
  font-weight: 800;
  display: block;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
}

.c-lima    { background: rgba(200, 245, 66, 0.12); border-color: var(--lima); }
.c-lima .ft { color: var(--lima); }

.c-azul    { background: rgba(59, 130, 246, 0.12); border-color: #3B82F6; }
.c-azul .ft { color: #60A5FA; }

.c-arcilla    { background: rgba(224, 112, 58, 0.12); border-color: var(--arcilla); }
.c-arcilla .ft { color: var(--arcilla); }

.c-morado    { background: rgba(168, 85, 247, 0.12); border-color: #A855F7; }
.c-morado .ft { color: #C084FC; }

.c-rojo    { background: rgba(239, 68, 68, 0.1); border-color: #EF4444; }
.c-rojo .ft { color: #F87171; }

.flow-fork {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.flow-arrow {
  text-align: center;
  color: var(--texto-suave);
  font-size: 0.9rem;
  line-height: 1;
}

/* ========== SAQUE: ZONAS (PARTE 11) ========== */
.serve-box {
  background: #1a3a2a;
  border: 2px solid var(--linea);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.serve-net {
  text-align: center;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: var(--texto-suave);
  border-bottom: 2px solid rgba(244, 247, 245, 0.2);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.serve-zones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.serve-zone {
  background: rgba(200, 245, 66, 0.15);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
}

.serve-zone.selected {
  background: var(--lima);
}

.serve-zone .sz-letter {
  font-size: 1.2rem;
  font-weight: 900;
  display: block;
  color: var(--lima);
}

.serve-zone.selected .sz-letter {
  color: var(--fondo);
}

.serve-zone .sz-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--texto-suave);
  text-transform: uppercase;
}

.serve-zone.selected .sz-name {
  color: var(--fondo);
}

/* ========== ZONAS ATACAR / EVITAR (PARTE 12) ========== */
.zonas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.zona-atacar {
  background: rgba(200, 245, 66, 0.08);
  border: 1px solid var(--lima);
  border-radius: var(--radio-sm);
  padding: 14px;
}

.zona-evitar {
  background: rgba(224, 112, 58, 0.08);
  border: 1px solid var(--arcilla);
  border-radius: var(--radio-sm);
  padding: 14px;
}

.zona-atacar h4 {
  color: var(--lima);
  font-size: 0.72rem;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 800;
}

.zona-evitar h4 {
  color: var(--arcilla);
  font-size: 0.72rem;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 800;
}

.zona-atacar ul,
.zona-evitar ul {
  list-style: none;
  padding: 0;
}

.zona-atacar li,
.zona-evitar li {
  font-size: 0.8rem;
  color: var(--texto-suave);
  line-height: 1.5;
  padding: 3px 0 3px 12px;
  position: relative;
}

.zona-atacar li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--verde);
  font-weight: 700;
}

.zona-evitar li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: var(--arcilla);
  font-weight: 700;
}

/* ========== CHECKLISTS (PARTES 7 Y 15) ========== */
.checklist-section,
.checklist-torneo {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 16px;
  margin-bottom: 14px;
}

.checklist-header,
.checklist-torneo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.checklist-title,
.checklist-torneo-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--lima);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.checklist-count,
.checklist-torneo-count {
  font-size: 0.72rem;
  color: var(--texto-suave);
  font-weight: 700;
}

.checklist-progress,
.checklist-torneo-progress {
  height: 4px;
  background: var(--linea);
  border-radius: 999px;
  margin-bottom: 12px;
  overflow: hidden;
}

.checklist-progress-fill,
.checklist-torneo-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--arcilla), var(--lima));
  border-radius: 999px;
  transition: width 0.35s ease;
  width: 0%;
}

.checklist-item,
.checklist-item-torneo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(35, 50, 45, 0.5);
  cursor: pointer;
}

.checklist-item:last-child,
.checklist-item-torneo:last-child {
  border-bottom: none;
}

.checklist-checkbox,
.checklist-checkbox-torneo {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--linea);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.checklist-item.checked .checklist-checkbox,
.checklist-item-torneo.checked .checklist-checkbox-torneo {
  background: var(--verde);
  border-color: var(--verde);
}

.checklist-item.checked .checklist-checkbox::after,
.checklist-item-torneo.checked .checklist-checkbox-torneo::after {
  content: "✓";
  color: #0B1D2B;
  font-size: 0.7rem;
  font-weight: 900;
}

.checklist-text,
.checklist-text-torneo {
  font-size: 0.78rem;
  color: var(--texto-suave);
  line-height: 1.4;
}

.checklist-item.checked .checklist-text,
.checklist-item-torneo.checked .checklist-text-torneo {
  color: var(--texto);
  text-decoration: line-through;
}

/* ========== SUPERFICIES / TABLAS / MÉTRICAS ========== */
.surface-section {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 16px;
  margin-bottom: 12px;
}

.surface-section h4 {
  font-size: 0.78rem;
  color: var(--lima);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 800;
}

.surface-section ul {
  list-style: none;
  padding: 0;
}

.surface-section li {
  font-size: 0.82rem;
  color: var(--texto-suave);
  line-height: 1.5;
  padding: 4px 0 4px 14px;
  position: relative;
}

.surface-section li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--lima);
}

.combo-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.78rem;
}

.combo-table th {
  background: var(--superficie-2);
  color: var(--lima);
  padding: 8px 10px;
  text-align: left;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.combo-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--linea);
  color: var(--texto-suave);
  line-height: 1.4;
  vertical-align: top;
}

.combo-table td:first-child {
  color: var(--texto);
  font-weight: 600;
}

.metric-card {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--arcilla);
}

.metric-card h4 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--arcilla);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.metric-card .formula {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  padding: 10px;
  font-size: 0.8rem;
  color: var(--lima);
  font-weight: 700;
  margin-bottom: 10px;
  font-family: monospace;
}

.metric-card p {
  font-size: 0.8rem;
  color: var(--texto-suave);
  line-height: 1.5;
  margin-bottom: 6px;
}

.exercise-card {
  background: color-mix(in srgb, var(--arcilla) 10%, transparent);
  border: 1px solid var(--arcilla);
  border-radius: var(--radio);
  padding: 16px;
  margin-bottom: 12px;
}

.exercise-card h4 {
  font-size: 0.78rem;
  color: var(--arcilla);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 800;
}

.exercise-card p {
  font-size: 0.82rem;
  color: var(--texto);
  line-height: 1.6;
  margin-bottom: 6px;
}

.exercise-card strong {
  color: var(--lima);
}

.pattern-card {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio-sm);
  padding: 14px;
  margin-bottom: 10px;
  border-left: 3px solid var(--lima);
}

.pattern-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.pattern-card .pattern-seq {
  font-size: 0.78rem;
  color: var(--lima);
  font-weight: 700;
  margin-bottom: 6px;
  font-style: italic;
}

.pattern-card p {
  font-size: 0.8rem;
  color: var(--texto-suave);
  line-height: 1.5;
}

.quote-box {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-left: 4px solid var(--arcilla);
  border-radius: var(--radio-sm);
  padding: 16px;
  margin-bottom: 14px;
}

.quote-box p {
  font-size: 0.85rem;
  color: var(--texto);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 8px;
}

.quote-box cite {
  font-size: 0.75rem;
  color: var(--lima);
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
}

/* ========== PIRÁMIDE (PARTE 14) ========== */
.tactical-pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
}

.pyramid-level {
  border-radius: 6px;
  padding: 10px 8px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fondo);
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1.3;
}

.pyramid-level.selected {
  border-color: var(--texto);
  filter: brightness(1.15);
}

.py-5 { width: 44%; background: #C8F542; }
.py-4 { width: 58%; background: #9CCB3E; }
.py-3 { width: 72%; background: #E0703A; }
.py-2 { width: 86%; background: #4E7C5C; color: #FFF; }
.py-1 { width: 100%; background: #2C4A3E; color: #FFF; }

.pyramid-detail {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-left: 4px solid var(--lima);
  border-radius: var(--radio-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.pyramid-detail h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--lima);
  margin-bottom: 8px;
}

.pyramid-detail p {
  font-size: 0.82rem;
  color: var(--texto-suave);
  line-height: 1.5;
}

/* ========== PARTE 15: ESTRUCTURA DE SESIÓN ========== */
.session-structure {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.session-block {
  border-radius: var(--radio-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--linea);
}

.session-pct {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--fondo);
}

.session-info h4 {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.session-info p {
  font-size: 0.75rem;
  color: var(--texto-suave);
}

.pct-calentamiento { background: #C8F542; }
.pct-tecnico       { background: #9CCB3E; }
.pct-simulacion    { background: #E0703A; }
.pct-juego         { background: #4E7C5C; color: #FFF; }

.periodizacion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.semana-card {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio-sm);
  padding: 12px;
}

.semana-card h4 {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--arcilla);
  margin-bottom: 6px;
}

.semana-card p {
  font-size: 0.75rem;
  color: var(--texto-suave);
}

.fase-desarrollo {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-left: 4px solid var(--arcilla);
  border-radius: var(--radio-sm);
  padding: 14px;
  margin-bottom: 10px;
}

.fase-desarrollo h4 {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.fase-desarrollo .fase-nivel {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--arcilla);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.fase-desarrollo p {
  font-size: 0.78rem;
  color: var(--texto-suave);
  line-height: 1.4;
  margin-bottom: 4px;
}

/* ========== PARTE 16: PILARES, DIMENSIONES Y RECURSOS ========== */
.pilar-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.75rem;
}

.pilar-table th {
  background: var(--superficie-2);
  color: var(--lima);
  padding: 8px 10px;
  text-align: left;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.pilar-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--linea);
  color: var(--texto-suave);
  line-height: 1.4;
  vertical-align: top;
}

.pilar-table td:first-child {
  color: var(--texto);
  font-weight: 600;
}

.dimension-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.dimension-card {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-left: 4px solid var(--lima);
  border-radius: var(--radio-sm);
  padding: 14px;
  cursor: pointer;
}

.dimension-card h4 {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.dimension-card p {
  font-size: 0.78rem;
  color: var(--texto-suave);
  line-height: 1.4;
}

.dimension-card .dim-detail {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--linea);
}

.dimension-card.selected .dim-detail {
  display: block;
}

.etapa-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.72rem;
}

.etapa-table th {
  background: var(--superficie-2);
  color: var(--lima);
  padding: 8px 10px;
  text-align: left;
  font-size: 0.65rem;
  text-transform: uppercase;
}

.etapa-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--linea);
  color: var(--texto-suave);
  line-height: 1.4;
  vertical-align: top;
}

.etapa-table td:first-child {
  color: var(--lima);
  font-weight: 700;
}

.recurso-card {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio-sm);
  padding: 14px;
  margin-bottom: 10px;
}

.recurso-card h4 {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.recurso-card .recurso-autor {
  font-size: 0.72rem;
  color: var(--arcilla);
  margin-bottom: 6px;
  font-weight: 600;
}

.recurso-card p {
  font-size: 0.78rem;
  color: var(--texto-suave);
  line-height: 1.4;
}

.principio-item {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-left: 3px solid var(--lima);
  border-radius: var(--radio-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
}

.principio-item h4 {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.principio-item p {
  font-size: 0.75rem;
  color: var(--texto-suave);
  line-height: 1.4;
}

/* ========== NAVEGACIÓN INFERIOR ========== */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(14, 21, 19, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--linea);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 20;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--texto-suave);
  font-size: 1.4rem;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
}

.nav-btn.active {
  color: var(--lima);
  background: var(--lima-suave);
}

.nav-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
  text-align: center;
}