/* ═══════════════════════════════════════════════════════════════════════════
   PROFILE THEMES
   ---------------------------------------------------------------------------
   Ready-made looks for a user's public pages. The palette itself arrives as CSS
   variables from ProfileThemeResolver, so nothing here hardcodes a colour that
   the user could have overridden — every theme paints with var(--pt-accent) and
   friends, which is what lets one theme be re-coloured without new CSS.

   Scoping rules, all of them load-bearing:
     html.pt-active   a theme (or a custom colour) is in effect
     html.pt-tinted   colour-only mode — accent on borders/buttons only; no
                      backdrop, no page/card surface wash, so profiles that
                      predate themes look the same aside from chrome accents
     html.pt-<key>    a specific ready-made theme
     html.pt-dark     that theme uses dark surfaces
   ═══════════════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────
   1. Page canvas
   ─────────────────────────────────────────────── */
html.pt-active:not(.pt-tinted) {
    background: var(--pt-bg);
}

html.pt-active:not(.pt-tinted) body {
    background: transparent !important;
    color: var(--pt-text);
    font-family: var(--pt-font);
}

html.pt-dark {
    color-scheme: dark;
}

/* Colour-only mode is an accent swap: borders + buttons, nothing else. */
html.pt-tinted .pt-backdrop {
    display: none;
}

html.pt-tinted .btn-donate,
html.pt-tinted .wlp-submit,
html.pt-tinted .wld-submit,
html.pt-tinted .cc-pay-btn,
html.pt-tinted .wlp-donate,
html.pt-tinted #btnDonatePrimary,
html.pt-tinted .pp-follow-btn:not(.is-ghost),
html.pt-tinted .pp-btn-primary,
html.pt-tinted .pp-maction-primary {
    background: var(--pt-accent) !important;
    border-color: var(--pt-accent) !important;
    color: var(--pt-on-accent, #fff) !important;
}

html.pt-tinted .pp-follow-btn.is-ghost,
html.pt-tinted .pp-maction-ghost,
html.pt-tinted .social-link {
    color: var(--pt-accent) !important;
    border-color: var(--pt-accent-border, var(--pt-border)) !important;
}

html.pt-tinted .pp-tab.active,
html.pt-tinted .pp-tab:hover {
    color: var(--pt-accent);
    border-bottom-color: var(--pt-accent);
}

html.pt-tinted .pcard,
html.pt-tinted .art-card,
html.pt-tinted .pp-donate-card,
html.pt-tinted .donate-card,
html.pt-tinted .dcard,
html.pt-tinted .mini-don,
html.pt-tinted .mini-art,
html.pt-tinted .pp-hero,
html.pt-tinted .pp-wl-card,
html.pt-tinted .wlp-card,
html.pt-tinted .wld-card,
html.pt-tinted .wld-panel,
html.pt-tinted .cc-card,
html.pt-tinted .ccc-card,
html.pt-tinted .pp-btn-intro-video {
    border-color: var(--pt-border);
    box-shadow: var(--pt-shadow, var(--s-card));
}

html.pt-tinted .btn-donate:hover,
html.pt-tinted #btnDonatePrimary:hover,
html.pt-tinted .pp-btn-intro-video:hover {
    box-shadow: 0 10px 24px rgba(var(--pt-accent-rgb), .36) !important;
}

html.pt-tinted .pp-avatar {
    box-shadow: 0 0 0 3px var(--pt-accent), 0 0 0 6px #fff, 0 8px 22px rgba(var(--pt-accent-rgb), .28);
}

/* ───────────────────────────────────────────────
   2. Backdrop scaffolding
   A fixed, non-interactive layer at z-index -1: above the page canvas, below
   every bit of content, so no theme decoration can ever swallow a click.
   ─────────────────────────────────────────────── */
.pt-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}

.pt-backdrop > * {
    position: absolute;
}

.pt-bd-base,
.pt-bd-pattern,
.pt-bd-canvas {
    inset: 0;
    width: 100%;
    height: 100%;
}

.pt-bd-base {
    background:
        radial-gradient(900px 520px at 88% -10%, rgba(var(--pt-accent-rgb), .20), transparent 60%),
        radial-gradient(700px 460px at -8% 22%, rgba(var(--pt-accent-2-rgb), .16), transparent 55%);
}

.pt-bd-glow {
    width: 42vmax;
    height: 42vmax;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .28;
}

