/* =====================================================================
   Lifehaki — public profile (/user/{username}).  Loaded on body.lh-profile.
   Template: templates/profile.php · JS: assets/js/profile.js
   Every rule is scoped under .pp so the older .profile-* rules in style.css
   (still used by the follow lists) never collide.
   ===================================================================== */

.pp {
    --pp-ink: #15171c;
    --pp-text: #20242b;
    --pp-mute: #5b616e;
    --pp-line: #e3e3ea;
    --pp-soft: #eceef3;
    --pp-paper: #f5f5f9;
    --pp-red: #ca2128;
    --pp-red-dk: #a81a20;
    --pp-gold: #fdc949;
    --pp-gold-dk: #a87a00;
    --pp-green: #2f8f5b;
    --pp-ease: cubic-bezier(.23, 1, .32, 1);
    --pp-display: 'Fraunces', Georgia, serif;
    --pp-label: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --pp-mono: 'DM Mono', ui-monospace, monospace;
    font-family: 'Urbanist', system-ui, sans-serif;
    color: var(--pp-text);
    background: var(--pp-paper);
    overflow-x: clip;
}
.pp *, .pp *::before, .pp *::after { box-sizing: border-box; }
.pp img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pp .art { display: block; width: 100%; height: 100%; }
:where(.pp) a { color: inherit; }
.pp-wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.pp-muted { color: var(--pp-mute); }
.pp-mono { font-family: var(--pp-mono); font-size: 13px; color: var(--pp-mute); margin: 4px 0 0; }

