/* ═════════════════════════ Ikigai · estilos ═════════════════════════ */
:root {
  --fondo: #0B0A09;
  --sup: #121110;
  --sup2: #171513;
  --sup3: #1F1C19;
  --linea: #2A2622;
  --linea2: #3A342E;
  --tinta: #F2EDE4;
  --tinta2: #B0A89C;
  --tinta3: #8C8478;
  --oro: #C9A45C;
  --oro-claro: #E6C684;
  --oro-osc: #8E6F36;
  --verde: #3DD68C;
  --verde-osc: #23935C;
  --rojo: #F0644F;
  --rojo-osc: #A8392A;
  --c: var(--oro);
  --sombra: 0 14px 40px rgb(0 0 0 / .55);
  --f: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-marca: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --ancho: 480px;
  --nav-alto: 70px;
  --abajo: env(safe-area-inset-bottom, 0px);
  --arriba: env(safe-area-inset-top, 0px);
  --rebote: cubic-bezier(.34, 1.56, .64, 1);
  --suave: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--fondo); scroll-padding-top: 80px; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 70% 40% at 50% -8%, rgb(201 164 92 / .13), transparent 70%) no-repeat,
    var(--fondo);
  color: var(--tinta);
  font: 500 16px/1.5 var(--f);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
img, svg, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--oro-claro); }
h1, h2, h3, p, blockquote, figure { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
:focus-visible { outline: 3px solid var(--oro-claro); outline-offset: 3px; }
.sr {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

/* ───────────── Estructura ───────────── */
.app { max-width: var(--ancho); margin: 0 auto; min-height: 100dvh; position: relative; display: flex; flex-direction: column; }
.vista { flex: 1; padding: 6px 16px calc(var(--nav-alto) + 36px + var(--abajo)); outline: none; }
.vista.entrando { animation: entra .4s var(--suave) both; }
body[data-vista="leccion"] .vista,
body[data-vista="mision"] .vista,
body[data-vista="bienvenida"] .vista { padding-bottom: 0; }

@media (min-width: 560px) {
  body {
    background:
      radial-gradient(circle at 12% 18%, rgb(201 164 92 / .10), transparent 38%),
      radial-gradient(circle at 88% 82%, rgb(155 108 240 / .08), transparent 42%),
      radial-gradient(circle at 80% 10%, rgb(61 180 245 / .05), transparent 30%),
      #070606;
  }
  .app { background: var(--fondo); border-inline: 1px solid var(--linea); box-shadow: 0 0 90px rgb(0 0 0 / .65); }
}

.arranque { min-height: 90dvh; display: grid; place-content: center; justify-items: center; gap: 14px; font-weight: 900; letter-spacing: .04em; }
.arranque img { animation: gira 2.4s linear infinite; }

/* ───────────── Barra superior ───────────── */
.barra {
  position: sticky; top: 0; z-index: 50;
  padding: calc(8px + var(--arriba)) 16px 10px;
  background: linear-gradient(var(--fondo) 72%, rgb(11 10 9 / 0));
}
.barra-int { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stat {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  border-radius: 999px; background: var(--sup2); border: 1.5px solid var(--linea);
  font-weight: 900; font-size: 16px; text-decoration: none; color: var(--tinta);
  font-variant-numeric: tabular-nums; transition: border-color .2s, background .2s;
}
a.stat:hover, button.stat:hover { border-color: var(--linea2); background: var(--sup3); }
.stat.pop { animation: pop .55s var(--rebote); }
.stat-racha .llama { transform: scale(var(--escala-llama, 1)); transform-origin: 50% 90%; }
.stat-racha.encendida .llama { animation: parpadeoLlama 1.8s ease-in-out infinite; }
.stat-racha.encendida .stat-num { color: #FFA05A; }
.stat-racha:not(.encendida) .stat-num { color: var(--tinta2); }
.stat-oro .stat-num { color: var(--oro-claro); }
.stat-xp .stat-num { color: #FFE08A; }
.stat-nivel {
  padding: 0; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: conic-gradient(var(--oro-claro) calc(var(--pct, 0) * 1%), var(--linea) 0);
  display: grid; place-items: center;
}
.nivel-anillo { width: 38px; height: 38px; border-radius: 50%; background: var(--sup2); display: grid; place-items: center; }
.nivel-num { font-weight: 900; font-size: 17px; color: var(--oro-claro); }

/* ───────────── Navegación inferior ───────────── */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--ancho); z-index: 60;
  background: rgb(18 17 16 / .94); border-top: 1.5px solid var(--linea);
  padding-bottom: var(--abajo);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.nav ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0; padding: 6px 8px; list-style: none; }
.nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; border-radius: 16px; color: var(--tinta3); text-decoration: none;
  font-size: 12px; font-weight: 800; letter-spacing: .02em; position: relative; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--tinta); }
.nav a[aria-current="page"] { color: var(--oro-claro); background: rgb(201 164 92 / .1); }
.nav a[aria-current="page"] .ico { animation: navSalto .5s var(--rebote); }
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; top: -7px; width: 28px; height: 4px; border-radius: 0 0 4px 4px; background: var(--oro);
}

/* ───────────── Botones ───────────── */
.btn {
  --b: var(--oro); --b-osc: var(--oro-osc); --b-txt: #0B0A09;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 16px;
  background: var(--b); color: var(--b-txt); border: 0;
  font-weight: 900; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; text-align: center;
  box-shadow: 0 4px 0 var(--b-osc);
  transition: transform .09s ease, box-shadow .09s ease, filter .2s, background .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:hover { filter: brightness(1.07); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--b-osc); }
