/* R3.9 paper portrait finish. Original paired artwork, vacancy maps, individual character faces and retained motion remain authoritative. */
body.homepage-remaster #categories.scene--categories { position:relative; isolation:isolate; overflow:hidden; min-height:0; padding:64px 0 48px; color:var(--sfw-dark-text); background:var(--sfw-panel-dark); box-shadow:var(--sfw-rim-dark); }
#categories.scene--categories .category-backdrop { display:none; }
body.homepage-remaster #categories.scene--categories>.category-layout { display:grid; grid-template-columns:minmax(220px,.7fr) minmax(0,2fr); align-items:center; gap:clamp(24px,3vw,48px); width:min(var(--site-width),calc(100% - 2 * var(--site-rail-gutter))); max-width:var(--site-width); min-height:0; margin:0 auto; padding:0; }
#categories.scene--categories .archive-context,#categories.scene--categories .archive-copy,#categories.scene--categories .category-panel,#categories.scene--categories .category-swap-group,#categories.scene--categories .archive-stage { position:relative; inset:auto; transform:none; min-width:0; }
#categories.scene--categories .archive-context { display:block; padding:0; width:auto; }
#categories.scene--categories .archive-copy { display:block; max-width:360px; margin:0; padding:0; }
#categories.scene--categories .archive-copy .eyebrow { display:flex; align-items:center; gap:12px; color:var(--r5-rose); font:600 11px/1.5 var(--font-sans); letter-spacing:.12em; text-transform:uppercase; margin:0 0 28px; }
#categories.scene--categories .archive-copy .eyebrow::before { content:''; width:36px; height:28px; background:url('../assets/sweet-goth-r2-1/sfw-petal-ribbon.svg') center/contain no-repeat; }
#categories.scene--categories #category-heading { color:var(--sfw-dark-text); font:400 clamp(38px,3.8vw,56px)/1.06 var(--font-label,"SFW Marcellus",serif); letter-spacing:-.045em; margin:0 0 28px; max-width:9ch; text-wrap:balance; }
#categories.scene--categories #category-description { color:var(--sfw-dark-muted); font:400 15px/1.8 var(--font-sans); max-width:29ch; margin:0; }
#categories.scene--categories .creator-story { display:grid;grid-template-columns:1fr 2fr;gap:8px 32px;width:min(var(--site-width),calc(100% - 2 * var(--site-rail-gutter)));margin:24px auto 0;padding:20px 0 0;color:var(--sfw-dark-muted);border-top:1px solid var(--sfw-dark-border,#36373D);background:transparent; }
#categories.scene--categories .creator-story h2{ grid-column:1;grid-row:2;color:var(--r5-paper);font:600 30px/1.2 "SFW Dancing Script",cursive;margin:0; }
#categories.scene--categories .creator-story p { grid-column:2;grid-row:1/3;align-self:center;max-width:70ch;font:400 15px/1.7 var(--font-sans);color:var(--sfw-dark-muted);margin:0; }
#categories.scene--categories .creator-story .eyebrow { grid-column:1;grid-row:1;color:var(--r5-rose);font:600 10px/1.5 var(--font-sans);letter-spacing:.12em; }
#categories.scene--categories .category-emblem,#categories.scene--categories .category-rail-wrap,#categories.scene--categories .category-tabs { display:none; }
#categories.scene--categories .category-panel { background:none; border:0; box-shadow:none; border-radius:0; width:100%; margin:0; padding:0; overflow:visible; }
#categories.scene--categories .category-swap-group { display:block; padding:0; width:100%; }
#categories.scene--categories .archive-stage { display:grid; gap:20px; width:100%; min-height:0; height:auto; padding:0; overflow:visible; }
#categories.scene--categories .archive-stage::before,#categories.scene--categories .archive-stage::after,#categories.scene--categories .character-plane::before,#categories.scene--categories .character-plane::after { display:none; }
#categories.scene--categories .archive-overview { position:relative; inset:auto; margin:0; padding:0; min-height:0; }
#categories.scene--categories .archive-overview__hint { margin:0; color:var(--sfw-dark-muted); font:400 13px/1.5 system-ui; letter-spacing:.04em; }
#categories.scene--categories #overview-card-stage { display:flex; align-items:start; gap:16px; position:relative; inset:auto; width:100%; height:auto; min-height:0; padding:3px 3px 14px; margin:0; overflow-x:auto; overflow-y:hidden; transform:none; scrollbar-width:none; scrollbar-color:var(--r5-rose) transparent; scroll-snap-type:x proximity; touch-action:pan-x pan-y; }
#categories.scene--categories .portrait-card,#categories.scene--categories .portrait-card+.portrait-card,#categories.scene--categories .portrait-card:hover,#categories.scene--categories .portrait-card:focus-visible { display:block; position:relative; inset:auto; flex:0 0 calc((100% - 48px)/4); width:calc((100% - 48px)/4); min-width:0; max-width:none; height:auto; aspect-ratio:auto; margin:0; padding:0; border:0; border-radius:0; background:none; color:var(--sfw-dark-text); box-shadow:none; opacity:1; filter:none; transform:none; translate:none; rotate:none; scale:none; visibility:visible; overflow:visible; cursor:pointer; transition:none; scroll-snap-align:start; }
#categories.scene--categories .portrait-card::before,#categories.scene--categories .portrait-card::after { display:none; }
#categories.scene--categories .portrait-card__image { display:block; position:relative; inset:auto; width:100%; height:auto; aspect-ratio:1/2; overflow:hidden; border:1px solid var(--sfw-dark-border,#36373D); border-radius:18px; background:var(--r5-ink); box-shadow:var(--sfw-rim-dark),var(--sfw-shadow-dark); transition:border-color .2s ease,box-shadow .2s ease; }
#categories.scene--categories .portrait-card__image::before,#categories.scene--categories .portrait-card__image::after { display:none; }
#categories.scene--categories .portrait-card__image img { display:block; position:relative; inset:auto; width:100%; height:100%; object-fit:contain; object-position:center; border:0; opacity:1; filter:none; transform:none; transition:transform .28s cubic-bezier(.2,.7,.2,1); }
#categories.scene--categories .portrait-card:hover .portrait-card__image img { transform:none; }
#categories.scene--categories .portrait-card[aria-selected=true] .portrait-card__image { outline:2px solid var(--r5-rose); outline-offset:2px; }
#categories.scene--categories .portrait-card:focus-visible { outline:2px solid var(--sfw-dark-text); outline-offset:4px; }
#categories.scene--categories .portrait-card__number,#categories.scene--categories .portrait-card__focus-mark { display:none; }
#categories.scene--categories .portrait-card__label { display:block; position:static; padding:13px 0 0; font-family:var(--character-name-font,var(--font-display)); font-weight:var(--character-name-weight,600); font-style:var(--character-name-style,normal); font-size:20px; line-height:1.2; font-synthesis:none; letter-spacing:0; white-space:normal; color:var(--sfw-dark-muted); background:none; opacity:1; transform:none; }
#categories.scene--categories .portrait-card[aria-selected=true] .portrait-card__label { color:var(--sfw-dark-text); }
#categories.scene--categories .portrait-card:hover .portrait-card__image { border-color:var(--sfw-accent); box-shadow:var(--sfw-rim-dark),0 8px 24px #00000030; }
#categories.scene--categories .portrait-card__fallback { display:none; }
#categories.scene--categories .portrait-card__image[data-image-state=fallback] .portrait-card__fallback { display:grid; height:100%; place-items:center; font:14px/1.5 system-ui; }
#categories.scene--categories .scene3-selector-controls { display:flex; align-items:center; justify-content:flex-end; gap:16px; position:relative; inset:auto; width:100%; margin:0; padding:0; }
#categories.scene--categories .scene3-selector-controls[hidden] { display:none; }
#categories.scene--categories .scene3-selector-control { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-width:44px; min-height:44px; padding:10px 16px; border:1px solid var(--sfw-dark-border,#36373D); border-radius:16px; color:var(--sfw-dark-text); background:transparent; font:500 14px/1.5 var(--font-sans); cursor:pointer; transition:background .2s,border-color .2s; box-shadow:none; }
#categories.scene--categories .scene3-selector-control:disabled { opacity:.35; cursor:default; }
#categories.scene--categories .scene3-selector-control:hover:not(:disabled) { background:var(--r5-raised); border-color:var(--r5-rose); }
#categories.scene--categories .scene3-selector-position { color:var(--sfw-dark-muted); font:400 14px/1.5 var(--font-sans); font-variant-numeric:tabular-nums; letter-spacing:.12em; min-width:72px; text-align:center; }
/* R2 focus: dominant original artwork, horizontal portraits below, then navigation. */
body.homepage-remaster #categories.scene--categories[data-archive-view=focus]>.category-layout { display:block; width:min(var(--site-width),calc(100% - 2 * var(--site-rail-gutter))); max-width:var(--site-width); }
#categories.scene--categories[data-archive-view=focus] .archive-context { display:none; }
#categories.scene--categories[data-archive-view=focus] .archive-stage { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto; gap:16px; align-items:start; }
#categories.scene--categories .character-focus { display:block; position:relative; inset:auto; grid-column:1; grid-row:1; width:100%; height:auto; min-height:0; padding:52px 0 0; margin:0; background:none; }
#categories.scene--categories .character-focus[hidden] { display:none; }
#categories.scene--categories .character-focus__visual { display:block; position:relative; inset:auto; width:100%; height:auto; max-height:none; aspect-ratio:1672/941; border:1px solid var(--sfw-dark-border,#36373D); border-radius:16px; overflow:hidden; background:var(--r5-ink); isolation:isolate; }
#categories.scene--categories .character-focus__visual::before,#categories.scene--categories .character-focus__visual::after { display:none; }
#categories.scene--categories #character-image { display:block; position:relative; inset:auto; width:100%; height:100%; max-width:none; max-height:none; min-height:0; object-fit:contain; object-position:center; transform:none; filter:none; }
#categories.scene--categories #character-image[hidden],#categories.scene--categories .character-focus__visual[hidden] { display:none; }
#categories.scene--categories .character-transition-echo { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; pointer-events:none; z-index:1; }
#categories.scene--categories .character-image-fallback { display:none; }
#categories.scene--categories .character-focus__visual[data-image-state=fallback] .character-image-fallback { display:grid; height:100%; place-items:center; font:16px/1.5 system-ui; }
#categories.scene--categories .character-focus__asset-state { display:none; }
#categories.scene--categories .character-focus__copy { position:absolute; inset:auto; left:var(--character-copy-x); top:var(--character-copy-y); width:var(--character-copy-width); height:auto; max-width:none; max-height:var(--character-copy-maxHeight); margin:0; padding:0; min-height:0; grid-area:auto; align-self:auto; justify-self:auto; border:0; border-radius:0; transform:none; translate:none; rotate:none; scale:none; background:none; color:var(--sfw-ink,#121315); z-index:2; pointer-events:auto; }
#categories.scene--categories .character-focus__meta { color:inherit; font:600 10px/1.4 system-ui; letter-spacing:.12em; text-transform:uppercase; margin:0 0 10px; }
#categories.scene--categories .character-focus__meta[hidden] { display:none; }
#categories.scene--categories #character-name { font-family:var(--character-name-font,var(--font-display)); font-weight:var(--character-name-weight,500); font-style:var(--character-name-style,normal); font-size:clamp(30px,2.9vw,42px); line-height:1.08; letter-spacing:-.02em; font-synthesis:none; color:inherit; margin:0 0 12px; text-wrap:balance; overflow-wrap:break-word; }
#categories.scene--categories #character-description { max-width:none; color:inherit; font-family:var(--character-intro-font,var(--font-sans)); font-weight:var(--character-intro-weight,400); font-style:var(--character-intro-style,normal); font-size:18px; line-height:1.35; font-synthesis:none; margin:0; }
#categories.scene--categories .character-focus__facts { display:none; }
#categories.scene--categories .character-focus[data-copy-placement=inside] #character-name { font-size:var(--character-copy-title-size,42px); }
#categories.scene--categories .character-focus[data-copy-placement=inside] #character-description { font-size:var(--character-copy-intro-size,18px); }
#categories.scene--categories .character-focus__details { margin-top:12px; padding:16px 20px; border:1px solid #D9CDD3; border-radius:12px; background:#FAF6F8; color:#484848; box-shadow:3px 3px 0 #EAD5DE; }
#categories.scene--categories .character-focus__details .character-focus__meta { color:#5c5c5c; font-size:12px; }
#categories.scene--categories .character-focus__long-description { max-width:76ch; margin:0; font:400 15px/1.65 var(--font-sans); color:#484848; }
/* The owner's new Cocoa scene reserves dark paper on its left. Text switches
   with the artwork, without adding an overlay or repainting the original. */
