@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ====== VARIABLES ====== */
:root {
  --brand:       #1e3a7c;
  --brand-mid:   #2258d4;
  --brand-light: #3b82f6;

  --esp:  #b45309; --esp-bg:  #fefce8; --esp-border: rgba(180,83,9,.2);
  --mat:  #2563eb; --mat-bg:  #eff6ff; --mat-border: rgba(37,99,235,.2);
  --cnat: #0d9488; --cnat-bg: #f0fdfa; --cnat-border: rgba(13,148,136,.2);
  --csoc: #dc2626; --csoc-bg: #fef2f2; --csoc-border: rgba(220,38,38,.2);
  --bach: #7c3aed; --bach-bg: #faf5ff; --bach-border: rgba(124,58,237,.2);

  --bg:      #f0f4f9;
  --surface: #ffffff;
  --border:  #e2e8f0;
  --text:    #0f172a;
  --muted:   #64748b;
  --faint:   #94a3b8;
  --accent:  #f59e0b;

  --nav-h: 68px;
  --r:     16px;
  --r-sm:  10px;
  --shadow:    0 2px 10px rgba(15,23,42,.06);
  --shadow-md: 0 6px 20px rgba(15,23,42,.10);
}

/* ====== BASE ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body { font-family: 'Outfit', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; }
button, input { font: inherit; }
a { text-decoration: none; color: inherit; }

/* ====== VIEWS ====== */
.view { display: none; flex-direction: column; height: 100vh; overflow: hidden; animation: fadeUp .25s ease; }
.view.active { display: flex; }

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

.view-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 90px;
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain; /* el rebote en los límites no se encadena al body */
}

/* ====== HEADER ====== */
.app-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 20px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
  transition: transform 0.28s ease, margin-bottom 0.28s ease;
  will-change: transform;
}
.app-header.compact { padding: 12px 20px; }

.header-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.publisher-credit {
  display: flex;
  justify-content: center;
  padding: 28px 0 12px;
}

.publisher-logo {
  height: 90px;
  width: auto;
  object-fit: contain;
  opacity: 0.92;
}

.brand-center { text-align: center; }

.brand-logo {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 5px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.brand-sub {
  font-size: 8.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .4px;
  margin-top: 3px;
  text-transform: uppercase;
}

.view-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--brand);
  text-align: center;
}

.notif-btn {
  background: none; border: none; cursor: pointer;
  font-size: 21px; color: var(--text);
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  margin-left: auto;
  transition: background .15s;
}
.notif-btn:active { background: var(--bg); }

.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: #ef4444; border-radius: 50%;
  border: 2px solid var(--surface);
}

/* ====== XP CARD ====== */
.xp-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 18px 20px 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.xp-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.xp-left { display: flex; align-items: center; gap: 12px; }
.xp-avatar { font-size: 30px; line-height: 1; }
.xp-name { font-size: 16px; font-weight: 700; }
.xp-rank { font-size: 12px; color: var(--muted); font-weight: 500; }

.level-chip {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 5px 13px; border-radius: 20px;
}

.xp-bar-track {
  width: 100%; height: 10px;
  background: #e9eef5; border-radius: 10px;
  overflow: hidden; margin-bottom: 8px;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  border-radius: 10px;
  transition: width .9s cubic-bezier(.34,1.3,.64,1);
}

.xp-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.xp-foot span:first-child { color: var(--accent); font-weight: 700; }

/* ====== TRANSICIONES DE TEMA ====== */
.brand-logo,
.view-title,
.level-chip,
.pill.active,
.save-btn,
.featured-card,
.section-title::before,
.motiv-cita::before,
.nav-btn.active {
  transition-property: background, background-color, color, border-color, box-shadow;
  transition-duration: 0.55s;
  transition-timing-function: ease;
}

/* Textos que hacen fade en la rotación */
.motiv-text,
.motiv-autor,
.cc-text,
.cc-category {
  transition: opacity 0.28s ease, transform 0.28s ease;
}

/* ====== PENSADOR CARD ====== */
.pensador-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.pensador-foto-wrap { flex-shrink: 0; }

.pensador-foto {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2.5px solid var(--brand);
  background: #fff;
  display: block;
}

.pensador-cita {
  position: relative;
  padding-left: 14px;
}

.pensador-cita::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -6px;
  font-size: 40px;
  line-height: 1;
  color: var(--brand-light);
  opacity: 0.28;
  font-family: Georgia, serif;
  pointer-events: none;
}

.pensador-text {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  font-style: italic;
  font-weight: 500;
  margin-bottom: 6px;
}

.pensador-autor {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  display: block;
  text-align: right;
}

/* ====== MOTIVACIÓN CARD ====== */
.motivacion-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.motiv-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.motiv-avatar { font-size: 30px; line-height: 1; }

.motiv-saludo {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.motiv-nombre {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.motiv-cita { position: relative; padding-left: 18px; }

.motiv-cita::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -8px;
  font-size: 44px;
  line-height: 1;
  color: var(--brand-light);
  opacity: 0.25;
  font-family: Georgia, serif;
  pointer-events: none;
}

.motiv-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  font-style: italic;
  font-weight: 500;
  margin-bottom: 8px;
}

.motiv-autor {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  display: block;
  text-align: right;
}