.pt-bd-glow-1 {
    top: -14vmax;
    inset-inline-end: -10vmax;
    background: var(--pt-accent);
    animation: ptGlowDrift 26s ease-in-out infinite;
}

.pt-bd-glow-2 {
    bottom: -18vmax;
    inset-inline-start: -12vmax;
    background: var(--pt-accent-2);
    animation: ptGlowDrift 34s ease-in-out infinite reverse;
}

@keyframes ptGlowDrift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(4vmax, 5vmax, 0) scale(1.16); }
}

.pt-bd-glyphs {
    inset: 0;
    width: 100%;
    height: 100%;
}

.pt-glyph {
    position: absolute;
    font-size: clamp(1.1rem, 2.4vw, 2.1rem);
    font-weight: 700;
    color: var(--pt-accent);
    opacity: .14;
    user-select: none;
    animation: ptGlyphFloat 18s ease-in-out infinite;
}

.pt-glyph-1 { top: 12%;  inset-inline-start: 7%;  animation-delay: -1s; }
.pt-glyph-2 { top: 26%;  inset-inline-end: 11%;   animation-delay: -4s; }
.pt-glyph-3 { top: 54%;  inset-inline-start: 4%;  animation-delay: -7s; }
.pt-glyph-4 { top: 70%;  inset-inline-end: 8%;    animation-delay: -10s; }
.pt-glyph-5 { top: 38%;  inset-inline-start: 46%; animation-delay: -13s; }
.pt-glyph-6 { top: 86%;  inset-inline-start: 28%; animation-delay: -16s; }

@keyframes ptGlyphFloat {
    0%, 100% { transform: translateY(0) rotate(0deg);     opacity: .10; }
    50%      { transform: translateY(-26px) rotate(6deg); opacity: .20; }
}

.pt-chrome {
    pointer-events: none;
}

/* ───────────────────────────────────────────────
   3. Shared surface treatment
   Retunes the card chrome each page already ships so a theme reads as a whole
   design rather than a recoloured default.
   ─────────────────────────────────────────────── */
html.pt-active:not(.pt-tinted) .pcard,
html.pt-active:not(.pt-tinted) .art-card,
html.pt-active:not(.pt-tinted) .pp-donate-card,
html.pt-active:not(.pt-tinted) .donate-card,
html.pt-active:not(.pt-tinted) .dcard,
html.pt-active:not(.pt-tinted) .mini-don,
html.pt-active:not(.pt-tinted) .mini-art,
html.pt-active:not(.pt-tinted) .pp-hero,
html.pt-active:not(.pt-tinted) .pp-wl-card,
html.pt-active:not(.pt-tinted) .wlp-card,
html.pt-active:not(.pt-tinted) .wld-card,
html.pt-active:not(.pt-tinted) .wld-panel,
html.pt-active:not(.pt-tinted) .wld-item,
html.pt-active:not(.pt-tinted) .ccc-card,
html.pt-active:not(.pt-tinted) .cc-card,
html.pt-active:not(.pt-tinted) .cc-owner-card,
html.pt-active:not(.pt-tinted) .cc-contrib-card,
html.pt-active:not(.pt-tinted) .cc-stat-tile {
    background: var(--pt-card);
    border-color: var(--pt-border);
    color: var(--pt-text);
    border-radius: var(--pt-radius);
    box-shadow: var(--pt-shadow);
}

html.pt-active:not(.pt-tinted) .pcard-hd,
html.pt-active:not(.pt-tinted) .cc-card-hd {
    background: linear-gradient(180deg, var(--pt-card-2), var(--pt-card));
    border-bottom-color: var(--pt-border);
    color: var(--pt-text);
}

html.pt-active:not(.pt-tinted) .pp-tab {
    color: var(--pt-muted);
}

html.pt-active:not(.pt-tinted) .pp-tab.active,
html.pt-active:not(.pt-tinted) .pp-tab:hover {
    color: var(--pt-accent);
}

/* ───────────────────────────────────────────────
   4. Dark-surface repairs
   The public pages were written light-first, with a fair amount of literal
   white and slate. These rules re-point the ones that would otherwise punch a
   bright hole through a dark theme.
   ─────────────────────────────────────────────── */
html.pt-dark .wlp,
html.pt-dark .wld,
html.pt-dark .dw,
html.pt-dark .dw-stage,
html.pt-dark .cc-wrap,
html.pt-dark .pp-page-container {
    background: transparent;
    color: var(--pt-text);
}

