/* ==========================================================================
   Logros · insignias (Badges::art), niveles y recompensas del perfil (marcos, títulos, efectos y fondos)
   ========================================================================== */

/* ---------- la insignia ---------- */
.bdg { --bdg-size: 72px; position: relative; display: inline-grid; place-items: center; width: var(--bdg-size); height: var(--bdg-size); flex: none; isolation: isolate; }
.bdg > svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 calc(var(--bdg-size) * .05) calc(var(--bdg-size) * .08) rgb(0 0 0 / .28)); transition: transform .3s cubic-bezier(.3, 1.5, .5, 1); }
a:hover > .bdg > svg, button:hover > .bdg > svg, .bdg-card:hover .bdg > svg { transform: translateY(-3px) rotate(-4deg) scale(1.04); }
.bdg.is-locked > svg { filter: grayscale(1) brightness(.8) contrast(.85); opacity: .45; }
.bdg-lock { position: absolute; right: 2%; bottom: 2%; display: grid; place-items: center; width: 34%; height: 34%; max-width: 1.7rem; max-height: 1.7rem; border-radius: 50%; background: var(--surface); color: var(--text-muted); box-shadow: 0 0 0 2px var(--border); }
.bdg-lock .icon { width: 60%; height: 60%; }
.bdg-ring { position: absolute; left: -7%; top: -7%; width: 114%; height: 114%; max-width: none; max-height: none; transform: rotate(-90deg); pointer-events: none; }
.bdg-ring circle { fill: none; stroke-width: 2.4; stroke: var(--border); }
.bdg-ring circle + circle { stroke: var(--primary); stroke-linecap: round; }
.bdg-times { position: absolute; top: -4%; right: -10%; padding: .05rem .38rem; border-radius: 6px; background: var(--text); color: var(--surface); font-size: max(.68rem, calc(var(--bdg-size) * .16)); font-weight: 800; line-height: 1.3; box-shadow: 0 2px 6px rgb(0 0 0 / .25); }

