/*
Theme Name: RetoHoy
Theme URI: https://retohoy.com
Author: RetoHoy
Author URI: https://retohoy.com
Description: Tema oficial de RetoHoy — acertijos y desafíos diarios en español. Diseño tipo app según el prototipo aprobado: fondo crema cálido, tarjetas blancas redondeadas, cuenta atrás en vivo y navegación inferior en móvil.
Version: 2.2.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: retohoy
*/

/* ============================================================
   RetoHoy v2.1 — traducción fiel del prototipo aprobado
   (2026-10-17): paleta cálida del prototipo + identidad de
   marca RetoHoy (naranja → magenta → morado), tarjetas con
   radio 22px y sombras cálidas, tipografía Baloo 2 / Nunito.
   Se conservan TODAS las clases y comportamientos de v2.0.6
   (incluida la solución en <details> nativo de v2.0.6).
   ============================================================ */
:root {
  --reto-orange: #FF7A1A;
  --reto-brand-deep: #E85D04;
  --reto-brand-soft: #FFE3CC;
  --reto-pink: #DB2777;
  --reto-purple: #7C3AED;
  --reto-deep: #2B1B12;
  --reto-deep-2: #6E5B4C;
  --reto-ink: #2B1B12;
  --reto-muted: #6E5B4C;
  --reto-bg: #FFF6E9;
  --reto-bg-2: #FFEFD6;
  --reto-card: #FFFFFF;
  --reto-surface-2: #FFF1DE;
  --reto-line: #F3DCC0;
  --reto-soft: #FFF1DE;
  --reto-sun: #FFC53D;
  --reto-sun-soft: #FFF0C2;
  --reto-teal: #0FA3A3;
  --reto-teal-deep: #078080;
  --reto-teal-soft: #D9F5F2;
  --reto-coral: #FF5D6C;
  --reto-coral-soft: #FFE0E3;
  --reto-green: #1F9D5C;
  --reto-green-bg: #DCF6E7;
  --reto-red: #D92D20;
  --reto-grad: linear-gradient(120deg, #FF7A1A 0%, #DB2777 55%, #7C3AED 100%);
  --reto-radius: 22px;
  --reto-radius-sm: 16px;
  --reto-shadow: 0 10px 30px rgba(180, 90, 10, 0.14);
  --reto-shadow-sm: 0 4px 14px rgba(180, 90, 10, 0.12);
  --reto-font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --reto-font-head: "Baloo 2", "Nunito", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--reto-font);
  background:
    radial-gradient(600px 300px at 110% -60px, var(--reto-sun-soft), transparent 70%),
    radial-gradient(700px 340px at -10% 120px, var(--reto-teal-soft), transparent 70%),
    var(--reto-bg);
  color: var(--reto-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* Hueco para la navegación inferior fija (solo móvil). */
@media (max-width: 899px) {
  body { padding-bottom: 96px; }
}

h1, h2, h3, h4 {
  font-family: var(--reto-font-head);
  color: var(--reto-ink);
  line-height: 1.2;
}

img { max-width: 100%; height: auto; }

a { color: var(--reto-purple); text-decoration: none; }
a:hover { text-decoration: underline; }

input, textarea, select { font-size: 16px; max-width: 100%; }

.reto-wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 18px;
}

.reto-main { display: block; }

/* ---------- Header: barra superior clara estilo app ---------- */
.reto-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 246, 233, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--reto-line);
}
.reto-header-inner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 58px;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}
.reto-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--reto-ink);
  font-family: var(--reto-font-head);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: 0.2px;
  min-width: 0;
}
.reto-brand:hover { text-decoration: none; }
.reto-brand img {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(232, 93, 4, 0.3);
}
.reto-brand .custom-logo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  object-fit: cover;
  flex-shrink: 0;
}
.reto-brand-name { white-space: nowrap; }
.reto-brand-name b { color: var(--reto-brand-deep); font-weight: 800; }

/* Inline nav (desktop) */
.reto-nav { margin-left: auto; display: none; }
.reto-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.15rem;
}
.reto-nav a {
  color: var(--reto-ink);
  font-weight: 800;
  font-size: 0.98rem;
}
.reto-nav a:hover { text-decoration: none; color: var(--reto-brand-deep); }
@media (min-width: 900px) {
  .reto-nav { display: block; }
  .reto-burger { display: none !important; }
}

/* Píldora ES/EN — hoy solo ES; EN es el hueco del futuro selector. */
.reto-lang {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--reto-card);
  border: 1.5px solid var(--reto-line);
  border-radius: 999px;
  padding: 3px;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  box-shadow: var(--reto-shadow-sm);
}
@media (min-width: 900px) { .reto-lang { margin-left: 0; } }
.reto-lang-on {
  background: var(--reto-ink);
  color: var(--reto-bg);
  border-radius: 999px;
  padding: 0.14rem 0.6rem;
}
.reto-lang-off {
  color: var(--reto-muted);
  padding: 0.14rem 0.6rem;
}