html.pt-dark .wlp-hero,
html.pt-dark .wld-visual,
html.pt-dark .dw-hero,
html.pt-dark .cc-hero,
html.pt-dark .pp-donate-hero {
    background: linear-gradient(150deg, var(--pt-card-2), var(--pt-card) 62%);
    border-color: var(--pt-border);
    color: var(--pt-text);
}

html.pt-dark h1, html.pt-dark h2, html.pt-dark h3,
html.pt-dark h4, html.pt-dark h5, html.pt-dark h6,
html.pt-dark .pp-name,
html.pt-dark .wlp-title,
html.pt-dark .wld-title,
html.pt-dark .dw-title,
html.pt-dark .cc-title,
html.pt-dark .ccc-title,
html.pt-dark .art-title,
html.pt-dark .dcard-name,
html.pt-dark .mini-don-name {
    color: var(--pt-text);
}

html.pt-dark .pp-username,
html.pt-dark .pp-info-row,
html.pt-dark .bio-text,
html.pt-dark .art-excerpt,
html.pt-dark .art-meta,
html.pt-dark .dcard-date,
html.pt-dark .dcard-msg,
html.pt-dark .wlp-card-desc,
html.pt-dark .wld-desc,
html.pt-dark .dw-sub,
html.pt-dark .dw-time,
html.pt-dark .cc-desc,
html.pt-dark .mini-don-msg {
    color: var(--pt-muted);
}

html.pt-dark .pp-stat-chip,
html.pt-dark .pp-mini-stat,
html.pt-dark .pp-badge,
html.pt-dark .tag-pill,
html.pt-dark .ccc-tag,
html.pt-dark .wld-chip,
html.pt-dark .wlp-preset,
html.pt-dark .wld-preset {
    background: var(--pt-card-2);
    border-color: var(--pt-border);
    color: var(--pt-text);
}

/* The donate amount tiles: only the unselected ones take the theme surface —
   the selected one keeps its accent fill, which is how the choice reads. */
html.pt-dark .coffee-card:not(.sel),
html.pt-dark .coffee-step-btn,
html.pt-dark .coffee-num {
    background: var(--pt-card-2);
    border-color: var(--pt-border);
    color: var(--pt-text);
}

html.pt-dark .coffee-card:not(.sel) .coffee-card-count {
    color: var(--pt-text);
}

/* Half of the donate header's gradient is literal white, which reads as a bright
   band cutting across a dark theme. */
html.pt-dark .donate-header {
    background: linear-gradient(135deg, rgba(var(--pt-accent-rgb), .22), rgba(var(--pt-card-rgb), .94));
}

html.pt-dark .donate-header-text .title {
    color: var(--pt-text);
}

html.pt-dark .donate-header-text .sub {
    color: var(--pt-muted);
}

html.pt-dark .pp-more-menu,
html.pt-dark .sp-modal,
html.pt-dark .ddtl-card,
html.pt-dark .story-tpl,
html.pt-dark .fl-row {
    background: var(--pt-card);
    border-color: var(--pt-border);
    color: var(--pt-text);
}

html.pt-dark input[type="text"],
html.pt-dark input[type="number"],
html.pt-dark input[type="email"],
html.pt-dark textarea,
html.pt-dark select,
html.pt-dark .wlp-inp,
html.pt-dark .wld-inp,
html.pt-dark .dfield input,
html.pt-dark .dfield textarea {
    background: var(--pt-card-2);
    border-color: var(--pt-border);
    color: var(--pt-text);
}

html.pt-dark input::placeholder,
html.pt-dark textarea::placeholder {
    color: var(--pt-subtle);
}

html.pt-dark .sec-div,
html.pt-dark .pt-hr,
html.pt-dark hr {
    border-color: var(--pt-border);
    background: var(--pt-border);
}

/* The donate wall is a corkboard: the notes pinned to it are deliberately
   colourful and stay that way, but the board itself is a large slab of light
   paper that would otherwise punch a hole through a dark theme. */
html.pt-dark .dw-wall {
    background: var(--pt-card);
    border-color: var(--pt-border);
}

html.pt-dark .dw-hero {
    background: linear-gradient(160deg, var(--pt-card-2), rgba(var(--pt-accent-rgb), .35) 55%, var(--pt-card));
}

html.pt-dark .dw-empty {
    background: var(--pt-card-2);
    color: var(--pt-text);
}