.btn:disabled { --b: var(--sup3); --b-osc: #110F0D; --b-txt: #6F675D; cursor: not-allowed; filter: none; }
.btn-sec { --b: var(--sup2); --b-osc: var(--linea); --b-txt: var(--tinta); border: 2px solid var(--linea); }
.btn-verde { --b: var(--verde); --b-osc: var(--verde-osc); }
.btn-rojo, .btn-peligro { --b: var(--rojo); --b-osc: var(--rojo-osc); }
.btn-peligro-sec { --b: transparent; --b-osc: transparent; --b-txt: #FF9A8A; border: 2px solid rgb(240 100 79 / .45); box-shadow: none; }
.btn-camino { --b: var(--c); --b-osc: color-mix(in srgb, var(--c) 55%, #000); }
.btn-ancho { width: 100%; }
.btn-peq { min-height: 44px; padding: 0 16px; font-size: 13px; border-radius: 13px; box-shadow: 0 3px 0 var(--b-osc); flex: none; }
.btn-peq:active:not(:disabled) { transform: translateY(3px); }
.btn-grande { min-height: 62px; font-size: 17px; border-radius: 18px; }
.btn-mitad { flex: 1 1 0; }
.btn-precio { min-height: 44px; padding: 0 14px; font-size: 15px; letter-spacing: 0; flex: none; }
.btn-texto {
  min-height: 44px; padding: 0 12px; color: var(--tinta2); font-weight: 700; font-size: 15px;
  text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-texto:hover { color: var(--tinta); }
.btn-texto-peligro { color: #FF9A8A; justify-content: flex-start; padding: 0; }
.btn-icono { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--tinta2); flex: none; text-decoration: none; transition: background .2s, color .2s; }
.btn-icono:hover { background: var(--sup2); color: var(--tinta); }
.btn-icono-peq { color: var(--tinta3); }
.btn-icono-hueco { width: 44px; flex: none; }

/* ───────────── Formularios ───────────── */
.campo { display: grid; gap: 8px; margin-bottom: 18px; }
.campo-etq { font-weight: 800; font-size: 14px; color: var(--tinta2); letter-spacing: .02em; }
.campo-extra { color: var(--oro-claro); font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgb(201 164 92 / .14); margin-left: 6px; }
.entrada {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px;
  background: var(--sup2); border: 2px solid var(--linea); color: var(--tinta);
  font-size: 17px; font-weight: 600; transition: border-color .2s, box-shadow .2s;
}
.entrada::placeholder { color: var(--tinta3); }
.entrada:focus { outline: none; border-color: var(--oro); box-shadow: 0 0 0 4px rgb(201 164 92 / .2); }
.entrada-grande { font-size: 22px; min-height: 62px; text-align: center; font-weight: 800; }
.entrada-hora { letter-spacing: .04em; }
.entrada-hora-peq { width: auto; min-height: 48px; font-size: 17px; padding: 8px 12px; }
textarea.entrada { resize: vertical; min-height: 112px; line-height: 1.45; font-weight: 500; }
.campo-pass { position: relative; display: block; }
.campo-pass .entrada { padding-right: 54px; }
.ver-pass { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; color: var(--tinta2); border-radius: 10px; }
.ver-pass[aria-pressed="true"] { color: var(--oro-claro); }

.check { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; cursor: pointer; font-weight: 600; line-height: 1.4; min-height: 44px; position: relative; }
.check input { position: absolute; opacity: 0; width: 28px; height: 28px; margin: 0; left: 0; top: 10px; }
.check-caja {
  flex: none; width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--linea2); background: var(--sup2);
  display: grid; place-items: center; color: transparent; transition: background .2s, border-color .2s;
}
.check input:checked + .check-caja { background: var(--oro); border-color: var(--oro); color: #0B0A09; animation: pop .35s var(--rebote); }
.check input:focus-visible + .check-caja { outline: 3px solid var(--oro-claro); outline-offset: 2px; }
.check input:disabled + .check-caja { opacity: .4; }
.check input:disabled ~ span:last-child { color: var(--tinta3); }
.check a { font-weight: 800; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--sup2); border: 2px solid var(--linea);
  font-weight: 800; font-size: 14px; color: var(--tinta); display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 3px 0 var(--linea); transition: transform .08s, box-shadow .08s, background .15s, border-color .15s;
}
.chip:active { transform: translateY(3px); box-shadow: 0 0 0 var(--linea); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: rgb(201 164 92 / .16); border-color: var(--oro); color: var(--oro-claro); box-shadow: 0 3px 0 var(--oro-osc); }
.chip-camino[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 18%, var(--sup2)); border-color: var(--c); color: var(--tinta); box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 50%, #000); }
.chips + .nota { margin-top: 14px; }
.chips-grandes .chip { min-height: 54px; font-size: 16.5px; padding: 0 18px; border-radius: 14px; }

.error { color: #FF9A8A; font-weight: 700; background: rgb(240 100 79 / .1); border: 1.5px solid rgb(240 100 79 / .35); padding: 10px 14px; border-radius: 12px; margin: 8px 0; font-size: 14.5px; }
.nota { font-size: 13.5px; color: var(--tinta2); line-height: 1.45; font-weight: 500; }
.nota-centro { text-align: center; }
.pre { font-size: 13px; font-weight: 800; color: var(--c); letter-spacing: .03em; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.girando { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--linea2); border-top-color: var(--oro); animation: gira .8s linear infinite; display: inline-block; flex: none; }
.firma { font-family: var(--f-marca); font-style: italic; font-weight: 500; color: var(--oro-claro); text-align: center; font-size: 20px; margin: 26px 0 10px; }
.marca-cursiva { font-family: var(--f-marca); font-style: italic; color: var(--oro-claro); font-weight: 600; font-size: 1.12em; }

/* ───────────── Bocadillos ───────────── */
.burbuja {
  position: relative; background: var(--sup2); border: 2px solid var(--linea2); border-radius: 18px;
  padding: 12px 16px; font-weight: 700; font-size: 16px; line-height: 1.4; min-height: 50px; color: var(--tinta);
}
.burbuja-centro { text-align: center; animation: entra .4s var(--suave) both; }
.burbuja-centro::before, .burbuja-centro::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 10px solid transparent; }
.burbuja-centro::before { top: -21px; border-bottom-color: var(--linea2); }
.burbuja-centro::after { top: -17px; border-bottom-color: var(--sup2); }
.burbuja-2::before, .burbuja-2::after { display: none; }
.burbuja-lado { flex: 1; }
.burbuja-lado::before, .burbuja-lado::after { content: ""; position: absolute; top: 50%; transform: translateY(-50%); border: 10px solid transparent; }
.burbuja-lado::before { left: -21px; border-right-color: var(--linea2); }
.burbuja-lado::after { left: -17px; border-right-color: var(--sup2); }

/* ───────────── Kai ───────────── */
.iki { overflow: visible; width: 100%; height: auto; }
.iki .iki-cuerpo { transform-box: view-box; transform-origin: 50px 104px; }
.iki .iki-sombra { transform-box: fill-box; transform-origin: center; }
.iki-ojo { transform-box: fill-box; transform-origin: center; animation: parpadeo 5.2s infinite; }
.iki-respira .iki-cuerpo { animation: respira 3.4s ease-in-out infinite; }
.iki-salta .iki-cuerpo { animation: salta 1.15s cubic-bezier(.3, .7, .4, 1) infinite; }
.iki-salta .iki-sombra { animation: sombraSalta 1.15s cubic-bezier(.3, .7, .4, 1) infinite; }
.iki-brazo-i.arriba { transform-box: view-box; transform-origin: 9px 42px; animation: saludaI .45s ease-in-out infinite alternate; }
.iki-brazo-d.arriba { transform-box: view-box; transform-origin: 91px 42px; animation: saludaD .45s ease-in-out infinite alternate; }
.iki-chispas { animation: chispas 1.3s ease-in-out infinite; }
.iki-lagrima { animation: lagrima 2.6s ease-in infinite; }
.iki-idea circle { animation: idea 1.8s ease-in-out infinite; }
.iki-idea circle:nth-child(2) { animation-delay: .2s; }
.iki-idea circle:nth-child(3) { animation-delay: .4s; }

/* ───────────── Avatares y marcos ───────────── */
.avatar {
  --tam: 44px; --borde: max(2px, calc(var(--tam) * .055));
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--tam); height: var(--tam); border-radius: 50%; padding: var(--borde); isolation: isolate;
}
.avatar::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--linea2); z-index: -1; }
.avatar-svg { width: 100%; height: 100%; border-radius: 50%; }
.avatar[data-marco="marco-oro"] { padding: calc(var(--borde) * 1.7); }
.avatar[data-marco="marco-oro"]::before { background: conic-gradient(from 210deg, #F6DE9C, #C9A45C, #8E6F36, #E6C684, #FFF1C4, #C9A45C, #F6DE9C); }
.avatar[data-marco="marco-fuego"] { padding: calc(var(--borde) * 1.7); }
.avatar[data-marco="marco-fuego"]::before { background: conic-gradient(#FF6A2B, #F5B83D, #FF3D2B, #FFD27A, #FF6A2B, #F5B83D, #FF3D2B); animation: gira 2.6s linear infinite; box-shadow: 0 0 16px rgb(255 106 43 / .55); }
.avatar[data-marco="marco-fuego"]::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; background: radial-gradient(circle, transparent 58%, rgb(255 122 47 / .35) 70%, transparent 74%); animation: latidoLuz 1.4s ease-in-out infinite; z-index: -2; }
.avatar[data-marco="marco-yinyang"] { padding: calc(var(--borde) * 1.8); }
.avatar[data-marco="marco-yinyang"]::before { background: conic-gradient(#0B0A09 0 50%, #C9A45C 50% 100%); box-shadow: 0 0 0 2px var(--oro); animation: gira 7s linear infinite; }

/* ───────────── Bienvenida ───────────── */
body[data-vista="bienvenida"] .vista { padding-top: 0; }
.bienv { min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: calc(16px + var(--abajo)); }
.bienv-intro { align-items: center; text-align: center; gap: 14px; padding-top: calc(22px + var(--arriba)); }
.bienv-intro .bienv-escena { margin-top: auto; }
.bienv-marca { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 18px; letter-spacing: .03em; }
.bienv-escena { position: relative; width: 230px; height: 220px; display: grid; place-items: center; margin-top: 6px; }
.bienv-halo { position: absolute; inset: -10px; border-radius: 50%; background: radial-gradient(circle, rgb(201 164 92 / .34), transparent 64%); animation: halo 3.2s ease-in-out infinite; }
.bienv-iki-grande { width: 186px; position: relative; }
.bienv-burbujas { display: grid; gap: 12px; width: 100%; max-width: 380px; min-height: 140px; align-content: start; margin-top: 6px; }
.lema { font-family: var(--f-marca); font-style: italic; font-size: 22px; color: var(--oro-claro); line-height: 1.3; max-width: 330px; }
.bienv-pie { display: grid; gap: 6px; width: 100%; margin-top: auto; padding-top: 18px; }
.bienv-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--arriba)) 0 6px; }
.bienv-iki-fila { display: flex; align-items: center; gap: 22px; margin: 12px 0 24px; }
.bienv-iki-fila .iki { width: 92px; flex: none; }
.bienv-cuerpo { flex: 1; }
.paso-entra .bienv-cuerpo, .paso-entra .bienv-iki-fila { animation: entra .4s var(--suave) both; }
.paso-entra .bienv-cuerpo { animation-delay: .06s; }
.avatares { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.avatar-opcion {
  display: grid; justify-items: center; gap: 6px; padding: 10px 2px; border-radius: 18px; background: var(--sup2);
  border: 2px solid var(--linea); box-shadow: 0 4px 0 var(--linea); transition: transform .1s, box-shadow .1s, border-color .15s;
}
.avatar-opcion:active { transform: translateY(4px); box-shadow: 0 0 0 var(--linea); }
.avatar-opcion[aria-checked="true"] { border-color: var(--oro); background: rgb(201 164 92 / .12); box-shadow: 0 4px 0 var(--oro-osc); }
.avatar-opcion[aria-checked="true"] .avatar { animation: pop .45s var(--rebote); }
.avatar-nombre { font-size: 12px; font-weight: 800; color: var(--tinta2); }
.avatares-dialogo { margin: 4px 0; }
.resumen { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: var(--sup2); border: 1.5px solid var(--linea); margin-bottom: 18px; }
.resumen div { display: grid; gap: 2px; }
.resumen strong { font-size: 20px; font-weight: 900; }
.resumen span { color: var(--tinta2); font-size: 14px; font-weight: 600; }

/* ───────────── Barras de progreso ───────────── */
.barra-prog { flex: 1; height: 16px; border-radius: 999px; background: var(--sup3); overflow: hidden; }
.barra-prog > span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--oro), var(--oro-claro)); position: relative; transition: width .55s var(--suave); }
.barra-prog > span::after { content: ""; position: absolute; left: 8px; right: 8px; top: 3px; height: 4px; border-radius: 4px; background: rgb(255 255 255 / .35); }
.barra-prog-camino > span { background: var(--c); }

/* ───────────── Inicio ───────────── */
.saludo { padding: 4px 0 14px; }
.saludo-hola { font-size: 30px; font-weight: 900; letter-spacing: -.01em; line-height: 1.1; }
.saludo-nombre { font-size: 16px; font-weight: 600; color: var(--tinta2); margin-top: 6px; line-height: 1.4; }
.saludo-nombre span { color: var(--oro-claro); font-weight: 800; }
.avisos { display: grid; gap: 10px; margin-bottom: 14px; }
.avisos:empty { display: none; }
.aviso {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 8px; border-radius: 20px;
  background: var(--sup2); border: 1.5px solid var(--linea); text-decoration: none; color: var(--tinta);
  animation: entra .5s var(--suave) both;
}
.aviso + .aviso { animation-delay: .1s; }
.aviso-iki { width: 56px; height: 56px; flex: none; }
.aviso-txt { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13.5px; line-height: 1.35; }
.aviso-txt strong { font-size: 15px; font-weight: 900; }
.aviso-txt span { color: var(--tinta2); font-weight: 600; }
.aviso-oro { border-color: rgb(201 164 92 / .55); background: linear-gradient(135deg, rgb(201 164 92 / .16), var(--sup2) 70%); }
.aviso-rojo { border-color: rgb(240 100 79 / .5); background: linear-gradient(135deg, rgb(240 100 79 / .14), var(--sup2) 70%); }
.aviso-crono { border-color: var(--oro); padding-left: 12px; }
.aviso-crono-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--oro); color: #0B0A09; animation: latido 1.6s ease-in-out infinite; flex: none; }
.aviso-crono strong { font-variant-numeric: tabular-nums; font-size: 18px; }