.pp-suspended { background: #fbeaea; color: #7f1416; text-align: center; padding: 10px 16px; font-weight: 700; }

/* ---------- tones (badges, activity icons, DNA bar) ---------- */
.pp .tone-red   { --t-bg: #fbeaea; --t-fg: var(--pp-red); }
.pp .tone-gold  { --t-bg: #fff4d6; --t-fg: var(--pp-gold-dk); }
.pp .tone-green { --t-bg: #e4f3ea; --t-fg: var(--pp-green); }
.pp .tone-ink   { --t-bg: var(--pp-soft); --t-fg: var(--pp-ink); }

/* ---------- buttons ---------- */
.pp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent;
    font: 700 16px/1 'Urbanist', sans-serif; text-decoration: none; cursor: pointer;
    transition: transform 160ms var(--pp-ease), background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.pp-btn:active { transform: scale(.97); }
.pp-btn:focus-visible, .pp-tab:focus-visible, .pp-filter:focus-visible, .pp-badge:focus-visible, .pp-badgelink:focus-visible {
    outline: 3px solid var(--pp-gold); outline-offset: 3px;
}
.pp-btn-red { background: var(--pp-red); color: #fffdf8; box-shadow: 0 8px 22px rgba(202, 33, 40, .32); }
.pp-btn-light { background: #fff; color: var(--pp-ink); }
.pp-btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.pp-btn-block { width: 100%; }
.pp-icon-btn { width: 48px; padding: 0; background: transparent; color: #fff; border-color: rgba(255, 255, 255, .28); }
@media (hover: hover) and (pointer: fine) {
    .pp-btn-red:hover { background: var(--pp-red-dk); color: #fffdf8; }
    .pp-btn-light:hover, .pp-btn-ghost:hover, .pp-icon-btn:hover { transform: translateY(-1px); }
    .pp-btn-ghost:hover, .pp-icon-btn:hover { background: rgba(255, 255, 255, .12); color: var(--pp-gold); }
}

/* =========================== HERO =========================== */
.pp-hero { position: relative; background: var(--pp-ink); color: #fff; isolation: isolate; }
.pp-hero::before, .pp-hero::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
}
.pp-hero::before { top: -160px; right: -120px; width: 560px; height: 560px; background: radial-gradient(circle, rgba(253, 201, 73, .2), transparent 70%); }
.pp-hero::after  { bottom: -180px; left: -120px; width: 520px; height: 520px; background: radial-gradient(circle, rgba(202, 33, 40, .22), transparent 70%); }

.pp-banner {
    position: absolute; inset: 0 0 auto; height: 380px; z-index: -1; overflow: hidden;
    /* Fade the banner itself out so the hero glows blend under it — no seam. */
    -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
}
.pp-banner img { animation: pp-banner-in 1.2s var(--pp-ease) both; }
.pp-banner::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(21, 23, 28, .55) 0%, rgba(21, 23, 28, .12) 35%, rgba(21, 23, 28, .45) 80%);
}
.pp-banner.is-empty {
    background:
        radial-gradient(120% 90% at 85% 0%, rgba(202, 33, 40, .5), transparent 60%),
        radial-gradient(90% 80% at 10% 10%, rgba(253, 201, 73, .18), transparent 60%),
        #1d2027;
}
@keyframes pp-banner-in { from { transform: scale(1.06); opacity: .4; } }

.pp-id { position: relative; display: flex; align-items: flex-end; gap: 32px; padding-top: 170px; padding-bottom: 48px; }
.pp-banner.is-empty + .pp-id { padding-top: 96px; }

.pp-avatar { position: relative; flex: none; }
.pp-avatar-ring {
    width: 176px; height: 176px; border-radius: 50%; padding: 5px;
    background: conic-gradient(var(--pp-red), var(--pp-gold), var(--pp-red));
    box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
.pp-avatar-inner { width: 100%; height: 100%; border-radius: 50%; padding: 4px; background: var(--pp-ink); }
.pp-avatar-inner img, .pp-avatar-ph { border-radius: 50%; }
.pp-avatar-ph {
    display: flex !important; align-items: center; justify-content: center;
    font: 900 64px/1 var(--pp-display); color: #fff;
}
.pp-lv {
    position: absolute; right: -6px; bottom: 10px; width: 62px; height: 62px; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--pp-gold); color: var(--pp-ink); border: 3px solid var(--pp-ink);
    box-shadow: 3px 3px 0 var(--pp-red); transform: rotate(-8deg);
    animation: pp-stamp 520ms var(--pp-ease) 250ms both;
}
.pp-lv small { font: 700 11px/1 var(--pp-label); letter-spacing: .14em; }
.pp-lv b { font: 900 24px/1 var(--pp-display); }
@keyframes pp-stamp { from { transform: rotate(-30deg) scale(.6); opacity: 0; } }

.pp-who { flex: 1; min-width: 0; }
.pp-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pp-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
    font: 700 13px/1 var(--pp-label); letter-spacing: .14em; text-transform: uppercase;
    background: rgba(255, 255, 255, .12); color: #fff;
}
.pp-chip-red { background: var(--pp-red); }
.pp-name {
    font: 900 clamp(36px, 5vw, 64px)/.98 var(--pp-display); letter-spacing: -.02em;
    color: #fff; margin: 0 0 10px; text-wrap: balance; overflow-wrap: anywhere;
}
.pp-handle { font: 400 15px/1.5 var(--pp-mono); color: rgba(255, 255, 255, .72); margin: 0 0 14px; }
.pp-handle a { color: var(--pp-gold); text-decoration: none; }
.pp-bio { font-size: 18px; line-height: 1.5; color: rgba(255, 255, 255, .88); margin: 0 0 18px; max-width: 60ch; text-wrap: pretty; }
.pp-critic { font-size: 15px; color: rgba(255, 255, 255, .8); margin: -6px 0 18px; }
.pp-critic a { color: var(--pp-gold); }

/* badges */
.pp-badgerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 24px; }
.pp-badge {
    width: 44px; height: 44px; flex: none; border-radius: 12px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--t-bg); color: var(--t-fg);
    border: 2px solid var(--pp-ink); box-shadow: 3px 3px 0 var(--pp-gold);
    cursor: pointer; transition: transform 200ms var(--pp-ease);
}
.pp-badgerow .pp-badge { animation: pp-pop 420ms var(--pp-ease) both; }
.pp-badgerow .pp-badge:nth-child(2) { animation-delay: 50ms; }
.pp-badgerow .pp-badge:nth-child(3) { animation-delay: 100ms; }
.pp-badgerow .pp-badge:nth-child(4) { animation-delay: 150ms; }
.pp-badgerow .pp-badge:nth-child(5) { animation-delay: 200ms; }
.pp-badgerow .pp-badge:nth-child(6) { animation-delay: 250ms; }
@keyframes pp-pop { from { transform: translateY(6px) scale(.9); opacity: 0; } }
.pp-badge:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) {
    .pp-badgerow .pp-badge:hover { transform: translateY(-3px) rotate(-6deg); }
}
.pp-badgelink {
    min-height: 44px; padding: 0 4px; background: none; border: 0; cursor: pointer;
    font: 500 14px/1 var(--pp-mono); color: var(--pp-gold);
}
.pp-badgelink:hover { color: #fff; }

.pp-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pp-follow-form { margin: 0; }
.pp-follow { min-width: 132px; position: relative; }
.pp-follow.is-none { background: var(--pp-red); color: #fffdf8; box-shadow: 0 10px 26px rgba(202, 33, 40, .4); }
.pp-follow.is-accepted, .pp-follow.is-pending { background: #fff; color: var(--pp-ink); }
.pp-follow.is-pending { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.pp-follow-hover { display: none; }
.pp-follow.is-busy { opacity: .7; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
    .pp-follow.is-none:hover { background: var(--pp-red-dk); transform: translateY(-2px); }
    .pp-follow.is-accepted:hover, .pp-follow.is-pending:hover { background: #fbeaea; color: var(--pp-red); border-color: var(--pp-red); }
    .pp-follow.is-accepted:hover .pp-follow-label, .pp-follow.is-pending:hover .pp-follow-label { display: none; }
    .pp-follow.is-accepted:hover .pp-follow-hover, .pp-follow.is-pending:hover .pp-follow-hover { display: inline; }
}

/* stat strip */
.pp-statstrip { border-top: 1px solid rgba(255, 255, 255, .1); }
.pp-statstrip ul { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.pp-statstrip li { border-right: 1px solid rgba(255, 255, 255, .08); }
.pp-statstrip li:last-child { border-right: 0; }
.pp-statstrip li > a { display: block; }
.pp-statstrip li > a, .pp-statstrip li:not(:has(a)) { padding: 22px 12px 24px; text-align: center; text-decoration: none; }
.pp-statstrip b { display: block; font: 900 32px/1 var(--pp-display); letter-spacing: -.02em; color: #fff; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.pp-statstrip span { font: 600 14px/1 var(--pp-label); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .66); }
.pp-statstrip a { transition: background-color 160ms ease; }
.pp-statstrip a:hover { background: rgba(255, 255, 255, .05); }
.pp-statstrip a:hover span { color: var(--pp-gold); }

/* =========================== LEVEL BAR =========================== */
.pp-level { background: var(--pp-gold); border-bottom: 2px solid var(--pp-ink); color: var(--pp-ink); }
.pp-level-in { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.pp-level-name { display: flex; align-items: baseline; gap: 10px; }
.pp-level-name span { font: 700 14px/1 var(--pp-label); letter-spacing: .14em; }
.pp-level-name em { font: italic 800 20px/1 var(--pp-display); }
.pp-level-bar { flex: 1; min-width: 200px; height: 12px; border-radius: 999px; background: rgba(21, 23, 28, .14); border: 1.5px solid var(--pp-ink); overflow: hidden; }
.pp-level-bar i, .pp-prog i { display: block; height: 100%; width: var(--w); background: var(--pp-red); transform-origin: left; animation: pp-grow 900ms var(--pp-ease) 200ms both; }
@keyframes pp-grow { from { transform: scaleX(0); } }
.pp-level-xp { font: 400 14px/1.3 var(--pp-mono); }
.pp-level-how {
    min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--pp-ink);
    background: transparent; font: 700 14px/1 'Urbanist', sans-serif; color: var(--pp-ink); cursor: pointer;
    transition: background-color 160ms ease, transform 160ms var(--pp-ease);
}
.pp-level-how:hover { background: #fff; }
.pp-level-how:active { transform: scale(.97); }

/* =========================== SHELF =========================== */
.pp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.pp-head h2, .pp-dialog h2 { font: 900 clamp(30px, 3.6vw, 44px)/1 var(--pp-display); letter-spacing: -.02em; color: var(--pp-ink); margin: 0; }
.pp-head h2 em, .pp-dialog h2 em { color: var(--pp-red); font-style: italic; }
.pp-head a { font-weight: 700; font-size: 15px; color: var(--pp-red); text-decoration: none; }
.pp-shelf { padding-top: 60px; }
.pp-top5 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
.pp-top-card { display: block; text-decoration: none; color: var(--pp-ink); }
.pp-top-poster {
    position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden;
    border: 2px solid var(--pp-ink); box-shadow: 4px 4px 0 var(--pp-ink); background: var(--pp-line);
    transition: transform 220ms var(--pp-ease), box-shadow 220ms var(--pp-ease);
}
.pp-top-poster img { height: 100%; }
.pp-top-rank {
    position: absolute; left: 8px; top: 8px; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    background: var(--pp-gold); color: var(--pp-ink); border: 2px solid var(--pp-ink);
    font: 900 17px/1 var(--pp-display);
}
.pp-top5 li:first-child .pp-top-rank { background: var(--pp-red); color: #fff; }
@media (hover: hover) and (pointer: fine) {
    a.pp-top-card:hover .pp-top-poster { transform: translate(-2px, -4px); box-shadow: 6px 8px 0 var(--pp-red); }
}
.pp-top-title { display: block; font-weight: 800; font-size: 17px; line-height: 1.2; margin-top: 14px; }
.pp-top-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font: 400 14px/1.3 var(--pp-mono); color: var(--pp-mute); }

/* =========================== BODY =========================== */
.pp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 40px; align-items: start; padding-top: 52px; padding-bottom: 120px; }
.pp-main { min-width: 0; }

.pp-tabs {
    position: sticky; top: var(--mn-offset, 0px); z-index: 20; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
    margin-bottom: 24px; background: rgba(245, 245, 249, .92);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--pp-line);
}
body:has(#lh-adminbar) .pp-tabs { top: 32px; }
.pp-tabs::-webkit-scrollbar { display: none; }
.pp-tab {
    flex: none; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px;
    font: 700 16px/1 'Urbanist', sans-serif; color: var(--pp-mute); text-decoration: none; white-space: nowrap;
    border-bottom: 3px solid transparent; transition: color 160ms ease, border-color 200ms var(--pp-ease);
}
.pp-tab small { font: 400 13px/1 var(--pp-mono); color: var(--pp-mute); }
.pp-tab:hover { color: var(--pp-red); }
.pp-tab[aria-selected="true"] { color: var(--pp-ink); border-bottom-color: var(--pp-red); }
.pp-panel { animation: pp-fade 220ms var(--pp-ease); }
@keyframes pp-fade { from { opacity: 0; transform: translateY(6px); } }

/* empty state */
.pp-empty { background: #fff; border: 1.5px dashed #c9ccd6; border-radius: 16px; padding: 32px 24px; text-align: center; color: var(--pp-mute); }
.pp-empty p { margin: 0 auto 16px; max-width: 46ch; font-size: 16px; line-height: 1.5; }
.pp-empty p:last-child { margin-bottom: 0; }
.pp-empty-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; flex-wrap: wrap; }
.pp-empty-row p { margin: 0; }

/* activity feed */
.pp-feed { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--pp-line); border-radius: 16px; overflow: hidden; }
.pp-act { display: flex; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--pp-soft); animation: pp-fade 360ms var(--pp-ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.pp-act:last-child { border-bottom: 0; }
.pp-act-ic { flex: none; width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--t-bg); color: var(--t-fg); }
.pp-act-body { flex: 1; min-width: 0; }
.pp-act-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; }
.pp-act-kicker span { font: 700 13px/1 var(--pp-label); letter-spacing: .14em; color: var(--t-fg); }
.pp-act-kicker time { font: 400 13px/1 var(--pp-mono); color: var(--pp-mute); }
.pp-act-line { font-size: 16px; line-height: 1.5; margin: 0 0 8px; }
.pp-act-target { font-weight: 800; color: var(--pp-ink); text-decoration: none; }
a.pp-act-target:hover { color: var(--pp-red); }
.pp-stars { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.pp-stars span { font-size: 18px; letter-spacing: 2px; color: var(--pp-gold); -webkit-text-stroke: .6px #c99a1a; }
.pp-stars b { font: 500 14px/1 var(--pp-mono); color: var(--pp-ink); }
.pp-act-meta { display: flex; gap: 22px; margin: 0; font: 400 14px/1 var(--pp-mono); color: var(--pp-mute); }
.pp-act-meta span { display: inline-flex; align-items: center; gap: 7px; }
.pp-feed-end { text-align: center; color: var(--pp-mute); font-weight: 600; margin: 20px 0 0; }

.pp-quote { position: relative; background: var(--pp-paper); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; overflow: hidden; }
.pp-quote p { margin: 0; font-size: 16px; line-height: 1.55; text-wrap: pretty; transition: filter 260ms var(--pp-ease); }
.pp-quote-plain { background: none; padding: 0; overflow: visible; }
.pp-quote.is-spoiler p { filter: blur(7px); user-select: none; }
.pp-quote-plain.is-spoiler { padding: 12px 0; }
.pp-spoiler-btn {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; border: 0; cursor: pointer; background: rgba(245, 245, 249, .3);
    font: 700 14px/1 var(--pp-label); letter-spacing: .14em; text-transform: uppercase; color: #fff;
}
.pp-spoiler-btn::before { content: ""; position: absolute; width: 230px; height: 32px; border-radius: 999px; background: var(--pp-red); z-index: -1; }
.pp-spoiler-btn { isolation: isolate; }
.pp-spoiler-btn:active { transform: scale(.98); }
.pp-quote.is-revealed p { filter: none; user-select: auto; }
.pp-quote.is-revealed .pp-spoiler-btn { display: none; }

.pp-obj { display: flex; align-items: center; gap: 14px; padding: 10px; margin-bottom: 4px; border: 1px solid var(--pp-line); border-radius: 14px; text-decoration: none; color: var(--pp-ink); transition: background-color 160ms ease; }
a.pp-obj:hover { background: var(--pp-paper); }
.pp-obj-art { flex: none; width: 56px; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--pp-line); }
.pp-obj b { display: block; font-size: 16px; line-height: 1.25; }
.pp-obj small { display: block; font: 400 13px/1.3 var(--pp-mono); color: var(--pp-mute); margin-top: 3px; }
.pp-prog { display: block; height: 4px; border-radius: 999px; background: var(--pp-soft); overflow: hidden; }
.pp-act .pp-prog { max-width: 320px; margin-top: 4px; }

/* reviews */
.pp-reviews { display: flex; flex-direction: column; gap: 18px; }
.pp-review { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; background: #fff; border: 1px solid var(--pp-line); border-radius: 16px; padding: 20px; transition: transform 220ms var(--pp-ease), border-color 220ms ease; }
@media (hover: hover) and (pointer: fine) { .pp-review:hover { transform: translateY(-2px); border-color: #c9ccd6; } }
.pp-review-poster { display: block; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--pp-line); align-self: start; }
.pp-review-meta { font: 600 13px/1.3 var(--pp-label); letter-spacing: .14em; color: var(--pp-mute); margin: 0 0 4px; }
.pp-review h3 { font: 800 24px/1.15 var(--pp-display); letter-spacing: -.01em; color: var(--pp-ink); margin: 0 0 8px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pp-review h3 a { text-decoration: none; }
.pp-review h3 a:hover { color: var(--pp-red); }
.pp-review-text { font-size: 16px; line-height: 1.55; margin: 0 0 10px; }
.pp-more { font-weight: 700; font-size: 14px; color: var(--pp-red); }
.pp-critic-score { font: 500 15px/1 var(--pp-mono); padding: 6px 10px; border-radius: 8px; color: #fff; }
.pp-critic-score.is-hi { background: var(--pp-green); } .pp-critic-score.is-mid { background: var(--pp-gold-dk); } .pp-critic-score.is-lo { background: var(--pp-red); }

/* lists */
.pp-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.pp-listcard { display: block; background: #fff; border: 1px solid var(--pp-line); border-radius: 16px; padding: 16px; text-decoration: none; color: var(--pp-ink); transition: transform 220ms var(--pp-ease), border-color 220ms ease; }
@media (hover: hover) and (pointer: fine) { .pp-listcard:hover { transform: translateY(-3px); border-color: var(--pp-ink); } }
.pp-listcard-art { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--pp-ink); margin-bottom: 14px; }
.pp-listcard-art > span { aspect-ratio: 2 / 3; border-radius: 7px; overflow: hidden; background: #2a2d35; }
.pp-listcard-art em { position: absolute; right: 10px; bottom: 10px; padding: 3px 10px; border-radius: 999px; background: var(--pp-gold); color: var(--pp-ink); border: 1.5px solid var(--pp-ink); font: normal 13px/1.2 var(--pp-mono); }
.pp-listcard b { display: block; font-weight: 800; font-size: 18px; line-height: 1.25; margin-bottom: 6px; }
.pp-listcard small { font: 400 13px/1.3 var(--pp-mono); color: var(--pp-mute); }

/* characters */
.pp-chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.pp-char { display: block; text-decoration: none; color: var(--pp-ink); }
.pp-char-art { display: block; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--pp-line); transition: transform 220ms var(--pp-ease); }
@media (hover: hover) and (pointer: fine) { a.pp-char:hover .pp-char-art { transform: translateY(-3px); } }
.pp-char b { display: block; font-weight: 800; font-size: 16px; margin-top: 10px; }
.pp-char small { display: block; font-size: 14px; color: var(--pp-mute); }

/* library */
.pp-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.pp-filter {
    min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--pp-line); background: #fff; cursor: pointer;
    font: 700 14px/1 'Urbanist', sans-serif; color: var(--pp-ink); transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--pp-ease);
}
.pp-filter small { font: 400 12px/1 var(--pp-mono); color: var(--pp-mute); margin-left: 4px; }
.pp-filter:hover { border-color: var(--pp-ink); }
.pp-filter:active { transform: scale(.97); }
.pp-filter[aria-pressed="true"] { background: var(--pp-ink); border-color: var(--pp-ink); color: #fff; }
.pp-filter[aria-pressed="true"] small { color: rgba(255, 255, 255, .7); }
.pp-lib { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 18px 14px; }
.pp-lib li[hidden] { display: none; }
.pp-lib-card { display: block; text-decoration: none; color: var(--pp-ink); }
.pp-lib-poster { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--pp-line); transition: transform 220ms var(--pp-ease); }
@media (hover: hover) and (pointer: fine) { a.pp-lib-card:hover .pp-lib-poster { transform: translateY(-3px); } }
.pp-lib-poster em { position: absolute; right: 6px; top: 6px; padding: 3px 7px; border-radius: 999px; background: rgba(21, 23, 28, .82); color: var(--pp-gold); font: normal 12px/1.2 var(--pp-mono); }
.pp-lib-card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; font-size: 14px; line-height: 1.3; margin-top: 8px; }
.pp-lib-card small { font: 400 12px/1.3 var(--pp-mono); color: var(--pp-mute); }
.pp-lib-none { margin-top: 12px; }

/* =========================== RAIL =========================== */
.pp-rail { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.pp-rail-k { font: 600 14px/1 var(--pp-label); letter-spacing: .14em; text-transform: uppercase; color: var(--pp-mute); margin: 0 0 14px; }
.pp-box { background: #fff; border: 1px solid var(--pp-line); border-radius: 16px; padding: 20px; }

.pp-taste {
    position: relative; overflow: hidden; background: var(--pp-ink); color: #fff;
    border: 2px solid var(--pp-ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--pp-red); padding: 22px;
}
.pp-taste::before { content: ""; position: absolute; top: -80px; right: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(253, 201, 73, .28), transparent 70%); pointer-events: none; }
.pp-taste > * { position: relative; }
.pp-taste .pp-rail-k { color: var(--pp-gold); }
.pp-taste p { font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .82); margin: 0 0 16px; }
.pp-taste-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.pp-taste-row em { font: italic 600 20px/1 var(--pp-display); }
.pp-taste-num { font: 900 60px/1 var(--pp-display); letter-spacing: -.03em; color: var(--pp-gold); font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.pp-taste-row .pp-taste-num { margin-bottom: 0; }
.pp-taste-num.is-locked { color: #fff; filter: blur(9px); user-select: none; }
.pp-taste-sub { margin-bottom: 10px !important; }
.pp-pills { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.pp-pills li { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 14px; font-weight: 600; }

.pp-watching { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.pp-watch { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--pp-ink); }
.pp-watch-poster { flex: none; width: 64px; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--pp-line); }
.pp-watch-body { flex: 1; min-width: 0; }
.pp-watch-body b { display: block; font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.pp-watch-body small { display: block; font: 400 13px/1.3 var(--pp-mono); color: var(--pp-mute); margin-bottom: 7px; }
a.pp-watch:hover b { color: var(--pp-red); }

.pp-dna-title { font: 800 22px/1.2 var(--pp-display); color: var(--pp-ink); margin: -6px 0 16px; }
.pp-dna-title em { color: var(--pp-red); }
.pp-dna-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.pp-dna-bar i { display: block; width: var(--w); background: var(--t-fg); }
.pp .pp-dna-bar .tone-gold, .pp .pp-dna-legend .tone-gold { --t-fg: var(--pp-gold); }
.pp .pp-dna-bar .tone-mute, .pp .pp-dna-legend .tone-mute { --t-fg: #c9ccd6; }
.pp-dna-legend small { margin-left: auto; font: 400 12px/1 var(--pp-mono); color: var(--pp-mute); }
.pp-dna-bar i { transform-origin: left; animation: pp-grow 900ms var(--pp-ease) 200ms both; }
.pp-dna-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pp-dna-legend li { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; min-width: 0; }
.pp-dna-legend span { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--t-fg); }
.pp-dna-legend a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-dna-legend a:hover { color: var(--pp-red); }

/* =========================== PRIVATE GATE =========================== */
.pp-gate { padding-top: 56px; padding-bottom: 120px; }
.pp-gate-card { max-width: 520px; margin: 0 auto; text-align: center; background: #fff; border: 2px solid var(--pp-ink); border-radius: 16px; box-shadow: 5px 5px 0 var(--pp-gold); padding: 36px 28px; color: var(--pp-ink); }
.pp-gate-card h2 { font: 900 30px/1.1 var(--pp-display); margin: 12px 0 8px; }
.pp-gate-card p { color: var(--pp-mute); line-height: 1.5; margin: 0 0 18px; }

/* =========================== DIALOGS =========================== */
.pp-dialog {
    width: min(720px, calc(100% - 32px)); max-height: min(86vh, 860px); padding: 0; border: 2px solid var(--pp-ink);
    border-radius: 16px; box-shadow: 6px 6px 0 var(--pp-gold); background: #fff; color: var(--pp-text);
    opacity: 1; transform: none;
    transition: opacity 200ms var(--pp-ease), transform 260ms var(--pp-ease), overlay 260ms allow-discrete, display 260ms allow-discrete;
}
.pp-dialog-sm { width: min(440px, calc(100% - 32px)); }
@starting-style { .pp-dialog[open] { opacity: 0; transform: translateY(12px) scale(.97); } }
.pp-dialog::backdrop { background: rgba(21, 23, 28, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.pp-dialog-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; background: #fff; border-bottom: 1px solid var(--pp-soft); }
.pp-dialog h2 { font-size: 30px; }
.pp-dialog-head p { margin: 6px 0 0; font: 400 14px/1 var(--pp-mono); color: var(--pp-mute); }
.pp-dialog-x { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--pp-soft); color: var(--pp-ink); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 160ms var(--pp-ease); }
.pp-dialog-x:active { transform: scale(.94); }
.pp-badgegrid { list-style: none; margin: 0; padding: 20px 24px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pp-bcard { display: flex; gap: 14px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--pp-line); outline: none; transition: border-color 300ms ease, box-shadow 300ms ease; }
.pp-bcard.is-earned { border-color: var(--pp-ink); }
.pp-bcard:not(.is-earned) .pp-badge { filter: grayscale(1); opacity: .5; box-shadow: none; }
.pp-bcard.is-flash { box-shadow: 0 0 0 3px var(--pp-gold); }
.pp-bcard .pp-badge { cursor: default; }
.pp-bcard div { min-width: 0; flex: 1; }
.pp-bcard b { display: block; font-weight: 800; font-size: 16px; color: var(--pp-ink); }
.pp-bcard p { margin: 2px 0 8px; font-size: 14px; line-height: 1.4; color: var(--pp-mute); }
.pp-bcard small { font: 400 12px/1.3 var(--pp-mono); color: var(--pp-mute); }
.pp-bcard .pp-prog { margin-bottom: 6px; }
.pp-xp-list { list-style: none; margin: 0; padding: 12px 24px 4px; }
.pp-xp-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--pp-soft); font-size: 15px; }
.pp-xp-list b { font: 500 14px/1.3 var(--pp-mono); color: var(--pp-red); }
.pp-xp-ranks { margin: 0; padding: 14px 24px 22px; font-size: 14px; line-height: 1.5; color: var(--pp-mute); }

/* =========================== TOAST + JOIN BAR =========================== */
.pp-toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 50; display: flex; align-items: center; gap: 14px;
    padding: 12px 20px 12px 12px; border-radius: 16px; background: var(--pp-ink); color: #fff;
    border: 2px solid var(--pp-ink); box-shadow: 5px 5px 0 var(--pp-gold);
    transform: translateX(-50%); transition: transform 320ms var(--pp-ease), opacity 320ms ease;
}
@starting-style { .pp-toast { transform: translate(-50%, 24px); opacity: 0; } }
.pp-toast.is-leaving { transform: translate(-50%, 24px); opacity: 0; transition-duration: 200ms; }
.pp-toast small { display: block; font: 700 12px/1 var(--pp-label); letter-spacing: .14em; text-transform: uppercase; color: var(--pp-gold); margin-bottom: 4px; }
.pp-toast b { font: 800 18px/1.1 var(--pp-display); }
.pp-toast em { font-style: normal; color: rgba(255, 255, 255, .7); font-size: 14px; }
.pp-toast .pp-badge { box-shadow: none; border-color: var(--pp-gold); }

.pp-joinbar {
    position: fixed; left: 50%; bottom: 20px; z-index: 40; width: min(820px, calc(100% - 32px));
    display: flex; align-items: center; gap: 18px; padding: 12px 12px 12px 22px; border-radius: 16px;
    background: var(--pp-ink); color: #fff; border: 2px solid var(--pp-ink); box-shadow: 6px 6px 0 var(--pp-gold);
    transform: translateX(-50%); transition: transform 360ms var(--pp-ease), opacity 300ms ease;
}
.pp-joinbar[hidden] { display: none; }
@starting-style { .pp-joinbar { transform: translate(-50%, 140%); opacity: 0; } }
.pp-joinbar.is-leaving { transform: translate(-50%, 140%); opacity: 0; transition-duration: 220ms; }
.pp-joinbar div { flex: 1; min-width: 0; }
.pp-joinbar b { display: block; font: 800 19px/1.2 var(--pp-display); }
.pp-joinbar b em { color: var(--pp-gold); }
.pp-joinbar span { font-size: 14px; color: rgba(255, 255, 255, .76); }
.pp-joinbar-x { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 0; background: none; color: rgba(255, 255, 255, .7); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pp-joinbar-x:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* =========================== RESPONSIVE =========================== */
@media (max-width: 1080px) {
    .pp-top5 { grid-template-columns: repeat(5, 168px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin; }
    .pp-top5 li { scroll-snap-align: start; }
}
@media (max-width: 960px) {
    .pp-body { grid-template-columns: minmax(0, 1fr); }
    .pp-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
}
@media (max-width: 720px) {
    .pp-wrap { padding: 0 16px; }
    .pp-banner { height: 240px; }
    .pp-id { flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 110px; padding-bottom: 28px; }
    .pp-banner.is-empty + .pp-id { padding-top: 40px; }
    .pp-level-to { display: none; }
    .pp-avatar-ring { width: 120px; height: 120px; padding: 4px; }
    .pp-avatar-inner { padding: 3px; }
    .pp-avatar-ph { font-size: 44px; }
    .pp-lv { width: 48px; height: 48px; right: -10px; bottom: 2px; }
    .pp-lv small { font-size: 9px; }
    .pp-lv b { font-size: 19px; }
    .pp-bio { font-size: 16px; }
    .pp-handle { font-size: 13px; }
    .pp-actions { width: 100%; }
    .pp-actions .pp-btn:not(.pp-icon-btn), .pp-follow-form { flex: 1; }
    .pp-follow { width: 100%; }
    .pp-statstrip ul { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; }
    .pp-statstrip li { border-bottom: 1px solid rgba(255, 255, 255, .08); }
    .pp-statstrip li:nth-child(3n) { border-right: 0; }
    .pp-statstrip li > a, .pp-statstrip li:not(:has(a)) { padding: 16px 6px; }
    .pp-statstrip b { font-size: 24px; }
    .pp-statstrip span { font-size: 12px; letter-spacing: .1em; }
    .pp-level-in { gap: 10px 14px; }
    .pp-level-bar { order: 3; flex-basis: 100%; }
    .pp-level-xp { order: 4; font-size: 12px; flex: 1; }
    .pp-level-how { order: 5; }
    .pp-shelf { padding-top: 40px; }
    .pp-top5 { grid-template-columns: repeat(5, 138px); gap: 14px; margin-right: -16px; padding-right: 16px; }
    .pp-top-title { font-size: 15px; }
    .pp-body { padding-top: 36px; padding-bottom: 140px; gap: 28px; }
    .pp-tabs { margin: 0 -16px 18px; padding: 0 8px; }
    .pp-tab { padding: 0 12px; font-size: 15px; }
    .pp-act { padding: 16px; gap: 12px; }
    .pp-act-ic { width: 36px; height: 36px; border-radius: 10px; }
    .pp-act-ic svg { width: 18px; height: 18px; }
    .pp-review { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 14px; }
    .pp-review h3 { font-size: 20px; }
    .pp-lists { grid-template-columns: minmax(0, 1fr); }
    .pp-chars { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
    .pp-char b { font-size: 14px; }
    .pp-char small { font-size: 12px; }
    .pp-lib { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
    .pp-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 2px 16px; scrollbar-width: none; }
    .pp-filters::-webkit-scrollbar { display: none; }
    .pp-filter { flex: none; }
    .pp-head h2 { font-size: 30px; }
    /* Dialogs become bottom sheets on phones. */
    .pp-dialog, .pp-dialog-sm { width: 100%; max-width: 100%; margin: auto 0 0; max-height: 88vh; border-radius: 16px 16px 0 0; border-width: 2px 0 0; box-shadow: none; }
    @starting-style { .pp-dialog[open] { transform: translateY(40px); opacity: 0; } }
    .pp-badgegrid { grid-template-columns: minmax(0, 1fr); padding: 16px; }
    .pp-dialog-head { padding: 18px 16px 14px; }
    .pp-joinbar { gap: 12px; padding: 12px 8px 12px 16px; bottom: 12px; }
    .pp-joinbar span { display: none; }
    .pp-joinbar b { font-size: 16px; }
    .pp-joinbar .pp-btn { min-height: 44px; padding: 0 16px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .pp *, .pp *::before, .pp *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}

/* grouped character favourites in the feed — overlapping portrait stack */
.pp-cast { list-style: none; margin: 0 0 8px; padding: 0 0 0 8px; display: flex; flex-wrap: wrap; }
.pp-cast li { margin-left: -8px; }
.pp-cast-face, .pp-cast-more {
    display: block; width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
    border: 3px solid #fff; background: var(--pp-line); box-shadow: 0 0 0 1px var(--pp-line);
    transition: transform 200ms var(--pp-ease);
}
.pp-cast-more { padding: 0; cursor: pointer; font: 500 13px/1 var(--pp-mono); color: var(--pp-ink); background: var(--pp-soft); }
@media (hover: hover) and (pointer: fine) { a.pp-cast-face:hover { transform: translateY(-3px); position: relative; z-index: 1; } }
.pp-cast-names { margin: 0; font-size: 14px; color: var(--pp-mute); }

/* =====================================================================
   QUESTS (owner only) — templates/partials/profile_quests.php
   ===================================================================== */
.pp-quests { display: flex; flex-direction: column; gap: 28px; padding-top: 44px; }
.pp-path-k { font: 700 14px/1 var(--pp-label); letter-spacing: .14em; color: var(--pp-red); margin: 0 0 10px; }
.pp-path-title { font: 900 clamp(28px, 3vw, 38px)/1.05 var(--pp-display); letter-spacing: -.02em; color: var(--pp-ink); margin: 0 0 8px; text-wrap: balance; }
.pp-path-title em { color: var(--pp-red); font-style: italic; }
.pp-path-copy { font-size: 16px; line-height: 1.5; margin: 0 0 18px; max-width: 56ch; text-wrap: pretty; }

/* unlock path */
.pp-path { background: #fff; border: 2px solid var(--pp-ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--pp-ink); overflow: hidden; }
.pp-path-top { display: flex; flex-wrap: wrap; }
.pp-path-main { flex: 2 1 520px; min-width: 0; padding: 28px 30px; }
.pp-segs { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; margin-bottom: 20px; max-width: 560px; }
.pp-segs i { height: 8px; border-radius: 999px; background: var(--pp-soft); transition: background-color 300ms var(--pp-ease); }
.pp-segs i.on { background: var(--pp-red); }
.pp-path-prog { height: 8px; max-width: 560px; margin-bottom: 20px; }

.pp-ptiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pp-ptile { display: flex; gap: 12px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--pp-line); background: #fff; transition: background-color 260ms ease, border-color 260ms ease; }
.pp-ptile.is-done { border-color: var(--pp-green); background: #f3faf6; }
.pp-ptile-art { flex: none; width: 58px; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--pp-line); }
.pp-ptile-body { min-width: 0; flex: 1; }
.pp-ptile-body b { display: block; font-weight: 800; font-size: 15px; line-height: 1.25; color: var(--pp-ink); }
.pp-ptile-body small { display: block; font: 400 13px/1.3 var(--pp-mono); color: var(--pp-mute); margin: 2px 0 4px; }
.pp-ptile-done { margin: 4px 0 0; font: 400 13px/1.3 var(--pp-mono); color: var(--pp-green); }
.pp-ptile-cta { font-weight: 700; font-size: 14px; color: var(--pp-red); text-decoration: none; }
.pp-rate { display: inline-flex; flex-direction: row-reverse; }
.pp-rate button {
    width: 30px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer;
    font-size: 24px; line-height: 1; color: #d5d7df; transition: color 120ms ease, transform 160ms var(--pp-ease);
}
.pp-rate button.on { color: var(--pp-gold); }
@media (hover: hover) and (pointer: fine) {
    .pp-rate:not([aria-disabled="true"]) button:hover,
    .pp-rate:not([aria-disabled="true"]) button:hover ~ button { color: var(--pp-gold); }
    .pp-rate button:hover { transform: scale(1.15); }
}
.pp-rate button:active { transform: scale(.9); }
.pp-rate button:focus-visible { outline: 2px solid var(--pp-ink); outline-offset: 1px; border-radius: 4px; }
.pp-rate[aria-disabled="true"] { pointer-events: none; }

.pp-path-side {
    position: relative; flex: 1 1 300px; min-width: 0; overflow: hidden; isolation: isolate;
    background: var(--pp-ink); color: #fff; padding: 28px; display: flex; flex-direction: column; justify-content: center;
}
.pp-path-side::before { content: ""; position: absolute; top: -90px; right: -90px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(253, 201, 73, .3), transparent 70%); z-index: -1; }
.pp-path-posters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 18px; filter: blur(3px) grayscale(.6); transition: filter 500ms var(--pp-ease); }
.pp-path-posters.is-open { filter: none; }
.pp-path-posters span { aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: #2a2d35; }
.pp-side-k { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 700 14px/1 var(--pp-label); letter-spacing: .14em; color: var(--pp-gold); }
.pp-side-k-ok { color: #7fd3a2; }
.pp-live { width: 8px; height: 8px; border-radius: 50%; background: var(--pp-green); animation: pp-pulse 2.2s infinite; }
@keyframes pp-pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 143, 91, .55); } 70% { box-shadow: 0 0 0 7px rgba(47, 143, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 143, 91, 0); } }
.pp-side-title { font: 800 24px/1.15 var(--pp-display); margin: 0 0 8px; }
.pp-side-title em { color: var(--pp-gold); }
.pp-side-copy { font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .8); margin: 0 0 14px; }
[data-unlock-open]:not([hidden]) { animation: pp-pop 420ms var(--pp-ease) both; }
.pp-badge-xl { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 18px; cursor: default; border-color: var(--pp-gold); box-shadow: 4px 4px 0 var(--pp-red); }

.pp-nodes { list-style: none; margin: 0; padding: 18px 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; border-top: 2px solid var(--pp-ink); background: var(--pp-paper); }
.pp-nodes li { display: flex; align-items: center; gap: 12px; }
.pp-node-n {
    flex: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font: 500 15px/1 var(--pp-mono); background: #fff; color: var(--pp-mute); border: 2px solid #c9ccd6;
    transition: background-color 300ms ease, border-color 300ms ease, color 300ms ease;
}
.pp-nodes .is-done .pp-node-n { background: var(--pp-green); border-color: var(--pp-ink); color: #fff; }
.pp-nodes .is-active .pp-node-n { background: var(--pp-red); border-color: var(--pp-ink); color: #fff; }
.pp-nodes b { display: block; font-weight: 700; font-size: 15px; line-height: 1.2; color: var(--pp-ink); }
.pp-nodes small { font: 400 13px/1.3 var(--pp-mono); color: var(--pp-mute); }
.pp-nodes .is-locked b { color: var(--pp-mute); }

/* crew board */
.pp-crew { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
.pp-crew.is-solo { grid-template-columns: minmax(0, 1fr); }
.pp-crew-main { background: #fff; border: 2px solid var(--pp-ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--pp-gold); padding: 24px 26px; min-width: 0; }
.pp-crew-k { color: var(--pp-mute); }
.pp-crew-sub { font: 400 13px/1.5 var(--pp-mono); color: var(--pp-mute); margin: 0 0 16px; }
.pp-crew-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pp-crew-list li {
    display: grid; grid-template-columns: 34px 40px minmax(0, 150px) minmax(0, 1fr) 76px; align-items: center; gap: 12px;
    padding: 8px 10px; border-radius: 12px; animation: pp-fade 360ms var(--pp-ease) both;
}
.pp-crew-list li:nth-child(2) { animation-delay: 40ms; } .pp-crew-list li:nth-child(3) { animation-delay: 80ms; }
.pp-crew-list li:nth-child(4) { animation-delay: 120ms; } .pp-crew-list li:nth-child(5) { animation-delay: 160ms; }
.pp-crew-list li.is-me { background: #fff4d6; }
.pp-crew-rank { font: 500 15px/1 var(--pp-mono); color: var(--pp-ink); text-align: center; }
.pp-crew-face { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2px solid var(--pp-line); background: var(--pp-soft); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.pp-crew-list .is-podium .pp-crew-face { border-color: var(--pp-gold); }
.pp-crew-face span { font: 800 16px/1 var(--pp-display); color: var(--pp-ink); }
.pp-crew-name { font-size: 15px; font-weight: 600; color: var(--pp-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-crew-list .is-me .pp-crew-name { font-weight: 800; }
a.pp-crew-name:hover { color: var(--pp-red); }
.pp-crew-bar { height: 8px; border-radius: 999px; background: var(--pp-soft); overflow: hidden; }
.pp-crew-bar i { display: block; height: 100%; width: var(--w); border-radius: 999px; background: var(--pp-ink); transform-origin: left; animation: pp-grow 900ms var(--pp-ease) 200ms both; }
.pp-crew-list .is-me .pp-crew-bar i { background: var(--pp-red); }
.pp-crew-xp { font: 500 14px/1 var(--pp-mono); color: var(--pp-ink); text-align: right; font-variant-numeric: tabular-nums; }
.pp-crew-msg { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: #fbeaea; font-weight: 700; font-size: 15px; color: var(--pp-ink); }
.pp-crew-empty { text-align: left; padding: 20px; }
.pp-crew-empty p { margin: 0 0 14px; max-width: none; }
.pp-crew-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; }
.pp-crew-acts > a, .pp-crew-acts > span {
    display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; border-radius: 14px;
    border: 1.5px solid var(--pp-line); background: #fff; text-decoration: none; color: var(--pp-ink);
    transition: transform 160ms var(--pp-ease), border-color 160ms ease;
}
.pp-crew-acts > a:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .pp-crew-acts > a:hover { transform: translateY(-2px); border-color: var(--pp-ink); } }
.pp-crew-acts .is-locked { opacity: .6; cursor: not-allowed; }
.pp-crew-acts span > span:first-child { flex: none; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--t-bg); color: var(--t-fg); }
.pp-crew-acts a > span:first-child { flex: none; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--t-bg); color: var(--t-fg); }
.pp-crew-acts b { display: block; font-weight: 800; font-size: 15px; }
.pp-crew-acts small { font: 400 13px/1.2 var(--pp-mono); color: var(--pp-mute); }
.pp-crew-side { min-width: 0; }

@media (max-width: 960px) {
    .pp-crew { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
    .pp-quests { padding-top: 32px; gap: 22px; }
    .pp-path-main { padding: 22px 18px; }
    .pp-path-side { padding: 22px 18px; }
    .pp-nodes { padding: 16px 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 12px; }
    .pp-node-n { width: 32px; height: 32px; font-size: 14px; }
    .pp-nodes b { font-size: 14px; }
    .pp-ptiles { grid-template-columns: minmax(0, 1fr); }
    .pp-rate button { width: 36px; height: 44px; font-size: 26px; }
    .pp-crew-main { padding: 20px 16px; }
    .pp-crew-list li { grid-template-columns: 30px 36px minmax(0, 1fr) 64px; gap: 10px; padding: 8px 6px; }
    .pp-crew-face { width: 36px; height: 36px; }
    .pp-crew-bar { grid-column: 3 / 5; grid-row: 2; margin-top: -2px; }
    .pp-crew-xp { font-size: 13px; }
}

/* =====================================================================
   HAKI PHASE 2 — fan types (auras), 100-level ladder, arcs, crests
   ===================================================================== */

/* aura tones: tint + ink from one --a colour */
.pp .tone-aura-blaze { --a: #e0482f; } .pp .tone-aura-tide  { --a: #2b7bd6; }
.pp .tone-aura-forge { --a: #b07d10; } .pp .tone-aura-storm { --a: #138a8a; }
.pp .tone-aura-bloom { --a: #2f8f5b; } .pp .tone-aura-spark { --a: #d6336c; }
.pp [class*="tone-aura-"] { --t-bg: color-mix(in srgb, var(--a) 15%, #fff); --t-fg: color-mix(in srgb, var(--a) 85%, #000); }

/* hero: type epithet under the name */
.pp-epithet {
    display: inline-flex; align-items: center; gap: 7px; margin: 0 0 12px; padding: 6px 12px 6px 10px; border-radius: 999px;
    font: 700 14px/1 var(--pp-label); letter-spacing: .12em; text-transform: uppercase; color: #fff;
    background: color-mix(in srgb, var(--a) 30%, transparent); border: 1.5px solid color-mix(in srgb, var(--a) 70%, #fff);
}
.pp-epithet.is-dormant { --a: #8a8f9c; color: rgba(255, 255, 255, .7); border-style: dashed; }
.pp-lv b { font-variant-numeric: tabular-nums; }
.pp-lv.is-max { background: conic-gradient(var(--pp-gold), #fff4d6, var(--pp-gold)); }
.pp-lv.is-max b { font-size: 19px; }

/* hexagon card */
.pp-aura .pp-dna-title { margin-bottom: 4px; }
.pp-hex { display: block; width: 100%; max-width: 280px; margin: 0 auto; overflow: visible; }
.pp-hex-ring { fill: none; stroke: var(--pp-line); stroke-width: 1; }
.pp-hex-ring:first-child { fill: var(--pp-paper); }
.pp-hex-axis { stroke: var(--pp-line); stroke-width: 1; }
.pp-hex-shape {
    fill: color-mix(in srgb, var(--a) 22%, transparent); stroke: var(--a); stroke-width: 2.5; stroke-linejoin: round;
    animation: pp-hex-in 900ms var(--pp-ease) 200ms both;
}
@keyframes pp-hex-in { from { transform: scale(.2); opacity: 0; } }
.pp-hex-dot { stroke: #fff; stroke-width: 2; animation: pp-fade 400ms var(--pp-ease) 700ms both; }
.pp-hex-label { font: 700 11px/1 'Barlow Condensed', sans-serif; letter-spacing: .14em; }
.pp-aura-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pp-aura-list li { display: flex; align-items: center; gap: 10px; }
.pp-aura-list .pp-badge { width: 30px; height: 30px; border-radius: 9px; border-width: 1.5px; box-shadow: none; cursor: default; }
.pp-aura-name { flex: 1; min-width: 0; }
.pp-aura-name b { font-size: 14px; font-weight: 800; color: var(--pp-ink); margin-right: 6px; }
.pp-aura-name small { font: 400 12px/1 var(--pp-mono); color: var(--pp-mute); }
.pp-aura-xp { font: 500 13px/1 var(--pp-mono); color: var(--pp-ink); font-variant-numeric: tabular-nums; }
.pp-aura-how { margin-top: 12px; min-height: 40px; width: 100%; border-radius: 999px; border: 1.5px solid var(--pp-line); background: #fff; cursor: pointer; font: 700 14px/1 'Urbanist', sans-serif; color: var(--pp-ink); transition: border-color 160ms ease, transform 160ms var(--pp-ease); }
.pp-aura-how:hover { border-color: var(--pp-ink); }
.pp-aura-how:active { transform: scale(.98); }

/* seasonal arc card — each season carries its own colour */
.pp-arc { --s: #2b7bd6; background: #fff; border: 2px solid var(--pp-ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--s); padding: 24px 26px; }
.pp-arc.season-winter { --s: #5b8fd6; } .pp-arc.season-spring { --s: #e07aa0; }
.pp-arc.season-summer { --s: #f0a020; } .pp-arc.season-fall   { --s: #c8562a; }
.pp-arc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.pp-arc-k { color: color-mix(in srgb, var(--s) 80%, #000); }
.pp-arc .pp-path-title em { color: var(--s); }
.pp-arc .pp-path-copy { margin-bottom: 14px; }
.pp-arc-ring {
    flex: none; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center;
    background: conic-gradient(var(--s) calc(var(--p) * 1%), var(--pp-soft) 0);
    animation: pp-pop 520ms var(--pp-ease) both;
}
.pp-arc-ring b { width: 68px; height: 68px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 900 22px/1 var(--pp-display); color: var(--pp-ink); }
.pp-arc-quests { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.pp-arc-quests li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; row-gap: 6px; }
.pp-arc-check { grid-row: 1 / 3; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c9ccd6; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; }
.pp-arc-quests .is-done .pp-arc-check { background: var(--pp-green); border-color: var(--pp-green); }
.pp-arc-label { font-weight: 700; font-size: 15px; color: var(--pp-ink); }
.pp-arc-label a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--s) 60%, transparent); text-underline-offset: 3px; }
.pp-arc-label a:hover { color: var(--s); }
.pp-arc-count { font: 500 13px/1 var(--pp-mono); color: var(--pp-mute); }
.pp-arc-quests .pp-prog { grid-column: 2 / 4; }
.pp-arc-quests .pp-prog i { background: var(--s); }
.pp-arc-quests .is-done .pp-prog i { background: var(--pp-green); }
.pp-arc.is-cleared { box-shadow: 4px 4px 0 var(--pp-green); }

/* crew: last week line */
.pp-crew-last { display: flex; align-items: center; gap: 8px; margin: -8px 0 14px; font: 400 13px/1.4 var(--pp-mono); color: var(--pp-mute); }
.pp-crew-last.is-crest { color: var(--pp-gold-dk); font-weight: 500; }

/* badge drawer: groups + arc collection */
.pp-bgroup { display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 18px 24px 0; font: 700 14px/1 var(--pp-label); letter-spacing: .14em; text-transform: uppercase; color: var(--pp-ink); }
.pp-bgroup small { font: 400 12px/1 var(--pp-mono); letter-spacing: 0; color: var(--pp-mute); }
.pp-bgroup + .pp-badgegrid { padding-top: 12px; }
.pp-arcs { padding: 18px 24px 0; }
.pp-arcs h3 { margin: 0 0 10px; font: 700 14px/1 var(--pp-label); letter-spacing: .14em; text-transform: uppercase; color: var(--pp-ink); }
.pp-arcs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.pp-arc-stamp {
    --s: #2b7bd6; padding: 8px 12px; border-radius: 10px; border: 2px dashed var(--s); transform: rotate(-3deg);
    font: 700 13px/1 var(--pp-label); letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, var(--s) 80%, #000);
    background: color-mix(in srgb, var(--s) 10%, #fff);
}
.pp-arc-stamp:nth-child(even) { transform: rotate(2deg); }
.pp-arc-stamp.season-winter { --s: #5b8fd6; } .pp-arc-stamp.season-spring { --s: #e07aa0; }
.pp-arc-stamp.season-summer { --s: #f0a020; } .pp-arc-stamp.season-fall   { --s: #c8562a; }

/* how Haki grows */
.pp-xp-body { padding: 4px 24px 24px; }
.pp-xp-lede { font-size: 15px; line-height: 1.55; color: var(--pp-text); margin: 14px 0 6px; }
.pp-xp-aura h3, .pp-xp-h { display: flex; align-items: center; gap: 10px; margin: 18px 0 2px; font: 800 20px/1.1 var(--pp-display); color: var(--pp-ink); }
.pp-xp-aura h3 em { font: italic 600 15px/1 var(--pp-display); color: var(--a, var(--pp-mute)); }
.pp-xp-aura h3 .pp-badge { width: 30px; height: 30px; border-radius: 9px; border-width: 1.5px; box-shadow: none; cursor: default; }
.pp-xp-body .pp-xp-list { padding: 0; }
.pp-xp-list small { font-weight: 400; color: var(--pp-mute); }
.pp-ladder { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pp-ladder li { padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--pp-line); }
.pp-ladder b { display: block; font-weight: 800; font-size: 15px; color: var(--pp-ink); }
.pp-ladder small { font: 400 12px/1.3 var(--pp-mono); color: var(--pp-mute); }
.pp-ladder .is-done { background: var(--pp-paper); }
.pp-ladder .is-done b { color: var(--pp-mute); }
.pp-ladder .is-here { border-color: var(--pp-ink); background: #fff4d6; box-shadow: 3px 3px 0 var(--pp-red); }
.pp-xp-foot { margin: 18px 0 0; font-size: 14px; line-height: 1.5; color: var(--pp-mute); }

@media (max-width: 720px) {
    .pp-arc { padding: 20px 16px; }
    .pp-arc-ring { width: 68px; height: 68px; }
    .pp-arc-ring b { width: 52px; height: 52px; font-size: 18px; }
    .pp-arc-quests { grid-template-columns: minmax(0, 1fr); }
    .pp-bgroup, .pp-arcs { padding-left: 16px; padding-right: 16px; }
    .pp-xp-body { padding: 4px 16px 20px; }
    .pp-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