/* Chips de la cabecera (puntos / usuario) */
.reto-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--reto-card);
  border: 1.5px solid var(--reto-line);
  border-radius: 999px;
  padding: 6px 13px;
  font-weight: 900;
  font-size: 0.92rem;
  box-shadow: var(--reto-shadow-sm);
  flex-shrink: 0;
}
.reto-chip-points { color: var(--reto-brand-deep); }
@media (max-width: 520px) { .reto-chip .reto-chip-lbl { display: none; } }

.reto-account { flex-shrink: 0; }
.reto-account a.reto-entrar {
  display: inline-block;
  background: var(--reto-ink);
  color: var(--reto-bg);
  font-family: var(--reto-font-head);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  white-space: nowrap;
}
.reto-account a.reto-entrar:hover { background: var(--reto-brand-deep); text-decoration: none; }
.reto-account a.reto-chip-user {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--reto-ink);
  font-weight: 800;
  font-size: 0.92rem;
  white-space: nowrap;
}
.reto-account a.reto-chip-user:hover { text-decoration: none; }
.reto-account a.reto-chip-user img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--reto-brand-soft);
}
@media (max-width: 420px) {
  .reto-account a.reto-chip-user .reto-chip-name { display: none; }
  .reto-brand { font-size: 1.25rem; }
  .reto-brand img, .reto-brand .custom-logo { width: 36px; height: 36px; }
}
/* Pantallas muy estrechas: la cabecera respira (marca + ES + Entrar + ☰). */
@media (max-width: 480px) {
  .reto-header-inner { gap: 0.45rem; }
  .reto-brand { font-size: 1.12rem; gap: 0.45rem; }
  .reto-brand img, .reto-brand .custom-logo { width: 32px; height: 32px; border-radius: 10px; }
  .reto-lang-off { display: none; }
  .reto-account a.reto-entrar { padding: 0.45rem 0.9rem; font-size: 0.9rem; }
}

/* Hamburger + dropdown panel */
.reto-burger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--reto-line);
  border-radius: 12px;
  background: var(--reto-card);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.reto-burger svg { width: 22px; height: 22px; stroke: var(--reto-ink); }
.reto-menu-panel {
  display: none;
  background: var(--reto-card);
  border-top: 1px solid var(--reto-line);
  box-shadow: var(--reto-shadow);
  padding: 0.6rem 0 1rem;
}
.reto-menu-panel.is-open { display: block; }
.reto-menu-panel a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--reto-ink);
  font-weight: 800;
  padding: 0.65rem 0.25rem;
  border-bottom: 1px solid var(--reto-line);
}
.reto-menu-panel a:last-child { border-bottom: 0; }
.reto-menu-panel a:hover { text-decoration: none; color: var(--reto-brand-deep); }
.reto-menu-panel .reto-menu-ico { width: 20px; height: 20px; display: inline-flex; }
.reto-menu-panel .reto-menu-ico svg { width: 20px; height: 20px; }