.tabs-caminos { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px 8px; }
.tabs-caminos::-webkit-scrollbar { display: none; }
.tab-camino {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--sup2); border: 2px solid var(--linea); font-weight: 800; font-size: 14px; color: var(--tinta2); white-space: nowrap;
  box-shadow: 0 3px 0 var(--linea); transition: transform .08s, box-shadow .08s;
}
button.tab-camino:active { transform: translateY(3px); box-shadow: none; }
.tab-camino[aria-selected="true"] { background: var(--c); border-color: var(--c); color: #0B0A09; box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 55%, #000); }
.tab-bloq { color: var(--tinta3); border-style: dashed; box-shadow: none; }

.unidad {
  display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 24px; background: var(--c); color: #0B0A09;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 55%, #000); position: relative; overflow: hidden; margin-bottom: 26px; isolation: isolate;
}
.unidad::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: radial-gradient(circle at 92% 12%, rgb(255 255 255 / .35) 0 14%, transparent 15%), radial-gradient(circle at 80% 110%, rgb(0 0 0 / .14) 0 30%, transparent 31%);
}
.unidad-txt { flex: 1; min-width: 0; }
.unidad-pre { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.unidad h2 { font-size: 23px; font-weight: 900; margin: 3px 0 4px; }
.unidad p:last-child { font-size: 14px; font-weight: 600; line-height: 1.35; }
.unidad-prog { flex: none; width: 66px; height: 66px; position: relative; display: grid; place-items: center; font-weight: 900; font-size: 15px; }
.unidad-prog svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.anillo-fondo { fill: none; stroke: rgb(11 10 9 / .2); stroke-width: 5; }
.anillo { fill: none; stroke: #0B0A09; stroke-width: 5; stroke-linecap: round; }

.sendero { position: relative; margin: 0 0 24px; overflow-x: clip; }
.sendero-linea { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.linea-resto { fill: none; stroke: var(--linea2); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1 15; }
.linea-hecha { fill: none; stroke: var(--c); stroke-width: 8; stroke-linecap: round; opacity: .55; }
.nodos { list-style: none; margin: 0; padding: 0; position: relative; }
.nodo-fila { position: relative; display: flex; flex-direction: column; align-items: center; width: max-content; max-width: 170px; margin-inline: auto; padding: 14px 0 18px; transform: translateX(var(--x)); }
.nodo-fila.con-empieza { padding-top: 46px; }
.nodo {
  width: 78px; height: 78px; border-radius: 50%; position: relative; display: grid; place-items: center;
  background: var(--c); color: #0B0A09;
  box-shadow: 0 7px 0 color-mix(in srgb, var(--c) 52%, #000), inset 0 -5px 0 rgb(0 0 0 / .1), inset 0 4px 0 rgb(255 255 255 / .25);
  transition: transform .1s ease, box-shadow .1s ease;
}
.nodo:active { transform: translateY(7px); box-shadow: 0 0 0 color-mix(in srgb, var(--c) 52%, #000), inset 0 -5px 0 rgb(0 0 0 / .1); }
.nodo-cara { display: grid; place-items: center; }
.nodo.bloqueado { background: var(--sup3); color: #6E665C; box-shadow: 0 7px 0 #0F0D0B, inset 0 4px 0 rgb(255 255 255 / .03); }
.nodo.actual::before {
  content: ""; position: absolute; inset: -11px; border-radius: 50%; border: 4px solid var(--c); opacity: .6;
  animation: pulso 1.9s ease-out infinite; pointer-events: none;
}
.nodo-mision { background: var(--sup2); color: var(--oro-claro); border: 3px solid var(--oro); box-shadow: 0 7px 0 var(--oro-osc); }
.nodo-mision.disponible, .nodo-mision.hecho { background: linear-gradient(145deg, #F4DC9A, var(--oro) 55%, var(--oro-osc)); color: #0B0A09; border-color: #F4DC9A; }
.nodo-mision.disponible:active, .nodo-mision.hecho:active { box-shadow: 0 0 0 var(--oro-osc); }
.nodo-mision.actual::before { border-color: var(--oro-claro); }
.nodo-mision.bloqueado { border-color: var(--linea2); background: var(--sup3); color: #6E665C; box-shadow: 0 7px 0 #0F0D0B; }
.nodo-meta { border-radius: 26px; width: 84px; height: 84px; }
.nodo-meta.hecho { background: linear-gradient(145deg, #F4DC9A, var(--oro) 55%, var(--oro-osc)); box-shadow: 0 7px 0 #5E4822; }
.nodo-insignia {
  position: absolute; top: -4px; right: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--oro-claro); color: #0B0A09;
  font-size: 14px; display: grid; place-items: center; font-weight: 900; box-shadow: 0 2px 0 var(--oro-osc); border: 2px solid var(--fondo);
}
.nodo-alerta {
  position: absolute; top: -6px; right: -6px; width: 28px; height: 28px; border-radius: 50%; background: var(--rojo); color: #0B0A09;
  font-weight: 900; font-size: 16px; display: grid; place-items: center; animation: latido 1.2s ease-in-out infinite; border: 2px solid var(--fondo);
}
.nodo-etq {
  margin-top: 14px; max-width: 160px; text-align: center; font-size: 12.5px; font-weight: 800; color: var(--tinta2); line-height: 1.25;
  background: var(--fondo); padding: 2px 8px; border-radius: 8px; position: relative;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nodo-empieza {
  position: absolute; top: 2px; padding: 6px 12px; border-radius: 12px; background: var(--sup2); border: 2px solid var(--c);
  color: var(--tinta); font-weight: 900; font-size: 13px; letter-spacing: .08em; animation: rebotaEmpieza 1.4s ease-in-out infinite; white-space: nowrap;
}
.nodo-empieza::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; background: var(--sup2);
  border-right: 2px solid var(--c); border-bottom: 2px solid var(--c); transform: translateX(-50%) rotate(45deg);
}
.sendero-iki { position: absolute; width: 92px; z-index: 2; pointer-events: none; transition: top .4s var(--suave); }
.sendero-iki-izq { left: 0; }
.sendero-iki-der { right: 0; }
.nodo-pop {
  position: absolute; left: 0; right: 0; z-index: 20; margin: 0 auto; max-width: 340px;
  background: var(--sup2); border: 2px solid var(--c); border-radius: 22px; padding: 16px; box-shadow: var(--sombra);
  animation: popEntra .28s var(--rebote); display: grid; gap: 8px; transform-origin: var(--flecha-x) 0;
}
.nodo-pop.pop-bloqueado { border-color: var(--linea2); }
.nodo-pop.pop-mision { border-color: var(--oro); }
.pop-flecha {
  position: absolute; top: -11px; left: var(--flecha-x); width: 18px; height: 18px; background: var(--sup2);
  border-left: 2px solid; border-top: 2px solid; border-color: inherit; transform: translateX(-50%) rotate(45deg);
}
.nodo-pop.pop-leccion .pop-flecha, .nodo-pop.pop-meta .pop-flecha { border-color: var(--c); }
.nodo-pop.pop-mision .pop-flecha { border-color: var(--oro); }
.nodo-pop.pop-bloqueado .pop-flecha { border-color: var(--linea2); }
.pop-pre { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta2); }
.nodo-pop h3 { font-size: 19px; font-weight: 900; }
.nodo-pop p { font-size: 14.5px; line-height: 1.45; color: var(--tinta2); display: flex; gap: 6px; align-items: flex-start; }
.nodo-pop .btn { margin-top: 6px; }

.teaser { display: flex; gap: 14px; align-items: center; padding: 16px; border: 2px dashed var(--linea2); border-radius: 20px; color: var(--tinta2); font-size: 14px; line-height: 1.4; }
.teaser strong { color: var(--tinta); }
.teaser-iconos { display: flex; padding-left: 8px; flex: none; }
.teaser-iconos span { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--sup3); filter: grayscale(.9); margin-left: -10px; border: 2px solid var(--fondo); font-size: 17px; }
.firma-inicio { font-size: 18px; opacity: .9; }

/* ───────────── Lección ───────────── */
body[data-vista="leccion"] .vista { padding-top: 0; }
.leccion { min-height: 100dvh; display: flex; flex-direction: column; }
.lec-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--arriba)) 0 10px; background: var(--fondo); }
.lec-cuerpo { flex: 1; padding: 6px 0 20px; }
.lec-pie { position: sticky; bottom: 0; z-index: 5; padding: 14px 0 calc(16px + var(--abajo)); background: linear-gradient(rgb(11 10 9 / 0), var(--fondo) 28%); display: grid; gap: 10px; }
.lec-pie.oculto { visibility: hidden; }
.teoria-cab { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.teoria-iki { width: 66px; flex: none; }
.teoria-titulo { font-size: 23px; font-weight: 900; margin-top: 3px; }
.carrusel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 4px 0 14px; overscroll-behavior-x: contain; }
.carrusel::-webkit-scrollbar { display: none; }
.carrusel:focus-visible { outline-offset: -3px; }
.tarjeta-teoria {
  flex: 0 0 calc(100% - 32px); margin: 0 16px; scroll-snap-align: center; scroll-snap-stop: always;
  background: var(--sup2); border: 2px solid var(--linea); border-top: 7px solid var(--c); border-radius: 26px;
  padding: 24px 22px; min-height: 320px; display: flex; flex-direction: column; gap: 14px;
}
.tt-num { width: 42px; height: 42px; border-radius: 13px; background: var(--c); color: #0B0A09; font-weight: 900; display: grid; place-items: center; font-size: 19px; box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 55%, #000); }
.tarjeta-teoria h2 { font-size: 22px; font-weight: 900; }
.tarjeta-teoria p { font-size: 17.5px; line-height: 1.6; color: var(--tinta); font-weight: 500; }
.tarjeta-teoria .tt-fuente { margin-top: auto; font-size: 13.5px; color: var(--tinta2); font-style: italic; border-top: 1px solid var(--linea); padding-top: 12px; }
.puntos { display: flex; justify-content: center; gap: 0; }
.punto { width: 44px; height: 44px; display: grid; place-items: center; }
.punto::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: var(--linea2); transition: width .3s var(--suave), background .3s; }
.punto[aria-selected="true"]::before { width: 28px; background: var(--c); }

.ejercicio.ej-entra { animation: ejEntra .42s var(--suave) both; }
.ej-tipo { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--c); margin: 10px 0 14px; }
.ej-cuenta { color: var(--tinta3); }
.ej-enunciado { font-size: 23px; font-weight: 900; line-height: 1.25; margin-bottom: 20px; }
.opciones { display: grid; gap: 12px; }
.opcion {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 12px 14px; text-align: left;
  border-radius: 16px; background: var(--sup2); border: 2px solid var(--linea); box-shadow: 0 4px 0 var(--linea);
  font-weight: 700; font-size: 16.5px; line-height: 1.3; color: var(--tinta);
  transition: transform .08s, box-shadow .08s, border-color .15s, background .15s;
}
.opcion:hover { border-color: var(--linea2); }
.opcion:active { transform: translateY(4px); box-shadow: 0 0 0 var(--linea); }
.opcion-letra { flex: none; width: 32px; height: 32px; border-radius: 10px; border: 2px solid var(--linea2); display: grid; place-items: center; font-size: 14px; font-weight: 900; color: var(--tinta2); transition: .15s; }
.opcion[aria-checked="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--sup2)); box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 55%, #000); }
.opcion[aria-checked="true"] .opcion-letra { background: var(--c); border-color: var(--c); color: #0B0A09; }
.vf { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opcion-vf { flex-direction: column; justify-content: center; min-height: 124px; text-align: center; font-size: 18px; font-weight: 900; gap: 8px; }
.opcion-vf[aria-checked="true"] { color: var(--tinta); }
.ej-afirmacion { margin: 0 0 22px; padding: 20px 20px 20px 18px; border-radius: 20px; background: var(--sup2); border-left: 6px solid var(--c); font-size: 20px; font-weight: 800; line-height: 1.38; }
.ej-frase { font-size: 21px; font-weight: 800; line-height: 1.75; margin-bottom: 24px; }
.hueco { display: inline-block; min-width: 110px; padding: 0 12px; margin: 0 4px; border-bottom: 3px solid var(--c); text-align: center; color: var(--c); line-height: 1.4; }
.hueco.lleno { background: color-mix(in srgb, var(--c) 16%, transparent); border-radius: 10px 10px 0 0; color: var(--tinta); animation: pop .3s var(--rebote); }
.orden-respuesta { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.orden-hueco { min-height: 58px; border: 2px dashed var(--linea2); border-radius: 14px; display: flex; align-items: center; padding: 0 12px; }
.orden-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--sup3); display: grid; place-items: center; font-weight: 900; font-size: 13px; color: var(--tinta2); }
.orden-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 10px 14px; border-radius: 14px; text-align: left;
  background: var(--sup2); border: 2px solid var(--linea); box-shadow: 0 4px 0 var(--linea); font-weight: 700; font-size: 15.5px; line-height: 1.3;
  animation: pop .28s var(--rebote); transition: transform .08s, box-shadow .08s;
}
.orden-item:active { transform: translateY(4px); box-shadow: none; }
.orden-item.colocado { border-color: var(--c); }
.orden-item.colocado .orden-n { background: var(--c); color: #0B0A09; }
.orden-banco { display: grid; gap: 8px; padding-top: 14px; border-top: 2px solid var(--linea); }
.opcion.correcta, .chip.correcta, .orden-item.correcta, .hueco.correcta {
  border-color: var(--verde) !important; background: rgb(61 214 140 / .14) !important; box-shadow: 0 4px 0 var(--verde-osc) !important; color: var(--tinta);
  animation: pop .45s var(--rebote);
}
.opcion.correcta .opcion-letra { background: var(--verde) !important; border-color: var(--verde) !important; color: #0B0A09 !important; }
.opcion.incorrecta, .chip.incorrecta, .orden-item.incorrecta, .hueco.incorrecta {
  border-color: var(--rojo) !important; background: rgb(240 100 79 / .14) !important; box-shadow: 0 4px 0 var(--rojo-osc) !important;
}
.opcion.incorrecta .opcion-letra { background: var(--rojo) !important; border-color: var(--rojo) !important; color: #0B0A09 !important; }
.hueco.correcta, .hueco.incorrecta { box-shadow: none !important; }
.bloqueada { pointer-events: none; }
.sacudida { animation: sacudida .5s; }

.feedback {
  position: fixed; left: 50%; bottom: 0; width: 100%; max-width: var(--ancho); z-index: 80;
  transform: translate(-50%, 105%); transition: transform .38s var(--suave);
}
.feedback.visible { transform: translate(-50%, 0); }
.fb-int { padding: 18px 16px calc(18px + var(--abajo)); border-radius: 28px 28px 0 0; display: grid; gap: 10px; box-shadow: 0 -20px 50px rgb(0 0 0 / .5); }
.fb-bien .fb-int { background: #11281C; border-top: 3px solid var(--verde); }
.fb-mal .fb-int { background: #2C1511; border-top: 3px solid var(--rojo); }
.fb-cab { display: flex; align-items: center; gap: 12px; }
.fb-iki { width: 62px; flex: none; }
.fb-cab h2 { font-size: 24px; font-weight: 900; }
.fb-bien h2 { color: var(--verde); }
.fb-mal h2 { color: #FF9A8A; }
.fb-correcta { font-size: 15px; color: var(--tinta); }
.fb-correcta strong { color: var(--tinta); }
.fb-orden { margin: 0; padding-left: 22px; display: grid; gap: 2px; font-weight: 700; font-size: 15px; }
.fb-expl { font-size: 16px; line-height: 1.5; color: var(--tinta); }
.fb-int .btn { margin-top: 6px; }

/* ───────────── Resultados ───────────── */
.resultado { text-align: center; display: grid; justify-items: center; gap: 12px; padding-top: 8px; }
.res-escena { position: relative; width: 210px; height: 190px; display: grid; place-items: center; }
.res-iki { width: 150px; position: relative; z-index: 1; }
.rayos {
  position: absolute; inset: -45%; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgb(201 164 92 / .2) 0 9deg, transparent 9deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 64%); mask: radial-gradient(circle, #000 18%, transparent 64%);
  animation: gira 22s linear infinite;
}
.res-titulo { font-family: var(--f-marca); font-style: italic; font-weight: 600; font-size: 34px; color: var(--oro-claro); line-height: 1.1; }
.res-sub { color: var(--tinta2); font-weight: 600; }
.res-perfecta { display: inline-flex; padding: 7px 14px; border-radius: 999px; background: rgb(201 164 92 / .16); border: 1.5px solid rgb(201 164 92 / .5); color: var(--oro-claro); font-weight: 900; font-size: 14px; animation: pop .6s .5s both var(--rebote); }
.res-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; width: 100%; margin-top: 8px; }
.res-stat { border-radius: 18px; border: 2px solid; overflow: hidden; display: grid; animation: entra .5s var(--suave) both; }
.res-stat:nth-child(2) { animation-delay: .12s; }
.res-stat:nth-child(3) { animation-delay: .24s; }
.res-stat-tit { padding: 6px; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: #0B0A09; }
.res-stat-val { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px 6px; font-size: 23px; font-weight: 900; background: var(--sup2); font-variant-numeric: tabular-nums; }
.res-xp { border-color: #F5C84B; }
.res-xp .res-stat-tit { background: #F5C84B; }
.res-oro { border-color: var(--oro); }
.res-oro .res-stat-tit { background: var(--oro); }
.res-racha { border-color: #FF8A3D; }
.res-racha .res-stat-tit { background: #FF8A3D; }
.res-racha.sube .llama { animation: llamaCrece 1s var(--rebote) .9s both; }
.res-bonus { font-size: 13.5px; color: var(--tinta2); font-weight: 600; }
.res-mision {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; margin-top: 8px; border-radius: 20px; text-align: left;
  background: linear-gradient(135deg, rgb(201 164 92 / .18), var(--sup2) 70%); border: 2px solid rgb(201 164 92 / .55); text-decoration: none; color: var(--tinta);
  animation: entra .5s .5s var(--suave) both;
}
.res-mision > span:nth-child(2) { flex: 1; display: grid; }
.res-mision small { color: var(--tinta2); font-size: 13.5px; font-weight: 600; }
.res-mision-ico { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--oro); color: #0B0A09; flex: none; }
.pie-doble { display: grid; gap: 10px; }

/* ───────────── Misión ───────────── */
body[data-vista="mision"] .vista { padding-top: 0; }
.sub-top { display: flex; align-items: center; justify-content: space-between; padding: calc(6px + var(--arriba)) 0 6px; position: sticky; top: 0; background: var(--fondo); z-index: 10; }
body[data-vista="tienda"] .sub-top { position: static; padding-top: 0; }
.sub-titulo { font-weight: 900; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta2); }
.mision { padding-bottom: 24px; }
.mision-titulo { font-size: 28px; font-weight: 900; margin: 6px 0 10px; }
.mision-titulo-peq { font-size: 22px; margin-top: 0; }
.mision-instr { font-size: 16.5px; line-height: 1.55; color: var(--tinta); }
.crono { position: relative; width: min(300px, 80vw); aspect-ratio: 1; margin: 24px auto 16px; }
.crono svg { width: 100%; height: 100%; overflow: visible; }
.crono-pista { fill: var(--sup); stroke: var(--sup3); stroke-width: 18; }
.crono-marcas line { stroke: var(--linea2); stroke-width: 2; stroke-linecap: round; }
.crono-arco { fill: none; stroke: var(--c); stroke-width: 18; stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.crono-punto { fill: #FFFDF8; stroke: var(--c); stroke-width: 4; transition: transform .3s linear; transform-box: view-box; transform-origin: 130px 130px; }
.crono-centro { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.crono-tiempo { font-size: clamp(46px, 15vw, 60px); font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1; }
.crono-sub { font-size: 15px; color: var(--tinta2); font-weight: 700; margin-top: 8px; }
.crono[data-estado="corriendo"] .crono-arco { animation: brilla 2.2s ease-in-out infinite; }
.crono[data-estado="pausado"] .crono-tiempo { animation: parpadeoTexto 1.3s ease-in-out infinite; }
.crono[data-estado="fin"] .crono-tiempo { color: var(--oro-claro); font-size: 46px; }
.crono[data-estado="fin"] .crono-arco { stroke: var(--verde); }
.crono[data-estado="fin"] .crono-punto { opacity: 0; }
.crono-fin { animation: pop .7s var(--rebote) 2; }
.crono-botones { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 10px 0; }
.mision-prueba { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--sup2); color: var(--tinta2); font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.mision-prueba .ico { flex: none; margin-top: 1px; color: var(--oro-claro); }
.cierre-cab { display: flex; align-items: center; gap: 22px; margin: 10px 0 16px; }
.cierre-cab .iki { width: 84px; flex: none; }
.media-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-media {
  display: grid; justify-items: center; align-content: center; gap: 6px; padding: 18px 10px; border-radius: 18px; border: 2px dashed var(--linea2);
  background: var(--sup2); font-weight: 800; color: var(--tinta); cursor: pointer; min-height: 100px; position: relative;
  transition: border-color .2s, transform .1s, background .2s;
}
.btn-media .ico { color: var(--oro-claro); }
.btn-media:hover { border-color: var(--oro); background: var(--sup3); }
.btn-media:active { transform: scale(.97); }
.btn-media:focus-within { outline: 3px solid var(--oro-claro); outline-offset: 3px; }
.media-previa { position: relative; border-radius: 18px; overflow: hidden; border: 2px solid var(--linea); background: #000; animation: pop .4s var(--rebote); }
.media-previa img, .media-previa video { width: 100%; max-height: 420px; object-fit: contain; }
.media-quitar { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; background: rgb(11 10 9 / .82); display: grid; place-items: center; color: var(--tinta); }
.media-cargando { display: flex; align-items: center; gap: 10px; padding: 26px; justify-content: center; color: var(--tinta2); border-radius: 18px; background: var(--sup2); font-weight: 700; }
.media-zona { display: grid; gap: 8px; }
.pie-fijo { position: sticky; bottom: 0; z-index: 5; padding: 14px 0 calc(16px + var(--abajo)); background: linear-gradient(rgb(11 10 9 / 0), var(--fondo) 28%); display: grid; gap: 10px; }
.tarjeta { background: var(--sup); border: 1.5px solid var(--linea); border-radius: 22px; padding: 16px; }
.mision-hecha { display: grid; gap: 12px; margin: 18px 0; }
.mision-hecha .pre { color: var(--verde); }
.mision-hecha-media img, .mision-hecha-media video { width: 100%; border-radius: 16px; max-height: 420px; object-fit: contain; background: #000; }
.mision-hecha-nota { font-size: 16px; line-height: 1.5; white-space: pre-line; }

/* ───────────── Capas: cofre y subida de nivel ───────────── */
.capa {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow-y: auto; overscroll-behavior: contain;
  background: rgb(11 10 9 / .95); opacity: 0; transition: opacity .3s;
  padding: calc(24px + var(--arriba)) 16px calc(24px + var(--abajo));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.capa.visible { opacity: 1; }
.capa.saliendo { opacity: 0; }
body.con-capa { overflow: hidden; }
.cofre-escena { max-width: 380px; width: 100%; display: grid; justify-items: center; gap: 10px; text-align: center; }
.capa.visible .cofre-escena { animation: entra .5s var(--suave) both; }
.cofre-pre { color: var(--oro-claro); font-weight: 900; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; }
.cofre-titulo { font-family: var(--f-marca); font-style: italic; font-size: 34px; font-weight: 600; }
.cofre-boton { width: 250px; padding: 10px; border-radius: 30px; animation: flota 2.4s ease-in-out infinite; }
.cofre-boton .cofre { overflow: visible; width: 100%; }
.cofre-boton.agitando { animation: agita .65s ease-in-out; }
.cofre-boton.abierto { animation: none; cursor: default; }
.cofre-tapa { transform-box: view-box; transform-origin: 30px 94px; transition: transform .7s var(--rebote); }
.cofre-boton.abierto .cofre-tapa { transform: translate(-6px, -22px) rotate(-26deg); }
.cofre-luz { opacity: 0; transition: opacity .6s; }
.cofre-boton.abierto .cofre-luz { opacity: 1; animation: latidoLuz 2s ease-in-out infinite .8s; }
.cofre-moneda { opacity: 0; }
.cofre-boton.abierto .cofre-moneda { animation: monedaSale 1.1s var(--suave) both; animation-delay: var(--ret); }
.cofre-ayuda { color: var(--tinta2); font-weight: 700; min-height: 24px; }
.cofre-premio { display: inline-flex; align-items: center; gap: 10px; font-size: 30px; font-weight: 900; color: var(--oro-claro); animation: pop .6s var(--rebote); font-variant-numeric: tabular-nums; }
.cofre-escena .btn { margin-top: 10px; animation: entra .4s var(--suave) both; }

.capa-nivel { place-items: start center; }
.celebracion { width: 100%; max-width: 420px; display: grid; gap: 20px; text-align: center; position: relative; padding-top: 6px; }
.cel-cabecera { position: relative; display: grid; justify-items: center; gap: 8px; }
.cel-cabecera .rayos, .celebracion > .rayos { inset: -20% -30%; top: -60px; height: 420px; }
.celebracion > .rayos { position: absolute; left: -30%; right: -30%; }
.cel-iki { width: 150px; position: relative; }
.cel-cabecera .burbuja { max-width: 320px; }
.cel-pre { font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta2); font-size: 13px; margin-top: 6px; }
.cel-titulo { font-family: var(--f-marca); font-style: italic; font-weight: 600; font-size: 42px; color: var(--oro-claro); line-height: 1.05; }
.cel-titulo-peq { font-size: 32px; }
.cel-num { display: inline-block; animation: numeroEntra .9s var(--rebote) .25s both; }
.cel-premio { display: inline-flex; gap: 8px; align-items: center; padding: 8px 16px; border-radius: 999px; background: rgb(201 164 92 / .14); border: 1.5px solid rgb(201 164 92 / .45); font-weight: 900; color: var(--oro-claro); animation: pop .6s var(--rebote) .6s both; }
.cel-bloque { text-align: left; display: grid; gap: 10px; animation: entra .5s var(--suave) .5s both; }
.cel-bloque h3 { font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta2); }
.cel-acciones { display: grid; gap: 4px; position: sticky; bottom: calc(-24px - var(--abajo)); padding: 14px 0 calc(10px + var(--abajo)); background: linear-gradient(rgb(11 10 9 / 0), rgb(11 10 9 / .97) 30%); }
.lista-caminos { display: grid; gap: 10px; text-align: left; }
.camino-opcion {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 18px; min-height: 68px;
  background: var(--sup2); border: 2px solid var(--linea); box-shadow: 0 4px 0 var(--linea); color: var(--tinta);
  transition: transform .08s, box-shadow .08s, border-color .15s, background .15s;
}
.camino-opcion:active { transform: translateY(4px); box-shadow: 0 0 0 var(--linea); }
.camino-opcion-ico { width: 50px; height: 50px; flex: none; border-radius: 15px; display: grid; place-items: center; font-size: 26px; background: color-mix(in srgb, var(--c) 22%, transparent); border: 2px solid color-mix(in srgb, var(--c) 65%, transparent); }
.camino-opcion-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.camino-opcion-txt strong { font-size: 16px; font-weight: 900; }
.camino-opcion-txt small { font-size: 13px; color: var(--tinta2); line-height: 1.3; font-weight: 600; }
.camino-opcion-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--linea2); display: grid; place-items: center; color: transparent; flex: none; transition: .2s; }
.camino-opcion[aria-pressed="true"], .camino-opcion[aria-checked="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--sup2)); box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 55%, #000); }
.camino-opcion[aria-pressed="true"] .camino-opcion-check, .camino-opcion[aria-checked="true"] .camino-opcion-check { background: var(--c); border-color: var(--c); color: #0B0A09; animation: pop .35s var(--rebote); }
.lista-oport { display: grid; gap: 10px; }
.oport {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; min-height: 68px; text-align: left;
  background: linear-gradient(135deg, rgb(201 164 92 / .13), var(--sup2) 70%); border: 1.5px solid rgb(201 164 92 / .38); text-decoration: none; color: var(--tinta);
  transition: border-color .2s, transform .1s;
}
a.oport:hover { border-color: var(--oro); }
a.oport:active { transform: scale(.98); }
.oport-ico { font-size: 25px; width: 48px; height: 48px; border-radius: 14px; background: var(--sup3); display: grid; place-items: center; flex: none; }
.oport-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.oport-txt strong { font-weight: 900; }
.oport-txt small { color: var(--tinta2); font-size: 13px; font-weight: 600; line-height: 1.3; }
.oport-ir { color: var(--oro-claro); flex: none; }

/* ───────────── Avisos flotantes y diálogos ───────────── */
.toasts { position: fixed; top: calc(10px + var(--arriba)); left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: 420px; z-index: 2500; display: grid; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px; background: #221F1B; border: 1.5px solid var(--linea2);
  box-shadow: var(--sombra); font-weight: 700; font-size: 14.5px; line-height: 1.35; color: var(--tinta);
  transform: translateY(-24px) scale(.95); opacity: 0; transition: transform .4s var(--rebote), opacity .3s; pointer-events: auto;
}
.toast.visible { transform: none; opacity: 1; }
.toast-logro { border-color: rgb(201 164 92 / .65); background: linear-gradient(135deg, #2F2718, #1B1916); }
.toast-error { border-color: rgb(240 100 79 / .65); }
.toast-ico { font-size: 30px; line-height: 1; }
.toast .ico { color: var(--oro-claro); flex: none; }
.toast a { color: var(--oro-claro); font-weight: 900; }

.dialogo {
  width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1.5px solid var(--linea2); border-radius: 28px;
  background: var(--sup2); color: var(--tinta); box-shadow: 0 30px 90px rgb(0 0 0 / .75); overflow-y: auto;
}
.dialogo::backdrop { background: rgb(11 10 9 / .78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dialogo[open] { animation: dialogoEntra .38s var(--rebote); }
.dialogo-int { padding: 22px 20px 18px; display: grid; gap: 12px; }
.dialogo-iki { width: 92px; justify-self: center; }
.dialogo-titulo { font-size: 22px; font-weight: 900; text-align: center; }
.dialogo-texto { color: var(--tinta2); text-align: center; line-height: 1.5; font-weight: 500; }
.dialogo-nota { font-size: 13px; color: var(--tinta2); text-align: center; line-height: 1.45; }
.dialogo-botones { display: grid; gap: 10px; margin-top: 6px; }
.dialogo-botones .btn { width: 100%; }
.semana { list-style: none; padding: 0; margin: 4px 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.semana-dia { display: grid; justify-items: center; gap: 4px; }
.semana-letra { font-size: 12px; font-weight: 800; color: var(--tinta2); }
.semana-punto { width: 36px; height: 36px; border-radius: 50%; background: var(--sup3); display: grid; place-items: center; }
.semana-dia.hecho .semana-punto { background: rgb(255 122 47 / .18); box-shadow: inset 0 0 0 2px #FF8A3D; }
.semana-dia.salvado .semana-punto { background: rgb(61 180 245 / .15); color: #7CC4F5; box-shadow: inset 0 0 0 2px #3DB4F5; }
.semana-dia.hoy .semana-punto { box-shadow: inset 0 0 0 2px var(--tinta2); }
.semana-dia.futuro .semana-punto { opacity: .4; }
.racha-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.racha-datos p { display: grid; justify-items: center; padding: 10px; border-radius: 14px; background: var(--sup3); }
.racha-datos strong { font-size: 22px; font-weight: 900; }
.racha-datos span { font-size: 12px; color: var(--tinta2); font-weight: 700; }
.motivos { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border-radius: 14px; background: var(--sup3); border: 1.5px solid var(--linea); font-weight: 700; cursor: pointer; }
.radio input { accent-color: var(--oro); width: 20px; height: 20px; flex: none; margin: 0; }
.radio:has(input:checked) { border-color: var(--oro); background: rgb(201 164 92 / .1); }
.post-dialogo { display: grid; gap: 10px; }
.post-dialogo img, .post-dialogo video { width: 100%; border-radius: 16px; max-height: 50vh; object-fit: contain; background: #000; }
.post-dialogo p { line-height: 1.5; }
.post-dialogo .nota { display: inline-flex; align-items: center; gap: 4px; }

/* ───────────── Estados vacíos ───────────── */
.vacio { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 30px 10px; color: var(--tinta2); font-weight: 600; line-height: 1.45; }
.vacio .iki { width: 120px; }
.vacio h1 { color: var(--tinta); font-size: 24px; font-weight: 900; }
.vacio-pantalla { min-height: 80dvh; align-content: center; }

/* ───────────── Comunidad ───────────── */
.cab-seccion { padding: 4px 0 12px; }
.cab-seccion h1, .liga-cab h1 { font-size: 30px; font-weight: 900; letter-spacing: -.01em; }
.cab-seccion p { color: var(--tinta2); font-weight: 600; }
.aviso-demo { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--tinta2); background: var(--sup2); border: 1px dashed var(--linea2); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.4; font-weight: 600; }
.aviso-demo .ico { flex: none; color: var(--oro-claro); margin-top: 1px; }
.filtros { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 16px; padding: 2px 16px 8px; }
.filtros::-webkit-scrollbar { display: none; }
.filtros .chip { flex: none; white-space: nowrap; }
.muro { display: grid; gap: 18px; }
.post { background: var(--sup); border: 1.5px solid var(--linea); border-radius: 26px; overflow: hidden; animation: entra .5s var(--suave) both; }
.post:nth-child(2) { animation-delay: .07s; }
.post:nth-child(3) { animation-delay: .14s; }
.post.saliendo { animation: sale .3s forwards; }
.post-cab { display: flex; align-items: center; gap: 10px; padding: 12px 6px 12px 14px; }
.post-autor { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.post-autor strong { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-autor > span { font-size: 12.5px; color: var(--tinta2); font-weight: 600; }
.etq-tu { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--oro); color: #0B0A09; vertical-align: 2px; font-weight: 900; }
.post-hace { font-size: 12.5px; color: var(--tinta3); font-weight: 600; white-space: nowrap; }
.post-media { position: relative; min-height: 220px; background: #000; user-select: none; -webkit-user-select: none; touch-action: manipulation; overflow: hidden; cursor: pointer; display: grid; place-items: center; }
.post-media img { width: 100%; height: auto; max-height: 560px; object-fit: cover; }
.post-media .ilustracion { width: 100%; height: auto; aspect-ratio: 1; }
.post-media video { width: 100%; max-height: 560px; background: #000; }
.post-sin-media { display: grid; place-items: center; height: 100%; color: var(--tinta3); }
.post-fuego-grande { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; filter: drop-shadow(0 8px 24px rgb(0 0 0 / .6)); }
.post-fuego-grande.anima { animation: fuegoGrande .95s var(--suave); }
.post-acciones { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 0 8px; }
.btn-fuego { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 10px; border-radius: 999px; font-weight: 900; font-size: 16px; color: var(--tinta2); font-variant-numeric: tabular-nums; transition: background .2s, color .2s; }
.btn-fuego:hover { background: var(--sup2); }
.btn-fuego.activo { color: #FFA05A; background: rgb(255 122 47 / .12); }
.btn-fuego.salta .llama { animation: fuegoSalta .55s var(--rebote); }
.post-camino { font-size: 12.5px; font-weight: 800; padding: 6px 11px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--tinta); white-space: nowrap; }
.post-texto { padding: 6px 16px 16px; display: grid; gap: 6px; }
.post-mision { font-size: 13px; color: var(--tinta2); font-weight: 600; }
.post-mision strong { color: var(--tinta); }
.post-nota { font-size: 15px; line-height: 1.5; }
.post-nota strong { font-weight: 800; margin-right: 4px; }
.post-esqueleto { padding: 14px; display: grid; gap: 12px; }
.esq { border-radius: 12px; background: linear-gradient(90deg, var(--sup2), var(--sup3), var(--sup2)); background-size: 200% 100%; animation: brillo 1.4s linear infinite; }
.esq-cab { height: 42px; width: 60%; }
.esq-media { aspect-ratio: 1; }
.esq-linea { height: 16px; width: 80%; }

/* ───────────── Liga ───────────── */
.liga-cab { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 6px 0 14px; }
.liga-cab h1 { font-size: 25px; }
.liga-trofeo {
  width: 78px; height: 78px; border-radius: 26px; display: grid; place-items: center;
  background: linear-gradient(145deg, #F4DC9A, var(--oro) 55%, var(--oro-osc)); color: #0B0A09;
  box-shadow: 0 6px 0 #5E4822; animation: flota 3s ease-in-out infinite;
}
.liga-cuenta { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--sup2); border: 1.5px solid var(--linea); font-weight: 700; font-size: 14px; color: var(--tinta2); }
.liga-cuenta strong { color: var(--oro-claro); }
.liga-expl { font-size: 13.5px; color: var(--tinta2); max-width: 330px; line-height: 1.45; }
.podio { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin: 14px 0 20px; }
.podio-col { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; animation: subePodio .75s var(--rebote) both; }
.podio-1 { animation-delay: .3s; }
.podio-2 { animation-delay: .12s; }
.podio-3 { animation-delay: .45s; }
.podio-nombre { font-size: 14px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podio-xp { font-size: 12.5px; font-weight: 800; color: var(--tinta2); display: inline-flex; gap: 3px; align-items: center; }
.podio-base { width: 100%; border-radius: 16px 16px 6px 6px; display: grid; place-items: start center; padding-top: 8px; font-size: 26px; font-weight: 900; color: #0B0A09; margin-top: 6px; }
.podio-1 .podio-base { height: 112px; background: linear-gradient(#F4DC9A, var(--oro)); box-shadow: 0 5px 0 var(--oro-osc); }
.podio-2 .podio-base { height: 82px; background: linear-gradient(#E6E3DD, #A9A49B); box-shadow: 0 5px 0 #6B675F; }
.podio-3 .podio-base { height: 64px; background: linear-gradient(#E7AE7E, #B06F3B); box-shadow: 0 5px 0 #6E4220; }
.podio-corona { font-size: 26px; animation: flota 2.4s ease-in-out infinite; line-height: 1; }
.podio-col.yo .podio-nombre { color: var(--oro-claro); }
.ranking { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.rank-fila { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 18px; background: var(--sup); border: 1.5px solid var(--linea); min-height: 66px; animation: entra .45s var(--suave) both; }
.rank-pos { width: 28px; text-align: center; font-weight: 900; color: var(--tinta2); font-variant-numeric: tabular-nums; flex: none; }
.rank-nombre { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.rank-nombre strong { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-nombre small { color: var(--tinta2); font-size: 12.5px; font-weight: 600; }
.rank-xp { font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-xp small { color: var(--tinta2); font-weight: 700; font-size: 12px; }
.rank-fila.yo { background: linear-gradient(135deg, rgb(201 164 92 / .22), rgb(201 164 92 / .06)); border-color: var(--oro); box-shadow: 0 0 0 1px var(--oro); }
.rank-fila.yo .rank-pos { color: var(--oro-claro); }
.mi-fila-fija {
  position: fixed; left: 50%; bottom: calc(var(--nav-alto) + var(--abajo) + 10px); width: calc(100% - 32px); max-width: calc(var(--ancho) - 32px);
  z-index: 55; transform: translate(-50%, 160%); transition: transform .4s var(--suave); pointer-events: none;
}
.mi-fila-fija.visible { transform: translate(-50%, 0); }
.mi-fila-fija .rank-fila { background: #2A2216; box-shadow: 0 0 0 1px var(--oro), 0 14px 34px rgb(0 0 0 / .65); animation: none; }

/* ───────────── Perfil ───────────── */
.perfil-cab { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 6px 0 18px; }
.perfil-avatar { position: relative; margin-bottom: 6px; animation: pop .6s var(--rebote) both; }
.perfil-editar { position: absolute; right: -6px; bottom: -6px; width: 44px; height: 44px; border-radius: 50%; background: var(--oro); color: #0B0A09; display: grid; place-items: center; box-shadow: 0 3px 0 var(--oro-osc); border: 3px solid var(--fondo); }
.perfil-cab h1 { font-size: 28px; font-weight: 900; }
.perfil-nivel { font-weight: 800; color: var(--tinta2); }
.xp-barra { width: 100%; max-width: 320px; height: 14px; border-radius: 999px; background: var(--sup3); overflow: hidden; margin-top: 6px; }
.xp-barra span { display: block; height: 100%; background: linear-gradient(90deg, var(--oro-osc), var(--oro-claro)); border-radius: inherit; animation: llena 1.1s var(--suave) both .2s; transform-origin: left; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.stat-tile { display: grid; justify-items: center; gap: 2px; padding: 12px 4px; border-radius: 18px; background: var(--sup); border: 1.5px solid var(--linea); color: var(--oro-claro); }
.stat-tile strong { font-size: 21px; font-weight: 900; color: var(--tinta); line-height: 1.1; }
.stat-tile span { font-size: 11.5px; color: var(--tinta2); font-weight: 700; }
.tarjeta-tienda { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--tinta); margin-bottom: 8px; transition: transform .1s, border-color .2s; }
.tarjeta-tienda:hover { border-color: var(--linea2); }
.tarjeta-tienda:active { transform: scale(.98); }
.tienda-ico { width: 50px; height: 50px; border-radius: 15px; background: rgb(201 164 92 / .14); color: var(--oro-claro); display: grid; place-items: center; flex: none; }
.tarjeta-tienda > span:nth-child(2) { flex: 1; display: grid; }
.tarjeta-tienda small { color: var(--tinta2); font-size: 13px; font-weight: 600; }
.tienda-oro { display: inline-flex; gap: 6px; align-items: center; font-weight: 900; color: var(--oro-claro); }
.bloque { margin: 24px 0; display: grid; gap: 10px; }
.bloque h2 { font-size: 19px; font-weight: 900; display: flex; align-items: center; justify-content: space-between; }
.cuenta { font-size: 14px; color: var(--tinta2); font-weight: 800; }
.calor-envoltura { display: flex; gap: 6px; padding: 14px; background: var(--sup); border: 1.5px solid var(--linea); border-radius: 20px; }
.calor-dias { display: grid; grid-template-rows: repeat(7, 1fr); gap: 4px; font-size: 10px; color: var(--tinta3); font-weight: 800; align-items: center; }
.calor { flex: 1; display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(7, auto); gap: 4px; }
.celda { aspect-ratio: 1; border-radius: 4px; background: var(--sup3); display: block; }
.calor .celda { animation: celdaEntra .5s var(--suave) both; }
.celda.n1 { background: #4A3B1F; }
.celda.n2 { background: #7A5F2E; }
.celda.n3 { background: var(--oro); }
.celda.n4 { background: var(--oro-claro); }
.celda.nfuturo { background: transparent; border: 1px dashed var(--linea); }
.celda.salvado { background: rgb(61 180 245 / .2); box-shadow: inset 0 0 0 1.5px #3DB4F5; }
.celda.hoy { outline: 2px solid var(--tinta2); outline-offset: 1px; }
.calor-leyenda { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: 11px; color: var(--tinta3); font-weight: 700; }
.calor-leyenda .celda { width: 12px; height: 12px; }
.calor-leyenda span:first-child { margin-right: 2px; }
.calor-leyenda span:last-child { margin-left: 2px; }
.logros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.logro { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 12px 4px; border-radius: 18px; background: var(--sup); border: 1.5px solid var(--linea); text-align: center; min-height: 100px; transition: transform .1s, border-color .2s; }
.logro:active { transform: scale(.96); }
.logro-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: radial-gradient(circle at 30% 30%, #F4DC9A, var(--oro) 60%, var(--oro-osc)); box-shadow: 0 3px 0 #5E4822; }
.logro.bloqueado .logro-ico { background: var(--sup3); box-shadow: none; color: #6E665C; }
.logro-tit { font-size: 11.5px; font-weight: 800; line-height: 1.2; color: var(--tinta2); }
.logro.conseguido .logro-tit { color: var(--tinta); }
.logro.conseguido { border-color: rgb(201 164 92 / .35); }
.mis-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 18px; overflow: hidden; }
.mis-posts.vacia, .mis-posts[aria-busy="true"] { display: block; border-radius: 0; }
.mini-post { position: relative; aspect-ratio: 1; background: var(--sup3); overflow: hidden; display: block; width: 100%; }
.mini-post img, .mini-post video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.mini-fuegos { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 900; padding: 2px 7px; border-radius: 999px; background: rgb(11 10 9 / .78); }
.mini-play { position: absolute; top: 6px; right: 6px; color: #fff; filter: drop-shadow(0 1px 3px #000); }
.diario { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.diario-entrada { display: flex; gap: 12px; padding: 12px; border-radius: 18px; background: var(--sup); border: 1.5px solid var(--linea); border-left: 5px solid var(--c); }
.diario-entrada > div { min-width: 0; }
.diario-mini { flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--sup3); }
.diario-mini img, .diario-mini video { width: 100%; height: 100%; object-fit: cover; }
.diario-fecha { font-size: 12.5px; font-weight: 800; color: var(--tinta2); }
.diario-nota { font-size: 15px; line-height: 1.45; margin-top: 4px; white-space: pre-line; overflow-wrap: anywhere; }
.ajustes { gap: 12px; }
.ajuste { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--sup); border: 1.5px solid var(--linea); min-height: 66px; text-decoration: none; color: var(--tinta); }
.ajuste-txt { display: grid; gap: 2px; }
.ajuste-txt strong { font-weight: 800; }
.ajuste-txt small { color: var(--tinta2); font-size: 13px; font-weight: 600; line-height: 1.35; }
.ajuste-enlace .ico { color: var(--tinta2); flex: none; }
.interruptor { flex: none; width: 58px; height: 34px; border-radius: 999px; background: var(--sup3); border: 2px solid var(--linea2); position: relative; transition: background .2s, border-color .2s; }
.interruptor::before { content: ""; position: absolute; inset: -7px -3px; }
.interruptor span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--tinta2); transition: transform .3s var(--rebote), background .2s; }
.interruptor[aria-checked="true"] { background: var(--oro); border-color: var(--oro); }
.interruptor[aria-checked="true"] span { transform: translateX(24px); background: #0B0A09; }

/* ───────────── Tienda ───────────── */
.tienda-saldo {
  display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 24px; margin: 6px 0 10px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 18% 30%, rgb(201 164 92 / .28), transparent 60%), var(--sup); border: 1.5px solid rgb(201 164 92 / .4);
}
.saldo-moneda { animation: giraMoneda 3.2s ease-in-out infinite; flex: none; }
.saldo-num { font-size: 42px; font-weight: 900; color: var(--oro-claro); line-height: 1; font-variant-numeric: tabular-nums; }
.tienda-saldo .pre { color: var(--tinta2); }
.tienda-iki { width: 82px; margin-left: auto; flex: none; }
.articulo { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; background: var(--sup); border: 1.5px solid var(--linea); flex-wrap: wrap; }
.articulo-ico { position: relative; width: 66px; height: 66px; flex: none; border-radius: 20px; display: grid; place-items: center; color: #7CC4F5; background: rgb(61 180 245 / .12); border: 1.5px solid rgb(61 180 245 / .35); }
.escudo-llama { position: absolute; font-size: 15px; top: 50%; left: 50%; transform: translate(-50%, -45%); }
.articulo-txt { flex: 1; min-width: 150px; display: grid; gap: 4px; }
.articulo-txt h3 { font-size: 17px; font-weight: 900; }
.articulo-txt p { font-size: 13.5px; color: var(--tinta2); line-height: 1.4; }
.articulo-txt .articulo-tienes { color: #7CC4F5; font-weight: 800; }
.marcos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.marco-art { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 16px 6px 10px; border-radius: 22px; background: var(--sup); border: 1.5px solid var(--linea); text-align: center; }
.marco-art h3 { font-size: 13.5px; font-weight: 800; }
.marco-art.bloq .avatar { filter: grayscale(.75) brightness(.7); }
.etq-bloq { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 800; color: var(--tinta3); min-height: 44px; }
.etq-uso { font-size: 12px; font-weight: 900; color: var(--verde); display: inline-flex; gap: 4px; align-items: center; }
.marco-art .btn-texto { min-height: 44px; font-size: 13px; }

/* ───────────── Animaciones ───────────── */
@keyframes entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes sale { to { opacity: 0; transform: scale(.96); } }
@keyframes ejEntra { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulso { 0% { transform: scale(.92); opacity: .75; } 100% { transform: scale(1.32); opacity: 0; } }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes respira { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .97) translateY(1px); } }
@keyframes salta {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  12% { transform: translateY(0) scale(1.08, .9); }
  40% { transform: translateY(-16px) scale(.96, 1.05); }
  62% { transform: translateY(0) scale(1.05, .95); }
  76% { transform: translateY(0) scale(1, 1); }
}
@keyframes sombraSalta { 0%, 100% { transform: scale(1); opacity: .45; } 40% { transform: scale(.68); opacity: .2; } }
@keyframes parpadeo { 0%, 94%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(.1); } }
@keyframes saludaI { from { transform: rotate(-12deg); } to { transform: rotate(14deg); } }
@keyframes saludaD { from { transform: rotate(12deg); } to { transform: rotate(-14deg); } }
@keyframes chispas { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
@keyframes lagrima { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@keyframes idea { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes sacudida {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-9px); }
  40%, 60% { transform: translateX(9px); }
}
@keyframes navSalto { 0% { transform: translateY(0); } 40% { transform: translateY(-5px) scale(1.12); } 100% { transform: none; } }
@keyframes parpadeoLlama { 0%, 100% { transform: scale(var(--escala-llama, 1)) rotate(-3deg); } 50% { transform: scale(calc(var(--escala-llama, 1) * 1.08)) rotate(3deg); } }
@keyframes rebotaEmpieza { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes popEntra { from { opacity: 0; transform: scale(.9) translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes halo { 0%, 100% { transform: scale(.94); opacity: .8; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes llamaCrece { 0% { transform: scale(1); } 40% { transform: scale(1.6) rotate(-8deg); } 100% { transform: scale(1); } }
@keyframes brilla { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: .72; } }
@keyframes parpadeoTexto { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes agita {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(-7deg) scale(1.04); }
  30% { transform: rotate(7deg) scale(1.06); }
  45% { transform: rotate(-6deg) scale(1.06); }
  60% { transform: rotate(5deg) scale(1.04); }
  80% { transform: rotate(-2deg); }
}
@keyframes latidoLuz { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes monedaSale {
  0% { opacity: 0; transform: translate(0, 20px); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)); }
}
@keyframes numeroEntra { 0% { transform: scale(.2) rotate(-20deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes fuegoGrande {
  0% { opacity: 0; transform: scale(.3); }
  30% { opacity: 1; transform: scale(1.18); }
  55% { transform: scale(.95); }
  78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.05) translateY(-24px); }
}
@keyframes fuegoSalta { 0% { transform: scale(1); } 40% { transform: scale(1.5) rotate(-10deg); } 100% { transform: scale(1); } }
@keyframes subePodio { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes giraMoneda { 0%, 100% { transform: rotateY(0); } 50% { transform: rotateY(180deg); } }
@keyframes llena { from { transform: scaleX(0); } }
@keyframes dialogoEntra { from { opacity: 0; transform: scale(.9) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes brillo { to { background-position: -200% 0; } }
@keyframes celdaEntra { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 360px) {
  .stat { padding: 0 9px; font-size: 15px; gap: 4px; }
  .logros { grid-template-columns: repeat(3, 1fr); }
  .avatares { grid-template-columns: repeat(3, 1fr); }
}