html.pt-dark .dw-note {
    box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
}

html.pt-dark .dw-note,
html.pt-dark .dw-note .dw-msg,
html.pt-dark .dw-note .dw-name {
    color: #1c1917;
}

/* ───────────────────────────────────────────────
   5. Buttons and accents, all themes
   ─────────────────────────────────────────────── */
html.pt-active:not(.pt-tinted) .btn-donate,
html.pt-active:not(.pt-tinted) .wlp-submit,
html.pt-active:not(.pt-tinted) .wld-submit,
html.pt-active:not(.pt-tinted) .cc-pay-btn,
html.pt-active:not(.pt-tinted) .wlp-donate,
html.pt-active:not(.pt-tinted) #btnDonatePrimary {
    background: linear-gradient(135deg, var(--pt-accent), var(--pt-accent-2));
    color: var(--pt-on-accent);
    border: none;
    border-radius: var(--pt-radius-sm);
    box-shadow: 0 8px 22px rgba(var(--pt-accent-rgb), .34);
}

html.pt-active:not(.pt-tinted) .btn-donate:hover,
html.pt-active:not(.pt-tinted) #btnDonatePrimary:hover {
    box-shadow: 0 12px 30px rgba(var(--pt-accent-rgb), .48);
}

html.pt-active:not(.pt-tinted) .pp-avatar {
    box-shadow: 0 0 0 3px var(--pt-accent), 0 0 0 6px var(--pt-card), 0 8px 24px rgba(var(--pt-accent-rgb), .32);
}

html.pt-active:not(.pt-tinted) ::selection {
    background: rgba(var(--pt-accent-rgb), .32);
    color: var(--pt-text);
}

html.pt-active:not(.pt-tinted) ::-webkit-scrollbar-thumb {
    background: rgba(var(--pt-accent-rgb), .55);
}

/* ═══════════════════════════════════════════════════════════════════════════
   6. THEME PERSONALITIES
   Each block is one theme's backdrop, chrome and card character.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 👨‍💻 Developer — terminal grid, code chrome, live typing ── */
.pt-bd-terminal .pt-bd-pattern {
    background-image:
        linear-gradient(rgba(var(--pt-accent-rgb), .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--pt-accent-rgb), .08) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
}

.pt-chrome-term {
    top: 0;
    inset-inline-start: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 16px;
    background: rgba(var(--pt-card-rgb), .92);
    border-bottom: 1px solid rgba(var(--pt-accent-rgb), .3);
}

.pt-term-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(var(--pt-accent-rgb), .5);
}

.pt-term-dot:nth-child(2) { background: rgba(var(--pt-accent-2-rgb), .5); }
.pt-term-dot:nth-child(3) { background: rgba(var(--pt-accent-rgb), .28); }

.pt-term-path {
    margin-inline-start: 10px;
    font-size: .72rem;
    letter-spacing: .04em;
    color: var(--pt-muted);
    direction: ltr;
}

.pt-typing {
    bottom: 26px;
    inset-inline-start: 26px;
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: min(70vw, 620px);
    font-size: .82rem;
    color: var(--pt-accent);
    opacity: .55;
    direction: ltr;
    white-space: nowrap;
    overflow: hidden;
}

.pt-caret {
    display: inline-block;
    width: 8px;
    height: 1.05em;
    background: var(--pt-accent);
    animation: ptCaret 1.05s steps(1) infinite;
}

@keyframes ptCaret {
    0%, 49%   { opacity: 1; }
    50%, 100% { opacity: 0; }
}

html.pt-developer .pcard,
html.pt-developer .art-card,
html.pt-developer .wlp-card,
html.pt-developer .ccc-card,
html.pt-developer .dcard {
    position: relative;
    border: 1px solid rgba(var(--pt-accent-rgb), .26);
    overflow: hidden;
}

html.pt-developer .pcard::before,
html.pt-developer .art-card::before,
html.pt-developer .wlp-card::before,
html.pt-developer .ccc-card::before,
html.pt-developer .dcard::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--pt-accent), var(--pt-accent-2), transparent);
}

html.pt-developer .pcard-hd,
html.pt-developer .pp-tab,
html.pt-developer .pp-username {
    font-family: var(--pt-font);
    letter-spacing: .02em;
}