/* ---------- Franja de título (categorías / ranking / archivo) ---------- */
.reto-hero {
  padding: 1.5rem 0 0.3rem;
}
.reto-hero h1 {
  color: var(--reto-ink);
  margin: 0;
  font-size: 1.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.reto-hero h1 .reto-hero-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.reto-hero h1 .reto-hero-ico svg { width: 24px; height: 24px; }
.reto-hero p { margin: 0.35rem 0 0; color: var(--reto-muted); font-weight: 600; }

/* ---------- Héroe de portada (prototipo) ---------- */
.reto-hero-home { padding: 26px 0 4px; }
.reto-tagline-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--reto-card);
  border: 1.5px solid var(--reto-line);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 800;
  font-size: 0.88rem;
  box-shadow: var(--reto-shadow-sm);
}
.reto-hero-home h1 {
  font-size: clamp(1.9rem, 5.4vw, 3rem);
  line-height: 1.05;
  margin: 14px 0 8px;
  font-weight: 800;
}
.reto-hl {
  background: var(--reto-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.reto-hero-home > p {
  margin: 0;
  color: var(--reto-muted);
  font-size: 1.05rem;
  font-weight: 600;
  max-width: 56ch;
}
.reto-hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.reto-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 800;
  font-size: 0.88rem;
}
.reto-pill-sun { background: var(--reto-sun-soft); color: #8A6100; }
.reto-pill-teal { background: var(--reto-teal-soft); color: var(--reto-teal-deep); }
.reto-pill-coral { background: var(--reto-coral-soft); color: #C2432F; }
@media (max-width: 520px) {
  .reto-hero-home { padding: 14px 0 2px; }
  .reto-hero-home h1 { font-size: 1.62rem; }
  .reto-hero-home > p { font-size: 0.94rem; line-height: 1.4; }
  .reto-hero-meta { margin-top: 10px; gap: 7px; }
  .reto-pill { padding: 5px 11px; font-size: 0.8rem; }
  .reto-pill-coral { display: none; }
}

/* ---------- Disposición de portada: reto + columna lateral ---------- */
.reto-home-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 20px;
  margin-top: 22px;
  align-items: start;
}
@media (max-width: 880px) { .reto-home-grid { grid-template-columns: 1fr; margin-top: 14px; } }
.reto-home-grid .reto-card { margin: 0; }
.reto-home-side { display: grid; gap: 20px; }

/* ---------- Cards ---------- */
.reto-card {
  background: var(--reto-card);
  border: 1.5px solid var(--reto-line);
  border-radius: var(--reto-radius);
  box-shadow: var(--reto-shadow);
  padding: 1.4rem 1.25rem;
  margin: 1.1rem 0;
  overflow-wrap: break-word;
}

/* Títulos de sección con icono (prototipo) */
.reto-sec-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 1.25rem;
  font-weight: 800;
}
.reto-sec-ic {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.reto-ic-sun { background: var(--reto-sun-soft); }
.reto-ic-teal { background: var(--reto-teal-soft); }
.reto-ic-brand { background: var(--reto-brand-soft); }

/* ---------- Tarjeta jugable (portada + single) ---------- */
.reto-play-card {
  padding: 0;
  overflow: hidden;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
.reto-home-grid .reto-play-card { max-width: none; }
.reto-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 22px;
  background: var(--reto-brand-soft);
  border-bottom: 1.5px dashed var(--reto-line);
}
.reto-badge {
  display: inline-block;
  background: var(--reto-purple);
  color: #fff;
  font-family: var(--reto-font-head);
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 10px rgba(180, 90, 10, 0.22);
}
.reto-badge-hoy {
  background: var(--reto-orange);
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(232, 93, 4, 0.3);
}
.reto-badge-soft {
  background: var(--reto-surface-2);
  color: var(--reto-deep-2);
  box-shadow: none;
}
.reto-head-cat {
  font-weight: 900;
  color: var(--reto-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.reto-timer {
  margin-left: auto;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--reto-brand-deep);
  background: var(--reto-card);
  border: 1.5px solid var(--reto-line);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  white-space: nowrap;
}
.reto-play-body { padding: 22px; }
.reto-play-card h1, .reto-play-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.65rem;
  font-weight: 800;
}
.reto-play-card h1 a, .reto-play-card h2 a { color: var(--reto-ink); }
.reto-play-card h1 a:hover, .reto-play-card h2 a:hover { text-decoration: none; }
.reto-statement {
  font-family: var(--reto-font-head);
  font-weight: 600;
  font-size: clamp(1.22rem, 3.2vw, 1.55rem);
  line-height: 1.35;
  overflow-wrap: break-word;
}
.reto-statement p { margin: 0 0 0.6rem; }
/* La escena de los retos visuales, bien presentada en la tarjeta. */
.reto-statement img,
.reto-statement svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.5rem auto 0.9rem;
  border: 1.5px solid var(--reto-line);
  border-radius: 18px;
  box-shadow: var(--reto-shadow-sm);
  background: var(--reto-card);
}
.reto-statement figure { margin: 0.5rem 0 0.9rem; }
.reto-statement figcaption {
  font-family: var(--reto-font);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--reto-muted);
  text-align: center;
}