/* Saludo compacto (sin cita): el divisor inferior del greeting sobra */
.motivacion-card.motiv-solo { padding: 14px 20px; }
.motivacion-card.motiv-solo .motiv-greeting {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Nota pequeña de la tarjeta «Tu siguiente paso» en la portada
   (la tarjeta es azul degradado: blanco translúcido para buen contraste) */
.paso-nota { font-size: 10px; color: rgba(255,255,255,.78); margin-top: 8px; text-align: right; }

/* ── Tarjeta puente para madres y padres ── */
.padres-card {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1.5px solid rgba(39,174,96,.35);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 24px;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform .15s;
}
.padres-card:active { transform: scale(.97); }
.padres-emoji { font-size: 28px; line-height: 1; }
.padres-info { display: flex; flex-direction: column; min-width: 0; }
.padres-info strong { font-size: 14px; font-weight: 800; color: #166534; }
.padres-info em { font-style: normal; font-size: 12px; color: #14532d; }
.padres-card .fa-chevron-right { margin-left: auto; color: #166534; }

/* ── Vista Padre (Fase 2) ── */
.padre-titulo { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 14px; }
.padre-sec {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.padre-sec-title { font-size: 13px; font-weight: 800; color: var(--brand); margin-bottom: 8px; }
.padre-big { font-size: 15px; line-height: 1.6; color: var(--text); }
.padre-nota { padding: 10px 0; border-bottom: 1px solid var(--border); }
.padre-nota:last-of-type { border-bottom: none; }
.padre-nota-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.padre-nota-top strong { font-size: 13px; color: var(--text); min-width: 0; }
.padre-nota-val { font-size: 15px; font-weight: 800; flex-shrink: 0; }
.padre-nota-val.ok   { color: #16a34a; }
.padre-nota-val.baja { color: #dc2626; }
.padre-nota-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.padre-msg {
  margin-top: 12px;
  background: #eff6ff;
  border-left: 3px solid var(--brand-light);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 13px; line-height: 1.55; color: var(--text);
}
.padre-consejo { background: linear-gradient(135deg, #fefce8, #fef9c3); border-color: rgba(180,83,9,.25); }
.padre-consejo .padre-sec-title { color: #b45309; }
.padre-hint { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.padre-tel-row { display: flex; gap: 8px; }
.padre-tel-row .pa-inp-field { flex: 1; margin: 0; }
.padre-wa-btn {
  background: #25d366; color: #fff; border: none;
  border-radius: var(--r-sm); padding: 12px 16px;
  font-size: 14px; font-weight: 800; cursor: pointer;
  width: 100%;
  transition: transform .15s;
}
.padre-tel-row .padre-wa-btn { width: auto; }
.padre-wa-btn:active { transform: scale(.97); }
a.padre-asistente-btn {
  display: block; text-align: center; text-decoration: none;
  margin-top: 10px; background: #14833b;
}
.padre-asistente-hint { margin: 6px 0 0; text-align: center; }
.padre-wa-cambiar {
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--muted);
  margin-top: 8px; width: 100%; text-align: center;
}
.padre-aviso {
  font-size: 12px; color: var(--muted); line-height: 1.5;
  padding: 0 4px; margin-bottom: 12px;
}
.padre-nube { border-left: 4px solid var(--accent); }

/* ── Acceso del maestro (suscripción y llaves) ── */
.doc-btn-brand { background: var(--brand) !important; }
.doc-admin-link { color: var(--muted); text-decoration: underline; }
.doc-cred {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 4px 12px;
}
.doc-cred-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.doc-cred-row:last-child { border-bottom: none; }
.doc-cred-row span { font-size: 12px; color: var(--muted); }
.doc-cred-row strong {
  font-size: 16px; font-weight: 900; letter-spacing: 1.5px;
  color: var(--brand); font-family: 'Courier New', monospace;
}
.padre-codigo-inp { text-transform: uppercase; letter-spacing: 2px; font-weight: 800; }
#padre-nube-out { margin-top: 10px; }

/* ── Pensador del día + frase motivacional, plegados al final ── */
.pensador-details { margin-bottom: 24px; }
.pensador-summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pensador-summary::-webkit-details-marker { display: none; }
.pensador-summary::after { content: '▾'; color: var(--muted); }
.pensador-details[open] .pensador-summary { margin-bottom: 12px; }
.pensador-details[open] .pensador-summary::after { content: '▴'; }
.motiv-cita-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px 18px 16px 32px;
}
.motiv-cita-card::before { left: 12px; top: 6px; }

/* ====== STATS STRIP ====== */
.stats-strip {
  background: var(--surface);
  border-radius: var(--r);
  padding: 14px;
  display: flex; align-items: center; justify-content: space-around;
  margin-bottom: 20px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.stat-cell { text-align: center; }
.stat-n { display: block; font-size: 22px; font-weight: 800; color: var(--brand); }
.stat-l { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.stat-sep { width: 1px; height: 30px; background: var(--border); }

/* ====== SECTION TITLE ====== */
.section-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.section-title::before {
  content: ''; display: inline-block;
  width: 3px; height: 15px;
  background: var(--brand-light); border-radius: 2px;
  flex-shrink: 0;
}

/* ====== SELECTORES DE CONTEXTO (País y Grado) ====== */
/* ── Rejilla «¿Qué quieres hacer hoy?» (navegación principal) ── */
.home-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.home-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.home-nav-btn:active { transform: scale(.96); box-shadow: none; }
.hnb-emoji { font-size: 2.1rem; line-height: 1; }
.hnb-label { font-size: .95rem; font-weight: 700; color: var(--text); }
.home-nav-btn.hnb-docente { background: linear-gradient(135deg, #f8fafc, #eef4ff); border-color: rgba(30,58,124,.25); }
.home-nav-btn.hnb-docente .hnb-label { color: var(--brand); }

.selectors-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.selector-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.selector-group label i {
  margin-right: 4px;
  color: var(--brand-light);
}

.custom-select {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text);
  outline: none;
  appearance: none; 
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.custom-select:focus {
  border-color: var(--brand-light);
}

.custom-select option:disabled {
  color: #94a3b8;
  font-style: italic;
}

/* ====== SUBJECT CHIPS (Arreglo de cuadrícula 2x2) ====== */
.subjects-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.subj-chip {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 10px;
  border-radius: var(--r); 
  border: 1.5px solid transparent;
  cursor: pointer; 
  background: var(--surface);
  transition: transform .15s, box-shadow .15s;
}

.subj-chip:active { transform: scale(.95); }
.subj-chip i    { font-size: 26px; margin-bottom: 4px; }
.subj-chip span { font-size: 13px; font-weight: 700; line-height: 1; text-align: center; }
.subj-chip em   { font-size: 11px; font-style: normal; opacity: .7; font-weight: 500; }

.subj-chip.esp  { background: var(--esp-bg);  color: var(--esp);  border-color: var(--esp-border); }
.subj-chip.mat  { background: var(--mat-bg);  color: var(--mat);  border-color: var(--mat-border); }
.subj-chip.cnat { background: var(--cnat-bg); color: var(--cnat); border-color: var(--cnat-border); }
.subj-chip.csoc { background: var(--csoc-bg); color: var(--csoc); border-color: var(--csoc-border); }

/* ====== FEATURED CARD ====== */
.featured-card {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-mid) 60%, var(--brand-light) 100%);
  border-radius: 20px; padding: 22px;
  color: #fff; position: relative; overflow: hidden;
  box-shadow: 0 10px 28px rgba(30,58,124,.3);
  margin-bottom: 20px; cursor: pointer;
  transition: transform .15s;
}
.featured-card:active { transform: scale(.98); }
.featured-card::before {
  content: ''; position: absolute; top: -44px; right: -44px;
  width: 160px; height: 160px; background: rgba(255,255,255,.07); border-radius: 50%;
}
.featured-card::after {
  content: ''; position: absolute; bottom: -32px; right: 50px;
  width: 90px; height: 90px; background: rgba(255,255,255,.05); border-radius: 50%;
}

.feat-label    { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; opacity: .7; margin-bottom: 8px; }
.feat-subj     { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.18); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; margin-bottom: 10px; }
.feat-title    { font-size: 19px; font-weight: 800; line-height: 1.25; margin-bottom: 5px; }
.feat-grade    { font-size: 12px; opacity: .8; margin-bottom: 16px; }
.feat-actions  { display: flex; justify-content: space-between; align-items: center; }
.feat-xp       { font-size: 14px; font-weight: 700; color: #fde68a; display: flex; align-items: center; gap: 4px; }
.feat-btn {
  background: rgba(255,255,255,.18); border: 1.5px solid rgba(255,255,255,.45);
  color: #fff; padding: 8px 18px; border-radius: 24px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background .15s; backdrop-filter: blur(4px);
}
.feat-btn:hover { background: rgba(255,255,255,.28); }

/* ====== RECENT / SMALL LIST ====== */
.small-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.small-item {
  background: var(--surface); border-radius: var(--r-sm);
  padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); cursor: pointer;
  transition: transform .15s; text-decoration: none; color: inherit;
}
.small-item:active { transform: scale(.98); }
.small-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.small-info { flex: 1; }
.small-title { font-size: 13px; font-weight: 700; }
.small-meta  { font-size: 11px; color: var(--muted); }
.small-arrow { color: var(--faint); font-size: 13px; }

/* ====== SEARCH ====== */
.search-box { position: relative; margin-bottom: 12px; }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.search-box input {
  width: 100%; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 11px 14px 11px 40px; font-size: 14px; color: var(--text);
  outline: none; transition: border-color .15s;
}
.search-box input:focus { border-color: var(--brand-light); }
.search-box input::placeholder { color: var(--faint); }

/* ====== PILLS ====== */
.pills-wrap { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.pills-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.pills-row::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0; background: var(--surface);
  border: 1.5px solid var(--border); color: var(--muted);
  padding: 6px 16px; border-radius: 24px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: all .15s;
}
.pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill:not(.active):hover { border-color: var(--brand-light); color: var(--brand-light); }

/* ====== MISSION CARDS ====== */
.missions-list { display: flex; flex-direction: column; gap: 10px; }

.mission-card {
  background: var(--surface); border-radius: var(--r);
  padding: 14px 16px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.mission-card:active { transform: scale(.98); }
@media (hover: hover) { .mission-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); } }

.mission-card.visited::after {
  content: ''; position: absolute; top: 0; right: 0;
  width: 4px; height: 100%; background: #22c55e; border-radius: 0 var(--r) var(--r) 0;
}

.mc-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.mc-info { flex: 1; min-width: 0; }
.mc-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-meta  { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mc-subj  { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.mc-grade { font-size: 11px; color: var(--muted); }
.mc-xp    { font-size: 11px; color: var(--accent); font-weight: 700; }
.mc-done  { font-size: 11px; color: #22c55e; font-weight: 600; }
.mc-arrow { color: var(--faint); font-size: 14px; flex-shrink: 0; }

.mc-icon.esp  { background: var(--esp-bg);  color: var(--esp); }
.mc-icon.mat  { background: var(--mat-bg);  color: var(--mat); }
.mc-icon.cnat { background: var(--cnat-bg); color: var(--cnat); }
.mc-icon.csoc { background: var(--csoc-bg); color: var(--csoc); }
.mc-icon.bach { background: var(--bach-bg); color: var(--bach); }

.mc-subj.esp  { background: var(--esp-bg);  color: var(--esp); }
.mc-subj.mat  { background: var(--mat-bg);  color: var(--mat); }
.mc-subj.cnat { background: var(--cnat-bg); color: var(--cnat); }
.mc-subj.csoc { background: var(--csoc-bg); color: var(--csoc); }
.mc-subj.bach { background: var(--bach-bg); color: var(--bach); }

/* ====== EMPTY STATE ====== */
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-icon  { font-size: 44px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; margin-bottom: 6px; color: var(--text); }
.empty-state p  { font-size: 13px; line-height: 1.5; }

/* ====== PROGRESS VIEW ====== */
.progress-overview {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  border-radius: 20px; padding: 24px; color: #fff; text-align: center;
  margin-bottom: 20px; box-shadow: 0 10px 28px rgba(30,58,124,.25);
}
.po-emoji     { font-size: 44px; margin-bottom: 8px; }
.po-level     { font-size: 22px; font-weight: 800; }
.po-rank      { font-size: 14px; opacity: .85; margin-bottom: 12px; }
.po-xp        { font-size: 36px; font-weight: 900; }
.po-xp-label  { font-size: 11px; opacity: .65; text-transform: uppercase; letter-spacing: 1px; }
.po-bar-wrap  { margin: 14px 0 6px; background: rgba(255,255,255,.2); border-radius: 10px; height: 10px; overflow: hidden; }
.po-bar-fill  { height: 100%; background: rgba(255,255,255,.8); border-radius: 10px; transition: width .8s ease; }
.po-bar-lbls  { display: flex; justify-content: space-between; font-size: 10px; opacity: .65; }

.sp-item { background: var(--surface); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 8px; border: 1px solid var(--border); }
.sp-top  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sp-name { font-size: 14px; font-weight: 700; }
.sp-cnt  { font-size: 12px; color: var(--muted); }
.sp-track { height: 6px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.sp-fill  { height: 100%; border-radius: 6px; transition: width .7s ease; }

/* ====== PROFILE VIEW ====== */
.profile-hero {
  background: var(--surface); border-radius: 20px; padding: 28px 20px;
  text-align: center; margin-bottom: 16px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.profile-emoji     { font-size: 52px; margin-bottom: 10px; }
.profile-name-disp { font-size: 20px; font-weight: 800; }
.profile-rank      { font-size: 13px; color: var(--muted); margin-top: 4px; }

.setting-group {
  background: var(--surface); border-radius: var(--r);
  padding: 18px; margin-bottom: 12px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.setting-label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 12px; }

.setting-input {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 14px; font-size: 15px; outline: none;
  transition: border-color .15s; margin-bottom: 10px; color: var(--text);
  background: var(--bg);
}
.setting-input:focus { border-color: var(--brand-light); background: var(--surface); }

.save-btn {
  width: 100%; background: var(--brand); color: #fff;
  border: none; border-radius: var(--r-sm); padding: 11px;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s;
}
.save-btn:hover { background: var(--brand-mid); }
.save-btn:active { background: var(--brand); }

.grade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grade-btn {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 10px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all .15s; text-align: center;
}
.grade-btn.active { background: #eff6ff; border-color: var(--brand-light); color: var(--brand); }
.grade-btn:hover:not(.active) { border-color: var(--faint); color: var(--text); }

.stats-table { display: flex; flex-direction: column; }
.stats-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.stats-row:last-child { border-bottom: none; }
.stats-row span   { color: var(--muted); }
.stats-row strong { color: var(--text); font-weight: 700; }

.reset-btn {
  width: 100%; background: none; border: 1.5px solid #fecaca;
  color: #dc2626; border-radius: var(--r); padding: 14px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .15s; margin-bottom: 16px;
}
.reset-btn:hover { background: #fef2f2; }

/* ====== HAMBURGER ====== */
.hamburger-btn {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--brand);
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; transition: background .15s; flex-shrink: 0;
}
.hamburger-btn:active { background: var(--bg); }

/* ====== DRAWER ====== */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0);
  z-index: 200;
  pointer-events: none;
  transition: background .28s;
}
.drawer-overlay.open {
  background: rgba(0,0,0,.48);
  pointer-events: all;
}

.app-drawer {
  position: fixed;
  top: 0; left: -290px; bottom: 0;
  width: 280px;
  background: var(--surface);
  z-index: 201;
  display: flex; flex-direction: column;
  box-shadow: 6px 0 24px rgba(15,23,42,.15);
  transition: left .28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.app-drawer.open { left: 0; }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-brand {
  font-size: 20px; font-weight: 900; letter-spacing: 3px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.drawer-close-btn {
  background: none; border: none; cursor: pointer;
  font-size: 18px; color: var(--muted);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: background .15s;
}
.drawer-close-btn:active { background: var(--bg); }

.drawer-nav { padding: 10px 10px 4px; }
.drawer-item {
  width: 100%; display: flex; align-items: center; gap: 14px;
  background: none; border: none;
  padding: 12px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 600; color: var(--text);
  cursor: pointer; text-align: left;
  transition: background .15s, color .15s;
  margin-bottom: 2px;
}
.drawer-item i { font-size: 17px; width: 20px; text-align: center; color: var(--muted); flex-shrink: 0; }
.drawer-item.active { background: #eff6ff; color: var(--brand); }
.drawer-item.active i { color: var(--brand); }
@media (hover: hover) { .drawer-item:hover:not(.active) { background: var(--bg); } }

.drawer-divider { height: 1px; background: var(--border); margin: 10px 16px; }
.drawer-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted); padding: 4px 24px 6px;
}
.drawer-config-list { padding: 0 10px 24px; }
.drawer-config-item {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  margin-bottom: 2px;
}
.drawer-config-item i { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.drawer-soon-badge {
  margin-left: auto; font-size: 9px; font-weight: 700;
  background: var(--accent); color: #fff;
  padding: 2px 7px; border-radius: 8px;
  text-transform: uppercase; letter-spacing: .3px;
}

/* ====== TOAST ====== */
#meta-toast {
  position: fixed; bottom: calc(var(--nav-h) + 12px); left: 50%;
  transform: translateX(-50%);
  background: #0f172a; color: #fff;
  padding: 10px 20px; border-radius: 24px;
  font-size: 13px; font-weight: 600; z-index: 999;
  opacity: 0; transition: opacity .25s;
  pointer-events: none; white-space: nowrap;
}

/* ====== COUNTRY CARD ====== */
.country-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 16px 18px 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-light);
  margin-bottom: 20px;
  transition: border-color 0.55s ease;
}

/* — Encabezado — */
.cc-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.cc-flag-visual {
  width: 62px;
  height: 41px;
  border-radius: 5px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.1);
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  overflow: hidden;
}

.cc-head-info { flex: 1; min-width: 0; }

.cc-exploring {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin-bottom: 1px;
}

.cc-country-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand);
  transition: color 0.55s ease;
  line-height: 1.15;
}

.cc-lema {
  font-size: 10px;
  color: var(--muted);
  font-style: italic;
  margin-top: 3px;
  line-height: 1.3;
}

.cc-emoji-flag {
  font-size: 30px;
  line-height: 1;
  flex-shrink: 0;
  align-self: center;
}

/* — Símbolos patrios — */
.cc-simbolos { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }

.cc-sim-section {}

.cc-sim-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--brand);
  margin-bottom: 6px;
  padding-left: 2px;
  transition: color 0.55s ease;
}

.cc-sim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  justify-items: center;
}

.cc-sim-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  width: 100%;
}

.cc-sim-emoji  { font-size: 28px; line-height: 1; }
.cc-sim-nombre { font-size: 10px; font-weight: 700; color: var(--text); }
.cc-sim-tipo   { font-size: 9px;  font-weight: 500; color: var(--muted); }

.cc-sim-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 2.5px solid var(--brand);
  display: block;
  transition: border-color 0.55s;
}
.cc-sim-clickable { cursor: pointer; transition: transform 0.15s; }
.cc-sim-clickable:active { transform: scale(0.93); }
.cc-sim-clickable:active .cc-sim-img { border-color: var(--brand-light); }

/* ====== MODAL SÍMBOLOS ====== */
.sim-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: simFadeIn 0.18s ease;
}
@keyframes simFadeIn { from { opacity: 0; } to { opacity: 1; } }

.sim-modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 24px 20px 20px;
  max-width: 300px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.32);
  text-align: center;
  animation: simSlideUp 0.22s ease;
}
@keyframes simSlideUp {
  from { transform: translateY(22px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.sim-modal-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 14px;
  border: 3px solid var(--brand);
  background: #ffffff;
  padding: 10px;
  display: block;
  margin: 0 auto 14px;
  transition: border-color 0.55s;
}
.sim-modal-emoji { font-size: 52px; margin-bottom: 12px; }

.sim-modal-badge {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
  transition: background 0.55s;
}
.sim-modal-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.25;
}
.sim-modal-info {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 18px;
  text-align: left;
}
.sim-modal-close {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 30px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.55s;
  width: 100%;
}

/* — Curiosidad deslizable — */
.cc-curious-block {
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 14px 13px;
  margin-bottom: 12px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  position: relative;
  overflow: hidden;
}
.cc-curious-block:active { cursor: grabbing; }
.cc-curious-block::before {
  content: '‹';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--faint);
  opacity: .5;
  pointer-events: none;
}
.cc-curious-block::after {
  content: '›';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--faint);
  opacity: .5;
  pointer-events: none;
}