/* ── 🎵 Musician — stage lighting and a live equalizer ── */
.pt-bd-stage .pt-bd-pattern {
    background-image: repeating-linear-gradient(
        115deg,
        rgba(var(--pt-accent-rgb), .07) 0 2px,
        transparent 2px 90px);
}

.pt-eq {
    bottom: 0;
    inset-inline: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    height: 26vh;
    padding-inline: 4vw;
    opacity: .3;
}

.pt-eq i {
    flex: 1;
    max-width: 46px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, var(--pt-accent), var(--pt-accent-2));
    transform-origin: bottom;
    animation: ptEq 1.6s ease-in-out infinite;
    animation-delay: calc(var(--pt-i) * -.13s);
}

@keyframes ptEq {
    0%, 100% { height: 12%; }
    50%      { height: 88%; }
}

html.pt-musician .pcard,
html.pt-musician .wlp-card,
html.pt-musician .ccc-card,
html.pt-musician .dcard {
    border: 1px solid transparent;
    background:
        linear-gradient(var(--pt-card), var(--pt-card)) padding-box,
        linear-gradient(135deg, rgba(var(--pt-accent-rgb), .55), rgba(var(--pt-accent-2-rgb), .35)) border-box;
}

html.pt-musician .pp-hero {
    box-shadow: var(--pt-shadow), 0 0 60px rgba(var(--pt-accent-rgb), .18);
}

/* ── 🎙️ Podcaster — a soundwave running along the floor ── */
.pt-bd-waveform .pt-bd-pattern {
    background-image: radial-gradient(rgba(var(--pt-accent-rgb), .10) 1px, transparent 1px);
    background-size: 26px 26px;
}

.pt-wavebar {
    bottom: 0;
    inset-inline: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    height: 16vh;
    padding-inline: 3vw;
    opacity: .34;
}

.pt-wavebar i {
    flex: 1;
    height: 8%;
    border-radius: 999px;
    background: var(--pt-accent);
    animation: ptWave 2.4s ease-in-out infinite;
    animation-delay: calc(var(--pt-i) * -.06s);
}

@keyframes ptWave {
    0%, 100% { height: 8%;  opacity: .5; }
    50%      { height: 70%; opacity: 1; }
}

html.pt-podcaster .pcard,
html.pt-podcaster .wlp-card,
html.pt-podcaster .dcard,
html.pt-podcaster .ccc-card {
    position: relative;
    border-inline-start: 4px solid var(--pt-accent);
    overflow: hidden;
}

html.pt-podcaster .pcard-hd::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-inline-start: 8px;
    border-radius: 50%;
    background: var(--pt-accent);
    animation: ptRecPulse 1.8s ease-in-out infinite;
}

/* ── 📹 YouTuber — studio beams and a recording light ── */
.pt-bd-studio .pt-bd-pattern {
    background:
        radial-gradient(60% 40% at 50% 0%, rgba(var(--pt-accent-rgb), .16), transparent 70%),
        radial-gradient(40% 30% at 12% 90%, rgba(var(--pt-accent-2-rgb), .14), transparent 70%);
}

.pt-studio {
    inset: 0;
    width: 100%;
    height: 100%;
}

.pt-beam {
    position: absolute;
    top: -30vh;
    width: 34vw;
    height: 130vh;
    background: linear-gradient(180deg, rgba(var(--pt-accent-rgb), .18), transparent 70%);
    filter: blur(28px);
    transform-origin: top center;
}

.pt-beam-1 { inset-inline-start: 6%;  transform: rotate(14deg);  animation: ptBeam 12s ease-in-out infinite; }
.pt-beam-2 { inset-inline-end: 8%;    transform: rotate(-16deg); background: linear-gradient(180deg, rgba(var(--pt-accent-2-rgb), .18), transparent 70%); animation: ptBeam 15s ease-in-out infinite reverse; }

@keyframes ptBeam {
    0%, 100% { opacity: .55; transform: rotate(14deg)  scaleX(1); }
    50%      { opacity: .95; transform: rotate(9deg)   scaleX(1.18); }
}

.pt-rec {
    position: absolute;
    top: 18px;
    inset-inline-end: 20px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 10px;
    border-radius: 999px;
    background: rgba(var(--pt-card-rgb), .8);
    border: 1px solid rgba(var(--pt-accent-rgb), .45);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--pt-accent);
}

.pt-rec::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pt-accent);
    animation: ptRecPulse 1.5s ease-in-out infinite;
}