/* Answer checker */
.reto-check { margin-top: 1rem; }
.reto-check-row { display: flex; flex-direction: column; gap: 0.6rem; }
.reto-check input[type="text"] {
  width: 100%;
  font-family: var(--reto-font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--reto-ink);
  background: #fff;
  border: 2px solid var(--reto-line);
  border-radius: 14px;
  padding: 0.8rem 1rem;
}
.reto-check input[type="text"]:focus {
  outline: none;
  border-color: var(--reto-orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.22);
}
.reto-btn {
  display: inline-block;
  background: var(--reto-purple);
  color: #fff;
  font-family: var(--reto-font-head);
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.reto-btn:hover { filter: brightness(1.07); text-decoration: none; color: #fff; }
.reto-btn:active { transform: scale(0.97); }
.reto-btn-pink,
.reto-btn-brand {
  background: var(--reto-orange);
  color: #fff;
  box-shadow: 0 8px 18px rgba(232, 93, 4, 0.35);
  width: 100%;
}
.reto-btn-grad {
  background: var(--reto-grad);
  color: #fff;
  box-shadow: 0 10px 22px rgba(219, 39, 119, 0.28);
}
.reto-btn-dark { background: var(--reto-ink); color: var(--reto-bg); }
.reto-btn-dark:hover { color: var(--reto-bg); }
.reto-btn-ghost {
  background: var(--reto-card);
  color: var(--reto-ink);
  border: 2px solid var(--reto-line);
  box-shadow: none;
}
.reto-btn-ghost:hover { border-color: var(--reto-teal); color: var(--reto-teal-deep); }
.reto-check-feedback {
  display: none;
  margin-top: 0.7rem;
  border-radius: 14px;
  padding: 0.7rem 0.95rem;
  font-weight: 800;
}
.reto-check-feedback.is-ok {
  display: block;
  background: var(--reto-green-bg);
  color: #177245;
  border: 1.5px solid #A7E8C5;
}
.reto-check-feedback.is-bad {
  display: block;
  background: var(--reto-coral-soft);
  color: #C81E1E;
  border: 1.5px solid #F3B4B4;
}
.reto-check-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}
.reto-link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--reto-purple);
  text-decoration: underline;
  cursor: pointer;
}
.reto-wa-share {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--reto-purple);
  text-decoration: underline;
}
.reto-hint {
  display: none;
  margin-top: 0.6rem;
  background: var(--reto-sun-soft);
  border: 1.5px dashed var(--reto-sun);
  color: #7A5410;
  border-radius: 14px;
  padding: 0.6rem 0.9rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.reto-hint.is-shown { display: block; }
.reto-answer-box {
  background: var(--reto-brand-soft);
  border: 2px dashed var(--reto-orange);
  border-radius: 18px;
  padding: 1.1rem 1.25rem;
  margin-top: 1rem;
}
.reto-answer-box.is-hidden { display: none; }
.reto-answer-box p { margin: 0 0 0.5rem; }
.reto-answer-box p:last-child { margin-bottom: 0; }

/* v2.0.6 — la respuesta y la explicación viven en un <details>
   nativo cerrado por defecto hasta que el visitante toca
   "Ver la solución". NO volver a ocultar solo con CSS/JS. */
.reto-solucion { margin-top: 1rem; }
.reto-solucion summary {
  display: inline-block;
  background: var(--reto-card);
  color: var(--reto-ink);
  border: 2px solid var(--reto-line);
  font-family: var(--reto-font-head);
  font-weight: 800;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: 14px;
  cursor: pointer;
  list-style: none;
}
.reto-solucion summary::-webkit-details-marker { display: none; }
.reto-solucion summary:hover { border-color: var(--reto-orange); color: var(--reto-brand-deep); }
.reto-solucion .reto-answer-box { margin-top: 0.75rem; }

/* Confetti pieces (spawned by JS on a correct answer) */
.reto-confetti {
  position: fixed;
  width: 9px;
  height: 14px;
  top: -20px;
  z-index: 999;
  border-radius: 2px;
  pointer-events: none;
  animation: reto-fall linear forwards;
}
@keyframes reto-fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: 0.9; }
}

/* ---------- Tarjeta de racha con la semana (prototipo) ---------- */
.reto-streak-card { padding: 22px; }
.reto-streak-days { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; }
.reto-day { text-align: center; flex: 1; }
.reto-day .reto-bubble {
  width: 40px;
  height: 40px;
  margin: 0 auto 5px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.9rem;
  background: var(--reto-surface-2);
  border: 2px solid var(--reto-line);
  color: var(--reto-muted);
}
.reto-day.is-done .reto-bubble { background: var(--reto-sun); border-color: var(--reto-sun); color: #5C3D00; }
.reto-day.is-today .reto-bubble {
  background: var(--reto-orange);
  border-color: var(--reto-brand-deep);
  color: #fff;
  box-shadow: 0 0 0 4px var(--reto-brand-soft);
}
.reto-day > span {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--reto-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.reto-streak-msg { margin: 12px 0 0; color: var(--reto-muted); font-weight: 700; font-size: 0.92rem; }
.reto-streak-msg strong { color: var(--reto-ink); }

/* Columna lateral: tarjeta de ranking */
.reto-side-rank { padding: 22px; }
.reto-side-rank p { margin: 0 0 14px; color: var(--reto-muted); font-weight: 600; }
.reto-side-rank .reto-btn { width: 100%; }

/* Barra de progreso (nivel) — rayas de marca, como el prototipo */
.reto-progress-wrap { margin-top: 18px; }
.reto-progress-lbl {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--reto-muted);
  margin-bottom: 7px;
}
.reto-progress {
  height: 14px;
  border-radius: 999px;
  background: var(--reto-surface-2);
  border: 1.5px solid var(--reto-line);
  overflow: hidden;
}
.reto-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: repeating-linear-gradient(45deg, var(--reto-orange) 0 12px, var(--reto-brand-deep) 12px 24px);
  transition: width 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
}