#categories.scene--categories .character-focus[data-copy-tone=light] .character-focus__copy { color:var(--sfw-dark-text); }
#categories.scene--categories .character-focus[data-copy-placement=outside] .character-focus__copy { position:relative; inset:auto; width:100%; max-width:none; max-height:none; margin:0; padding:20px; box-sizing:border-box; background:#fff; color:#242126; border-radius:0 0 16px 16px; }
#categories.scene--categories .character-focus[data-copy-placement=outside] #character-description { max-width:54ch; color:#484848; }
#categories.scene--categories .character-focus[data-copy-placement=outside] #character-name { font-size:clamp(30px,3vw,44px); }

#categories.scene--categories .archive-close,#categories.scene--categories .archive-back { display:inline-flex; align-items:center; justify-content:center; gap:10px; position:absolute; top:0; margin:0; min-height:44px; border:1px solid var(--sfw-dark-border,#36373D); border-radius:16px; color:var(--sfw-dark-text); background:transparent; font:500 14px/1.5 var(--font-sans); box-shadow:none; cursor:pointer; z-index:5; }
#categories.scene--categories .archive-close { right:0; left:auto; width:44px; padding:0; }
#categories.scene--categories .archive-close span { font-size:20px; line-height:1; }
#categories.scene--categories .archive-back { left:0; right:auto; padding:10px 16px; }
#categories.scene--categories .archive-close:hover,#categories.scene--categories .archive-back:hover { background:var(--r5-raised); border-color:var(--r5-rose); }
#categories.scene--categories[data-archive-view=focus] #overview-card-stage { grid-column:1; grid-row:2; flex-direction:row; align-items:start; justify-content:flex-start; gap:16px; margin-top:0; max-height:none; overflow-x:auto; overflow-y:hidden; padding:4px 4px 12px; scroll-snap-type:x proximity; }
#categories.scene--categories[data-archive-view=focus] .portrait-card { flex:0 0 clamp(92px,9vw,128px); width:clamp(92px,9vw,128px); min-width:0; }
#categories.scene--categories[data-archive-view=focus] .portrait-card__label { font-family:var(--character-name-font,var(--font-display));font-weight:var(--character-name-weight,600);font-size:16px;line-height:1.3;font-synthesis:none;padding-top:10px; }
#categories.scene--categories[data-archive-view=focus] .scene3-selector-controls { grid-column:1; grid-row:3; display:flex; justify-content:space-between; gap:12px; border-top:1px solid #545860; padding-top:14px; }
#categories.scene--categories[data-archive-view=focus] .scene3-selector-position { padding:0; }
#categories.scene--categories[data-archive-view=focus] .scene3-selector-control { padding:10px; }
#categories.scene--categories[data-archive-view=focus] .scene3-selector-control span:not([aria-hidden]) { display:inline; }
#categories.scene--categories[data-art-loading=true] .scene3-selector-position { opacity:.55; }
/* The duo fills the full art; its title belongs below the image, never over either face. */
#categories.scene--categories[data-composition=duo] .character-focus__copy { position:relative; inset:auto; width:100%; max-width:none; padding-top:24px; color:var(--sfw-dark-text); }
#categories.scene--categories[data-composition=duo] #character-name { margin:0; }
#categories.scene--categories[data-composition=duo] #character-description { color:#484848; }
@media (max-width:1100px) { #categories.scene--categories .portrait-card,#categories.scene--categories .portrait-card+.portrait-card,#categories.scene--categories .portrait-card:hover,#categories.scene--categories .portrait-card:focus-visible { flex-basis:calc((100% - 32px)/3); width:calc((100% - 32px)/3); } #categories.scene--categories[data-archive-view=focus] .portrait-card { flex:0 0 clamp(92px,9vw,128px); width:clamp(92px,9vw,128px); min-width:0; } }
@media (max-width:1000px) {
 body.homepage-remaster #categories.scene--categories { min-height:0; }
 body.homepage-remaster #categories.scene--categories>.category-layout { width:min(var(--site-width),calc(100% - 2 * var(--site-rail-gutter))); grid-template-columns:1fr; gap:32px; }
 #categories.scene--categories .archive-copy { display:block; max-width:none; }
 #categories.scene--categories .archive-copy>div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px 28px; max-width:none; align-items:end; }
 #categories.scene--categories .archive-copy>div>.eyebrow { grid-column:1 / -1; margin-bottom:0; }
 #categories.scene--categories #category-heading { grid-column:1; font-size:56px; margin-bottom:0; }
 #categories.scene--categories #category-description { grid-column:2; max-width:45ch; }
 body.homepage-remaster #categories.scene--categories[data-archive-view=focus]>.category-layout { width:min(var(--site-width),calc(100% - 2 * var(--site-rail-gutter))); }
 #categories.scene--categories[data-archive-view=focus] .archive-stage { display:grid; grid-template-columns:1fr; gap:24px; }
 #categories.scene--categories .character-focus { grid-column:1; grid-row:1; }
 #categories.scene--categories[data-archive-view=focus] #overview-card-stage { grid-column:1; grid-row:2; flex-direction:row; max-height:none; width:100%; margin:0; padding:3px 3px 12px; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x proximity; }
 #categories.scene--categories[data-archive-view=focus] .portrait-card { flex:0 0 104px; width:104px; }
 #categories.scene--categories[data-archive-view=focus] .scene3-selector-controls { grid-column:1; grid-row:3; display:flex; justify-content:flex-end; }
 #categories.scene--categories[data-archive-view=focus] .scene3-selector-control span:not([aria-hidden]) { display:inline; }
 #categories.scene--categories .character-focus__copy,#categories.scene--categories[data-composition=duo] .character-focus__copy { position:relative; inset:auto; display:block; width:100%; max-width:none; padding-top:22px; color:var(--sfw-dark-text); }
 #categories.scene--categories #character-description { color:var(--sfw-dark-text); max-width:48ch; }
 #categories.scene--categories #character-name { font-size:clamp(36px,6vw,60px); }
}
@media (max-width:600px) {
 #categories.scene--categories .creator-story{display:block} #categories.scene--categories .creator-story h2{margin:8px 0 12px} #categories.scene--categories #overview-card-stage::-webkit-scrollbar{display:none}
 body.homepage-remaster #categories.scene--categories { min-height:0; padding:56px 0 40px; }
 body.homepage-remaster #categories.scene--categories>.category-layout,body.homepage-remaster #categories.scene--categories[data-archive-view=focus]>.category-layout { width:min(var(--site-width),calc(100% - 2 * var(--site-rail-gutter))); }
 #categories.scene--categories .archive-copy { display:block; }
 #categories.scene--categories .archive-copy>div { display:block; }
 #categories.scene--categories .archive-copy>div>.eyebrow { margin-bottom:20px; }
 #categories.scene--categories #category-heading { font-size:46px; max-width:11ch; margin-bottom:20px; }
 #categories.scene--categories .portrait-card,#categories.scene--categories .portrait-card+.portrait-card,#categories.scene--categories .portrait-card:hover,#categories.scene--categories .portrait-card:focus-visible { flex-basis:calc((100% - 16px)/2); width:calc((100% - 16px)/2); }
 #categories.scene--categories .scene3-selector-controls { justify-content:space-between; gap:10px; }
 #categories.scene--categories .character-focus__copy,#categories.scene--categories[data-composition=duo] .character-focus__copy { position:relative; inset:auto; display:block; width:100%; max-width:none; padding-top:22px; color:var(--sfw-dark-text); }
 #categories.scene--categories #character-name { font-size:36px; margin-bottom:12px; }
 #categories.scene--categories #character-description { max-width:44ch; color:var(--sfw-dark-muted); font-size:15px; }
 #categories.scene--categories .character-focus__meta { color:var(--r5-rose); }
 #categories.scene--categories[data-archive-view=focus] .portrait-card { flex:0 0 88px; width:88px; }
}
@media (prefers-reduced-motion:reduce) { #categories.scene--categories .portrait-card__image,#categories.scene--categories .portrait-card__image img { transition:none; } #categories.scene--categories .portrait-card:hover .portrait-card__image img { transform:none; } }

/* Standalone public showcase: original wide artwork, live safe-region copy,
   a real horizontal selection rail, then navigation. */
body.character-showcase { --beauty-focus:var(--sfw-accent); --portrait-ink:var(--r5-ink); --portrait-paper:#fff; --portrait-pink:var(--sfw-accent); margin:0; min-height:100vh; color:var(--sfw-ink); background:var(--sfw-canvas); font-family:var(--font-sans); }
.character-showcase a { color:inherit; }
/* Character navigation uses the same public shell and Menu drawer as Help and Homes. */
.character-showcase .freeze-menu-button { display:none; position:fixed; top:12px; left:12px; z-index:750; }
.character-showcase .freeze-drawer { padding:0; overflow:auto; }
.character-showcase .showcase-footer.sfw-customer-footer { padding-inline:0; background:transparent; color:var(--sfw-muted); border-top-color:var(--sfw-border); }
.character-showcase .showcase-footer.sfw-customer-footer :is(a,.sfw-footer-brand) { color:var(--sfw-ink); }
.character-showcase .showcase-footer > p { margin:0; }
.character-showcase .showcase-footer > p:first-of-type { flex-basis:100%; }
@media(max-width:800px) { .character-showcase .freeze-menu-button { display:inline-flex; } }
.character-showcase main { box-sizing:border-box; width:min(var(--site-width),calc(100% - 2 * var(--site-gutter))); min-width:0; margin:0 auto; padding:48px 0; }
.character-showcase .showcase-intro { max-width:680px; margin-bottom:32px; }
.character-showcase .showcase-intro .eyebrow { color:#6b6b6b; font:500 12px/1.5 var(--font-sans); text-transform:uppercase; letter-spacing:.14em; }
.character-showcase h1 { color:var(--sfw-ink); font:400 clamp(42px,4.6vw,64px)/1.04 var(--font-editorial); font-synthesis:none; letter-spacing:-.025em; margin:16px 0; }
.character-showcase .showcase-intro > p:not(.eyebrow) { color:#515662; font:400 15px/1.65 var(--font-sans); }
.character-showcase #studio-portrait-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:32px 24px; }
.character-showcase .exhibition-card { display:block; min-width:0; }
.character-showcase .exhibition-card > a { display:block; padding:0; text-decoration:none; }
.character-showcase .r3-portrait-frame { display:block; overflow:hidden; width:100%; aspect-ratio:1/2; border:1px solid var(--sfw-border); padding:6px; border-radius:22px; background:var(--sfw-panel-light); box-shadow:var(--sfw-rim-light),var(--sfw-shadow); box-sizing:border-box; transition:border-color .2s ease,box-shadow .2s ease; }
.character-showcase .r3-portrait-frame img { display:block; width:100%; height:100%; object-fit:contain; border-radius:16px; transform:none; }
.character-showcase .exhibition-card > a:hover .r3-portrait-frame { border-color:var(--sfw-accent); box-shadow:var(--sfw-rim-light),var(--sfw-shadow-hover); }
.character-showcase .exhibition-card > a:focus-visible { outline:2px solid var(--r5-rose); outline-offset:4px; border-radius:22px; }
.character-showcase .exhibition-card-copy { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:14px; }
.character-showcase .exhibition-card-copy strong { font-family:var(--character-name-font,var(--font-editorial)); font-weight:var(--character-name-weight,400); font-style:var(--character-name-style,normal); font-size:26px; line-height:1.15; font-synthesis:none; overflow-wrap:anywhere; }
.character-showcase .exhibition-card-copy > span { color:#515662; font:400 14px/1.4 var(--font-sans); }
.character-showcase .portrait-editorial-mark { display:block; padding-top:8px; color:#6b6b6b; font:400 14px/1.4 var(--font-sans); }
.character-showcase .showcase-footer { margin-top:40px; padding-top:24px; border-top:1px solid #d9dce2; color:#515662; font:400 14px/1.65 var(--font-sans); }
.character-showcase #portrait-dialog { position:fixed; inset:24px; overflow:auto; overscroll-behavior:contain; width:min(1060px,calc(100vw - 48px)); max-width:none; max-height:calc(100dvh - 48px); padding:14px; margin:auto; border:1px solid #454549; border-radius:18px; background:var(--sfw-panel-dark); color:#fff; box-sizing:border-box; box-shadow:var(--sfw-rim-dark),0 24px 70px #00000045; }
.character-showcase #portrait-dialog[open] { display:grid; grid-template-columns:minmax(0,1fr); gap:0; }
.character-showcase #portrait-dialog:not([open]) { display:none; }
.character-showcase #portrait-dialog::backdrop { background:#121315cc; }
.character-showcase .portrait-dialog-controls { display:flex; justify-content:space-between; align-items:center; gap:16px; grid-column:1; margin:0; }
.character-showcase #portrait-dialog > .portrait-dialog-controls:first-child { grid-row:1; position:sticky; top:-14px; z-index:3; margin:-14px -14px 12px; padding:8px 14px; background:#171719; border-bottom:1px solid #454951; }
.character-showcase .portrait-step-controls{display:flex;align-items:center;justify-content:center;gap:12px}
.character-showcase .portrait-step-controls button{padding:8px;width:44px}
@media(max-width:600px){.character-showcase .portrait-dialog-controls{gap:8px}.character-showcase .portrait-step-controls{gap:7px}.character-showcase #portrait-back{padding:8px 10px}}
.character-showcase .portrait-dialog-controls button{ min-width:44px; min-height:44px; padding:10px 14px; border:1px solid #ffffff32; border-radius:12px; color:#f9f9fb; background:transparent; font:600 14px/1.4 var(--font-sans); cursor:pointer; }
.character-showcase .portrait-dialog-controls button:hover:not(:disabled) { border-color:var(--sfw-accent); background:var(--r5-raised); }
.character-showcase .portrait-dialog-controls button:disabled { color:#f9f9fb; background:transparent; border-color:#ffffff32; opacity:.4; cursor:default; }
.character-showcase #close-portrait { --sfw-close-position:static; --sfw-close-inset:auto; width:44px; padding:0; font-size:20px; }
.character-showcase #portrait-dialog-position { flex-shrink:0; color:#e5e7eb; font:400 14px/1.5 var(--font-sans); font-variant-numeric:tabular-nums; }
.character-showcase #portrait-dialog[data-art-loading=true] #portrait-dialog-position { opacity:.6; }
.character-showcase .portrait-scene { grid-column:1; grid-row:2; position:relative; min-width:0; }
.character-showcase .portrait-scene__visual { position:relative; width:100%; aspect-ratio:1672/941; overflow:hidden; border-radius:16px; }
.character-showcase #portrait-dialog-image { display:block; width:100%; height:100%; object-fit:contain; }
.character-showcase .portrait-scene__copy { position:absolute; inset:auto; left:var(--character-copy-x); top:var(--character-copy-y); width:var(--character-copy-width); height:auto; max-height:var(--character-copy-maxHeight); margin:0; padding:0; grid-area:auto; align-self:auto; justify-self:auto; transform:none; translate:none; rotate:none; scale:none; color:#1b1d23; z-index:2; }
.character-showcase .portrait-scene[data-copy-tone=light] .portrait-scene__copy { color:#f9f9fb; }
.character-showcase #portrait-dialog-title { font-family:var(--character-name-font,var(--font-editorial)); font-weight:var(--character-name-weight,400); font-style:var(--character-name-style,normal); font-size:clamp(36px,3.5vw,48px); line-height:1.04; letter-spacing:-.025em; font-synthesis:none; margin:0 0 10px; color:inherit; overflow-wrap:anywhere; }
body.character-showcase .portrait-scene[data-copy-placement=inside] #portrait-dialog-title { font-size:var(--character-copy-title-size,42px); }
body.character-showcase .portrait-scene[data-copy-placement=inside] .portrait-scene__subtitle { font-size:var(--character-copy-intro-size,18px); margin:0; }
.character-showcase .portrait-scene__details { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 24px; margin-top:12px; padding:18px 20px; border:1px solid #D9CDD3; border-radius:12px; background:#FAF6F8; color:#484848; }
.character-showcase .portrait-scene__details .portrait-scene__eyebrow { grid-column:1; margin:0; color:#5c5c5c; }
.character-showcase .portrait-scene__details #portrait-dialog-description { grid-column:1; margin:0; max-width:64ch; }
.character-showcase .portrait-scene__details #portrait-dialog-availability { grid-column:1; margin:0; padding:8px 0 0; color:#595959; }
.character-showcase .portrait-scene__details .portrait-collection-link { grid-column:2; grid-row:1/4; align-self:center; }
.character-showcase .portrait-load-status { padding:12px 16px; border:1px solid #D9CDD3; border-radius:12px; background:#fff; color:#484848; }
.character-showcase .portrait-scene__details .portrait-load-status { grid-column:1/-1; margin:0; }
.character-showcase .portrait-load-status[hidden] { display:none; }
.character-showcase .portrait-scene__eyebrow { display:flex; align-items:center; gap:12px; text-transform:uppercase; letter-spacing:.12em; font:500 12px/1.4 var(--font-sans); margin:0 0 10px; color:inherit; }
.character-showcase .portrait-scene__eyebrow::after { content:""; width:40px; height:1px; background:var(--sfw-accent); }
.character-showcase .portrait-scene__subtitle { font:italic 500 clamp(20px,1.8vw,23px)/1.22 "SFW Cormorant Garamond",Georgia,serif; font-synthesis:none; margin:0 0 10px; color:inherit; }
.character-showcase #portrait-dialog-description { max-width:none; color:inherit; font:400 15px/1.6 var(--font-sans); margin:0 0 12px; }
.character-showcase #portrait-dialog-availability { color:inherit; font:400 14px/1.5 var(--font-sans); margin:0 0 10px; padding-top:10px; border-top:1px solid #aeb2b940; }
.character-showcase .portrait-collection-link { display:inline-flex; align-items:center; min-height:44px; padding:9px 18px; border:1px solid #e4afc3; border-radius:12px; background:var(--sfw-control-rose); color:#1b1d23; font:500 14px/1.4 var(--font-sans); text-decoration:none; box-shadow:var(--sfw-rim-light); }
.character-showcase .portrait-scene[data-copy-placement=outside] .portrait-scene__copy { position:relative; inset:auto; width:100%; max-height:none; padding:22px; background:var(--sfw-panel-light); color:#1b1d23; border-radius:0 0 16px 16px; box-sizing:border-box; }
.character-showcase .portrait-scene[data-copy-placement=outside] #portrait-dialog-title { font-size:clamp(30px,3vw,44px); }
.character-showcase .portrait-scene[data-copy-placement=outside] #portrait-dialog-description { max-width:60ch; }
.character-showcase .portrait-dialog-rail { grid-column:1; grid-row:3; display:flex; flex-direction:row; gap:12px; max-height:none; overflow-x:auto; overflow-y:hidden; padding:12px 4px 10px; scrollbar-width:thin; scrollbar-color:var(--sfw-accent) transparent; }
.character-showcase .portrait-dialog-rail button { flex:0 0 clamp(92px,9vw,122px); min-width:0; border:0; padding:0; color:#e5e7eb; background:transparent; cursor:pointer; text-align:center; }
.character-showcase .portrait-dialog-rail img { display:block; width:100%; height:88px; object-fit:cover; object-position:center 20%; border:1px solid #454549; border-radius:10px; box-sizing:border-box; }
.character-showcase .portrait-dialog-rail button[aria-current=true] img { outline:2px solid var(--r5-rose); outline-offset:2px; }
.character-showcase .portrait-dialog-rail span { display:block; padding-top:7px; font:400 14px/1.3 var(--font-sans); }
/* Original collage pixels are the only backdrop for live scene copy.
   R3.9 removes the Ribbon Rose white pseudo-plane at its actual owner. */
#categories.scene--categories[data-archive-view=focus] .portrait-card__image { aspect-ratio:1/1.15; border-radius:10px; }
#categories.scene--categories[data-archive-view=focus] .portrait-card__image img { object-fit:cover; object-position:center 20%; }
#categories.scene--categories[data-archive-view=focus] .portrait-card__label { font:400 14px/1.3 var(--font-sans); text-align:center; }
#categories.scene--categories .character-focus,#categories.scene--categories .portrait-card,#categories.scene--categories .character-focus__copy { pointer-events:auto; }
@media (min-width:901px) and (max-width:1100px) { .character-showcase #studio-portrait-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:1000px) {
 .character-showcase #portrait-dialog { inset:12px; width:calc(100vw - 24px); max-height:calc(100dvh - 24px); }
 .character-showcase .portrait-scene__visual { aspect-ratio:1672/941; border-radius:12px 12px 0 0; }
 .character-showcase #portrait-dialog-image { object-fit:contain; object-position:center; }
 .character-showcase #portrait-dialog[data-composition=duo] .portrait-scene__visual { aspect-ratio:1672/941; }
 .character-showcase #portrait-dialog[data-composition=duo] #portrait-dialog-image { object-fit:contain; }
 .character-showcase .portrait-scene__copy,.character-showcase .portrait-scene[data-copy-placement=outside] .portrait-scene__copy { position:relative; inset:auto; width:100%; max-height:none; padding:18px; background:var(--sfw-panel-light); color:#1b1d23; border-radius:0 0 12px 12px; box-sizing:border-box; }
 .character-showcase #portrait-dialog-title,.character-showcase .portrait-scene[data-copy-placement=outside] #portrait-dialog-title,.character-showcase .portrait-scene[data-character-artwork] #portrait-dialog-title { font-size:36px; }
 .character-showcase .portrait-scene__subtitle { font-size:21px; margin-bottom:12px; }
 .character-showcase .portrait-scene__eyebrow { margin-bottom:10px; }
 .character-showcase #portrait-dialog-description { margin-bottom:12px; }
 .character-showcase #portrait-dialog-availability { padding-top:12px; margin-bottom:12px; }
 .character-showcase .portrait-dialog-rail button { flex-basis:78px; }
 .character-showcase .portrait-dialog-rail img { height:84px; }
 #categories.scene--categories #character-focus .character-focus__copy { background:var(--sfw-panel-light); color:#1b1d23; padding:20px; box-sizing:border-box; border-radius:0 0 16px 16px; }
 #categories.scene--categories #character-focus #character-name,#categories.scene--categories #character-focus #character-description { color:#1b1d23; }
 #categories.scene--categories #character-focus .character-focus__meta { color:#606060; }
}
@media(max-width:900px) { .character-showcase #studio-portrait-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px 20px; } }
@media(max-width:600px) {
 .character-showcase main { padding:32px 0; }
 .character-showcase #studio-portrait-grid { gap:26px 14px; }
 .character-showcase .exhibition-card-copy { display:block; }
 .character-showcase .exhibition-card-copy strong { font-size:23px; }
 .character-showcase .exhibition-card-copy > span { display:block; padding-top:8px; }
 .character-showcase .portrait-scene__details { display:block; padding:16px; }
 .character-showcase .portrait-scene__details .portrait-scene__eyebrow { margin-bottom:8px; }
 .character-showcase .portrait-scene__details #portrait-dialog-availability { margin:10px 0; }
 .character-showcase .portrait-scene__details .portrait-collection-link { display:flex; justify-content:space-between; }
 .character-showcase #portrait-dialog { padding:10px; }
 .character-showcase #portrait-dialog > .portrait-dialog-controls:first-child { top:-10px; margin:-10px -10px 10px; padding:8px 10px; }
 .character-showcase .portrait-dialog-controls { gap:8px; }
 .character-showcase .portrait-dialog-controls button{ padding:9px 10px; }
}

/* Character lettering keeps each original's voice, including the compact rail.
   The reading face is kept for price/status text and edition labels. */
body.homepage-remaster #categories.scene--categories[data-archive-view=focus] .portrait-card__label {
 font-family:var(--character-name-font,var(--font-display));
 font-weight:var(--character-name-weight,500);font-style:var(--character-name-style,normal);
 font-size:17px;line-height:1.2;letter-spacing:0;font-synthesis:none;
}
:is(#categories.scene--categories,.character-showcase) :is(#character-name,#portrait-dialog-title,.exhibition-card-copy>strong) {
 font-kerning:normal;font-variant-ligatures:common-ligatures;text-rendering:optimizeLegibility;
}
:is(#categories.scene--categories,.character-showcase) [data-name-font="SFW Dancing Script"] :is(#character-name,#portrait-dialog-title,.exhibition-card-copy>strong) {
 line-height:1.12;letter-spacing:0;
}
:is(#categories.scene--categories,.character-showcase) [data-name-font="SFW Cinzel Decorative"] :is(#character-name,#portrait-dialog-title,.exhibition-card-copy>strong) {
 letter-spacing:.015em;
}
body.homepage-remaster #categories .portrait-card__price {
 display:block;min-height:2.6em;margin-top:6px;color:#e8d5e0;
 font:500 11px/1.3 var(--font-sans);letter-spacing:0;
}
:is(#categories.scene--categories,.character-showcase) .character-price-line {
 display:block;margin:12px 0;color:#616161;font:600 13px/1.5 var(--font-sans);letter-spacing:.015em;
}
:is(#categories.scene--categories,.character-showcase) .character-price-line[data-character-price-state="listed"] {
 color:#454545;font-size:17px;font-variant-numeric:tabular-nums;
}

/* v44: the portrait chapter is one light scrapbook spread. Artwork, card
   geometry and the original per-character lettering remain untouched. */
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories.scene--categories {
 --portrait-chapter-ink:#38333a;
 --portrait-chapter-muted:#71636d;
 padding-block:clamp(50px,5vw,72px) 42px!important;
 color:var(--portrait-chapter-ink)!important;
 background-color:#fff9fc!important;
 background-image:linear-gradient(#f4c6d838 1px,transparent 1px),linear-gradient(90deg,#f4c6d838 1px,transparent 1px)!important;
 background-size:24px 24px!important;
 border-block:1px solid #f0c6d8!important;
 box-shadow:none!important;
}
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories[data-archive-view="overview"] .archive-context {
 padding-bottom:24px!important;margin-bottom:22px!important;border-bottom-color:#efc7d9!important;
}
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories[data-archive-view="overview"] .archive-context::after {
 width:88px;height:4px;background:#ff90b8!important;
}
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories :is(#category-heading,.portrait-card__label) {
 color:var(--portrait-chapter-ink)!important;text-shadow:none!important;
}
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories :is(#category-description,.portrait-card__price,.archive-copy .eyebrow) {
 color:var(--portrait-chapter-muted)!important;
}
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories .archive-overview__hint {
 color:var(--portrait-chapter-muted)!important;border-bottom-color:#edc9d8!important;
 margin-bottom:12px!important;padding-block:3px 11px!important;
}
/* The creator's note shares this light chapter, including its outside labels. */
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories .creator-story--postcard {
 color:var(--portrait-chapter-muted)!important;border-top-color:#efc7d9!important;
}
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories .creator-story--postcard :is(.studio-letter__heading .eyebrow,.studio-letter__edition) {
 color:var(--portrait-chapter-muted)!important;
}
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories .creator-story--postcard #creator-story-title {
 color:var(--portrait-chapter-ink)!important;
}
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories .creator-story--postcard::before,
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories .creator-story--postcard .studio-letter__heading .eyebrow::before {
 background:#ff90b8!important;
}
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories .scene3-selector-controls {
 justify-content:center!important;gap:18px!important;
 margin-top:2px!important;padding-top:16px!important;
 border-top:1px solid #edc9d8!important;
}
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories :is(.scene3-selector-control,.archive-back,.archive-close) {
 min-height:44px;color:#38333a!important;background:#ff90b8!important;
 border:1px solid #f58aaf!important;border-radius:13px!important;
 box-shadow:0 3px 0 #f7d1e1!important;
 font-weight:600;
}
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories .scene3-selector-position {
 display:grid;place-items:center;min-width:78px;min-height:42px;
 padding:5px 10px;box-sizing:border-box;
 color:#54444e!important;background:#fffdfd!important;
 border-bottom:2px solid #ff90b8;border-radius:6px;
 font:600 13px/1.4 var(--font-sans,system-ui);font-variant-numeric:tabular-nums;letter-spacing:.08em;
}
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories .scene3-selector-control:disabled {
 opacity:1!important;color:#847780!important;background:#f7eff3!important;
 border-color:#e4d7de!important;box-shadow:none!important;
}
html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories :is(.scene3-selector-control,.archive-back,.archive-close):focus-visible {
 outline:2px solid #78536b!important;outline-offset:4px;
}
@media (hover:hover) {
 html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories :is(.scene3-selector-control,.archive-back,.archive-close):hover:not(:disabled) {
  background:#ffa8c6!important;border-color:#ee87ac!important;
 }
}
@media (max-width:600px) {
 html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories.scene--categories {padding-block:44px 32px!important;}
 html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories .scene3-selector-controls {gap:12px!important;}
 html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories .scene3-selector-control {padding-inline:12px;}
}
@media (forced-colors:active) {
 html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories.scene--categories {
  --portrait-chapter-ink:CanvasText;--portrait-chapter-muted:CanvasText;
  background:Canvas!important;border-color:CanvasText!important;
 }
 html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories :is(.scene3-selector-control,.scene3-selector-position,.archive-back,.archive-close) {
  color:ButtonText!important;background:ButtonFace!important;border:1px solid ButtonText!important;box-shadow:none!important;
 }
 html[data-sfw-comic="v23"] body[data-sfw-refinement="r318"].homepage-remaster #categories .scene3-selector-control:disabled {color:GrayText!important;border-color:GrayText!important;}
}
