/* Public page (redesign, docs/REDESIGN_PLAN.md §6). Consumes the CSS variables
   index.js sets from the page's theme: --accent, --surface, --card, --text, --muted,
   --border, --profile-shell-bg, --space-scale, --radius-scale, --font-stack. */

body.pp-page {
  /* Radii: 12 tiles, 16 links / cards / buttons, 24 sheets, 999 pills. */
  --pp-r-sm: 12px;
  --pp-r-md: 16px;
  --pp-r-lg: 24px;
  --pp-radius: calc(var(--pp-r-md) * var(--radius-scale, 1));
  --pp-gap: calc(12px * var(--space-scale, 1));
  --pp-grad-2: color-mix(in srgb, var(--accent) 45%, #0c0c12);
  --pp-chip-bg: color-mix(in srgb, var(--accent) 22%, transparent);
  --pp-field-bg: color-mix(in srgb, var(--surface) 88%, var(--text) 4%);
  /* Text in the page's accent that stays readable on its cards (the raw accent is often
     under 4.5:1 on dark surfaces). */
  --pp-accent-text: color-mix(in srgb, var(--accent) 55%, var(--text));
  --pp-sheet-bg: var(--surface);
  --pp-error: #b91c1c;
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body.pp-page.pp-text-light { --pp-sheet-bg: color-mix(in srgb, var(--surface) 92%, #fff 8%); --pp-error: #fca5a5; }
body.pp-page [hidden] { display: none !important; }
body.pp-page :focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
/* Zero-specificity base rules so component classes (.pp-btn-accent, .pp-facade…) win. */
:where(body.pp-page) a { color: inherit; }
:where(body.pp-page) button { font: inherit; color: inherit; cursor: pointer; }

.pp-i { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pp-sr, .pp-link-text.pp-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pp-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* "Tap to …" is touch wording; with a mouse the same hint reads "Reveal", "Play video". */
.pp-mouse { display: none; }
@media (hover: hover) {
  .pp-touch { display: none; }
  .pp-mouse { display: inline; }
}
.pp-skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  padding: 12px 16px; border-radius: var(--pp-r-sm); background: #fff; color: #111 !important; font-weight: 600;
}
.pp-skip:focus { top: 12px; }

/* Backgrounds added with the redesign */
#bg.bg-solid::before { background: var(--bg-solid, #0c0c12); }
#bg.gradient-glass::before { background: linear-gradient(160deg, #1e1b4b 0%, #3b2a6b 55%, #0f172a 100%); }
#bg.gradient-creator::before { background: linear-gradient(170deg, #1d0f33 0%, #3a1150 55%, #120a1f 100%); }
#bg.gradient-business::before { background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%); }
#bg.gradient-aurora::before { background: linear-gradient(160deg, #0f2027 0%, #203a43 50%, #2c5364 100%); }
#bg.bg-solid .overlay { display: none; }

/* ── Cover ── */
/* Every cover fades into the page, so no hard edge runs through the avatar. With no
   picture it is a soft glow in the page's accent, not a fixed purple-to-orange band. */
.pp-cover {
  position: relative; height: 150px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
.pp-cover[data-empty] { background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--accent) 55%, #0c0c12), transparent 70%); }
.pp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Shell ── */
.pp-shell {
  position: relative; z-index: 1;
  max-width: 600px; margin: 0 auto;
  padding: 0 16px calc(32px + env(safe-area-inset-bottom, 0px));
}
.pp-profile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; padding-top: 40px;
}
.pp-header-cover .pp-profile { padding-top: 0; }
.pp-avatar-row { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pp-profile .avatar-wrap { width: 104px; height: 104px; padding: 4px; background: var(--surface); }
.pp-header-cover .pp-profile .avatar-wrap { margin-top: -56px; }
.pp-profile .avatar-wrap.avatar-frame-freeform { width: auto; height: auto; background: none; padding: 0; }
.pp-profile .avatar.placeholder { font-size: 40px; background: var(--card); border-radius: 999px; }
.pp-id { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.pp-profile .identity { position: relative; }
.pp-name {
  margin: 4px 0 0; display: inline-flex; align-items: center; gap: 6px;
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--text);
  overflow-wrap: anywhere;
}
.pp-name .display-name { opacity: 1; font-size: inherit; margin: 0; }
.pp-meta { margin: 0; font-size: 14px; color: var(--muted); }
.pp-bio { margin: 4px 0 0; max-width: 440px; font-size: 15px; color: var(--muted); }
.pp-bio p { margin: 0 0 6px; }
.pp-bio a { text-decoration: underline; }

/* Readability on gradient, image and video backgrounds (light-text themes only; a solid
   background is left as designed). A soft dark pool behind the profile plus a text
   shadow keeps the name, handle and bio legible on bright stops like Sunset's #ffc371. */
body.pp-text-light:not(.pp-bg-solid) .pp-profile { position: relative; isolation: isolate; }
body.pp-text-light:not(.pp-bg-solid) .pp-profile::before {
  content: ''; position: absolute; inset: -24px -16px; z-index: -1; pointer-events: none;
  /* closest-side: the pool fades out exactly at the box edge, never clipped to a rectangle. */
  background: radial-gradient(closest-side at 50% 45%, rgba(0, 0, 0, .45), rgba(0, 0, 0, .38) 62%, transparent);
}
@media (min-width: 768px) {
  body.pp-text-light:not(.pp-bg-solid) .pp-profile::before { inset: -32px -80px; }
}
body.pp-text-light:not(.pp-bg-solid) :is(.pp-name, .pp-meta, .pp-bio, .pp-section-title, .pp-heading, .pp-embed-caption, .pp-footer-text, .pp-report) {
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 12px rgba(0, 0, 0, .35);
}
/* Full white: at 92% the 14px handle measured 4.25:1 on Sunset even with the scrim. */
body.pp-text-light:not(.pp-bg-solid) :is(.pp-meta, .pp-bio) { color: #fff; }

.pp-live {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border-radius: 999px; background: var(--pp-chip-bg); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none;
}
.pp-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); animation: pp-pulse 2s infinite; }
@keyframes pp-pulse { 70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

.pp-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.pp-socials--bottom { margin: 8px 0 4px; }
.pp-social {
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--surface) 80%, var(--text) 6%);
  border: 1px solid var(--border); color: var(--text);
}
.pp-icon-mask {
  width: 22px; height: 22px; display: inline-block; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
body.icons-monochrome .pp-tile { background: var(--surface) !important; }

/* ── Actions ── */
/* Subscribe and Share share the row; Like is a compact button beside them. */
.pp-actions { width: 100%; display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.pp-actions[data-count="2"] { max-width: 360px; }
.pp-actions > .pp-btn { flex: 1 1 0; min-width: 0; }
.pp-actions > .like-pill { flex: 0 0 auto; min-width: 48px; padding: 0 14px; }
.pp-btn {
  min-height: 48px; padding: 0 16px; border-radius: var(--pp-r-md);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  font-size: 15px; font-weight: 600; text-decoration: none; text-align: center;
}
.pp-btn-accent { border: 0; background: var(--accent); color: #fff; font-weight: 600; }
.pp-btn-solid { border: 0; background: var(--accent); color: #fff; font-weight: 600; }
.pp-btn-quiet { border: 0; background: transparent; }
.pp-btn-ghost { background: transparent; }
.pp-btn-sm { min-height: 44px; padding: 0 18px; font-size: 14px; align-self: flex-start; }
.like-pill .pp-heart { width: 18px; height: 18px; }
.like-pill.liked .pp-heart { fill: #ef4444; stroke: #ef4444; }
.like-pill.liked { cursor: default; }
.like-pill .count { font-variant-numeric: tabular-nums; }
.pp-badges { margin-top: 10px; }
.pp-badges .profile-badge { font-size: 12px; color: var(--text); background: var(--pp-chip-bg); border-color: var(--border); }

/* Discord cards keep their own styles (site.css); just space them. */
.pp-profile .discord-showcase, .pp-profile .discord-inline-launchers { width: 100%; margin-top: 12px; text-align: left; }

/* ── Items ── */
.pp-main { display: flex; flex-direction: column; gap: calc(22px * var(--space-scale, 1)); padding-top: 20px; }
.pp-main:focus { outline: none; }
.pp-section-body { display: flex; flex-direction: column; gap: var(--pp-gap); }
/* One heading style for section titles and Title blocks: left-aligned (the link cards'
   text edge), 17/600, as typed — no stacked uppercase labels. 24px above, 8px below. */
.pp-section { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.pp-section-title, .pp-section > summary {
  margin: 0; padding: 0 4px; min-height: 44px; display: flex; align-items: center; justify-content: space-between;
  color: var(--text); list-style: none; cursor: pointer;
}
.pp-section-title, .pp-section-title h2, .pp-section > summary h2, .pp-heading {
  font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; text-transform: none; text-align: left; color: var(--text); margin: 0;
}
section.pp-section > .pp-section-title { cursor: default; min-height: 0; }
.pp-section > summary::-webkit-details-marker { display: none; }
.pp-section .pp-chev { transition: transform .15s; }
details.pp-section:not([open]) .pp-chev { transform: rotate(-90deg); }

.pp-links { display: flex; flex-direction: column; gap: var(--pp-gap); }
.pp-link {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 10px 14px 10px 10px;
  border-radius: var(--pp-radius); background: var(--card); border: 1px solid var(--border);
  color: var(--link-text, var(--text)); text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease;
}
body.btn-pill .pp-link:not(.pp-link--grid):not(.pp-link--featured) { border-radius: 999px; }
body.btn-pill .pp-link .pp-tile { border-radius: 50%; }
body.btn-square .pp-link, body.btn-square .pp-card { border-radius: 6px; }
body.btn-glass .pp-link { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .24); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
body.anim-subtle .pp-link:hover, body.anim-energetic .pp-link:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
body.anim-energetic .pp-link:hover { transform: translateY(-2px); }
body.glow-socials .pp-link, body.glow-socials .pp-social, body.glow-socials .pp-btn {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent), 0 0 18px color-mix(in srgb, var(--accent) 24%, transparent);
}
.pp-tile {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: var(--pp-r-sm); overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: #3f3f46; color: #fff; font-weight: 600; font-size: 17px;
}
/* A link with no icon shows its initial on a tint of the page's accent, not a grey tile. */
.pp-tile--initial { background: color-mix(in srgb, var(--accent) 28%, var(--card)); color: var(--text); }
.pp-tile > span { display: inline-flex; align-items: center; justify-content: center; }
.pp-tile .pp-icon-mask { color: #fff; width: 24px; height: 24px; }
.pp-tile .pp-icon-img, .pp-tile .pp-icon-svg svg { width: 24px; height: 24px; }
.pp-icon-svg svg { fill: currentColor; }
/* No icon ever outgrows its tile (an uploaded SVG used to render as a huge clipped block). */
.pp-icon-img, .pp-icon-svg svg { max-width: 40px; max-height: 40px; object-fit: contain; }
.pp-thumb-glyph .pp-icon-img, .pp-thumb-glyph .pp-icon-svg svg { width: 32px; height: 32px; }
.pp-tile-photo { width: 100%; height: 100%; object-fit: cover; }
.pp-link-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pp-link-title { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.pp-link-desc { font-size: 14px; color: var(--muted); }
.pp-link-desc:empty { display: none; }
.pp-arrow { width: 18px; height: 18px; color: var(--muted); }

/* Access states (index.js toggles the classes) */
.pp-when-locked, .pp-desc-locked, .pp-desc-age, .pp-desc-spoiler { display: none !important; }
.is-password-locked .pp-when-open { display: none !important; }
.is-password-locked .pp-when-locked { display: inline-flex !important; }
.is-password-locked .pp-tile { background: #3f3f46 !important; }
.is-password-locked .pp-desc-open { display: none; }
.is-password-locked .pp-desc-locked { display: block !important; }
.is-age-locked:not(.is-password-locked) .pp-desc-open { display: none; }
.is-age-locked:not(.is-password-locked) .pp-desc-age { display: block !important; }
.is-spoiler:not(.is-password-locked):not(.is-age-locked) .pp-desc-open { display: none; }
.is-spoiler:not(.is-password-locked):not(.is-age-locked) .pp-desc-spoiler { display: block !important; }
.is-spoiler .pp-link-title, .is-spoiler .pp-tile > .pp-when-open { filter: blur(6px); }
.is-revealing .pp-link-title { transition: filter .45s ease; }
.pp-link .access-overlay-inline { display: none !important; }
.access-item-block { position: relative; }
.access-item-block .access-overlay {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center;
  border-radius: var(--pp-radius);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.access-item-block.is-password-locked .access-overlay { position: static; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; margin-top: -4px; }
.access-action-btn {
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0;
  background: var(--accent); color: #fff; font-weight: 600;
}
.pp-locked {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; padding: 12px;
  border-radius: var(--pp-radius); border: 1px dashed var(--border); color: var(--muted); background: var(--card);
}
.pp-chip { display: inline-flex; align-self: flex-start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--pp-chip-bg); color: var(--text); }
.pp-chip-float { position: absolute; top: 8px; right: 8px; z-index: 4; margin: 0; }

/* Link styles */
.pp-links--cards .pp-link { padding: 0 14px 0 0; overflow: hidden; }
.pp-links--cards .pp-tile { width: 76px; height: 76px; border-radius: 0; align-self: stretch; height: auto; min-height: 76px; }
.pp-links--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
/* An odd last tile spans the row instead of leaving an empty half. */
.pp-links--grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.pp-link--grid { flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.pp-link--grid .pp-link-text { padding: 10px 12px 12px; }
.pp-link--grid .pp-link-title { font-size: 15px; }
.pp-link--grid .pp-link-desc { font-size: 13px; }
.pp-link--grid .pp-arrow { position: absolute; top: 8px; right: 8px; color: #fff; }
.pp-thumb {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 96px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 80%, #111), var(--pp-grad-2));
  color: #fff; font-size: 26px; font-weight: 700; overflow: hidden;
}
.pp-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pp-thumb-glyph .pp-icon-mask { width: 32px; height: 32px; color: #fff; }
.is-password-locked .pp-thumb { background: linear-gradient(135deg, #27272a, #3f3f46); }
.pp-links--icons { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pp-link--icons { width: 56px; height: 56px; min-height: 56px; padding: 0; border-radius: 50%; justify-content: center; }
.pp-link--icons .pp-tile { width: 100%; height: 100%; border-radius: 50%; }
.pp-featured .pp-link--featured { flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; border-radius: var(--pp-radius); }
.pp-link--featured .pp-thumb { height: 150px; align-items: flex-end; justify-content: flex-start; padding: 12px; }
.pp-link--featured .pp-link-text { padding: 14px 16px; }
.pp-link--featured .pp-link-title { font-size: 17px; font-weight: 600; }
.pp-link--featured .pp-arrow { position: absolute; right: 16px; bottom: 18px; color: var(--text); }
.pp-featured-badge { position: relative; z-index: 1; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 600; }
/* A highlighted link without a picture: a text-first row with an accent edge. */
.pp-featured .pp-link--featured-text {
  flex-direction: row; align-items: center; gap: 14px; min-height: 88px; padding: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--card)), var(--card));
}
.pp-link--featured-text .pp-tile { width: 48px; height: 48px; background: var(--accent); color: #fff; }
.pp-link--featured-text .pp-link-text { padding: 0; gap: 2px; }
.pp-link--featured-text .pp-arrow { position: static; }
.pp-featured-label { font-size: 12px; font-weight: 600; line-height: 16px; color: var(--pp-accent-text); }

/* ── Blocks ── */
.pp-card {
  display: flex; flex-direction: column; gap: 10px; padding: 16px;
  border-radius: var(--pp-radius); background: var(--card); border: 1px solid var(--border); color: var(--text);
}
/* Title blocks share the section-title style above; 24px above and 8px below them inside
   a list (the list's own gap is 12px). */
.pp-heading { margin: 12px 4px -4px; }
.pp-section-body > .pp-block--heading:first-child .pp-heading { margin-top: 2px; }
.pp-block-title { margin: 0; font-size: 17px; font-weight: 600; color: var(--text); }
.pp-muted { margin: 0; font-size: 14px; color: var(--muted); }
.pp-richtext { font-size: 15px; }
.pp-richtext p { margin: 0 0 8px; }
.pp-richtext a { text-decoration: underline; }
.pp-image { margin: 0; padding: 0; overflow: hidden; gap: 0; }
.pp-image img { width: 100%; height: auto; display: block; }
.pp-image figcaption { padding: 10px 14px; font-size: 14px; color: var(--muted); }
.pp-button {
  display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 16px;
  border-radius: var(--pp-radius); background: var(--accent); color: #fff !important; font-weight: 600; text-decoration: none;
}
.pp-button--outline { background: transparent; color: var(--text) !important; border: 2px solid var(--accent); }
.pp-button.is-locked { background: var(--card); color: var(--muted) !important; border: 1px dashed var(--border); }
.pp-embed { display: flex; flex-direction: column; gap: 10px; }
.pp-embed { gap: 8px; }
.pp-embed-caption { margin: 0; padding: 0 4px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.pp-facade, .pp-embed-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--pp-radius);
  border: 1px solid var(--border); background: linear-gradient(135deg, #111827, #1f2937); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; overflow: hidden;
}
.pp-embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pp-embed-frame.is-tall { aspect-ratio: auto; height: 680px; background: #fff; }
.pp-play { width: 64px; height: 64px; border-radius: 50%; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; }
.pp-play svg { width: 28px; height: 28px; fill: #fff; }
.pp-facade-note { font-size: 13px; opacity: .85; }
.pp-cd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: center; }
.pp-cd-unit { padding: 8px 0; border-radius: var(--pp-r-sm); background: var(--pp-chip-bg); display: flex; flex-direction: column; }
.pp-cd-num { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-cd-label { font-size: 12px; color: var(--muted); }
.pp-cd-after { margin: 0; font-weight: 600; }
.pp-form { display: flex; flex-direction: column; gap: 10px; }
.pp-field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.pp-field > span { font-size: 14px; font-weight: 600; }
.pp-field input, .pp-field textarea {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--pp-r-sm);
  border: 1px solid var(--border); background: var(--pp-field-bg); color: var(--text); font: inherit; font-size: 16px;
}
.pp-field input[aria-invalid="true"] { border-color: var(--pp-error); box-shadow: 0 0 0 1px var(--pp-error); }
.pp-field textarea { padding: 12px 14px; min-height: 110px; resize: vertical; }
.pp-form-status { margin: 0; font-size: 14px; min-height: 0; }
.pp-form-status:empty { display: none; }
.pp-form-status.is-error { color: var(--pp-error); font-weight: 500; }
.pp-product { flex-direction: row; align-items: center; gap: 14px; padding: 12px; }
.pp-product-img { width: 84px; height: 84px; flex-shrink: 0; border-radius: var(--pp-r-sm); object-fit: cover; }
.pp-product-img--empty { background: linear-gradient(135deg, #0e7490, var(--accent)); }
.pp-product-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-amounts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pp-amounts li { padding: 6px 12px; border-radius: 999px; background: var(--pp-chip-bg); font-weight: 600; font-size: 14px; }
.pp-link-plain { font-size: 14px; color: var(--muted); text-decoration: underline; min-height: 32px; display: inline-flex; align-items: center; }

/* ── Footer ── */
.pp-footer { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 6px; }
.pp-footer-text { color: var(--muted); font-size: 13px; text-align: center; }
.pp-made {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border-radius: 999px; background: var(--pp-chip-bg); color: var(--text) !important; font-size: 13px; font-weight: 600; text-decoration: none;
}
.pp-made-mark { width: 16px; height: 16px; flex-shrink: 0; object-fit: contain; }
.pp-report { min-height: 32px; display: inline-flex; align-items: center; font-size: 13px; color: var(--muted) !important; }

/* ── Sheets (share, subscribe, unlock, 18+) ── */
.pp-sheet { position: fixed; inset: 0; z-index: 10050; display: flex; flex-direction: column; justify-content: flex-end; }
.pp-sheet-backdrop { position: absolute; inset: 0; border: 0; padding: 0; background: rgba(0, 0, 0, .6); cursor: default; }
/* Sheets take the page's own theme (surface, text, accent, typeface) instead of a fixed
   white panel. */
.pp-sheet-panel {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  max-height: 92vh; overflow-y: auto; padding: 8px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  border-radius: var(--pp-r-lg) var(--pp-r-lg) 0 0; background: var(--pp-sheet-bg); color: var(--text); text-align: left;
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); border-bottom: 0;
  font-family: var(--font-stack);
  animation: pp-sheet-in .2s ease-out;
}
.pp-sheet-panel h2 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; }
.pp-sheet-text { margin: 0; font-size: 15px; color: var(--muted); }
.pp-sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--text) 25%, transparent); align-self: center; margin-bottom: 4px; }
.pp-sheet-icon { width: 52px; height: 52px; border-radius: var(--pp-r-md); background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--pp-accent-text); display: flex; align-items: center; justify-content: center; }
.pp-sheet-icon .pp-i { width: 26px; height: 26px; stroke-width: 2; }
.pp-sheet .pp-btn { width: 100%; border-color: color-mix(in srgb, var(--text) 16%, transparent); background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); min-height: 48px; }
.pp-sheet .pp-btn-solid { border: 0; background: var(--accent); color: #fff; }
.pp-sheet .pp-btn-quiet { border: 0; background: transparent; color: var(--muted); min-height: 44px; }
.pp-sheet .pp-field input { background: var(--pp-field-bg); color: var(--text); border-color: color-mix(in srgb, var(--text) 38%, transparent); }
.pp-sheet .pp-field input[aria-invalid="true"] { border-color: var(--pp-error); }
.pp-sheet :focus-visible { outline-color: var(--text); }
#pp-share-sheet .pp-sheet-panel { align-items: center; text-align: center; }
/* The QR code stays dark-on-white whatever the theme, so every camera can read it. */
.pp-qr { width: 180px; height: 180px; padding: 12px; border-radius: var(--pp-r-md); border: 1px solid color-mix(in srgb, var(--text) 12%, transparent); background: #fff; box-sizing: content-box; }
.pp-share-url { margin: 0; font-size: 15px; font-weight: 600; word-break: break-all; }
.pp-sheet-actions { width: 100%; display: flex; flex-direction: column; gap: 8px; }
@keyframes pp-sheet-in { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ── Toast ── */
.pp-toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 10060;
  max-width: 480px; margin: 0 auto; min-height: 48px; padding: 12px 16px; border-radius: var(--pp-r-md);
  background: #f4f4f5; color: #18181b; font-size: 14px; font-weight: 600; box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s, transform .18s;
  font-family: var(--font-stack);
}
.pp-toast.show { opacity: 1; transform: none; }
.pp-toast.toast-error { background: #fee2e2; color: #7f1d1d; }

/* ── Minimal header ── */
.pp-header-minimal .pp-profile { align-items: stretch; text-align: left; }
.pp-header-minimal .pp-avatar-row { flex-direction: row; align-items: center; gap: 14px; }
.pp-header-minimal .pp-profile .avatar-wrap { width: 64px; height: 64px; padding: 2px; }
.pp-header-minimal .pp-id { align-items: flex-start; }
.pp-header-minimal .pp-name { font-size: 22px; margin: 0; }
.pp-header-minimal .pp-socials, .pp-header-minimal .pp-live { align-self: flex-start; justify-content: flex-start; }

/* ── Desktop ── */
@media (min-width: 768px) {
  .pp-cover { height: 240px; }
  .pp-header-cover .pp-profile .avatar-wrap { width: 112px; height: 112px; margin-top: -60px; }
  .pp-name { font-size: 30px; }
  .pp-sheet { justify-content: center; align-items: center; padding: 24px; }
  .pp-sheet-panel { width: 440px; max-width: 100%; border-radius: var(--pp-r-lg); border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent); padding: 24px; }
  .pp-sheet-handle { display: none; }
}
@media (min-width: 1024px) {
  .pp-layout-split .pp-cover { height: 200px; }
  .pp-layout-split .pp-shell {
    max-width: 1120px; display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 40px; align-items: start; padding: 0 24px 48px;
  }
  .pp-layout-split .pp-profile {
    position: sticky; top: 24px; margin-top: 24px; padding: 28px 24px; border-radius: 24px;
    background: var(--profile-shell-bg, var(--card)); border: 1px solid var(--border);
    backdrop-filter: blur(var(--profile-shell-blur, 18px)); -webkit-backdrop-filter: blur(var(--profile-shell-blur, 18px));
  }
  .pp-layout-split.pp-header-cover .pp-shell { margin-top: -96px; }
  .pp-layout-split.pp-header-cover .pp-profile { margin-top: 0; }
  .pp-layout-split.pp-header-cover .pp-profile .avatar-wrap { margin-top: 0; }
  .pp-layout-split.pp-header-cover .pp-main { padding-top: 120px; }
  .pp-layout-split .pp-main { padding-top: 48px; }
  .pp-layout-split .pp-links--list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pp-layout-split .pp-links--list > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* Three across, on a six-column track so a last row of one or two tiles fills the row. */
  .pp-layout-split .pp-links--grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pp-layout-split .pp-links--grid > *, .pp-layout-split .pp-links--grid > :last-child:nth-child(odd) { grid-column: span 2; }
  .pp-layout-split .pp-links--grid > :last-child:nth-child(3n+1) { grid-column: 1 / -1; }
  .pp-layout-split .pp-links--grid > :last-child:nth-child(3n+2),
  .pp-layout-split .pp-links--grid > :nth-last-child(2):nth-child(3n+1) { grid-column: span 3; }
  .pp-layout-split .pp-image, .pp-layout-split .pp-embed { max-width: 560px; }
  /* The split profile sits on its own card; no scrim spilling past its edges. */
  .pp-layout-split .pp-profile::before { display: none; }
  .pp-layout-split .pp-link--featured { flex-direction: row; }
  .pp-layout-split .pp-link--featured .pp-thumb { width: 260px; height: auto; min-height: 150px; flex-shrink: 0; }
  .pp-layout-split .pp-link--featured .pp-link-text { justify-content: center; padding: 22px 24px; }
  .pp-layout-split .pp-link--featured .pp-link-title { font-size: 22px; }
  .pp-layout-split .pp-link--featured-text .pp-link-text { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  body.pp-page *, body.pp-page *::before, body.pp-page *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* The old page darkened and blurred locked links with ::before; the redesign shows a
   lock tile and plain words instead ("Private — tap to unlock"). */
.pp-link.access-item-link::before { display: none !important; }
.pp-block.is-spoiler > :not(.access-overlay):not(.pp-chip) { filter: blur(14px) saturate(.5); }
body.pp-page.pp-bg-solid { background: var(--bg-solid, #0c0c12); }

/* ── Password / 18+ gate (views/access_gate.ejs) ──
   A centred stack: whose page it is (64px avatar, name), what to do, then a 360px form
   column. The PortalPage wordmark sits in the footer, out of the way. */
.pp-gate-body {
  margin: 0; min-height: 100vh; background: #0b0b0f; color: #f5f5f7;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.pp-gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 0 16px; }
.pp-gate-stack {
  flex: 1 0 auto; width: 100%; max-width: 360px; padding: 64px 0 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center;
}
.pp-gate-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #1c1c22; }
.pp-gate-avatar--emoji { display: flex; align-items: center; justify-content: center; font-size: 28px; line-height: 1; }
.pp-gate-name { margin: 0; font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.pp-gate-status { margin: -8px 0 0; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: #a1a1aa; }
.pp-gate-sub { margin: -8px 0 0; font-size: 15px; line-height: 22px; color: #a1a1aa; }
.pp-gate-icon {
  width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: #1c1c22; color: #c4b5fd;
}
.pp-gate-icon .pp-gate-i { width: 24px; height: 24px; }
.pp-gate-i { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pp-gate-form { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; text-align: left; }
.pp-gate-field { font-size: 13px; font-weight: 500; color: #d4d4d8; }
.pp-gate-input {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, .24); background: #141419; color: #f5f5f7; font: inherit; font-size: 16px;
}
.pp-gate-input:focus-visible { outline: 2px solid #b794f6; outline-offset: 2px; }
.pp-gate-input[aria-invalid="true"] { border-color: #f87171; }
.pp-gate-error { margin: 0; font-size: 14px; line-height: 20px; color: #fca5a5; }
.pp-gate-btn {
  margin-top: 8px; min-height: 48px; width: 100%; border: 0; border-radius: 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  background: linear-gradient(135deg, #7a4bd4, #b13fcf); color: #fff; font: inherit; font-size: 15px; font-weight: 600;
}
.pp-gate-btn:focus-visible { outline: 2px solid #f5f5f7; outline-offset: 2px; }
.pp-gate-btn--quiet { background: #1c1c22; }
.pp-gate-footer { padding: 24px 0 calc(24px + env(safe-area-inset-bottom, 0px)); }
.pp-gate-brand {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  color: #a1a1aa; font-size: 13px; font-weight: 500; text-decoration: none;
}
.pp-gate-brand:hover { color: #f5f5f7; }
.pp-gate-brand:focus-visible { outline: 2px solid #f5f5f7; outline-offset: 2px; border-radius: 8px; }