/* ---------- Section titles ---------- */
.reto-section-title {
  font-size: 1.4rem;
  margin: 2.2rem 0 0.6rem;
  text-align: left;
}
.reto-section-sub { color: var(--reto-muted); margin: 0 0 1rem; font-weight: 600; }

/* ---------- Categorías: tarjetas blancas (prototipo) ---------- */
.reto-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
@media (max-width: 699px) {
  .reto-cats .reto-tile:nth-child(5) { grid-column: 1 / -1; }
}
@media (min-width: 700px) { .reto-cats { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1024px) { .reto-cats { grid-template-columns: repeat(5, 1fr); } }
.reto-tile {
  border-radius: var(--reto-radius);
  padding: 18px 16px;
  border: 1.5px solid var(--reto-line);
  background: var(--reto-card);
  box-shadow: var(--reto-shadow-sm);
  color: var(--reto-ink);
  display: block;
  min-width: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.reto-tile:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--reto-shadow); }
.reto-tile .reto-tile-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin-bottom: 10px;
}
.reto-tile .reto-tile-icon svg { width: 28px; height: 28px; }
.reto-tile h3 { color: var(--reto-ink); margin: 0 0 3px; font-size: 1.08rem; font-weight: 800; }
.reto-tile .reto-tile-desc { margin: 0; color: var(--reto-muted); font-weight: 700; font-size: 0.85rem; }
.reto-tile .reto-tile-tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 999px;
}

/* ---------- Puzzle grids + mini cards ---------- */
.reto-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
@media (min-width: 640px) {
  .reto-grid { grid-template-columns: 1fr 1fr; }
  .reto-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 960px) {
  .reto-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.reto-grid > article { min-width: 0; }
.reto-mini-card {
  display: block;
  background: var(--reto-card);
  border: 1.5px solid var(--reto-line);
  border-radius: 18px;
  box-shadow: var(--reto-shadow-sm);
  padding: 1.05rem 1.15rem;
  color: var(--reto-ink);
  height: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.reto-mini-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--reto-shadow);
}
.reto-mini-meta {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 0.3rem;
}
.reto-mini-card h3 { margin: 0 0 0.3rem; font-size: 1.08rem; }
.reto-mini-card p { margin: 0; color: var(--reto-muted); font-size: 0.92rem; font-weight: 600; }

/* ---------- Tomorrow strip ---------- */
.reto-tomorrow-strip {
  background: var(--reto-ink);
  color: var(--reto-bg);
  text-align: center;
  padding: 0.8rem 1rem;
}
.reto-tomorrow-strip p { margin: 0; font-size: 1rem; }
.reto-tomorrow-strip strong { font-weight: 800; }

