.fondo-foto { position: fixed; z-index: -2; top: 0; left: 50%; translate: -50% 0; width: min(920px, 100vw); height: 80vh; background-size: cover; background-position: center 18%; opacity: .55; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 30%, transparent), linear-gradient(90deg, transparent, #000 28%, #000 72%, transparent); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(#000 30%, transparent), linear-gradient(90deg, transparent, #000 28%, #000 72%, transparent); mask-composite: intersect; }

.visitas { display: flex; align-items: center; gap: 6px; margin-top: 14px; align-self: start; justify-self: start; font-size: .8rem; color: var(--muted); }
.visitas svg { width: 16px; height: 16px; }

/* Video de fondo (render.js): oscurecido, con viñeta para que se lea el texto */
.fondo-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; pointer-events: none;
  filter: grayscale(var(--v-gray, 0)) brightness(var(--v-bright, .55)) saturate(1.05); }
.fondo-vineta { position: fixed; inset: 0; z-index: -2; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 30%, rgba(0,0,0,.72) 100%); }
body[data-layout="perfil"] { display: flex; flex-direction: column; min-height: 100dvh; padding: 16px 16px 150px; }
body[data-layout="perfil"] .page { margin: auto; padding: 24px 0; text-shadow: 0 2px 16px rgba(0,0,0,.7); }
body[data-layout="perfil"] .name { font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 800; }
body[data-layout="perfil"] .bio { color: var(--text); opacity: .92; font-weight: 500; }
body[data-layout="perfil"] .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
body[data-layout="perfil"] .btn { width: 50px; height: 50px; padding: 0; justify-content: center; }
body[data-layout="perfil"] .btn .tx, body[data-layout="perfil"] .btn .go { display: none; }
body[data-layout="perfil"] .btn > svg:first-child { width: 30px; height: 30px; color: #fff; }
body[data-layout="perfil"] .btn:hover > svg:first-child { transform: scale(1.2); }

.name.brillo { position: relative; width: fit-content; margin-inline: auto; color: #fff; text-shadow: 0 0 6px rgba(255,255,255,.95), 0 0 18px rgba(255,255,255,.7), 0 0 38px rgba(170,215,255,.85), 0 0 80px rgba(120,175,255,.6); }
.chispa { position: absolute; width: var(--s, 3px); height: var(--s, 3px); border-radius: 50%; background: #fff; box-shadow: 0 0 6px 1px rgba(255,255,255,.9); opacity: 0; pointer-events: none; text-shadow: none; animation: lt-chispa var(--d, 3s) ease-in-out var(--r, 0s) infinite; }
@keyframes lt-chispa { 0%, 100% { opacity: 0; transform: translateY(4px) scale(.5); } 50% { opacity: .95; transform: translateY(-6px) scale(1); } }
html.sin-gpu .chispa { display: none; }

.ubicacion, .visitas { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; font-weight: 600; font-size: .95rem; }
.visitas { position: fixed; z-index: 15; left: max(18px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom)); margin: 0; opacity: .9; text-shadow: 0 2px 12px rgba(0, 0, 0, .85); }
/* Celular: la barra de música ocupa el ancho, el contador pasa justo encima */
@media (max-width: 720px) { .visitas { bottom: calc(max(26px, env(safe-area-inset-bottom)) + 84px); } body[data-layout="perfil"] { padding-bottom: 200px; } }
/* Celular: los 7 íconos en una sola fila; en pantallas bajas, todo más compacto */
@media (max-width: 480px) { body[data-layout="perfil"] .links { gap: 6px; } body[data-layout="perfil"] .btn { width: 42px; height: 42px; } body[data-layout="perfil"] .btn > svg:first-child { width: 26px; height: 26px; } }
@media (max-height: 700px) { body[data-layout="perfil"] .page { padding: 8px 0; } body[data-layout="perfil"] .name { font-size: 1.8rem; } }

/* --pulso lo publica js/fondo.js */
body[data-layout="perfil"] .fondo-foto { height: 90vh; background-position: center 10%; opacity: calc(.12 + var(--pulso, 0) * .2); scale: calc(1 + var(--zh, 0)); translate: calc(-50% + var(--sx, 0px)) var(--sy, 0px); }

/* (el resplandor de la tarjeta de Discord vive en css/discord.css) */

body[data-layout="perfil"] .pv { translate: 0 -10px; transition: opacity .18s, scale .22s cubic-bezier(.22, 1, .36, 1), translate .22s cubic-bezier(.22, 1, .36, 1); }
body[data-layout="perfil"] .pv.on { translate: 0 0; }
.ubicacion { color: #fff; text-shadow: 0 0 6px rgba(255, 255, 255, .85), 0 0 16px rgba(255, 255, 255, .55), 0 0 34px rgba(170, 215, 255, .7); }
.ubicacion svg { filter: drop-shadow(0 0 5px rgba(255, 255, 255, .95)) drop-shadow(0 0 14px rgba(170, 215, 255, .8)); }

/* overflow visible: con hidden + radio 50 % el resplandor del ícono se recortaba como un disco */
body[data-layout="perfil"] .links .btn { scale: 1; border-radius: 14px; }
body[data-layout="perfil"] .btn > svg:first-child { scale: calc(1 + var(--pulso, 0) * .08);
  filter: drop-shadow(0 0 calc(4px + var(--pulso, 0) * 10px) rgba(255, 255, 255, calc(.45 + var(--pulso, 0) * .55)))
          drop-shadow(0 0 calc(10px + var(--pulso, 0) * 30px) rgba(170, 215, 255, calc(.25 + var(--pulso, 0) * .6))); }

.visitas { color: #fff; opacity: 1; text-shadow: 0 0 6px rgba(255, 255, 255, .8), 0 0 calc(12px + var(--pulso, 0) * 26px) rgba(170, 215, 255, calc(.55 + var(--pulso, 0) * .45)); }
.visitas svg { scale: calc(1 + var(--pulso, 0) * .08);
  filter: drop-shadow(0 0 calc(4px + var(--pulso, 0) * 10px) rgba(255, 255, 255, calc(.5 + var(--pulso, 0) * .5)))
          drop-shadow(0 0 calc(10px + var(--pulso, 0) * 26px) rgba(170, 215, 255, calc(.3 + var(--pulso, 0) * .6))); }

a.ubicacion { text-decoration: none; cursor: pointer; transition: scale .2s; }
a.ubicacion:hover { scale: 1.05; }
a.ubicacion:focus-visible { outline: 2px solid var(--accent, #fff); outline-offset: 4px; border-radius: 6px; }

body[data-layout="perfil"] .btn:hover > svg:first-child { color: #c4e8ff;
  filter: drop-shadow(0 0 calc(4px + var(--pulso, 0) * 10px) rgba(196, 232, 255, calc(.7 + var(--pulso, 0) * .3)))
          drop-shadow(0 0 calc(12px + var(--pulso, 0) * 30px) rgba(150, 215, 255, calc(.55 + var(--pulso, 0) * .4))); }

body[data-layout="perfil"] .btn > svg:first-child { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