.cc-curious-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--brand-light);
  transition: color 0.55s ease;
  margin-bottom: 6px;
}

.cc-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text);
  font-weight: 500;
  margin: 0;
  padding: 0 10px;
}

/* — Footer — */
.cc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cc-category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--brand);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 12px;
  transition: color 0.55s ease;
}

/* — Navegación prev/next — */
.cc-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cc-nav-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: all .15s;
}
.cc-nav-btn:active { background: var(--bg); transform: scale(.9); }
@media (hover: hover) {
  .cc-nav-btn:hover { border-color: var(--brand-light); color: var(--brand); }
}

/* — Puntitos — */
.cc-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.cc-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s ease, transform 0.3s ease;
}

.cc-dot.active {
  background: var(--brand-light);
  transform: scale(1.4);
  transition: background 0.55s ease, transform 0.3s ease;
}

/* ====== CARRUSEL PRÓCERES ====== */
.proc-card {
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.proc-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.proc-flag { font-size: 20px; line-height: 1; }

.proc-card-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: .2px;
}

.proc-body {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
  cursor: pointer;
}

.proc-foto {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2.5px solid var(--brand);
  background: #fff;
  flex-shrink: 0;
}

.proc-info { flex: 1; min-width: 0; }

.proc-nombre {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 2px;
}

