/* PrivilegeFans · Perfil: cabecera, columnas y publicaciones (Antonio, 5-nov-2026: «arregla el perfil… no me gusta como queda»)
 * · Portada más alta, sin cortes: la foto se funde con el fondo por abajo. Sin portada: degradado de la marca (no la trama gris).
 * · Escritorio: foto de perfil a la izquierda montada sobre la portada, nombre / usuario / bio / datos al lado, números en fila
 *   y botones a la derecha. Sin la caja enorme y vacía. Todo alineado al mismo ancho que las pestañas y las columnas.
 * · Columnas: publicaciones (máx. 720 px) + lateral (340 px) centradas; fondo uniforme en toda la página.
 * · Publicaciones: fotos con proporción natural (sin franjas apaisadas recortadas) y tamaño compacto.
 * Va el último de la cascada. Móvil: se mantiene la disposición centrada, con portada más alta y fundida. */
html:root:root body main.perf-page { --pp-w: 1120px; --pp-bg: #061B38; background: transparent !important; min-height: calc(100dvh / .8 - 72px); }
html:root:root body .app-shell:has(main.perf-page) { background: radial-gradient(120% 60% at 50% 0%, #0B2A57 0%, #061B38 55%, #04122A 100%) !important; }

/* ── portada ── */
html:root:root body .perf-page .perf-cover { height: clamp(240px, 24vw, 400px) !important; background: radial-gradient(70% 120% at 70% 0%, rgba(240, 193, 44, .22), transparent 60%), radial-gradient(60% 120% at 15% 10%, rgba(37, 99, 170, .55), transparent 70%), linear-gradient(180deg, #0D2E5C, #061B38) !important; border-radius: 0 !important; border: 0 !important; box-shadow: none !important; }
html:root:root body .perf-page .perf-cover-img { object-position: 50% 30%; -webkit-mask-image: linear-gradient(180deg, #000 55%, rgba(0, 0, 0, .55) 80%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, rgba(0, 0, 0, .55) 80%, transparent 100%); }
html:root:root body .perf-page .perf-cover-shade { height: 60% !important; background: linear-gradient(to top, #061B38 0%, rgba(6, 27, 56, .55) 45%, transparent 100%) !important; }
/* portada de fábrica (sin foto propia): degradado de la marca en vez de la trama gris del emblema */
html:root:root body .perf-page .perf-cover.is-def .perf-cover-img { display: none !important; }
html:root:root body .perf-page .perf-cover.is-def::after { content: ""; position: absolute; inset: 0; background: url("../assets/branding/escudo-oro.png") no-repeat 85% 40% / auto 70%; opacity: .07; pointer-events: none; }

/* ── panel bajo la portada ── */
html:root:root body .perf-page .perf-panel { margin-top: 0 !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
html:root:root body .perf-page .perf-panel::before, html:root:root body .perf-page .perf-panel::after { display: none !important; }
html:root:root body .perf-page .perf-name { color: #fff !important; }
html:root:root body .perf-page .perf-bio { color: #DCE5F1 !important; }

@media (min-width: 900px) {
  html:root:root body .perf-page .perf-cover-bl, html:root:root body .perf-page .perf-cover-br, html:root:root body .perf-page .perf-cover-tr { left: auto; right: max(24px, calc((100% - var(--pp-w)) / 2)) !important; }
  html:root:root body .perf-page .perf-cover-bl { left: calc(max(24px, calc((100% - var(--pp-w)) / 2)) + 56px) !important; right: auto !important; top: 20px !important; bottom: auto !important; }
  html:root:root body .perf-page .perf-cam.tl { left: max(24px, calc((100% - var(--pp-w)) / 2)) !important; top: 20px !important; }
  html:root:root body .perf-page .perf-cover-br { bottom: 24px !important; top: auto !important; }
  html:root:root body .perf-page .perf-panel-in {
    width: min(var(--pp-w), calc(100% - 48px)) !important; margin: 0 auto !important; padding: 0 0 22px !important; text-align: left !important;
    display: grid !important; grid-template-columns: 176px minmax(0, 1fr) auto; grid-template-areas: "av text ctas" "av stats ctas"; column-gap: 26px; row-gap: 12px; align-items: start;
    border-bottom: 1px solid rgba(240, 193, 44, .28);
  }
  html:root:root body .perf-page .perf-av-wrap { grid-area: av; position: relative !important; left: auto !important; top: auto !important; transform: none !important; width: 176px !important; height: 176px !important; margin-top: -96px; }
  html:root:root body .perf-page .perf-text { grid-area: text; text-align: left !important; display: grid; gap: 6px; padding-top: 14px; }
  html:root:root body .perf-page .perf-text > * { margin: 0 !important; text-align: left !important; justify-content: flex-start !important; max-width: 70ch; }
  html:root:root body .perf-page .perf-name { font-size: 30px !important; line-height: 1.1; display: flex; align-items: center; gap: 8px; }
  html:root:root body .perf-page .perf-user { font-size: 15px !important; }
  html:root:root body .perf-page .perf-bio { font-size: 15px !important; line-height: 1.55; }
  html:root:root body .perf-page .perf-meta { display: flex !important; flex-wrap: wrap; gap: 6px 18px; color: #A9B8CC; font-size: 14px; }
  html:root:root body .perf-page .perf-statrow { grid-area: stats; display: flex !important; justify-content: flex-start !important; padding: 0 !important; min-height: 0 !important; margin: 0 !important; }
  html:root:root body .perf-page .perf-stats { gap: 10px; }
  html:root:root body .perf-page .perf-stats > * { min-width: 104px; padding: 10px 16px !important; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1) !important; text-align: left !important; display: grid !important; gap: 2px; }
  html:root:root body .perf-page .perf-stats > * b, html:root:root body .perf-page .perf-stats > * strong { font-size: 22px !important; color: #fff; line-height: 1.1; }
  html:root:root body .perf-page .perf-stats > * small, html:root:root body .perf-page .perf-stats > * span { font-size: 12.5px !important; color: #A9B8CC; }
  html:root:root body .perf-page .perf-stats > *::before, html:root:root body .perf-page .perf-stats > *::after { display: none !important; }
  html:root:root body .perf-page .perf-panel .pp-ctas { grid-area: ctas; display: grid !important; gap: 10px !important; margin: 18px 0 0 !important; align-content: start; justify-content: stretch; }
  html:root:root body .perf-page .perf-panel .pp-cta { min-width: 220px !important; height: 50px !important; justify-content: center; }
  /* pestañas y columnas al mismo ancho que la cabecera */
  html:root:root body .perf-page .perf-tabs { background: transparent !important; border: 0 !important; box-shadow: none !important; }
  html:root:root body .perf-page .perf-tabs-in { width: min(var(--pp-w), calc(100% - 48px)) !important; margin: 0 auto !important; justify-content: flex-start !important; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  html:root:root body .perf-page .perf-body { width: min(var(--pp-w), calc(100% - 48px)) !important; margin: 22px auto 0 !important; display: grid !important; grid-template-columns: minmax(0, 1fr) 340px !important; gap: 24px !important; align-items: start !important; }
  html:root:root body .perf-page .perf-body > .pp-side:first-child { order: 0; }
  html:root:root body .perf-page .perf-body:has(> .pp-side:first-child) { grid-template-columns: 340px minmax(0, 1fr) !important; }
  html:root:root body .perf-page .perf-body > * { min-width: 0; max-width: none !important; width: auto !important; }
  html:root:root body .perf-page .pp-side { position: sticky; top: calc(72px / .8 + 12px); align-self: start; }
}

/* ── publicaciones: fotos sin franjas recortadas, más compactas ── */
html:root:root body .perf-page .ini-media.two { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 4px !important; height: auto !important; }
html:root:root body .perf-page .ini-media.two .ini-tile { aspect-ratio: 4 / 5; height: auto !important; }
html:root:root body .perf-page .ini-media.two .ini-tile img { width: 100% !important; height: 100% !important; object-fit: cover; object-position: 50% 30%; }
html:root:root body .perf-page .ini-media.one .ini-tile, html:root:root body .perf-page .ini-media.one { height: auto !important; max-height: none !important; }
html:root:root body .perf-page .ini-media.one .ini-tile img { width: 100% !important; height: auto !important; max-height: 640px; object-fit: contain; background: #04122A; }
html:root:root body .perf-page .ini-media:is(.three, .four, .many) .ini-tile { aspect-ratio: 1; height: auto !important; }
html:root:root body .perf-page .ini-media video { max-height: 640px; }
@media (min-width: 900px) {
  html:root:root body .perf-page .ini-post { max-width: 720px; }
  html:root:root body .perf-page .ini-media.two { max-height: 520px; }
}

/* ── móvil ── */
@media (max-width: 899px) {
  html:root:root body .perf-page .perf-cover { height: clamp(200px, 56vw, 300px) !important; }
  html:root:root body .perf-page .perf-cover.is-def::after { background-position: 100% 20%; background-size: auto 60%; }
  html:root:root body .perf-page .perf-panel-in { border-bottom: 1px solid rgba(240, 193, 44, .25); }
}
