/* =====================================================================
   PERFIL PÚBLICO · cabecera, cifras, medallas, evolución, valoraciones y actividad
   ===================================================================== */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.pf { padding-top: 22px; padding-bottom: 60px; display: grid; gap: 26px; }
.pf-sec { display: block; } .pf-sh { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; } .pf-sh h2 { margin: 0; }

/* ---------- Cabecera ---------- */
.pf-hero { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: var(--sh-2); }
.pf-banner { position: relative; height: 200px; overflow: hidden; background: linear-gradient(120deg, #1C1640, #3A33F2 60%, #8B5CF6) center / cover; }
.pf-banner .o { position: absolute; border-radius: 50%; filter: blur(46px); opacity: .55; animation: au-drift 18s ease-in-out infinite alternate; } .pf-banner .o1 { width: 280px; height: 280px; background: #06B6D4; left: 6%; top: -90px; } .pf-banner .o2 { width: 240px; height: 240px; background: #DB2777; right: 10%; top: 30px; animation-delay: -6s; } .pf-banner .o3 { width: 200px; height: 200px; background: #F59E0B; left: 45%; bottom: -110px; animation-delay: -11s; opacity: .4; }
.pf-head { position: relative; display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; padding: 0 28px 22px; margin-top: -66px; }
.pf-avatar { --ang: 0deg; position: relative; flex: none; width: 136px; height: 136px; padding: 5px; border-radius: 50%; background: var(--surface); box-shadow: 0 12px 28px rgba(18,21,40,.25); }
.pf-avatar img, .pf-avatar span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); background: var(--brand-grad); color: #fff; font-size: 3.2rem; font-weight: 800; }
.pf-avatar.ring-bronze { background: conic-gradient(from var(--ang), #7A3E0E, #F1B07A, #C0702A, #7A3E0E); }
.pf-avatar.ring-silver { background: conic-gradient(from var(--ang), #7B8596, #FFFFFF, #BAC3D1, #7B8596); }
.pf-avatar.ring-gold { background: conic-gradient(from var(--ang), #A66F00, #FFEE9E, #F5B800, #A66F00); animation: pf-spin 7s linear infinite; box-shadow: 0 12px 32px rgba(245,184,0,.45); }
.pf-avatar.ring-platinum { background: conic-gradient(from var(--ang), #7C7FF0, #F4FDFF, #8ED2F4, #7C7FF0); animation: pf-spin 6s linear infinite; box-shadow: 0 12px 34px rgba(124,127,240,.5); }
.pf-avatar.ring-pro { background: conic-gradient(from var(--ang), #2A2780, #A9B6FF, #4F46E5, #2A2780); box-shadow: 0 12px 30px rgba(79,70,229,.45); }
@keyframes pf-spin { to { --ang: 360deg; } }
.pf-id { flex: 1; min-width: 240px; padding-top: 72px; } .pf-id h1 { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.2rem); letter-spacing: -0.04em; }
.pf-sub { margin: 2px 0 0; color: var(--muted); } .pf-headline { margin: 6px 0 0; font-weight: 650; color: var(--ink); } .pf-medals { margin-top: 12px; }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 72px; }
.pf-about { padding: 0 28px 26px; } .pf-about p { margin: 0 0 12px; max-width: 78ch; white-space: pre-wrap; }
.pf-links { display: flex; gap: 8px; flex-wrap: wrap; } .pf-links a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: .86rem; color: var(--ink); text-decoration: none; transition: transform .2s var(--ease), border-color .2s; } .pf-links a:hover { transform: translateY(-2px); border-color: var(--action); color: var(--action); }
@media (max-width: 700px) { .pf-head { flex-direction: column; align-items: flex-start; padding: 0 18px 18px; } .pf-id, .pf-actions { padding-top: 0; } .pf-avatar { width: 112px; height: 112px; } .pf-about { padding: 0 18px 20px; } .pf-banner { height: 150px; } }

/* ---------- Guía de mejora (solo propietario) ---------- */
.pf-coach { display: grid; grid-template-columns: auto 1fr minmax(220px, 300px); gap: 22px; align-items: center; padding: 22px 26px; border-radius: 24px; background: var(--soft-grad, linear-gradient(135deg, rgba(79,70,229,.08), rgba(219,39,119,.07))); border: 1.5px dashed color-mix(in srgb, var(--action) 40%, var(--line)); }
.pf-ring { --p: 0; position: relative; display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; background: conic-gradient(var(--action) calc(var(--p) * 1%), var(--line) 0); } .pf-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); } .pf-ring b, .pf-ring small { position: relative; grid-area: 1 / 1; } .pf-ring b { font-size: 1.9rem; font-weight: 850; letter-spacing: -0.04em; transform: translateX(-6px); font-variant-numeric: tabular-nums; } .pf-ring small { transform: translate(18px, 6px); color: var(--muted); font-weight: 800; }
.pf-coach h2 { margin: 0 0 4px; font-size: 1.2rem; } .pf-coach p { margin: 0 0 10px; color: var(--muted); font-size: .92rem; }
.pf-todo { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; } .pf-todo li { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; font-weight: 650; } .pf-todo .ck { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: color-mix(in srgb, var(--action) 14%, transparent); color: var(--action); font-weight: 850; font-size: .72rem; } .pf-todo li.ok { opacity: .65; } .pf-todo li.ok .ck { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); } .pf-todo a { color: var(--ink); text-decoration: none; } .pf-todo a:hover { color: var(--action); }
.pf-next { display: grid; gap: 4px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); color: var(--ink); text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s; } .pf-next:hover { transform: translateY(-3px); box-shadow: var(--sh-2); color: var(--ink); } .pf-next small { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; } .pf-next span { color: var(--muted); font-size: .8rem; }
.pf-coach-note { grid-column: 1 / -1; margin: 0 !important; font-size: .78rem !important; }
@media (max-width: 900px) { .pf-coach { grid-template-columns: 1fr; text-align: left; } .pf-ring { width: 92px; height: 92px; } }

/* ---------- Cifras ---------- */
.pf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 14px; }
.pf-kpi { position: relative; overflow: hidden; padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--sh-1); transition: transform .3s var(--ease), box-shadow .3s; } .pf-kpi:hover { transform: translateY(-5px); box-shadow: var(--sh-2); }
.pf-kpi i { position: absolute; right: -6px; top: -4px; font-style: normal; font-size: 3.6rem; opacity: .13; rotate: 12deg; transition: transform .4s var(--ease), opacity .3s; } .pf-kpi:hover i { transform: scale(1.18) rotate(-6deg); opacity: .22; }
.pf-kpi b { display: block; font-size: 2.1rem; font-weight: 850; letter-spacing: -0.045em; line-height: 1.05; font-variant-numeric: tabular-nums; } .pf-kpi.k-star b { color: #F59E0B; } .pf-kpi.k-star b::before { content: "★ "; font-size: 1.4rem; }
.pf-kpi span { display: block; margin-top: 4px; color: var(--muted); font-size: .86rem; font-weight: 600; } .pf-kpi small { display: block; margin-top: 6px; font-size: .76rem; color: var(--muted); font-weight: 650; } .pf-kpi small.up { color: var(--ok); }

/* ---------- Evolución ---------- */
.pf-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.pf-chart { padding: 20px 20px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--sh-1); } .pf-chart h3 { margin: 0 0 12px; font-size: 1rem; }
.pf-chart .ch-legend { justify-content: center; } .pf-cap { margin: 8px 0 0; color: var(--muted); font-size: .8rem; text-align: center; }
.pf-ph { display: grid; align-content: center; min-height: 170px; border: 2px dashed var(--line); background: var(--surface-2); box-shadow: none; } .pf-ph p { margin: 0; color: var(--muted); }
@media (max-width: 420px) { .pf-charts { grid-template-columns: 1fr; } }

/* ---------- Valoraciones ---------- */
.pf-rev-grid { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; } .pf-rev-grid:not(:has(.pf-sum)) { grid-template-columns: 1fr; }
.pf-sum { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--sh-1); position: sticky; top: 90px; }
.pf-avg { text-align: center; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); } .pf-avg b { display: block; font-size: 3.4rem; font-weight: 850; letter-spacing: -0.05em; line-height: 1; } .pf-avg .pf-stars { display: block; margin: 6px 0 2px; font-size: 1.15rem; } .pf-avg small { color: var(--muted); }
.pf-stars { color: #F59E0B; letter-spacing: 1px; }
.pf-dist { display: grid; gap: 7px; } .pf-dist > div { display: grid; grid-template-columns: 30px 1fr 28px; gap: 9px; align-items: center; font-size: .82rem; } .pf-dist span { font-weight: 700; color: var(--muted); } .pf-dist i { display: block; height: 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; } .pf-dist u { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #F59E0B, #FBBF24); animation: pf-grow 1s var(--ease) both; text-decoration: none; } .pf-dist em { font-style: normal; color: var(--muted); text-align: right; }
@keyframes pf-grow { from { width: 0; } }
.pf-rev-list { display: grid; gap: 12px; }
.pf-filter { display: flex; gap: 8px; flex-wrap: wrap; } .pf-filter button { padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 .82rem var(--font); cursor: pointer; transition: all .2s var(--ease); } .pf-filter button:hover { border-color: var(--action); color: var(--action); } .pf-filter button.on { background: var(--brand-grad); color: #fff; border-color: transparent; }
.pf-rev { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh-1); } .pf-rev[hidden] { display: none; }
.pf-rev .av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-grad); color: #fff; font-weight: 800; }
.pf-rev .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .pf-rev .top time { margin-left: auto; color: var(--muted); font-size: .78rem; } .pf-rev p { margin: 6px 0 0; color: var(--ink); }
#revMore { justify-self: start; }
@media (max-width: 900px) { .pf-rev-grid { grid-template-columns: 1fr; } .pf-sum { position: static; } }

/* ---------- Actividad reciente ---------- */
.pf-tl { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; display: grid; gap: 12px; } .pf-tl::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--action), transparent); opacity: .5; }
.pf-tl li { position: relative; display: flex; gap: 14px; align-items: center; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-1); } .pf-tl .ic { position: absolute; left: -37px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--action); font-size: 1rem; }
.pf-tl strong { display: block; } .pf-tl small { color: var(--muted); display: flex; gap: 8px; align-items: center; margin-top: 2px; }

/* ---------- Duel y Trust ---------- */
.pf-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; } .pf-mc { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-1); transition: transform .25s var(--ease); } .pf-mc:hover { transform: translateY(-3px); }
.pf-mc .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--soft-grad, var(--surface-2)); flex: none; } .pf-mc small { display: block; color: var(--muted); font-size: .76rem; font-weight: 650; } .pf-mc strong { display: block; } .pf-mc a { font-size: .82rem; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .pf-banner .o, .pf-avatar, .pf-dist u { animation: none !important; } .pf-kpi:hover, .pf-kpi:hover i { transform: none; } }
/* gráficas más grandes: 2 por fila; si queda una suelta, ocupa todo el ancho */
.pf-charts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.pf-charts > .pf-chart:last-child:nth-child(odd) { grid-column: 1 / -1; }
.pf-charts > .pf-chart:last-child:nth-child(odd) .ch { max-height: 250px; }
@media (max-width: 560px) { .pf-kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .pf-kpi { padding: 14px; } .pf-kpi b { font-size: 1.7rem; } .pf-kpi i { font-size: 2.8rem; } }