.proc-fecha {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.proc-desc {
  font-size: 12px;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 6px;
}

.proc-cita {
  font-size: 12px;
  color: var(--brand);
  font-style: italic;
  font-weight: 600;
  line-height: 1.5;
  border-left: 2px solid var(--brand-light);
  padding-left: 8px;
}

/* ====== GOBIERNO ESCOLAR ====== */
.ge-card {
  background: var(--surface); border-radius: var(--r);
  padding: 18px 20px; box-shadow: var(--shadow);
  border: 1px solid var(--border); border-left: 4px solid var(--brand);
  margin-bottom: 20px;
}
.ge-subtitle { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.4; }
.ge-header-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ge-badge { font-size: 11px; font-weight: 700; background: var(--brand-light); color: #fff; padding: 4px 10px; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.ge-icon-btn { background: var(--bg); border: 1px solid var(--border); color: var(--text); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; }
.ge-icon-btn:hover { background: var(--surface); border-color: var(--brand); color: var(--brand); }

.ge-planillas-container { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.ge-planilla { background: var(--bg); padding: 14px; border-radius: var(--r-sm); border: 1px solid var(--border); }
.ge-planilla label { display: block; font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 8px; text-transform: uppercase; }
.ge-img-upload { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ge-upload-btn { background: #fff; border: 1px dashed var(--brand-light); color: var(--brand); font-size: 12px; font-weight: 600; padding: 8px 12px; border-radius: 8px; cursor: pointer; flex: 1; text-align: center; transition: background .15s; }
.ge-upload-btn:hover { background: var(--mat-bg); }
.ge-preview { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brand); background: #fff; }
.ge-input { width: 100%; border: 1px solid var(--border); padding: 10px 12px; border-radius: 8px; font-size: 14px; outline: none; background: #fff; transition: border-color .15s; }
.ge-input:focus { border-color: var(--brand-light); }
.ge-btn { width: 100%; background: var(--brand); color: #fff; font-weight: 700; padding: 12px; border: none; border-radius: 8px; cursor: pointer; transition: background .15s; }
.ge-btn:hover { background: var(--brand-mid); }

.ge-voting-container { display: flex; gap: 12px; justify-content: space-around; margin-bottom: 12px; }
.ge-vote-btn { flex: 1; background: var(--bg); border: 2px solid var(--border); border-radius: var(--r); padding: 16px 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; transition: all .15s; }
.ge-vote-btn:active { transform: scale(0.95); }
.ge-vote-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--brand-light); background: #fff; pointer-events: none; }
.ge-vote-name { font-size: 14px; font-weight: 700; color: var(--text); pointer-events: none; text-align: center; }

.ge-feedback { text-align: center; background: #22c55e; color: #fff; padding: 10px; border-radius: 8px; font-weight: 700; font-size: 14px; animation: fadeUp .25s ease; }

.ge-results-list { margin-bottom: 20px; }
.ge-result-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ge-res-name { font-weight: 700; font-size: 15px; color: var(--text); }
.ge-res-votes { font-weight: 700; font-size: 14px; color: var(--brand); background: var(--mat-bg); padding: 4px 10px; border-radius: 12px; }

.ge-urnas-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.ge-urnas-inputs { display: flex; gap: 10px; margin-bottom: 20px; }

.ge-total-wrap { display: flex; gap: 12px; }
.ge-total-item { flex: 1; background: var(--brand); color: #fff; padding: 14px; border-radius: var(--r-sm); text-align: center; box-shadow: var(--shadow); }
.ge-total-label { display: block; font-size: 11px; font-weight: 600; opacity: 0.8; text-transform: uppercase; margin-bottom: 4px; }
.ge-total-val { display: block; font-size: 24px; font-weight: 800; line-height: 1; }

.proc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ====== TEACHER PANEL ====== */
/* ====== PLAN DE ACCIÓN ====== */
.pa-card { background:var(--surface);border-radius:var(--r);padding:18px;margin-bottom:14px;box-shadow:var(--shadow);border:1px solid var(--border); }
.pa-card-title { font-size:13px;font-weight:800;color:var(--text);margin-bottom:14px;display:flex;align-items:center;gap:6px; }
.pa-row-2 { display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:10px; }
.pa-field { display:flex;flex-direction:column;gap:5px; }
.pa-field label { font-size:10px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.5px; }
.pa-inp-field { width:100%;border:1.5px solid var(--border);border-radius:8px;padding:10px 12px;font-size:14px;outline:none;background:var(--bg);color:var(--text);font-family:inherit;transition:border-color .15s; }
.pa-inp-field:focus { border-color:var(--brand-light);background:var(--surface); }

/* Tabs de entrada */
.pa-entry-tabs { display:flex;gap:8px;margin-bottom:14px; }
.pa-etab { flex:1;background:var(--bg);border:1.5px solid var(--border);border-radius:8px;padding:9px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .15s; }
.pa-etab.pa-etab-active { background:#eff6ff;border-color:var(--brand);color:var(--brand); }

/* Columna header */
.pa-optional-hint { font-size:12px;color:var(--muted);background:#fffbeb;border:1px solid #fde68a;border-radius:8px;padding:8px 12px;margin-bottom:10px;line-height:1.5; }
.pa-col-header { display:grid;grid-template-columns:28px 1fr 72px 28px;gap:6px;padding:0 0 6px;border-bottom:1px solid var(--border);margin-bottom:6px; }
.pa-ch-num,.pa-ch-name,.pa-ch-grade { font-size:10px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.4px; }
.pa-ch-num,.pa-ch-grade { text-align:center; }

/* Filas de estudiante */
.pa-student-row { display:grid;grid-template-columns:28px 1fr 72px 28px;gap:6px;align-items:center;margin-bottom:6px; }
.pa-row-num { font-size:12px;font-weight:700;color:var(--muted);text-align:center; }
.pa-inp-grade-cell { border:1.5px solid var(--border);border-radius:8px;padding:8px 4px;font-size:13px;font-weight:700;text-align:center;outline:none;background:var(--bg);font-family:inherit;transition:border-color .15s; }
.pa-inp-grade-cell:focus { border-color:var(--brand-light); }
.pa-del-row { background:none;border:none;cursor:pointer;color:var(--faint);font-size:13px;display:flex;align-items:center;justify-content:center;border-radius:6px;padding:4px;transition:color .15s; }
.pa-del-row:active { color:#ef4444; }

/* Textarea pegar */
.pa-paste-hint { font-size:12px;color:var(--muted);margin-bottom:8px;line-height:1.5; }
.pa-paste-area { width:100%;height:160px;border:1.5px solid var(--border);border-radius:8px;padding:10px 12px;font-size:13px;outline:none;background:var(--bg);color:var(--text);font-family:inherit;resize:vertical;transition:border-color .15s; }
.pa-paste-area:focus { border-color:var(--brand-light); }

/* Botones */
.pa-add-btn { width:100%;background:var(--bg);border:1.5px dashed var(--border);border-radius:8px;padding:10px;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer;font-family:inherit;margin:4px 0 14px;display:flex;align-items:center;justify-content:center;gap:8px;transition:border-color .15s,color .15s; }
.pa-add-btn:active { border-color:var(--brand-light);color:var(--brand); }
.pa-gen-btn { width:100%;background:linear-gradient(135deg,var(--brand),var(--brand-mid));color:#fff;border:none;border-radius:10px;padding:13px;font-size:14px;font-weight:700;cursor:pointer;font-family:inherit;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 12px rgba(30,58,124,.25);transition:transform .15s; }
.pa-gen-btn:active { transform:scale(.97); }

/* Dashboard output */
.pa-dash-head { background:linear-gradient(135deg,var(--brand),var(--brand-mid));color:#fff;border-radius:var(--r);padding:18px;margin-bottom:14px;display:flex;flex-direction:column;gap:8px; }
.pa-dash-title { font-size:15px;font-weight:900;letter-spacing:.5px; }
.pa-dash-sub { font-size:12px;opacity:.85; }
.pa-dash-meta { display:flex;flex-wrap:wrap;gap:10px;font-size:12px;background:rgba(255,255,255,.15);border-radius:8px;padding:8px 12px; }
.pa-dash-meta span { font-weight:500; }

/* Output tabs */
.pa-tabs-out { display:flex;gap:0;margin-bottom:14px;background:var(--surface);border:1px solid var(--border);border-radius:10px;overflow:hidden; }
.pa-otab { flex:1;background:none;border:none;padding:11px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;color:var(--muted);transition:all .15s; }
.pa-otab.pa-otab-active { background:var(--brand);color:#fff; }

/* Stats grid */
.pa-stats-grid { display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px; }
.pa-stat-card { background:var(--surface);border-radius:12px;padding:14px;border:1px solid var(--border);box-shadow:var(--shadow);display:flex;align-items:center;gap:10px;overflow:hidden;min-width:0; }
.pa-stat-ic { width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0; }
.pa-stat-info { flex:1;min-width:0;overflow:hidden; }
.pa-stat-lbl { font-size:11px;color:var(--muted);font-weight:600;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.pa-stat-val { font-size:20px;font-weight:900;color:var(--text);line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.pa-stat-sub { font-size:10px;color:var(--faint);margin-top:2px; }

/* Two column layout */
.pa-two-col { display:flex;flex-direction:column;gap:12px;margin-bottom:14px; }
@media(min-width:600px) { .pa-two-col { flex-direction:row; } .pa-two-col > * { flex:1; } }

/* Distribution */
.pa-dist-row { margin-bottom:10px; }
.pa-dist-info { display:flex;justify-content:space-between;margin-bottom:4px; }
.pa-dist-lbl { font-size:12px;font-weight:600;color:var(--text); }
.pa-dist-cnt { font-size:12px;font-weight:700;color:var(--muted); }
.pa-dist-track { height:8px;background:var(--bg);border-radius:8px;overflow:hidden; }
.pa-dist-fill { height:100%;border-radius:8px;transition:width .6s ease; }

/* Suggestions */
.pa-sug-item { padding:10px 12px;border-radius:8px;margin-bottom:8px; }
.pa-sug-head { display:flex;justify-content:space-between;margin-bottom:4px; }
.pa-sug-title { font-size:12px;font-weight:800; }
.pa-sug-cnt { font-size:11px;font-weight:700;background:rgba(0,0,0,.1);padding:1px 7px;border-radius:8px; }
.pa-sug-text { font-size:11px;color:#374151;line-height:1.5; }

/* Plan */
.pa-plan-card { border-left:4px solid #ef4444 !important; }
.pa-plan-grid { display:grid;grid-template-columns:1fr;gap:16px; }
@media(min-width:520px) { .pa-plan-grid { grid-template-columns:1fr 1fr; } }
.pa-plan-sub { font-size:12px;font-weight:800;color:var(--text);margin-bottom:6px; }
.pa-plan-note { font-size:11px;color:var(--muted);background:var(--bg);border-radius:8px;padding:8px 10px;margin-bottom:8px;line-height:1.4; }
.pa-recup-list { list-style:none;display:flex;flex-direction:column;gap:4px; }
.pa-recup-item { display:flex;justify-content:space-between;align-items:center;padding:7px 10px;background:var(--surface);border:1px solid var(--border);border-radius:8px;font-size:12px; }
.pa-recup-name { color:var(--text);font-weight:500;flex:1;margin-right:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.pa-grade-chip { font-size:11px;font-weight:700;padding:3px 8px;border-radius:6px;flex-shrink:0; }
.pa-empty-msg { font-size:12px;color:var(--muted);font-style:italic;padding:8px 0; }
.pa-print-btn {
  width:100%; margin-top:14px;
  background: linear-gradient(135deg,#1e3a7c,#2258d4);
  color:#fff; border:none; border-radius:10px; padding:13px;
  font-size:14px; font-weight:700; cursor:pointer; font-family:inherit;
  display:flex; align-items:center; justify-content:center; gap:8px;
  box-shadow:0 4px 12px rgba(30,58,124,.25); transition:transform .15s;
}
.pa-print-btn:active { transform:scale(.97); }

/* Planilla table */
.pa-table { width:100%;border-collapse:collapse;font-size:13px; }
.pa-table th { background:#eff6ff;font-size:10px;font-weight:700;color:var(--brand);text-transform:uppercase;letter-spacing:.4px;padding:10px 12px;text-align:left;border-bottom:2px solid var(--border); }
.pa-table th:last-child,.pa-td-g { text-align:center; }
.pa-td-n { padding:8px 12px;font-weight:700;color:var(--muted);background:var(--bg);border-bottom:1px solid var(--border);width:36px;text-align:center; }
.pa-td-name { padding:8px 12px;color:var(--text);border-bottom:1px solid var(--border); }
.pa-td-g { padding:8px 12px;font-weight:800;border-bottom:1px solid var(--border);border-left:1px solid var(--border); }

/* Grade number grid */
.pa-ng-titulo { font-size:13px;font-weight:800;color:var(--brand);text-align:center;margin-bottom:12px;line-height:1.4;border-bottom:2px solid var(--border);padding-bottom:10px; }
.pa-ng-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:8px; }
.pa-ng-col { display:flex;flex-direction:column;gap:3px; }
.pa-ng-row { display:flex;align-items:center;gap:4px;min-height:24px; }
.pa-ng-num { font-size:10px;font-weight:600;color:var(--muted);width:26px;text-align:right;flex-shrink:0; }
.pa-ng-chip { font-size:12px;font-weight:800;padding:4px 0;border-radius:6px;text-align:center;flex:1; }
.pa-ng-msg { font-size:11px;color:var(--muted);line-height:1.5;margin-top:12px;border-top:1px solid var(--border);padding-top:10px;text-align:justify; }
.pa-ng-actions { margin-top:12px; }
.pa-ng-capture-btn { width:100%;background:linear-gradient(135deg,#7c3aed,#6d28d9);color:#fff;border:none;border-radius:10px;padding:11px;font-size:13px;font-weight:700;cursor:pointer;font-family:inherit;display:flex;align-items:center;justify-content:center;gap:8px;transition:transform .15s; }
.pa-ng-capture-btn:active { transform:scale(.97); }

/* ====== PARTE MENSUAL ====== */
.parte-card {
  background: var(--surface); border-radius: var(--r);
  padding: 18px; margin-bottom: 14px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.parte-section-title { font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 14px; }
.parte-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.parte-field { display: flex; flex-direction: column; }
.parte-field label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.pm-hint { font-size: 9px; font-weight: 500; color: var(--faint); text-transform: none; letter-spacing: 0; margin-left: 4px; }
.parte-input {
  width: 100%; border: 1.5px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; outline: none;
  background: var(--bg); color: var(--text); font-family: inherit;
  transition: border-color .15s;
}
.parte-input:focus { border-color: var(--brand-light); background: var(--surface); }
.pm-seccion-btns { display: flex; gap: 6px; }
.pm-sec-btn {
  flex: 1; background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 9px 4px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.pm-sec-btn.pm-sec-active { background: #eff6ff; border-color: var(--brand); color: var(--brand); }

/* Tabla de matrícula */
.pm-tabla-mat { display: flex; flex-direction: column; gap: 4px; }
.pm-mat-head { display: grid; grid-template-columns: 1.2fr 1fr 1fr 0.8fr; gap: 6px; padding: 0 0 6px; border-bottom: 1px solid var(--border); }
.pm-mat-head span { font-size: 10px; font-weight: 700; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: .4px; }
.pm-mat-head span:first-child { text-align: left; }
.pm-mat-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 0.8fr; gap: 6px; align-items: center; padding: 5px 0; }
.pm-mat-sub { opacity: .85; }
.pm-mat-actual { border-top: 2px solid var(--brand); padding-top: 8px; margin-top: 4px; }
.pm-mat-lbl { font-size: 12px; font-weight: 600; color: var(--text); }
.pm-mat-inp { padding: 7px 6px !important; text-align: center; font-weight: 700; font-size: 13px !important; }
.pm-mat-total { text-align: center; font-size: 13px; font-weight: 700; color: var(--brand); }
.pm-mat-grand { font-size: 16px; font-weight: 800; }

/* Resultados */
.pm-resultados-card { border-left: 4px solid var(--brand-light); }
.pm-resultado-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.pm-res-lbl-wrap { display: flex; flex-direction: column; gap: 3px; }
.pm-res-label { font-size: 14px; font-weight: 700; color: var(--text); }
.pm-res-formula { font-size: 10px; color: var(--faint); }
.pm-res-value { font-size: 26px; font-weight: 900; color: var(--brand); flex-shrink: 0; margin-left: 10px; }
.pm-pct-value { font-size: 32px; }
.pm-bar-wrap { height: 10px; background: var(--bg); border-radius: 10px; overflow: hidden; margin: 14px 0 10px; }
.pm-bar-fill { height: 100%; border-radius: 10px; transition: width .8s cubic-bezier(.34,1.56,.64,1), background .4s; }
.pm-semaforo { margin-bottom: 14px; }
.pm-semaforo-text { font-size: 13px; font-weight: 600; color: var(--text); }
.parte-btn-secundario {
  width: 100%; background: var(--bg); color: var(--brand);
  border: 1.5px solid var(--brand); border-radius: 8px; padding: 11px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s; font-family: inherit;
}
.parte-btn-secundario:active { background: #eff6ff; }

/* Herramienta activa en grid docente */
.teacher-tool-item.teacher-tool-active {
  background: #eff6ff; border-color: var(--brand);
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.teacher-tool-item.teacher-tool-active i  { color: var(--brand); }
.teacher-tool-item.teacher-tool-active span { color: var(--brand); font-weight: 700; }
.teacher-tool-item.teacher-tool-active::after { display: none; }
.teacher-tool-item.teacher-tool-active:active { transform: scale(.95); }

/* Botón volver en vistas secundarias */
.back-icon-btn {
  background: none; border: none; cursor: pointer;
  font-size: 18px; color: var(--brand);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background .15s;
}
.back-icon-btn:active { background: var(--bg); }

/* Botón Gobierno Escolar en Herramientas del Docente */
.teacher-ge-btn {
  width: 100%; display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-mid));
  color: #fff; border: none; border-radius: var(--r-sm);
  padding: 14px 16px; font-size: 14px; font-weight: 700;
  cursor: pointer; margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(30,58,124,.25);
  transition: transform .15s, box-shadow .15s;
}
.teacher-ge-btn:active { transform: scale(.97); }
.teacher-ge-btn i:first-child { font-size: 18px; }
.teacher-ge-arrow { margin-left: auto; opacity: .7; }

/* Zona Docente: accesos principales (registros del maestro) */
.teacher-links-list { display: flex; flex-direction: column; gap: 10px; }
.teacher-link-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 1.5px solid var(--brand);
  border-radius: var(--r-sm); padding: 13px 14px;
  transition: transform .15s;
}
.teacher-link-item:active { transform: scale(.97); }
.teacher-link-item > i { font-size: 20px; color: var(--brand); width: 26px; text-align: center; }
.tli-info { display: flex; flex-direction: column; min-width: 0; }
.tli-title { font-size: 14px; font-weight: 700; color: var(--brand); }
.tli-sub { font-size: 11px; color: var(--muted); }
.teacher-link-item .fa-chevron-right { margin-left: auto; font-size: 13px; color: var(--muted); width: auto; }

.teacher-panel-group { border-left: 4px solid var(--accent) !important; }
.teacher-panel-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.teacher-panel-icon { font-size: 22px; color: var(--accent); }
.teacher-panel-desc { font-size: 12px; color: var(--muted); margin-bottom: 14px; line-height: 1.4; }
.teacher-tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.teacher-tool-item {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 14px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  text-align: center; position: relative; cursor: default;
}
.teacher-tool-item i  { font-size: 22px; color: var(--brand); }
.teacher-tool-item span { font-size: 11px; font-weight: 600; color: var(--text); }
.teacher-tool-item::after {
  content: 'Pronto';
  position: absolute; top: 4px; right: 4px;
  font-size: 8px; font-weight: 700;
  background: var(--accent); color: #fff;
  padding: 1px 5px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: .3px;
}
.teacher-tool-coming { opacity: 0.45; }

/* ====== GOBIERNO ESCOLAR – NUEVOS ESTILOS ====== */
.ge-code-box { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.ge-code-input {
  font-size: 22px !important; font-weight: 800 !important;
  text-align: center; letter-spacing: 4px; text-transform: uppercase;
  padding: 14px !important;
}
.ge-code-error {
  background: #fef2f2; border: 1px solid #fecaca;
  color: #dc2626; padding: 9px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 600; line-height: 1.4;
}
.ge-ballot-header { margin-bottom: 12px; }
.ge-badge-voter {
  display: block; margin-bottom: 8px;
  font-size: 11px; font-weight: 700;
  background: #22c55e; color: #fff;
  padding: 4px 12px; border-radius: 12px;
  text-align: center; letter-spacing: .4px;
}
.ge-vote-planilla {
  font-size: 13px; font-weight: 800; color: var(--brand);
  text-align: center; pointer-events: none; line-height: 1.2;
}
.ge-vote-emoji { font-size: 40px; pointer-events: none; }
.ge-urna-row-header {
  display: grid; grid-template-columns: 1fr 72px 72px;
  gap: 6px; margin-bottom: 4px;
}
.ge-urna-col-lbl {
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-align: center; text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ge-urna-row {
  display: grid; grid-template-columns: 1fr 72px 72px;
  gap: 6px; align-items: center; margin-bottom: 6px;
}
.ge-urna-lbl { font-size: 12px; font-weight: 700; color: var(--text); }
.ge-mini-input { width: 72px !important; text-align: center !important; font-weight: 700 !important; padding: 8px 4px !important; }
.ge-other-urnas { margin-bottom: 16px; }
.ge-winner-wrap { margin-top: 14px; }
.ge-winner {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff; padding: 14px; border-radius: var(--r-sm);
  text-align: center; font-size: 15px; font-weight: 700;
  animation: fadeUp .3s ease;
}
.ge-votes-count { text-align: center; font-size: 12px; color: var(--muted); margin-top: 10px; }
.ge-preview-section { margin-bottom: 18px; }
.ge-preview-title { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 12px; text-align: center; }
.ge-preview-candidates { display: flex; gap: 16px; justify-content: center; }
.ge-prev-card { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.ge-big-preview { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid var(--brand); background: #fff; box-shadow: var(--shadow-md); display: block; }
.ge-big-name { font-size: 12px; font-weight: 700; color: var(--text); text-align: center; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ====== TABLET (600px+) ====== */
@media (min-width: 600px) {
  body {
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 0 50px rgba(0,0,0,.10);
    border: 1px solid var(--border);
  }
  .bottom-nav {
    max-width: 700px;
    left: 50%;
    transform: translateX(-50%);
  }

  .view-scroll { padding: 20px 28px 28px; }

  /* Materias: 4 en una fila */
  .subjects-row { grid-template-columns: repeat(4, 1fr); }

  /* Símbolos: 4 columnas */
  .cc-sim-grid { grid-template-columns: repeat(4, 1fr); }

  /* Prócer más grande */
  .pensador-foto { width: 80px; height: 80px; }

  /* Próceres carrusel */
  .proc-foto { width: 88px; height: 88px; }

  /* Selectors en fila */
  .selectors-container { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* ====== DESKTOP (1024px+) ====== */
@media (min-width: 1024px) {
  body { max-width: 960px; }
  .bottom-nav { max-width: 960px; }

  .view-scroll { padding: 28px 48px 32px; }

  .app-header { padding: 16px 48px 14px; }

  /* Misiones en 2 columnas */
  .missions-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Tarjeta país más espaciosa */
  .country-card { padding: 20px 24px; }

  /* Símbolos: hasta 5 columnas */
  .cc-sim-grid { grid-template-columns: repeat(5, 1fr); }

  /* Modal más ancho */
  .sim-modal { max-width: 380px; }

  /* Imagen prócer en modal más grande */
  .sim-modal-img { width: 180px; height: 180px; }

  /* Recientes en 2 columnas */
  .small-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ====== COLLAGE DE EVIDENCIAS ====== */

.co-title-icon { color: var(--brand); }

/* Área de carga (upload label clickable) */
.co-upload-label {
  display: flex; align-items: center; gap: 10px;
  border: 2px dashed var(--border); border-radius: var(--r-sm);
  padding: 14px 16px; cursor: pointer;
  color: var(--muted); font-size: 13px; font-weight: 600;
  transition: border-color .18s, background .18s;
}
.co-upload-label:hover { border-color: var(--brand); background: #eff6ff; color: var(--brand); }
.co-upload-label i { font-size: 20px; color: var(--brand); flex-shrink: 0; }
.co-upload-label em { font-style: normal; font-weight: 400; color: var(--faint); }

/* Vista previa del logo */
.co-logo-preview {
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px; padding: 10px 12px;
  background: var(--bg); border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.co-logo-preview img {
  width: 60px; height: 60px; object-fit: contain;
  border-radius: 8px; border: 1px solid var(--border); background: #fff;
}
.co-remove-btn {
  margin-left: auto; background: #fee2e2; border: none;
  color: #dc2626; border-radius: 8px; width: 32px; height: 32px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0; transition: background .15s;
}
.co-remove-btn:hover { background: #fecaca; }

/* Textarea */
.co-textarea { height: 58px; resize: none; }

/* Selector de formato */
.co-format-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.co-format-opt { display: block; cursor: pointer; }
.co-format-opt input { display: none; }
.co-format-card {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 14px 8px; border-radius: var(--r-sm);
  border: 2px solid var(--border); background: var(--bg);
  text-align: center; transition: border-color .18s, background .18s;
  color: var(--muted);
}
.co-format-card i  { font-size: 24px; color: var(--muted); }
.co-format-card b  { font-size: 12px; font-weight: 800; color: var(--text); }
.co-format-card small { font-size: 10px; color: var(--faint); }
.co-format-opt input:checked + .co-format-card {
  border-color: var(--brand); background: #eff6ff;
  color: var(--brand);
}
.co-format-opt input:checked + .co-format-card i { color: var(--brand); }

/* Contador de fotos */
.co-photo-count {
  margin-left: auto; font-size: 11px; font-weight: 700;
  color: var(--brand); background: #eff6ff;
  padding: 2px 8px; border-radius: 8px;
}

/* Grid de miniaturas */
.co-thumbs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 12px;
}
.co-thumb {
  position: relative; aspect-ratio: 1/1;
  border-radius: 10px; overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg);
}
.co-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.co-thumb-remove {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.55); border: none; color: #fff;
  width: 22px; height: 22px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 11px; transition: background .15s;
}
.co-thumb-remove:hover { background: rgba(220,38,38,.85); }
.co-thumb-num {
  position: absolute; bottom: 4px; left: 6px;
  font-size: 10px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}

/* Contenedor de vista previa */
.co-preview-wrap {
  margin-bottom: 24px;
}

/* Pila canvas + separadores de cuadrícula (misma relación de aspecto) */
.co-canvas-stage {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.co-canvas {
  width: 100%; height: auto; display: block;
  border-radius: 0;
  border: none;
  box-shadow: none;
  touch-action: none;   /* evita scroll al arrastrar en móvil */
  user-select: none;
  vertical-align: top;
}

/* Capa sobre el canvas: separadores táctiles entre celdas de fotos */
.co-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* Separador vertical (arrastre ↔): franja ancha para dedo, línea visible al centro */
.grid-separator-v {
  position: absolute;
  top: 0;
  width: 44px;
  min-height: 48px;
  transform: translateX(-50%);
  pointer-events: auto;
  touch-action: none;
  cursor: ew-resize;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent calc(50% - 2px),
    rgba(30, 58, 124, 0.55) 50%,
    transparent calc(50% + 2px),
    transparent 100%
  );
  box-sizing: border-box;
}

.grid-separator-v::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 28px;
  margin: -14px 0 0 -4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(30, 58, 124, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Separador horizontal (arrastre ↕) */
.grid-separator-h {
  position: absolute;
  left: 0;
  height: 44px;
  min-width: 48px;
  transform: translateY(-50%);
  pointer-events: auto;
  touch-action: none;
  cursor: ns-resize;
  display: flex;
  align-items: center;
  justify-content: stretch;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent calc(50% - 2px),
    rgba(30, 58, 124, 0.55) 50%,
    transparent calc(50% + 2px),
    transparent 100%
  );
  box-sizing: border-box;
}

.grid-separator-h::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 8px;
  margin: -4px 0 0 -14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(30, 58, 124, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.co-grid-overlay .grid-separator-v.is-dragging,
.co-grid-overlay .grid-separator-h.is-dragging {
  background-color: rgba(30, 58, 124, 0.08);
}

/* ====================================================================
   CAMPEONÍSIMO
   ==================================================================== */

/* ── Error fallback ── */
.camp-error-msg {
  padding: 40px 20px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* ── Setup ── */
.camp-setup {
  padding: 8px 4px 24px;
}
.camp-setup-hero {
  text-align: center;
  padding: 16px 0 20px;
}
.camp-trophy {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 8px;
}
.camp-setup-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--brand);
  margin-bottom: 4px;
}
.camp-setup-sub {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.camp-card {
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.camp-card-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 10px;
}
.camp-num-btns, .camp-timer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.camp-num-btn, .camp-timer-btn, .camp-pts-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--bg);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
}
.camp-num-btn.active, .camp-timer-btn.active, .camp-pts-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.camp-group-names-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.camp-group-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.camp-gi-badge {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.camp-gi-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.camp-gi-input:focus {
  border-color: var(--brand);
  background: var(--surface);
}
.camp-start-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 4px 14px rgba(30,58,124,.25);
  transition: transform .1s, box-shadow .1s;
}
.camp-start-btn:active { transform: scale(.97); }
.camp-start-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ── Hub ── */
.camp-hub {
  padding: 4px 0 20px;
}
.camp-scoreboard {
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--border);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.camp-score-row {
  display: grid;
  grid-template-columns: 10px 1fr auto 26px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.camp-score-row:last-child { border-bottom: none; }
.camp-score-color {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.camp-score-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.camp-score-pts {
  font-size: 18px;
  font-weight: 900;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.camp-score-medal { font-size: 18px; text-align: center; }

/* Ruleta */
.camp-wheel-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 0 14px;
}
.camp-round-badge {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
}
.camp-wheel-wrap {
  position: relative;
  width: 240px;
  height: 240px;
}
.camp-pointer-arrow {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 18px solid #ef4444;
  z-index: 5;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
.camp-wheel {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  border: 5px solid #fff;
  /* 4 sectores: líneas divisorias via box + colores via conic-gradient */
  background: conic-gradient(
    #fef3c7 0deg 90deg,
    #dbeafe 90deg 180deg,
    #ccfbf1 180deg 270deg,
    #fee2e2 270deg 360deg
  );
}
/* Centro de la ruleta */
.camp-wheel::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 28px; height: 28px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%,-50%);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  z-index: 3;
}
/* Líneas divisoras */
.camp-wheel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(0deg, transparent 49.3%, #fff 49.3%, #fff 50.7%, transparent 50.7%),
    linear-gradient(90deg, transparent 49.3%, #fff 49.3%, #fff 50.7%, transparent 50.7%);
  z-index: 2;
}
/* Sectores con ícono y etiqueta */
.camp-wsector {
  position: absolute;
  width: 50%; height: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  z-index: 1;
}
.camp-wsector:nth-child(1) { top: 0; right: 0; }  /* ESP: top-right */
.camp-wsector:nth-child(2) { bottom: 0; right: 0; } /* MAT: bottom-right */
.camp-wsector:nth-child(3) { bottom: 0; left: 0; }  /* NAT: bottom-left */
.camp-wsector:nth-child(4) { top: 0; left: 0; }    /* SOC: top-left */
.camp-ws-icon { font-size: 22px; line-height: 1; }
.camp-ws-short {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .5px;
}
.camp-ws-esp .camp-ws-short { color: #92400e; }
.camp-ws-mat .camp-ws-short { color: #1d4ed8; }
.camp-ws-cnat .camp-ws-short { color: #0f766e; }
.camp-ws-csoc .camp-ws-short { color: #b91c1c; }

/* Anuncio de materia seleccionada */
.camp-subject-announce {
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  padding: 8px 18px;
  border-radius: 12px;
  min-height: 42px;
  transition: all .3s;
}
.camp-subject-announce:empty { background: transparent; }
.camp-sa-esp  { background: #fef3c7; color: #92400e; border: 2px solid #fcd34d; }
.camp-sa-mat  { background: #dbeafe; color: #1d4ed8; border: 2px solid #93c5fd; }
.camp-sa-cnat { background: #ccfbf1; color: #0f766e; border: 2px solid #5eead4; }
.camp-sa-csoc { background: #fee2e2; color: #b91c1c; border: 2px solid #fca5a5; }

@keyframes campPop {
  0%   { transform: scale(.7); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
.camp-subject-announce:not(:empty) {
  animation: campPop .4s ease forwards;
}

.camp-spin-btn {
  padding: 12px 28px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245,158,11,.35);
  transition: transform .1s;
}
.camp-spin-btn:active  { transform: scale(.96); }
.camp-spin-btn:disabled { opacity: .5; cursor: not-allowed; }

.camp-hub-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.camp-action-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s;
}
.camp-action-btn:active { background: var(--bg); }

/* ── Pantalla de Pregunta ── */
.camp-question-screen {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 70px);
}
.camp-q-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.camp-q-header-esp  { background: #fef3c7; }
.camp-q-header-mat  { background: #dbeafe; }
.camp-q-header-cnat { background: #ccfbf1; }
.camp-q-header-csoc { background: #fee2e2; }
.camp-q-subj-icon { font-size: 20px; }
.camp-q-subj-label {
  font-weight: 800;
  font-size: 15px;
}
.camp-q-mision {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  flex: 1;
}
.camp-q-timer {
  font-size: 20px;
  font-weight: 900;
  color: var(--brand);
  min-width: 46px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  transition: color .3s;
}
.camp-q-timer.camp-timer-urgent { color: #ef4444; animation: campPulse 1s infinite; }
@keyframes campPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15); }
}

.camp-q-body { flex: 1; }
.camp-q-text {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 16px;
  color: var(--text);
}
.camp-q-opts {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.camp-q-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: 14px;
  font-weight: 600;
}
.camp-q-opt:active { background: var(--bg); }
.camp-q-opt.selected {
  border-color: var(--brand);
  background: #eff6ff;
}
.camp-q-opt.correct {
  border-color: #16a34a;
  background: #dcfce7;
  color: #14532d;
}
.camp-q-opt.wrong {
  border-color: #dc2626;
  background: #fee2e2;
  color: #7f1d1d;
}
.camp-q-letter {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}
.camp-q-opt.correct .camp-q-letter { background: #16a34a; color: #fff; border-color: #16a34a; }
.camp-q-opt.wrong   .camp-q-letter { background: #dc2626; color: #fff; border-color: #dc2626; }
.camp-q-opt-text { flex: 1; line-height: 1.4; }

.camp-q-actions {
  padding: 14px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.camp-reveal-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(22,163,74,.25);
}
.camp-skip-btn {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* Mini-marcador durante la pregunta */
.camp-mini-score {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.camp-ms-item {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
}
.camp-ms-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.camp-ms-name { max-width: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.camp-ms-pts { font-weight: 900; color: var(--brand); }
@keyframes campPtsBump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); color: #16a34a; }
  100% { transform: scale(1); }
}
.camp-pts-bump { animation: campPtsBump .5s ease; }

/* ── Asignación de puntos ── */
.camp-award-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.camp-timeout-msg {
  font-size: 15px;
  font-weight: 700;
  color: #ef4444;
  text-align: center;
}
.camp-award-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.camp-award-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}
.camp-award-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.camp-award-btn.selected {
  border-color: var(--gc, #1e3a7c);
  background: color-mix(in srgb, var(--gc, #1e3a7c) 12%, white);
}
.camp-ag-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.camp-confirm-pts-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.camp-confirm-pts-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.camp-next-q-btn {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ── Temporizador circular SVG ── */
.camp-q-subj-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.camp-q-timer-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.camp-timer-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.camp-q-timer-num {
  position: relative;
  font-size: 14px;
  font-weight: 900;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  z-index: 1;
}
.camp-q-timer-wrap.camp-timer-urgent .camp-q-timer-num {
  color: #ef4444;
  animation: campPulse 1s infinite;
}
.camp-q-timer-wrap.camp-timer-urgent #camp-timer-arc {
  stroke: #ef4444;
}

/* ── Selector de Misiones ── */
.camp-ms-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.camp-ms-global {
  padding: 5px 11px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.camp-ms-global:active { opacity: .8; }
.camp-ms-global.camp-ms-none {
  background: var(--surface);
  color: var(--muted);
}
.camp-ms-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.camp-ms-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.camp-ms-bhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 800;
}
.camp-ms-bh-esp  { background: #fef3c7; color: #92400e; }
.camp-ms-bh-mat  { background: #dbeafe; color: #1d4ed8; }
.camp-ms-bh-cnat { background: #ccfbf1; color: #0f766e; }
.camp-ms-bh-csoc { background: #fee2e2; color: #b91c1c; }
.camp-ms-tog {
  padding: 3px 9px;
  border-radius: 6px;
  border: 1.5px solid rgba(0,0,0,.15);
  background: rgba(255,255,255,.65);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  color: inherit;
}
.camp-ms-blist {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--surface);
}
.camp-ms-blbl {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 3px 0;
}
.camp-ms-ck {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  flex-shrink: 0;
  cursor: pointer;
}

/* ─────────────────────────────────────────────
   RUTAS DE APRENDIZAJE (mapa tipo línea de metro)
───────────────────────────────────────────── */

.rutas-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1.5px solid var(--brand-light);
  border-radius: var(--r);
  background: linear-gradient(120deg, #eff6ff, #ffffff);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.rutas-banner-icon { font-size: 26px; }
.rutas-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rutas-banner-text strong { font-size: 14px; color: var(--brand); }
.rutas-banner-text em { font-style: normal; font-size: 12px; color: var(--muted); }
.rutas-banner > i { color: var(--brand-light); }

.rutas-intro {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.ruta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.ruta-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
}
.ruta-emoji { font-size: 26px; }
.ruta-head-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ruta-nombre { font-size: 15px; font-weight: 800; color: var(--text); }
.ruta-avance { font-size: 12px; color: var(--muted); }
.ruta-pct {
  font-size: 14px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
}
.ruta-pct.mat  { color: var(--mat);  background: var(--mat-bg);  }
.ruta-pct.esp  { color: var(--esp);  background: var(--esp-bg);  }
.ruta-pct.cnat { color: var(--cnat); background: var(--cnat-bg); }
.ruta-pct.csoc { color: var(--csoc); background: var(--csoc-bg); }

.ruta-bar {
  height: 6px;
  margin: 0 14px 6px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
}
.ruta-bar-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.ruta-bar-fill.mat  { background: var(--mat);  }
.ruta-bar-fill.esp  { background: var(--esp);  }
.ruta-bar-fill.cnat { background: var(--cnat); }
.ruta-bar-fill.csoc { background: var(--csoc); }

.ruta-mapa { padding: 4px 14px 12px; }

.ruta-etapa {
  display: flex;
  align-items: stretch;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.re-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40px;
  flex-shrink: 0;
}
.re-line {
  width: 3px;
  flex: 1;
  min-height: 8px;
  background: var(--border);
}
.re-line.hide { background: transparent; }
.ruta-etapa.dominada .re-line { background: #86efac; }
.re-nodo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: var(--bg);
  border: 2.5px solid var(--border);
  flex-shrink: 0;
}
.ruta-etapa.dominada .re-nodo {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
  font-weight: 900;
}
.ruta-etapa.progreso .re-nodo {
  border-color: var(--accent);
  background: #fffbeb;
}
.ruta-etapa.pendiente .re-nodo { filter: grayscale(.35); }

.re-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  min-width: 0;
}
.ruta-etapa:last-child .re-info { border-bottom: none; }
.re-etapa {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--faint);
}
.re-title { font-size: 14px; font-weight: 700; color: var(--text); }
.re-chip {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 2px;
}
.re-chip.ok   { background: #dcfce7; color: #15803d; }
.re-chip.prog { background: #fef3c7; color: #b45309; }
.re-chip.pend { background: var(--bg); color: var(--muted); }
.re-chip.ok i { font-size: 10px; }
.re-arrow {
  align-self: center;
  color: var(--faint);
  font-size: 12px;
  padding-left: 4px;
}

/* ─────────────────────────────────────────────
   FASE 3 — Siguiente paso, insignias y diagnóstico
───────────────────────────────────────────── */

.paso-card {
  background: linear-gradient(135deg, var(--brand), var(--brand-mid));
  color: #fff;
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  padding: 16px;
  margin-bottom: 14px;
}
.paso-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .85;
  margin-bottom: 6px;
}
.paso-title { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.paso-razon { font-size: 13px; line-height: 1.5; opacity: .92; margin: 0 0 12px; }
.paso-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.94);
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.paso-btn-icon { font-size: 22px; }
.paso-btn-info { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.paso-btn-ruta { font-size: 11px; font-weight: 700; color: var(--muted); }
.paso-btn-title { font-size: 14px; font-weight: 800; }
.paso-btn > i { color: var(--brand-mid); }

.insignias-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.insignias-title { font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.insignias-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ins-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 15px;
}
.ins-chip em {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  color: #92400e;
}
.insignias-empty { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.ruta-ins { font-size: 15px; letter-spacing: 2px; }

.ruta-diag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 8px;
  flex-wrap: wrap;
}
.ruta-diag-btn {
  border: 1.5px dashed var(--brand-light);
  background: #eff6ff;
  color: var(--brand);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.ruta-diag-info { font-size: 12px; font-weight: 700; color: var(--muted); }

/* Modal de diagnóstico */
.diag-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 400;
}
.diag-modal {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 430px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 16px;
}
.diag-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.diag-ruta { font-size: 14px; font-weight: 800; }
.diag-close {
  border: none;
  background: var(--bg);
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
}
.diag-progress { font-size: 11.5px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.diag-bar { height: 5px; border-radius: 999px; background: var(--bg); margin: 6px 0 14px; overflow: hidden; }
.diag-bar-fill { height: 100%; background: var(--brand-mid); border-radius: 999px; transition: width .3s ease; }
.diag-q { font-size: 15.5px; font-weight: 700; line-height: 1.45; margin-bottom: 12px; }
.diag-opts { display: flex; flex-direction: column; gap: 8px; }
.diag-opt {
  border: 1.5px solid var(--border);
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 11px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}
.diag-opt:active { border-color: var(--brand-mid); background: #eff6ff; }
.diag-nota { margin: 12px 0 0; font-size: 11.5px; color: var(--faint); text-align: center; }

.diag-result { text-align: center; padding: 6px 4px 2px; }
.diag-result-emoji { font-size: 44px; margin-bottom: 6px; }
.diag-result-score { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.diag-result-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.diag-result-etapa { font-size: 17px; font-weight: 800; margin: 4px 0 12px; }
.diag-result-msg { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.diag-go {
  display: block;
  width: 100%;
  border: none;
  border-radius: var(--r-sm);
  background: var(--brand-mid);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  padding: 12px;
  cursor: pointer;
  margin-bottom: 8px;
}
.diag-later {
  display: block;
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px;
  cursor: pointer;
}

/* ─────────────────────────────────────────────
   CAMPEONÍSIMO v2 — torneo estilo TV
───────────────────────────────────────────── */

/* Menú principal de la herramienta */
.camp-home-last { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.camp-home-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.camp-home-card.ch-torneo   { border-left: 5px solid #f59e0b; }
.camp-home-card.ch-practica { border-left: 5px solid #10b981; }
.camp-home-card.ch-fama     { border-left: 5px solid #8b5cf6; }
.camp-home-card.ch-normas   { border-left: 5px solid #64748b; }
.camp-hc-icon { font-size: 28px; }
.camp-hc-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.camp-hc-info strong { font-size: 15px; }
.camp-hc-info em { font-style: normal; font-size: 12px; color: var(--muted); }
.camp-home-card > i { color: var(--faint); }

/* Modal de normas */
.camp-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 18px; z-index: 400;
}
.camp-modal {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  width: 100%; max-width: 460px;
  max-height: 86vh; overflow-y: auto;
  padding: 16px;
}
.camp-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 800; margin-bottom: 10px;
}
.camp-modal-close {
  border: none; background: var(--bg);
  width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; color: var(--muted);
}
.camp-normas-list { margin: 0 0 14px; padding-left: 18px; display: flex; flex-direction: column; gap: 9px; }
.camp-normas-list li { font-size: 13.5px; line-height: 1.5; }

/* Botones de configuración nuevos (mismo look que los timer) */
.camp-tema-btn, .camp-vuelta-btn, .camp-reb-btn, .camp-fin-btn, .camp-com-btn, .camp-pn-btn, .camp-var-btn {
  border: 1.5px solid var(--border);
  background: var(--bg);
  border-radius: 999px;
  padding: 8px 13px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}
.camp-tema-btn.active, .camp-vuelta-btn.active, .camp-reb-btn.active,
.camp-fin-btn.active, .camp-com-btn.active, .camp-pn-btn.active, .camp-var-btn.active {
  background: var(--brand-mid);
  border-color: var(--brand-mid);
  color: #fff;
}
.camp-tema-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.camp-cfg-hint { margin: 8px 0 6px; font-size: 12px; color: var(--muted); }
.camp-cfg-mini { font-size: 12.5px; font-weight: 700; color: var(--muted); align-self: center; }
.camp-lugar-input { width: 100%; }
.camp-ver-normas { width: 100%; margin-bottom: 10px; }

/* Intro de ronda */
.camp-ronda-intro {
  text-align: center;
  padding: 26px 16px;
  border-radius: var(--r);
  background: linear-gradient(160deg, #1e293b, #0f172a);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.camp-ri-num { font-size: 12px; font-weight: 900; letter-spacing: .35em; opacity: .7; }
.camp-ri-icon { font-size: 52px; margin: 8px 0; }
.camp-ri-nombre { font-size: 24px; font-weight: 900; margin: 0 0 8px; }
.camp-ri-desc { font-size: 13.5px; line-height: 1.55; opacity: .85; margin: 0 auto 14px; max-width: 340px; }
.camp-ri-datos { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.camp-ri-datos span {
  background: rgba(255,255,255,.12);
  border-radius: 999px; padding: 5px 12px;
  font-size: 12.5px; font-weight: 800;
}
.camp-ri-2 { background: linear-gradient(160deg, #92400e, #451a03); }
.camp-ri-3 { background: linear-gradient(160deg, #6d28d9, #1e1b4b); }
.camp-ri-muerte { background: linear-gradient(160deg, #991b1b, #450a0a); }
.camp-ri-clasif {
  background: rgba(255,255,255,.10);
  border-radius: var(--r-sm);
  padding: 10px 14px; margin: 0 auto 16px;
  max-width: 320px; text-align: left;
}
.camp-ri-clasif-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; opacity: .75; margin-bottom: 6px; }
.camp-ri-fin { font-size: 14px; padding: 3px 0; display: flex; align-items: center; gap: 7px; }
.camp-ri-elim { font-size: 11.5px; opacity: .7; margin: 8px 0 0; }

/* Banner de ronda y de turno */
.camp-ronda-banner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  background: #1e293b; color: #fff;
  font-size: 13.5px; font-weight: 800;
  margin-bottom: 10px;
}
.camp-rb-2 { background: #92400e; }
.camp-rb-3 { background: #6d28d9; }
.camp-rb-detalle { font-size: 12px; opacity: .8; }
.camp-turno-banner {
  display: flex; align-items: center; gap: 10px;
  border: 2px solid var(--gc);
  border-radius: var(--r);
  background: var(--surface);
  padding: 10px 14px;
  margin: 10px 0;
  box-shadow: var(--shadow);
}
.camp-tb-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.camp-tb-name { flex: 1; font-size: 16px; font-weight: 900; color: var(--gc); }
.camp-tb-com { font-size: 13px; font-weight: 800; }
.camp-turno-mini {
  display: flex; align-items: center; gap: 8px;
  border-left: 5px solid var(--gc);
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 13.5px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.camp-tm-pts { margin-left: auto; font-weight: 900; color: var(--gc); }

/* Marcador con barras */
.camp-score-barwrap { flex: 1; height: 7px; background: var(--bg); border-radius: 999px; overflow: hidden; margin: 0 8px; }
.camp-score-bar { height: 100%; border-radius: 999px; transition: width .5s ease; }
.camp-sr-turn { outline: 2px solid var(--brand-light); outline-offset: -2px; border-radius: 8px; }
.camp-sr-out { opacity: .45; filter: grayscale(.5); }

/* Ruleta v2 */
.camp-w2-wrap { position: relative; width: 268px; height: 268px; margin: 6px auto 4px; }
.camp-w2 {
  position: absolute; inset: 14px;
  border-radius: 50%;
  border: 6px solid #1e293b;
  box-shadow: 0 6px 24px rgba(15,23,42,.35), inset 0 0 0 3px rgba(255,255,255,.35);
  background: conic-gradient(
    #b45309 0deg 45deg,  #2563eb 45deg 90deg,  #0d9488 90deg 135deg,  #dc2626 135deg 180deg,
    #d97706 180deg 225deg, #3b82f6 225deg 270deg, #14b8a6 270deg 315deg, #ef4444 315deg 360deg
  );
}
.camp-w2-seg {
  position: absolute; left: 50%; top: 50%;
  font-size: 24px;
  text-shadow: 0 1px 3px rgba(0,0,0,.35);
  pointer-events: none;
}
.camp-w2-hub {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 58px; height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #e2e8f0);
  border: 4px solid #1e293b;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.camp-w2-lights { position: absolute; inset: 0; pointer-events: none; }
.camp-w2-bulb {
  position: absolute; left: 50%; top: 50%;
  width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 6px 1px rgba(251,191,36,.8);
  animation: campBulb 1.6s ease-in-out infinite;
}
.camp-w2-bulb:nth-child(odd) { animation-delay: .8s; }
.camp-w2-spinning .camp-w2-bulb { animation-duration: .35s; }
@keyframes campBulb {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}

/* Elección de tema */
.camp-elegir-panel { text-align: center; padding: 8px 0; }
.camp-elegir-label { font-size: 14px; font-weight: 800; margin: 6px 0 10px; }
.camp-elegir-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.camp-subj-pick {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 10px;
  border: none; border-radius: var(--r);
  font-family: inherit; font-size: 14px; font-weight: 800;
  color: #fff; cursor: pointer;
  box-shadow: var(--shadow-md);
}
.camp-sp-icon { font-size: 30px; }
.camp-sp-esp  { background: linear-gradient(150deg, #d97706, #92400e); }
.camp-sp-mat  { background: linear-gradient(150deg, #3b82f6, #1e40af); }
.camp-sp-cnat { background: linear-gradient(150deg, #14b8a6, #115e59); }
.camp-sp-csoc { background: linear-gradient(150deg, #ef4444, #991b1b); }
.camp-elegir-btn {
  display: block; margin: 10px auto 0;
  border: 2px dashed #8b5cf6;
  background: #faf5ff; color: #6d28d9;
  font-family: inherit; font-size: 13.5px; font-weight: 800;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
}

/* Veredicto del jurado */
.camp-veredicto { text-align: center; }
.camp-veredicto-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.camp-vd-ok, .camp-vd-no {
  border: none; border-radius: var(--r-sm);
  padding: 14px 10px;
  font-family: inherit; font-size: 14.5px; font-weight: 900;
  color: #fff; cursor: pointer;
  box-shadow: var(--shadow);
}
.camp-vd-ok { background: #16a34a; }
.camp-vd-no { background: #dc2626; }
.camp-vd-ok:disabled { background: #9ca3af; cursor: not-allowed; }

/* Apuesta final */
.camp-apuesta-screen { text-align: center; padding-bottom: 10px; }
.camp-ap-tema  { font-size: 14.5px; margin: 12px 0 2px; }
.camp-ap-saldo { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.camp-ap-monto {
  font-size: 54px; font-weight: 900;
  color: #6d28d9;
  text-shadow: 0 2px 0 rgba(109,40,217,.15);
  margin: 6px 0;
}
.camp-ap-controls { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
.camp-ap-btn {
  border: 1.5px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 9px 14px;
  font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer;
}
.camp-ap-todo {
  display: block; margin: 0 auto 12px;
  border: none; border-radius: 999px;
  background: linear-gradient(140deg, #f59e0b, #b45309);
  color: #fff; font-family: inherit; font-size: 14px; font-weight: 900;
  padding: 11px 20px; cursor: pointer;
  box-shadow: var(--shadow-md);
}
.camp-ap-regla { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }

/* Podio */
.camp-podio-screen { position: relative; text-align: center; overflow: hidden; padding-bottom: 8px; }
.camp-podio-title { font-size: 20px; font-weight: 900; margin: 8px 0 2px; }
.camp-podio-lugar { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.camp-podio { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 16px 0 14px; }
.camp-pd-col { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 96px; }
.camp-pd-mascota { font-size: 30px; }
.camp-pd-name { font-size: 12.5px; font-weight: 800; line-height: 1.2; }
.camp-pd-block {
  width: 100%; border-radius: 10px 10px 0 0;
  color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  box-shadow: var(--shadow-md);
}
.camp-pd-1 .camp-pd-block { height: 108px; }
.camp-pd-2 .camp-pd-block { height: 78px; }
.camp-pd-3 .camp-pd-block { height: 58px; }
.camp-pd-medal { font-size: 24px; }
.camp-pd-pts { font-size: 16px; font-weight: 900; }
.camp-podio-resto { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.camp-pr-row { padding: 2px 0; }
.camp-podio-ins {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 14px; text-align: left;
}
.camp-podio-ins-title { font-size: 13.5px; font-weight: 800; margin-bottom: 8px; }
.camp-pi-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; flex-wrap: wrap; }
.camp-pi-icon { font-size: 18px; }
.camp-pi-nombre { font-weight: 800; }
.camp-pi-grupo { color: var(--muted); }
.camp-pi-det { margin-left: auto; font-size: 11.5px; color: var(--faint); }
.camp-pi-nota { margin: 8px 0 0; font-size: 11.5px; color: var(--faint); text-align: center; }

/* Confeti */
.camp-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.camp-cf {
  position: absolute; top: -30px;
  animation: campCae 3.6s linear infinite;
}
@keyframes campCae {
  0%   { transform: translateY(-30px) rotate(0deg);   opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(560px) rotate(360deg); opacity: 0; }
}

/* Salón de la Fama */
.camp-fame-total { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13.5px; }
.camp-ft-grupo { font-weight: 800; }
.camp-ft-iconos { flex: 1; font-size: 15px; letter-spacing: 1px; }
.camp-ft-n {
  background: #fffbeb; border: 1px solid #fde68a;
  color: #92400e; font-weight: 900; font-size: 12px;
  border-radius: 999px; padding: 2px 9px;
}
.camp-fame-card { border-left: 4px solid #f59e0b; }
.camp-fame-head { display: flex; justify-content: space-between; align-items: center; }
.camp-fame-campeon { font-size: 14.5px; font-weight: 900; }
.camp-fame-fecha { font-size: 11.5px; color: var(--faint); }
.camp-fame-lugar { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.camp-fame-grupos { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.camp-fame-ins { margin-top: 6px; font-size: 16px; letter-spacing: 2px; }
.camp-fame-borrar { color: #b91c1c; }

/* Práctica */
.camp-pr-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 13px; font-weight: 800; }
.camp-pr-prog { color: var(--muted); flex: 1; }
.camp-pr-score { color: #15803d; }
.camp-pr-streak { color: #b45309; }
.camp-pr-fb { font-size: 15px; font-weight: 800; margin: 4px 0 10px; text-align: center; }
.camp-pr-fb.ok { color: #15803d; }
.camp-pr-fb.no { color: #b91c1c; }
.camp-pr-msg { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.camp-rep-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.camp-rep-row:last-child { border-bottom: none; }
.camp-rep-tema { flex: 1; font-size: 13px; font-weight: 700; }
.camp-rep-fallos { font-size: 11.5px; color: #b91c1c; font-weight: 700; }
.camp-rep-btn {
  border: none; background: var(--brand-mid); color: #fff;
  font-family: inherit; font-size: 12px; font-weight: 800;
  border-radius: 999px; padding: 6px 12px; cursor: pointer;
}

/* Banco dinámico del Campeonísimo */
.camp-bank-card { border-left: 5px solid var(--brand-mid); margin-top: 4px; }
.camp-bank-status { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 2px 0 10px; }
.camp-bank-btn {
  width: 100%; border: none; border-radius: var(--r-sm);
  background: var(--brand-mid); color: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 800;
  padding: 11px; cursor: pointer;
}
.camp-bank-btn:disabled { background: #9ca3af; }
.camp-bank-hint { font-size: 11.5px; color: var(--faint); margin: 8px 0 0; line-height: 1.45; }

/* Plan de Acción — padres, historial y sincronización */
.pa-pad-row { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 10px; background: var(--bg); }
.pa-pad-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pa-pad-num { font-weight: 900; font-size: 12.5px; color: var(--muted); }
.pa-pad-name { flex: 1; font-weight: 800; font-size: 13.5px; }
.pa-pad-env { font-size: 13px; }
.pa-pad-ta { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-family: inherit; font-size: 13px; line-height: 1.5; resize: vertical; background: var(--surface); color: var(--text); }
.pa-pad-actions { display: flex; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.pa-wa-btn { border: none; background: #16a34a; color: #fff; font-family: inherit; font-size: 12.5px; font-weight: 800; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.pa-copy-btn { border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); font-family: inherit; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.pa-sync-btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pa-sync-btns .pa-add-btn { flex: 1; }
.pa-sync-status { margin: 10px 0 0; font-size: 12.5px; font-weight: 700; color: var(--muted); line-height: 1.5; }
.pa-hist-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.pa-hist-row:last-child { border-bottom: none; }
.pa-hist-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pa-hist-titulo { font-size: 13px; font-weight: 800; }
.pa-hist-meta { font-size: 11.5px; color: var(--muted); }
.pa-hist-abrir { border: none; background: var(--brand-mid); color: #fff; font-family: inherit; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.pa-hist-borrar { border: none; background: transparent; font-size: 14px; cursor: pointer; padding: 4px; }

/* ── Campeonísimo: corrección del jurado y preguntas variadas (jul 2026) ── */
.camp-edit-hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 10px; line-height: 1.45; }
.camp-edit-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 9px; border: 1.5px solid var(--border); border-left: 5px solid var(--gc, var(--brand-mid));
  border-radius: 10px; margin-bottom: 7px; flex-wrap: wrap;
}
.camp-edit-name { font-size: 13.5px; font-weight: 800; }
.camp-edit-name small { font-weight: 600; color: var(--muted); }
.camp-edit-ctrl { display: flex; align-items: center; gap: 5px; }
.camp-edit-btn {
  border: 1.5px solid var(--border); background: var(--bg); color: var(--text);
  border-radius: 8px; padding: 5px 9px; font-family: inherit; font-size: 12.5px;
  font-weight: 800; cursor: pointer; min-width: 40px;
}
.camp-edit-btn:active { transform: scale(0.94); }
.camp-edit-pts {
  min-width: 44px; text-align: center; font-size: 16px; font-weight: 900;
  font-variant-numeric: tabular-nums; color: var(--gc, var(--text));
}
.camp-q-vf { display: block; margin-top: 8px; font-size: 0.92em; color: var(--brand-mid); font-weight: 700; }

/* ══════════════════════════════════════════════════════════════
   CAMPEONÍSIMO EN VIVO (jul 2026) — transmisión y respuestas 📡
══════════════════════════════════════════════════════════════ */
a.camp-home-card { text-decoration: none; color: inherit; }

.camp-vivo-bar {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #1a1240; color: #ffd54a;
  border-radius: var(--r-sm); padding: 7px 12px; margin-bottom: 10px;
  font-size: 13px; font-weight: 800; letter-spacing: .5px;
}
.camp-vivo-bar strong { font-size: 15px; letter-spacing: 3px; }

.camp-vivo-join {
  background: #1a1240; color: #fff;
  border-radius: var(--r-md); padding: 14px; margin: 12px 0;
  text-align: center;
}
.camp-vj-t { font-size: 12px; font-weight: 900; letter-spacing: 2px; color: #ffd54a; }
.camp-vj-code {
  font-size: 44px; font-weight: 900; letter-spacing: 8px;
  margin: 4px 0; font-family: 'Courier New', monospace; color: #fff;
}
.camp-vj-d { font-size: 12.5px; color: #b9b3e0; line-height: 1.5; margin: 0; }
.camp-vj-d strong { color: #ffd54a; }

.camp-vivo-resp {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  margin: 2px 0 8px;
}
.camp-vr-chip {
  background: var(--bg); border: 2px solid var(--gc, var(--border));
  border-radius: 999px; padding: 4px 12px;
  font-size: 12.5px; font-weight: 800;
}
.camp-vr-mano { font-size: 15px; }

.camp-vivo-sug {
  text-align: center; font-size: 14px; font-weight: 800;
  border-radius: var(--r-sm); padding: 8px 12px; margin-bottom: 8px;
}
.camp-vivo-sug.ok  { background: rgba(21,128,61,.12); color: #15803d; }
.camp-vivo-sug.mal { background: rgba(185,28,28,.10); color: #b91c1c; }

/* ── Clave secreta del docente oculta tras el candado ── */
.doc-clave-wrap { display: inline-flex; align-items: center; gap: 8px; }
.doc-ver-btn {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 999px; padding: 4px 10px;
  font-size: 12px; font-weight: 800; color: var(--brand);
  cursor: pointer;
}
.doc-ver-btn:active { transform: scale(.95); }
.doc-tipo-btn {
  flex: 1; padding: 8px; border-radius: var(--r-sm);
  border: 1.5px solid var(--border); background: var(--bg);
  font-size: 0.82rem; font-weight: 700; color: var(--muted); cursor: pointer;
}
.doc-tipo-btn.doc-tipo-sel { border-color: var(--brand); background: var(--brand); color: #fff; }

/* Fila de 3 campos (Forma · Parcial · Tipo) del Plan de Acción */
.pa-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ══════════════════════════════════════════════════════════════
   REGISTROS ADMINISTRATIVOS (jul 2026) — Economía · Asistencia · SACE
══════════════════════════════════════════════════════════════ */
.ad-tabs { margin: 12px 0; }
.ad-btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ad-btn-row .pa-generate-btn { flex: 1 1 auto; width: auto; margin: 0; }
.ad-btn-sec { background: var(--bg) !important; color: var(--brand) !important; border: 1.5px solid var(--border) !important; }
.ad-btn-peligro { color: #b91c1c !important; border-color: rgba(185,28,28,.35) !important; }

/* lista de alumnos */
.ad-al-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ad-al-num { flex: 0 0 44px; font-weight: 900; color: var(--brand); }
.ad-al-row .pa-inp-field { flex: 1; margin: 0; }
.ad-al-del {
  flex: 0 0 auto; background: none; border: none; cursor: pointer;
  color: #b91c1c; font-size: 15px; font-weight: 900; padding: 4px 8px;
}

/* chips táctiles (pagos y asistencia) */
.ad-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.ad-chip {
  min-width: 56px; padding: 10px 8px;
  background: var(--bg); border: 2px solid var(--border); border-radius: 12px;
  font-size: 14px; font-weight: 800; color: var(--text); cursor: pointer;
  transition: transform .1s;
}
.ad-chip:active { transform: scale(.93); }
.ad-chip-on  { background: rgba(22,163,74,.14); border-color: #16a34a; color: #15803d; }
.ad-chip-aus { background: rgba(185,28,28,.12); border-color: #dc2626; color: #b91c1c; }
.ad-chip-exc { background: rgba(217,119,6,.12); border-color: #d97706; color: #b45309; }

/* economía */
.ad-resumen {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  background: var(--bg); border-radius: var(--r-sm);
  padding: 10px 12px; margin-top: 8px; font-size: 13px;
}
.ad-ok  strong { color: #15803d; }
.ad-mal strong { color: #b91c1c; }
.ad-colecta-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 12px; margin-bottom: 8px; color: var(--text); font-size: 14px;
}
.ad-cr-txt small { color: var(--muted); }
.ad-cr-arrow { font-size: 20px; color: var(--muted); }
.ad-gasto-row {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px;
}
.ad-volver {
  background: none; border: none; cursor: pointer;
  color: var(--brand); font-size: 13px; font-weight: 800;
  padding: 0 0 8px; text-align: left;
}

/* tablas y notas SACE */
.ad-tabla { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.ad-tabla th, .ad-tabla td { border: 1px solid var(--border); padding: 5px 8px; text-align: left; }
.ad-tabla th { background: var(--bg); }
.ad-notas-grid { margin-top: 10px; }
.ad-nota-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ad-nota-nombre {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 13.5px;
}
.ad-nota-inp { flex: 0 0 84px; margin: 0 !important; text-align: center; font-weight: 800; }