@keyframes ptRecPulse {
    0%, 100% { opacity: 1;  box-shadow: 0 0 0 0 rgba(var(--pt-accent-rgb), .6); }
    50%      { opacity: .4; box-shadow: 0 0 0 7px rgba(var(--pt-accent-rgb), 0); }
}

html.pt-youtuber .pcard,
html.pt-youtuber .art-card,
html.pt-youtuber .wlp-card,
html.pt-youtuber .ccc-card,
html.pt-youtuber .dcard {
    border-top: 3px solid var(--pt-accent);
}

/* ── 📷 Photographer — film grain, gallery mats, an aperture ── */
.pt-bd-gallery .pt-bd-base {
    background: radial-gradient(120% 80% at 50% 0%, rgba(var(--pt-accent-rgb), .10), transparent 65%);
}

.pt-bd-gallery .pt-bd-pattern {
    background-image:
        linear-gradient(rgba(0, 0, 0, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, .035) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: .7;
}

.pt-aperture {
    top: 8vh;
    inset-inline-end: 6vw;
    width: 30vmin;
    height: 30vmin;
    opacity: .16;
    animation: ptSpin 48s linear infinite;
}

.pt-aperture i {
    position: absolute;
    inset: 0;
    border: 2px solid var(--pt-accent);
    clip-path: polygon(50% 50%, 100% 0, 100% 60%);
    transform: rotate(calc(var(--pt-i) * 60deg));
}

@keyframes ptSpin {
    to { transform: rotate(360deg); }
}

html.pt-photographer .pcard,
html.pt-photographer .art-card,
html.pt-photographer .wlp-card,
html.pt-photographer .ccc-card,
html.pt-photographer .dcard,
html.pt-photographer .pp-wl-card {
    border: 1px solid var(--pt-border);
    border-radius: 2px;
    padding-top: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .07), 0 14px 34px rgba(0, 0, 0, .09);
}

html.pt-photographer .art-thumb,
html.pt-photographer .wlp-card-cover {
    border: 8px solid var(--pt-card);
    outline: 1px solid var(--pt-border);
    border-radius: 0;
}

/* ── ✍️ Writer — ruled paper and ink ── */
.pt-bd-paper .pt-bd-base {
    background: linear-gradient(180deg, rgba(var(--pt-accent-rgb), .07), transparent 40%);
}

.pt-bd-paper .pt-bd-pattern {
    background-image: repeating-linear-gradient(
        180deg,
        transparent 0 33px,
        rgba(var(--pt-accent-rgb), .13) 33px 34px);
    mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
}

.pt-bd-paper::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-start: 12%;
    width: 2px;
    background: rgba(var(--pt-accent-2-rgb), .18);
}

html.pt-writer h1, html.pt-writer h2, html.pt-writer h3,
html.pt-writer .pp-name,
html.pt-writer .art-title,
html.pt-writer .wlp-title,
html.pt-writer .cc-title {
    font-family: var(--pt-font);
    letter-spacing: 0;
}

html.pt-writer .pcard,
html.pt-writer .art-card,
html.pt-writer .wlp-card,
html.pt-writer .ccc-card,
html.pt-writer .dcard {
    border: 1px solid var(--pt-border);
    box-shadow: 0 1px 0 var(--pt-border), 0 12px 26px rgba(80, 60, 30, .08);
}

html.pt-writer .pcard-hd {
    background: linear-gradient(180deg, rgba(var(--pt-accent-rgb), .08), var(--pt-card));
    border-bottom: 1px solid rgba(var(--pt-accent-rgb), .28);
}

/* ── 🛡️ Hacker — matrix rain, scanlines, phosphor glow ── */
.pt-bd-matrix .pt-bd-base {
    background: radial-gradient(120% 90% at 50% 0%, rgba(var(--pt-accent-rgb), .16), transparent 62%);
}

.pt-bd-matrix .pt-bd-pattern {
    background-image: repeating-linear-gradient(
        180deg,
        rgba(var(--pt-accent-rgb), .07) 0 1px,
        transparent 1px 3px);
}

html.pt-hacker .pt-bd-canvas {
    opacity: .5;
}

html.pt-hacker .pcard,
html.pt-hacker .art-card,
html.pt-hacker .wlp-card,
html.pt-hacker .ccc-card,
html.pt-hacker .dcard,
html.pt-hacker .pp-hero {
    border: 1px solid rgba(var(--pt-accent-rgb), .38);
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(var(--pt-accent-rgb), .10), 0 0 28px rgba(var(--pt-accent-rgb), .14);
}

