* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { display: flex; flex-direction: column; background: #140d2b; overflow: hidden; }
/* <main> envuelve las 5 vistas solo por semántica/accesibilidad (ver index.html):
   sin esto, el elemento rompe el flujo flex de body (las vistas dependen de ser
   hijas flex directas con flex:1) y #game-view/#upload-view/#auth-view colapsan
   a altura 0 (bug: lienzo de pintar en blanco). display:contents lo saca del
   árbol de layout sin quitarlo del árbol de accesibilidad. */
main { display: contents; }
:root { --cm-bg:
    radial-gradient(900px 520px at 82% -8%, rgba(124,77,255,.40), transparent 60%),
    radial-gradient(720px 520px at -12% 16%, rgba(255,77,157,.24), transparent 55%),
    #140d2b; }

/* Accesibilidad: foco visible para teclado en TODOS los controles. */
:focus-visible { outline: 3px solid #7c4dff; outline-offset: 2px; }
.icon-btn:focus-visible, #tools button:focus-visible, .nav-cta:focus-visible,
.lp-btn:focus-visible, .paywall-x:focus-visible { outline-color: #fff; }
/* Enlace con aspecto de texto pero accesible por teclado (es un <button>). */
.linkbtn { background: none; border: none; padding: 0; margin: 0; font: inherit;
  color: inherit; cursor: pointer; text-decoration: underline; }
/* sólo para lectores de pantalla */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Vista de subida ---------- */
/* Antes el botón de volver vivía DENTRO de .card con position:sticky para
   seguir alcanzable al hacer scroll — pero al estar sticky, en cuanto el
   scroll bajaba un poco el botón quedaba "pegado" tapando el título/subtítulo
   que aún no habían desplazado lo suficiente (se veían solapados). La causa
   real: la navegación (volver) y el contenido (formulario largo, con scroll
   propio) no deben compartir el mismo contenedor. Ahora #upload-view es una
   columna: .view-topbar (fijo, nunca se desplaza) + .view-scroll (el único
   que hace scroll) — mismo patrón que #app-view/.app-content. Vale igual
   para móvil y escritorio: en pantallas anchas la tarjeta queda centrada con
   más aire alrededor, sin necesitar un diseño aparte.
*/
#upload-view { flex: 1; display: none; flex-direction: column; background: var(--cm-bg); overflow: hidden; }
.view-topbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top)); flex-shrink: 0; }
.view-topbar h1 { color: #fff; font-size: 1.05rem; font-weight: 800; letter-spacing: -.2px; margin: 0; }
.view-scroll { flex: 1; overflow-y: auto; display: flex; align-items: center; justify-content: center; padding: 20px; }
.card {
  background: #fff; border-radius: 22px; padding: 26px; width: 100%; max-width: 440px;
  box-shadow: 0 24px 70px rgba(0,0,0,.45); position: relative;
}

/* ===== App View (Home & Galería) ===== */
/* 100vh en móvil se congela con el tamaño que tuviera la barra de
   direcciones del navegador EN ESE MOMENTO — si luego se esconde/aparece
   dinámicamente (típico al hacer scroll), #app-view ya no coincide con el
   alto real de pantalla y deja un hueco por debajo de la nav bar (con el
   fondo de <body> asomando). 100dvh (dynamic viewport height) se recalcula
   solo con el tamaño real visible; el 100vh de encima es el fallback para
   navegadores que no soporten dvh. */
#app-view {
  flex: 1; display: none; flex-direction: column; background: var(--cm-bg); overflow: hidden;
  height: 100vh; height: 100dvh;
}
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 16px 10px; flex-shrink: 0; }
.app-title { color: #fff; font-size: 1.15rem; font-weight: 800; display: flex; align-items: center; gap: 8px; letter-spacing: -.3px; margin: 0; }
.app-title svg { width: 22px; height: 22px; flex: 0 0 auto; }
.app-actions { display: flex; gap: 8px; align-items: center; }

.user-avatar { width: 38px; height: 38px; border: 2px solid rgba(255,255,255,.2); border-radius: 50%; background: #3b2a5c; color: #fff; font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; position: relative; transition: .15s; }
.user-avatar:active { transform: scale(.92); }
.user-avatar.is-plus { border-color: #ffce4a; background: linear-gradient(135deg, #764ba2, #ff4d9d); box-shadow: 0 0 10px rgba(255,206,74,.4); }
.user-avatar.is-plus::after { content: '✨'; position: absolute; top: -6px; right: -6px; font-size: .7rem; background: #222; border-radius: 50%; padding: 2px; }
/* Rainbow (suscripción, independiente de Plus): borde degradado propio. Si
   además tiene Plus, esta regla gana por ir después con la misma
   especificidad -- el badge 🌈 sustituye al ✨ en vez de acumular los dos. */
.user-avatar.is-rainbow { border: 2px solid transparent; border-image: linear-gradient(135deg, #ff4d4d, #ffce4a, #46d39a, #4d9eff, #a64dff) 1; box-shadow: 0 0 10px rgba(166,77,255,.4); }
.user-avatar.is-rainbow::after { content: '🌈'; position: absolute; top: -6px; right: -6px; font-size: .7rem; background: #222; border-radius: 50%; padding: 2px; }

.icon-btn { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; font-size: 1.05rem; display: flex; align-items: center; justify-content: center; transition: .15s; }
.icon-btn:active { transform: scale(.94); }

/* Bottom Nav — dock flotante tipo HUD de juego: píldora de cristal oscuro
   separada de los bordes con el FAB de crear centrado y sobresaliendo
   (2 pestañas a cada lado). Sigue en position:fixed anclado al viewport real:
   así queda inmune a cualquier desajuste de altura de #app-view (como el bug
   de 100vh de arriba) en vez de depender de que el contenedor flex mida
   exactamente lo que ocupa la pantalla. .app-content compensa con su propio
   padding-bottom para que el contenido no quede tapado detrás. */
.bottom-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(calc(100% - 24px), 440px); display: flex; align-items: center; padding: 5px 8px; background: rgba(26,17,49,.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 4px 18px rgba(124,77,255,.20); z-index: 50; }
.nav-item { flex: 1; min-width: 0; background: none; border: none; color: rgba(255,255,255,.55); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; font-size: .68rem; font-weight: 700; cursor: pointer; transition: color .2s; }
.nav-item > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item.active { color: #fff; }
/* Icono de dos capas (contorno/relleno) que se cruzan al activar la pestaña
   con transición, no un cambio brusco — el contorno se aleja/encoge y el
   relleno se acerca/agranda, con una sombra suave debajo cuando está activo. */
.nav-ic { position: relative; width: 24px; height: 24px; }
.nav-ic svg { position: absolute; inset: 0; width: 24px; height: 24px; transition: opacity .28s ease, transform .28s cubic-bezier(.34,1.56,.64,1); }
.nav-ic .ic-off { opacity: 1; transform: scale(1); }
.nav-ic .ic-on { opacity: 0; transform: scale(.55); }
.nav-item.active .nav-ic .ic-off { opacity: 0; transform: scale(1.35); }
.nav-item.active .nav-ic .ic-on { opacity: 1; transform: scale(1); }
.nav-ic::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 28px; height: 10px; transform: translateX(-50%) scale(.6); border-radius: 50%; background: radial-gradient(ellipse, rgba(255,255,255,.35), transparent 70%); opacity: 0; transition: opacity .28s ease, transform .28s ease; pointer-events: none; }
.nav-item.active .nav-ic::after { opacity: 1; transform: translateX(-50%) scale(1); }
/* FAB central: sobresale del dock con un anillo del color del fondo (efecto
   cuna) y un halo degradado que respira detrás. */
.nav-fab-wrap { position: relative; flex: 0 0 66px; height: 48px; display: flex; justify-content: center; }
.nav-fab { position: absolute; top: -27px; width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(135deg, #ff4d9d, #7c4dff); border: none; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 5px rgba(20,13,43,.9), 0 10px 24px rgba(124,77,255,.5); cursor: pointer; transition: transform .2s; }
.nav-fab::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: linear-gradient(135deg, #ff4d9d, #7c4dff); filter: blur(12px); z-index: -1; animation: fabGlow 3.2s ease-in-out infinite; }
@keyframes fabGlow { 0%, 100% { opacity: .35; transform: scale(.96); } 50% { opacity: .6; transform: scale(1.08); } }
.nav-fab:active { transform: scale(.92); }
@media (prefers-reduced-motion: reduce) { .nav-fab::after { animation: none; opacity: .4; } }

/* Content Area */
/* padding-bottom para que el contenido no quede tapado tras el dock
   flotante fixed (~58px de dock + 12px de separación + FAB que sobresale). */
.app-content { flex: 1; overflow-y: auto; display: flex; flex-direction: column; padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.tab-pane { display: none; flex-direction: column; padding: 16px; padding-bottom: 24px; }
.tab-pane.active { display: flex; }
/* "Más" (antes un cajón modal detrás del avatar, ver views.js::renderMoreTab):
   sin relleno propio, el banner/cabecera de perfil quedan de borde a borde
   como en el modal original; las filas usan el padding de .drawer-content. */
/* La pestaña Más usa el padding estándar de .tab-pane y el fondo oscuro de la
   app (su tematización vive junto al resto de estilos del cajón, más abajo). */

/* Home Elements */
.sec-title { color: rgba(255,255,255,.95); font-size: .85rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 12px 0; display: flex; align-items: center; gap: 8px; }

/* Modos Grid */
.modes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-card { background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.1); border-radius: 16px; padding: 18px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: .15s; }
.mode-card:active { transform: scale(.97); }
.mode-card.active { background: rgba(124,77,255,.15); border-color: rgba(124,77,255,.4); }
.mode-card:hover:not(.locked) { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); }
.mode-card.locked { opacity: .5; cursor: not-allowed; }
.m-icon { font-size: 1.6rem; flex-shrink: 0; }
.m-info b { display: block; color: #fff; font-size: .92rem; margin-bottom: 2px; }
.m-info small { color: rgba(255,255,255,.55); font-size: .72rem; }

/* Modos Grid en tema claro (cajón) */
.acct-drawer .mode-card { background: #f6f6f9; border-color: #e8e6f2; }
.acct-drawer .mode-card:hover:not(.locked) { background: #fff; border-color: #d1ccf0; }
.acct-drawer .mode-card.active { background: #f4f1ff; border-color: #7c4dff; }
.acct-drawer .m-info b { color: #2e2e36; }
.acct-drawer .m-info small { color: #77778a; }
/* Gallery Utils */
.gal-utils { display: flex; gap: 10px; margin-bottom: 16px; }
.util-btn { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); color: #fff; border-radius: 20px; padding: 8px 14px; font-size: .85rem; font-weight: 700; display: flex; align-items: center; gap: 6px; cursor: pointer; transition: .15s; }
.util-btn:active { background: rgba(255,255,255,.2); transform: scale(.96); }
.util-btn.has-filter { background: rgba(124,77,255,.3); border-color: rgba(124,77,255,.6); }

/* Pestañas rápidas de la galería (en progreso / completadas / favoritas):
   sustituyen al filtro "Estado" de dentro del drawer por un segmentado
   siempre visible, como el selector pincel/check/estrella de referencia. */
.gal-quick-tabs { display: flex; justify-content: center; gap: 4px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 5px; margin-bottom: 10px; }
.qtab { flex: 1; background: none; border: none; color: rgba(255,255,255,.55); border-radius: 12px; padding: 9px 0; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: .15s; }
.qtab svg { width: 18px; height: 18px; }
.qtab.active { background: #fff; color: #7c4dff; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.qtab-label { color: rgba(255,255,255,.85); font-weight: 800; font-size: .95rem; margin: 4px 2px 14px; }

/* Recent Card (dark, compact, horizontal) */
.recent-wrap { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 14px; cursor: pointer; transition: .2s; margin-bottom: 12px; position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.recent-wrap:hover { background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.05)); border-color: rgba(255,255,255,.2); }
.recent-wrap:active { transform: scale(.98); }
.recent-thumb { width: 90px; height: 90px; border-radius: 14px; overflow: hidden; flex-shrink: 0; background: #222; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
@media (min-width: 600px) { .recent-thumb { width: 120px; height: 120px; } }
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recent-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.recent-info .pct { font-size: 1.05rem; color: #fff; font-weight: 800; margin-bottom: 10px; display: block; letter-spacing: -.2px; }
.recent-info .bar { height: 8px; background: rgba(255,255,255,.1); border-radius: 4px; overflow: hidden; width: 100%; margin-bottom: 12px; }
.recent-info .bar > div { height: 100%; background: linear-gradient(90deg, #ff4d9d, #7c4dff); border-radius: 4px; box-shadow: 0 0 10px rgba(255,77,157,.4); }
.recent-play { align-self: flex-end; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.2); color: #fff; display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; cursor: pointer; transition: .15s; }
.recent-play svg { width: 14px; height: 14px; fill: currentColor; }
.recent-wrap:hover .recent-play { background: #fff; color: #000; box-shadow: 0 4px 12px rgba(255,255,255,.2); }

/* Levels Progress Row (Home) */
.home-levels-wrap { margin-top: 10px; margin-bottom: 24px; }
.levels-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.levels-row::-webkit-scrollbar { height: 0px; }
.home-lv-card { position: relative; flex: 0 0 110px; scroll-snap-align: start; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; cursor: pointer; transition: .2s; }
.home-lv-card.done { border-color: rgba(46,194,126,.4); background: rgba(46,194,126,.1); }
.home-lv-card.open { border-color: rgba(124,77,255,.4); background: rgba(124,77,255,.15); }
.home-lv-card.locked { opacity: .5; cursor: not-allowed; }
.home-lv-card:hover:not(.locked) { transform: translateY(-2px); border-color: rgba(255,255,255,.3); }
.home-lv-card .th { width: 60px; height: 60px; border-radius: 12px; background: #222; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; overflow: hidden; position: relative; }
.home-lv-card .th img { width: 100%; height: 100%; object-fit: cover; }
.home-lv-card .bdg { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: #222; border: 2px solid #140d2b; display: flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 800; color: #fff; }
.home-lv-card.done .bdg { background: #2ec27e; }
.home-lv-card.open .bdg { background: #7c4dff; }
.home-lv-card b { font-size: .8rem; color: #fff; }
.home-lv-card small { font-size: .65rem; color: rgba(255,255,255,.6); text-transform: uppercase; font-weight: 700; letter-spacing: .5px; }

.drawer-row input[type="radio"], .consent-row input[type="radio"] { width: 22px; height: 22px; accent-color: #7c4dff; }

@media (max-width: 400px) {
  .view-scroll { padding: 12px; }
  .view-topbar { padding-left: 12px; padding-right: 12px; }
  .card { padding: 20px; }
  .app-header { padding: 12px 10px 10px; gap: 6px; }
  .app-title { font-size: 1rem; gap: 6px; }
  .user-avatar { width: 34px; height: 34px; font-size: 1rem; }
  .app-actions { gap: 6px; }
  .d-none-sm { display: none; }
}

.gal-grid-unified { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 14px; }
.gal-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 22px rgba(0,0,0,.28); cursor: pointer; position: relative; transition: transform .12s; }
.gal-card:active { transform: scale(.97); }
.gal-card .thumb-wrap { position: relative; aspect-ratio: 1; background: #f0f0f4; overflow: hidden; }
.gal-card .thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-card .badge-done { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%; background: #2ec27e; color: #fff; font-size: .85rem; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.gal-card .thumb-badges { position: absolute; bottom: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; }
.gal-card .badge-diff { background: rgba(0,0,0,.55); color: #fff; font-size: .66rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; flex-shrink: 0; }
/* Insignia de MODO (#96): distingue regalo/a dos/relevos/niveles del clásico.
   Pastilla de color con texto (estilo "Blend"/"Rare"), no solo el emoji suelto
   de antes — el color de fondo lo pone GAL_MODE_BADGES[mode].color en línea. */
.gal-card .badge-mode { color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .2px; padding: 4px 8px; border-radius: 8px; line-height: 1.1; box-shadow: 0 2px 6px rgba(0,0,0,.3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }
/* Regalo sin completar: se pinta a ciegas — la miniatura no puede hacer spoiler */
.gal-card .thumb.gift-blur, .recent-thumb img.gift-blur { filter: blur(6px) saturate(1.1); transform: scale(1.05); }
.gal-card .thumb.blurred, .recent-thumb img.blurred { filter: blur(16px) saturate(1.2); transform: scale(1.15); }
.gift-mask { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; z-index: 1; pointer-events: none; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.recent-thumb { position: relative; }
.gal-card .meta { padding: 9px 11px; }
.gal-card .bar { height: 6px; background: #ececf2; border-radius: 3px; overflow: hidden; }
.gal-card .bar > div { height: 100%; background: linear-gradient(90deg, #ff4d9d, #7c4dff); }
.gal-card .pct { font-size: .74rem; color: #6a6a72; margin-top: 5px; font-weight: 700; display: block; }
.gal-card .done-label { font-size: .82rem; color: #2ec27e; font-weight: 800; }
/* Fila de acciones rápidas de la tarjeta (favorito + borrar), esquina
   superior derecha. El favorito también se puede marcar con un toque largo
   en cualquier punto de la tarjeta (ver gallery.js::_bindLongPress). */
.gal-card .thumb-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 6px; z-index: 1; }
.gal-card .fav-btn, .gal-card .del { width: 32px; height: 32px; border: none; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; font-size: .9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.gal-card .fav-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; transition: fill .15s, stroke .15s; }
.gal-card .fav-btn.on svg { fill: #ffce4a; stroke: #ffce4a; }
.skel .thumb-wrap { background: #e0e0e6; animation: skel-pulse 1.5s infinite ease-in-out; }
.skel .meta { padding: 12px; }
.skel .sk-line { height: 10px; background: #e0e0e6; border-radius: 4px; margin-bottom: 8px; animation: skel-pulse 1.5s infinite ease-in-out; }
.skel .sk-line.short { width: 60%; margin-bottom: 0; }
@keyframes skel-pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.gal-empty { color: #fff; text-align: center; margin: auto; opacity: .85; line-height: 1.6; font-size: .92rem; }
.gal-empty .empty-ic { width: 56px; height: 56px; opacity: .5; margin-bottom: 12px; }
.card h1 { font-size: 1.4rem; color: #333; margin-bottom: 4px; }
.card p.sub { color: #6a6a72; font-size: .85rem; margin-bottom: 20px; }
.drop {
  border: 2px dashed #c9c9d6; border-radius: 14px; padding: 28px 16px; text-align: center;
  transition: .2s; color: #777; margin-bottom: 18px;
}
.drop.over { border-color: #764ba2; background: #f7f5ff; color: #764ba2; }
.drop .big { font-size: 2.4rem; }
.drop small { display: block; margin-top: 6px; font-size: .75rem; color: #767676; }
/* Elegir de la galería vs. hacer una foto ahora (capture="environment" en
   #file-camera, ver upload.js): dos CTA claras en vez de una única zona de
   toque "adivina qué hará". */
.drop-actions { display: flex; gap: 10px; margin-top: 18px; }
.drop-opt { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff; border: 1px solid #e2e2ea; border-radius: 12px; padding: 14px 8px; font-family: inherit; font-weight: 700; font-size: .78rem; color: #4a4a55; cursor: pointer; transition: .15s; }
.drop-opt:hover { border-color: #764ba2; color: #764ba2; background: #f7f5ff; }
.drop-opt:active { transform: scale(.96); }
.drop-opt svg { width: 22px; height: 22px; }
#preview-thumb { max-width: 100%; max-height: 180px; border-radius: 10px; margin: 0 auto 14px; display: none; }

.knob { margin-bottom: 14px; }
.knob label { display: flex; justify-content: space-between; font-size: .82rem; color: #555; margin-bottom: 6px; font-weight: 600; }
.knob label .val { color: #764ba2; }
.knob input[type=range] { width: 100%; accent-color: #764ba2; }
.knob small { color: #aaa; font-size: .7rem; }

.row { display: flex; gap: 10px; }
.row .knob { flex: 1; }

.presets { display: flex; gap: 8px; margin-bottom: 16px; }
.preset { flex: 1; border: 2px solid #e2e2ea; background: #fff; border-radius: 10px; padding: 9px 4px; font-size: .8rem; font-weight: 700; color: #777; cursor: pointer; transition: .15s; }
.preset:hover { border-color: #c9c4ec; }
.preset.selected { border-color: #764ba2; background: #f4f1ff; color: #764ba2; }
.preset small { display: block; font-weight: 400; font-size: .65rem; color: #aaa; margin-top: 2px; }
.preset.selected small { color: #9b86c9; }

.backend { display: flex; gap: 8px; align-items: center; margin: 6px 0 18px; }
.backend input { flex: 1; border: 1px solid #ddd; border-radius: 8px; padding: 8px; font-size: .8rem; }
.backend label { font-size: .7rem; color: #999; }

.ai-toggle { display: flex; align-items: center; gap: 10px; background: #f4f1ff; border: 1px solid #e2dcf7; border-radius: 12px; padding: 12px; margin-bottom: 14px; cursor: pointer; }
.ai-toggle input { width: 20px; height: 20px; accent-color: #764ba2; flex: 0 0 auto; }
.ai-toggle span { display: flex; flex-direction: column; font-size: .85rem; color: #553; }
.ai-toggle small { color: #998; font-size: .72rem; margin-top: 2px; }

.ai-quota { display: block; font-size: .72rem; color: #886; margin: -8px 0 12px 4px; }
.ai-quota.low { color: #c0392b; font-weight: 700; }

.ai-style-picker { margin: -6px 0 14px; padding: 12px; background: #faf9ff; border: 1px solid #ece7f8; border-radius: 12px; }
.ai-style-label { font-size: .78rem; font-weight: 700; color: #664; margin-bottom: 8px; }
.style-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.style-chip { border: 2px solid #e2e2ea; background: #fff; border-radius: 999px; padding: 7px 13px; font-size: .78rem; font-weight: 700; color: #777; cursor: pointer; font-family: inherit; transition: .12s; }
.style-chip.selected { border-color: #764ba2; background: #f4f1ff; color: #764ba2; }
.ai-style-free { width: 100%; border: 1px solid #ddd; border-radius: 10px; padding: 10px 12px; font-size: .82rem; font-family: inherit; box-sizing: border-box; }

.ai-consent-row { display: flex; align-items: flex-start; gap: 10px; background: #fff8ec; border: 1px solid #f0e2c0; border-radius: 12px; padding: 10px 12px; margin: -6px 0 14px; cursor: pointer; }
.ai-consent-row input { width: 18px; height: 18px; accent-color: #b8860b; flex: 0 0 auto; margin-top: 2px; }
.ai-consent-row span { font-size: .74rem; color: #776; line-height: 1.35; }
.ai-consent-row a { color: #764ba2; font-weight: 700; }

.mode-toggle { display: flex; gap: 8px; margin: -4px 0 14px; }

/* selector de dificultad */
.diff-select { margin: 2px 0 16px; }
.diff-label { font-size: .82rem; font-weight: 700; color: #555; margin-bottom: 8px; }
.diff { display: block; width: 100%; text-align: left; border: 2px solid #e7e7ee; background: #fff; border-radius: 12px; padding: 11px 14px; margin-bottom: 8px; cursor: pointer; font-family: inherit; transition: .12s; }
.diff:last-child { margin-bottom: 0; }
.diff-head { display: flex; align-items: center; justify-content: space-between; }
.diff b { font-size: .95rem; color: #333; }
.diff small { display: block; font-size: .76rem; color: #767676; margin-top: 2px; }
.diff .dots { display: flex; gap: 4px; }
.diff .dots i { width: 7px; height: 7px; border-radius: 50%; background: #dcdce4; }
.diff .dots i.on { background: #b9a9e6; }
.diff.selected { border-color: #764ba2; background: #f6f3ff; }
.diff.selected b { color: #764ba2; }
.diff.selected .dots i.on { background: #7c4dff; }
.diff:active { transform: scale(.99); }
.mode { flex: 1; border: 2px solid #e2e2ea; background: #fff; border-radius: 10px; padding: 8px 4px; font-size: .82rem; font-weight: 700; color: #777; cursor: pointer; }
.mode small { display: block; font-weight: 400; font-size: .64rem; color: #aaa; margin-top: 2px; }
.mode.selected { border-color: #764ba2; background: #f4f1ff; color: #764ba2; }
.mode.selected small { color: #9b86c9; }

.btn {
  width: 100%; border: none; border-radius: 13px; padding: 15px; font-size: 1.02rem; font-weight: 800;
  color: #fff; background: linear-gradient(100deg, #ff4d9d, #7c4dff); cursor: pointer; transition: .15s;
  box-shadow: 0 10px 26px rgba(124,77,255,.4);
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(.97); }
.err { color: #c0392b; font-size: .8rem; margin-top: 10px; min-height: 1em; text-align: center; }

/* ---------- Overlay de carga ---------- */
#loading-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none;
  align-items: center; justify-content: center; flex-direction: column; color: #fff; z-index: 50;
}
.spinner { width: 54px; height: 54px; border: 5px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#loading-overlay p { margin-top: 16px; font-weight: 600; }

/* ---------- Vista de juego ---------- */
#game-view { flex: 1; display: none; flex-direction: column; }
#topbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); z-index: 10; }
#back-btn { border: none; background: #eee; border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 1rem; }
#progress-wrap { flex: 1; height: 10px; background: #eee; border-radius: 5px; overflow: hidden; }
#progress-bar { height: 100%; width: 0%; background: #d63384; transition: width .3s ease; }
#progress-pct { font-size: .8rem; color: #777; min-width: 38px; text-align: right; }

#viewport { flex: 1; position: relative; overflow: hidden; background: #e6e6e6; touch-action: none; }
#shake-layer { position: relative; width: 100%; height: 100%; }
#shake-layer.shake { animation: shake .3s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-8px)} 75%{transform:translateX(8px)} }
#zoom-layer { transform-origin: 0 0; transition: none; position: absolute; top: 0; left: 0; }
#svg-canvas { display: block; }

.region { fill: #fafafa; stroke: #2e2e2e; stroke-width: 1; stroke-linejoin: round; cursor: pointer; }
.region.painted { stroke-opacity: .45; }
/* modo IA con capa de dibujo: las lineas las pone el overlay, las areas van en blanco sin borde */
#svg-canvas.has-overlay .region { stroke: none; fill: #ffffff; }
#svg-canvas.has-overlay .region.target { fill: url(#checker); }
/* LOD: al alejar se ocultan bordes/numeros de regiones diminutas */
.region.lod { stroke-opacity: 0; }
.rlabel.lod { display: none; }
/* regiones del color seleccionado: relleno de cuadricula gris (estilo Happy
   Color), estatico. El relleno (url(#checker)) lo pone el JS. */
.region.target { stroke: #888; }
/* pista: parpadeo fuerte del borde */
.region.hintpulse { stroke: #d63384; stroke-width: 3; animation: hintPulse .55s ease-in-out infinite; }
@keyframes hintPulse { 0%,100% { stroke-opacity: 1; } 50% { stroke-opacity: .15; } }
/* foco de teclado (#49): navegación con flechas entre regiones pendientes del
   color seleccionado; distinto del pulso de pista (discontinuo, sin animar). */
.region.kbfocus { stroke: #7c4dff; stroke-width: 4; stroke-dasharray: 6 3; }
.rlabel { fill: #555; font-family: sans-serif; text-anchor: middle; dominant-baseline: central; pointer-events: none; user-select: none; }
.rlabel.hidden { display: none; }   /* el numero desaparece al pintar */
/* En victoria ocultamos lineas y numeros para revelar el poster limpio */
#svg-canvas.revealed .region { stroke-opacity: 0; transition: stroke-opacity .8s ease; }
#svg-canvas.revealed .rlabel { opacity: 0; transition: opacity .6s ease; }

/* barra de herramientas flotante */
#tools { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 20; }
#tools button { width: 46px; height: 46px; border: none; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.22); font-size: 1.25rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#tools button:active { transform: scale(.92); }
#tools button.accent { background: #d63384; color: #fff; }

/* ---------- Paleta (reusa el estilo del juego) ---------- */
.paleta-container { flex: 0 0 100px; background: #fff; display: flex; align-items: center; box-shadow: 0 -2px 10px rgba(0,0,0,.1); padding: 10px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
.paleta { display: flex; gap: 12px; padding: 5px 0; }
.color-btn { --btn-color: #ccc; --progress: 0%; min-width: 60px; height: 60px; border-radius: 15px; position: relative; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,.15); transition: all .2s ease; background: var(--btn-color); display: flex; justify-content: center; align-items: center; border: 3px solid transparent; overflow: hidden; }
.color-btn::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: var(--progress); background: rgba(255,255,255,.4); pointer-events: none; transition: height .3s ease; }
.color-btn:active { transform: scale(.9); }
.color-btn.selected { border-color: #d63384; box-shadow: 0 0 0 3px rgba(214,51,132,.2), 0 4px 12px rgba(0,0,0,.2); transform: scale(1.1); }
.color-btn.completed { opacity: .6; cursor: not-allowed; }
.color-btn.completed::before { display: none; }
/* numero multitono: marca de esquina (pinta en varios tonos) */
.color-btn.multitone::after { content: ''; position: absolute; top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 16px 16px 0; border-color: transparent rgba(255,255,255,.85) transparent transparent; }
.color-number { font-size: 1rem; font-weight: bold; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
/* vanish al completar un numero: pop con destello y sube desvaneciendose */
@keyframes cbtnVanish {
  0%   { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; box-shadow: 0 3px 8px rgba(0,0,0,.15); }
  28%  { transform: translateY(3px) scale(1.22); box-shadow: 0 0 0 7px rgba(255,255,255,.55), 0 8px 18px rgba(0,0,0,.28); }
  100% { transform: translateY(-58px) scale(.28) rotate(-10deg); opacity: 0; box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.color-btn.vanish { animation: cbtnVanish .55s cubic-bezier(.34,1.25,.4,1) forwards; pointer-events: none; z-index: 6; }
.color-btn.vanish .color-number { font-size: 1.45rem; }

/* seccion avanzada (oculta por defecto) */
.adv { margin-top: 16px; }
.adv summary { font-size: .75rem; color: #aaa; cursor: pointer; }
.backend { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.backend label { font-size: .7rem; color: #999; }
.backend input { flex: 1; border: 1px solid #ddd; border-radius: 8px; padding: 8px; font-size: .8rem; }

/* overflow-y:auto (no el "visible" por defecto): con el título + imagen + 7
   filas de acción + "Pintar otra foto" + "Mis creaciones", el contenido
   puede superar el alto de pantalla (fotos de origen verticales, pantallas
   pequeñas) — sin esto no había NINGUNA forma de hacer scroll y ver/tocar
   los botones que quedaban fuera, ni siquiera con gestos del navegador.
   "safe center" (no "center" a secas): con flex + overflow, un `justify-
   content:center` normal deja el desbordamiento de ARRIBA fuera del área con
   scroll (bug clásico de flexbox) — hacía que, aunque scrollearas hasta el
   tope, el título y la parte superior de la foto quedaran inalcanzables. */
#victory { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; align-items: safe center; justify-content: safe center; flex-direction: column; color: #fff; z-index: 60; padding: 18px; overflow-y: auto; }
.finale-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; }
/* Fijo respecto al viewport (no al scroll interno de #victory): siempre
   alcanzable para cerrar, sin tener que hacer scroll hasta arriba ni abajo. */
.victory-x { position: fixed; top: calc(14px + env(safe-area-inset-top)); right: 16px; width: 36px; height: 36px; border: none; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 1rem; cursor: pointer; z-index: 61; }
#finale-title { font-size: 1.7rem; margin-bottom: 14px; text-align: center; }
.finale-stage { width: 100%; display: flex; justify-content: center; }
#finale-canvas { width: 100%; max-width: 360px; height: auto; border-radius: 14px; background: #fff; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.finale-actions { width: 100%; max-width: 380px; margin-top: 18px; }
.finale-actions .drawer-row:disabled { opacity: .55; }
#victory button.ghost { margin-top: 14px; background: transparent; color: #bbb; border: none; font-weight: 600; cursor: pointer; }

/* ===== Multijugador a dos (#92) ===== */
/* Coop: las piezas del compañero se ven atenuadas (número casi transparente)
   y el cursor no invita a tocar; el path sigue recibiendo el click para poder
   avisar "esa pieza es de tu compañero". */
.rlabel.mp-other { opacity: .22; }
path.region.mp-other { cursor: default; }

/* Hoja "Jugar a dos": .mode-card está pensada para fondo oscuro; dentro de la
   tarjeta blanca necesita su propia paleta clara. */
.mp-sheet .mode-card { background: #f6f6f9; border-color: #e8e6f2; width: 100%; text-align: left; font-family: inherit; }
.mp-sheet .mode-card b { color: #2e2e36; }
.mp-sheet .mode-card small { color: #77778a; }
.mp-join-row { display: flex; gap: 8px; }
.mp-join-row input { flex: 1; min-width: 0; border: 1.5px solid #ded4ff; border-radius: 10px; padding: 10px 12px; font-size: 1rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; text-align: center; font-family: inherit; }
.mp-join-row .plan-cta { width: auto; padding-left: 18px; padding-right: 18px; }

/* Sala de espera: el código grande, para dictarlo en voz alta */
.mp-code { text-align: center; font-size: 2rem; font-weight: 900; letter-spacing: 6px; color: #764ba2; background: #f4f1ff; border: 1.5px dashed #c9b8f5; border-radius: 14px; padding: 14px 8px; margin: 14px 0 16px; user-select: all; }
.mp-secondary { background: #fff; color: #764ba2; border: 1.5px solid #ded4ff; }

/* Carrera: barra de progreso del rival en la barra superior del juego */
#mp-rival { display: flex; align-items: center; gap: 6px; margin-left: 8px; min-width: 96px; }
.mp-rival-tag { font-size: .62rem; font-weight: 800; letter-spacing: .5px; color: #d63384; text-transform: uppercase; }
.mp-rival-track { flex: 1; height: 6px; border-radius: 3px; background: #f0e6ee; overflow: hidden; min-width: 40px; }
.mp-rival-fill { height: 100%; width: 0%; border-radius: 3px; background: linear-gradient(90deg, #d63384, #f093fb); transition: width .4s; }
.mp-rival-pct { font-size: .68rem; font-weight: 800; color: #d63384; min-width: 30px; text-align: right; }

/* ===== Modo Regalo (#96) ===== */
.gift-compose textarea { width: 100%; border: 1.5px solid #ded4ff; border-radius: 12px; padding: 12px; font-family: inherit; font-size: .95rem; resize: vertical; margin-bottom: 10px; }
.gift-compose textarea:focus { outline: none; border-color: #7c4dff; }
.gift-optin { cursor: pointer; }
.gift-optin input[type="checkbox"] { width: 22px; height: 22px; accent-color: #7c4dff; flex-shrink: 0; }
.gift-big { text-align: center; font-size: 3rem; margin-bottom: 6px; }
.gift-intro .paywall-card, .gift-reveal .paywall-card { text-align: center; }
.gift-dedication { font-size: 1.05rem; font-style: italic; color: #4a3b6b; background: #f4f1ff; border-radius: 14px; padding: 16px 14px; margin: 12px 0; overflow-wrap: break-word; }
.gift-reveal-photo { width: 100%; max-height: 300px; object-fit: contain; border-radius: 14px; margin-top: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }

/* Carrera: cuenta atrás 3-2-1 a pantalla completa */
.mp-count { background: rgba(12,8,28,.9); }
.mp-count-num { font-size: 6rem; font-weight: 900; color: #fff; text-shadow: 0 8px 40px rgba(214,51,132,.6); animation: mpPulse 1s ease infinite; }
@keyframes mpPulse { 0% { transform: scale(.8); opacity: .6; } 50% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(.8); opacity: .6; } }

/* ===== Membresía: chip de plan ===== */
.plan-chip { border: 1.5px solid rgba(255,255,255,.7); border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: .8rem; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; white-space: nowrap; }
.plan-chip.member { background: #ffd24a; color: #5a3d00; border-color: #ffd24a; }
.plan-chip.rainbow.member { background: linear-gradient(90deg, #ff4d4d, #ffce4a, #46d39a, #4d9eff, #a64dff); color: #fff; border-color: transparent; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.plan-chip:active { transform: scale(.96); }

/* candado IA cuando no eres miembro */
.ai-toggle.locked { opacity: .9; }
.ai-toggle .lock-badge { margin-left: auto; background: #764ba2; color: #fff; font-size: .68rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; flex: 0 0 auto; }

/* ===== Paywall ===== */
.paywall { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.paywall-card { background: #fff; border-radius: 20px; padding: 22px; width: 100%; max-width: 460px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; position: relative; }
.paywall-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: none; border-radius: 50%; background: #f0f0f4; cursor: pointer; }
.paywall-card h2 { color: #333; font-size: 1.35rem; }
.paywall-sub { color: #6a6a72; font-size: .85rem; margin: 6px 0 16px; }
.plans { display: grid; gap: 12px; }
.plan { border: 2px solid #eee; border-radius: 14px; padding: 14px; }
.plan.plus { border-color: #b9a6f0; }
.plan.pro { border-color: #d63384; }
.plan.rainbow {
  border-width: 2px; border-style: solid; border-color: transparent;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(100deg, #ff4d9d, #ffce4a 55%, #7c4dff) border-box;
}
.plan.rainbow .plan-cta { background: linear-gradient(100deg, #ff4d9d, #7c4dff); }
.plan.current { background: #faf8ff; }
.plan-name { font-weight: 800; color: #333; }
.plan-price { color: #764ba2; font-weight: 800; font-size: 1.1rem; margin-bottom: 8px; }
.plan ul { list-style: none; margin: 0 0 12px; padding: 0; }
.plan li { font-size: .82rem; color: #555; padding: 3px 0 3px 20px; position: relative; }
.plan li::before { content: '✓'; position: absolute; left: 0; color: #4CAF50; font-weight: 800; }
.plan-cta { width: 100%; border: none; border-radius: 10px; padding: 11px; font-weight: 700; background: #764ba2; color: #fff; cursor: pointer; }
.plan.pro .plan-cta { background: #d63384; }
.plan-cta:disabled { background: #e6e6ec; color: #999; cursor: default; }
.paywall-note { text-align: center; color: #6e6e78; font-size: .72rem; margin-top: 14px; }
.modal-input { width: 100%; box-sizing: border-box; border: 1.5px solid #ddd; border-radius: 12px; padding: 13px 14px; font-size: 1rem; margin-bottom: 12px; font-family: inherit; }
.modal-input:focus { outline: none; border-color: #764ba2; }

/* ===== Anuncio (mock) ===== */
.ad-overlay { position: fixed; inset: 0; z-index: 85; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; padding: 18px; }
.ad-box { background: #14141c; border: 1px solid #2a2a38; border-radius: 18px; padding: 26px; width: 100%; max-width: 340px; text-align: center; color: #fff; }
.ad-tag { font-size: .68rem; letter-spacing: 1px; color: #888; }
.ad-art { font-size: 3.4rem; margin: 10px 0; }
.ad-label { font-weight: 700; margin-bottom: 6px; }
.ad-count { color: #aaa; font-size: .85rem; margin-bottom: 14px; }
.ad-skip { border: none; border-radius: 10px; padding: 10px 18px; font-weight: 700; background: #fff; color: #222; cursor: pointer; }
.ad-skip:disabled { background: #33333f; color: #888; cursor: default; }
.ad-foot { margin-top: 14px; font-size: .72rem; color: #777; }

/* ===== Comparador (slider antes/después) ===== */
.cmp { position: fixed; inset: 0; z-index: 82; background: rgba(12,8,28,.96); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; }
.cmp h2 { color: #fff; font-size: 1.2rem; margin-bottom: 14px; }
.cmp-x { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; width: 36px; height: 36px; border: none; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 1rem; cursor: pointer; }
.cmp-stage { position: relative; width: 100%; max-width: 380px; aspect-ratio: 1; border-radius: 16px; overflow: hidden; box-shadow: 0 16px 50px rgba(0,0,0,.55); touch-action: none; user-select: none; -webkit-user-select: none; cursor: ew-resize; background: #fff; }
.cmp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cmp-clip { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.cmp-divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff; transform: translateX(-50%); box-shadow: 0 0 8px rgba(0,0,0,.45); pointer-events: none; }
.cmp-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #555; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; box-shadow: 0 2px 10px rgba(0,0,0,.45); }
.cmp-badge { position: absolute; bottom: 12px; font-size: .72rem; font-weight: 800; color: #fff; background: rgba(0,0,0,.5); padding: 5px 10px; border-radius: 999px; pointer-events: none; }
.cmp-badge.bl { left: 12px; } .cmp-badge.br { right: 12px; }
.cmp-chips { display: flex; gap: 8px; margin-top: 18px; }
.cmp-chip { border: 1.5px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: .85rem; cursor: pointer; font-family: inherit; }
.cmp-chip.on { background: #fff; color: #5a3d8a; border-color: #fff; }
.cmp-hint { color: rgba(255,255,255,.6); font-size: .78rem; margin-top: 14px; }

/* obra compartida por otra persona (#56): enlace #shared=id */
.shared-stage { width: 100%; max-width: 380px; border-radius: 16px; overflow: hidden; box-shadow: 0 16px 50px rgba(0,0,0,.55); background: #fff; }
.shared-img { display: block; width: 100%; height: auto; }

/* recorte/rotación de la foto antes de generar (#60) */
.crop-modal { position: fixed; inset: 0; z-index: 82; background: rgba(12,8,28,.96); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; }
.crop-x { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; width: 36px; height: 36px; border: none; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 1rem; cursor: pointer; }
.crop-title { color: #fff; font-size: 1.2rem; margin-bottom: 14px; text-align: center; }
.crop-stage { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 8px; overflow: hidden; background: #000; box-shadow: 0 16px 50px rgba(0,0,0,.55); }
.crop-stage canvas { display: block; touch-action: none; }
.crop-frame { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); cursor: move; touch-action: none; }
.crop-handle { position: absolute; width: 24px; height: 24px; background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.45); touch-action: none; }
.crop-handle.tl { left: -12px; top: -12px; cursor: nwse-resize; }
.crop-handle.tr { right: -12px; top: -12px; cursor: nesw-resize; }
.crop-handle.bl { left: -12px; bottom: -12px; cursor: nesw-resize; }
.crop-handle.br { right: -12px; bottom: -12px; cursor: nwse-resize; }
.crop-tools { display: flex; gap: 10px; margin-top: 16px; }
.crop-tools button { background: rgba(255,255,255,.14); border: none; color: #fff; border-radius: 12px; padding: 10px 18px; font-weight: 700; font-size: 1.1rem; cursor: pointer; }
.crop-tools button:active { background: rgba(255,255,255,.26); }
.crop-actions { display: flex; gap: 10px; margin-top: 16px; width: 100%; max-width: 420px; }
.crop-actions button { flex: 1; border: none; border-radius: 10px; padding: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.crop-actions .crop-cancel { background: rgba(255,255,255,.14); color: #fff; }
.crop-actions .crop-ok { background: #764ba2; color: #fff; }

/* ===== Toast ===== */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 90; background: #222; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: .9rem; opacity: 0; transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Landing premium (Color Memories) ===== */
#landing-view {
  flex: 1; display: none; flex-direction: column; overflow-y: auto; color: #fff;
  --v: #7c4dff; --m: #ff4d9d; --a: #ffb347;
  background:
    radial-gradient(900px 500px at 80% -8%, rgba(124,77,255,.45), transparent 60%),
    radial-gradient(700px 500px at -10% 18%, rgba(255,77,157,.30), transparent 55%),
    radial-gradient(700px 600px at 110% 80%, rgba(255,179,71,.18), transparent 55%),
    #140d2b;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  scroll-behavior: smooth;
}
#landing-view::-webkit-scrollbar { width: 0; }
.lp-progress { position: sticky; top: 0; height: 3px; width: 0; z-index: 30;
  background: linear-gradient(90deg, var(--m), var(--v), var(--a)); transition: width .1s linear; }

.lp-nav { 
  position: fixed; top: 0; left: 0; right: 0; z-index: 25; 
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; padding-top: calc(18px + env(safe-area-inset-top)); 
  transition: max-width .4s cubic-bezier(0.16, 1, 0.3, 1), 
              padding .4s cubic-bezier(0.16, 1, 0.3, 1), 
              background .4s ease, 
              border-radius .4s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow .4s ease, 
              top .4s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color .4s ease;
  background: transparent; border: 1px solid transparent; border-radius: 0;
}
.lp-nav.is-pill { 
  top: 16px; 
  max-width: calc(100% - 32px); 
  padding: 10px 20px; 
  border-radius: 999px;
  backdrop-filter: blur(20px); background: rgba(20,13,43,.75); 
  border-color: rgba(255,255,255,.12); box-shadow: 0 10px 40px rgba(0,0,0,.3); 
}
@media (min-width: 1032px) {
  .lp-nav.is-pill { max-width: 1000px; padding: 12px 24px; }
}
.lp-logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.05rem; letter-spacing: -.2px; cursor: pointer; min-width: 0; }
.lp-logo svg { width: 26px; height: 26px; flex: 0 0 auto; }
.lp-logo b { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-center { flex: 1; display: flex; justify-content: center; gap: 24px; }
.nav-link { color: rgba(255,255,255,.72); font-size: .9rem; font-weight: 600; text-decoration: none; transition: color .2s; }
.nav-link:hover { color: #fff; }
@media (max-width: 700px) { 
  .nav-center { display: none; }
  #landing-login { display: none; }
  .lp-nav { padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); }
  .lp-nav.is-pill { padding: 8px 16px; top: 12px; }
}
@media (max-width: 400px) {
  .lp-logo b { display: none; }
  #landing-dl { padding: 8px 12px; font-size: .8rem; }
}
.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang-drop { position: relative; }
.lang-btn { background: transparent; border: none; color: rgba(255,255,255,.7); cursor: pointer; padding: 8px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.lang-btn:hover, .lang-drop.open .lang-btn { color: #fff; background: rgba(255,255,255,.08); }
.lang-btn svg { width: 20px; height: 20px; }
.lang-menu { position: absolute; top: calc(100% + 8px); right: 50%; transform: translateX(50%) translateY(-10px); background: #1a142f; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 130px; box-shadow: 0 14px 40px rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: all .2s cubic-bezier(0.4, 0, 0.2, 1); z-index: 30; }
.lang-drop.open .lang-menu { opacity: 1; pointer-events: auto; transform: translateX(50%) translateY(0); }
.lang-opt { background: transparent; border: none; color: rgba(255,255,255,.7); padding: 8px 12px; text-align: left; font-size: .9rem; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all .2s; display: flex; align-items: center; justify-content: space-between; }
.lang-opt:hover { background: rgba(255,255,255,.08); color: #fff; }
.lang-opt.active { background: rgba(255,255,255,.12); color: #fff; }

/* Menú del avatar de la landing (logueado): "Ir a tu cuenta" / "Cerrar
   sesión" — mismo lenguaje visual que .lang-drop/.lang-menu de arriba. */
.acct-drop { position: relative; }
.acct-menu { position: absolute; top: calc(100% + 8px); right: 0; background: #1a142f; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 170px; box-shadow: 0 14px 40px rgba(0,0,0,.4); opacity: 0; transform: translateY(-10px); pointer-events: none; transition: all .2s cubic-bezier(0.4, 0, 0.2, 1); z-index: 30; }
.acct-drop.open .acct-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.acct-menu-item { background: transparent; border: none; color: rgba(255,255,255,.8); padding: 10px 12px; text-align: left; font-size: .9rem; font-weight: 700; border-radius: 8px; cursor: pointer; transition: all .2s; font-family: inherit; }
.acct-menu-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.acct-menu-item.danger { color: #ff6b6b; }
.acct-menu-item.danger:hover { background: rgba(255,107,107,.12); }

.nav-cta { border-radius: 999px; padding: 9px 18px; font-weight: 700; font-size: .9rem; cursor: pointer; font-family: inherit; transition: all .2s; }
.nav-cta.outline { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.05); color: #fff; }
.nav-cta.outline:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }
.nav-cta.solid { border: none; background: #fff; color: #000; box-shadow: 0 2px 10px rgba(255,255,255,.15); }
.nav-cta.solid:hover { background: #f0f0f4; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(255,255,255,.25); }
.nav-cta:active { transform: scale(.96) !important; }

.lp-wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* hero */
.lp-hero { text-align: center; padding: 100px 0 40px; position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
/* SEO/perf: estas 3 capas del hero de la landing (lo PRIMERO que carga
   cualquier visita, con o sin sesión) pesaban 1.15MB combinadas (hero-bg.png
   657KB mal comprimido, hero-cbn.svg 289KB, hero-lines.svg 201KB de paths
   vectoriales). Son texturas de fondo enmascaradas (nadie las ve nítidas ni
   a tamaño real) — rasterizarlas a WebP a la misma resolución (1024x1024,
   sin pérdida perceptible) las deja en ~107KB combinadas (-91%). Afecta
   directamente a LCP/Core Web Vitals, señal de ranking real en Google. */
.hero-bg-photo { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('/hero-bg.webp') center/cover no-repeat; }
.hero-bg-lines { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('/hero-lines.webp') center/cover no-repeat; -webkit-mask-image: linear-gradient(105deg, transparent 25%, black 35%); mask-image: linear-gradient(105deg, transparent 25%, black 35%); }
.hero-bg-cbn { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('/hero-cbn.webp') center/cover no-repeat; -webkit-mask-image: linear-gradient(105deg, transparent 60%, black 70%); mask-image: linear-gradient(105deg, transparent 60%, black 70%); }
.hero-bg-gradient { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, #140d2b 0%, rgba(20,13,43,0.7) 40%, transparent 100%); }

.hero-content { position: relative; z-index: 10; max-width: 800px; padding: 0 24px; margin-top: 60px; }
.lp-badge { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); padding: 8px 16px; border-radius: 999px; margin-bottom: 24px; backdrop-filter: blur(10px); }
.lp-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--m); box-shadow: 0 0 12px var(--m); }
.lp-hero h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); line-height: 1.05; font-weight: 800; letter-spacing: -1.5px; margin: 0 auto; text-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.lp-hero h1 .grad { background: linear-gradient(100deg, var(--m), var(--a) 55%, var(--v));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-hero .sub { margin: 24px auto 32px; font-size: clamp(1.1rem, 4vw, 1.4rem); color: rgba(255,255,255,.9); max-width: 40ch; line-height: 1.5; text-shadow: 0 4px 20px rgba(0,0,0,0.5); font-weight: 500; }
.lp-actions { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.lp-btn { border: none; border-radius: 999px; padding: 18px 40px; font-weight: 800; font-size: 1.15rem; cursor: pointer; font-family: inherit;
  background: linear-gradient(100deg, var(--m), var(--v)); color: #fff; box-shadow: 0 14px 40px rgba(124,77,255,.5); transition: transform .2s, box-shadow .2s; }
.lp-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 20px 50px rgba(255,77,157,.6); }
.lp-btn:active { transform: scale(.97); }
.lp-ghostlink { color: #fff; text-decoration: none; font-size: 1.05rem; font-weight: 600; cursor: pointer; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 999px; padding: 16px 32px; transition: all 0.2s; backdrop-filter: blur(10px); }
.lp-ghostlink:hover { background: rgba(255,255,255,0.2); }
.lp-trust { margin-top: 16px; font-size: .8rem; color: rgba(255,255,255,.7); display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.lp-trust span { display: inline-flex; align-items: center; gap: 5px; }

/* phone mockup con demo que se pinta sola (ELIMINADO) */

/* secciones */
.lp-section { padding: 46px 0; }
.lp-eyebrow { text-align: center; font-size: .8rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--a); margin-bottom: 8px; }
.lp-h2 { text-align: center; font-size: clamp(1.5rem, 6vw, 2.2rem); font-weight: 800; letter-spacing: -.5px; margin: 0 auto 30px; max-width: 18ch; }

/* reveal-on-scroll; si NO hay JS, todo se muestra (no se oculta nunca) */
.reveal { transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal:not(.in) { opacity: 0; transform: translateY(28px); }

/* pruébalo sin cuenta (#lp-try): el módulo de conversión bajo el hero */
#lp-try-section { scroll-margin-top: 84px; }   /* que el nav sticky no tape el título al hacer scroll */
.lp-try-card { max-width: 480px; margin: 0 auto; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px; padding: 22px 18px; text-align: center; }
.lp-try-sub { color: rgba(255,255,255,.75); font-size: .92rem; margin: 0 0 16px; }
#lp-try-thumb { display: block; max-width: 180px; max-height: 180px; margin: 0 auto 14px; border-radius: 14px;
  border: 2px solid rgba(255,255,255,.25); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.lp-try-actions { display: flex; gap: 10px; margin-bottom: 14px; }
/* .drop-opt viene de la vista de subida (fondo claro); aquí va sobre oscuro */
.lp-try-card .drop-opt { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); color: #fff; }
.lp-try-card .drop-opt:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); color: #fff; }
.lp-try-diff { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.lp-chip { border: 1.5px solid rgba(255,255,255,.25); background: transparent; color: rgba(255,255,255,.8);
  border-radius: 999px; padding: 8px 14px; font-family: inherit; font-weight: 700; font-size: .8rem; cursor: pointer; transition: .15s; }
.lp-chip.selected { background: linear-gradient(100deg, var(--m), var(--v)); border-color: transparent; color: #fff; }
.lp-chip:active { transform: scale(.95); }
.lp-try-go { width: 100%; padding: 16px 20px; font-size: 1.05rem; }
.lp-try-go:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
#lp-try-err { margin-top: 10px; }
#lp-try-resume img { display: block; width: 150px; height: 150px; object-fit: cover; margin: 0 auto 14px; border-radius: 14px;
  border: 2px solid rgba(255,255,255,.25); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.lp-try-resume-info { margin-bottom: 16px; }
.lp-try-resume-info b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.lp-try-resume-info small { color: rgba(255,255,255,.65); font-size: .85rem; }
.lp-try-reg { display: block; width: 100%; margin-top: 10px; font-size: .92rem; padding: 13px 20px; }
.lp-try-haveacct { margin: 14px 0 0; font-size: .85rem; color: rgba(255,255,255,.6); }
.lp-try-haveacct .linkbtn { color: #fff; font-weight: 700; }

/* cómo funciona */
.lp-steps { display: grid; gap: 16px; }
.lp-step { display: flex; gap: 16px; align-items: flex-start; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px; padding: 18px; }
.lp-step .num { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem; color: #fff; background: linear-gradient(140deg, var(--m), var(--v)); box-shadow: 0 8px 20px rgba(124,77,255,.4); }
.lp-step h3 { font-size: 1.05rem; margin-bottom: 3px; }
.lp-step p { font-size: .9rem; color: rgba(255,255,255,.7); line-height: 1.45; }

/* features */
.lp-feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.lp-feat { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 18px; padding: 18px; }
.lp-feat .ic { font-size: 1.7rem; display: block; margin-bottom: 10px; }
.lp-feat b { display: block; font-size: 1rem; margin-bottom: 5px; }
.lp-feat small { font-size: .82rem; color: rgba(255,255,255,.68); line-height: 1.45; }

/* pricing */
.lp-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 780px; margin: 0 auto; }
@media (max-width: 760px) {
  .lp-feats { grid-template-columns: 1fr; }
  .lp-prices { grid-template-columns: 1fr; max-width: 340px; }
}
.lp-price { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 22px 18px; text-align: center; position: relative; }
.lp-price.hl { border-color: var(--a); background: rgba(255,179,71,.1); }
.lp-price.rainbow { border: 1px solid transparent; border-image: linear-gradient(135deg, #ff4d4d, #ffce4a, #46d39a, #4d9eff, #a64dff) 1; background: rgba(166,77,255,.08); }
.lp-price .tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--a); color: #3a2600; font-size: .68rem; font-weight: 800; padding: 4px 11px; border-radius: 999px; }
.lp-price .tag.rainbow { background: linear-gradient(90deg, #ff4d4d, #ffce4a, #46d39a, #4d9eff, #a64dff); color: #fff; }
.lp-price .name { font-weight: 800; font-size: 1.05rem; }
.lp-price .amt { font-size: 2rem; font-weight: 800; margin: 4px 0 2px; }
.lp-price .per { font-size: .75rem; color: rgba(255,255,255,.6); }
.lp-price ul { list-style: none; padding: 0; margin: 14px 0 0; text-align: left; }
.lp-price li { font-size: .85rem; padding: 5px 0 5px 22px; position: relative; color: rgba(255,255,255,.82); }
.lp-price li::before { content: '✓'; position: absolute; left: 0; color: #46d39a; font-weight: 800; }
.lp-pricing-more { text-align: center; margin: 18px 0 0; }
.lp-pricing-more a { color: rgba(255,255,255,.85); font-size: .85rem; font-weight: 700; text-decoration: none; }
.lp-pricing-more a:hover { text-decoration: underline; }

/* FAQ (SEO): acordeones nativos <details> con la estética de las lp-feat */
.lp-faq-intro { text-align: center; max-width: 52ch; margin: 0 auto 22px; font-size: .95rem; color: rgba(255,255,255,.72); line-height: 1.55; }
.lp-faq { max-width: 640px; margin: 0 auto; display: grid; gap: 10px; }
.lp-faq details { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 0; overflow: hidden; }
.lp-faq summary { list-style: none; cursor: pointer; font-weight: 700; font-size: .95rem; padding: 15px 44px 15px 18px; position: relative; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; font-weight: 400; color: rgba(255,255,255,.55); transition: transform .18s; }
.lp-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.lp-faq details[open] { border-color: rgba(255,255,255,.22); }
.lp-faq .a { padding: 0 18px 16px; font-size: .88rem; color: rgba(255,255,255,.72); line-height: 1.6; }

/* CTA band + footer */
.lp-cta-band { text-align: center; background: linear-gradient(120deg, rgba(255,77,157,.18), rgba(124,77,255,.22));
  border: 1px solid rgba(255,255,255,.12); border-radius: 26px; padding: 38px 22px; margin: 10px 0; }
.lp-cta-band h2 { font-size: clamp(1.5rem,6vw,2.2rem); font-weight: 800; letter-spacing: -.5px; }
.lp-cta-band p { color: rgba(255,255,255,.75); margin: 10px 0 22px; }
.lp-foot { text-align: center; padding: 28px 20px calc(26px + env(safe-area-inset-bottom)); font-size: .8rem; color: rgba(255,255,255,.72); border-top: 1px solid rgba(255,255,255,.08); }
.lp-foot a { color: rgba(255,255,255,.8); cursor: pointer; }
.lp-foot .brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.lp-foot .brand svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .lp-dot { animation: none; }
}

/* ===== Auth (rediseño "pantalla de juego") =====
   Fondo full-bleed con el arte del hero (hero-cbn.webp, ya cacheado por la
   landing) + velo oscuro + burbujas de color flotantes, como el menú de un
   juego. Escritorio: split marca (perks animados) / caja. Móvil: marca arriba
   y la caja de credenciales como hoja inferior. La caja en sí (.auth-card,
   Google + email) se conserva del diseño anterior a propósito. */
#auth-view { flex: 1; display: none; position: relative; background: #140d2b; overflow-y: auto; overflow-x: hidden; }

/* Fondo fixed: escapa del contenedor con scroll (si fuera absolute solo
   cubriría la primera pantalla al hacer scroll en móviles bajitos). Al ser
   hijo de #auth-view (display:none), desaparece con la vista. */
.auth-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.auth-bg-art { position: absolute; inset: -4%; background: url('/hero-cbn.webp') center/cover no-repeat; opacity: .5; animation: authPan 40s ease-in-out infinite alternate; }
@keyframes authPan { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.1) translate(-1.5%, -1%); } }
.auth-bg-shade { position: absolute; inset: 0; background:
    radial-gradient(900px 520px at 82% -8%, rgba(124,77,255,.42), transparent 60%),
    radial-gradient(720px 520px at -12% 16%, rgba(255,77,157,.30), transparent 55%),
    linear-gradient(to top, rgba(20,13,43,.97) 0%, rgba(20,13,43,.78) 45%, rgba(20,13,43,.55) 100%); }

/* Burbujas de pintura flotantes (partículas de menú de juego). */
.auth-orbs i { position: absolute; border-radius: 50%; background: currentColor; box-shadow: 0 0 22px currentColor; opacity: 0; animation: authOrb 12s ease-in-out infinite; }
.auth-orbs i:nth-child(1) { width: 14px; height: 14px; left: 8%;  top: 72%; color: #ff4d9d; animation-delay: 0s; }
.auth-orbs i:nth-child(2) { width: 9px;  height: 9px;  left: 22%; top: 88%; color: #ffce4a; animation-delay: 2.2s; animation-duration: 14s; }
.auth-orbs i:nth-child(3) { width: 12px; height: 12px; left: 46%; top: 80%; color: #7c4dff; animation-delay: 4.5s; }
.auth-orbs i:nth-child(4) { width: 7px;  height: 7px;  left: 64%; top: 90%; color: #46d39a; animation-delay: 1.4s; animation-duration: 16s; }
.auth-orbs i:nth-child(5) { width: 16px; height: 16px; left: 80%; top: 76%; color: #ff8a65; animation-delay: 6s; }
.auth-orbs i:nth-child(6) { width: 10px; height: 10px; left: 92%; top: 86%; color: #ff4d9d; animation-delay: 8.5s; animation-duration: 13s; }
@keyframes authOrb {
  0%   { transform: translateY(0) translateX(0) scale(.6); opacity: 0; }
  12%  { opacity: .55; }
  85%  { opacity: .25; }
  100% { transform: translateY(-64vh) translateX(4vw) scale(1.05); opacity: 0; }
}

/* Volver a la landing (antes el login era un callejón sin salida). */
.auth-back { position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 14px; z-index: 5; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); backdrop-filter: blur(8px); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s; }
.auth-back:hover { background: rgba(255,255,255,.18); }
.auth-back:active { transform: scale(.92); }

.auth-left, .auth-right { position: relative; z-index: 1; }
.auth-marketing { color: #fff; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.3px; }
.auth-brand svg { width: 30px; height: 30px; filter: drop-shadow(0 4px 12px rgba(255,77,157,.5)); }
.auth-marketing h2 { font-weight: 800; letter-spacing: -1px; line-height: 1.08; text-shadow: 0 10px 30px rgba(0,0,0,.55); text-wrap: balance; }
.auth-grad { background: linear-gradient(100deg, #ff4d9d, #ffce4a 55%, #7c4dff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.auth-marketing p { color: rgba(255,255,255,.85); text-shadow: 0 4px 16px rgba(0,0,0,.5); }

/* Perks estilo menú de juego, con entrada escalonada (reinicia al mostrar la
   vista: pasar de display:none a visible relanza las animaciones CSS). */
.auth-perks { list-style: none; display: flex; flex-direction: column; gap: 12px; padding: 0; }
.auth-perk { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 12px 16px; backdrop-filter: blur(8px); animation: authRise .55s cubic-bezier(.22,1,.36,1) backwards; }
.auth-perk:nth-child(2) { animation-delay: .1s; }
.auth-perk:nth-child(3) { animation-delay: .2s; }
.perk-ic { font-size: 1.4rem; width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(255,77,157,.28), rgba(124,77,255,.28)); border-radius: 12px; }
.perk-txt b { display: block; color: #fff; font-size: .95rem; }
.perk-txt small { color: rgba(255,255,255,.68); font-size: .8rem; }
@keyframes authRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* La caja de credenciales (base; las media queries de abajo la adaptan). */
.auth-card { width: 100%; max-width: 380px; padding: 36px 32px; box-shadow: 0 24px 80px rgba(0,0,0,.5); border: none; border-radius: 20px; background: #fff; position: relative; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 8px; }
.auth-card .sub { margin-bottom: 24px; color: #666; font-size: 0.95rem; line-height: 1.4; }

@media (min-width: 768px) {
  #auth-view { flex-direction: row; }
  .auth-left { flex: 1.15; display: flex; align-items: center; justify-content: center; padding: 48px; }
  .auth-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px; }
  .auth-marketing { max-width: 460px; }
  .auth-brand { font-size: 1.05rem; margin-bottom: 26px; }
  .auth-marketing h2 { font-size: clamp(2.2rem, 4vw, 3.1rem); margin-bottom: 14px; }
  .auth-marketing p { font-size: 1.12rem; margin-bottom: 30px; max-width: 40ch; }
  /* Halo degradado detrás de la caja (marco brillante de modal de juego). */
  .auth-card::before { content: ''; position: absolute; inset: -3px; border-radius: 24px; background: linear-gradient(135deg, #ff4d9d, #7c4dff 55%, #46d39a); filter: blur(16px); opacity: .5; z-index: -1; }
  .auth-card { animation: authRise .55s cubic-bezier(.22,1,.36,1) backwards; animation-delay: .1s; }
}
@media (max-width: 767px) {
  #auth-view { flex-direction: column; }
  .auth-left { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: calc(64px + env(safe-area-inset-top)) 24px 24px; }
  .auth-marketing { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .auth-brand { font-size: 1rem; margin-bottom: 18px; flex-direction: column; gap: 8px; }
  .auth-brand svg { width: 52px; height: 52px; }
  .auth-marketing h2 { font-size: 1.9rem; margin-bottom: 10px; }
  .auth-marketing p { font-size: .98rem; margin-bottom: 20px; max-width: 30ch; }
  /* En móvil los perks se compactan a chips (solo icono + título). */
  .auth-perks { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .auth-perk { gap: 7px; padding: 7px 12px; border-radius: 999px; }
  .perk-ic { width: auto; height: auto; background: none; font-size: 1rem; }
  .perk-txt b { font-size: .78rem; }
  .perk-txt small { display: none; }
  /* La caja de credenciales como hoja inferior a lo app de juego. */
  .auth-right { margin-top: auto; width: 100%; display: flex; justify-content: center; padding: 0; }
  .auth-card { max-width: 480px; border-radius: 26px 26px 0 0; padding: 28px 22px calc(26px + env(safe-area-inset-bottom)); box-shadow: 0 -18px 60px rgba(0,0,0,.55); animation: authSheetUp .5s cubic-bezier(.22,1,.36,1) backwards; }
  @keyframes authSheetUp { from { transform: translateY(48px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .auth-bg-art, .auth-orbs i, .auth-perk, .auth-card { animation: none; }
  .auth-orbs { display: none; }
}

.auth-card input { width: 100%; box-sizing: border-box; border: 1.5px solid #e0e0e0; border-radius: 12px; padding: 13px 14px; font-size: 1rem; margin-bottom: 12px; background: #fafafa; }
.auth-card input:focus { outline: none; border-color: #764ba2; background: #fff; }
.btn-google { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1.5px solid #dadce0; background: #fff; color: #3c4043; border-radius: 12px; padding: 13px; font-size: 1rem; font-weight: 700; cursor: pointer; font-family: inherit; margin-bottom: 0px; }
.btn-google:active { transform: scale(.98); }
.auth-or { display: flex; align-items: center; gap: 10px; color: #aaa; font-size: .8rem; margin: 20px 0; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: #e6e6ee; }
.auth-switch { text-align: center; font-size: .85rem; color: #5f5f68; margin-top: 20px; }
.auth-switch a, .auth-switch .linkbtn { color: #764ba2; font-weight: 700; cursor: pointer; text-decoration: none; }

/* ===== Tutorial ===== */
#tutorial { position: fixed; inset: 0; z-index: 75; background: rgba(20,12,40,.96); display: none; align-items: center; justify-content: center; padding: 22px; }
.tut-card { width: 100%; max-width: 360px; background: #fff; border-radius: 20px; padding: 28px 22px; text-align: center; color: #333; }
.tut-emoji { font-size: 3.4rem; }
.tut-card h3 { margin: 10px 0 8px; }
.tut-card p { color: #777; font-size: .9rem; line-height: 1.5; min-height: 66px; }
.tut-dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0; }
.tut-dots i { width: 8px; height: 8px; border-radius: 50%; background: #ddd; }
.tut-dots i.on { background: #764ba2; }
.tut-actions { display: flex; gap: 10px; }
.tut-actions .skip { flex: 1; border: none; background: #f0f0f4; color: #888; border-radius: 12px; padding: 12px; font-weight: 700; cursor: pointer; }
.tut-actions .next { flex: 2; border: none; background: #764ba2; color: #fff; border-radius: 12px; padding: 12px; font-weight: 700; cursor: pointer; }

/* ===== badge de pistas ===== */
#tool-hint { position: relative; background: linear-gradient(135deg, #ff4d9d, #7c4dff) !important; }
#tool-hint > span:first-child { filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
#tool-hint .hbadge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: #ffce4a; color: #4a2e00; font-size: .64rem; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 4px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }

/* ===== mobile-first: safe areas + toques ===== */
button { touch-action: manipulation; }
#topbar { padding-top: calc(8px + env(safe-area-inset-top)); }
.paleta-container { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
.app-header { padding-top: calc(18px + env(safe-area-inset-top)); }

/* ===== Consentimiento (CMP) ===== */
.consent-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; background: #14141c; color: #eee; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 30px rgba(0,0,0,.4); }
.consent-inner { max-width: 720px; margin: 0 auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.consent-text { flex: 1 1 260px; font-size: .82rem; line-height: 1.45; }
.consent-text a { color: #c9b6f5; }
.consent-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.consent-btns button { border: none; border-radius: 10px; padding: 10px 14px; font-weight: 700; font-size: .85rem; cursor: pointer; }
.c-ghost { background: #2a2a36; color: #ddd; }
.c-primary { background: #d63384; color: #fff; }
.consent-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #eee; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.consent-row span { display: flex; flex-direction: column; }
.consent-row small { color: #999; font-size: .76rem; }
.consent-row input { width: 20px; height: 20px; accent-color: #764ba2; flex: 0 0 auto; }

/* ===== Aviso de versión nueva (Service Worker) — reusa el look del CMP ===== */
.update-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 96; background: #14141c; color: #eee; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 30px rgba(0,0,0,.4); }

/* ===== Ajustes (Account Drawer) ===== */
.acct-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.acct-backdrop.show { opacity: 1; pointer-events: auto; }

.acct-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 400px; background: #f4f4f7; z-index: 101; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); display: flex; flex-direction: column; overflow-y: auto; box-shadow: -10px 0 30px rgba(0,0,0,0.15); padding-top: env(safe-area-inset-top); }
.acct-drawer.show { transform: translateX(0); }

.drawer-close { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.2); border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; transition: background 0.2s; backdrop-filter: blur(4px); }
.drawer-close:hover { background: rgba(255,255,255,0.3); }
.drawer-close svg { width: 20px; height: 20px; }

.drawer-banner { height: 140px; background: linear-gradient(135deg, #ff4d9d, #7c4dff, #46d39a); background-size: 200% 200%; animation: cmGrad 10s ease infinite; position: relative; flex-shrink: 0; }
@keyframes cmGrad { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }

.drawer-head { padding: 0 24px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: -45px; position: relative; z-index: 1; }
.drawer-avatar { width: 90px; height: 90px; border-radius: 50%; background: #fff; border: 4px solid #f4f4f7; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: 800; color: #7c4dff; box-shadow: 0 8px 24px rgba(0,0,0,0.1); margin-bottom: 12px; }
.drawer-avatar svg { width: 44px; height: 44px; color: #ccc; }
.drawer-who { margin-bottom: 4px; }
.drawer-who b { display: block; font-size: 1.3rem; color: #1e1e24; font-weight: 800; margin-bottom: 2px; }
.drawer-who small { color: #6b6b78; font-size: 0.9rem; }
.drawer-badge { display: inline-flex; align-items: center; gap: 4px; background: linear-gradient(90deg, #ffce4a, #ff9f43); color: #fff; padding: 3px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 800; margin-top: 6px; box-shadow: 0 2px 8px rgba(255,159,67,0.3); }
.drawer-badge.rainbow { background: linear-gradient(90deg, #ff4d4d, #ffce4a, #46d39a, #4d9eff, #a64dff); box-shadow: 0 2px 8px rgba(166,77,255,.35); margin-left: 6px; }

.drawer-content { padding: 0 20px 40px; flex: 1; }
.drawer-sec { font-size: 0.75rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #6b6b78; margin: 24px 12px 8px; }
.drawer-card { background: #fff; border-radius: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.02); overflow: hidden; }

.drawer-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: none; background: transparent; padding: 14px 16px; font-family: inherit; font-weight: 600; font-size: 0.95rem; color: #2e2e36; cursor: pointer; transition: background 0.2s; position: relative; }
.drawer-row:not(:last-child)::after { content: ''; position: absolute; bottom: 0; left: 54px; right: 0; height: 1px; background: #f0f0f4; }
.drawer-row:hover { background: #fdfdfd; }
.drawer-row:active { background: #f5f5f9; }

.drawer-icon { width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.drawer-icon svg { width: 16px; height: 16px; color: #fff; }
.drawer-row .chev { margin-left: auto; width: 18px; height: 18px; color: #c6c6d2; flex: 0 0 auto; }

.drawer-row.danger { color: #e74c3c; }

/* Pestaña "Más": heredaba tal cual el look CLARO del cajón modal antiguo
   (página #f4f4f7, tarjetas blancas, banner gigante) y desentonaba con
   Inicio/Premios, que hablan el idioma de tarjetas translúcidas sobre el
   fondo oscuro de la app. Se re-tematiza SOLO aquí (scoped a #tab-more):
   .drawer-row/.drawer-card siguen siendo claros en sus otros usos (drawer
   de filtros, hoja de idioma, acciones del finale). */
#tab-more .more-profile { display: flex; align-items: center; gap: 14px; background: linear-gradient(160deg, rgba(124,77,255,.16), rgba(255,255,255,.05)); border: 1.5px solid rgba(124,77,255,.45); border-radius: 16px; padding: 16px; }
#tab-more .more-avatar { width: 54px; height: 54px; border-radius: 50%; flex: 0 0 auto; background: linear-gradient(135deg, #ff4d9d, #7c4dff); color: #fff; font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(124,77,255,.4); }
#tab-more .more-avatar svg { width: 26px; height: 26px; color: rgba(255,255,255,.9); }
#tab-more .drawer-who { min-width: 0; margin: 0; }
#tab-more .drawer-who b { color: #fff; font-size: 1rem; overflow-wrap: anywhere; }
#tab-more .drawer-who small { color: rgba(255,255,255,.6); font-size: .82rem; }
#tab-more .more-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
#tab-more .more-badges .drawer-badge { margin: 0; }
#tab-more .drawer-sec { color: rgba(255,255,255,.55); margin: 22px 4px 8px; }
#tab-more .drawer-card { background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.1); box-shadow: none; }
#tab-more .drawer-row { color: #f0eef8; }
#tab-more .drawer-row:not(:last-child)::after { background: rgba(255,255,255,.08); }
#tab-more .drawer-row:hover { background: rgba(255,255,255,.05); }
#tab-more .drawer-row:active { background: rgba(255,255,255,.1); }
#tab-more .drawer-row .chev { color: rgba(255,255,255,.35); }
#tab-more .drawer-row.danger { color: #ff8a7a; }
#tab-more .more-version { text-align: center; color: rgba(255,255,255,.35); font-size: .75rem; margin-top: 26px; }

/* ===== Modo niveles ===== */
.lv-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.lv-card { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; border: none; background: #f6f6f9; border-radius: 14px; padding: 10px 12px; font-family: inherit; cursor: pointer; }
.lv-card.locked { opacity: .6; cursor: not-allowed; }
.lv-card.done { background: #eef9f1; }
.lv-card:not(.locked):active { transform: scale(.99); }
.lv-thumb { width: 54px; height: 54px; border-radius: 11px; object-fit: cover; flex: 0 0 auto; background: #e6e6ee; }
.lv-thumb.lv-lock { display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.lv-meta { min-width: 0; flex: 1; }
.lv-meta b { display: block; color: #2e2e36; font-size: .92rem; }
.lv-meta small { color: #6b6b78; font-size: .8rem; }
.lv-badge { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #764ba2; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.lv-card.done .lv-badge { background: #46d39a; color: #fff; }
.lv-card.locked .lv-badge { background: #ececf2; color: #b0b0bc; box-shadow: none; }

/* logros (#62) — pestaña propia sobre fondo oscuro (antes modal claro):
   resumen de progreso estilo juego + parrilla de insignias; lo desbloqueado
   brilla en dorado, lo bloqueado queda apagado en escala de grises. */
.ach-summary { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.12); border-radius: 16px; padding: 14px 16px; margin-bottom: 8px; }
.ach-count { font-weight: 800; color: #ffce4a; font-size: 1.05rem; white-space: nowrap; text-shadow: 0 0 14px rgba(255,206,74,.45); }
.ach-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.ach-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #ffce4a, #ff4d9d); transition: width .6s cubic-bezier(.22,1,.36,1); }
.ach-sub { color: rgba(255,255,255,.6); font-size: .85rem; margin: 0 2px 14px; }
.ach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 4px; }
@media (min-width: 700px) { .ach-grid { grid-template-columns: repeat(3, 1fr); } }
.ach-badge { background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.1); border-radius: 16px; padding: 16px 10px; text-align: center; }
.ach-ic { font-size: 1.9rem; margin-bottom: 6px; filter: grayscale(1); opacity: .4; }
.ach-badge b { display: block; color: rgba(255,255,255,.5); font-size: .85rem; }
.ach-badge small { color: rgba(255,255,255,.35); font-size: .74rem; }
.ach-badge.on { background: linear-gradient(160deg, rgba(255,206,74,.15), rgba(255,255,255,.05)); border-color: rgba(255,206,74,.45); box-shadow: 0 0 18px rgba(255,206,74,.14); }
.ach-badge.on .ach-ic { filter: none; opacity: 1; }
.ach-badge.on b { color: #fff; }
.ach-badge.on small { color: rgba(255,255,255,.65); }

/* premios (#136) — recompensa por logro: etiqueta apagada mientras está
   bloqueado, botón dorado cuando se puede reclamar, check al reclamarlo. */
.ach-reward { display: inline-block; margin-top: 8px; font-size: .74rem; font-weight: 800; color: rgba(255,255,255,.35); }
.ach-reward.claim { border: none; border-radius: 999px; padding: 6px 12px; background: linear-gradient(90deg, #ffce4a, #ff9f43); color: #3a2a00; cursor: pointer; box-shadow: 0 2px 10px rgba(255,206,74,.35); }
.ach-reward.claim:active { transform: scale(.96); }
.ach-reward.got { color: #7ee2a8; }

/* premios (#136) — tarjeta de la recompensa diaria, arriba del hub */
.daily-card { display: flex; align-items: center; gap: 12px; background: linear-gradient(160deg, rgba(255,77,157,.16), rgba(255,255,255,.05)); border: 1.5px solid rgba(255,77,157,.45); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; }
.daily-card .daily-ic { font-size: 1.7rem; }
.daily-card .daily-tx { flex: 1; min-width: 0; }
.daily-card .daily-tx b { display: block; color: #fff; font-size: .92rem; }
.daily-card .daily-tx small { color: rgba(255,255,255,.6); font-size: .78rem; }
.daily-btn { border: none; border-radius: 999px; padding: 10px 14px; font-weight: 800; font-size: .82rem; background: linear-gradient(90deg, #ff4d9d, #ff9f43); color: #fff; cursor: pointer; box-shadow: 0 2px 12px rgba(255,77,157,.4); white-space: nowrap; }
.daily-btn:active { transform: scale(.96); }
.daily-card.locked { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.05); }
.daily-card.locked .daily-ic { filter: grayscale(1); opacity: .6; }
.daily-card.done { border-color: rgba(126,226,168,.45); background: linear-gradient(160deg, rgba(126,226,168,.12), rgba(255,255,255,.05)); }

/* inventario compacto del hub (#138): pistas / varitas / tickets IA */
.inv-strip { display: flex; gap: 8px; margin-bottom: 14px; }
.inv-chip { flex: 1; text-align: center; background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.12); border-radius: 999px; padding: 8px 4px; font-size: .85rem; color: rgba(255,255,255,.75); }
.inv-chip b { color: #fff; }

/* misiones semanales (E4/#138) */
.mis-title { color: #fff; font-size: 1.02rem; margin: 4px 0 10px; }
.mis-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.mission-card { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.12); border-radius: 16px; padding: 12px 14px; }
.mission-card .mis-ic { font-size: 1.5rem; }
.mission-card .mis-tx { flex: 1; min-width: 0; }
.mission-card .mis-tx b { display: block; color: #fff; font-size: .86rem; }
.mission-card .mis-tx small { color: rgba(255,255,255,.55); font-size: .74rem; }
.mis-bar { height: 6px; background: rgba(255,255,255,.12); border-radius: 3px; margin: 6px 0 3px; overflow: hidden; }
.mis-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff4d9d, #7c4dff); border-radius: 3px; }
.mission-card.ready { border-color: rgba(255,206,74,.5); box-shadow: 0 0 14px rgba(255,206,74,.12); }
.mission-card.done { opacity: .75; }
.mission-card.ticket { border-color: rgba(124,77,255,.5); background: linear-gradient(160deg, rgba(124,77,255,.14), rgba(255,255,255,.05)); }

/* colección de cosméticos (#138): marcos / títulos / paletas */
.cos-group-label { color: rgba(255,255,255,.55); font-size: .78rem; font-weight: 700; margin: 12px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.cos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cos-card { background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px 10px; text-align: center; cursor: pointer; font-family: inherit; }
.cos-card .cos-ic { font-size: 1.5rem; margin-bottom: 4px; }
.cos-card b { display: block; color: #fff; font-size: .82rem; }
.cos-card small { display: block; color: rgba(255,255,255,.45); font-size: .68rem; margin-top: 4px; }
.cos-card small.cos-on { color: #7ee2a8; }
.cos-card.locked { opacity: .45; cursor: default; }
.cos-card.active { border-color: rgba(126,226,168,.6); box-shadow: 0 0 12px rgba(126,226,168,.15); }
.cos-card:not(.locked):active { transform: scale(.97); }

/* skins de la paleta del juego (#138) — solo estética, misma geometría */
#paleta[data-skin="oro"] .color-btn { border-color: #ffce4a; box-shadow: 0 0 10px rgba(255,206,74,.45), 0 3px 8px rgba(0,0,0,.15); }
#paleta[data-skin="oro"] .color-btn.selected { border-color: #ffb400; box-shadow: 0 0 0 3px rgba(255,206,74,.3), 0 0 14px rgba(255,206,74,.6); }
#paleta[data-skin="neon"] .color-btn { border-color: #ff4d9d; box-shadow: 0 0 12px rgba(255,77,157,.55), 0 0 4px rgba(124,77,255,.6); }
#paleta[data-skin="neon"] .color-btn.selected { border-color: #7c4dff; box-shadow: 0 0 0 3px rgba(124,77,255,.35), 0 0 16px rgba(255,77,157,.8); }
#paleta[data-skin="caramelo"] .color-btn { border-radius: 999px; border-color: rgba(255,255,255,.8); box-shadow: 0 4px 10px rgba(255,77,157,.35); }
#paleta[data-skin="caramelo"] .color-btn.selected { border-color: #ff4d9d; }

/* título cosmético en el perfil (pestaña Más) */
.drawer-cos-title { display: inline-block; margin: 3px 0 2px; padding: 2px 10px; border-radius: 999px; background: rgba(124,77,255,.25); border: 1px solid rgba(124,77,255,.5); color: #e6dcff; font-size: .72rem; font-weight: 700; }

/* varita mágica (#138) en la barra de herramientas del juego */
#tool-wand { position: relative; background: linear-gradient(135deg, #7c4dff, #4facfe) !important; }
#tool-wand > span:first-child { filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
#tool-wand .hbadge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: #ffce4a; color: #4a2e00; font-size: .64rem; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 4px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
