/* A full portrait and a separate reading column, both composed for their viewport. */
html:has(.character-showcase){scroll-padding-top:calc(var(--header-height,78px) + 12px);scroll-padding-bottom:calc(var(--phone-nav-height,0px) + 16px)}
.character-showcase{max-width:1200px;margin:auto;padding:24px 28px 48px;min-width:0;--profile-accent:#d6b2e9}
.character-showcase.simple{--profile-accent:#b8d9cd}
.showcase-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.showcase-toolbar>.showcase-back{margin-right:auto}
.character-showcase .button{font-size:.6875rem;line-height:1.5;min-height:2rem;padding:6px 10px;font-weight:400;letter-spacing:0}
.showcase-toolbar>.showcase-back{padding-left:0}
.showcase-toolbar .character-visibility{gap:7px;font-size:.625rem;margin:0}
.showcase-toolbar .visibility-switch{position:relative;width:38px;min-width:38px;height:24px;min-height:24px;padding:3px}
.showcase-toolbar .visibility-switch>span{width:16px;height:16px}
.showcase-toolbar .visibility-switch[aria-checked=true]>span{transform:translateX(14px)}
.profile-share{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.profile-share svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.6;flex:none}
.profile-stage{display:grid;grid-template-columns:minmax(0,42%) minmax(0,1fr);align-items:start;gap:28px;min-width:0;position:relative;padding:20px;border:1px solid #4e375c;border-radius:20px;background:radial-gradient(ellipse at 8% 5%,#58316b2b,transparent 60%),linear-gradient(135deg,#1c1423,#100d15 75%)}
.showcase-visual{position:sticky;top:calc(var(--header-height,78px) + 16px);align-self:start;min-width:0}
.showcase-portrait{position:relative;width:100%;min-width:0;height:min(700px,calc(100dvh - var(--header-height,78px) - 64px));background:radial-gradient(ellipse at center,#46274c50,transparent 70%)}
.showcase-portrait>.showcase-image{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 24%;border-radius:12px;mask-image:none;-webkit-mask-image:none}
.showcase-portrait>.showcase-image[hidden],.profile-portrait-fallback[hidden]{display:none}
.profile-portrait-fallback{aspect-ratio:4/5;max-height:calc(100dvh - var(--header-height,78px) - var(--phone-nav-height,0px) - 100px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#c6a9d6;border:1px solid #73508744;border-radius:12px;background:radial-gradient(ellipse at 50% 40%,#9e6fb91f,transparent 70%)}
.profile-portrait-fallback>svg{width:30%;max-height:50%;fill:#ab7bc21a;stroke:#ad87c5;stroke-width:1}
.profile-portrait-fallback>span{font-size:.625rem;line-height:1.5;padding-inline:8px;text-align:center}
.quasar-watermark>svg{display:block;width:100%;height:auto}
.showcase-portrait>.quasar-watermark{position:absolute;left:12px;bottom:18px;width:148px;max-width:55%;height:auto;opacity:.85;filter:drop-shadow(0 2px 3px #000) drop-shadow(0 0 3px #000b)}
.character-showcase .showcase-change-portrait{display:inline-flex;align-items:center;gap:5px;width:auto;margin:0;padding:4px 0;border:0;border-radius:0;background:none;color:#c7afd6;font:400 .5625rem/1.6 Rubik,sans-serif;cursor:pointer}
.character-showcase .showcase-change-portrait:hover{color:#f2e5fa}
.profile-details{position:relative;z-index:1;min-width:0;padding:8px 0 0}
.character-showcase .eyebrow{display:block;margin:0;font-family:'Space Mono',monospace;font-size:.5625rem;line-height:1.6;font-weight:400;letter-spacing:.12em;color:#c2a9d1;text-transform:uppercase}
.showcase-intro h1{margin:12px 0 0;font-size:2.375rem;line-height:1.12;letter-spacing:-.035em;font-weight:500;color:#f9eefc;overflow-wrap:anywhere}
.showcase-intro>.showcase-hook{margin:18px 0 0;font-size:.9375rem;line-height:1.65;color:var(--profile-accent);white-space:pre-line;overflow-wrap:anywhere}
.showcase-overview{margin-top:20px;padding-bottom:24px}
.showcase-overview p{font-size:.8125rem;line-height:1.8;color:#d0bdd9;white-space:pre-line;overflow-wrap:anywhere;margin:0}
.showcase-prose{margin-top:8px;border-top:1px solid #65447366}
.profile-detail{border-bottom:1px solid #65447366;min-width:0}
.profile-detail>summary{display:grid;grid-template-columns:22px minmax(0,1fr) 16px;align-items:center;gap:10px;padding:18px 0;min-height:54px;cursor:pointer;list-style:none}
.profile-detail>summary::-webkit-details-marker{display:none}
.profile-detail-index{font:.5625rem/1.5 'Space Mono',monospace;color:#ad96bd}
.profile-detail h2{font-size:.8125rem;line-height:1.5;font-weight:450;letter-spacing:0;color:#ebdff2;margin:0;overflow-wrap:anywhere}
.profile-detail-symbol{font:400 1.125rem/1 'Rubik',sans-serif;color:var(--profile-accent);text-align:center;transition:transform .2s}
.profile-detail[open] .profile-detail-symbol{transform:rotate(45deg)}
.profile-detail[open]>summary{padding-bottom:12px}
.profile-detail-content{padding:0 26px 20px 32px}
.profile-detail p,.showcase-author p{font-size:.8125rem;line-height:1.8;color:#d0bdd9;white-space:pre-line;overflow-wrap:anywhere;margin:0}
.showcase-author{padding:18px 0 0;margin-top:22px;min-width:0}
.showcase-author p{margin-top:10px}
.showcase-author a{color:#d997f7;overflow-wrap:anywhere}
.creator-notes{margin:12px 0 22px;padding:12px 14px;border:1px solid #684c7950;border-radius:9px;background:#110d1666}
.creator-notes-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.creator-notes h2{margin:0;color:#dac8e5;font-size:.625rem;line-height:1.6;font-weight:450}
.creator-notes .creator-notes-copy{max-height:8rem;overflow:auto;overscroll-behavior:auto;scrollbar-width:thin;margin:8px 0 0;font-size:.6875rem;line-height:1.75;overflow-wrap:anywhere}
.creator-edit-label{display:inline-flex;align-items:center;gap:5px;color:#c5a5d8;font-size:.5625rem!important;min-height:24px!important;padding:0!important}
.creator-edit-label>span{font-size:.875rem;transition:transform .2s}.creator-edit-label[aria-expanded=true]>span{transform:rotate(45deg)}
.profile-created{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;min-height:28px;color:#9a889f;font-size:.5625rem;line-height:1.6}
.profile-badges{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;font-size:.5625rem;line-height:1.6;color:#c2a9d1}
.profile-genre{border-left:1px solid #735a8060;padding-left:12px}
.profile-archetype{position:relative;min-width:0;max-width:100%;border-left:1px solid #735a8060;padding-left:12px}
.profile-archetype>summary{display:inline-flex;align-items:center;gap:6px;cursor:pointer;list-style:none;overflow-wrap:anywhere}.profile-archetype>summary::-webkit-details-marker{display:none}
.profile-archetype-info{position:absolute;z-index:4;top:calc(100% + 8px);right:0;width:min(300px,75vw);max-height:220px;overflow:auto;padding:14px;border:1px solid #775187;border-radius:9px;background:#211629;box-shadow:0 10px 30px #0007}
.profile-archetype-info p{font-size:.6875rem;line-height:1.75;margin:0;color:#d0bdd9;overflow-wrap:anywhere}
.showcase-portrait>.portrait-like-layer{border-radius:12px}
.showcase-portrait .profile-like{right:8px;left:auto;top:8px;min-width:30px;height:30px}
.showcase-portrait .profile-like svg{width:16px;height:16px}
.showcase-portrait .profile-like small{font-size:.625rem}
.creator-link-editor{padding:12px 0 0}
.creator-link-editor label{display:block;font-size:.6875rem;line-height:1.6;color:#cfbadb;margin:0 0 8px}
.creator-link-editor textarea{display:block;width:100%;min-width:0;min-height:5rem;padding:10px;background:#0f0b13;color:#f2e5f9;border:1px solid #78508a;border-radius:8px;font:400 .75rem/1.65 'Rubik',system-ui,sans-serif;resize:vertical}
.creator-link-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:10px}
.creator-link-actions small{font-size:.625rem;line-height:1.6;color:#bda3c9}
.character-showcase :is(button,a,summary,textarea):focus-visible{outline:2px solid #d5a2ed;outline-offset:3px}
.public-profile-modal .character-showcase{padding:8px 0 0}
@media(min-width:601px) and (max-width:900px){.profile-stage{grid-template-columns:minmax(0,15rem) minmax(0,1fr);gap:24px;padding:20px}.showcase-intro h1{font-size:2rem}}
@media(max-width:600px){
 .character-showcase{padding:12px 12px 28px}
 .showcase-toolbar{gap:8px;margin-bottom:14px}
 .character-showcase .button{font-size:.625rem;min-height:2rem;padding:6px 8px;border-radius:7px}
 .showcase-toolbar>.showcase-back{width:auto;justify-content:flex-start;padding-left:0}
 .showcase-toolbar .character-visibility{font-size:.5625rem;gap:5px;margin-left:auto}
 .profile-share{gap:5px}
 .profile-share svg{width:12px;height:12px}
 .profile-stage{grid-template-columns:minmax(0,1fr);gap:18px;padding:14px 12px;border-radius:13px}
 .showcase-visual{position:relative;top:auto}.showcase-portrait{width:100%;height:clamp(240px,52dvh,430px)}
 .showcase-portrait>.showcase-image{border-radius:7px;mask-image:none;-webkit-mask-image:none}
 .showcase-portrait>.quasar-watermark{left:8px;bottom:14px;width:120px;max-width:50%}
 .character-showcase .showcase-change-portrait{font-size:.5rem;line-height:1.6;margin:0;min-height:28px;padding:4px 0}.showcase-portrait>.portrait-like-layer{border-radius:7px}.profile-badges{font-size:.5rem;gap:7px}.profile-created{font-size:.5rem}.profile-archetype-info{left:0;right:auto}
 .profile-portrait-fallback{gap:6px;border-radius:7px}
 .profile-portrait-fallback>span{font-size:.5rem}
 .profile-details{padding-top:2px}
 .character-showcase .eyebrow{font-size:.5rem;letter-spacing:.1em;line-height:1.6}
 .showcase-intro h1{font-size:1.5rem;line-height:1.18;margin-top:9px;letter-spacing:-.025em}
 .showcase-intro>.showcase-hook{font-size:.75rem;line-height:1.65;margin-top:14px}
 .showcase-overview{margin-top:14px;padding-bottom:16px}
 .showcase-overview p,.profile-detail p,.showcase-author p{font-size:.75rem;line-height:1.75}
 .showcase-prose{margin-top:4px}
 .profile-detail>summary{grid-template-columns:14px minmax(0,1fr) 12px;gap:6px;padding:14px 0;min-height:46px}
 .profile-detail-index{font-size:.5rem}
 .profile-detail h2{font-size:.6875rem;line-height:1.5}
 .profile-detail-symbol{font-size:1rem}
 .profile-detail-content{padding:0 0 16px 20px}
 .showcase-author{margin-top:18px}
 .owner-links>summary{padding:10px;font-size:.625rem}
 .creator-edit-label{font-size:.5625rem;gap:5px}
 .creator-link-editor{padding:12px 0 0}
 .creator-link-editor label{font-size:.625rem}
 .creator-link-editor textarea{font-size:.75rem}
}
@media(max-width:360px){.profile-stage{padding:12px 10px;gap:10px}.showcase-intro h1{font-size:1.3125rem}}
@media(prefers-reduced-motion:reduce){.creator-edit-label>span,.profile-detail-symbol{transition:none}}

.profile-creator-link{font:inherit;color:#bba0cb;text-decoration:none}.profile-creator-link:hover{color:#ebc8f8}.profile-created>.showcase-change-portrait{font-size:inherit;line-height:inherit;min-height:24px;align-self:center}

/* Gallery profiles float above their unchanged originating page. */
.gallery-profile-dialog{box-sizing:border-box;width:min(1160px,calc(100vw - 64px));max-width:none;max-height:calc(100dvh - 64px);margin:auto;padding:18px 24px 28px;border:1px solid #665073;border-radius:22px;background:#110d16;color:#f9eefc;box-shadow:0 28px 100px #000b;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#725481 #110d16}
.gallery-profile-dialog::backdrop{background:#060409a8;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.gallery-profile-dialog .character-showcase{padding:0;max-width:none}
.gallery-profile-dialog .showcase-visual{top:0}
.gallery-profile-dialog .showcase-portrait{height:min(660px,calc(100dvh - 190px))}
.profile-archetype>summary{color:#fff}
.profile-archetype>summary>svg{display:block;flex:none;align-self:center}
.profile-portrait-zoom{position:absolute;inset:0;z-index:1;width:100%;height:100%;padding:0;border:0;border-radius:12px;background:transparent;cursor:zoom-in}
.showcase-portrait:has(.showcase-image[hidden])>.profile-portrait-zoom{display:none}
.showcase-portrait>.profile-like{z-index:2}
.portrait-lightbox{box-sizing:border-box;width:min(88vw,82dvh)!important;max-height:90dvh;padding:0!important;margin:auto;border:1px solid #705080;border-radius:14px;color:#fff;box-shadow:0 20px 90px #000b;background:#0b0b0b}
.portrait-lightbox::backdrop{background:#050308c7;backdrop-filter:blur(6px)}
.portrait-lightbox .zoom-viewport{box-sizing:border-box;display:block;width:100%;height:auto!important;aspect-ratio:1;overflow:auto;overscroll-behavior:contain;padding:0;border:0;border-radius:0;background:#09070b;touch-action:none}
.portrait-lightbox .zoom-canvas{margin:auto;flex-shrink:0}
.portrait-lightbox .zoom-canvas img{display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none}
.portrait-lightbox .is-zoomed{cursor:grab}.portrait-lightbox .is-dragging{cursor:grabbing}
.portrait-lightbox .modal-close{position:absolute;z-index:3;top:10px;right:10px;display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid #ac8dbc88;border-radius:50%;background:#160f20d9;color:#fff;font:24px/1 sans-serif;cursor:pointer}
.portrait-lightbox :focus-visible{outline:2px solid #d5a2ed;outline-offset:-3px}
@media(max-width:600px){.gallery-profile-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 24px);padding:12px 10px 16px;border-radius:16px}.gallery-profile-dialog .showcase-portrait{height:clamp(220px,46dvh,390px)}.gallery-profile-dialog .showcase-toolbar{gap:7px}.gallery-profile-dialog .showcase-visual{position:relative;top:auto}.portrait-lightbox{width:94vw!important}}