html.pt-hacker .pp-name,
html.pt-hacker .pcard-hd,
html.pt-hacker .pp-tab {
    text-shadow: 0 0 12px rgba(var(--pt-accent-rgb), .55);
}

html.pt-hacker .pp-name::after {
    content: "_";
    animation: ptCaret 1.05s steps(1) infinite;
}

/* ── 🎮 Gamer — hex arena and an RGB sweep ── */
.pt-bd-arena .pt-bd-pattern {
    background-image:
        linear-gradient(30deg, rgba(var(--pt-accent-2-rgb), .07) 1px, transparent 1px),
        linear-gradient(-30deg, rgba(var(--pt-accent-rgb), .07) 1px, transparent 1px);
    background-size: 54px 32px;
}

.pt-rgb-sweep {
    inset: -40%;
    background: conic-gradient(
        from 0deg,
        rgba(var(--pt-accent-rgb), .22),
        rgba(var(--pt-accent-2-rgb), .22),
        rgba(var(--pt-accent-rgb), .22));
    filter: blur(70px);
    animation: ptSpin 22s linear infinite;
}

html.pt-gamer .pcard,
html.pt-gamer .wlp-card,
html.pt-gamer .ccc-card,
html.pt-gamer .dcard,
html.pt-gamer .pp-hero {
    position: relative;
    border: 1px solid transparent;
    background:
        linear-gradient(var(--pt-card), var(--pt-card)) padding-box,
        conic-gradient(from var(--pt-angle, 0deg), var(--pt-accent), var(--pt-accent-2), var(--pt-accent)) border-box;
    animation: ptRgbBorder 6s linear infinite;
}

@property --pt-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes ptRgbBorder {
    to { --pt-angle: 360deg; }
}

html.pt-gamer .btn-donate,
html.pt-gamer #btnDonatePrimary {
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    border-radius: 0;
}

/* ── 🎨 Designer — floating shapes on a bright canvas ── */
.pt-bd-canvas-theme,
.pt-bd-canvas .pt-shapes {
    inset: 0;
}

.pt-shapes {
    inset: 0;
    width: 100%;
    height: 100%;
}

.pt-shape {
    position: absolute;
    opacity: .16;
    animation: ptShapeFloat 22s ease-in-out infinite;
}

.pt-shape-tri {
    top: 14%;
    inset-inline-start: 9%;
    width: 0;
    height: 0;
    border-inline: 46px solid transparent;
    border-bottom: 80px solid var(--pt-accent);
}

.pt-shape-dot {
    top: 62%;
    inset-inline-end: 12%;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: var(--pt-accent-2);
    animation-delay: -6s;
}

.pt-shape-sq {
    top: 74%;
    inset-inline-start: 16%;
    width: 92px;
    height: 92px;
    border-radius: 18px;
    background: var(--pt-accent);
    transform: rotate(18deg);
    animation-delay: -11s;
}

.pt-shape-ring {
    top: 22%;
    inset-inline-end: 18%;
    width: 150px;
    height: 150px;
    border: 14px solid var(--pt-accent-2);
    border-radius: 50%;
    animation-delay: -16s;
}

@keyframes ptShapeFloat {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50%      { transform: translate3d(20px, -34px, 0) rotate(22deg); }
}

html.pt-designer .pcard,
html.pt-designer .art-card,
html.pt-designer .wlp-card,
html.pt-designer .ccc-card,
html.pt-designer .dcard {
    border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius);
    overflow: hidden;
}

/* The hero can't clip: the avatar deliberately overhangs its top edge. */
html.pt-designer .pp-hero {
    border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius);
}

html.pt-designer .pcard-hd {
    background: linear-gradient(120deg, rgba(var(--pt-accent-rgb), .14), rgba(var(--pt-accent-2-rgb), .12));
}

/* ── 🚀 Startup — a quiet grid and slow orbits ── */
.pt-bd-grid .pt-bd-pattern {
    background-image:
        linear-gradient(rgba(var(--pt-accent-rgb), .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--pt-accent-rgb), .07) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(100% 70% at 50% 0%, #000 10%, transparent 80%);
}

.pt-orbit {
    top: 50%;
    inset-inline-start: 50%;
    width: 0;
    height: 0;
}

.pt-orbit-ring {
    position: absolute;
    top: 50%;
    inset-inline-start: 50%;
    width: 60vmin;
    height: 60vmin;
    margin: -30vmin 0 0 -30vmin;
    border: 1px solid rgba(var(--pt-accent-rgb), .16);
    border-radius: 50%;
    animation: ptSpin 60s linear infinite;
}

.pt-orbit-ring::after {
    content: "";
    position: absolute;
    top: -5px;
    inset-inline-start: calc(50% - 5px);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--pt-accent);
    box-shadow: 0 0 18px rgba(var(--pt-accent-rgb), .8);
}

