/* ANIMEX · Identidad: la cámara ya está dentro del mundo y se oscurece para preguntar. */
.veil { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: rgb(0 0 0 / .66); opacity: 0; transition: opacity .8s var(--ease-cam); }
.deep .veil { opacity: 1; }
.prog { position: absolute; z-index: 7; top: max(22px, env(safe-area-inset-top)); left: 50%; translate: -50% 0; display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.prog[hidden], .paso[hidden] { display: none; }
.prog li button { display: block; width: 34px; height: 24px; position: relative; }
.prog li button::after { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; border-radius: 2px; background: rgb(255 255 255 / .28); transition: background .3s; }
.prog li.hecho button::after { background: rgb(255 255 255 / .75); }
.prog li.actual button::after { background: #fff; }
.prog li button:disabled { cursor: default; }

.paso { position: absolute; z-index: 6; inset: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 84px var(--gut) max(52px, calc(env(safe-area-inset-bottom) + 36px)); pointer-events: none; }
.paso > * { pointer-events: auto; flex: 0 0 auto; }
.paso > :first-child { margin-top: auto; }   /* abajo si cabe; si no cabe, se desplaza sin cortar el principio */
.paso::-webkit-scrollbar { display: none; }
.paso .q { font-size: clamp(34px, 6.2vw, 92px); font-weight: 800; line-height: .98; letter-spacing: -.03em; max-width: 14em; text-wrap: balance; text-shadow: 0 2px 40px rgb(0 0 0 / .4); }
.paso .sub { margin-top: 14px; max-width: 42ch; font-size: clamp(15px, 1.4vw, 19px); line-height: 1.4; color: var(--tx2); text-wrap: pretty; min-height: 1.4em; }
.paso .r { opacity: 0; transform: translate3d(-14px, 0, 0); transition: opacity .2s, transform .2s; }
.paso.on-copy .r { opacity: 1; transform: none; transition: opacity .6s calc(var(--i) * 80ms), transform .9s var(--ease-out) calc(var(--i) * 80ms); }
.acciones { margin-top: 26px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.atras { height: 52px; padding: 0 4px; font-weight: 600; font-size: 14px; color: var(--tx2); }
.atras:hover { color: #fff; }
.go[disabled] { opacity: .4; cursor: default; }

/* Personajes del mundo elegido */
.pj { margin-top: 30px; display: flex; gap: 14px; overflow-x: auto; padding: 12px 4px 14px; margin-inline: -4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.pj::-webkit-scrollbar { display: none; }
.pj button { flex: 0 0 auto; width: clamp(104px, 11vw, 150px); text-align: left; scroll-snap-align: start; transition: transform .35s var(--ease-out); }
.pj img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; background: #111; outline: 2px solid transparent; outline-offset: 3px; transition: outline-color .2s; }
.pj span { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--tx2); line-height: 1.25; }
.pj button:hover { transform: translateY(-4px); }
.pj button[aria-pressed="true"] { transform: translateY(-8px); }
.pj button[aria-pressed="true"] img { outline-color: #fff; }
.pj button[aria-pressed="true"] span { color: #fff; }
.pj .vacio { font-size: 14px; color: var(--tx2); }

/* Preguntas con respuestas en fila */
.grupo { margin-top: 22px; }
.grupo h3 { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--tx2); margin: 0 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: rgb(0 0 0 / .35); font-size: 14px; font-weight: 600; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.chip:hover { border-color: rgb(255 255 255 / .5); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; }

/* Nombre */
.nombre { margin-top: 28px; display: flex; align-items: center; gap: 20px; }
.medalla { flex: 0 0 auto; width: 88px; height: 88px; border-radius: 50%; overflow: hidden; background: #181818; display: grid; place-items: center; font-size: 34px; font-weight: 800; box-shadow: 0 0 0 2px rgb(255 255 255 / .85); }
.medalla img { width: 100%; height: 100%; object-fit: cover; }
.campo input { display: block; width: min(86vw, 520px); height: 64px; background: none; border: 0; border-bottom: 2px solid rgb(255 255 255 / .4); color: #fff; font: inherit; font-size: clamp(26px, 4vw, 44px); font-weight: 700; letter-spacing: -.02em; outline: none; border-radius: 0; }
.campo input:focus { border-color: #fff; }
.campo input::placeholder { color: rgb(255 255 255 / .35); }
.campo small { display: block; margin-top: 8px; font-size: 12px; color: var(--tx2); min-height: 1.3em; }

/* Revelación */
.pasaporte { margin-top: 26px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.medalla-g { position: relative; width: 112px; height: 112px; flex: 0 0 auto; }
.medalla-g .medalla { width: 100%; height: 100%; box-shadow: none; }
.medalla-g svg { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); rotate: -90deg; }
.medalla-g circle { fill: none; stroke: #fff; stroke-width: 2.5; stroke-dasharray: 340; stroke-dashoffset: 340; }
.paso.on-copy .medalla-g circle { stroke-dashoffset: 0; transition: stroke-dashoffset 1.3s var(--ease-cam) .25s; }
.pasaporte dl { display: grid; gap: 2px; margin: 0; }
.pasaporte dt { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tx2); }
.pasaporte dd { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags b { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .4); }

/* Cuenta */
.cuenta { margin-top: 26px; display: grid; gap: 16px; width: min(100%, 420px); }
.cuenta label { display: block; }
.cuenta label span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--tx2); }
.cuenta input { width: 100%; height: 52px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: rgb(0 0 0 / .5); color: #fff; font: inherit; font-size: 16px; }
.cuenta input:focus { outline: 2px solid #fff; outline-offset: 2px; }
.cuenta .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cuenta .err { min-height: 1.3em; font-size: 13px; color: #ff9aa8; margin: 0; }
.nota { font-size: 12px; color: var(--tx2); margin-top: 14px; max-width: 46ch; }

@media (max-width: 720px) {
  .locked .bar { height: 4vh; }
  .paso { padding-top: 56px; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .paso .q { font-size: clamp(30px, 9.5vw, 44px); }
  .paso .sub { font-size: 14px; margin-top: 10px; }
  .grupo { margin-top: 16px; }
  .chips { gap: 6px; }
  .chip { height: 38px; padding: 0 13px; font-size: 13px; }
  .acciones { margin-top: 18px; }
  .nombre { flex-direction: column; align-items: flex-start; gap: 14px; }
  .pasaporte { gap: 16px; }
  .campo input { height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .veil { transition: opacity .3s; }
  .paso.on-copy .medalla-g circle { transition: none; }
  .paso .r, .paso:not(.on-copy) .r { transform: none; }
}

.paso input { user-select: text; -webkit-user-select: text; }

/* ---------- Carga: el aro de tu avatar gira mientras se crea la cuenta; al acabar se cierra ---------- */
.paso.centrado { align-items: center; text-align: center; }
.carga { margin: auto; display: grid; justify-items: center; gap: 0; }
.aro { position: relative; width: 148px; height: 148px; }
.aro .medalla { width: 100%; height: 100%; box-shadow: none; transform: scale(.82); transition: transform .7s var(--ease-out); }
.aro.listo .medalla { transform: scale(.88); }
.aro svg { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; overflow: visible; }
.aro circle { fill: none; stroke-linecap: round; }
.aro .pista { stroke: rgb(255 255 255 / .14); stroke-width: 2; }
.aro .arco { stroke: #fff; transform-origin: 80px 80px; }
.aro .a1 { stroke-width: 3; stroke-dasharray: 120 332; animation: gira 1.5s linear infinite; }
.aro .a2 { stroke-width: 1.5; stroke-dasharray: 40 412; opacity: .55; animation: gira 2.6s linear infinite reverse; }
.aro .cierre { stroke: #fff; stroke-width: 3; stroke-dasharray: 453; stroke-dashoffset: 453; opacity: 0; }
.aro.listo .arco { opacity: 0; transition: opacity .25s; }
.aro.listo .cierre { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .8s var(--ease-cam); }
@keyframes gira { to { transform: rotate(360deg); } }
.carga-t { margin-top: 30px; font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.02em; }
.carga-s { margin-top: 8px; font-size: 15px; color: var(--tx2); }

/* ---------- Los 3 días de prueba ---------- */
.linea { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 560px; }
.linea li { position: relative; padding-top: 22px; display: flex; flex-direction: column; gap: 2px; }
.linea li::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: rgb(255 255 255 / .25); }
.linea li.on::before { background: #fff; }
.linea li.fin::before { background: linear-gradient(to right, #fff, rgb(255 255 255 / .2)); }
.linea i { position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.linea .fin i { background: #000; box-shadow: 0 0 0 2px #fff; }
.linea b { font-size: 13px; font-weight: 700; }
.linea span { font-size: 12px; color: var(--tx2); line-height: 1.25; }
.fecha { margin-top: 20px; font-size: 15px; color: var(--tx2); }
.fecha b { color: #fff; font-weight: 600; }
.nota b { color: #fff; font-weight: 600; }

@media (max-width: 720px) { .aro { width: 124px; height: 124px; } .linea { max-width: none; } }
@media (prefers-reduced-motion: reduce) {
  .aro .a1, .aro .a2 { animation: none; }
  .aro .a2 { display: none; }
  .aro.listo .cierre { transition: none; }
}