/* efectos (solo en las ganadas) */
.bdg.fx-flotar > svg { animation: bdg-float 3.2s ease-in-out infinite; }
@keyframes bdg-float { 50% { transform: translateY(-8%); } }
.bdg.fx-pulso > svg { animation: bdg-pulse 2.2s ease-in-out infinite; }
@keyframes bdg-pulse { 50% { filter: drop-shadow(0 0 calc(var(--bdg-size) * .14) var(--bdg)) drop-shadow(0 0 calc(var(--bdg-size) * .05) var(--bdg-light)); } }
.bdg.fx-brillo::after { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / .75) 48%, transparent 60%) no-repeat; background-size: 250% 100%; animation: bdg-shine 3.4s ease-in-out infinite; mix-blend-mode: overlay; pointer-events: none; }
@keyframes bdg-shine { 0%, 55% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
.bdg.fx-holo > svg { animation: bdg-holo 4s linear infinite; }
@keyframes bdg-holo { 0% { filter: hue-rotate(0deg) saturate(1.3) drop-shadow(0 0 6px #67e8f9); } 100% { filter: hue-rotate(360deg) saturate(1.3) drop-shadow(0 0 6px #67e8f9); } }
.bdg.fx-arcoiris::before { content: ""; position: absolute; inset: -6%; border-radius: 50%; z-index: -1; background: conic-gradient(#f43f5e, #f59e0b, #facc15, #22c55e, #06b6d4, #6366f1, #d946ef, #f43f5e); filter: blur(calc(var(--bdg-size) * .05)); opacity: .9; animation: bdg-spin 4s linear infinite; }
@keyframes bdg-spin { to { transform: rotate(1turn); } }
.bdg.fx-fuego::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: 0; height: 70%; z-index: -1; border-radius: 50% 50% 40% 40%;
  background: radial-gradient(40% 60% at 30% 100%, #fde047, transparent 70%), radial-gradient(35% 70% at 70% 100%, #fb923c, transparent 70%), radial-gradient(55% 90% at 50% 100%, #ef4444, transparent 75%);
  filter: blur(calc(var(--bdg-size) * .05)); transform-origin: 50% 100%; animation: bdg-flame .9s ease-in-out infinite alternate; }
@keyframes bdg-flame { 0% { transform: scale(1, 1) translateY(-6%); opacity: .85; } 100% { transform: scale(1.12, 1.35) translateY(-14%); opacity: 1; } }
.bdg.fx-chispas::before, .bdg.fx-chispas::after { content: ""; position: absolute; inset: -12%; pointer-events: none;
  background: radial-gradient(circle, #fff 0 1.5px, transparent 2.5px) 12% 18% / 30% 30% no-repeat, radial-gradient(circle, var(--bdg-light) 0 2px, transparent 3px) 88% 26% / 30% 30% no-repeat,
    radial-gradient(circle, #fff 0 1.2px, transparent 2px) 80% 90% / 30% 30% no-repeat, radial-gradient(circle, var(--bdg-light) 0 1.6px, transparent 2.6px) 6% 82% / 30% 30% no-repeat;
  animation: bdg-twinkle 1.8s ease-in-out infinite; }
.bdg.fx-chispas::after { transform: rotate(45deg) scale(.9); animation-delay: .9s; }
@keyframes bdg-twinkle { 0%, 100% { opacity: 0; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .bdg > svg, .bdg::before, .bdg::after { animation: none !important; } }

/* ---------- tarjetas y listas de insignias ---------- */
.bdg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.bdg-card { position: relative; display: grid; justify-items: center; gap: .35rem; padding: 1rem .7rem .85rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); text-align: center; color: inherit; text-decoration: none; font: inherit; cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.bdg-card:hover { border-color: color-mix(in srgb, var(--bdg-c, var(--primary)) 60%, var(--border)); transform: translateY(-2px); box-shadow: 0 10px 24px rgb(0 0 0 / .12); }
.bdg-card.is-locked { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.bdg-card strong { font-size: .92rem; line-height: 1.2; }
.bdg-card small { color: var(--text-muted); font-size: .75rem; line-height: 1.3; }
.bdg-card .bdg-rar { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--bdg-c, var(--text-muted)); }
.bdg-bar { width: 100%; height: 5px; border-radius: 3px; background: var(--surface-3, var(--border)); overflow: hidden; }
.bdg-bar i { display: block; height: 100%; border-radius: 3px; background: var(--primary); }
.bdg-new { position: absolute; top: .5rem; left: .5rem; padding: .05rem .4rem; border-radius: 5px; background: var(--accent); color: var(--on-accent, #fff); font-size: .62rem; font-weight: 800; letter-spacing: .05em; }
.bdg-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.bdg-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .6rem .25rem .3rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: .82rem; font-weight: 600; }

/* detalle de una insignia (diálogo) */
dialog.modal.bdg-dlg { width: min(440px, calc(100vw - 2rem)); text-align: center; overflow-x: hidden; }
/* la cruz flota sobre el dibujo: la cabecera fija no ocupa lugar ni tapa el brillo de marcos e insignias */
dialog.modal.bdg-dlg .sheet-head { position: sticky; top: 0; height: 0; padding: 0; background: none; z-index: 5; }
dialog.modal.bdg-dlg .sheet-head .btn-icon { position: absolute; top: .6rem; right: .6rem; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.bdg-dlg-art { position: relative; z-index: 0; display: grid; place-items: center; min-height: 8.5rem; max-width: 100%; }
.bdg-dlg-body { display: grid; justify-items: center; gap: .6rem; padding: 1.8rem 1.4rem 1.4rem; }
.bdg-dlg-body > [hidden] { display: none; }
.bdg-dlg-act { margin-top: .3rem; }
.bdg-dlg-body h2 { margin: .3rem 0 0; }
.bdg-dlg-body p { margin: 0; }
.bdg-dlg-goal { padding: .6rem .8rem; border-radius: var(--radius); background: var(--surface-2); font-size: .9rem; width: 100%; box-sizing: border-box; }

/* festejo: insignia nueva */
.bdg-party { width: min(460px, calc(100vw - 2rem)); overflow: hidden; text-align: center; }
.bdg-party-body { position: relative; display: grid; justify-items: center; gap: .5rem; padding: 2rem 1.5rem 1.5rem; }
.bdg-party-body::before { content: ""; position: absolute; left: 50%; top: 40%; width: 64rem; height: 64rem; margin: -32rem 0 0 -32rem; border-radius: 50%; background: conic-gradient(from 0deg, transparent, color-mix(in srgb, var(--accent) 30%, transparent), transparent 30%, color-mix(in srgb, var(--primary) 30%, transparent), transparent 60%); -webkit-mask: radial-gradient(circle, #000 8%, transparent 42%); mask: radial-gradient(circle, #000 8%, transparent 42%); animation: bdg-spin 8s linear infinite; z-index: -1; pointer-events: none; }
.bdg-party-k { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0; }
.bdg-party .bdg { animation: bdg-pop .8s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes bdg-pop { 0% { transform: scale(.2) rotate(-30deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.bdg-party-nav { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: .4rem; }

/* ---------- nivel y experiencia ---------- */
.lvl { display: inline-flex; align-items: center; gap: .55rem; min-width: 0; }
.lvl-n { position: relative; display: grid; place-items: center; width: 2.6rem; height: 2.9rem; flex: none; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--pp-accent, var(--primary)) 70%, #fff), var(--pp-accent, var(--primary)) 60%, color-mix(in srgb, var(--pp-accent, var(--primary)) 60%, #000));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); text-shadow: 0 1px 2px rgb(0 0 0 / .4); }
.lvl-t { display: grid; gap: .2rem; min-width: 0; }
.lvl-t strong { font-size: .95rem; line-height: 1.1; }
.lvl-t small { font-size: .74rem; opacity: .85; white-space: nowrap; }
.lvl-bar { width: 9rem; max-width: 100%; height: 6px; border-radius: 3px; background: rgb(255 255 255 / .25); overflow: hidden; }
.lvl-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #fde047, #f97316); }
.pp-hero .lvl, .acc-hero .lvl { padding: .35rem .7rem .35rem .4rem; border-radius: var(--radius); background: rgb(0 0 0 / .28); backdrop-filter: blur(6px); color: #fff; }

/* ---------- título (recompensa) ---------- */
.pp-title { display: inline-flex; align-items: center; gap: .35rem; margin: .1rem 0 .35rem; padding: .22rem .65rem; border-radius: var(--radius); font-weight: 800; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: linear-gradient(90deg, var(--tc, #ca8a04), color-mix(in srgb, var(--tc, #ca8a04) 55%, #000)); box-shadow: 0 4px 14px color-mix(in srgb, var(--tc, #ca8a04) 40%, transparent); text-shadow: 0 1px 2px rgb(0 0 0 / .35); }
.pp-title .icon { width: 1rem; height: 1rem; }

/* ---------- vitrina en la portada del perfil ---------- */
.pp-showcase { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.pp-showcase a { display: grid; place-items: center; border-radius: 50%; }

/* ---------- marcos de la foto ---------- */
.pp-avatar-wrap[class*="fr-"] { position: relative; isolation: isolate; }
.pp-avatar-wrap[class*="fr-"]::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; z-index: -1; background: var(--fr, #cd7f32); }
.pp-avatar-wrap.fr-bronce { --fr: conic-gradient(#f6d1ae, #cd7f32, #6e3b12, #cd7f32, #f6d1ae); }
.pp-avatar-wrap.fr-plata { --fr: conic-gradient(#fff, #c3cad4, #5f6b7a, #c3cad4, #fff); }
.pp-avatar-wrap.fr-oro { --fr: conic-gradient(#fff6bf, #f5c518, #9a5b05, #f5c518, #fff6bf); }
.pp-avatar-wrap.fr-oro::before, .pp-avatar-wrap.fr-diamante::before { box-shadow: 0 0 18px rgb(245 197 24 / .55); }
.pp-avatar-wrap.fr-fuego::before { background: conic-gradient(#fde047, #f97316, #dc2626, #f97316, #fde047); box-shadow: 0 0 22px #f97316, 0 -8px 26px #ef4444; animation: fr-flicker 1.1s ease-in-out infinite alternate; }
@keyframes fr-flicker { 100% { box-shadow: 0 0 30px #fb923c, 0 -14px 34px #ef4444; filter: brightness(1.15); } }
.pp-avatar-wrap.fr-hielo::before { background: conic-gradient(#ecfeff, #67e8f9, #0e7490, #67e8f9, #ecfeff); box-shadow: 0 0 20px #67e8f9; }
.pp-avatar-wrap.fr-neon::before { background: conic-gradient(#22d3ee, #d946ef, #22d3ee); box-shadow: 0 0 16px #d946ef, 0 0 32px #22d3ee; animation: fr-glow 2s ease-in-out infinite alternate; }
@keyframes fr-glow { 100% { box-shadow: 0 0 26px #22d3ee, 0 0 44px #d946ef; } }
.pp-avatar-wrap.fr-arcoiris::before, .pp-avatar-wrap.fr-holo::before { background: conic-gradient(#f43f5e, #f59e0b, #facc15, #22c55e, #06b6d4, #6366f1, #d946ef, #f43f5e); animation: bdg-spin 4s linear infinite; }
.pp-avatar-wrap.fr-holo::before { filter: saturate(.7) brightness(1.2); box-shadow: 0 0 24px rgb(103 232 249 / .6); }
.pp-avatar-wrap.fr-rayos::before { background: conic-gradient(#fef08a, #a855f7, #fef08a, #6366f1, #fef08a, #a855f7, #fef08a); box-shadow: 0 0 20px #a855f7; animation: bdg-spin 1.6s steps(6) infinite; }
.pp-avatar-wrap.fr-diamante::before { background: conic-gradient(#ffffff, #bae6fd, #e0e7ff, #ffffff, #a5f3fc, #f5d0fe, #ffffff); animation: bdg-spin 6s linear infinite; }
.pp-avatar-wrap.fr-sombra::before { background: conic-gradient(#111827, #4b5563, #111827); box-shadow: 0 0 26px rgb(0 0 0 / .8); }
.pp-avatar-wrap.fr-laurel::before { background: conic-gradient(#fef3c7, #ca8a04, #fef3c7); inset: -5px; }

/* ---------- efectos sobre la portada ---------- */
.pp-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.pp-fx::before, .pp-fx::after { content: ""; position: absolute; inset: -50% 0 0; background-repeat: repeat; }
.pp-fx-chispas::before { background-image: radial-gradient(circle, #fff 0 1.5px, transparent 2.5px), radial-gradient(circle, #fde68a 0 1px, transparent 2px); background-size: 90px 110px, 140px 90px; animation: fx-rise 9s linear infinite; opacity: .8; }
.pp-fx-chispas::after { background-image: radial-gradient(circle, #fff 0 1px, transparent 2px); background-size: 60px 70px; animation: fx-rise 6s linear infinite, bdg-twinkle 2s ease-in-out infinite; }
.pp-fx-estrellas::before { background-image: radial-gradient(circle, #fff 0 1.2px, transparent 2px), radial-gradient(circle, rgb(255 255 255 / .7) 0 .8px, transparent 1.6px); background-size: 120px 120px, 70px 80px; animation: bdg-twinkle 3s ease-in-out infinite; inset: 0; }
.pp-fx-estrellas::after { inset: 0; background: linear-gradient(135deg, transparent 45%, rgb(255 255 255 / .9) 50%, transparent 52%) no-repeat; background-size: 30% 30%; animation: fx-shoot 5s ease-in infinite; }
@keyframes fx-shoot { 0% { background-position: 110% -20%; opacity: 0; } 10% { opacity: 1; } 40%, 100% { background-position: -20% 120%; opacity: 0; } }
.pp-fx-fuego::before { inset: auto 0 -20%; height: 70%; background: radial-gradient(30% 60% at 20% 100%, rgb(253 224 71 / .7), transparent 70%), radial-gradient(25% 70% at 55% 100%, rgb(249 115 22 / .65), transparent 70%), radial-gradient(30% 60% at 85% 100%, rgb(239 68 68 / .6), transparent 70%); filter: blur(10px); animation: bdg-flame 1.2s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.pp-fx-fuego::after { background-image: radial-gradient(circle, #fdba74 0 1.5px, transparent 2.5px); background-size: 70px 90px; animation: fx-rise 4s linear infinite; }
.pp-fx-nieve::before { background-image: radial-gradient(circle, #fff 0 2px, transparent 3px), radial-gradient(circle, rgb(255 255 255 / .8) 0 1.2px, transparent 2px); background-size: 100px 100px, 60px 70px; animation: fx-fall 10s linear infinite; }
.pp-fx-nieve::after { background-image: radial-gradient(circle, #fff 0 1px, transparent 2px); background-size: 45px 55px; animation: fx-fall 7s linear infinite; }
.pp-fx-confeti::before { background-image: linear-gradient(45deg, #f43f5e 0 4px, transparent 4px), linear-gradient(-30deg, #facc15 0 4px, transparent 4px), linear-gradient(60deg, #22c55e 0 4px, transparent 4px), linear-gradient(10deg, #3b82f6 0 4px, transparent 4px);
  background-size: 7px 12px, 6px 10px, 8px 12px, 6px 11px; background-position: 10% 0, 40% 30%, 70% 10%, 90% 50%; background-repeat: no-repeat; inset: 0; }
.pp-fx-confeti::before, .pp-fx-confeti::after { background-image: radial-gradient(#f43f5e 0 3px, transparent 3.5px), radial-gradient(#facc15 0 2.5px, transparent 3px), radial-gradient(#22c55e 0 3px, transparent 3.5px), radial-gradient(#3b82f6 0 2.5px, transparent 3px), radial-gradient(#a855f7 0 3px, transparent 3.5px);
  background-size: 130px 110px, 90px 130px, 150px 90px, 110px 150px, 170px 120px; background-position: 0 0, 40px 60px, 80px 20px, 20px 90px, 100px 40px; background-repeat: repeat; animation: fx-fall 8s linear infinite; inset: -50% 0 0; }
.pp-fx-confeti::after { animation-duration: 11s; opacity: .7; transform: scaleX(-1); }
.pp-fx-aurora::before { inset: -30% -10% 20%; background: radial-gradient(40% 50% at 20% 40%, rgb(34 211 238 / .45), transparent 70%), radial-gradient(40% 60% at 60% 30%, rgb(168 85 247 / .4), transparent 70%), radial-gradient(35% 45% at 85% 50%, rgb(34 197 94 / .35), transparent 70%); filter: blur(24px); animation: fx-aurora 9s ease-in-out infinite alternate; }
@keyframes fx-aurora { 100% { transform: translateX(8%) skewX(-8deg) scaleY(1.2); } }
.pp-fx-rayos::before { inset: 0; background: linear-gradient(105deg, transparent 48%, rgb(255 255 255 / .95) 49%, rgb(196 181 253 / .9) 50%, transparent 51%) 70% 0 / 40% 100% no-repeat; animation: fx-flash 4s steps(1) infinite; }
.pp-fx-rayos::after { inset: 0; background: rgb(196 181 253 / .18); animation: fx-flash 4s steps(1) infinite; }
@keyframes fx-flash { 0%, 6%, 100% { opacity: 0; } 2%, 4% { opacity: 1; } }
.pp-fx-burbujas::before { background-image: radial-gradient(circle, transparent 0 5px, rgb(255 255 255 / .55) 6px, transparent 7px), radial-gradient(circle, transparent 0 3px, rgb(255 255 255 / .45) 4px, transparent 5px); background-size: 110px 130px, 70px 90px; animation: fx-rise 12s linear infinite; }
@keyframes fx-rise { from { transform: translateY(0); } to { transform: translateY(-33%); } }
@keyframes fx-fall { from { transform: translateY(-33%); } to { transform: translateY(0); } }
[data-motion="no"] .pp-fx::before, [data-motion="no"] .pp-fx::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .pp-fx::before, .pp-fx::after, .pp-avatar-wrap[class*="fr-"]::before { animation: none !important; } }

/* fondos de la portada (recompensa): patrones extra sobre los colores */

/* ---------- elegir recompensas (Mi cuenta) ---------- */
.rw-group { display: grid; gap: .5rem; margin-top: 1rem; }
.rw-group > h3 { margin: 0; font-size: .95rem; display: flex; align-items: center; gap: .4rem; }
.rw-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; }
.rw-opt { position: relative; display: grid; justify-items: center; gap: .35rem; padding: .7rem .5rem .6rem; border: 2px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); cursor: pointer; text-align: center; font-size: .8rem; }
.rw-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rw-opt:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.rw-opt:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.rw-opt.is-locked { cursor: not-allowed; opacity: .6; background: var(--surface-2); }
.rw-opt strong { font-size: .82rem; line-height: 1.2; }
.rw-opt small { color: var(--text-muted); font-size: .7rem; line-height: 1.25; }
.rw-opt .rw-lock { position: absolute; top: .4rem; right: .4rem; color: var(--text-muted); }
.rw-prev { position: relative; display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; overflow: visible; }
.rw-prev .pp-avatar { width: 3rem; height: 3rem; font-size: 1rem; }
.rw-prev.is-fx, .rw-prev.is-bd { width: 100%; height: 3rem; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, var(--from, #0b5d7a), var(--to, #14324a)); }
.rw-none { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; border: 2px dashed var(--border-strong); color: var(--text-muted); }
.rw-showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.rw-showcase label { display: grid; justify-items: center; gap: .25rem; padding: .5rem .3rem; border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; text-align: center; font-size: .72rem; }
.rw-showcase label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.rw-showcase input { position: absolute; opacity: 0; }

/* ---------- perfil público: nivel, logros, sorteos ---------- */
.pp-lvlbadge { display: flex; align-items: center; }
.pp-lvlbadge .lvl { padding: 0; background: none; backdrop-filter: none; }
.pp-sec-count { margin-left: .3rem; padding: .1rem .5rem; border-radius: var(--radius); background: var(--surface-2); color: var(--text-muted); font-size: .8rem; font-weight: 700; font-family: var(--font-body); }
.pp-lvl-card { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin-bottom: 1rem; padding: .9rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: linear-gradient(110deg, color-mix(in srgb, var(--pp-accent, var(--primary)) 12%, var(--surface)), var(--surface)); }
.pp-lvl-card .lvl-t small { color: var(--text-muted); opacity: 1; }
.pp-lvl-bar { flex: 1 1 200px; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.pp-lvl-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--pp-accent, var(--primary)), #f59e0b); }
.pp-bdg-more { margin-top: 1rem; }
.pp-bdg-more > summary { cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--pp-accent, var(--primary)); margin-bottom: .8rem; }
.pp-bdg-credit { margin-top: .8rem; font-size: .72rem; }
.pp-raffle-list { display: grid; gap: .6rem; }
.pp-raffle { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.pp-raffle .grow { flex: 1; min-width: 0; display: grid; gap: .15rem; }
.pp-raffle strong { font-size: 1.02rem; }
.pp-raffle-ic { flex: none; display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: var(--radius); background: color-mix(in srgb, #22c55e 15%, var(--surface)); color: #16a34a; }
.pp-raffle-d { margin: .2rem 0 0; font-size: .85rem; color: var(--text-muted); }
.pp-raffle-sp { flex: none; display: grid; justify-items: center; gap: .2rem; max-width: 10rem; color: inherit; text-decoration: none; }
.pp-raffle-sp img { width: 140px; height: 64px; object-fit: contain; border-radius: 10px; background: #fff; padding: .35rem .5rem; border: 1px solid var(--border); }
.pp-raffle-sp-t { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); }
@media (max-width: 600px) { .pp-raffle { flex-wrap: wrap; } .pp-raffle-sp { margin-left: 3.7rem; } .bdg-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }
.acc-lvl { border: 0; cursor: pointer; font: inherit; text-align: left; }
.acc-lvl .lvl-t small { color: #fff; }

/* ---------- panel: diseñador de insignias y pantalla «Logros» ---------- */
.bdg-designer { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1rem 1.4rem; align-items: start; }
.bdg-designer-prev { display: grid; justify-items: center; align-content: start; gap: .8rem; padding: 1rem .5rem; border-radius: var(--radius-lg); background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--primary) 12%, var(--surface-2)), var(--surface-2)); min-height: 180px; }
.bdg-designer-prev .bdg:nth-child(n+2) { display: inline-grid; }
.bdg-designer-prev { grid-template-columns: 1fr 1fr; }
.bdg-designer-prev .bdg:first-child { grid-column: 1 / -1; }
.bdg-designer-icons { display: grid; gap: .5rem; min-width: 0; }
.bdg-icon-cats { display: flex; flex-wrap: wrap; gap: .25rem; }
.bdg-icon-cats [aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); }
.bdg-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: .3rem; max-height: 260px; overflow: auto; padding: .4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.bdg-icon-grid button { display: grid; place-items: center; aspect-ratio: 1; padding: .45rem; border: 2px solid transparent; border-radius: var(--radius-sm, 8px); background: var(--surface); color: var(--text); cursor: pointer; }
.bdg-icon-grid button:hover { border-color: var(--border-strong); }
.bdg-icon-grid button[aria-checked="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.bdg-icon-grid svg { width: 100%; height: 100%; }
@media (max-width: 719px) { .bdg-designer { grid-template-columns: minmax(0, 1fr); } }
.bdg-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.bdg-kpi { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; color: inherit; text-decoration: none; }
.bdg-kpi > .icon { width: 2.4rem; height: 2.4rem; padding: .55rem; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary); flex: none; }
.bdg-kpi strong { display: block; font-family: var(--font-display); font-size: 1.6rem; line-height: 1; }
.bdg-kpi small { color: var(--text-muted); }
.bdg-hub { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .bdg-hub { grid-template-columns: minmax(0, 1fr); } }
.bdg-levels { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.bdg-levels li { display: grid; grid-template-columns: auto minmax(0, 1fr) 8rem auto; align-items: center; gap: .6rem; }
.bdg-levels .lvl-n { width: 2.2rem; height: 2.45rem; font-size: .95rem; }
.bdg-levels input { margin: 0 !important; }
.bdg-lv-xp { display: flex; align-items: center; gap: .3rem; }
.bdg-lv-xp small { color: var(--text-muted); }
.bdg-holders { list-style: none; margin: 0; padding: 0; }
.bdg-holders li { display: flex; align-items: center; gap: .75rem; padding: .6rem 1.2rem; border-top: 1px solid var(--border); }
.bdg-holders li:first-child { border-top: 0; }
.bdg-holders .grow { flex: 1; min-width: 0; display: grid; gap: .1rem; color: inherit; }
.bdg-holders small { font-size: .78rem; }
.bdg-pos { width: 1.6rem; text-align: center; color: var(--text-muted); }
.bdg-leaders li:nth-child(1) .bdg-pos { color: #d4a017; }
.bdg-leaders li:nth-child(2) .bdg-pos { color: #9ca3af; }
.bdg-leaders li:nth-child(3) .bdg-pos { color: #cd7f32; }
.bdg-icon-cats .btn { min-height: 30px; padding: .2rem .55rem; font-size: .8rem; }

/* ---------- números tocables (perfil y «Mi cuenta») ---------- */
.pp-kpiw { margin: -2rem 0 2rem; position: relative; z-index: 2; }
.acc .pp-kpiw { margin: 0 0 1.5rem; }
.pp-kpis.pp-kpis-x { margin: 0; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.pp-kpi { position: relative; display: grid; justify-items: center; gap: .1rem; padding: .95rem .5rem .8rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); text-align: center; color: inherit; font: inherit; cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s; }
.pp-kpi:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--pp-accent, var(--primary)) 55%, var(--border)); }
.pp-kpi[aria-expanded="true"] { border-color: var(--pp-accent, var(--primary)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pp-accent, var(--primary)) 25%, transparent), var(--shadow); }
.pp-kpi:focus-visible { outline: 2px solid var(--pp-accent, var(--primary)); outline-offset: 2px; }
.pp-kpi-ic { position: absolute; top: .55rem; left: .6rem; color: var(--pp-accent, var(--primary)); opacity: .7; }
.pp-kpi-chev { position: absolute; top: .55rem; right: .55rem; width: .9rem; height: .9rem; color: var(--text-muted); transition: transform .2s; }
.pp-kpi[aria-expanded="true"] .pp-kpi-chev { transform: rotate(180deg); }
.pp-kpi strong { font-family: var(--font-display); font-size: clamp(1.4rem, 3.6vw, 2.1rem); line-height: 1.1; color: var(--pp-accent, var(--primary)); font-variant-numeric: tabular-nums; }
.pp-kpi strong.is-up { color: var(--ok); } .pp-kpi strong.is-down { color: var(--danger); }
.pp-kpi > span { font-size: .74rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-kpi-more { margin-top: .7rem; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); display: grid; gap: .8rem; animation: kpi-in .22s ease; }
@keyframes kpi-in { from { opacity: 0; transform: translateY(-6px); } }
.pp-kpi-row { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; }
.pp-kpi-row .grow { flex: 1 1 220px; }
.pp-kpi-stat { display: grid; justify-items: start; }
.pp-kpi-stat b { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; }
.pp-kpi-stat b.is-up { color: var(--ok); } .pp-kpi-stat b.is-down { color: var(--danger); }
.pp-kpi-stat small { color: var(--text-muted); font-size: .76rem; }
.pp-kpi-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.pp-kpi-list li { display: flex; align-items: center; gap: .7rem; padding: .45rem 0; border-top: 1px solid var(--border); }
.pp-kpi-list li:first-child { border-top: 0; }
.pp-kpi-list .grow { flex: 1; min-width: 0; display: grid; }
.pp-kpi-big { font-family: var(--font-display); font-size: 1.3rem; color: var(--pp-accent, var(--primary)); min-width: 2.6rem; }
.pp-kpi-cup { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--surface-2); color: #9ca3af; flex: none; }
.pp-kpi-cup.is-gold { background: color-mix(in srgb, #eab308 18%, var(--surface)); color: #ca8a04; }
.pp-kpi-note { margin: 0; font-size: .88rem; }
.pp-kpi-go { display: flex; justify-content: flex-end; }
.pp-kpi-more .pp-lvl-bar { flex: 1 1 200px; }
@media (max-width: 600px) { .pp-kpis.pp-kpis-x { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; } .pp-kpi { padding: .8rem .3rem .6rem; } .pp-kpi-ic { display: none; } }

/* ---------- «Mi perfil»: ver como público / editar ---------- */
.acc-pmode { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: 1rem; }
.acc-pmode .seg { margin: 0; }
.acc-pmode .hint { margin: 0; }
.acc-public { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg); box-shadow: var(--shadow); }
.acc-public-bar { display: flex; align-items: center; gap: .5rem; padding: .45rem .8rem; border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: .8rem; color: var(--text-muted); }
.acc-public-bar .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-public-bar i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--border-strong); flex: none; }
.acc-public iframe { display: block; width: 100%; height: 900px; border: 0; background: var(--bg); }
body.is-embed .site-header, body.is-embed .announce, body.is-embed .wa-float, body.is-embed .to-top, body.is-embed .site-footer, body.is-embed .mobile-nav { display: none !important; }
.pp-owner { background: var(--surface); border-bottom: 1px solid var(--border); }
.pp-owner-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding-block: .55rem; }
.pp-owner-t { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--text-muted); }
.pp-owner-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.pp-owner-seg > * { display: inline-flex; align-items: center; gap: .35rem; min-height: 34px; padding: 0 .9rem; border-radius: var(--radius); font-weight: 600; font-size: .86rem; color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.pp-owner-seg > .is-on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.pp-owner-seg > button { border: 0; background: none; font: inherit; cursor: pointer; }
.pp-owner-seg > button:hover:not(.is-on) { color: var(--text); background: color-mix(in srgb, var(--surface) 50%, transparent); }
.pp-editor { padding-block: 1.5rem 4rem; }
/* tu propio perfil: pestañas abajo del encabezado (Inicio, Mi perfil, actividades, partidos, logros, pagos, cuenta) */
.acc .pp-hero { overflow: visible; z-index: 5; }
.acc .pp-hero-in { padding-bottom: 3.2rem; }
.pp-perfil { padding-top: 2.4rem; }
.pp-pmode { padding-block: 0 1rem; }
.acc .pp-perfil .pp-body { padding-top: .5rem; }
.acc-body:not(:has(> [data-ppanel]:not([hidden]))) { display: none; }
/* compartir + salir (o reportar) en una sola fila, a lo ancho de la columna */
.pp-side-row { display: flex; gap: .5rem; align-items: stretch; }
.pp-side-row > [data-share-open] { flex: 1; justify-content: center; }
.pp-side-row > .pp-logout { display: flex; margin: 0; }
.pp-side-row > .pp-logout > .btn, .pp-side-row > .pp-report { flex: none; width: 44px; min-height: 44px; height: auto; padding: 0; justify-content: center; }
.pp-owner-seg > a:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 50%, transparent); }
@media (max-width: 520px) { .pp-owner-t { display: none; } .pp-owner-in { justify-content: center; } .pp-owner-seg { width: 100%; } .pp-owner-seg > * { flex: 1; justify-content: center; } }

/* ==========================================================================
   Más recompensas (2026-10): marcos, efectos y fondos animados
   ========================================================================== */

/* ---------- marcos nuevos ---------- */
.pp-avatar-wrap.fr-oro-rosa::before { background: conic-gradient(#ffe4e6, #fda4af, #be185d, #fda4af, #ffe4e6); box-shadow: 0 0 16px rgb(244 114 182 / .5); }
.pp-avatar-wrap.fr-esmeralda::before { background: conic-gradient(#d1fae5, #10b981, #064e3b, #10b981, #d1fae5); box-shadow: 0 0 16px rgb(16 185 129 / .5); animation: bdg-spin 9s linear infinite; }
.pp-avatar-wrap.fr-rubi::before { background: conic-gradient(#ffe4e6, #e11d48, #4c0519, #e11d48, #ffe4e6); box-shadow: 0 0 18px rgb(225 29 72 / .55); animation: bdg-spin 9s linear infinite; }
.pp-avatar-wrap.fr-zafiro::before { background: conic-gradient(#dbeafe, #3b82f6, #172554, #3b82f6, #dbeafe); box-shadow: 0 0 18px rgb(59 130 246 / .55); animation: bdg-spin 9s linear infinite; }
.pp-avatar-wrap.fr-plasma::before { background: conic-gradient(from 0deg, #f0abfc, #818cf8, #22d3ee, #f0abfc); filter: blur(1px) saturate(1.4); box-shadow: 0 0 26px #a78bfa; animation: bdg-spin 2.6s linear infinite, fr-glow 1.6s ease-in-out infinite alternate; }
.pp-avatar-wrap.fr-galaxia::before { background: radial-gradient(circle at 30% 20%, #fff 0 1.5px, transparent 2px), radial-gradient(circle at 70% 80%, #fff 0 1px, transparent 1.6px), radial-gradient(circle at 85% 30%, #c4b5fd 0 1.4px, transparent 2px), conic-gradient(#1e1b4b, #7c3aed, #0b0320, #db2777, #1e1b4b); box-shadow: 0 0 24px rgb(124 58 237 / .7); animation: bdg-spin 12s linear infinite; }
.pp-avatar-wrap.fr-cometa::before { background: conic-gradient(from 0deg, transparent 0 70%, rgb(253 224 71 / .2) 80%, #fde047 97%, #fff 100%); box-shadow: none; animation: bdg-spin 1.8s linear infinite; inset: -8px; }
.pp-avatar-wrap.fr-electrico::before { background: repeating-conic-gradient(#facc15 0 6deg, #1e3a8a 6deg 14deg); box-shadow: 0 0 18px #facc15; animation: bdg-spin 1.2s steps(8) infinite; }
.pp-avatar-wrap.fr-sakura::before { background: conic-gradient(#fce7f3, #f9a8d4, #fbcfe8, #f472b6, #fce7f3); box-shadow: 0 0 14px rgb(244 114 182 / .45); }
.pp-avatar-wrap.fr-glitch::before { background: conic-gradient(#22d3ee, #f43f5e, #22d3ee); animation: fr-glitch 1.4s steps(2) infinite; }
@keyframes fr-glitch { 0%, 100% { transform: translate(0); } 20% { transform: translate(-3px, 2px); filter: hue-rotate(90deg); } 40% { transform: translate(3px, -2px); } 60% { transform: translate(-2px, -1px); filter: hue-rotate(-60deg); } 80% { transform: translate(2px, 1px); } }
.pp-avatar-wrap.fr-corona::before { background: conic-gradient(#fef08a, #eab308, #854d0e, #eab308, #fef08a); box-shadow: 0 0 18px rgb(234 179 8 / .5); }
.pp-avatar-wrap.fr-alas::before { background: conic-gradient(#ffffff, #e0f2fe, #ffffff); box-shadow: 0 0 24px rgb(255 255 255 / .6); }
/* adornos con dibujo */
.fr-art { position: absolute; pointer-events: none; z-index: 2; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .45)); }
.fr-art svg { width: 100%; height: auto; display: block; }
.fr-art-laurel { left: 50%; bottom: -16%; width: 150%; transform: translateX(-50%); color: #eab308; }
.fr-art-corona { left: 50%; top: -34%; width: 58%; transform: translateX(-50%) rotate(-8deg); color: #facc15; animation: fr-bob 2.6s ease-in-out infinite; }
@keyframes fr-bob { 50% { transform: translateX(-50%) rotate(-8deg) translateY(-4px); } }
.fr-art-alas { left: 50%; top: 50%; width: 210%; transform: translate(-50%, -52%); color: #f8fafc; z-index: -2; opacity: .95; animation: fr-flap 3s ease-in-out infinite; }
@keyframes fr-flap { 50% { transform: translate(-50%, -55%) scaleX(1.06); } }
.rw-prev .fr-art-alas { width: 190%; }

/* ---------- efectos nuevos ---------- */
.pp-fx-meteoros::before { inset: 0; background: linear-gradient(225deg, transparent 47%, rgb(255 255 255 / .95) 49.5%, transparent 51%) 0 0 / 160px 160px; animation: fx-meteor 2.2s linear infinite; opacity: .75; }
.pp-fx-meteoros::after { inset: 0; background: linear-gradient(225deg, transparent 47%, rgb(253 186 116 / .9) 49.5%, transparent 51%) 40px 70px / 230px 230px; animation: fx-meteor 3.4s linear infinite; opacity: .6; }
@keyframes fx-meteor { from { background-position: 0 0; } to { background-position: -160px 160px; } }
.pp-fx-hojas::before { background-image: radial-gradient(ellipse 6px 3px, #84cc16 90%, transparent 100%), radial-gradient(ellipse 5px 2.5px, #eab308 90%, transparent 100%), radial-gradient(ellipse 6px 3px, #f97316 90%, transparent 100%); background-size: 120px 140px, 170px 110px, 90px 160px; background-position: 0 0, 60px 30px, 30px 80px; animation: fx-fall 9s linear infinite, fx-sway 3s ease-in-out infinite alternate; }
@keyframes fx-sway { to { margin-left: 30px; } }
.pp-fx-corazones::before { background-image: radial-gradient(circle at 35% 40%, #fb7185 0 3px, transparent 3.5px), radial-gradient(circle at 65% 40%, #fb7185 0 3px, transparent 3.5px), linear-gradient(45deg, transparent 45%, transparent 55%); background-size: 80px 90px; animation: fx-rise 7s linear infinite; opacity: .8; }
.pp-fx-corazones::after { background-image: radial-gradient(circle, rgb(244 63 94 / .55) 0 4px, transparent 5px); background-size: 130px 110px; animation: fx-rise 10s linear infinite, bdg-twinkle 2.4s ease-in-out infinite; }
.pp-fx-fuegos::before, .pp-fx-fuegos::after { inset: 0; background: radial-gradient(circle, transparent 0 18px, #facc15 19px 21px, transparent 22px) 15% 30% / 80px 80px no-repeat, radial-gradient(circle, transparent 0 14px, #f43f5e 15px 17px, transparent 18px) 75% 25% / 60px 60px no-repeat, radial-gradient(circle, transparent 0 22px, #22d3ee 23px 25px, transparent 26px) 50% 60% / 90px 90px no-repeat; animation: fx-burst 2.4s ease-out infinite; }
.pp-fx-fuegos::after { animation-delay: 1.2s; filter: hue-rotate(120deg); transform: translateX(12%); }
@keyframes fx-burst { 0% { transform: scale(.2); opacity: 0; } 15% { opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.pp-fx-luciernagas::before, .pp-fx-luciernagas::after { inset: 0; background-image: radial-gradient(circle, #fef08a 0 2px, rgb(254 240 138 / .35) 3px, transparent 7px); background-size: 140px 120px; animation: fx-drift 8s ease-in-out infinite alternate, bdg-twinkle 2.6s ease-in-out infinite; }
.pp-fx-luciernagas::after { background-size: 190px 160px; background-position: 70px 40px; animation-duration: 11s, 3.4s; }
@keyframes fx-drift { to { transform: translate(30px, -20px); } }
.pp-fx-humo::before, .pp-fx-humo::after { inset: 20% -20% -30%; background: radial-gradient(40% 50% at 30% 70%, rgb(255 255 255 / .22), transparent 70%), radial-gradient(35% 45% at 70% 60%, rgb(255 255 255 / .18), transparent 70%); filter: blur(18px); animation: fx-smoke 12s ease-in-out infinite alternate; }
.pp-fx-humo::after { animation-duration: 16s; animation-direction: alternate-reverse; }
@keyframes fx-smoke { to { transform: translate(10%, -12%) scale(1.15); } }
.pp-fx-ondas::before, .pp-fx-ondas::after { inset: auto -10% -10%; height: 60%; background: repeating-radial-gradient(ellipse at 50% 120%, transparent 0 18px, rgb(255 255 255 / .12) 19px 21px); animation: fx-wave 6s linear infinite; }
.pp-fx-ondas::after { animation-duration: 9s; opacity: .6; }
@keyframes fx-wave { to { background-position: 0 -42px; } }
.pp-fx-matrix::before, .pp-fx-matrix::after { inset: -100% 0 0; background: repeating-linear-gradient(90deg, transparent 0 22px, rgb(34 197 94 / .55) 22px 24px, transparent 24px 46px), linear-gradient(transparent, rgb(34 197 94 / .25) 50%, transparent); background-size: 46px 100%, 100% 260px; animation: fx-code 3s linear infinite; -webkit-mask: repeating-linear-gradient(transparent 0 6px, #000 6px 12px); mask: repeating-linear-gradient(transparent 0 6px, #000 6px 12px); }
.pp-fx-matrix::after { background-position: 23px 0, 0 0; animation-duration: 4.6s; opacity: .6; }
@keyframes fx-code { to { transform: translateY(50%); } }
.pp-fx-petalos::before, .pp-fx-petalos::after { background-image: radial-gradient(ellipse 5px 3px, #f9a8d4 90%, transparent 100%), radial-gradient(ellipse 4px 2.5px, #fbcfe8 90%, transparent 100%); background-size: 100px 120px, 150px 100px; animation: fx-fall 10s linear infinite, fx-sway 2.6s ease-in-out infinite alternate; }
.pp-fx-petalos::after { background-position: 50px 40px, 20px 70px; animation-duration: 14s, 3.2s; }
.pp-fx-sol::before { inset: -60% -20% 20% 30%; background: repeating-conic-gradient(from 0deg at 80% 0%, rgb(255 237 160 / .28) 0 4deg, transparent 4deg 12deg); animation: bdg-spin 40s linear infinite; transform-origin: 80% 0; }
.pp-fx-sol::after { inset: -30% -10% 40% 50%; background: radial-gradient(circle, rgb(254 240 138 / .55), transparent 60%); filter: blur(20px); }

/* ---------- fondos: todos se mueven ---------- */
[class*="pp-bd-"] .pp-hero, .acc[class*="pp-bd-"] .acc-hero, .rw-prev.is-bd {
  background: linear-gradient(125deg, var(--pp-from, var(--from)), var(--pp-mid, var(--mid, var(--pp-to, var(--to)))), var(--pp-to, var(--to)), var(--pp-mid, var(--mid, var(--pp-from, var(--from)))), var(--pp-from, var(--from)));
  background-size: 400% 400%; animation: bd-flow 16s ease-in-out infinite; }
.rw-prev.is-bd { background: linear-gradient(125deg, var(--from), var(--mid), var(--to), var(--mid), var(--from)); background-size: 400% 400%; position: relative; }
@keyframes bd-flow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.pp-bdfx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.pp-bdfx::before, .pp-bdfx::after { content: ""; position: absolute; inset: 0; }
.pp-bdfx-galaxia::before { background-image: radial-gradient(circle, #fff 0 1px, transparent 1.6px), radial-gradient(circle, rgb(255 255 255 / .6) 0 .8px, transparent 1.4px); background-size: 80px 90px, 50px 60px; animation: bdg-twinkle 4s ease-in-out infinite; }
.pp-bdfx-galaxia::after { background: radial-gradient(30% 40% at 70% 40%, rgb(236 72 153 / .35), transparent 70%), radial-gradient(35% 45% at 25% 70%, rgb(99 102 241 / .35), transparent 70%); filter: blur(12px); animation: fx-aurora 14s ease-in-out infinite alternate; }
.pp-bdfx-neon::before, .pp-bdfx-cyberpunk::before { background: repeating-linear-gradient(90deg, rgb(34 211 238 / .14) 0 1px, transparent 1px 48px), repeating-linear-gradient(0deg, rgb(217 70 239 / .14) 0 1px, transparent 1px 48px); animation: bd-grid 6s linear infinite; }
@keyframes bd-grid { to { background-position: 48px 48px; } }
.pp-bdfx-cyberpunk::after { background: linear-gradient(transparent 48%, rgb(250 204 21 / .5) 50%, transparent 52%) 0 0 / 100% 200%; animation: bd-scan 4s linear infinite; }
@keyframes bd-scan { to { background-position: 0 -200%; } }
.pp-bdfx-lava::before, .pp-bdfx-volcan::before { background: radial-gradient(30% 25% at 20% 110%, rgb(253 186 116 / .7), transparent 70%), radial-gradient(25% 30% at 75% 105%, rgb(239 68 68 / .7), transparent 70%); filter: blur(10px); animation: bd-lava 5s ease-in-out infinite alternate; }
@keyframes bd-lava { to { transform: translateY(-14%) scale(1.15); } }
.pp-bdfx-volcan::after { background-image: radial-gradient(circle, #fdba74 0 1.5px, transparent 2.5px); background-size: 70px 80px; animation: fx-rise 5s linear infinite; inset: -50% 0 0; }
.pp-bdfx-oceano::before { inset: auto -10% -20%; height: 70%; background: repeating-radial-gradient(ellipse at 50% 130%, transparent 0 22px, rgb(255 255 255 / .1) 23px 26px); animation: fx-wave 7s linear infinite; }
.pp-bdfx-oceano::after { background: linear-gradient(115deg, transparent 40%, rgb(255 255 255 / .12) 50%, transparent 60%) 0 0 / 300% 100%; animation: bdg-shine 7s ease-in-out infinite; }
.pp-bdfx-tormenta::before { background: linear-gradient(105deg, transparent 48%, rgb(255 255 255 / .9) 49%, rgb(165 180 252 / .9) 50%, transparent 51%) 65% 0 / 30% 100% no-repeat; animation: fx-flash 5s steps(1) infinite; }
.pp-bdfx-tormenta::after { background: repeating-linear-gradient(100deg, transparent 0 14px, rgb(255 255 255 / .12) 14px 15px); background-size: 100% 60px; animation: bd-rain .6s linear infinite; }
@keyframes bd-rain { to { background-position: -12px 60px; } }
.pp-bdfx-sakura::before { background-image: radial-gradient(ellipse 5px 3px, #fce7f3 90%, transparent 100%); background-size: 90px 110px; inset: -50% 0 0; animation: fx-fall 11s linear infinite, fx-sway 3s ease-in-out infinite alternate; }
.pp-bdfx-boreal::before { inset: -30% -10% 30%; background: radial-gradient(40% 50% at 20% 40%, rgb(74 222 128 / .45), transparent 70%), radial-gradient(40% 60% at 60% 30%, rgb(34 211 238 / .45), transparent 70%), radial-gradient(35% 45% at 85% 50%, rgb(168 85 247 / .4), transparent 70%); filter: blur(22px); animation: fx-aurora 8s ease-in-out infinite alternate; }
.pp-bdfx-boreal::after { background-image: radial-gradient(circle, #fff 0 1px, transparent 1.6px); background-size: 70px 80px; opacity: .5; }
.pp-bdfx-nocturna::before { background: linear-gradient(transparent 70%, rgb(255 255 255 / .06) 70% 70.6%, transparent 70.6%), linear-gradient(90deg, transparent 49.7%, rgb(255 255 255 / .1) 49.7% 50.3%, transparent 50.3%); }
.pp-bdfx-nocturna::after { background: radial-gradient(30% 60% at 15% -10%, rgb(255 255 240 / .35), transparent 70%), radial-gradient(30% 60% at 85% -10%, rgb(255 255 240 / .35), transparent 70%); animation: bd-lights 4s ease-in-out infinite alternate; }
@keyframes bd-lights { to { opacity: .55; } }
.pp-bdfx-oro-liquido::before, .pp-bdfx-oro-negro::before { background: linear-gradient(115deg, transparent 35%, rgb(255 251 214 / .4) 48%, transparent 60%) 0 0 / 300% 100%; animation: bdg-shine 5s ease-in-out infinite; }
.pp-bdfx-oro-liquido::after { background-image: radial-gradient(circle, rgb(255 255 255 / .8) 0 1.2px, transparent 2px); background-size: 60px 70px; animation: bdg-twinkle 2.4s ease-in-out infinite; }
.pp-bdfx-arcoiris::before { background: linear-gradient(90deg, rgb(255 255 255 / .0), rgb(255 255 255 / .15), rgb(255 255 255 / 0)) 0 0 / 200% 100%; animation: bdg-shine 4s ease-in-out infinite; }
.pp-bdfx-matrix::before { inset: -100% 0 0; background: repeating-linear-gradient(90deg, transparent 0 18px, rgb(34 197 94 / .4) 18px 20px, transparent 20px 38px); -webkit-mask: repeating-linear-gradient(transparent 0 5px, #000 5px 10px); mask: repeating-linear-gradient(transparent 0 5px, #000 5px 10px); animation: fx-code 4s linear infinite; }
.pp-bdfx-glaciar::before { background: linear-gradient(115deg, transparent 40%, rgb(255 255 255 / .3) 50%, transparent 60%) 0 0 / 300% 100%; animation: bdg-shine 6s ease-in-out infinite; }
.pp-bdfx-selva::before { background-image: radial-gradient(ellipse 7px 3px, rgb(134 239 172 / .5) 90%, transparent 100%); background-size: 110px 120px; inset: -50% 0 0; animation: fx-fall 12s linear infinite, fx-sway 3s ease-in-out infinite alternate; }
.pp-bdfx-medianoche::before { background-image: radial-gradient(circle, rgb(255 255 255 / .7) 0 1px, transparent 1.6px); background-size: 90px 100px; animation: bdg-twinkle 5s ease-in-out infinite; }
.pp-bdfx-atardecer::before { background: radial-gradient(40% 50% at 80% 100%, rgb(253 224 71 / .5), transparent 70%); animation: bd-lava 9s ease-in-out infinite alternate; }
.rw-prev .pp-bdfx { z-index: 0; }
[data-motion="no"] .pp-bdfx::before, [data-motion="no"] .pp-bdfx::after, [data-motion="no"] .pp-hero, [data-motion="no"] .acc-hero { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .pp-bdfx::before, .pp-bdfx::after, [class*="pp-bd-"] .pp-hero, .acc[class*="pp-bd-"] .acc-hero, .rw-prev.is-bd, .fr-art { animation: none !important; } }

/* ---------- título elegible (Mi cuenta) y alto de los botones de la portada ---------- */
button.pp-title { border: 0; cursor: pointer; font-family: inherit; }
button.pp-title:hover { filter: brightness(1.1); }
.pp-title.is-empty { background: rgb(255 255 255 / .14); box-shadow: none; border: 1px dashed rgb(255 255 255 / .55); text-transform: none; letter-spacing: 0; font-weight: 600; }
.rw-group.is-flash, .card.is-flash { animation: rw-flash 1.6s ease; border-radius: var(--radius-lg); }
@keyframes rw-flash { 0%, 60% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: none; } }
.rw-own-title { margin-top: .4rem; max-width: 26rem; }
.acc-hero-actions { flex-wrap: wrap; align-items: stretch; }
.acc-hero-actions > form { display: flex; margin: 0; }
.acc-hero-actions > .btn, .acc-hero-actions > form > .btn { min-height: 44px; height: auto; align-self: stretch; }
.acc-hero-actions > form > .btn-ghost.pp-edit { width: 44px; padding: 0; background: rgba(255, 255, 255, .92); color: #111; }
.acc-hero-actions > .acc-lvl { align-self: stretch; }
.pp-bdfx-arcoiris::after { background: conic-gradient(from 0deg at 50% 120%, rgb(244 63 94 / .25), rgb(250 204 21 / .25), rgb(34 197 94 / .25), rgb(59 130 246 / .25), rgb(168 85 247 / .25), rgb(244 63 94 / .25)); animation: bdg-spin 20s linear infinite; inset: -50%; }

/* partículas de los efectos (badges.js) */
.pp-fx.has-p::before, .pp-fx.has-p::after { display: none; }
.pp-p { position: absolute; left: var(--x); top: -6%; width: calc(9px * var(--s)); height: calc(9px * var(--s)); background: var(--c); pointer-events: none; animation: pp-fall var(--d) linear var(--delay) infinite; opacity: .9; }
.pp-p-rise { top: auto; bottom: -6%; animation-name: pp-rise; }
.pp-p-float { top: var(--y); animation: pp-float var(--d) ease-in-out var(--delay) infinite alternate, pp-blink 2.2s ease-in-out var(--delay) infinite; }
@keyframes pp-fall { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(var(--sway), 60cqh) rotate(var(--rot)); } 100% { transform: translate(0, 120cqh) rotate(calc(var(--rot) * 2)); } }
@keyframes pp-rise { 0% { transform: translate(0, 0) scale(.7); opacity: 0; } 15% { opacity: .9; } 100% { transform: translate(var(--sway), -120cqh) scale(1.1); opacity: 0; } }
@keyframes pp-float { to { transform: translate(var(--sway), calc(var(--sway) * -.8)); } }
@keyframes pp-blink { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
.pp-fx { container-type: size; }
.pp-p-hojas { border-radius: 0 100% 0 100%; width: calc(12px * var(--s)); height: calc(7px * var(--s)); }
.pp-p-petalos { border-radius: 100% 0 100% 0; width: calc(9px * var(--s)); height: calc(6px * var(--s)); }
.pp-p-corazones { width: calc(12px * var(--s)); height: calc(12px * var(--s)); background: none; }
.pp-p-corazones::before { content: "♥"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--c); font-size: calc(14px * var(--s)); line-height: 1; text-shadow: 0 0 6px rgb(244 63 94 / .6); }
.pp-p-luciernagas { width: calc(5px * var(--s)); height: calc(5px * var(--s)); border-radius: 50%; box-shadow: 0 0 10px 3px var(--c); }
.pp-p-nieve { width: calc(5px * var(--s)); height: calc(5px * var(--s)); border-radius: 50%; opacity: .85; }
.pp-p-chispas { width: calc(8px * var(--s)); height: calc(8px * var(--s)); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 4px #fde68a); }
.pp-p-confeti { width: calc(6px * var(--s)); height: calc(11px * var(--s)); border-radius: 1px; }
.pp-p-burbujas { width: calc(14px * var(--s)); height: calc(14px * var(--s)); border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgb(255 255 255 / .7), rgb(255 255 255 / .05) 60%); border: 1px solid rgb(255 255 255 / .55); }
[data-motion="no"] .pp-p { animation: none; top: var(--y); }
@media (prefers-reduced-motion: reduce) { .pp-p { animation: none; top: var(--y); } }
.rw-prev.is-fx, .rw-prev.is-bd { isolation: isolate; }
.rw-prev .pp-fx, .rw-prev .pp-bdfx { z-index: 0; }
.rw-prev .fr-art-alas { width: 150%; }
.rw-opt { overflow: hidden; }

/* títulos largos: nunca se salen de su lugar (portada, opciones de «Logros», panel) */
.pp-title { max-width: 100%; box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; text-align: left; vertical-align: middle; }
.pp-title .icon { flex: none; }
.pp-title > span { min-width: 0; }
.rw-opt { padding-top: 1.4rem; min-width: 0; }
.rw-opt .pp-title { margin: 0; font-size: .6rem !important; letter-spacing: .02em; padding: .25rem .45rem; justify-content: center; text-align: center; gap: .25rem; }
.rw-opt .pp-title .icon { width: .8rem; height: .8rem; }
.rw-opt strong, .rw-opt small { max-width: 100%; overflow-wrap: anywhere; }
.rw-opt .rw-lock { top: .35rem; right: .4rem; }
.acc-hero .pp-title, .pp-hero .pp-title { max-width: min(100%, 26rem); }
@media (max-width: 600px) { .acc-hero .pp-title, .pp-hero .pp-title { font-size: .72rem; letter-spacing: .02em; } }

/* «Mi perfil › Perfil público»: la portada de «Mi cuenta» queda siempre arriba (no salta); para no duplicarla,
   el perfil embebido se muestra sin su propia portada (los mismos datos, marco, título y fondo ya están arriba) */
body.is-embed .pp-hero, body.is-embed .pp-owner { display: none; }
body.is-embed .pp-kpiw { margin-top: 1.2rem; }

/* ---------- cómo y cuándo: detalle de la insignia e historial ---------- */
.bdg-dlg-how { width: 100%; box-sizing: border-box; display: grid; gap: .15rem; padding: .7rem .9rem; border-radius: var(--radius); background: color-mix(in srgb, var(--ok, #16a34a) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok, #16a34a) 30%, var(--border)); text-align: left; }
.bdg-dlg-how p { margin: 0; }
.bdg-how-k { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-top: .3rem !important; }
.bdg-how-k:first-child { margin-top: 0 !important; }
.bdg-how-t { font-weight: 600; overflow-wrap: anywhere; }
.bdg-how-w { font-size: .85rem; color: var(--text-muted); }
.bdg-tl { list-style: none; margin: 0 0 .6rem; padding: 0 0 0 1.2rem; position: relative; }
.bdg-tl::before { content: ""; position: absolute; left: .45rem; top: .4rem; bottom: .4rem; width: 2px; background: var(--border); }
.bdg-tl-day { position: relative; margin: .9rem 0 .4rem -1.2rem; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.bdg-tl-day:first-child { margin-top: 0; }
.bdg-tl-day span { position: relative; padding: .15rem .55rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.bdg-tl-it { position: relative; display: flex; align-items: center; gap: .8rem; padding: .6rem .8rem; margin-bottom: .45rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.bdg-tl-it::before { content: ""; position: absolute; left: -1.08rem; top: 50%; width: .65rem; height: .65rem; margin-top: -.33rem; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--bg); }
.bdg-tl-it.is-nivel::before { background: #f59e0b; }
.bdg-tl-it.is-recompensa::before { background: var(--accent); }
.bdg-tl-it.is-nivel { background: linear-gradient(100deg, color-mix(in srgb, #f59e0b 12%, var(--surface)), var(--surface) 60%); }
.bdg-tl-ic { flex: none; display: grid; place-items: center; width: 3.2rem; min-height: 2.8rem; }
.bdg-tl-ic .lvl-n { width: 2.4rem; height: 2.7rem; background: linear-gradient(160deg, #fde68a, #f59e0b 60%, #b45309); }
.bdg-tl-ic .rw-prev { width: 3rem !important; height: 2.2rem !important; }
.bdg-tl-ic .pp-title { font-size: .5rem; padding: .2rem .3rem; }
.bdg-tl-tx { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.bdg-tl-k { font-size: .72rem; color: var(--text-muted); }
.bdg-tl-t { justify-self: start; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
button.bdg-tl-t { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.bdg-tl-how { font-size: .85rem; overflow-wrap: anywhere; }
.bdg-tl-xp { flex: none; font-size: .8rem; color: var(--ok, #16a34a); }
@media (max-width: 520px) { .bdg-tl-xp { display: none; } }


/* ---------- Lo nuevo y lo que falta (2026-10-12) ---------- */
.bdg-ribbon { position: absolute; top: .45rem; left: -.15rem; z-index: 2; padding: .15rem .5rem .15rem .55rem; border-radius: 0 var(--radius) var(--radius) 0; background: linear-gradient(90deg, #f59e0b, #f43f5e); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 4px 10px -4px rgb(244 63 94 / .7); animation: bdg-ribbon 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes bdg-ribbon { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(2px); } }
.bdg-card { position: relative; }
.bdg-card.is-new, .rw-opt.is-new { border-color: color-mix(in srgb, #f59e0b 70%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, #f59e0b 22%, transparent), 0 10px 28px -14px #f59e0b; animation: bdg-glow 2.6s ease-in-out infinite; }
@keyframes bdg-glow { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, #f59e0b 18%, transparent), 0 10px 28px -16px #f59e0b; } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, #f59e0b 30%, transparent), 0 12px 34px -12px #f59e0b; } }
.rw-opt.is-new:has(input:checked) { border-color: var(--primary); }
.bdg-new-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .12rem .5rem; border-radius: var(--radius); background: linear-gradient(90deg, #f59e0b, #f43f5e); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; width: max-content; }
.bdg-new-chip .icon { width: .8rem; height: .8rem; }
.tab-count.is-new { background: linear-gradient(90deg, #f59e0b, #f43f5e); color: #fff; animation: bdg-pulse 1.8s ease-in-out infinite; }
@keyframes bdg-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.bdg-tl-it.is-new { background: color-mix(in srgb, #f59e0b 8%, transparent); border-radius: var(--radius); }

/* recompensas: botón «?» y lo bloqueado se puede tocar para ver qué falta */
.rw-info { position: absolute; top: .3rem; right: .3rem; z-index: 2; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; padding: 0; border: 0; border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--text-muted); cursor: pointer; }
.rw-info:hover, .rw-info:focus-visible { color: var(--primary); background: var(--surface-2); }
.rw-opt.is-locked { cursor: pointer; }
.rw-opt.is-locked:hover { opacity: .85; border-color: var(--border-strong, var(--border)); }
.rw-opt .bdg-bar { width: 80%; }
.rw-opt.is-flash { animation: rw-flash 1.6s ease; }
@keyframes rw-flash { 0%, 100% { transform: none; } 20% { transform: scale(1.06); } 40% { transform: scale(.98); } 60% { transform: scale(1.03); } }

/* lo que lleva puesto en el perfil se puede tocar */
.pp-title.is-tappable { border: 0; font-family: inherit; cursor: pointer; transition: transform .15s ease, filter .15s ease; }
.pp-title.is-tappable:hover { transform: translateY(-1px); filter: brightness(1.08); }
.pp-avatar-wrap.is-tappable { cursor: pointer; }
.pp-avatar-wrap.is-tappable:focus-visible { outline: 3px solid var(--pp-accent, var(--primary)); outline-offset: 4px; border-radius: 50%; }

/* el detalle (mismo modal para insignias y recompensas) */
.bdg-dlg-art.is-rw { display: grid; place-items: center; min-height: 6rem; }
.bdg-dlg-art.is-rw .pp-title { font-size: 1rem; margin: 0; }
.bdg-dlg-art.is-rw .rw-prev { width: 12rem !important; height: 6rem !important; }
/* el marco se ve con la foto a un tamaño fijo (venga de la lista o de la foto grande del perfil): sin escalar,
   así el brillo y los adornos ocupan su lugar y no pisan el texto de abajo */
.bdg-dlg-art.is-rw .pp-avatar-wrap { transform: none; margin: 1.1rem; width: auto; height: auto; }
.bdg-dlg-art.is-rw .pp-avatar-wrap .pp-avatar { width: 6rem !important; height: 6rem !important; font-size: 2.2rem !important; }
.bdg-dlg-art.is-rw .rw-prev:has(> .pp-avatar-wrap) { width: auto !important; height: auto !important; }
.bdg-dlg-art.is-rw .pp-avatar-wrap > :not(.pp-avatar):not([class*="fr-"]) { display: none; }
.bdg-dlg-art.is-locked { filter: grayscale(.85) brightness(.85); opacity: .75; }
.bdg-dlg-bar { position: relative; width: 100%; height: 1.4rem; border-radius: var(--radius); background: var(--surface-2); overflow: hidden; }
.bdg-dlg-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent, var(--primary))); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.bdg-dlg-bar span { position: relative; display: block; text-align: center; font-size: .75rem; font-weight: 700; line-height: 1.4rem; }
.bdg-dlg-act { display: flex; gap: .5rem; justify-content: center; }

/* aviso de recompensas nuevas en «Logros» */
.acc-nudge.is-new { border-color: color-mix(in srgb, #f59e0b 60%, var(--border)); background: linear-gradient(120deg, color-mix(in srgb, #f59e0b 10%, var(--surface)), var(--surface) 60%); }
.acc-nudge.is-new .acc-nudge-ic { background: linear-gradient(135deg, #f59e0b, #f43f5e); color: #fff; }
.acc-nudge-rw { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.acc-nudge-it { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .6rem .3rem .35rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; color: inherit; }
.acc-nudge-it:hover { border-color: #f59e0b; }
.acc-nudge-it .rw-prev { width: 2.4rem !important; height: 1.6rem !important; }
.acc-nudge-it .pp-title { font-size: .55rem; padding: .15rem .35rem; margin: 0; }

/* festejo: rayos, puntos, la experiencia sumándose y el nivel avanzando */
.bdg-party-rays { position: absolute; left: 50%; top: 10rem; width: 34rem; height: 34rem; margin: -17rem 0 0 -17rem; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--accent, #f59e0b) 22%, transparent) 0 8deg, transparent 8deg 22deg); border-radius: 50%; mask: radial-gradient(circle, #000 12%, transparent 58%); -webkit-mask: radial-gradient(circle, #000 12%, transparent 58%); animation: bdg-spin 14s linear infinite; z-index: -1; pointer-events: none; }
.bdg-party-dots { display: flex; gap: .35rem; justify-content: center; }
.bdg-party-dots i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--surface-3, var(--border)); transition: background .3s, transform .3s; }
.bdg-party-dots i.is-on { background: var(--accent, var(--primary)); transform: scale(1.2); }
.bdg-party-item { display: grid; justify-items: center; gap: .45rem; }
.bdg-party-item.is-in .bdg-party-art { animation: bdg-pop .8s cubic-bezier(.2, 1.6, .4, 1) both; }
.bdg-party-item.is-in h2 { animation: bdg-rise .5s .2s ease both; }
@keyframes bdg-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bdg-party-art.is-rw { display: grid; place-items: center; min-height: 7rem; filter: drop-shadow(0 10px 24px rgb(0 0 0 / .35)); }
.bdg-party-art.is-rw .pp-title { font-size: 1.05rem; }
.bdg-party-xp { margin: 0; font-weight: 700; }
.bdg-party-xp b { font-size: 1.4rem; color: var(--accent, var(--primary)); font-variant-numeric: tabular-nums; }
.bdg-party-lvl { display: flex; align-items: center; gap: .6rem; width: 100%; box-sizing: border-box; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); text-align: left; margin-top: .4rem; }
.bdg-party-lvl .grow { display: grid; gap: .3rem; min-width: 0; }
.bdg-party-lvl strong { font-size: .85rem; }
.bdg-party-lvl .lvl-bar { display: block; height: .5rem; border-radius: var(--radius); background: var(--surface-3, var(--border)); overflow: hidden; }
.bdg-party-lvl .lvl-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent, var(--primary))); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.bdg-party-lvl.is-up { border-color: #f59e0b; animation: bdg-pop .7s cubic-bezier(.2, 1.6, .4, 1); }
.bdg-party-lvl.is-up .lvl-n { background: linear-gradient(135deg, #f59e0b, #f43f5e); color: #fff; }
@media (prefers-reduced-motion: reduce) { .bdg-party-body::before, .bdg-ribbon, .bdg-card.is-new, .rw-opt.is-new, .tab-count.is-new, .bdg-party-rays { animation: none; } }

.bdg-party-left { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding: 0 .3rem; border-radius: var(--radius); background: var(--accent, var(--primary)); color: #fff; font-size: .75rem; }

.bdg-party-lvl .lvl-bar { width: 100% !important; max-width: none; }

/* Modal con todos los niveles (partials/levels-dialog.php) */
[data-lvl-open] { cursor: pointer; }
.pp-lvl-card[data-lvl-open]:hover, .pp-kpi-row[data-lvl-open]:hover { border-color: var(--pp-accent, var(--primary)); }
.lvl-dlg { width: min(560px, calc(100vw - 2rem)); max-height: min(86vh, 820px); padding: 0; display: none; flex-direction: column; overflow: hidden; }
.lvl-dlg[open] { display: flex; }
.lvl-dlg .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem 1.2rem .4rem; }
.lvl-dlg .sheet-head h2 { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: 1.15rem; }
.lvl-dlg-sum { display: grid; gap: .6rem; padding: .4rem 1.2rem 1rem; border-bottom: 1px solid var(--border); }
.lvl-dlg-sum .lvl-t small { white-space: normal; }
.lvl-dlg-total { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.lvl-dlg-total i { display: block; height: 100%; background: linear-gradient(90deg, #fde047, #f97316); border-radius: 4px; }
.lvl-list { list-style: none; margin: 0; padding: .6rem 1.2rem; overflow: auto; flex: 1; display: grid; gap: .1rem; position: relative; }
.lvl-row { position: relative; display: flex; gap: .8rem; align-items: flex-start; padding: .55rem .2rem .55rem 0; }
.lvl-row:not(:last-child)::before { content: ""; position: absolute; left: 1.05rem; top: 2.6rem; bottom: -.4rem; width: 2px; background: var(--border); }
.lvl-row.is-done:not(:last-child)::before { background: #22c55e; }
.lvl-row-n { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; font-weight: 800; font-size: .9rem; border: 2px solid var(--border); background: var(--surface); color: var(--text-muted); }
.lvl-row.is-done .lvl-row-n { background: #22c55e; border-color: #22c55e; color: #fff; }
.lvl-row.is-now .lvl-row-n { width: 2.6rem; height: 2.6rem; margin-left: -.2rem; background: linear-gradient(135deg, #fde047, #f97316); border-color: transparent; color: #431407; font-size: 1.05rem; box-shadow: 0 0 0 4px rgb(249 115 22 / .2); }
.lvl-row-t { display: grid; gap: .15rem; min-width: 0; flex: 1; }
.lvl-row-t strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; font-size: .95rem; }
.lvl-row-t strong small { font-size: .72rem; color: var(--text-muted); font-weight: 700; }
.lvl-row-t > small { color: var(--text-muted); font-size: .8rem; }
.lvl-row.is-next .lvl-row-t strong { color: var(--text-muted); }
.lvl-row.is-now { background: color-mix(in srgb, #f97316 9%, transparent); border-radius: var(--radius); padding-left: .4rem; margin-left: -.4rem; }
.lvl-row-chip { padding: .05rem .45rem; border-radius: var(--radius); background: #f97316; color: #fff; font-size: .7rem; font-weight: 700; }
.lvl-row-bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: .2rem; }
.lvl-row-bar i { display: block; height: 100%; background: linear-gradient(90deg, #fde047, #f97316); }
.lvl-row-rw { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--text); }
.lvl-row.is-next .lvl-row-rw { color: var(--text-muted); }
.lvl-dlg-hint { margin: 0; padding: .7rem 1.2rem 1rem; border-top: 1px solid var(--border); }
.lvl-row.is-now:not(:last-child)::before { left: 1.45rem; top: 3rem; }

/* Desafíos vigentes (partials/challenges.php): Mi cuenta, perfil y portada */
.chl-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.chl { position: relative; display: flex; gap: .9rem; align-items: flex-start; padding: 1rem; border: 1px solid color-mix(in srgb, #f97316 35%, var(--border)); border-radius: var(--radius-lg, var(--radius)); background: linear-gradient(135deg, color-mix(in srgb, #f97316 10%, var(--surface)), var(--surface) 60%); color: var(--text); text-align: left; overflow: hidden; }
.chl[role="button"] { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.chl[role="button"]:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.chl.is-done { border-color: color-mix(in srgb, #22c55e 45%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, #22c55e 12%, var(--surface)), var(--surface) 60%); }
.chl.is-soon { border-style: dashed; background: var(--surface); }
.chl-art { flex: none; }
.chl-body { display: grid; gap: .3rem; min-width: 0; flex: 1; }
.chl-k { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: 0; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #ea580c; }
.chl-time { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .45rem; border-radius: var(--radius); background: var(--surface-2); color: var(--text); letter-spacing: .02em; text-transform: none; font-weight: 700; }
.chl-time.is-hot { background: #dc2626; color: #fff; }
.chl-time.is-soon { background: var(--surface-2); color: var(--text-muted); }
.chl h3 { margin: 0; font-size: 1.05rem; line-height: 1.2; }
.chl-goal { margin: 0; font-size: .86rem; color: var(--text-muted); }
.chl-bar { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: .2rem; }
.chl-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #fde047, #f97316); }
.chl-val { font-size: .8rem; font-weight: 600; }
.chl-won { margin: 0; display: inline-flex; align-items: center; gap: .3rem; font-weight: 800; color: #16a34a; }
.chl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: .1rem 0 0; }
.chl-meta small { color: var(--text-muted); font-size: .76rem; }
.chl-xp { padding: .1rem .5rem; border-radius: var(--radius); background: linear-gradient(135deg, #fde047, #f97316); color: #431407; font-weight: 800; font-size: .76rem; }
.pp-chl-h { display: flex; align-items: center; gap: .4rem; margin: 1rem 0 .6rem; font-size: 1rem; }
.acc-chl { margin: 1.25rem 0; }
.acc-chl .row-between { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.acc-chl .acc-h { margin: 0; }
.chl .chl-body h3 { margin: 0; font-size: 1.05rem; line-height: 1.2; text-transform: none; letter-spacing: normal; color: var(--text); font-weight: 800; }
.pp-badges .chl-grid { margin-bottom: 1.25rem; }

/* Recompensas nuevas (desafíos y exclusivas): marcos, efectos y fondos */
.pp-avatar-wrap.fr-retador::before { background: conic-gradient(from 0deg, #f97316, #dc2626, #7c3aed, #f97316); box-shadow: 0 0 22px rgb(249 115 22 / .7); animation: bdg-spin 2.2s linear infinite; }
.pp-avatar-wrap.fr-oro-vivo::before { background: conic-gradient(from 0deg, #fff7c2, #facc15, #a16207, #fde047, #fff7c2); box-shadow: 0 0 20px rgb(250 204 21 / .7); animation: bdg-spin 4s linear infinite, fr-gold 1.8s ease-in-out infinite alternate; }
.pp-avatar-wrap.fr-llama-azul::before { background: conic-gradient(from 0deg, #e0f2fe, #38bdf8, #1d4ed8, #22d3ee, #e0f2fe); filter: blur(.6px) saturate(1.3); box-shadow: 0 0 24px #38bdf8, 0 -6px 26px #1d4ed8; animation: bdg-spin 1.6s linear infinite; }
.pp-avatar-wrap.fr-fundador::before { background: conic-gradient(from 0deg, #fde68a, #b45309, #fef3c7, #92400e, #fde68a); box-shadow: 0 0 0 2px #fde68a, 0 0 32px rgb(234 179 8 / .85); animation: bdg-spin 6s linear infinite, fr-gold 2s ease-in-out infinite alternate; }
.pp-avatar-wrap.fr-staff::before { background: conic-gradient(from 0deg, #bfdbfe, #1e3a8a, #93c5fd, #1e40af, #bfdbfe); box-shadow: 0 0 0 2px #93c5fd, 0 0 26px rgb(59 130 246 / .7); animation: bdg-spin 5s linear infinite; }
.pp-avatar-wrap.fr-profe::before { background: conic-gradient(from 0deg, #a7f3d0, #047857, #6ee7b7, #065f46, #a7f3d0); box-shadow: 0 0 0 2px #6ee7b7, 0 0 24px rgb(16 185 129 / .7); animation: bdg-spin 5s linear infinite; }
@keyframes fr-gold { 100% { box-shadow: 0 0 34px rgb(250 204 21 / .95), 0 0 60px rgb(234 179 8 / .45); } }
.pp-p-pelotas { width: calc(11px * var(--s)); height: calc(11px * var(--s)); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f7fee7, var(--c) 45%, #84cc16); box-shadow: inset 2px 0 0 -1px #fff; }
.pp-p-pelotas::after { content: ""; position: absolute; inset: 18% -10%; border: 1.5px solid rgb(255 255 255 / .85); border-radius: 50%; border-top-color: transparent; border-bottom-color: transparent; }
.pp-p-brillos { width: calc(7px * var(--s)); height: calc(7px * var(--s)); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); filter: drop-shadow(0 0 5px #facc15); }
.pp-p-rayitos { width: calc(3px * var(--s)); height: calc(16px * var(--s)); border-radius: 2px; transform: rotate(25deg); box-shadow: 0 0 8px 2px var(--c); }
.pp-bdfx-polvo::before { inset: 0; background: repeating-linear-gradient(90deg, transparent 0 18%, rgb(255 255 255 / .25) 18% 18.6%, transparent 18.6% 50%), radial-gradient(ellipse at 50% 120%, rgb(253 186 116 / .35), transparent 60%); }
.pp-bdfx-polvo::after { inset: 0; background-image: radial-gradient(circle, rgb(255 237 213 / .5) 0 1px, transparent 1.6px); background-size: 26px 22px; animation: fx-drift 9s ease-in-out infinite alternate; opacity: .6; }
.pp-bdfx-estadio::before { inset: -20% -10% 30%; background: radial-gradient(30% 40% at 10% 0%, rgb(224 242 254 / .6), transparent 70%), radial-gradient(30% 40% at 90% 0%, rgb(224 242 254 / .6), transparent 70%); filter: blur(10px); animation: bdg-twinkle 3s ease-in-out infinite; }
.pp-bdfx-estadio::after { inset: auto 0 0; height: 40%; background: linear-gradient(transparent, rgb(22 101 52 / .45)), repeating-linear-gradient(90deg, transparent 0 48%, rgb(255 255 255 / .35) 48% 49%, transparent 49% 100%); }
.pp-bdfx-amanecer::before { inset: 30% -10% -40%; background: radial-gradient(circle at 50% 60%, rgb(253 230 138 / .85), rgb(251 146 60 / .4) 30%, transparent 60%); animation: fx-sunrise 9s ease-in-out infinite alternate; }
.pp-bdfx-amanecer::after { inset: 0; background: linear-gradient(115deg, transparent 40%, rgb(255 255 255 / .12) 50%, transparent 60%) 0 0 / 300% 100%; animation: bdg-shine 8s ease-in-out infinite; }
@keyframes fx-sunrise { to { transform: translateY(-14%); } }
.bdg-card.is-exclusive { border-color: color-mix(in srgb, var(--bdg-c, #eab308) 60%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, var(--bdg-c, #eab308) 16%, var(--surface)), var(--surface) 70%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--bdg-c, #eab308) 30%, transparent); }
.bdg-card.is-exclusive .bdg-rar { display: inline-flex; align-items: center; gap: .25rem; color: var(--bdg-c, #eab308); }

/* Desafíos: tarjetas (renovables, lo que desbloquean) y la vista /desafios */
.chl-time.is-ok { background: #16a34a; color: #fff; }
.chl.is-cycle-week .chl-k { color: #0891b2; }
.chl.is-cycle-week { border-color: color-mix(in srgb, #0891b2 35%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, #0891b2 10%, var(--surface)), var(--surface) 60%); }
.chl.is-done { border-color: color-mix(in srgb, #22c55e 45%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, #22c55e 12%, var(--surface)), var(--surface) 60%); }
.chl-unlocks { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin-top: .15rem; }
.chl-unlocks > small { display: inline-flex; align-items: center; gap: .25rem; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); width: 100%; }
.chl-rw { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .45rem .2rem .25rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font-size: .76rem; }
.chl-rw em { font-style: normal; font-weight: 700; }
.chl-rw .rw-prev { width: 2rem !important; height: 2rem !important; flex: none; border-radius: 6px; overflow: hidden; }
.chl-rw.is-open { border-color: #22c55e; }
.chl-rw.is-open em::after { content: " ✓"; color: #16a34a; }

.chp-hero { position: relative; overflow: hidden; padding: clamp(2rem, 5vw, 3.5rem) 0; color: #fff; background: radial-gradient(90% 120% at 85% 0%, color-mix(in srgb, #f97316 55%, transparent), transparent 60%), radial-gradient(70% 90% at 0% 100%, color-mix(in srgb, #0891b2 45%, transparent), transparent 60%), #0b1220; }
.chp-hero::after { content: ""; position: absolute; right: -6%; top: -30%; width: 46%; aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgb(255 255 255 / .14); animation: bdg-spin 60s linear infinite; }
.chp-hero-in { position: relative; z-index: 1; display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 900px) { .chp-hero-in { grid-template-columns: minmax(0, 1fr) 360px; } }
.chp-kicker { display: inline-flex; align-items: center; gap: .4rem; margin: 0; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; font-size: .8rem; color: #fdba74; }
.chp-hero h1 { margin: .4rem 0 .6rem; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; color: #fff; }
.chp-hero h1 span { background: linear-gradient(90deg, #fde047, #f97316); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chp-lead { margin: 0; max-width: 60ch; color: rgb(255 255 255 / .82); font-size: 1.02rem; }
.chp-clocks { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.chp-clocks span { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: var(--radius); background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .16); font-size: .86rem; }
.chp-me { display: grid; gap: .9rem; color: var(--text); box-shadow: var(--shadow-lg); }
.chp-lvl { border: 0; background: none; padding: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.chp-lvl .lvl-bar { background: var(--surface-2); }
.chp-me-t { display: flex; align-items: center; gap: .4rem; margin: 0; }
.chp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0; }
.chp-stats div { padding: .5rem .6rem; border-radius: var(--radius); background: var(--surface-2); }
.chp-stats dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.chp-stats dd { margin: .1rem 0 0; font-size: 1.4rem; font-weight: 800; }
.chp-stats dd small { font-size: .8rem; color: var(--text-muted); font-weight: 600; }
.chp-body { padding: 2rem 0 4rem; display: grid; gap: 2rem; }
.chp-sec-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; margin-bottom: .8rem; }
.chp-sec-h h2 { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: 1.35rem; }
.chp-sec-h p { margin: 0; }
.chp-foot { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .chp-foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.chp-top h2, .chp-how h2 { display: flex; align-items: center; gap: .45rem; margin: 0 0 .8rem; font-size: 1.1rem; }
.chp-top ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.chp-top li { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: var(--radius); }
.chp-top li:nth-child(odd) { background: var(--surface-2); }
.chp-top li.is-me { box-shadow: inset 3px 0 0 #f97316; }
.chp-top li > b { width: 1.4rem; text-align: center; color: var(--text-muted); }
.chp-top li:nth-child(1) > b { color: #eab308; } .chp-top li:nth-child(2) > b { color: #94a3b8; } .chp-top li:nth-child(3) > b { color: #b45309; }
.chp-n { font-weight: 800; } .chp-n small { font-weight: 500; color: var(--text-muted); }
.chp-how ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.chp-how li { display: flex; gap: .55rem; align-items: flex-start; font-size: .92rem; }
.chp-how li .icon { color: #f97316; margin-top: .2rem; flex: none; }
.chl-all { display: flex; justify-content: flex-end; margin-top: .5rem; }
.chl-rw .pp-title { font-size: .72rem; padding: .15rem .45rem; white-space: nowrap; }
.chl-rw:has(.pp-title) { padding: .15rem; }
.chl-rw:has(.pp-title) em { display: none; }
.chl-rw .rw-prev .pp-avatar-wrap { transform: scale(.78); transform-origin: center; }

/* Vistas compactas: desafíos (como los KPI) y grilla densa de insignias */
.chl-mini-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.chl-mini { position: relative; display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border: 1px solid color-mix(in srgb, #f97316 30%, var(--border)); border-radius: var(--radius); background: color-mix(in srgb, #f97316 6%, var(--surface)); color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; transition: transform .15s, border-color .15s; }
.chl-mini:hover { transform: translateY(-1px); border-color: #f97316; }
.chl-mini.is-cycle-week { border-color: color-mix(in srgb, #0891b2 30%, var(--border)); background: color-mix(in srgb, #0891b2 6%, var(--surface)); }
.chl-mini.is-cycle-week:hover { border-color: #0891b2; }
.chl-mini.is-done { border-color: color-mix(in srgb, #22c55e 45%, var(--border)); background: color-mix(in srgb, #22c55e 8%, var(--surface)); }
.chl-mini .bdg { flex: none; }
.chl-mini-t { display: grid; gap: .15rem; min-width: 0; flex: 1; }
.chl-mini-t strong { font-size: .86rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chl-mini-t small { font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
.chl-mini-t small.is-ok { display: inline-flex; align-items: center; gap: .2rem; color: #16a34a; font-weight: 700; }
.chl-mini .chl-bar { height: 5px; margin: 0; }
.chl-mini-xp { flex: none; align-self: flex-start; padding: .05rem .35rem; border-radius: 6px; background: linear-gradient(135deg, #fde047, #f97316); color: #431407; font-size: .68rem; font-weight: 800; }
.bdg-grid.is-compact { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .45rem; }
.bdg-grid.is-compact .bdg-card { gap: .2rem; padding: .6rem .4rem .5rem; }
.bdg-grid.is-compact .bdg-card strong { font-size: .76rem; line-height: 1.15; }
.bdg-grid.is-compact .bdg-card .bdg-rar, .bdg-grid.is-compact .bdg-card small { font-size: .64rem; }
.bdg-grid.is-compact .bdg-bar { height: 4px; }
.bdg-grid.is-compact .bdg-ribbon { font-size: .58rem; }
.bdg-grid[data-show="won"] .bdg-card.is-locked, .bdg-grid[data-show="locked"] .bdg-card.is-won { display: none; }
.bdg-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: 1.5rem 0 .7rem; }
.bdg-filter { display: inline-flex; gap: .2rem; padding: .2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.bdg-filter button { border: 0; background: none; color: var(--text-muted); font: inherit; font-size: .82rem; font-weight: 600; padding: .3rem .65rem; border-radius: calc(var(--radius) - 2px); cursor: pointer; }
.bdg-filter button small { opacity: .7; }
.bdg-filter button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
/* «Mi cuenta»: vitrina al lado del nombre (como en el perfil público) */
.acc-showcase { margin-top: .6rem; gap: .45rem; }
.acc-showcase a { filter: drop-shadow(0 4px 10px rgb(0 0 0 / .35)); transition: transform .15s; }
.acc-showcase a:hover { transform: translateY(-2px) scale(1.06); }

/* ===== Mi cuenta › Mi perfil › Editar: lista de secciones + una sección a la vez ===== */
.acc-ed { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 820px) { .acc-ed { grid-template-columns: 270px minmax(0, 1fr); } }
@media (min-width: 1100px) { .acc-ed { grid-template-columns: 300px minmax(0, 860px); } }
.acc-ed-nav { display: grid; gap: .2rem; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm, 0 1px 2px rgb(0 0 0 / .05)); }
@media (min-width: 820px) { .acc-ed-nav { position: sticky; top: calc(var(--header-h, 64px) + 1rem); max-height: calc(100vh - var(--header-h, 64px) - 2rem); overflow: auto; } }
.acc-ed-g { margin: .6rem .6rem .25rem; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.acc-ed-g:first-child { margin-top: .25rem; }
.acc-ed-it { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .55rem .6rem; border: 0; border-radius: var(--radius); background: none; color: var(--text); text-align: left; font: inherit; cursor: pointer; position: relative; transition: background .15s; }
.acc-ed-it:hover { background: var(--surface-2); }
.acc-ed-it:focus-visible { outline: none; box-shadow: var(--focus); }
.acc-ed-it[aria-current="true"] { background: color-mix(in srgb, var(--pp-accent) 13%, var(--surface)); }
.acc-ed-it[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: .5rem; bottom: .5rem; width: 3px; border-radius: 3px; background: var(--pp-accent); }
.acc-ed-ic { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; flex: none; border-radius: var(--radius); background: var(--surface-2); color: var(--pp-accent); }
.acc-ed-it[aria-current="true"] .acc-ed-ic { background: var(--pp-accent); color: #fff; }
.acc-ed-tx { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.acc-ed-tx strong { font-size: .92rem; }
.acc-ed-tx small { color: var(--text-muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-ed-dot { display: none; width: .5rem; height: .5rem; flex: none; border-radius: 50%; background: var(--warn, #d97706); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn, #d97706) 25%, transparent); }
.acc-ed-it.is-dirty .acc-ed-dot { display: block; }
.acc-ed-chev { width: 1rem; height: 1rem; flex: none; color: var(--text-muted); }
@media (min-width: 820px) { .acc-ed-chev { display: none; } }
.acc-ed-main { display: grid; gap: 1rem; min-width: 0; }
.acc-ed-head { display: flex; align-items: center; gap: .8rem; }
.acc-ed-head h2 { margin: 0; font-size: 1.3rem; }
.acc-ed-head p { margin: .1rem 0 0; color: var(--text-muted); font-size: .9rem; }
.acc-ed-hic { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; flex: none; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--pp-accent), color-mix(in srgb, var(--pp-accent) 60%, #000)); color: #fff; }
.acc-ed-hic .icon { width: 1.3rem; height: 1.3rem; }
.acc-ed-back { display: none; }
.acc-ed-form { gap: 1rem; }
.acc-ed-form[hidden] { display: none; }
/* el título de cada tarjeta ya está en la cabecera */
.acc-ed [data-ed-sec] > h2.acc-h, .acc-ed .rw-group[data-ed-sec] > h3 { display: none; }
.acc-ed .rw-group.card { margin: 0; }
.acc-ed [data-ed-sec] > .acc-h3:first-of-type { margin-top: 1.1rem; }
.acc-ed-save { align-items: center; justify-content: flex-end; padding: .75rem 1rem; margin: 0 -.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); box-shadow: 0 -8px 24px -18px rgb(0 0 0 / .45); bottom: .75rem; }
.acc-ed-state { display: inline-flex; align-items: center; gap: .35rem; margin-right: auto; font-size: .85rem; color: var(--text-muted); }
.acc-ed-state .icon { color: var(--ok, #16a34a); }
.acc-ed-state.is-dirty { color: var(--warn, #b45309); font-weight: 600; }
.acc-ed-state.is-dirty .icon { color: var(--warn, #d97706); }
.acc-handle .input-prefix input[readonly] { background: var(--surface-2); color: var(--text-muted); }
.acc-handle-auto { margin-top: .45rem; font-size: .88rem; }
.acc-handle .hint b { color: var(--text); font-weight: 700; }
/* celular: primero la lista; al tocar se abre la sección con «←» */
@media (max-width: 819px) {
  .acc-ed:not(.is-open) .acc-ed-main { display: none; }
  .acc-ed.is-open .acc-ed-nav { display: none; }
  .acc-ed-nav { padding: .35rem; }
  .acc-ed-it { padding: .75rem .6rem; }
  .acc-ed-it[aria-current="true"]:not(:hover) { background: none; }
  .acc-ed-it[aria-current="true"]::before { display: none; }
  .acc-ed-it[aria-current="true"] .acc-ed-ic { background: var(--surface-2); color: var(--pp-accent); }
  .acc-ed-back { display: inline-grid; }
  .acc-ed-hic { display: none; }
  .acc-ed-head h2 { font-size: 1.15rem; }
  .acc-ed-save { bottom: .5rem; padding: .6rem .7rem; }
  .acc-ed-save .hide-sm { display: none; }
  .acc-ed-state { font-size: .78rem; }
}

/* Logros (panel) reordenado: dos filas de paneles parejos y los niveles a lo ancho, plegables */
.bdg-hub { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 1rem; }
.bdg-hub-2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .bdg-hub, .bdg-hub-2 { grid-template-columns: minmax(0, 1fr); } }
.bdg-holders .grow { display: grid; min-width: 0; }
.bdg-showmore { display: block; width: 100%; padding: .6rem; border: 0; border-top: 1px solid var(--border); background: none; color: var(--text-muted); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.bdg-showmore:hover { color: var(--text); }
.bdg-pop { list-style: none; margin: 0; padding: .8rem; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.bdg-pop a { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: var(--radius); color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.bdg-pop a:hover { border-color: var(--primary); background: var(--primary-soft); }
.bdg-pop span { flex: 1; display: grid; min-width: 0; line-height: 1.3; }
.bdg-pop strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bdg-pop small { color: var(--text-muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bdg-pop b { font-family: var(--font-display); font-size: 1.2rem; }
.bdg-lv-panel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.bdg-lv-panel > summary::-webkit-details-marker { display: none; }
.bdg-lv-sum { flex: 1; font-size: .85rem; }
.bdg-lv-panel[open] .bdg-lv-edit { display: none; }
.bdg-lv-strip { position: relative; height: 12px; margin: .9rem 1.2rem .8rem; border-radius: 999px; background: linear-gradient(90deg, var(--primary-soft), var(--primary)); }
.bdg-lv-strip span { position: absolute; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--primary); }
.bdg-lv-panel .bdg-levels { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: .45rem 1rem; }
.bdg-lv-panel .bdg-levels li { grid-template-columns: auto minmax(0, 1fr) 6.5rem auto; }
.bdg-lv-panel .bdg-levels input { min-height: 38px; }
.bdg-pop .bdg { flex: none; width: 44px; height: 44px; } .bdg-pop .bdg > svg { width: 44px; height: 44px; }

/* ===== Diseñador de recompensas (/admin/recompensas) ===== */
.rwd { grid-column: 1 / -1; display: grid; gap: 1.2rem; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .rwd { grid-template-columns: minmax(0, 1fr); } }
.rwd-stage { position: sticky; top: 1rem; display: grid; gap: .5rem; }
.rwd-stage-in { display: grid; place-items: center; min-height: 190px; padding: 1.2rem; border-radius: var(--radius-lg); background: radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--primary) 18%, var(--surface-2)), var(--surface-2)); border: 1px solid var(--border); overflow: hidden; }
.rwd-stage-in .rw-prev.is-fx, .rwd-stage-in .rw-prev.is-bd { width: 100% !important; height: 150px !important; border-radius: var(--radius); }
.rwd-stage-in .pp-title { font-size: 1.1rem; }
.rwd-cap { margin: 0; text-align: center; font-size: .85rem; color: var(--text-muted); }
.rwd-side { display: grid; gap: .6rem; min-width: 0; }
.rwd-kinds { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.rwd-kind { position: relative; cursor: pointer; }
.rwd-kind input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.rwd-kind span { display: grid; gap: .15rem; height: 100%; padding: .6rem .7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.rwd-kind span .icon { color: var(--primary); }
.rwd-kind small { color: var(--text-muted); font-size: .76rem; line-height: 1.3; }
.rwd-kind input:checked + span { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.rwd-kind input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.rwd-head { display: flex; align-items: center; gap: .6rem; margin-top: .4rem; }
.rwd-head .label { flex: 1; }
.rwd-q { max-width: 14rem; min-height: 0; height: 34px; padding: .2rem .6rem; }
.rwd-styles { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); max-height: 330px; overflow: auto; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius); background: color-mix(in srgb, var(--surface-2) 40%, transparent); }
.rwd-styles[hidden], .rwd-style[hidden] { display: none; }
.rwd-style { position: relative; cursor: pointer; display: grid; justify-items: center; gap: .3rem; padding: .5rem .3rem .4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: center; transition: border-color .12s, transform .12s; }
.rwd-style:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.rwd-style input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.rwd-style:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.rwd-style:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.rwd-style small { font-size: .74rem; color: var(--text-muted); line-height: 1.2; }
.rwd-sw { display: grid; place-items: center; min-height: 48px; max-width: 100%; overflow: hidden; }
.rwd-sw .pp-title { font-size: .72rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rwd-title { padding: .7rem; border: 1px solid var(--border); border-radius: var(--radius); }
.rwd-title[hidden] { display: none; }
.rwd-swatches { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.rwd-swatches button { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0; }
.rwd-reach { grid-column: 1 / -1; margin: 0; display: grid; gap: .35rem; padding: .6rem .8rem; border-radius: var(--radius); background: var(--surface-2); font-size: .9rem; }
.rwd-reach:empty { display: none; }
.rwd-reach small { color: var(--text-muted); }
.rwd-reach-bar { display: block; height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.rwd-reach-bar i { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.rwd-stage-in.is-marco .rw-prev { transform: scale(2.3); }
@media (min-width: 1100px) { .rwd-kinds { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Insignias: plantillas y «así la ve el jugador» */
.bdg-tpls { grid-column: 1 / -1; display: grid; gap: .4rem; padding: .7rem .8rem; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: color-mix(in srgb, var(--primary) 5%, transparent); }
.bdg-tpls .label { display: flex; align-items: center; gap: .35rem; }
.bdg-tpls-l { display: flex; flex-wrap: wrap; gap: .35rem; }
.bdg-designer-prev-wrap { display: grid; gap: .5rem; align-content: start; }
.bdg-card-prev { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.bdg-card-prev > div { display: grid; gap: .2rem; min-width: 0; }
.bdg-card-prev small { color: var(--text-muted); line-height: 1.35; }
.bdg-card-meta { display: grid; gap: .1rem; font-size: .78rem; }
.bdg-card-meta b { color: var(--primary); font-weight: 600; }
.bdg-card-meta em { font-style: normal; color: var(--text-muted); }
.bdg-designer { grid-template-columns: 250px minmax(0, 1fr); } @media (max-width: 719px) { .bdg-designer { grid-template-columns: minmax(0, 1fr); } }
.bdg-modal { width: min(640px, 96vw); }
.bdg-modal-tools { padding: .7rem 1.25rem; border-bottom: 1px solid var(--border); }
.bdg-modal-body { max-height: min(65vh, 560px); overflow: auto; }
.bdg-modal-none { padding: 1rem 1.25rem; margin: 0; display: flex; align-items: center; gap: .4rem; }
.bdg-showmore .icon { vertical-align: -2px; margin-right: .2rem; }