.pt-orbit-ring-2 {
    width: 92vmin;
    height: 92vmin;
    margin: -46vmin 0 0 -46vmin;
    border-color: rgba(var(--pt-accent-2-rgb), .14);
    animation-duration: 95s;
    animation-direction: reverse;
}

.pt-orbit-ring-2::after {
    background: var(--pt-accent-2);
    box-shadow: 0 0 18px rgba(var(--pt-accent-2-rgb), .8);
}

html.pt-startup .pcard,
html.pt-startup .art-card,
html.pt-startup .wlp-card,
html.pt-startup .ccc-card,
html.pt-startup .dcard,
html.pt-startup .pp-hero {
    border: 1px solid var(--pt-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 30px rgba(15, 23, 42, .06);
}

html.pt-startup .pcard-hd {
    background: var(--pt-card);
    font-weight: 700;
    letter-spacing: -.01em;
}

/* ───────────────────────────────────────────────
   7. Stories and share surfaces
   Story slides keep their per-type gradients (birthday, donation, campaign,
   wishlist read differently on purpose) and pick up the theme through the ring,
   the frame, the progress bar and the primary action instead.
   ─────────────────────────────────────────────── */
html.pt-active:not(.pt-tinted) .story-avatar-wrap.has-story {
    background: conic-gradient(from var(--story-angle),
        var(--pt-accent), var(--pt-accent-2), var(--pt-accent-dk), var(--pt-accent));
    box-shadow: 0 0 0 0 rgba(var(--pt-accent-rgb), .55), 0 0 18px 2px rgba(var(--pt-accent-rgb), .45);
}

html.pt-active:not(.pt-tinted) .story-avatar-wrap.has-story::before {
    background: radial-gradient(circle, rgba(var(--pt-accent-rgb), .35), transparent 68%);
}

html.pt-active:not(.pt-tinted) .story-avatar-wrap.has-story::after {
    border-color: rgba(var(--pt-accent-2-rgb), .65);
}

html.pt-active:not(.pt-tinted) .story-avatar-wrap.has-story > * {
    border-color: var(--pt-card);
}

html.pt-active:not(.pt-tinted) .story-frame {
    background: var(--pt-bg);
}

html.pt-active:not(.pt-tinted) .story-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(160deg, rgba(var(--pt-accent-rgb), .30), transparent 55%);
}

html.pt-active:not(.pt-tinted) .story-progress-bar {
    background: var(--pt-accent);
}

html.pt-active:not(.pt-tinted) .s-btn.primary {
    background: var(--pt-accent);
    color: var(--pt-on-accent);
}

html.pt-active:not(.pt-tinted) .s-badge-pill {
    border-color: rgba(var(--pt-accent-rgb), .5);
}

/* ───────────────────────────────────────────────
   8. Theme badge — tells a visitor which look they are seeing
   ─────────────────────────────────────────────── */
.pt-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(var(--pt-accent-rgb), .12);
    border: 1px solid rgba(var(--pt-accent-rgb), .3);
    color: var(--pt-accent);
    font-size: .72rem;
    font-weight: 700;
}

/* ───────────────────────────────────────────────
   9. Motion preferences
   Every theme still reads correctly with all motion removed — the palette,
   backdrop pattern and card treatment carry it on their own.
   ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .pt-backdrop *,
    html.pt-active .pcard,
    html.pt-active .pp-hero {
        animation: none !important;
        transition: none !important;
    }

    .pt-bd-canvas {
        display: none;
    }
}

@media (max-width: 720px) {
    .pt-glyph-4,
    .pt-glyph-5,
    .pt-glyph-6 { display: none; }

    .pt-typing { font-size: .72rem; bottom: 14px; inset-inline-start: 12px; }
    .pt-eq     { height: 18vh; gap: 6px; }
    .pt-wavebar { height: 11vh; }
    .pt-aperture { width: 40vmin; height: 40vmin; }
}
