/* Creator profile page (/<username>). Loaded right AFTER cardpage.css and before every other stylesheet:
   cardpage.css's protective layer covers the showcase box, its columns, buttons and "Show more";
   this file adds what a profile must also always show (avatar, name, follower count) and the Chub
   profile wrappers. Creators can change how these look, never hide, cover or move them away.
   See PROFILE-PAGE.md. */
@layer vf-protect {
  /* The page background a creator sets (body { … } -> .vf-backdrop) is dimmed slightly so text stays readable
     (owner, 2026-11-24: about 38% black, fixed, not adjustable). Its own element right after .vf-backdrop, outside
     .vf-notes, so no creator selector can reach it; profileshow.js header() switches it on when a design sets a background. */
  .vf-backdrop-dim { position: fixed !important; inset: 0 !important; z-index: -1 !important; pointer-events: none !important; display: none !important;
    margin: 0 !important; transform: none !important; visibility: visible !important; opacity: 1 !important; filter: none !important;
    background: rgba(0, 0, 0, .38) !important; }
  body.vf-pf-has-bg .vf-backdrop-dim { display: block !important; }
  /* The see-through overlay a design may decorate (.vf-overlay, ::before, ::after; owner 2026-11-29, STUDIO.md
     "See-through overlay"): the whole screen, above the character tiles but below the creator box with the protected
     header (.vf-showcase.vf-profile, z-index 2 below), the site's top bar, tab bar, menus, toasts and dialogs. Never
     clickable; contain: strict clips everything in it to the screen (also its position: fixed pieces). The design can't
     give it content (text), blend modes or backdrop filters, also not through an animation (!important beats those). */
  .vf-overlay { position: fixed !important; inset: 0 !important; z-index: 1 !important; pointer-events: none !important; display: block !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; width: auto !important; height: auto !important; transform: none !important;
    translate: none !important; rotate: none !important; scale: none !important; visibility: visible !important; overflow: hidden !important;
    contain: strict !important; isolation: isolate !important; mix-blend-mode: normal !important; backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important; clip-path: none !important; mask: none !important; }
  .vf-overlay::before, .vf-overlay::after { content: "" !important; pointer-events: none !important; z-index: auto !important;
    mix-blend-mode: normal !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  @media (prefers-reduced-motion: reduce) {
    .vf-overlay, .vf-overlay::before, .vf-overlay::after { animation: none !important; }
  }
  /* Chub's profile wrappers (.ant-layout-content > div > .ant-row): always there, never hiding anything. */
  .vf-showcase .vf-layout, .vf-showcase .vf-wrap { display: block !important; visibility: visible !important; opacity: 1 !important;
    position: relative !important; z-index: auto !important; height: auto !important; max-height: none !important; overflow: visible !important;
    transform: none !important; clip-path: none !important; mask: none !important; filter: none !important; inset: auto !important;
    translate: none !important; rotate: none !important; scale: none !important; zoom: 1 !important; margin: 0 !important; padding: 0 !important; float: none !important; }
  /* The box (with the protected header) paints above the character tiles next to it: a design's --card-glow shadow,
     however big, can't cover the header or Report (owner 2026-11-29, STUDIO.md "Character cards"). */
  .vf-showcase.vf-profile { z-index: 2 !important; }
  .vf-showcase.vf-profile .vf-head { padding-inline: max(12px, calc((100% - 1160px) / 2)) !important; }
  /* Page Studio layout (rules near the end of this file): its head is a column that must NOT wrap. The vf-protect
     flex-wrap: wrap above beat that, and Chub-style creator CSS such as
     `.ant-layout-content>div>.ant-row{flex-direction:column;align-items:center}` (the owner's own page, 2026-11-26)
     then made one wrapped column line wider than the page, pushing everything ~210px to the right. */
  .vf-showcase.vf-profile .vf-head.vf-ps:not(.vf-ps-column) { flex-direction: column !important; flex-wrap: nowrap !important; align-items: stretch !important; }
  .vf-showcase.vf-profile .vf-head.vf-ps-column { flex-direction: row !important; flex-wrap: wrap !important; align-items: flex-start !important; }
  @media (max-width: 700px) {
    .vf-showcase.vf-profile .vf-head.vf-ps-column { flex-direction: column !important; flex-wrap: nowrap !important; align-items: stretch !important; }
  }
  /* The header column can be restyled (size, background, banner, direction) but stays in the page. */
  .vf-showcase.vf-profile .vf-side { margin: 0 auto !important; padding-inline: 0 !important; max-width: 100% !important; box-sizing: border-box !important;
    min-width: min(100%, 200px) !important; width: auto !important; height: auto !important; max-height: none !important; font-size: max(12px, 1em) !important; }
  .vf-showcase .vf-pf, .vf-showcase .vf-pf-stats { display: flex !important; flex-wrap: wrap !important; visibility: visible !important; opacity: 1 !important;
    position: relative !important; z-index: 2 !important; height: auto !important; max-height: none !important; overflow: visible !important;
    transform: none !important; clip-path: none !important; mask: none !important; filter: none !important; inset: auto !important;
    translate: none !important; rotate: none !important; scale: none !important; zoom: 1 !important; float: none !important;
    max-width: 100% !important; box-sizing: border-box !important; padding-inline: 0 !important; margin-inline: 0 !important; font-size: max(12px, 1em) !important; }
  .vf-showcase .vf-avatar, .vf-showcase .vf-name, .vf-showcase .vf-followers {
    visibility: visible !important; opacity: 1 !important; position: relative !important; z-index: 2 !important; pointer-events: auto !important;
    transform: none !important; clip-path: none !important; mask: none !important; filter: none !important; inset: auto !important;
    translate: none !important; rotate: none !important; scale: none !important; zoom: 1 !important; float: none !important;
    max-width: 100% !important; box-sizing: border-box !important; text-indent: 0 !important; margin-inline: 0 !important; }
  .vf-showcase .vf-name, .vf-showcase .vf-followers { height: auto !important; max-height: none !important; overflow: visible !important; text-indent: 0 !important; }
  .vf-showcase .vf-name { display: block !important; }
  .vf-showcase .vf-followers { display: inline-block !important; }
  /* The text itself: never smaller than 12px whatever size the creator gives its parent (1em = the parent's size). */
  .vf-showcase .vf-name .vf-t, .vf-showcase .vf-followers .vf-t { display: inline !important; visibility: visible !important; opacity: 1 !important;
    font-size: max(12px, 1em) !important; position: static !important; transform: none !important; filter: none !important; clip-path: none !important;
    mask: none !important; text-indent: 0 !important; letter-spacing: inherit !important; }
  .vf-showcase .vf-name .vf-t::before, .vf-showcase .vf-name .vf-t::after, .vf-showcase .vf-followers .vf-t::before, .vf-showcase .vf-followers .vf-t::after { content: none !important; }
  .vf-showcase .vf-avatar { display: inline-flex !important; min-width: 40px !important; min-height: 40px !important; max-height: 400px !important; overflow: hidden !important; padding: 0 !important; }
  .vf-showcase .vf-avatar img { display: block !important; visibility: visible !important; opacity: 1 !important; width: 100% !important; height: 100% !important;
    filter: none !important; transform: none !important; clip-path: none !important; mask: none !important; position: static !important; }
  .vf-showcase .vf-avatar::before, .vf-showcase .vf-avatar::after, .vf-showcase .vf-name::before, .vf-showcase .vf-name::after,
  .vf-showcase .vf-followers::before, .vf-showcase .vf-followers::after, .vf-showcase .vf-pf::before, .vf-showcase .vf-pf::after { pointer-events: none !important; z-index: 0 !important; }
  /* The Mod pill next to the name (style.css .mod-pill, owner 2026-11-29): always shown as the site draws it. Fixed
     Velvet colours here, because a design can redefine the theme colours (--accent, --text) inside the showcase. */
  .vf-showcase .vf-name .vf-mod { display: inline-block !important; visibility: visible !important; opacity: 1 !important; position: relative !important;
    z-index: 2 !important; inset: auto !important; transform: none !important; translate: none !important; rotate: none !important; scale: none !important;
    zoom: 1 !important; filter: none !important; clip-path: none !important; mask: none !important; float: none !important;
    width: auto !important; height: auto !important; max-width: none !important; max-height: none !important; overflow: visible !important;
    margin: 0 0 0 8px !important; padding: 2px 7px !important; text-indent: 0 !important; vertical-align: middle !important;
    font: 700 11px/1.3 system-ui, sans-serif !important; letter-spacing: .6px !important; text-transform: uppercase !important;
    color: #f2e6d6 !important; -webkit-text-fill-color: #f2e6d6 !important; background: #7d1d3f !important; border: 1px solid #c9a54c !important;
    border-radius: 10px !important; box-shadow: none !important; text-shadow: none !important; white-space: nowrap !important; }
  .vf-showcase .vf-name .vf-mod::before, .vf-showcase .vf-name .vf-mod::after { content: none !important; }
  /* Page Studio designs (STUDIO.md, profileshow.js studioHeader): the header's text column and the creator box above
     the header. Restyleable, never hidden or moved out of the page. */
  .vf-showcase .vf-pf-who { display: flex !important; visibility: visible !important; opacity: 1 !important; position: relative !important; z-index: 2 !important;
    height: auto !important; max-height: none !important; overflow: visible !important; transform: none !important; clip-path: none !important; mask: none !important;
    filter: none !important; inset: auto !important; translate: none !important; rotate: none !important; scale: none !important; zoom: 1 !important; float: none !important;
    max-width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; }
  .vf-showcase .vf-pf-who::before, .vf-showcase .vf-pf-who::after { pointer-events: none !important; z-index: 0 !important; }
  /* Tall designs start folded at about two screens (owner's choice), like the card page's "Show more". */
  .vf-showcase .vf-creator.vf-pf-collapsed { max-height: 200vh !important; overflow: hidden !important;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 110px), transparent) !important; mask-image: linear-gradient(to bottom, #000 calc(100% - 110px), transparent) !important; }
}

/* ---- default look (creators can restyle all of this). Colours only from style.css tokens. ---- */
body[data-page="profile"] header, body[data-page="profile-preview"] header { background: var(--bg); }
.vf-showcase.vf-profile { margin: 0; border: none; border-radius: 0; background: none; }
.vf-showcase.vf-profile .vf-head { padding-top: 22px; padding-bottom: 8px; gap: 10px 28px; align-items: flex-start; }
/* Percentages like Chub's .ant-col-lg-6 / -18: when a creator turns the row into a column (Chub bios do),
   a percentage basis falls back to the content height, where a fixed one would squash the header. */
.vf-showcase.vf-profile .vf-side { flex: 0 0 25%; flex-direction: column; align-items: center; text-align: center; padding-top: 4px; }
.vf-showcase.vf-profile .vf-main { flex: 1 1 0%; min-width: 0; }
.vf-showcase .vf-pf { flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.vf-showcase .vf-avatar { width: 120px; height: 120px; border-radius: 50%; border: 2px solid var(--gold); background: var(--accent);
  align-items: center; justify-content: center; font-size: 48px; color: var(--text); }
.vf-showcase .vf-avatar img { object-fit: cover; }
.vf-showcase .vf-avatar img.vf-avatar-default { object-position: 50% 22%; }
.vf-showcase .vf-name { margin: 8px 0 0; font-size: 24px; font-weight: 600; color: var(--text); word-break: break-word; }
.vf-showcase .vf-handle { color: var(--muted); font-size: 13px; }
.vf-showcase .vf-bio { margin: 6px 0 0; color: var(--text); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.vf-showcase .vf-pf-stats { justify-content: center; gap: 4px 14px; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.vf-showcase .vf-pf-stats b { color: var(--text); }
.vf-showcase.vf-profile .vf-actions { justify-content: center; gap: 8px; }
.vf-showcase .vf-btn-follow { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.vf-showcase .vf-btn-follow:hover { color: var(--on-gold); opacity: .9; }
.vf-showcase .vf-btn-follow.vf-on { background: color-mix(in srgb, var(--panel) 60%, transparent); color: var(--text); border-color: var(--line-strong); }
.vf-showcase.vf-profile:not(.vf-has-notes) .vf-head { justify-content: center; }
.vf-showcase.vf-profile:not(.vf-has-notes) .vf-main { display: none; }
.vf-showcase .vf-empty-design { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 18px; color: var(--muted); text-align: center; }

/* The overlay's two pieces start as empty boxes in the layer (the design sizes and places them with top / right / bottom / left). */
.vf-overlay::before, .vf-overlay::after { position: absolute; }
/* The cards stay ours: a readable panel over the creator's page background. */
.pf-cards { max-width: 1200px; margin: 10px auto 0; padding: 4px 24px 120px; background: color-mix(in srgb, var(--bg) 72%, transparent); border-radius: 14px 14px 0 0; }
body[data-page="profile"] .cp-root { max-width: none; margin: 0; padding: 0; }

@media (max-width: 760px) {
  .vf-showcase.vf-profile .vf-side, .vf-showcase.vf-profile .vf-main { flex: 0 0 100%; }
  .vf-showcase .vf-avatar { width: 96px; height: 96px; font-size: 38px; }
  .pf-cards { padding: 4px 12px 90px; border-radius: 0; }
}

/* ---- the default look, when the creator has no design (profileshow.js head(); mockup profile-page-mockup.html).
   Not reachable by creator CSS (it isn't inside .vf-notes). Theme tokens only. ---- */
body.vf .pf-head { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 30px; align-items: start; max-width: 1200px; margin: 0 auto; padding: 28px 24px 4px; box-sizing: border-box; }
.pf-av-wrap { display: flex; justify-content: center; }
.pf-av { width: 190px; height: 190px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); background: var(--card); display: block;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--bg) 60%, transparent); }
.pf-av.vf-avatar-default { object-position: 50% 22%; }
.pf-who { min-width: 0; }
.pf-name { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 700; color: var(--text); overflow-wrap: anywhere; letter-spacing: 0; text-transform: none; }
.pf-handle { color: var(--muted); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
/* "Follows you": this creator follows the viewer (owner, 2026-11-24, mockup round 4) */
.pf-follows-you, .vf-showcase .vf-follows-you { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 999px; padding: 1px 9px; vertical-align: 1px; white-space: nowrap; }
.pf-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.pf-stats { display: flex; gap: 10px 24px; flex-wrap: wrap; margin: 14px 0; }
.pf-stat b { display: block; font-size: 20px; color: var(--text); line-height: 1.2; }
.pf-stat span { font-size: 12.5px; color: var(--muted); }
.pf-bio { margin: 10px 0 0; max-width: 760px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.pf-bio.open { display: block; -webkit-line-clamp: unset; }
body.vf .pf-bio-more { color: var(--gold); padding: 2px 0; margin-top: 2px; font-size: 14px; }

/* popups (⋯ menu, Tags; the editor's Change picture / Insert media): one open at a time (profileshow.js) */
.pf-pop { position: relative; display: inline-flex; }
.pf-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 260px; max-width: calc(100vw - 32px); padding: 6px; box-sizing: border-box;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.pf-acts .pf-menu { left: auto; right: 0; }
@media (max-width: 520px) { .pf-acts .pf-menu { right: auto; left: 0; } }
body.vf .pf-mi { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; background: none; color: var(--text);
  font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; border: none; }
.pf-mi b { display: block; font-size: 14px; font-weight: 500; }
.pf-mi span { display: block; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.35; margin-top: 2px; }
body.vf .pf-mi:hover, body.vf .pf-mi:focus-visible { background: color-mix(in srgb, var(--accent) 40%, var(--panel)); color: var(--gold); outline: none; opacity: 1; }
body.vf .pf-mi.danger { color: var(--danger); }
.pf-mlabel { padding: 6px 10px 2px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.pf-msep { height: 1px; margin: 4px 6px; background: var(--line); }

/* tabs, filters, Featured */
.pf-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }
body.vf .pf-tab { padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--muted); font-size: 14px;
  font-weight: 500; letter-spacing: 0; text-transform: none; }
body.vf .pf-tab:hover { color: var(--gold); opacity: 1; }
body.vf .pf-tab.on { background: color-mix(in srgb, var(--accent) 55%, var(--card)); color: var(--gold); border-color: var(--gold); }
.pf-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
body.vf .pf-filters .pf-q { flex: 1 1 220px; min-width: 0; width: auto; margin: 0; }
body.vf .pf-filters select { width: auto; flex: none; margin: 0; padding: 10px 12px; }
body.vf .pf-fb { padding: 10px 14px; }
body.vf .pf-fb.on { border-color: var(--gold) !important; color: var(--gold); }
.pf-tags-panel { width: 280px; }
/* phones: the Tags panel opens across the whole filter row, so it never runs off the screen */
.pf-filters { position: relative; }
@media (max-width: 520px) { .pf-filters .pf-pop { position: static; } .pf-tags-panel { left: 0; right: 0; width: auto; max-width: none; } }
body.vf .pf-tags-panel input[type="search"] { margin: 0 0 6px; padding: 8px 10px; }
.pf-tag-list { max-height: 280px; overflow-y: auto; overscroll-behavior: contain; }
body.vf label.pf-tag-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; margin: 0; border-radius: 6px; color: var(--text); font-size: 13px; cursor: pointer; }
.pf-tag-row:hover { background: color-mix(in srgb, var(--accent) 30%, var(--panel)); }
.pf-tag-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-tag-row i { font-style: normal; color: var(--muted); font-size: 12px; }
.pf-tag-row input { accent-color: var(--gold); width: 16px; height: 16px; margin: 0; flex: none; cursor: pointer; }
.pf-tags-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 6px; padding: 6px 4px 0; }
.pf-cap { color: var(--gold); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; }
.pf-featured { margin-bottom: 22px; }
.pf-feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
a.pf-fc { display: flex; min-width: 0; background: var(--card); border: 1px solid var(--gold); border-radius: 12px; overflow: hidden; color: var(--text); text-decoration: none; }
a.pf-fc:hover { opacity: 1; border-color: var(--gold-hi, var(--gold)); background: color-mix(in srgb, var(--accent) 20%, var(--card)); }
.pf-fc .card-cover { width: 96px; flex: none; }
.pf-fc-t { align-self: center; min-width: 0; padding: 8px 12px; }
.pf-fc-t b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.pf-fc-t span { display: block; font-size: 12px; color: var(--muted); }

@media (max-width: 800px) {
  body.vf .pf-head { grid-template-columns: 1fr; gap: 16px; padding: 20px 12px 0; }
  .pf-av-wrap { justify-content: flex-start; }
  .pf-av { width: 140px; height: 140px; }
  .pf-feat { grid-template-columns: 1fr; }
  .pf-fc .card-cover { width: 80px; }
}

/* pen names (src/pennames.js) */
.pf-pen-note { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }

/* ---- Page Studio designs: the header where the creator put it (profileshow.js studioHeader, STUDIO.md) ---- */
.vf-showcase.vf-profile .vf-head.vf-ps { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; }
.vf-showcase.vf-profile .vf-head.vf-ps > .vf-creator-top, .vf-showcase.vf-profile .vf-head.vf-ps > .vf-main { flex: none; width: 100%; }
.vf-showcase.vf-profile .vf-head.vf-ps > .vf-side { flex: none; padding-top: 14px; }
.vf-showcase .vf-ps .vf-pf { align-items: center; }
.vf-showcase .vf-ps .vf-pf-who { flex-direction: column; align-items: center; gap: 4px; }
.vf-showcase .vf-ps .vf-pf-who .vf-actions { justify-content: center; }
.vf-showcase .vf-ps-side .vf-pf { flex-direction: row; justify-content: center; gap: 12px 26px; text-align: left; }
.vf-showcase .vf-ps-side .vf-pf-who { align-items: flex-start; }
.vf-showcase .vf-ps-side .vf-pf-stats, .vf-showcase .vf-ps-side .vf-pf-who .vf-actions { justify-content: flex-start; }
.vf-showcase.vf-profile .vf-head.vf-ps-column { flex-direction: row; flex-wrap: wrap; align-items: flex-start; column-gap: 18px; }
.vf-showcase.vf-profile .vf-head.vf-ps-column > .vf-creator-top { flex: 0 0 100%; }
.vf-showcase.vf-profile .vf-head.vf-ps-column > .vf-side { flex: 0 0 220px; }
.vf-showcase.vf-profile .vf-head.vf-ps-column > .vf-main { flex: 1 1 0%; width: auto; min-width: 0; }
.vf-showcase .vf-ps-column .vf-avatar { width: 96px; height: 96px; }
@media (max-width: 700px) {
  .vf-showcase.vf-profile .vf-head.vf-ps-column { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .vf-showcase.vf-profile .vf-head.vf-ps-column > .vf-side, .vf-showcase.vf-profile .vf-head.vf-ps-column > .vf-main { flex: none; width: 100%; }
  .vf-showcase .vf-ps-side .vf-pf { flex-direction: column; text-align: center; }
  .vf-showcase .vf-ps-side .vf-pf-who { align-items: center; }
  .vf-showcase .vf-ps-side .vf-pf-stats, .vf-showcase .vf-ps-side .vf-pf-who .vf-actions { justify-content: center; }
}
.pf-name .pf-mod { margin-left: 10px; font-size: 11px; vertical-align: 6px; }