/* ---------- Share + prev/next ---------- */
.reto-share { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.reto-share a {
  background: var(--reto-surface-2);
  color: var(--reto-deep-2);
  font-weight: 800;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  font-size: 0.9rem;
}
.reto-share a:hover { background: var(--reto-purple); color: #fff; text-decoration: none; }
.reto-share a.reto-share-wa { background: var(--reto-green-bg); color: #14713B; }
.reto-share a.reto-share-wa:hover { background: #2FBF71; color: #fff; }
.reto-pn { display: flex; justify-content: space-between; gap: 1rem; margin: 1.4rem 0; flex-wrap: wrap; }
.reto-pn a {
  background: var(--reto-card);
  border: 1.5px solid var(--reto-line);
  border-radius: var(--reto-radius-sm);
  box-shadow: var(--reto-shadow-sm);
  padding: 0.7rem 1rem;
  font-weight: 800;
  color: var(--reto-ink);
}

/* ---------- CTA band (degradado de marca) ---------- */
.reto-cta {
  background: var(--reto-grad);
  color: #fff;
  border-radius: var(--reto-radius);
  box-shadow: var(--reto-shadow);
  padding: 1.6rem 1.4rem;
  text-align: center;
  margin: 2rem 0;
}
.reto-cta h2 { margin: 0 0 0.4rem; color: #fff; }
.reto-cta p { margin: 0 0 1rem; font-weight: 600; }
.reto-cta .reto-btn { background: var(--reto-ink); color: var(--reto-bg); }
.reto-cta .reto-btn:hover { color: var(--reto-bg); }

/* ---------- Footer ---------- */
.reto-footer {
  background: var(--reto-ink);
  color: #E9DCC8;
  margin-top: 3rem;
  padding: 2rem 0 1.5rem;
}
.reto-footer a { color: #fff; }
.reto-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 700px) { .reto-footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.reto-footer h4 { color: #fff; margin: 0 0 0.75rem; }
.reto-footer ul { list-style: none; margin: 0; padding: 0; }
.reto-footer li { margin-bottom: 0.4rem; }
.reto-footer .reto-foot-ico { width: 18px; height: 18px; display: inline-flex; vertical-align: -3px; margin-right: 0.4rem; }
.reto-footer .reto-foot-ico svg { width: 18px; height: 18px; }
.reto-footer-bottom {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.85rem;
}

/* ---------- Navegación inferior (solo móvil, prototipo) ---------- */
.reto-bottomnav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  z-index: 50;
  display: flex;
  gap: 4px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1.5px solid var(--reto-line);
  border-radius: 999px;
  box-shadow: var(--reto-shadow);
  width: min(460px, calc(100% - 24px));
}
.reto-bottomnav a {
  flex: 1;
  color: var(--reto-muted);
  font-weight: 900;
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 9px 4px 7px;
  display: grid;
  gap: 2px;
  justify-items: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.reto-bottomnav a:hover { text-decoration: none; }
.reto-bottomnav a .reto-bn-ic { font-size: 1.25rem; line-height: 1; }
.reto-bottomnav a.is-active {
  background: var(--reto-orange);
  color: #fff;
  box-shadow: 0 6px 14px rgba(232, 93, 4, 0.35);
}
/* v2.2.5: la barra inferior se oculta al bajar y reaparece al subir (estilo YouTube). */
.reto-bottomnav { transition: transform 0.3s ease; }
.reto-bottomnav.is-hidden { transform: translateX(-50%) translateY(calc(100% + 28px)); }
@media (min-width: 900px) { .reto-bottomnav { display: none; } }

/* ---------- Misc ---------- */
.reto-404 { text-align: center; padding: 3rem 0; }
.reto-404 .reto-big { font-size: 4rem; font-family: var(--reto-font-head); font-weight: 800; color: var(--reto-brand-deep); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.reto-fullwidth .reto-wrap { max-width: 1280px; }
.navigation .nav-links { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.navigation .page-numbers {
  background: #fff;
  border: 1.5px solid var(--reto-line);
  border-radius: 0.7rem;
  padding: 0.4rem 0.8rem;
  font-weight: 800;
  color: var(--reto-ink);
}
.navigation .page-numbers.current { background: var(--reto-ink); color: #fff; border-color: var(--reto-ink); }

/* Comments (WordPress defaults, lightly themed) */
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { background: #fff; border: 1.5px solid var(--reto-line); border-radius: 1rem; padding: 1rem 1.1rem; margin-bottom: 0.8rem; }
.comment-reply-link { font-weight: 800; }
.comment-form input[type="text"], .comment-form input[type="email"],
.comment-form input[type="url"], .comment-form textarea {
  width: 100%;
  border: 2px solid var(--reto-line);
  border-radius: 0.8rem;
  padding: 0.7rem 0.9rem;
  font-family: var(--reto-font);
}
.comment-form input[type="submit"] {
  background: var(--reto-purple);
  color: #fff;
  border: 0;
  border-radius: 0.9rem;
  padding: 0.75rem 1.6rem;
  font-family: var(--reto-font-head);
  font-weight: 700;
  cursor: pointer;
}

/* Ranking plugin rows never overflow (kept from v1) */
@media (max-width: 700px) {
  .retohoy-ranking-item { min-width: 0; }
  .retohoy-ranking-medal { flex-shrink: 0; }
  .retohoy-ranking-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .retohoy-ranking-pts { flex-shrink: 0; white-space: nowrap; }
  .reto-card { padding: 1.2rem 1rem; }
  .reto-play-card { padding: 0; }
  .reto-play-body { padding: 17px; }
  .reto-head { padding: 12px 17px; }
  .reto-play-card h1, .reto-play-card h2 { font-size: 1.45rem; }
  .reto-streak-card, .reto-side-rank { padding: 17px; }
  .reto-footer li { margin-bottom: 0.15rem; }
  .reto-footer a { display: inline-block; padding: 0.4rem 0; }
}

/* Desktop checker row (de v2.0.3: gana los empates de cascada) */
@media (min-width: 721px) {
  .reto-check .reto-check-row { flex-direction: row; align-items: stretch; }
  .reto-check .reto-check-input { flex: 1 1 auto; width: auto; }
  .reto-check .reto-btn-pink { width: auto; flex: 0 0 auto; }
}

/* ============================================================
   Cuentas dentro del tema (v2.1): entrar / registrarse /
   recuperar contraseña / mi cuenta — marca RetoHoy completa
   (logo oficial, degradado naranja → magenta → morado,
   mismos radios, botones y sombras que el resto del tema).
   ============================================================ */
.reto-auth { max-width: 460px; margin: 1.6rem auto 0; }
.reto-auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--reto-font-head);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--reto-ink);
  margin-bottom: 1rem;
}
.reto-auth-brand img {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: 0 6px 14px rgba(232, 93, 4, 0.3);
}
.reto-auth-card { padding: 26px 24px; margin: 0; }
.reto-auth-card h1 { margin: 0 0 0.4rem; font-size: 1.7rem; font-weight: 800; text-align: center; }
.reto-auth-sub { margin: 0 0 1.1rem; color: var(--reto-muted); font-weight: 600; text-align: center; }
.reto-auth-perks {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 12px 16px;
  background: var(--reto-brand-soft);
  border-radius: var(--reto-radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
}
.reto-auth-perks li { margin: 0.3rem 0; }
.reto-auth-msg {
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font-weight: 800;
  margin: 0 0 1rem;
}
.reto-auth-msg-ok { background: var(--reto-green-bg); color: #177245; border: 1.5px solid #A7E8C5; }
.reto-auth-msg-error { background: var(--reto-coral-soft); color: #B42318; border: 1.5px solid #F3B4B4; }
.reto-auth-form .reto-auth-field { display: block; margin-bottom: 0.9rem; }
.reto-auth-form .reto-auth-field > span {
  display: block;
  font-weight: 800;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}
.reto-auth-form .reto-auth-field input {
  width: 100%;
  font-family: var(--reto-font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--reto-ink);
  background: #fff;
  border: 2px solid var(--reto-line);
  border-radius: 14px;
  padding: 0.8rem 1rem;
}
.reto-auth-form .reto-auth-field input:focus {
  outline: none;
  border-color: var(--reto-orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.22);
}
.reto-auth-form .reto-auth-field small {
  display: block;
  margin-top: 0.3rem;
  color: var(--reto-muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.reto-auth-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  margin: 0.2rem 0 1rem;
  cursor: pointer;
}
.reto-auth-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--reto-orange);
}
.reto-auth-submit { width: 100%; font-size: 1.08rem; padding: 0.9rem 1.7rem; }
.reto-auth-legal { font-size: 0.82rem; color: var(--reto-muted); text-align: center; margin: 0.9rem 0 0; font-weight: 600; }
.reto-auth-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
  font-weight: 800;
  font-size: 0.92rem;
}
.reto-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Mi cuenta */
.reto-cuenta-welcome { max-width: 960px; margin: 1.1rem auto 0; }
.reto-cuenta-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 1.1rem;
}
@media (max-width: 880px) { .reto-cuenta-grid { grid-template-columns: 1fr; } }
.reto-cuenta-grid .reto-card { margin: 0; }
.reto-cuenta-card { padding: 22px; }
.reto-cuenta-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.reto-cuenta-head img { border-radius: 50%; }
.reto-cuenta-head h1 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.reto-cuenta-head p { margin: 2px 0 0; color: var(--reto-muted); font-weight: 700; }
.reto-cuenta-head p strong { color: var(--reto-brand-deep); }
.reto-cuenta-top { font-weight: 800; margin: 14px 0 0; }
.reto-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.reto-stat {
  text-align: center;
  background: var(--reto-surface-2);
  border: 1.5px solid var(--reto-line);
  border-radius: var(--reto-radius-sm);
  padding: 16px 8px;
}
.reto-stat b { display: block; font-family: var(--reto-font-head); font-size: 1.45rem; font-weight: 800; line-height: 1.15; }
.reto-stat span { color: var(--reto-muted); font-weight: 800; font-size: 0.8rem; }
.reto-cuenta-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 18px; }
.reto-cuenta-actions .reto-btn { width: auto; }
.reto-levels { display: grid; gap: 10px; }
.reto-level {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 15px;
  border: 1.5px solid var(--reto-line);
  background: var(--reto-surface-2);
  font-weight: 800;
}
.reto-level .reto-level-medal { font-size: 1.3rem; }
.reto-level .reto-level-need { margin-left: auto; color: var(--reto-muted); font-size: 0.88rem; font-weight: 800; text-align: right; }
.reto-level.is-unlocked { background: var(--reto-green-bg); border-color: #2FBF71; }
.reto-level.is-current { background: var(--reto-brand-soft); border-color: var(--reto-orange); }
.reto-cuenta-note { color: var(--reto-muted); font-weight: 600; font-size: 0.92rem; margin: 14px 0 0; }

/* v2.0.5 — comments (restyled to the v2.1 palette) */
.reto-comments { max-width: 960px; margin: 1.8rem auto 0; }
.reto-comments-title {
  font-family: var(--reto-font-head);
  color: var(--reto-ink);
  font-size: 1.4rem;
  margin: 0 0 1rem;
}
.reto-comment-list { list-style: none; margin: 0; padding: 0; }
.reto-comment-list .children { list-style: none; margin: 0.9rem 0 0; padding-left: 1.3rem; }
.reto-comment-list .comment-body {
  background: var(--reto-card);
  border: 1.5px solid var(--reto-line);
  border-radius: var(--reto-radius);
  box-shadow: var(--reto-shadow);
  padding: 1.05rem 1.15rem;
  margin-bottom: 0.9rem;
  overflow-wrap: break-word;
}
.reto-comment-list .pingback .comment-body { padding: 0.6rem 1rem; box-shadow: none; }
.reto-comment-list .avatar { border-radius: 50%; vertical-align: middle; }
.reto-comment-list .comment-author .fn { color: var(--reto-ink); font-weight: 800; font-style: normal; }
.reto-comment-list .comment-author .fn a { color: var(--reto-ink); }
.reto-comment-list .comment-author .says { display: none; }
.reto-comment-list .comment-metadata { margin-top: 0.15rem; }
.reto-comment-list .comment-metadata a { color: var(--reto-muted); font-size: 0.82rem; font-weight: 600; }
.reto-comment-list .comment-content p { margin: 0.55rem 0 0; }
.reto-comment-list .reply { margin-top: 0.5rem; }
.reto-comment-list .comment-reply-link { color: var(--reto-purple); font-weight: 800; font-size: 0.9rem; }
.reto-comment-list .comment-awaiting-moderation,
.reto-moderation-note {
  display: block;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
  border-radius: 0.7rem;
  padding: 0.55rem 0.85rem;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0.6rem 0;
}
.reto-comments-nav { margin: 1.1rem 0 0.2rem; }
.reto-comments-nav .page-numbers {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  margin: 0 0.2rem 0.3rem 0;
  border: 1.5px solid var(--reto-line);
  border-radius: 0.7rem;
  background: #fff;
  color: var(--reto-purple);
  font-weight: 800;
}
.reto-comments-nav .page-numbers.current { background: var(--reto-purple); border-color: var(--reto-purple); color: #fff; }
.reto-comments .comment-respond {
  background: var(--reto-card);
  border: 1.5px solid var(--reto-line);
  border-radius: var(--reto-radius);
  box-shadow: var(--reto-shadow);
  padding: 1.2rem 1.15rem;
  margin-top: 1.2rem;
}
.reto-comments #reply-title { font-family: var(--reto-font-head); font-size: 1.2rem; color: var(--reto-ink); margin: 0 0 0.6rem; }
.reto-comments .comment-form label { display: block; font-weight: 700; color: var(--reto-ink); margin-bottom: 0.35rem; }
.reto-comments .logged-in-as, .reto-comments .comment-notes { color: var(--reto-muted); font-size: 0.9rem; }
.reto-comments .reto-check-input,
.reto-comments .comment-form input[type="text"],
.reto-comments .comment-form input[type="email"] {
  width: 100%;
  font-family: var(--reto-font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--reto-ink);
  background: #fff;
  border: 2px solid var(--reto-line);
  border-radius: 0.8rem;
  padding: 0.8rem 1rem;
}
.reto-comments textarea.reto-check-input { resize: vertical; }
.reto-comments .reto-check-input:focus,
.reto-comments .comment-form input[type="text"]:focus,
.reto-comments .comment-form input[type="email"]:focus {
  outline: none;
  border-color: var(--reto-orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.22);
}
.reto-comments .form-submit { margin-bottom: 0; }
.reto-comments-login {
  background: var(--reto-surface-2);
  border: 2px dashed var(--reto-orange);
  border-radius: var(--reto-radius);
  padding: 1.25rem 1.15rem;
  margin-top: 1.2rem;
  text-align: center;
}
.reto-comments-login p { margin: 0 0 0.8rem; font-weight: 700; color: var(--reto-ink); }
.reto-comments-login .reto-btn { width: auto; }
.reto-comments-closed { color: var(--reto-muted); font-weight: 600; margin-top: 1rem; }
@media (min-width: 721px) {
  .reto-comments .form-submit .reto-btn-pink { width: auto; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .reto-tile:hover, .reto-mini-card:hover { transform: none; }
}
