/* =====================================================================
   PLAYER PROFILES - public profile, directory base, editor preview
   Spec: PROFILES-DESIGN.md. Prefix: pf-  (icons: .pf-i, sprite profile/frames.svg)
   Root: <main class="pf" data-pf-theme="ember|frost|toxic|gold|void" style="--pf-accent:#hex">
   .pf is a size container: every responsive rule is a container query, so the
   editor preview pane gets the phone layout for free. Dark only, 16 px gutters,
   no horizontal scroll, motion only on transform / opacity.
   ===================================================================== */

/* ---------- 1. TOKENS (also on .pf-modal, which pages append outside the .pf root) ---------- */
.pf, .pf-modal {
  --pf-bg: #07080d;
  --pf-bg-2: #0d0f16;
  --pf-panel: rgba(20, 23, 33, 0.78);
  --pf-panel-solid: #141721;
  --pf-panel-2: rgba(255, 255, 255, 0.035);
  --pf-line: rgba(255, 255, 255, 0.08);
  --pf-line-2: rgba(255, 255, 255, 0.14);
  --pf-ink: #f2f4fa;
  --pf-mute: #aeb6c8;
  --pf-faint: #7c8599;
  --pf-good: #5fd48a;
  --pf-bad: #ff5a4a;
  --pf-warn: #ffb020;

  /* theme family defaults (ember); [data-pf-theme] below overrides, inline --pf-accent overrides the accent only */
  --pf-theme-accent: #ff6a1a;
  --pf-accent-2: #ffc24a;
  --pf-role: #b7becf;
  --pf-a: var(--pf-accent, var(--pf-theme-accent));
  --pf-a-dim: color-mix(in srgb, var(--pf-a) 14%, transparent);
  --pf-a-line: color-mix(in srgb, var(--pf-a) 40%, transparent);
  --pf-glow: color-mix(in srgb, var(--pf-a) 45%, transparent);
  --pf-a-ink: color-mix(in srgb, var(--pf-a) 55%, #fff);

  /* Wraith fire (the Wraith card always uses these) */
  --pf-fire: #ff6a1a;
  --pf-molten: #ff3b1e;
  --pf-gold: #ffc24a;
  --pf-flame: #ffd88a;

  --pf-display: "Cinzel", Georgia, serif;
  --pf-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pf-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --pf-fs-xs: 0.88rem;
  --pf-fs-sm: 0.92rem;
  --pf-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pf-r: 16px;
}
.pf {
  container: pf / inline-size;
  position: relative;
  display: block;
  min-width: 0;
  color-scheme: dark;
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--pf-a) 7%, transparent), transparent 60%),
    var(--pf-bg);
  color: var(--pf-ink);
  font-family: var(--pf-body);
  font-size: 1.02rem;
  line-height: 1.55;
  overflow-x: clip;
}
:is(.pf, .pf-modal)[data-pf-theme="frost"] { --pf-theme-accent: #6fd3ff; --pf-accent-2: #e6f7ff; }
:is(.pf, .pf-modal)[data-pf-theme="toxic"] { --pf-theme-accent: #8cff4a; --pf-accent-2: #e4ff5a; }
:is(.pf, .pf-modal)[data-pf-theme="gold"]  { --pf-theme-accent: #ffc24a; --pf-accent-2: #fff1b8; }
:is(.pf, .pf-modal)[data-pf-theme="void"]  { --pf-theme-accent: #a77bff; --pf-accent-2: #5ee1ff; }

.pf *, .pf *::before, .pf *::after, .pf-modal *, .pf-modal *::before, .pf-modal *::after { box-sizing: border-box; }
.pf [hidden], .pf-modal [hidden] { display: none !important; }
.pf ::selection { background: var(--pf-a-line); color: #fff; }
.pf a { color: var(--pf-a-ink); }
.pf a:hover { color: #fff; }
.pf small { font-size: var(--pf-fs-xs); }
.pf :focus-visible, .pf-modal :focus-visible { outline: 2px solid var(--pf-a); outline-offset: 2px; border-radius: 6px; }
.pf img { max-width: 100%; }
.pf-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pf-i { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.16em; fill: none; stroke: currentColor; flex: none; }
.pf .wi { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* tier / rarity scale (same colours as the Wraith Hall of Fire) */
.pf [data-tier], .pf [data-rarity] { --tc: #8a7f78; }
.pf [data-tier="2"], .pf [data-rarity="U"] { --tc: #9aa6b2; }
.pf [data-tier="3"], .pf [data-rarity="R"] { --tc: #d68a4b; }
.pf [data-tier="4"] { --tc: #c9d1d9; }
.pf [data-tier="5"], .pf [data-rarity="E"] { --tc: #ffc24a; }
.pf [data-tier="6"] { --tc: #e4ecf2; }
.pf [data-tier="7"] { --tc: #2fc466; }
.pf [data-tier="8"] { --tc: #9fe6ff; }
.pf [data-tier="9"], .pf [data-rarity="L"] { --tc: #ff3b1e; }
.pf [data-tier="10"], .pf [data-rarity="M"] { --tc: #ff6a1a; }

/* ---------- 2. LAYOUT ---------- */
.pf-wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.pf-body { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.25rem; padding-bottom: 3.5rem; }
.pf-main, .pf-side { display: contents; }
.pf-complete { order: 1; } .pf-wraith { order: 2; } .pf-showcase { order: 3; } .pf-about { order: 4; } .pf-badgebox { order: 5; } .pf-activity { order: 6; }
.pf-body > *, .pf-main > *, .pf-side > * { min-width: 0; }
@container pf (min-width: 1024px) {
  .pf-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
  .pf-main, .pf-side { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
  .pf-body > .pf-panel, .pf-body > .pf-claim { grid-column: 1 / -1; }   /* a panel placed straight in the body (minimal profile) spans both columns */
  .pf-body:not(:has(> .pf-side)) { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 3. HERO ---------- */
.pf-hero { position: relative; }
.pf-banner {
  position: relative; isolation: isolate; overflow: hidden;
  height: clamp(170px, 31.25cqi, 440px);
  background:
    radial-gradient(60% 90% at 78% 30%, var(--pf-a-dim), transparent 70%),
    radial-gradient(50% 80% at 12% 100%, color-mix(in srgb, var(--pf-accent-2) 10%, transparent), transparent 70%),
    linear-gradient(180deg, #11141d, var(--pf-bg));
}
/* the art is 22 % taller than the banner and starts above it; parallax moves it down by at most that much */
.pf-banner-art { position: absolute; left: 0; right: 0; top: -22%; bottom: 0; z-index: -3; display: block; will-change: transform; }
.pf-banner-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.pf-particles { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; display: block; }
.pf-banner-shade {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(0deg, var(--pf-bg) 0%, rgba(7,8,13,0.55) 28%, rgba(7,8,13,0.05) 62%, rgba(7,8,13,0.25) 100%),
    radial-gradient(80% 70% at 50% 110%, color-mix(in srgb, var(--pf-a) 18%, transparent), transparent 70%);
}
.pf-banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; z-index: 1; background: linear-gradient(90deg, transparent, var(--pf-a) 30%, var(--pf-accent-2) 50%, var(--pf-a) 70%, transparent); opacity: 0.8; box-shadow: 0 0 22px var(--pf-glow); }

.pf-hero-body {
  --av: 112px;
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center;
  gap: 0.9rem;
  margin-top: calc((var(--av) + 46px) * -0.5);
}
@container pf (min-width: 640px) {
  .pf-hero-body { --av: 148px; grid-template-columns: auto minmax(0, 1fr); justify-items: start; text-align: left; column-gap: 1.5rem; align-items: end; }
  .pf-card { grid-row: span 2; }
  /* Owner rule 2026-09-23: the banner edge (.pf-banner::after) is the divider and nothing of the art or the
     particles shows under it. Only the card straddles it; the name block starts just below it, whatever
     its height. --pf-lift is how far the hero body is pulled up into the banner (half the card). */
  .pf-hero-body { --pf-lift: calc((var(--av) + 46px) * 0.5); }
  .pf-card { align-self: start; }
  .pf-ident { align-self: start; padding-top: calc(var(--pf-lift) + 0.9rem); }
  .pf-actions { justify-content: flex-start; }
}
@container pf (min-width: 1024px) {
  .pf-hero-body { --av: 176px; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 1.8rem; }
  .pf-card { grid-row: auto; }
  .pf-actions { justify-content: flex-end; align-self: start; max-width: 440px; padding-top: calc(var(--pf-lift) + 0.9rem); }
}

/* ---- the trading card ---- */
.pf-card {
  --rx: 0deg; --ry: 0deg; --mx: 0.5; --my: 0.3;
  position: relative; isolation: isolate;
  width: calc(var(--av) + 24px);
  padding: 12px 12px 8px;
  border-radius: 18px;
  background:
    radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--pf-a) 26%, transparent), transparent 70%),
    linear-gradient(165deg, color-mix(in srgb, var(--pf-a) 18%, #1b1f2b), #0c0e15 70%);
  border: 1px solid var(--pf-a-line);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.6), 0 18px 50px rgba(0,0,0,0.6), 0 0 40px color-mix(in srgb, var(--pf-a) 20%, transparent);
  transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.5s var(--pf-ease);
  transform-style: preserve-3d;
}
.pf-card.is-tilting { transition: transform 0.08s linear; }
.pf-card::before { /* inner bevel */
  content: ""; position: absolute; inset: 5px; border-radius: 14px; pointer-events: none; z-index: -1;
  border: 1px solid rgba(255,255,255,0.07);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.018) 0 2px, transparent 2px 7px);
}
.pf-card-foil {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 3;
  mix-blend-mode: color-dodge; opacity: 0.32;
}
.pf-card-foil::before {
  content: ""; position: absolute; top: -50%; bottom: -50%; left: -100%; width: 300%;
  background: linear-gradient(115deg, transparent 35%, color-mix(in srgb, var(--pf-accent-2) 70%, transparent) 44%, rgba(255,255,255,0.75) 48%, color-mix(in srgb, var(--pf-a) 70%, transparent) 53%, transparent 62%);
  transform: translate3d(calc((var(--mx) - 0.5) * 40%), 0, 0);
  transition: transform 0.5s var(--pf-ease);
}
.pf-card.is-tilting .pf-card-foil::before { transition: none; }
.pf-card-plate {
  display: flex; align-items: center; justify-content: space-between; gap: 0.4rem;
  margin-top: 8px; padding: 3px 4px 0;
  border-top: 1px solid var(--pf-line);
  font-family: var(--pf-mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--pf-faint);
  font-variant-numeric: tabular-nums;
}
.pf-card-set { color: var(--pf-a); font-weight: 700; }
.pf-card-no { color: var(--pf-mute); }

/* ---- avatar + frame ---- */
.pf-avatar {
  --f1: rgba(255,255,255,0.25); --pf-f2: rgba(255,255,255,0.5);
  position: relative; display: block; width: var(--av); height: var(--av);
  color: var(--f1);
}
.pf-avatar::before { /* glow behind the frame: opacity only */
  content: ""; position: absolute; inset: -14%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--f1) 55%, transparent), transparent 75%);
  opacity: 0.45;
}
.pf-avatar.is-lit::before { animation: pf-glow 3.6s ease-in-out infinite; }
@keyframes pf-glow { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.8; } }
.pf-avatar-letter, .pf-avatar-img {
  position: absolute; inset: 8.333%; width: 83.333%; height: 83.333%; border-radius: 50%;
}
.pf-avatar-letter { display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #2a2f3d, #10131b); color: var(--pf-a-ink); font-family: var(--pf-display); font-weight: 800; font-size: calc(var(--av) * 0.38); text-transform: uppercase; }
.pf-avatar-img { display: block; object-fit: cover; background: #10131b; }
.pf-avatar-img[hidden], .pf-avatar.is-broken .pf-avatar-img { display: none; }
.pf-frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pf-avatar[data-frame="none"]  { --f1: rgba(255,255,255,0.35); --pf-f2: rgba(255,255,255,0.35); }
.pf-avatar[data-frame="role"]  { --f1: var(--pf-role); --pf-f2: var(--pf-role); }
.pf-avatar[data-frame="ember"] { --f1: #ff6a1a; --pf-f2: #ffc24a; }
.pf-avatar[data-frame="frost"] { --f1: #6fd3ff; --pf-f2: #eaf8ff; }
.pf-avatar[data-frame="toxic"] { --f1: #7be83a; --pf-f2: #e4ff5a; }
.pf-avatar[data-frame="gold"]  { --f1: #ffc24a; --pf-f2: #fff1b8; }
.pf-avatar[data-frame="void"]  { --f1: #a77bff; --pf-f2: #5ee1ff; }
.pf-avatar[data-frame="none"]::before { opacity: 0; animation: none; }
.pf-avatar[data-frame="void"].is-lit .pf-frame { animation: pf-spin 60s linear infinite; }
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* ---- ident ---- */
.pf-ident { min-width: 0; max-width: 100%; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: inherit; margin-bottom: 0.45rem; }
.pf-hero-body .pf-chips { justify-content: center; }
@container pf (min-width: 640px) { .pf-hero-body .pf-chips { justify-content: flex-start; } }
.pf-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 28px; padding: 0.15rem 0.65rem;
  border-radius: 999px; font-size: var(--pf-fs-xs); font-weight: 600; line-height: 1.2;
  color: var(--pf-mute); background: rgba(255,255,255,0.05); border: 1px solid var(--pf-line);
  white-space: nowrap; text-decoration: none;
}
.pf-chip.is-sm { min-height: 22px; padding: 0.05rem 0.5rem; font-size: 0.78rem; font-style: normal; }
.pf-chip.is-discord { color: #c9ceff; border-color: rgba(88,101,242,0.45); background: rgba(88,101,242,0.14); }
.pf-chip.is-unclaimed { color: var(--pf-warn); border-color: rgba(255,176,32,0.4); background: rgba(255,176,32,0.1); }
.pf-chip.is-private { color: var(--pf-mute); border-style: dashed; }
.pf-role {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 28px; padding: 0.15rem 0.7rem;
  border-radius: 999px; font-family: var(--pf-mono); font-size: var(--pf-fs-xs); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  color: var(--pf-role); background: color-mix(in srgb, var(--pf-role) 13%, transparent); border: 1px solid color-mix(in srgb, var(--pf-role) 45%, transparent);
}
.pf-role::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.pf-live {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 28px; padding: 0.15rem 0.7rem;
  border-radius: 999px; font-family: var(--pf-mono); font-size: var(--pf-fs-xs); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: #fff; background: linear-gradient(180deg, #ff4a4a, #d61f3a); border: 1px solid rgba(255,120,120,0.6);
  box-shadow: 0 0 18px rgba(255,59,59,0.45); text-decoration: none; white-space: nowrap; position: relative; z-index: 2;
}
.pf .pf-live:hover { color: #fff; filter: brightness(1.1); }
.pf-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff; animation: pf-blink 1.4s ease-in-out infinite; }
.pf-live.is-sm { min-height: 22px; padding: 0.05rem 0.5rem; font-size: 0.72rem; }
.pf-live.is-sm::before { width: 6px; height: 6px; }
@keyframes pf-blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

.pf-name {
  margin: 0; font-family: var(--pf-display); font-weight: 900; line-height: 1.02; letter-spacing: 0.02em;
  font-size: clamp(1.9rem, 6cqi, 3.4rem); overflow-wrap: anywhere; text-wrap: balance;
  background: linear-gradient(180deg, #fff 15%, var(--pf-a-ink) 55%, var(--pf-a) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.5)) drop-shadow(0 0 20px var(--pf-glow));
}
.pf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; margin: 0.45rem 0 0; color: var(--pf-mute); font-size: var(--pf-fs-sm); justify-content: center; }
@container pf (min-width: 640px) { .pf-meta { justify-content: flex-start; } }
.pf-meta > * + *::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--pf-faint); margin-right: 0.8rem; vertical-align: middle; }
.pf-flag { font-family: var(--pf-mono); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.1em; color: var(--pf-ink); padding: 0.05rem 0.4rem; border-radius: 4px; background: rgba(255,255,255,0.08); border: 1px solid var(--pf-line-2); }
.pf-meta .pf-flag + *::before { margin-left: 0; }
.pf-flag { display: inline-flex; align-items: center; gap: 0.35em; line-height: 1.3; }
.pf-flag-img { display: block; width: 20px; height: 15px; flex: none; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,0.35); }
.pf-tagline { margin: 0.5rem 0 0; max-width: 60ch; font-size: clamp(1rem, 2.4cqi, 1.15rem); color: var(--pf-ink); font-style: italic; overflow-wrap: anywhere; }
.pf-tagline::before, .pf-tagline::after { color: var(--pf-a); font-family: var(--pf-display); font-style: normal; }
.pf-tagline::before { content: "\201C"; margin-right: 0.1em; }
.pf-tagline::after { content: "\201D"; margin-left: 0.1em; }

/* ---- actions ---- */
.pf-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; align-items: center; min-width: 0; }
.pf-share { position: relative; }

/* ---- Steam presence, looking for a team ---- */
.pf-chip.is-presence { --pc: #7c8599; color: var(--pf-mute); }
.pf-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--pc, currentColor); box-shadow: 0 0 8px var(--pc, currentColor); }
.pf-chip.is-presence[data-presence="offline"] .pf-dot { box-shadow: none; }
.pf-chip.is-presence[data-presence="online"] { --pc: #57cbde; color: #bfeaf2; border-color: rgba(87,203,222,0.4); }
.pf-chip.is-presence[data-presence="ingame"] { --pc: #90ba3c; color: #d6ecaa; border-color: rgba(144,186,60,0.42); background: rgba(144,186,60,0.1); }
.pf-chip.is-presence[data-presence="zl"] { --pc: var(--pf-a); color: var(--pf-a-ink); border-color: var(--pf-a-line); background: var(--pf-a-dim); }
.pf-chip.is-presence[data-presence="zl"] .pf-dot { animation: pf-blink 2s ease-in-out infinite; }
.pf-chip.is-lfg { color: #0b0c10; border-color: transparent; background: linear-gradient(180deg, #8ff0b4, #5fd48a); font-weight: 700; }
.pf-chip.is-lfg .pf-i { color: #0b3a1e; }
.pf-lfg-note { display: flex; align-items: flex-start; gap: 0.45rem; margin: 0.55rem 0 0; max-width: 60ch; padding: 0.45rem 0.75rem; border-radius: 10px; font-size: var(--pf-fs-sm); color: #d4f5df; background: rgba(95,212,138,0.08); border: 1px solid rgba(95,212,138,0.3); text-align: left; overflow-wrap: anywhere; }
.pf-lfg-note::before { content: "LFG"; flex: none; font-family: var(--pf-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; color: var(--pf-good); padding-top: 0.12rem; }
.pf-hero-body .pf-lfg-note { margin-inline: auto; }
@container pf (min-width: 640px) { .pf-hero-body .pf-lfg-note { margin-inline: 0; } }

/* ---------- 4. BUTTONS ---------- */
.pf-btn {
  appearance: none; cursor: pointer; position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 44px; padding: 0.5rem 1.05rem; border-radius: 999px;
  font: inherit; font-size: var(--pf-fs-sm); font-weight: 600; line-height: 1.1; white-space: nowrap; text-decoration: none;
  color: var(--pf-ink); background: rgba(255,255,255,0.06); border: 1px solid var(--pf-line-2);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
:is(.pf, .pf-modal) .pf-btn:hover { color: #fff; border-color: var(--pf-a-line); background: var(--pf-a-dim); }
.pf-btn:active { transform: translateY(1px); }
.pf-btn .pf-i { font-size: 1.05rem; }
:is(.pf, .pf-modal) .pf-btn.is-primary { color: #0b0c10; border-color: transparent; background: linear-gradient(180deg, color-mix(in srgb, var(--pf-a) 55%, #fff), var(--pf-a)); box-shadow: 0 6px 22px color-mix(in srgb, var(--pf-a) 35%, transparent); }
:is(.pf, .pf-modal) .pf-btn.is-primary:hover { color: #0b0c10; filter: brightness(1.08); }
.pf-btn.is-kudos .pf-i { color: var(--pf-a); }
.pf-btn-count { font-family: var(--pf-mono); font-weight: 700; font-size: 0.85rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: rgba(255,255,255,0.08); font-variant-numeric: tabular-nums; }
:is(.pf, .pf-modal) .pf-btn.is-kudos[aria-pressed="true"] { color: #fff; border-color: var(--pf-a); background: linear-gradient(180deg, color-mix(in srgb, var(--pf-a) 40%, #151822), color-mix(in srgb, var(--pf-a) 22%, #0f1118)); box-shadow: 0 0 22px var(--pf-glow); }
.pf-btn.is-kudos[aria-pressed="true"] .pf-i { fill: currentColor; color: var(--pf-accent-2); }
.pf-btn.is-kudos[aria-pressed="true"] .pf-btn-count { background: rgba(0,0,0,0.3); }
.pf-btn.is-steam .pf-i { color: #66c0f4; }
.pf-btn.is-quiet { background: transparent; border-color: var(--pf-line); color: var(--pf-mute); }
:is(.pf, .pf-modal) .pf-btn.is-danger { color: #fff; border-color: transparent; background: linear-gradient(180deg, #ff6b5a, #d63a2a); }
:is(.pf, .pf-modal) .pf-btn.is-danger:hover { filter: brightness(1.08); color: #fff; }
.pf-btn.is-icon { width: 44px; padding: 0; }
.pf-btn.is-sm { min-height: 36px; padding: 0.35rem 0.85rem; font-size: 0.86rem; }
.pf-btn[disabled], .pf-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

/* karma burst sparks (PFX.burst) */
.pf-spark-bit { position: fixed; z-index: 450; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; pointer-events: none; background: var(--c, #ffc24a); box-shadow: 0 0 8px var(--c, #ffc24a); animation: pf-bit 0.7s var(--pf-ease, ease-out) forwards; }
@keyframes pf-bit { from { transform: translate3d(0,0,0) scale(1); opacity: 1; } to { transform: translate3d(var(--dx), var(--dy), 0) scale(0.2); opacity: 0; } }

/* ---------- 5. POPOVER, DISCORD EMBED ---------- */
.pf-pop {
  position: absolute; top: calc(100% + 8px); left: 50%; z-index: 40; width: min(340px, calc(100vw - 32px));
  transform: translateX(-50%); padding: 0.5rem; border-radius: 14px; text-align: left;
  background: var(--pf-panel-solid); border: 1px solid var(--pf-line-2); box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.pf-pop[hidden] { display: none; }
@container pf (min-width: 1024px) { .pf-pop { left: auto; right: 0; transform: none; } }
.pf-pop-item { appearance: none; display: flex; align-items: center; gap: 0.6rem; width: 100%; min-height: 44px; padding: 0.5rem 0.7rem; border: 0; border-radius: 10px; background: none; color: var(--pf-ink); font: inherit; font-size: var(--pf-fs-sm); text-decoration: none; cursor: pointer; }
.pf .pf-pop-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.pf-pop-item .pf-i { color: var(--pf-a); }
.pf-embed { margin: 0.5rem 0.2rem 0.2rem; padding: 0.7rem 0.8rem 0.8rem; border-radius: 4px; background: #2b2d31; border-left: 4px solid var(--pf-a); font-family: "gg sans", var(--pf-body); }
.pf-embed-site { display: block; font-size: 0.75rem; color: #b5bac1; }
.pf-embed-title { display: block; margin-top: 0.2rem; font-size: 0.95rem; font-weight: 600; color: #00a8fc; }
.pf-embed-desc { margin: 0.25rem 0 0.5rem; font-size: 0.85rem; color: #dbdee1; line-height: 1.35; }
.pf-embed-img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 4px; background: #1e1f22; object-fit: cover; }
.pf-embed-cap { display: block; margin-top: 0.35rem; font-size: 0.78rem; color: var(--pf-faint); }

/* ---------- 6. RIBBONS, CLAIM ---------- */
.pf-ribbon {
  position: absolute; z-index: 4; top: 22px; right: -44px; width: 190px; padding: 0.3rem 0; transform: rotate(35deg);
  text-align: center; font-family: var(--pf-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #1a1200;
  background: repeating-linear-gradient(135deg, #ffb020 0 12px, #ffc85a 12px 24px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 16px rgba(255,176,32,0.4);
}
.pf-ribbon.is-avatar { top: auto; bottom: 10%; left: 4%; right: 4%; width: auto; transform: rotate(-6deg); font-size: 0.66rem; padding: 0.2rem 0; border-radius: 3px; }
.pf-claim { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; margin-top: 1rem; padding: 0.8rem 1rem; border-radius: 12px; border: 1px dashed rgba(255,176,32,0.45); background: rgba(255,176,32,0.07); color: var(--pf-ink); font-size: var(--pf-fs-sm); }
.pf-claim.is-private { border-color: var(--pf-line-2); background: rgba(255,255,255,0.04); color: var(--pf-mute); }

/* ---------- 7. STAT STRIP ---------- */
.pf-stats { list-style: none; display: grid; gap: 0.6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.4rem; padding: 0; }
@container pf (min-width: 480px) { .pf-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container pf (min-width: 768px) { .pf-stats { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); } }
.pf-stat {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 0.1rem; min-width: 0;
  padding: 0.75rem 0.85rem 0.7rem; border-radius: 12px; background: var(--pf-panel); border: 1px solid var(--pf-line);
}
.pf-stat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--pf-a-line), transparent); }
.pf-stat > .pf-i { color: var(--pf-a); font-size: 1rem; margin-bottom: 0.15rem; }
.pf-stat-num { font-family: var(--pf-mono); font-weight: 700; font-size: clamp(1.2rem, 3.6cqi, 1.55rem); line-height: 1.15; color: var(--pf-ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-stat-label { font-size: var(--pf-fs-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--pf-faint); line-height: 1.25; }
.pf-stat.is-accent { border-color: var(--pf-a-line); background: linear-gradient(180deg, var(--pf-a-dim), var(--pf-panel)); }
.pf-stat.is-accent .pf-stat-num { color: var(--pf-a-ink); text-shadow: 0 0 16px var(--pf-glow); }
.pf-stat.is-text .pf-stat-num { font-size: clamp(1.05rem, 3cqi, 1.25rem); }

/* ---------- 8. PANELS ---------- */
.pf-panel { position: relative; min-width: 0; padding: clamp(1rem, 2.6cqi, 1.4rem); border-radius: var(--pf-r); background: var(--pf-panel); border: 1px solid var(--pf-line); }
.pf-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; margin-bottom: 1rem; }
.pf-h2 { margin: 0; display: flex; align-items: center; gap: 0.55rem; font-family: var(--pf-display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.03em; color: var(--pf-ink); }
.pf-h2 .pf-i, .pf-h2 .wi { color: var(--pf-a); font-size: 1.15rem; }
.pf-h2.is-plain { font-size: 1.02rem; }
.pf-h3 { margin: 0 0 0.6rem; font-family: var(--pf-mono); font-weight: 500; font-size: var(--pf-fs-xs); letter-spacing: 0.22em; text-transform: uppercase; color: var(--pf-faint); display: flex; align-items: center; gap: 0.6rem; }
.pf-h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--pf-line-2), transparent); }
.pf-more { font-size: var(--pf-fs-sm); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; min-height: 32px; }
.pf-more::after { content: "\2192"; transition: transform 0.16s ease; }
.pf-more:hover::after { transform: translateX(3px); }
.pf-label { display: flex; align-items: center; gap: 0.4rem; font-size: var(--pf-fs-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pf-faint); }

/* ---------- 9. WRAITH CARD (always fire) ---------- */
.pf-wraith {
  --pf-a: #ff6a1a; --pf-a-dim: rgba(255,106,26,0.14); --pf-a-line: rgba(255,106,26,0.35); --pf-glow: rgba(255,106,26,0.45); --pf-a-ink: #ffd88a;
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(255,106,26,0.16), transparent 60%),
    radial-gradient(60% 70% at 0% 100%, rgba(255,59,30,0.1), transparent 60%),
    linear-gradient(180deg, rgba(30,17,11,0.92), rgba(16,10,8,0.92));
  border-color: rgba(255,122,40,0.22);
}
.pf-wraith::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, #ff3b1e, #ff6a1a, #ffc24a); box-shadow: 0 0 20px #ff6a1a; }
.pf-wraith .pf-h2 { color: #fdeadb; }
.pf-wraith .pf-label { color: #a88a78; }
.pf-wraith-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.pf-mmr { min-width: 0; grid-column: 1; }
.pf-mmr-num { display: block; font-family: var(--pf-mono); font-weight: 700; font-size: clamp(2.2rem, 7cqi, 3.2rem); line-height: 1; color: var(--pf-flame); text-shadow: 0 0 22px rgba(255,106,26,0.45); font-variant-numeric: tabular-nums; }
.pf-mmr-peak { font-family: var(--pf-mono); font-size: var(--pf-fs-xs); color: #c1a48f; }
.pf-delta { font-family: var(--pf-mono); font-size: var(--pf-fs-xs); font-weight: 600; }
.pf-delta.is-up { color: var(--pf-good); } .pf-delta.is-down { color: var(--pf-bad); }
.pf-spark { display: block; width: 100%; height: 56px; margin-top: 0.5rem; overflow: visible; }
.pf-spark .line { fill: none; stroke: #ff6a1a; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(255,106,26,0.6)); }
.pf-spark .area { fill: rgba(255,106,26,0.14); stroke: none; }
.pf-spark circle { fill: #ffc24a; stroke: #140b07; stroke-width: 2; vector-effect: non-scaling-stroke; }
.pf-ring { --p: 0; --size: 112px; position: relative; width: var(--size); height: var(--size); flex: none; grid-column: 2; grid-row: 1; }
.pf-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.pf-ring-track, .pf-ring-fill { fill: none; stroke-width: 9; }
.pf-ring-track { stroke: rgba(255,255,255,0.07); }
.pf-ring-fill { stroke: var(--pf-a); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: calc(100 - var(--p)); filter: drop-shadow(0 0 6px var(--pf-glow)); transition: stroke-dashoffset 1.2s var(--pf-ease); }
.pf-wraith .pf-ring-fill { stroke: #ffb43e; }
.pf-fx .pf-ring:not(.is-in) .pf-ring-fill { stroke-dashoffset: 100; }
.pf-ring-val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.pf-ring-val b { font-family: var(--pf-mono); font-weight: 700; font-size: calc(var(--size) * 0.22); color: #fff; font-variant-numeric: tabular-nums; }
.pf-ring-val small { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pf-faint); }
.pf-ring.is-sm { --size: 76px; }
.pf-ring.is-sm .pf-ring-track, .pf-ring.is-sm .pf-ring-fill { stroke-width: 10; }
.pf-wlq { grid-column: 1 / -1; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; margin: 0; padding: 0; }
.pf-wlq li { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; padding: 0.35rem 0.7rem; border-radius: 10px; background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.05); font-size: var(--pf-fs-xs); color: #c1a48f; text-transform: uppercase; letter-spacing: 0.08em; min-width: 0; }
.pf-wlq b { order: 2; font-family: var(--pf-mono); font-size: 1.05rem; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.pf-wlq .is-w b { color: #ffb43e; } .pf-wlq .is-l b { color: #ff5a3c; } .pf-wlq .is-q b { color: #9a8578; }
.pf-bestfight { grid-column: 1 / -1; display: block; padding: 0.8rem 0.95rem; border-radius: 12px; text-decoration: none; color: #fdeadb; background: linear-gradient(90deg, rgba(255,194,74,0.1), rgba(255,194,74,0.02)); border: 1px solid rgba(255,194,74,0.25); border-left: 3px solid #ffc24a; transition: transform 0.16s ease, border-color 0.16s ease; }
.pf .pf-bestfight:hover { transform: translateY(-2px); color: #fff; border-color: rgba(255,194,74,0.5); }
.pf-bestfight b { display: block; margin-top: 0.2rem; font-size: 1.02rem; }
.pf-bestfight > span:last-child { display: block; font-family: var(--pf-mono); font-size: var(--pf-fs-xs); color: #c1a48f; margin-top: 0.15rem; font-variant-numeric: tabular-nums; }
.pf-wraith-badges { grid-column: 1 / -1; }
.pf-topbadges { list-style: none; display: flex; flex-wrap: wrap; gap: 0.9rem 1.2rem; margin: 0; padding: 0; }
.pf-topbadge { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.pf-topbadge-hex { position: relative; width: 46px; height: 50px; display: grid; place-items: center; flex: none; color: var(--tc); font-size: 1.25rem; }
.pf-topbadge-hex::before, .pf-topbadge-hex::after { content: ""; position: absolute; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.pf-topbadge-hex::before { inset: 0; background: var(--tc); }
.pf-topbadge-hex::after { inset: 2.5px; background: radial-gradient(circle at 35% 30%, #3a2416, #150c07); }
.pf-topbadge-hex .wi { position: relative; z-index: 1; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tc) 60%, transparent)); }
.pf-topbadge b { display: block; font-size: var(--pf-fs-sm); color: #fdeadb; line-height: 1.2; }
.pf-topbadge small { font-family: var(--pf-mono); color: var(--tc); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; }
@container pf (min-width: 640px) {
  .pf-wraith-grid { grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1fr); }
  .pf-ring { grid-column: 2; }
  .pf-wlq { grid-column: 3; grid-row: 1; }
  .pf-ring { --size: 124px; }
}

/* ---------- 10. SHOWCASE ---------- */
.pf-shelf + .pf-shelf { margin-top: 1.3rem; }
/* wide: a clip shelf and a stream shelf next to each other share one row */
@container pf (min-width: 768px) {
  .pf-showcase { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1rem; row-gap: 1.3rem; }
  .pf-showcase > * { grid-column: 1 / -1; min-width: 0; }
  .pf-showcase > .pf-panel-head { margin-bottom: -0.3rem; }
  .pf-showcase > .pf-shelf + .pf-shelf { margin-top: 0; }
  .pf-showcase > .pf-shelf:has(> .pf-stream) + .pf-shelf:has(> .pf-stream),
  .pf-showcase > .pf-shelf:has(> .pf-stream):has(+ .pf-shelf > .pf-stream) { grid-column: auto; }
}
.pf-achs, .pf-legends, .pf-kits { list-style: none; display: grid; gap: 0.6rem; margin: 0; padding: 0; }
.pf-achs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-legends { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-kits { grid-template-columns: 1fr; }
@container pf (min-width: 640px) { .pf-achs, .pf-legends, .pf-kits { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pf-achs > li, .pf-legends > li, .pf-kits > li { min-width: 0; }
.pf-ach { --tc: #8a7f78; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; min-width: 0; height: 100%; padding: 0.75rem 0.8rem; border-radius: 12px; background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 12%, transparent), var(--pf-panel-2) 60%); border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent); overflow: hidden; }
.pf-ach::after { content: ""; position: absolute; right: -18px; top: -18px; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--tc) 30%, transparent), transparent); pointer-events: none; }
.pf-ach-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--tc); background: rgba(0,0,0,0.3); border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); font-size: 1.2rem; margin-bottom: 0.25rem; }
.pf-ach-name { font-size: 0.95rem; line-height: 1.25; color: var(--pf-ink); overflow-wrap: anywhere; }
.pf-ach-meta { color: var(--pf-faint); line-height: 1.3; }
.pf-ach-meta b { color: var(--tc); font-weight: 600; }

.pf-legend { position: relative; display: flex; flex-direction: column; height: 100%; min-width: 0; border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--pf-ink); background: #0e1018; border: 1px solid var(--pf-line-2); transition: transform 0.2s var(--pf-ease), border-color 0.2s ease, box-shadow 0.2s ease; }
.pf .pf-legend:hover { transform: translateY(-3px); border-color: var(--pf-a-line); box-shadow: 0 14px 30px rgba(0,0,0,0.5), 0 0 22px var(--pf-a-dim); color: #fff; }
.pf-legend-art { display: block; width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; background: #151822; }
.pf-legend-tag { position: absolute; top: 8px; left: 8px; padding: 0.1rem 0.5rem; border-radius: 999px; font-family: var(--pf-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #0b0c10; background: var(--pf-a); }
.pf-legend[data-state="wanted"] .pf-legend-tag { background: #ff4a4a; color: #fff; }
.pf-legend-tier { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-family: var(--pf-display); font-weight: 800; font-size: 0.95rem; color: #fff; background: rgba(0,0,0,0.65); border: 1px solid var(--pf-line-2); }
.pf-legend-name { display: block; padding: 0.55rem 0.7rem 0; font-size: 0.95rem; line-height: 1.25; overflow-wrap: anywhere; }
.pf-legend-base { display: block; padding: 0 0.7rem 0.6rem; color: var(--pf-faint); }

.pf-kit { display: flex; align-items: flex-start; gap: 0.7rem; height: 100%; min-width: 0; padding: 0.75rem 0.85rem; border-radius: 12px; text-decoration: none; color: var(--pf-ink); background: var(--pf-panel-2); border: 1px solid var(--pf-line); transition: transform 0.16s ease, border-color 0.16s ease; }
.pf .pf-kit:hover { transform: translateY(-2px); border-color: rgba(95,212,138,0.45); color: #fff; }
.pf-kit-ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; color: var(--pf-good); background: rgba(95,212,138,0.1); border: 1px solid rgba(95,212,138,0.3); font-size: 1.2rem; }
.pf-kit-body { min-width: 0; }
.pf-kit-name { display: block; font-size: 0.95rem; line-height: 1.25; overflow-wrap: anywhere; }
.pf-kit-desc { display: block; color: var(--pf-mute); font-size: var(--pf-fs-xs); line-height: 1.4; margin-top: 0.15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-kit-meta { display: block; color: var(--pf-faint); font-family: var(--pf-mono); margin-top: 0.2rem; }

.pf-stream { display: block; border-radius: 12px; overflow: hidden; background: #0c0d13; border: 1px solid var(--pf-line-2); color: var(--pf-ink); text-decoration: none; }
.pf-stream.is-live { border-color: rgba(255,74,74,0.5); box-shadow: 0 0 30px rgba(255,59,59,0.18); }
.pf-stream-embed { position: relative; aspect-ratio: 16 / 9; background: #000; }
.pf-stream-embed iframe, .pf-stream-embed img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.pf-stream-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; padding: 0.7rem 0.85rem; }
.pf-stream-foot b { flex: 1; min-width: 0; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-stream-off { display: flex; align-items: center; gap: 0.8rem; padding: 0.85rem 1rem; }
.pf-stream-off .pf-i { font-size: 1.6rem; color: var(--net, var(--pf-a)); }
.pf-stream-off small { display: block; color: var(--pf-faint); }

/* featured clip: a poster button replaced by the iframe on click */
.pf-clip-play { appearance: none; position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #000; }
.pf-clip-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 0.2s ease, transform 0.4s var(--pf-ease); }
.pf-clip-play:hover img { opacity: 1; transform: scale(1.03); }
.pf-clip-play::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 50%, transparent, rgba(0,0,0,0.45)); pointer-events: none; }
.pf-clip-btn { position: absolute; left: 50%; top: 50%; z-index: 1; display: grid; place-items: center; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; font-size: 1.7rem; color: #fff; background: color-mix(in srgb, var(--net, var(--pf-a)) 80%, #000); box-shadow: 0 0 0 6px rgba(0,0,0,0.35), 0 0 30px color-mix(in srgb, var(--net, var(--pf-a)) 55%, transparent); transition: transform 0.2s var(--pf-ease); }
.pf-clip-btn .pf-i { margin-left: 4px; }
.pf-clip-play:hover .pf-clip-btn, .pf-clip-play:focus-visible .pf-clip-btn { transform: scale(1.08); }
.pf-clip.is-playing .pf-stream-embed { box-shadow: inset 0 0 0 1px var(--pf-line-2); }

/* ---------- 11. ABOUT ---------- */
.pf-bio { margin: 0 0 1rem; white-space: pre-line; color: var(--pf-ink); font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
.pf-tags, .pf-socials { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 1rem; padding: 0; }
.pf-tag { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 34px; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: var(--pf-fs-sm); font-weight: 600; color: var(--pf-a-ink); background: var(--pf-a-dim); border: 1px solid var(--pf-a-line); }
.pf-tag .pf-i { color: var(--pf-a); }
.pf-localtime { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; margin: 0 0 1rem; color: var(--pf-mute); font-size: var(--pf-fs-sm); }
.pf-localtime .pf-i { color: var(--pf-a); align-self: center; }
.pf-localtime b { font-family: var(--pf-mono); font-size: 1.1rem; color: var(--pf-ink); font-variant-numeric: tabular-nums; }
.pf-localtime small { color: var(--pf-faint); }
.pf-socials { margin-bottom: 0; flex-direction: column; }
.pf-socials > li, .pf-tags > li { min-width: 0; max-width: 100%; }
.pf-social { --net: var(--pf-a); display: flex; align-items: center; gap: 0.6rem; min-height: 44px; padding: 0.45rem 0.75rem; border-radius: 10px; text-decoration: none; color: var(--pf-ink); background: var(--pf-panel-2); border: 1px solid var(--pf-line); min-width: 0; transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease; }
.pf-social .pf-i { color: var(--net); font-size: 1.15rem; }
.pf-social span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--pf-fs-sm); }
.pf .pf-social:hover { color: #fff; transform: translateX(3px); border-color: color-mix(in srgb, var(--net) 55%, transparent); background: color-mix(in srgb, var(--net) 10%, transparent); }
.pf [data-net="twitch"] { --net: #a970ff; }
.pf [data-net="youtube"] { --net: #ff4040; }
.pf [data-net="kick"] { --net: #53fc18; }
.pf [data-net="tiktok"] { --net: #ff4f7a; }
.pf [data-net="x"] { --net: #e7e9ea; }
.pf [data-net="instagram"] { --net: #f04f8f; }
.pf [data-net="discordServer"], .pf [data-net="discord"] { --net: #7984ff; }
.pf [data-net="steamGroup"], .pf [data-net="steam"] { --net: #66c0f4; }

/* ---------- 12. PROFILE BADGES ---------- */
.pf-badges { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 0.7rem 0.5rem; margin: 0; padding: 0; }
.pf-badge { --c: var(--pf-a); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.3rem; min-width: 0; }
.pf-badge-ico {
  position: relative; display: grid; place-items: center; width: 54px; height: 60px; flex: none;
  font-family: var(--pf-display); font-weight: 800; font-size: 1.2rem; color: var(--c);
}
.pf-badge-ico::before { content: ""; position: absolute; inset: 0; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 35%, #000)); }
.pf-badge-ico::after { content: ""; position: absolute; inset: 2.5px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--c) 22%, #232734), #0c0e15); }
/* icon: <i style="--icon:url(/images/profiles/badges/KEY.svg)"> drawn as a mask; the <b> letter shows only when there is no icon */
.pf-badge-ico > i { position: absolute; inset: 22% 21%; z-index: 1; background: var(--c); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 55%, transparent)); }
.pf-badge-ico > b { position: relative; z-index: 1; font-weight: 800; }
.pf-badge-ico:has(> i) > b { display: none; }
.pf-badge-name { font-size: var(--pf-fs-xs); font-weight: 600; line-height: 1.25; color: var(--pf-ink); }
.pf-badge-note { color: var(--pf-faint); font-size: 0.78rem; line-height: 1.25; }
.pf-badge.is-mini .pf-badge-ico { width: 26px; height: 29px; font-size: 0.7rem; }
.pf-badge.is-mini .pf-badge-ico::after { inset: 1.5px; }
.pf-badge.is-mini .pf-badge-ico > i { inset: 20% 19%; filter: none; }
.pf [data-badge="founder"] { --c: #ffc24a; }
.pf [data-badge="staff"] { --c: var(--pf-role); }
.pf [data-badge="streamer"] { --c: #b07cff; }
.pf [data-badge="discord"] { --c: #7984ff; }
.pf [data-badge="slayer"] { --c: #ff6a1a; }
.pf [data-badge="veteran"] { --c: #e6d2b0; }
.pf [data-badge="kit-author"] { --c: #5fd48a; }
.pf [data-badge="legend-rater"] { --c: #ff5c8a; }
.pf [data-badge="kudos-magnet"] { --c: #ff8f6a; }

/* ---------- 13. ACTIVITY ---------- */
/* Owner rule 2026-09-23: the list scrolls inside the panel (header stays put), capped near the neighbour
   panels' height, thin themed scrollbar, soft fade at the bottom that PFX removes (.is-end) at the end. */
.pf-feed {
  list-style: none; position: relative; margin: 0; padding: 0 0.35rem 0 0;
  max-height: 340px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
  scrollbar-width: thin; scrollbar-color: var(--pf-a-line) transparent;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 44px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 44px), transparent);
}
.pf-feed.is-end, .pf-feed.is-short { -webkit-mask-image: none; mask-image: none; }
.pf-feed::-webkit-scrollbar { width: 6px; }
.pf-feed::-webkit-scrollbar-track { background: transparent; }
.pf-feed::-webkit-scrollbar-thumb { background: var(--pf-a-line); border-radius: 3px; }
.pf-feed::-webkit-scrollbar-thumb:hover { background: var(--pf-a); }
.pf-feed:focus-visible { outline-offset: 4px; }
@container pf (min-width: 1024px) { .pf-feed { max-height: 360px; } }
/* the rail is one segment per row so it keeps working inside the scroller */
.pf-event::before { content: ""; position: absolute; left: 17px; top: 0; bottom: 0; width: 2px; background: var(--pf-line); }
.pf-event:first-child::before { top: 50%; background: linear-gradient(180deg, var(--pf-a-line), var(--pf-line)); }
.pf-event:last-child::before { bottom: 50%; }
.pf-event:only-child::before { display: none; }
.pf-event { --c: var(--pf-a); position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 0.2rem 0.75rem; align-items: center; padding: 0.45rem 0; }
.pf-event-ico { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--c); background: var(--pf-panel-solid); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 0 0 4px var(--pf-bg); }
.pf-event-text { margin: 0; min-width: 0; font-size: var(--pf-fs-sm); color: var(--pf-ink); line-height: 1.4; overflow-wrap: anywhere; }
.pf-event-text b { color: var(--c); font-weight: 600; }
.pf-event-time { font-family: var(--pf-mono); font-size: var(--pf-fs-xs); color: var(--pf-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
@container pf (max-width: 479px) { .pf-event { grid-template-columns: 36px minmax(0, 1fr); } .pf-event-time { grid-column: 2; } }
.pf-event[data-kind="fight"] { --c: #ff6a1a; }
.pf-event[data-kind="fight"][data-outcome="surrender"], .pf-event[data-kind="fight"][data-outcome="regen"] { --c: #9a8578; }
.pf-event[data-kind="achievement"] { --c: #ffc24a; }
.pf-event[data-kind="kit"] { --c: #5fd48a; }
.pf-event[data-kind="legendary"] { --c: #ff5c8a; }
.pf-event[data-kind="joined"] { --c: var(--pf-a); }
.pf-event[data-kind="discord"] { --c: #7984ff; }

/* ---------- 14. COMPLETENESS ---------- */
.pf-complete { border-color: var(--pf-a-line); background: linear-gradient(160deg, var(--pf-a-dim), var(--pf-panel) 60%); }
.pf-complete-top { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.8rem; }
.pf-complete-next { margin: 0.2rem 0 0; color: var(--pf-mute); font-size: var(--pf-fs-sm); }
.pf-meter { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.07); overflow: hidden; }
.pf-meter i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); border-radius: 3px; background: linear-gradient(90deg, var(--pf-a), var(--pf-accent-2)); box-shadow: 0 0 10px var(--pf-glow); transition: width 1s var(--pf-ease); }
.pf-fx .pf-meter:not(.is-in) i { width: 0; }
.pf-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.9rem; padding: 0; }
.pf-steps li { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.8rem; color: var(--pf-faint); border: 1px dashed var(--pf-line-2); }
.pf-steps li.is-done { color: var(--pf-good); border: 1px solid rgba(95,212,138,0.35); background: rgba(95,212,138,0.08); }
.pf-steps li.is-done::before { content: "\2713"; font-weight: 700; }
.pf-steps li.is-next { color: var(--pf-a-ink); border: 1px solid var(--pf-a-line); background: var(--pf-a-dim); }

/* ---------- 15. EMPTY, SKELETON ---------- */
.pf-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem; padding: 1.4rem 1rem; border-radius: 12px; border: 1px dashed var(--pf-line-2); color: var(--pf-mute); }
.pf-empty > .pf-i { font-size: 1.8rem; color: var(--pf-a); opacity: 0.8; }
.pf-empty-title { margin: 0; font-family: var(--pf-display); font-weight: 700; font-size: 1rem; color: var(--pf-ink); }
.pf-empty-text { margin: 0 0 0.3rem; font-size: var(--pf-fs-sm); max-width: 42ch; }
.pf-empty.is-inline { flex-direction: row; justify-content: center; padding: 0.8rem; border-style: solid; border-color: var(--pf-line); }
.pf-skel { position: relative; overflow: hidden; display: block; border-radius: 10px; background: rgba(255,255,255,0.05); }
.pf-skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.07) 50%, transparent 80%); transform: translateX(-100%); animation: pf-shimmer 1.4s infinite; }
@keyframes pf-shimmer { to { transform: translateX(100%); } }
.pf-skel.is-line { height: 14px; width: 70%; border-radius: 4px; }
.pf-skel.is-title { height: 2.4rem; width: min(320px, 80%); border-radius: 6px; }
.pf-skel.is-block { height: 160px; border-radius: var(--pf-r); }
.pf-skel.is-avatar { position: absolute; inset: 8.333%; border-radius: 50%; }
.pf-skel.is-stat { height: 86px; border-radius: 12px; }
.pf-hero-body .pf-skel.is-line { margin-inline: auto; }
@container pf (min-width: 640px) { .pf-hero-body .pf-skel.is-line { margin-inline: 0; } }

/* ---------- 16. MODAL, TOAST ---------- */
.pf-modal { position: fixed; inset: 0; z-index: 500; font-family: var(--pf-body); line-height: 1.5; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4,5,9,0.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.2s ease; }
.pf-modal[hidden] { display: none; }
.pf-modal.is-in { opacity: 1; }
.pf-modal-card { width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 1.3rem; border-radius: 18px; background: var(--pf-panel-solid, #141721); border: 1px solid var(--pf-line-2, rgba(255,255,255,0.14)); box-shadow: 0 30px 80px rgba(0,0,0,0.7); transform: translateY(10px) scale(0.98); transition: transform 0.25s var(--pf-ease, ease); color: var(--pf-ink, #f2f4fa); }
.pf-modal.is-in .pf-modal-card { transform: none; }
.pf-modal-title { margin: 0 0 0.3rem; font-family: var(--pf-display); font-size: 1.25rem; }
.pf-modal-sub { margin: 0 0 1rem; color: var(--pf-mute); font-size: var(--pf-fs-sm); }
.pf-reasons { display: grid; gap: 0.4rem; margin: 0 0 0.8rem; padding: 0; border: 0; }
.pf-reason { display: flex; align-items: center; gap: 0.65rem; min-height: 44px; padding: 0.45rem 0.75rem; border-radius: 10px; border: 1px solid var(--pf-line); background: var(--pf-panel-2); cursor: pointer; font-size: var(--pf-fs-sm); }
.pf-reason:has(input:checked) { border-color: var(--pf-bad); background: rgba(255,90,74,0.1); }
.pf-reason input { accent-color: var(--pf-bad); width: 18px; height: 18px; margin: 0; }
.pf-input { display: block; width: 100%; min-height: 44px; padding: 0.6rem 0.75rem; border-radius: 10px; font: inherit; font-size: var(--pf-fs-sm); color: var(--pf-ink); background: var(--pf-bg-2); border: 1px solid var(--pf-line-2); resize: vertical; }
.pf-input::placeholder { color: var(--pf-faint); }
.pf-input:focus { outline: none; border-color: var(--pf-a); box-shadow: 0 0 0 3px var(--pf-a-dim); }
.pf-modal-note { margin: 0.4rem 0 0; font-size: var(--pf-fs-xs); color: var(--pf-faint); }
.pf-modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.pf-toast { position: fixed; left: 50%; bottom: max(1.2rem, env(safe-area-inset-bottom)); z-index: 600; transform: translate(-50%, 10px); opacity: 0; padding: 0.6rem 1.1rem; border-radius: 999px; background: #141721; border: 1px solid rgba(255,255,255,0.14); color: #f2f4fa; font: 600 0.9rem/1.3 "Inter", system-ui, sans-serif; box-shadow: 0 12px 30px rgba(0,0,0,0.55); transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none; max-width: calc(100vw - 32px); }
.pf-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
html.pf-lock { overflow: hidden; }

/* ---------- 17. 404 / PRIVATE ---------- */
.pf-404 { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.6rem; min-height: min(78vh, 720px); padding: 3rem 16px; }
.pf-404 .pf-particles { z-index: -1; }
.pf-404::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(50% 45% at 50% 42%, var(--pf-a-dim), transparent 70%); }
.pf-404-card {
  position: relative; width: 150px; height: 200px; margin-bottom: 1rem; border-radius: 16px; transform: rotate(-6deg);
  display: grid; place-items: center;
  background: linear-gradient(165deg, color-mix(in srgb, var(--pf-a) 18%, #1b1f2b), #0c0e15 70%);
  border: 1px solid var(--pf-a-line); box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 50px var(--pf-a-dim);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 88% 84%, 76% 79%, 63% 88%, 50% 81%, 37% 90%, 24% 82%, 12% 88%, 0 80%);
}
.pf-404-card::before { content: ""; position: absolute; inset: 10px 10px 30%; border-radius: 50%; border: 2px dashed var(--pf-a-line); }
.pf-404-code { position: relative; font-family: var(--pf-mono); font-weight: 700; font-size: 2.4rem; color: var(--pf-a-ink); text-shadow: 0 0 20px var(--pf-glow); margin-top: -20%; }
.pf-404-card .pf-i { position: relative; font-size: 3rem; color: var(--pf-a-ink); margin-top: -20%; }
.pf-404-title { margin: 0; font-family: var(--pf-display); font-weight: 900; font-size: clamp(1.8rem, 6cqi, 2.8rem); background: linear-gradient(180deg, #fff 20%, var(--pf-a)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pf-404-text { margin: 0 0 0.8rem; color: var(--pf-mute); max-width: 44ch; }

/* ---------- 18. EDITOR PREVIEW ---------- */
.pf-preview-frame { position: relative; overflow: hidden; border-radius: 22px; border: 1px solid rgba(255,255,255,0.12); background: #07080d; box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 0 0 4px #0b0c12; }
.pf.is-preview { padding-bottom: 1rem; }
.pf.is-preview .pf-banner-art { transform: none !important; }

/* ---------- 19. REVEAL ---------- */
.pf-fx [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.52s var(--pf-ease), transform 0.52s var(--pf-ease); transition-delay: var(--rd, 0ms); }
.pf-fx [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 20. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .pf *, .pf *::before, .pf *::after, .pf-modal, .pf-modal-card, .pf-toast { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .pf-card { transform: none !important; }
  .pf-card-foil::before { transform: none !important; }
  .pf-particles { display: none; }
  .pf-banner-art { transform: none !important; }
  .pf-fx [data-reveal] { opacity: 1; transform: none; }
  .pf-fx .pf-ring:not(.is-in) .pf-ring-fill { stroke-dashoffset: calc(100 - var(--p)); }
  .pf-fx .pf-meter:not(.is-in) i { width: calc(var(--p, 0) * 1%); }
  .pf-skel::after { animation: none; }
}
