/* ═══════════════════════════════════════════════════════════════════
   PLACETA JUNIOR — Hoja de estilos de la página principal
   Mobile-first · Marca real PJ (P-J-U-N-I-O-R) · Fuentes locales
   Se carga DESPUÉS de styles.css (compartido reproductor/Studio).
   ═══════════════════════════════════════════════════════════════════ */

/* ── Fuentes locales ── */
@font-face {
  font-family: 'HandlyCasual';
  src: url('../fonts/handly_casual.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../fonts/plus_jakarta_regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../fonts/plus_jakarta_bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Paleta y tokens de marca ── */
:root {
  --pj-red: #FF3333;
  --pj-orange: #FF6600;
  --pj-yellow: #D6CE52;
  --pj-green: #336E45;
  --pj-blue: #3A00E1;
  --pj-purple: #4E3B70;
  --pj-ink: #111827;
  --pj-muted: #6B7280;
  --pj-bg: #F9FAFB;
  --pj-line: #ECEEF3;
  --font-head: 'HandlyCasual', 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  --r: 18px;
  --r-sm: 12px;
  --r-pill: 999px;
}

/* ── Base ── */
html { scroll-behavior: smooth; }
body.pj-home {
  margin: 0;
  font-family: var(--font-body);
  color: var(--pj-ink);
  background: var(--pj-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.pj-home * { box-sizing: border-box; }
.pj-home a { color: var(--pj-blue); }
.pj-home img { max-width: 100%; }
.pj-home .material-symbols-rounded { vertical-align: middle; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

/* ── Botones ── */
.pj-home .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-head);
  font-size: 16px;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.pj-home .btn:hover { transform: translateY(-2px); }
.pj-home .btn:active { transform: scale(.97); }
.pj-home .btn-primary { background: var(--pj-purple); color: #fff; }
.pj-home .btn-primary:hover { background: #3c2c58; box-shadow: 0 8px 20px rgba(78, 59, 112, .28); }
.pj-home .btn-orange { background: var(--pj-orange); color: #fff; }
.pj-home .btn-orange:hover { background: #e55a00; }
.pj-home .btn-outline { background: transparent; color: var(--pj-purple); border: 2px solid var(--pj-purple); }
.pj-home .btn-outline:hover { background: var(--pj-purple); color: #fff; }
.pj-home .btn-green { background: var(--pj-green); color: #fff; }

/* ── Barra de navegación ── */
.pj-home .nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #fff;
  border-bottom: 2px solid var(--pj-line);
}
.pj-home .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.pj-home .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.pj-home .brand img { height: 42px; width: auto; }
.pj-home .brand-name { font-family: var(--font-head); font-size: 24px; line-height: 1; letter-spacing: 1px; color: var(--pj-purple); }
.pj-home .nav-toggle { display: none; }
.pj-home .nav-toggle-btn { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.pj-home .nav-toggle-btn span { display: block; width: 26px; height: 3px; border-radius: 2px; background: var(--pj-purple); }
.pj-home .nav-links { display: flex; align-items: center; gap: 4px; }
.pj-home .nav-links a {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  color: var(--pj-muted);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  transition: background .15s, color .15s;
}
.pj-home .nav-links a:hover { background: var(--pj-bg); color: var(--pj-purple); }
.pj-home .nav-links a.active { background: var(--pj-purple); color: #fff; }
.pj-home .nav-cta { display: flex; align-items: center; gap: 8px; }
.pj-home .nav-cta .btn { padding: 9px 18px; font-size: 14px; }

@media (max-width: 880px) {
  .pj-home .nav-inner { flex-wrap: wrap; }
  .pj-home .nav-toggle-btn { display: flex; margin-left: auto; }
  .pj-home .nav-links {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 0 6px;
    border-top: 1px solid var(--pj-line);
  }
  .pj-home .nav-links a { text-align: center; padding: 12px; }
  .pj-home .nav-toggle:checked ~ .nav-inner .nav-links { display: flex; }
  .pj-home .nav-cta { margin-left: 0; }
}

/* ── Hero ── */
.pj-home .hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #F0ECFA 0%, #fff 70%);
  padding: 44px 20px 64px;
}
.pj-home .hero-shapes { position: absolute; inset: 0; pointer-events: none; }
.pj-home .hero-shapes .shape {
  position: absolute;
  width: 120px;
  height: 120px;
  opacity: .12;
  -webkit-mask: url('../img/forma.svg') no-repeat center / contain;
  mask: url('../img/forma.svg') no-repeat center / contain;
  background: currentColor;
  animation: pj-float 5s ease-in-out infinite;
}
.pj-home .hero-inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.pj-home .hero-logo { width: 120px; height: auto; }
@media (min-width: 640px) { .pj-home .hero-logo { width: 150px; } }
.pj-home .wordmark {
  font-family: var(--font-head);
  text-transform: uppercase;
  line-height: 1;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  letter-spacing: 1px;
  color: var(--pj-ink);
}
.pj-home .wordmark .w-placeta { margin-right: 8px; }
.pj-home .wordmark .w-junior { display: inline-flex; }
.pj-home .wordmark .c0 { color: var(--pj-red); }
.pj-home .wordmark .c1 { color: var(--pj-orange); }
.pj-home .wordmark .c2 { color: #b6a91f; }
.pj-home .wordmark .c3 { color: var(--pj-green); }
.pj-home .wordmark .c4 { color: var(--pj-blue); }
.pj-home .wordmark .c5 { color: var(--pj-purple); }
.pj-home .hero .wordmark { font-size: clamp(42px, 11vw, 92px); }
.pj-home .tagline { margin: 0; font-size: 17px; color: var(--pj-muted); font-weight: 500; }
.pj-home .cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.pj-home .cta-row .btn { font-size: 17px; padding: 14px 26px; }

/* ── Insignia de nivel (progreso local, como la app) ── */
.pj-home .nivel-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 2px solid var(--pj-purple);
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 13px;
  color: var(--pj-purple);
}
.pj-home .nivel-badge[hidden] { display: none; }
.pj-home .nivel-badge .nb-ico { color: var(--pj-orange); font-size: 18px; }
.pj-home .nivel-badge .nb-nivel { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .5px; }
.pj-home .nivel-badge .nb-bar { width: 64px; height: 8px; border-radius: 999px; background: #E5E7EB; overflow: hidden; }
.pj-home .nivel-badge .nb-fill { display: block; height: 100%; background: var(--pj-green); border-radius: 999px; }
.pj-home .nivel-badge .nb-sub { font-size: 11px; color: var(--pj-muted); }

/* ── Secciones ── */
.pj-home .section { max-width: 1200px; margin: 0 auto; padding: 30px 20px 10px; }
.pj-home .section-head { margin-bottom: 8px; }
.pj-home .section-head h2 {
  font-family: var(--font-head);
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pj-purple);
  margin: 0 0 4px;
}
.pj-home .section-head p { margin: 0; color: var(--pj-muted); font-size: 15px; }

.pj-home .cat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 21px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pj-ink);
  margin: 30px 0 16px;
}
.pj-home .cat-title::before { content: ''; width: 10px; height: 24px; border-radius: 4px; background: var(--pj-blue); }
.pj-home .cat-title .t-ico { font-size: 24px; color: var(--pj-blue); }

/* ── Filas horizontales (deslizar) ── */
.pj-home .h-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 270px);
  gap: 16px;
  overflow-x: auto;
  align-items: start;
  padding: 4px 2px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.pj-home .h-row::-webkit-scrollbar { height: 10px; }
.pj-home .h-row::-webkit-scrollbar-thumb { background: #d8d5de; border-radius: 8px; }
.pj-home .h-row::-webkit-scrollbar-track { background: transparent; }
.pj-home .cat-section { margin-bottom: 6px; }

/* ── Tarjetas de actividad ── */
.pj-home .card {
  --accent: var(--pj-purple);
  background: #fff;
  border: 2px solid var(--pj-line);
  border-radius: var(--r);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pj-home .card:hover { transform: translateY(-5px); box-shadow: 0 12px 26px rgba(17, 24, 39, .10); border-color: var(--accent); }
.pj-home .card[data-color="blue"] { --accent: var(--pj-blue); }
.pj-home .card[data-color="red"] { --accent: var(--pj-red); }
.pj-home .card[data-color="green"] { --accent: var(--pj-green); }
.pj-home .card[data-color="orange"] { --accent: var(--pj-orange); }
.pj-home .card[data-color="purple"] { --accent: var(--pj-purple); }
.pj-home .card[data-color="yellow"] { --accent: var(--pj-yellow); }

.pj-home .card-cover {
  position: relative;
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--accent);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pj-home .card h3 {
  font-family: var(--font-head);
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--pj-ink);
  margin: 2px 4px 0;
  min-height: 38px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pj-home .card .meta { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px 2px; }

.pj-home .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: rgba(78, 59, 112, .12);
  color: var(--pj-purple);
}
.pj-home .chip[data-color="blue"] { background: rgba(58, 0, 225, .10); color: var(--pj-blue); }
.pj-home .chip[data-color="red"] { background: rgba(255, 51, 51, .10); color: #d92b2b; }
.pj-home .chip[data-color="green"] { background: rgba(51, 110, 69, .12); color: var(--pj-green); }
.pj-home .chip[data-color="orange"] { background: rgba(255, 102, 0, .12); color: #e05a00; }
.pj-home .chip[data-color="purple"] { background: rgba(78, 59, 112, .12); color: var(--pj-purple); }
.pj-home .chip[data-color="yellow"] { background: rgba(214, 206, 82, .25); color: #8a7f10; }

/* Insignias y botones sobre la carátula */
.pj-home .badge-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  color: #fff;
}
.pj-home .badge-free { background: var(--pj-green); }
.pj-home .badge-premium { background: var(--pj-purple); }
.pj-home .badge-examen { background: var(--pj-orange); }
.pj-home .badge-tag .b-ico { font-size: 14px; }
.pj-home .cover-lock { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: rgba(17, 24, 39, .45); color: #fff; }
.pj-home .lock-ico { font-size: 40px; }
.pj-home .lock-txt { font-family: var(--font-head); font-size: 13px; }
.pj-home .cover-emoji {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 62px; text-shadow: 0 6px 16px rgba(0, 0, 0, .22); line-height: 1; pointer-events: none;
}
.pj-home .cover-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  color: var(--accent);
  border: none;
  border-radius: var(--r-pill);
  padding: 7px 14px;
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
  transition: transform .15s;
}
.pj-home .cover-play:hover { transform: scale(1.06); }
.pj-home .cover-play .material-symbols-rounded { font-size: 18px; }
.pj-home .info-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  border: none;
  background: rgba(255, 255, 255, .92);
  color: var(--pj-ink);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .15);
}
.pj-home .info-btn .material-symbols-rounded { font-size: 18px; }

/* Carga / vacío / errores */
.pj-home .loader {
  width: 46px;
  height: 46px;
  border: 5px solid #e6e3ec;
  border-top-color: var(--pj-purple);
  border-radius: 50%;
  animation: pj-spin .9s linear infinite;
  margin: 30px auto;
}
.pj-home .empty { text-align: center; color: var(--pj-muted); padding: 30px; font-size: 15px; }
.pj-home .error-banner {
  background: rgba(255, 51, 51, .08);
  color: #c22727;
  border: 2px solid rgba(255, 51, 51, .25);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-weight: 600;
}

/* ── Modales ── */
.pj-home .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 14px;
}
.pj-home .modal-overlay.hidden { display: none; }
.pj-home .modal {
  background: #fff;
  border-radius: 22px;
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.pj-home .modal h3 { font-family: var(--font-head); font-size: 26px; letter-spacing: 1px; text-transform: uppercase; color: var(--pj-purple); margin: 0 0 6px; }
.pj-home .modal .m-sub { color: var(--pj-muted); font-size: 14px; margin: 0 0 14px; }
.pj-home .m-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pj-home .info-cover { height: 150px; border-radius: 14px; background: #e6e3ec; background-size: cover; background-position: center; margin-bottom: 14px; }
.pj-home .info-title { font-family: var(--font-head); font-size: 28px; letter-spacing: 1px; text-transform: uppercase; color: var(--pj-ink); }
.pj-home .info-desc { color: var(--pj-muted); font-size: 14px; margin: 8px 0 12px; }
.pj-home .info-cover + .meta { margin-bottom: 14px; }

/* ── Footer ── */
.pj-home .footer { margin-top: 44px; background: #fff; border-top: 4px solid var(--pj-blue); }
.pj-home .footer-inner { max-width: 1200px; margin: 0 auto; padding: 30px 20px 20px; }
.pj-home .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; font-weight: 700; font-size: 15px; }
.pj-home .footer-links a { color: var(--pj-ink); text-decoration: none; transition: color .2s, transform .2s; }
.pj-home .footer-links a:hover { color: var(--pj-blue); transform: translateY(-1px); }
.pj-home .footer-copy { margin: 14px 0 0; text-align: center; color: var(--pj-muted); font-size: 13px; }

/* ── Animaciones ── */
@keyframes pj-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes pj-spin { to { transform: rotate(360deg); } }

/* ── Accesibilidad (superpone el botón flotante del panel) ── */
.pj-home #juniorAccBtn { z-index: 200; }

/* ═══════════════════════════════════════════════════════════════════
   PULIDO 2026 — calidad final (tarjetas, detalle, PDF A4, accesibilidad)
   ═══════════════════════════════════════════════════════════════════ */

/* HandlyCasual SIEMPRE extrabold y en mayúsculas */
.pj-home .brand-name,
.pj-home .wordmark,
.pj-home .btn,
.pj-home .section-head h2,
.pj-home .cat-title,
.pj-home .card h3,
.pj-home .cover-play,
.pj-home .footer-links {
  font-weight: 800;
}

/* Pie de tarjeta: chip + botón Jugar abajo a la derecha */
.pj-home .card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 2px;
  margin-top: auto;
}
.pj-home .cover-play {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent, var(--pj-purple));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
  transition: transform .15s, box-shadow .2s;
}
.pj-home .cover-play:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.pj-home .cover-play .material-symbols-rounded { font-size: 18px; }

/* Títulos de categoría: icono circular de color */
.pj-home .cat-title { font-size: 21px; margin: 30px 0 16px; }
.pj-home .cat-title .t-ico {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(78, 59, 112, .10);
  color: var(--pj-purple);
}
.pj-home .cat-title::before { background: var(--pj-purple); }
.pj-home .cat-title[data-color="blue"] .t-ico { background: rgba(58, 0, 225, .10); color: var(--pj-blue); }
.pj-home .cat-title[data-color="blue"]::before { background: var(--pj-blue); }
.pj-home .cat-title[data-color="red"] .t-ico { background: rgba(255, 51, 51, .10); color: var(--pj-red); }
.pj-home .cat-title[data-color="red"]::before { background: var(--pj-red); }
.pj-home .cat-title[data-color="green"] .t-ico { background: rgba(51, 110, 69, .10); color: var(--pj-green); }
.pj-home .cat-title[data-color="green"]::before { background: var(--pj-green); }
.pj-home .cat-title[data-color="orange"] .t-ico { background: rgba(255, 102, 0, .12); color: var(--pj-orange); }
.pj-home .cat-title[data-color="orange"]::before { background: var(--pj-orange); }
.pj-home .cat-title[data-color="purple"] .t-ico { background: rgba(78, 59, 112, .10); color: var(--pj-purple); }
.pj-home .cat-title[data-color="purple"]::before { background: var(--pj-purple); }
.pj-home .cat-title[data-color="yellow"] .t-ico { background: rgba(214, 206, 82, .22); color: #8a7f10; }
.pj-home .cat-title[data-color="yellow"]::before { background: var(--pj-yellow); }

/* Filtro por edad */
.pj-home .edad-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; align-items: center; }
.pj-home .edad-filter .ef-btn {
  border: 2px solid var(--pj-line); background: #fff; color: var(--pj-ink);
  border-radius: 999px; padding: 8px 16px; font-family: var(--font-body);
  font-weight: 700; font-size: 13px; cursor: pointer; transition: .15s;
}
.pj-home .edad-filter .ef-btn:hover { border-color: var(--pj-purple); color: var(--pj-purple); }
.pj-home .edad-filter .ef-btn.active { background: var(--pj-purple); border-color: var(--pj-purple); color: #fff; }
.pj-home .edad-filter .ef-count { margin-left: auto; font-size: 12.5px; color: var(--pj-muted); font-weight: 600; }

/* Página de detalle (a pantalla completa, no popup) */
.pj-home .detail-page { display: none; max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }
body.pj-home.mostrando-detalle .hero,
body.pj-home.mostrando-detalle .section#actividades { display: none; }
body.pj-home.mostrando-detalle .detail-page { display: block; }
.pj-home .detail-back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body); font-weight: 700; color: var(--pj-muted); text-decoration: none; margin-bottom: 16px; }
.pj-home .detail-back:hover { color: var(--pj-purple); }
.pj-home .detail-hero { position: relative; border-radius: 24px; overflow: hidden; box-shadow: 0 14px 40px rgba(17, 24, 39, .16); max-width: 880px; margin: 0 auto; }
.pj-home .detail-cover { width: 100%; aspect-ratio: 16 / 9; background: #e6e3ec; background-size: cover; background-position: center; }
.pj-home .detail-head { text-align: center; margin: 18px auto 0; max-width: 880px; }
.pj-home .detail-head .chip { margin-bottom: 8px; }
.pj-home .detail-head h1 { font-family: var(--font-head); font-weight: 800; font-size: clamp(24px, 4vw, 36px); text-transform: uppercase; letter-spacing: 1px; color: var(--pj-purple); margin: 0; }
.pj-home .detail-hero-overlay { position: absolute; inset: auto 0 0 0; padding: 70px 26px 22px; background: linear-gradient(to top, rgba(17, 24, 39, .85), transparent); color: #fff; }
.pj-home .detail-hero-overlay h1 { font-family: var(--font-head); font-weight: 800; font-size: clamp(26px, 4vw, 40px); text-transform: uppercase; letter-spacing: 1px; margin: 6px 0; }
.pj-home .detail-hero-overlay p { margin: 0; font-size: 15px; opacity: .95; }
.pj-home .detail-body { display: grid; gap: 22px; margin-top: 22px; }
.pj-home .detail-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 720px) { .pj-home .detail-stats { grid-template-columns: repeat(4, 1fr); } }
.pj-home .dstat { background: #fff; border: 2px solid var(--pj-line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.pj-home .dstat .material-symbols-rounded { font-size: 30px; color: var(--pj-purple); margin-bottom: 4px; }
.pj-home .dstat-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--pj-muted); }
.pj-home .dstat-val { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--pj-ink); text-transform: capitalize; }
.pj-home .detail-card { background: #fff; border: 2px solid var(--pj-line); border-radius: 20px; padding: 22px; }
.pj-home .detail-card h2 { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--pj-purple); margin: 0 0 8px; }
.pj-home .detail-card p { margin: 0; color: var(--pj-muted); font-size: 15px; line-height: 1.6; }
.pj-home .detail-reward { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(90deg, rgba(214, 206, 82, .3), rgba(78, 59, 112, .15)); }
.pj-home .detail-reward .material-symbols-rounded { font-size: 34px; color: var(--pj-purple); }
.pj-home .reward-lbl { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--pj-muted); }
.pj-home .reward-val { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--pj-ink); }
.pj-home .detail-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pj-home .btn-lg { padding: 15px 28px; font-size: 18px; }

/* Worksheet imprimible en PDF A4 (compacto para aprovechar las páginas) */
.print-worksheet { display: none; }
.print-worksheet .ws-head { text-align: center; border-bottom: 3px solid #4E3B70; padding-bottom: 8px; margin-bottom: 10px; page-break-inside: avoid; break-inside: avoid; }
.print-worksheet .ws-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 4px; }
.print-worksheet .ws-logo { height: 42px; }
.print-worksheet .ws-brand-name { font-family: 'HandlyCasual', sans-serif; font-size: 20px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: #4E3B70; }
.print-worksheet .ws-head h1 { font-family: 'HandlyCasual', sans-serif; font-size: 22px; text-transform: uppercase; letter-spacing: 1px; margin: 4px 0 2px; color: #4E3B70; }
.print-worksheet .ws-head p { margin: 0; font-size: 11px; color: #6B7280; }
.print-worksheet .ws-meta { border: 1px solid #d1d5db; border-radius: 8px; padding: 5px 10px; margin-bottom: 10px; font-size: 12px; page-break-inside: avoid; break-inside: avoid; }
.print-worksheet .ws-sec { margin-bottom: 10px; }
.print-worksheet .ws-sec h4 { font-family: 'HandlyCasual', sans-serif; font-size: 15px; text-transform: uppercase; color: #3A00E1; border-bottom: 2px solid #e5e7eb; padding-bottom: 3px; margin: 0 0 6px; }
.print-worksheet .ws-q, .print-worksheet .ws-line { margin-bottom: 6px; font-size: 13px; line-height: 1.4; page-break-inside: avoid; break-inside: avoid; }
.print-worksheet .ws-n { font-weight: 800; color: #4E3B70; }
.print-worksheet .ws-opts { margin: 3px 0 0 16px; font-size: 12px; color: #374151; }
.print-worksheet .ws-opt { display: inline-block; margin-right: 10px; }
.print-worksheet .ws-foot { margin-top: 12px; padding-top: 6px; border-top: 2px solid #e5e7eb; font-size: 11px; color: #9CA3AF; text-align: center; }
.print-worksheet .ws-words { font-size: 11px; color: #374151; margin: 3px 0 5px; text-align: center; }
.print-worksheet .ws-hint { font-size: 10px; color: #9CA3AF; text-align: center; margin: 3px 0 0; }
/* Secciones cohesionadas que no deben partirse entre páginas */
.print-worksheet .ws-sopa,
.print-worksheet .ws-rel,
.print-worksheet .ws-mapa,
.print-worksheet .ws-cover,
.print-worksheet .ws-map-wrap { page-break-inside: avoid; break-inside: avoid; }
.print-worksheet .ws-sopa { text-align: center; }
.print-worksheet .ws-grid { border-collapse: collapse; }
.print-worksheet .ws-grid td { font-family: 'Plus Jakarta Sans', sans-serif; }
.print-worksheet .ws-rel h4 { text-align: left; }
.print-worksheet .ws-cols { display: flex; gap: 24mm; justify-content: space-around; }
.print-worksheet .ws-col { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.print-worksheet .ws-item { border: 1.5px solid #9aa0aa; border-radius: 6px; padding: 4px 8px; text-align: center; font-size: 12px; font-weight: 700; min-height: 14px; page-break-inside: avoid; break-inside: avoid; }
.print-worksheet .ws-cover { max-width: 140mm; margin: 0 auto 10px; border-radius: 12px; overflow: hidden; border: 2px solid #e5e7eb; }
.print-worksheet .ws-cover img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.print-worksheet .ws-img { margin: 5px 0; max-width: 80mm; page-break-inside: avoid; break-inside: avoid; }
.print-worksheet .ws-img img { width: 100%; border-radius: 8px; border: 1px solid #e5e7eb; display: block; }
.print-worksheet .ws-fuente { display: block; font-size: 9px; font-style: italic; color: #9CA3AF; margin-top: 2px; }
.print-worksheet .ws-item-img { margin: 0 auto 5px; text-align: center; }
.print-worksheet .ws-item-img img { width: 100%; max-width: 34mm; height: auto; border-radius: 6px; border: 1px solid #e5e7eb; display: block; margin: 0 auto; }
.print-worksheet .ws-map-wrap { text-align: center; }
.print-worksheet .ws-map-wrap img { width: 100%; max-width: 175mm; height: auto; border: 1px solid #cbd5e1; border-radius: 8px; display: inline-block; }
.print-worksheet .ws-msg { border: 1.5px dashed #cbd5e1; border-radius: 8px; padding: 20px; color: #9CA3AF; font-size: 12px; text-align: center; }
/* Preguntas en dos columnas para aprovechar el papel */
.print-worksheet .ws-test { column-count: 2; column-gap: 8mm; }
.print-worksheet .ws-test h4 { column-span: all; }
.print-worksheet .ws-test .ws-q { -webkit-column-break-inside: avoid; break-inside: avoid; }
@media print {
  body * { visibility: hidden; }
  .print-worksheet, .print-worksheet * { visibility: visible; }
  .print-worksheet { display: block; position: absolute; left: 0; top: 0; width: 100%; }
  @page { size: A4; margin: 12mm; }
}

/* Menú de accesibilidad mejorado (colores de marca e iconos Material) */
.pj-home #juniorAccBtn {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 300;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--pj-purple);
  color: #fff;
  border: none;
  font-size: 26px;
  box-shadow: 0 8px 22px rgba(78, 59, 112, .45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s;
}
.pj-home #juniorAccBtn:hover { transform: scale(1.08) rotate(8deg); }
.pj-home #juniorAccPanel {
  position: fixed;
  bottom: 86px;
  right: 18px;
  z-index: 300;
  width: 244px;
  background: #fff;
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
  border: 2px solid #eceef3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pj-home #juniorAccPanel[hidden] { display: none; }
.pj-home .acc-head { font-family: var(--font-head); font-size: 16px; font-weight: 800; text-transform: uppercase; color: var(--pj-purple); text-align: center; margin-bottom: 4px; }
.pj-home .acc-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid #eceef3;
  background: #fff;
  color: #111827;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.pj-home .acc-toggle:hover { border-color: var(--pj-purple); transform: translateX(2px); }
.pj-home .acc-toggle.on { background: var(--pj-purple); color: #fff; border-color: var(--pj-purple); }
.pj-home .acc-toggle .acc-ico { font-size: 18px; }
.pj-home .acc-toggle.on .acc-ico { color: #fff; }

/* ═══ Barras superior e inferior LLENAS DE COLOR (marca) ═══ */
.pj-home .nav {
  background: var(--pj-purple);
  border-bottom: none;
  box-shadow: 0 4px 18px rgba(78, 59, 112, .28);
}
.pj-home .brand-name { color: #fff; }
.pj-home .nav-links { background: transparent; border: none; }
.pj-home .nav-links a { color: rgba(255, 255, 255, .92); }
.pj-home .nav-links a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.pj-home .nav-links a.active { background: #fff; color: var(--pj-purple); }
.pj-home .nav-toggle-btn span { background: #fff; }
.pj-home .nav-cta .btn-outline { color: #fff; border-color: #fff; }
.pj-home .nav-cta .btn-outline:hover { background: #fff; color: var(--pj-purple); }
.pj-home .nav-cta .btn-primary { background: var(--pj-yellow); color: #4E3B70; }
.pj-home .nav-cta .btn-primary:hover { background: #fff; color: var(--pj-purple); }

.pj-home .footer {
  background: var(--pj-purple);
  border-top: none;
  margin-top: 0;
}
.pj-home .footer-links a { color: rgba(255, 255, 255, .92); }
.pj-home .footer-links a:hover { color: var(--pj-yellow); }
.pj-home .footer-copy { color: rgba(255, 255, 255, .72); }

/* ═══ Tira arcoíris de marca (superior e inferior) + barras pulidas ═══ */
.pj-home .strip {
  height: 6px;
  background: linear-gradient(90deg, var(--pj-red), var(--pj-orange), var(--pj-yellow), var(--pj-green), var(--pj-blue), var(--pj-purple));
}
.pj-home .footer {
  position: relative;
}
.pj-home .footer::before {
  content: '';
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--pj-red), var(--pj-orange), var(--pj-yellow), var(--pj-green), var(--pj-blue), var(--pj-purple));
}
.pj-home .footer-wordmark {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  margin: 0 0 14px;
}

/* ═══ Página de JUEGO a pantalla completa (no popup) ═══ */
body.pj-home .game-page { display: none; max-width: 920px; margin: 0 auto; padding: 14px 14px 70px; }
body.pj-home.mostrando-juego .hero,
body.pj-home.mostrando-juego .section#actividades,
body.pj-home.mostrando-detalle .hero,
body.pj-home.mostrando-detalle .section#actividades { display: none; }
body.pj-home.mostrando-juego .game-page { display: block; }
body.pj-home.mostrando-juego .kp-top { border-radius: 16px 16px 0 0; }
body.pj-home.mostrando-juego .kp-nav-row { padding-bottom: 6px; }

/* ═══ Barra superior mejorada: gradiente, transparencia y animaciones ═══ */
.pj-home .nav {
  background: linear-gradient(90deg, #33215c, var(--pj-purple) 45%, #29194a);
  box-shadow: 0 4px 18px rgba(78, 59, 112, .30);
  transition: background .3s ease, box-shadow .3s ease;
}
.pj-home .nav.scrolled {
  background: rgba(78, 59, 112, .90);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 26px rgba(41, 25, 74, .40);
}
.pj-home .brand img { transition: transform .2s ease; }
.pj-home .brand:hover img { transform: scale(1.07) rotate(-3deg); }
.pj-home .brand-name { color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .30); }
.pj-home .nav-links a { position: relative; transition: transform .15s ease, background .15s ease, color .15s ease; }
.pj-home .nav-links a:hover { transform: translateY(-1px); }
.pj-home .nav-links a::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 5px;
  height: 3px; border-radius: 3px; background: var(--pj-yellow);
  transform: scaleX(0); transform-origin: left center; transition: transform .2s ease;
}
.pj-home .nav-links a:hover::after,
.pj-home .nav-links a.active::after { transform: scaleX(1); }
.pj-home .nav-cta .btn-primary {
  background: linear-gradient(90deg, var(--pj-yellow), #ffe27a);
  box-shadow: 0 6px 16px rgba(214, 206, 82, .45);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.pj-home .nav-cta .btn-primary:hover { transform: translateY(-1px) scale(1.03); }
.pj-home .nav-cta .btn-outline { transition: transform .15s ease, background .15s ease; }
.pj-home .nav-cta .btn-outline:hover { transform: translateY(-1px); }
.pj-home .nav-toggle:checked ~ .nav-inner .nav-toggle-btn { transform: rotate(90deg); }

/* ═══ Ajustes responsive de pulido ═══ */
@media (max-width: 880px) {
  .pj-home .nav-cta .btn { padding: 7px 12px; font-size: 13px; }
}
@media (max-width: 480px) {
  .pj-home .edad-filter .ef-btn { padding: 7px 12px; font-size: 12px; }
}
@media (max-width: 400px) {
  .pj-home .cta-row .btn { width: 100%; }
  .pj-home .detail-actions .btn-lg { width: 100%; }
}
