/* ACCRETION 吸积 — 黑洞是工作台本身：纯黑底，白热→琥珀→余烬三段色。
 * 只有"生成"用火焰实色渐变；选中态用琥珀描边加浅底，禁用态空心。字号只用 12/13/15/20/28。
 * 本文件追加在每个页面样式之后；App Shell 内由 scoped_css 改写到 :host 作用域。 */
html:has(body.singularity){background:#000;color-scheme:dark}
body.singularity{
 --void:#000;--hot:#fff1dd;--amber:#ffb45c;--ember:#ff7a2f;
 --amber-soft:rgba(255,180,92,.1);--amber-line:rgba(255,180,92,.55);
 --text:#f6f0e8;--text-2:#c4b9ac;--text-3:#8f857a;
 --line:rgba(255,236,214,.08);--line-2:rgba(255,236,214,.15);--line-3:rgba(255,236,214,.28);
 --fire:linear-gradient(115deg,#fff3e2 0%,#ffc677 42%,#ff8a3d 100%);
 --fs-1:12px;--fs-2:13px;--fs-3:15px;--fs-4:20px;--fs-5:28px;
 --sans:"Segoe UI Variable Text","Segoe UI","PingFang SC","Microsoft YaHei UI","Microsoft YaHei",system-ui,sans-serif;
 --serif:"Songti SC","STSong","Noto Serif SC","Source Han Serif SC","SimSun",serif;
 --mono:"Cascadia Mono","JetBrains Mono","SF Mono",Consolas,ui-monospace,monospace;
 /* 构建器页面沿用的旧变量，统一映射到吸积色板。 */
 --brand:#ffb45c;--brand-dark:#ffc98a;--canvas:#000;--muted:var(--text-2);--accent:#ffb45c;--ink:var(--text);
 --border:var(--line-2);--surface:#120e0c;--surface-soft:rgba(255,236,214,.035);--soft:var(--surface-soft);
 --field-surface:rgba(10,7,6,.55);--selected-surface:var(--amber-soft);
 --glass-tint:rgba(16,12,10,.74);--glass-chrome:rgba(0,0,0,.62);--glass-dialog:rgba(22,17,14,.97);
 --glass-edge:var(--line-2);--glass-edge-shade:rgba(0,0,0,.4);--glass-shadow:0 30px 80px rgba(0,0,0,.55);
 --glass-saturation:140%;--glass-blur:22px;--focus-ring:var(--amber);--success:#a9dcbc;--danger:#ffab95;
 background:#000;color:var(--text);font-family:var(--sans);font-weight:400;-webkit-font-smoothing:antialiased;
}
.singularity .app-background{background:#000}
.singularity .app-background::before,.singularity .app-background::after{display:none}
.singularity .app-shell{position:relative;z-index:1}
.singularity :focus-visible{outline:2px solid var(--amber);outline-offset:2px}
.singularity [hidden]{display:none!important}

/* ---------- 工作台布局：左侧参数舱，右侧是黑洞舞台 ---------- */
.singularity .studio-grid{grid-template-columns:minmax(330px,384px) minmax(0,1fr);height:calc(100dvh - 68px);max-width:none;padding:4px 24px 24px;gap:28px}
.singularity .creation-pane{border:1px solid var(--appearance-edge,var(--line-2));border-radius:20px;background:var(--glass-tint);box-shadow:0 30px 80px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,240,220,.05)}
.singularity :is(.creation-pane,.library-panel,.api-popover,.preview-stage)::after{display:none}
.singularity .creation-scroll{padding:20px 20px 16px;scrollbar-color:rgba(255,180,92,.28) transparent;scrollbar-width:thin}
.singularity .pane-heading{margin-bottom:6px}
.singularity .pane-heading h1{margin:4px 0 0;font:400 var(--fs-4)/1.3 var(--serif);letter-spacing:.06em;color:var(--hot)}
.singularity .pane-heading p{margin:8px 0 0;font-size:var(--fs-1);color:var(--text-3);line-height:1.7}
.singularity .eyebrow{font:400 var(--fs-1) var(--mono);letter-spacing:.24em;color:var(--amber);opacity:.85}
.singularity :is(.section-label,.field-label,.operate-title,.workflow-section-title){display:block;margin:20px 0 8px;font-size:var(--fs-1);font-weight:400;letter-spacing:.08em;color:var(--text-3);background:transparent}
.singularity .operate-title{margin-top:16px}

/* 最小字号 12px：覆盖构建器里 9～11px 的说明文字。 */
.singularity :is(.note,.status,.task-meta,.workflow-note,.control-help,.upload-status,.upload-formats,.upload-box small,.item-name,.settings label,.form label,.gallery-meta,.gallery-list-tools,.api-note,.api-size-note,.api-progress-note,.api-progress-elapsed,.api-settings summary,.api-ratio-option,.api-ratio-field legend,.compact-count,.compact-media-slot,.lora-model-name,.lora-reset,.lora-settings p,.task-badge,.task-details .task-time,.task-picture small,.video-clear,.history-thumbnail,.history-summary .note,.prompt-presets button,.remix-toggle>.note,.preview-caption,.result-tab){font-size:var(--fs-1)}
.singularity :is(.note,.status,.workflow-note,.control-help,.upload-status,.task-meta,.form label,.settings label,.item-name){color:var(--text-3);line-height:1.6}

/* 分组用间距和细线，不再框套框。 */
.singularity :is(.switch,.settings,.panel,.drawer,.config-drawer,.prompt,.item,.control,.operate-block,.prompt-presets,.reference-toggle){background:transparent;border:0;border-radius:0;box-shadow:none}
.singularity .switch{gap:6px;padding:0;margin:0 0 4px}
.singularity .switch :is(button,label,.original-link){min-height:34px;padding:6px 10px;border:1px solid var(--line-2);border-radius:17px;background:rgba(255,236,214,.03);color:var(--text-2);font-size:var(--fs-2);font-weight:400;box-shadow:none;transition:border-color .2s,color .2s,background .2s}
.singularity .switch :is(button,label):hover{color:var(--text);border-color:var(--line-3)}
.singularity :is(.switch button.active,.switch label:has(input:checked)){color:var(--hot);border-color:var(--amber-line);background:var(--amber-soft);box-shadow:0 0 18px rgba(255,138,61,.12)}
.singularity .switch label input{accent-color:var(--amber)}
.singularity :is(.drawer,.config-drawer){margin:0;border-top:1px solid var(--line)}
.singularity :is(.drawer,.config-drawer):last-of-type{border-bottom:1px solid var(--line)}
.singularity :is(.drawer-head,.config-drawer-head,.prompt-head){min-height:46px;padding:0 2px;border:0;border-radius:0;background:transparent;color:var(--text);font-size:var(--fs-2);font-weight:400}
.singularity :is(.drawer-head,.config-drawer-head)>span:last-child{font-size:0;width:16px;height:16px;background:var(--text-3);-webkit-mask:var(--i-chevron) center/contain no-repeat;mask:var(--i-chevron) center/contain no-repeat;transition:transform .2s}
.singularity :is(.drawer.open .drawer-head,.config-drawer.open .config-drawer-head){color:var(--hot);background:transparent}
.singularity :is(.drawer.open .drawer-head,.config-drawer.open .config-drawer-head)>span:last-child{transform:rotate(180deg);background:var(--amber)}
.singularity .drawer-body{padding:0 0 14px}
.singularity .item{padding:4px 0}
.singularity .item-actions button{background:transparent;border:1px solid transparent;color:var(--text-3);border-radius:8px}
.singularity .item-actions button:hover{color:var(--amber);border-color:var(--line-2)}
.singularity .prompt{margin-top:16px;border-top:1px solid var(--line)}
.singularity .prompt-head b{font-weight:400}
.singularity .settings{padding:0;gap:10px 12px}
.singularity .settings label{font-weight:400}

/* 输入控件：深色凹槽 + 细边，聚焦时琥珀。 */
.singularity :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea,.picker){background-color:var(--field-surface);border:1px solid var(--line-2);border-radius:8px;color:var(--text);box-shadow:none}
.singularity :is(input,select,textarea,.picker):focus{border-color:var(--amber-line);outline:none;box-shadow:0 0 0 3px rgba(255,180,92,.12)}
.singularity :is(input,select,textarea){accent-color:var(--amber)}
.singularity select option{background:#1b1512;color:var(--text)}
.singularity :is(input,textarea)::placeholder{color:var(--text-3)}
.singularity .prompt textarea{border-radius:8px;font:var(--fs-1)/1.7 var(--mono)}

/* 按钮层级：火焰实色只给"生成"；其余都是幽灵按钮。 */
.singularity :is(.primary,.dl,.item-actions button,.gallery-prev,.gallery-next,.gallery-nav,.task-view,.close,.video-clear,.preview-peek,.queue-actions button,.task-details .task-redo,.prompt-presets button,.media-remove,.workflow-toggle-button,.compact-media-tab,.compact-media-slot,.upload-trigger,.paste-target){font-weight:400}
.singularity :is(.actions .primary,.dl,.gallery-prev,.gallery-next,.gallery-nav,.task-view,.close,.video-clear,.preview-peek,.queue-actions button,.task-details .task-redo,.prompt-presets button,.upload-trigger,.paste-target,.api-popover-head button){border:1px solid var(--line-2);border-radius:999px;background:rgba(10,8,6,.5);color:var(--text-2);box-shadow:none}
.singularity :is(.actions .primary,.dl,.gallery-prev,.gallery-next,.gallery-nav,.task-view,.close,.video-clear,.preview-peek,.queue-actions button,.prompt-presets button,.upload-trigger,.paste-target):hover:not(:disabled){color:var(--text);border-color:var(--line-3);background:rgba(255,236,214,.06)}
.singularity :is(.close,.gallery-prev,.gallery-next,.gallery-nav){border-radius:50%}
.singularity .actions{gap:8px;margin:14px 0 4px}
.singularity .actions .primary{min-height:36px;font-size:var(--fs-2)}
.singularity .primary{--liquid-color:#ff8a3d;background:var(--fire);color:#1c0e05;border:1px solid transparent;border-radius:999px;box-shadow:0 0 0 1px rgba(255,220,180,.4) inset,0 8px 30px rgba(255,120,40,.3);font-weight:600;font-size:var(--fs-3)}
.singularity .primary:hover:not(:disabled){filter:brightness(1.05);box-shadow:0 0 0 1px rgba(255,220,180,.5) inset,0 10px 40px rgba(255,120,40,.45)}
.singularity .primary:active:not(:disabled){transform:scale(.98)}
.singularity .primary.generate{min-height:46px;font-size:var(--fs-3)}
.singularity .primary.generate.local,.singularity .primary.generate.api,.singularity .api-popover-anchor #apiDrawerOpen{--liquid-color:#ff8a3d;background:rgba(255,236,214,.04);color:var(--text-2);border:1px solid var(--line-2);box-shadow:none;font-weight:400;font-size:var(--fs-2)}
.singularity :is(.primary.generate.local,.primary.generate.api,.api-popover-anchor #apiDrawerOpen):hover:not(:disabled){color:var(--hot);border-color:var(--line-3);background:rgba(255,236,214,.07)}
.singularity .api-popover-anchor #apiDrawerOpen[aria-expanded=true]{color:var(--amber);border-color:var(--amber-line)}

/* 液体进度按钮：空闲时是火焰实色；生成中变成暗底，火焰按进度从底部涨上来。 */
.singularity .liquid-button.cloud{background:var(--fire);color:#1c0e05}
.singularity .liquid-button.is-loading{background:rgba(255,236,214,.04);color:var(--amber);border-color:var(--amber-line);box-shadow:0 0 24px rgba(255,120,40,.18)}
.singularity .liquid-fill{background:var(--fire)}
.singularity .liquid-button.local .liquid-fill{background:linear-gradient(115deg,rgba(255,198,119,.55),rgba(255,138,61,.55))}
.singularity .liquid-meniscus{background:#fff3e2;opacity:.8}
.singularity .liquid-label-fill{color:#1c0e05;text-shadow:none}
/* 不可点时空心，避免像能点的金色块。 */
.singularity .primary:disabled:not(.is-loading){background:transparent;color:var(--text-3);border-color:transparent;box-shadow:inset 0 0 0 1px var(--line-2);filter:none;cursor:not-allowed}

/* 生成坞：桌面固定在参数舱底部，任务进行时边缘有一道琥珀光扫过。 */
.singularity .creation-footer{position:relative;padding:14px 18px 18px;border-top:1px solid var(--line);background:rgba(8,6,5,.55)}
.singularity .creation-footer::before{content:"";position:absolute;left:0;right:0;top:-1px;height:1px;background:linear-gradient(90deg,transparent 15%,var(--amber) 50%,transparent 85%);background-size:250% 100%;opacity:0;transition:opacity .4s;pointer-events:none}
.singularity.accretion-busy .creation-footer::before{opacity:1;animation:accretion-sweep 2.4s linear infinite}
@keyframes accretion-sweep{from{background-position:120% 0}to{background-position:-120% 0}}
.singularity .generation-actions{gap:8px;margin-top:0}
.singularity .creation-footer .status{margin-top:8px}

/* API 设置浮层 */
.singularity .api-popover{background:var(--glass-dialog);border:1px solid var(--line-2);border-radius:20px;color:var(--text);box-shadow:0 30px 80px rgba(0,0,0,.7)}
.singularity .api-popover-head h2{font:400 var(--fs-4) var(--serif);color:var(--hot)}
.singularity .api-ratio-option{background:transparent;color:var(--text-2);border-color:var(--line-2);border-radius:10px}
.singularity .api-ratio-option:has(input:checked){background:var(--amber-soft);color:var(--hot);border-color:var(--amber-line);box-shadow:none}
.singularity :is(.api-action-error,#genApiBtn[data-state=error]){color:var(--danger)}

/* ---------- 黑洞舞台 ---------- */
.singularity .preview-pane{gap:12px}
.singularity .preview-header{min-height:44px;padding:0 4px}
.singularity .preview-header h2{font-size:var(--fs-1);font-weight:400;letter-spacing:.24em;color:var(--text-3)}
.singularity .preview-header .note{color:var(--text-3)}
.singularity .result-tabs{background:transparent;border:0;padding:0;gap:2px}
.singularity .result-tab{position:relative;min-height:36px;padding:0 12px;border-radius:0;background:transparent;color:var(--text-3);font-weight:400;box-shadow:none}
.singularity .result-tab:hover{color:var(--text)}
.singularity .result-tab.active{color:var(--text);background:transparent;box-shadow:none}
.singularity .result-tab.active::after{content:"";position:absolute;left:50%;bottom:2px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:var(--amber);box-shadow:0 0 8px var(--ember)}
.singularity .preview-header .preview-peek{display:inline-flex;align-items:center;min-height:34px;padding:0 14px;font-size:var(--fs-1);cursor:pointer}
.singularity .preview-stage{min-height:0;padding:16px;border:0;border-radius:20px;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none}
/* 有结果时只在作品背后压一层暗晕，黑洞仍从四周透出来。 */
.singularity .preview-stage.has-results{background:radial-gradient(ellipse 70% 62% at 50% 46%,rgba(0,0,0,.74),rgba(0,0,0,.42) 58%,rgba(0,0,0,0) 100%)}
.singularity #previewEmpty{visibility:hidden;pointer-events:none}
/* legacy-only:start */
/* 独立旧页面的空状态提示；外壳里由吸积布局的标题区代替。 */
.singularity #previewEmpty:has(#stylePreview)::after{visibility:visible;content:"选好画风和人物，点「云端」开始 · 生成时吸积盘会加速";position:absolute;left:50%;bottom:20px;transform:translateX(-50%);white-space:nowrap;padding:8px 16px;border:1px solid var(--line);border-radius:999px;background:rgba(0,0,0,.45);color:var(--text-2);font-size:var(--fs-1);letter-spacing:.04em}
.singularity.accretion-busy #previewEmpty:has(#stylePreview)::after{content:"吸积中 · 作品会从视界里显影";color:var(--hot);border-color:var(--amber-line)}
/* legacy-only:end */
.singularity .preview-empty:not(#previewEmpty){align-items:center;justify-content:center;color:var(--text-2)}
.singularity .preview-empty strong{color:var(--hot);font-weight:400;font-size:var(--fs-3)}
.singularity .empty-icon{background:transparent;border:1px solid var(--line-2);border-radius:50%;color:var(--amber)}
.singularity .preview-example{width:132px;height:176px;max-height:176px;object-fit:cover;border:1px solid var(--line-2);border-radius:12px;box-shadow:0 8px 32px #0009}
.singularity .preview-caption{position:static;margin-top:8px;padding:6px 10px;border-radius:999px;background:rgba(0,0,0,.55);color:var(--text-2);max-width:240px;font-weight:400;box-shadow:none}
.singularity .workflow-preview{border-radius:14px;box-shadow:0 0 0 1px var(--line-2),0 30px 90px #000}

/* 作品：悬浮在视界前，带一圈余烬光。完成的提示交给黑洞光子环闪光，作品本身原样显示、不裁切。 */
.singularity .gallery-main{border:0;background:transparent;box-shadow:none}
.singularity .gallery-main:has(video){background:rgba(0,0,0,.6);border-radius:14px}
.singularity :is(.gallery-main img,.gallery-result-image){border-radius:12px;background:transparent}
.singularity .gallery-image-viewport .gallery-result-image{object-fit:contain;filter:drop-shadow(0 30px 60px #000) drop-shadow(0 0 40px rgba(255,120,40,.14))}
.singularity .gallery-meta{font:var(--fs-1) var(--mono);color:var(--text-3);text-align:center}
.singularity .gallery-actions{display:flex;justify-content:center;flex-wrap:wrap;background:transparent;gap:8px}
.singularity .gallery-actions>*{flex:0 1 auto;width:auto;min-width:0;padding:0 16px}
/* Auto margins centre a short strip; plain justify-content:center would push an overflowing one out of reach on the left. */
.singularity .gallery-thumbs>:first-child{margin-left:auto}.singularity .gallery-thumbs>:last-child{margin-right:auto}
.singularity .gallery-actions .dl{min-height:36px;font-size:var(--fs-1)}
.singularity .gallery-image-status{border-color:var(--line-2);border-radius:999px;color:var(--text-2)}
.singularity .gallery-thumbs{gap:10px;padding:6px 4px}
.singularity .gallery-thumb{flex:0 0 58px;height:76px;padding:0;overflow:hidden;border:0;border-radius:8px;background:#100c0a;box-shadow:0 0 0 1px var(--line-2);opacity:.62;transition:opacity .2s,transform .2s}
.singularity .gallery-thumb:hover{opacity:1;transform:translateY(-2px)}
.singularity .gallery-thumb.active{opacity:1;border:0;box-shadow:0 0 0 1.5px var(--amber),0 0 20px rgba(255,138,61,.3)}
.singularity .gallery-thumb img{object-fit:contain;border-radius:0;background:transparent}
.singularity .result img,.singularity .job img{background:transparent}

/* 任务队列：状态用色点而不是色块。 */
.singularity :is(.task-panel-head,#taskPanel){background:transparent;border:0;box-shadow:none}
.singularity .task-panel-head{padding:0 2px 8px;border-bottom:1px solid var(--line)}
.singularity .task-panel-head b{font-weight:400;color:var(--text-2);font-size:var(--fs-2)}
.singularity .task-group h3,.singularity .task-group summary{color:var(--text-3);font-weight:400}
.singularity .task-tile{border:0;border-radius:12px;background:rgba(16,12,10,.72);box-shadow:0 0 0 1px var(--line-2);color:var(--text-2)}
.singularity .task-tile:hover,.singularity .task-tile:focus-visible{box-shadow:0 0 0 1px var(--line-3);outline:2px solid rgba(255,180,92,.3)}
.singularity .task-card.is-selected .task-tile{box-shadow:0 0 0 1.5px var(--amber),0 0 20px rgba(255,138,61,.25)}
.singularity .task-picture{background:#0d0a08;color:var(--text-3)}
.singularity .task-badge{background:rgba(0,0,0,.72);color:var(--text-2);font-weight:400;border-radius:999px;padding:3px 9px}
.singularity .task-card[data-status=done] .task-badge{background:rgba(0,0,0,.72);color:var(--success)}
.singularity :is(.task-card[data-status=running],.task-card[data-status=recovering]) .task-badge{background:rgba(0,0,0,.72);color:var(--hot)}
.singularity :is(.task-card[data-status=running],.task-card[data-status=recovering]) .task-badge{animation:accretion-blink 1.6s ease-in-out infinite}
.singularity :is(.task-card[data-status=running],.task-card[data-status=recovering]) .task-tile{box-shadow:0 0 0 1px var(--amber-line),0 0 22px rgba(255,120,40,.22)}
.singularity .task-card[data-status=queued] .task-badge{background:rgba(0,0,0,.72);color:var(--text-2)}
.singularity .task-card[data-status=error] .task-badge{background:rgba(0,0,0,.72);color:var(--danger)}
@keyframes accretion-blink{50%{opacity:.55}}
.singularity .task-details{background:var(--glass-dialog);border:1px solid var(--line-2);border-radius:14px;color:var(--text);box-shadow:0 20px 60px rgba(0,0,0,.7)}
.singularity .task-details .task-meta{color:var(--text-2)}
.singularity .task-details .task-redo{color:var(--amber);border-color:var(--amber-line);background:transparent}
.singularity :is(.task-card,.job){background:transparent;border-color:var(--line)}

/* ---------- 图片编辑、视频的素材与开关 ---------- */
.singularity .workflow-select{min-height:44px;font-size:var(--fs-2)}
.singularity .operate-block{margin:4px 0 12px}
.singularity :is(.drop,.upload-box,.upload-box.drop,.file-result){border:1px dashed var(--line-3);border-radius:12px;background:rgba(255,236,214,.025);color:var(--text-2)}
.singularity :is(.upload-box.has-file,.upload-box.is-dragging,.drop.is-dragging){border-style:solid;border-color:var(--amber-line);background:var(--amber-soft)}
.singularity :is(.drop .fn,.upload-heading){color:var(--hot)}
.singularity .drop[data-media-type=video] .upload-trigger{border-color:var(--line-2);background:rgba(10,8,6,.5)}
.singularity :is(.compact-media-tab,.compact-media-slot){border:1px solid var(--line-2);border-radius:10px;background:rgba(10,8,6,.45);color:var(--text-2)}
.singularity :is(.compact-media-tab,.compact-media-slot)[aria-pressed=true]{border-color:var(--amber-line);background:var(--amber-soft);color:var(--hot)}
.singularity .workflow-toggle-button{border:1px solid var(--line-2);border-radius:999px;background:rgba(10,8,6,.45);color:var(--text-2);font-size:var(--fs-2)}
.singularity .workflow-toggle-button:hover:not(:disabled){border-color:var(--line-3);color:var(--text);transform:none}
/* 选中不是一整块金色：琥珀描边 + 指示点。 */
.singularity .workflow-toggle-button[aria-pressed=true]{background:var(--amber-soft);color:var(--hot);border-color:var(--amber-line);box-shadow:none}
.singularity .workflow-toggle-button[aria-pressed=true]::before{content:"";display:inline-block;width:6px;height:6px;margin:0 8px 1px 0;border-radius:50%;background:var(--amber);box-shadow:0 0 8px var(--ember)}
.singularity .reference-toggle{padding:4px 0}
.singularity .compact-uploads{border:0;border-radius:0;background:transparent;box-shadow:none;padding:0}
.singularity #wfSwitch{padding:0}
.singularity #wfSwitch button b{font-weight:inherit}
.singularity #wfSwitch button.active{font-weight:500}
.singularity .primary span{font-weight:inherit}
.singularity #wfSwitch button{min-height:44px;padding:8px 10px;border-radius:10px;font-size:var(--fs-1);font-weight:400;line-height:1.45;text-align:left;justify-content:flex-start}
.singularity .media-remove{border:1px solid var(--line-2);background:rgba(0,0,0,.7);color:var(--text)}
.singularity .config-loading{background:transparent;color:var(--text-3)}
.singularity .config-error{background:rgba(255,120,90,.08);border-color:rgba(255,150,120,.35);color:var(--danger)}
.singularity .config-state{color:var(--text-3);background:transparent}
.singularity .prompt-presets{padding:4px 0}
.singularity .prompt-presets summary{color:var(--text-2);font-size:var(--fs-1)}
.singularity .prompt-presets button{border-radius:8px}
.singularity .prompt-presets button[aria-pressed=true]{border-color:var(--amber-line);background:var(--amber-soft);color:var(--hot)}
.singularity :is(.control-head,.control-title){color:var(--text);font-weight:400}
.singularity .required{color:var(--ember)}
.singularity .video-wave{background:var(--ember)}

/* 收藏 / 历史：右侧抽屉 */
.singularity .library-overlay{background:rgba(0,0,0,.55)}
.singularity .library-panel{background:var(--glass-dialog);border:1px solid var(--line-2);border-radius:20px;box-shadow:0 30px 80px rgba(0,0,0,.7)}
.singularity .library-header{border-color:var(--line)}
.singularity .library-header h2{font:400 var(--fs-4) var(--serif);color:var(--hot);letter-spacing:.04em}
.singularity .library-header,.singularity .library-scroll{background:transparent}
.singularity .job{border:0;border-bottom:1px solid var(--line);border-radius:0;padding:14px 0}

/* ---------- 宽窄屏 ---------- */
/* legacy-only:start */
/* 旧的两栏布局和手机吸底生成按钮，只给独立旧页面用；外壳页面用 frontend/styles/accretion.css 的指令坞。 */
@media(min-width:1600px){.singularity .studio-grid{grid-template-columns:400px minmax(0,1fr);padding:4px 40px 30px;gap:40px}}
@media(max-width:1100px){.singularity .studio-grid{grid-template-columns:330px minmax(0,1fr);gap:18px;padding:4px 16px 16px}}
@media(max-width:820px){
 .singularity .studio-grid{height:auto;grid-template-columns:minmax(0,1fr);padding:8px 10px 16px;gap:16px}
 .singularity .creation-scroll{padding:16px}
 /* 生成坞跟随视口底部；clip 不会像 hidden 那样把参数舱变成滚动容器。 */
 .singularity .creation-pane{overflow:clip}
 .singularity .creation-footer{position:sticky;bottom:0;z-index:5;padding:12px 16px calc(16px + env(safe-area-inset-bottom))}
 .singularity .creation-scroll :is(input,select,textarea,button,a){scroll-margin-bottom:170px}
 .singularity .preview-stage{min-height:420px}
 .singularity .preview-stage.has-results{min-height:390px}
 .singularity .preview-example{width:105px;height:140px}
 .singularity #previewEmpty:has(#stylePreview)::after{white-space:normal;width:max-content;max-width:calc(100% - 32px);text-align:center}
}
/* legacy-only:end */
@media(prefers-reduced-transparency:reduce){.singularity :is(.creation-pane,.api-popover,.library-panel){background:#16110e;backdrop-filter:none}}
@media(prefers-reduced-motion:reduce){.singularity :is(.creation-footer::before,.task-badge){animation:none!important}}

/* 外观控制台的保存值放在最后，手机样式同样遵从。 */
.singularity .creation-pane{background:var(--appearance-glass,rgba(16,12,10,.74));backdrop-filter:blur(var(--appearance-blur,22px)) saturate(140%);-webkit-backdrop-filter:blur(var(--appearance-blur,22px)) saturate(140%)}
body.singularity{--field-surface:var(--appearance-field,rgba(10,7,6,.55));--glass-edge:var(--appearance-edge,rgba(255,236,214,.15))}
/* legacy-only:start */
@media(max-width:820px){
 /* 表单从坞下滚过，底色要不透明。 */
 .singularity .creation-footer{background:linear-gradient(rgba(16,12,10,.86),rgba(16,12,10,.86)),#0c0908;box-shadow:0 -12px 28px rgba(0,0,0,.6)}
}
/* legacy-only:end */
.style-preview-popover{position:fixed;z-index:115;width:240px;max-width:calc(100vw - 16px);padding:10px;border:1px solid rgba(255,236,214,.16);border-radius:14px;background:rgba(22,17,14,.96);box-shadow:0 15px 50px #000a;color:#c4b9ac;backdrop-filter:blur(14px)}
.style-preview-popover img{display:block;width:100%;height:270px;max-height:55dvh;object-fit:contain;border-radius:8px;background:#0a0706}.style-preview-popover p{font-size:12px;margin:9px 2px 2px;line-height:1.5}.style-preview-popover button{position:absolute;right:15px;top:15px;min-height:30px;padding:2px 10px;background:rgba(10,8,6,.8)}
@media(prefers-reduced-transparency:reduce){.singularity :is(.creation-pane,.topbar){background:#16110e;backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(max-width:820px){.singularity .preview-header .preview-peek{min-height:44px}}

/* shell-only:start */
/* 只作用于外壳文档本身的部分：顶栏、场景菜单、背景画布、外观控制台和图标变量。
 * 外壳内的页面在 ShadowRoot 里，碰不到这些元素，图标变量也从外壳 body 继承；
 * tools/build_frontend.py 打包页面样式时去掉这一段。独立旧页面仍加载完整文件。 */
body.singularity{
 --i-heart:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19.5s-7.5-4.4-7.5-10A4.2 4.2 0 0 1 12 7a4.2 4.2 0 0 1 7.5 2.5c0 5.6-7.5 10-7.5 10Z'/%3E%3C/svg%3E");
 --i-history:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12a7.5 7.5 0 1 0 2.2-5.3'/%3E%3Cpath d='M4.5 4.5v3.2h3.2'/%3E%3Cpath d='M12 8.2V12l2.6 1.6'/%3E%3C/svg%3E");
 --i-scene:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3Cellipse cx='12' cy='12' rx='9.5' ry='3.8'/%3E%3C/svg%3E");
 --i-user:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8.5' r='3.6'/%3E%3Cpath d='M5 19.5c1.3-3.3 3.9-5 7-5s5.7 1.7 7 5'/%3E%3C/svg%3E");
 --i-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
 --i-ring:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23ff7a2f'/%3E%3Cstop offset='.5' stop-color='%23ffc677'/%3E%3Cstop offset='1' stop-color='%23fff1dd'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cellipse cx='20' cy='21' rx='17' ry='5.2' fill='none' stroke='url(%23g)' stroke-width='2.2'/%3E%3Ccircle cx='20' cy='20' r='7.6' fill='%23000' stroke='%23ffd9a8' stroke-width='1.2'/%3E%3Cpath d='M3.6 19.6c3-2.4 9.4-4 16.4-4s13.4 1.6 16.4 4' fill='none' stroke='url(%23g)' stroke-width='1.4' opacity='.55'/%3E%3C/svg%3E");
}
#singularityCanvas{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.9;touch-action:none}

/* ---------- 顶栏：品牌 / 居中导航 / 图标工具 ---------- */
.singularity .topbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;height:68px;padding:0 24px;gap:24px;border:0;box-shadow:none}
.singularity .brand{gap:10px;font-size:var(--fs-2);font-weight:400;letter-spacing:.02em;color:var(--text-2)}
.singularity .brand-mark{display:inline-flex;align-items:center;gap:10px;background:none;box-shadow:none;border-radius:0;color:var(--text);font:600 var(--fs-2) var(--sans);letter-spacing:.06em;font-style:normal}
.singularity .brand-mark::before{content:"";width:32px;height:32px;flex:none;background:var(--i-ring) center/contain no-repeat}
.singularity .topnav{gap:4px}
.singularity .topnav-link{position:relative;min-height:44px;padding:0 14px;border:0;border-radius:0;background:none;color:var(--text-3);font-size:var(--fs-3);font-weight:400;transition:color .2s}
.singularity .topnav-link:hover{color:var(--text)}
.singularity .topnav-link.active{color:var(--text);background:none;border:0}
.singularity .topnav-link.active::after{content:"";position:absolute;left:50%;bottom:4px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:var(--amber);box-shadow:0 0 10px var(--ember)}
.singularity .topbar-tools{justify-self:end;margin-left:0;gap:2px;align-items:center}
.singularity .topbar-action{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:0 12px;border:1px solid transparent;border-radius:19px;background:transparent;color:var(--text-2);font-size:var(--fs-2);font-weight:400;cursor:pointer;transition:background .2s,color .2s}
.singularity .topbar-action:hover{background:rgba(255,236,214,.07);color:var(--text);border-color:transparent}
.singularity .topbar-action[aria-expanded=true]{color:var(--amber)}
.singularity .topbar-action:is(#favOpen,#histOpen,#sceneMenuOpen,#accountOpen)::before{content:"";width:17px;height:17px;flex:none;background:currentColor;-webkit-mask:var(--icon) center/contain no-repeat;mask:var(--icon) center/contain no-repeat}
.singularity #favOpen{--icon:var(--i-heart)}.singularity #histOpen{--icon:var(--i-history)}
.singularity #sceneMenuOpen{--icon:var(--i-scene)}.singularity #accountOpen{--icon:var(--i-user)}
.singularity #accountOpen{margin-left:6px;border-color:var(--line-2);background:rgba(255,236,214,.04);color:var(--text)}
.singularity .connection-dot{background:var(--amber);box-shadow:0 0 10px var(--ember)}

/* ---------- 场景菜单、沉浸、外观控制台 ---------- */
.scene-menu-anchor{position:relative;display:flex}
.singularity .scene-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:125;display:grid;gap:2px;min-width:190px;padding:6px;border:1px solid var(--line-2);border-radius:14px;background:rgba(22,17,14,.97);box-shadow:0 20px 60px rgba(0,0,0,.7)}
.singularity .scene-menu .topbar-action{display:flex;align-items:center;width:100%;min-height:40px;padding:0 12px;border-color:transparent;border-radius:9px;background:transparent;font-size:var(--fs-2);text-align:left;white-space:nowrap;color:var(--text-2)}
.singularity .scene-menu .topbar-action:hover:not(:disabled){background:rgba(255,236,214,.07);border-color:transparent;color:var(--text)}
.singularity .scene-menu .topbar-action:disabled{opacity:.5;cursor:default}
.scene-menu-toggle::after{content:"";display:inline-block;width:5px;height:5px;margin-left:2px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:translateY(-2px) rotate(45deg);opacity:.7}
.scene-menu-toggle[aria-expanded=true]::after{transform:translateY(1px) rotate(225deg)}
.singularity-exit{display:none;position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:150;height:40px;border:1px solid rgba(255,236,214,.16);border-radius:20px;padding:0 20px;background:rgba(22,17,14,.86);color:#c4b9ac;cursor:pointer}
.singularity.scene-focus .app-shell{visibility:hidden;pointer-events:none}
.singularity.scene-focus #singularityCanvas{pointer-events:auto;z-index:0;cursor:grab}
.singularity.scene-focus .singularity-exit{display:block}
.singularity.scene-focus{overflow:hidden}

@media(max-width:1100px){.singularity .topbar{padding:0 16px;gap:12px}.singularity .brand>span:last-child{display:none}}
@media(max-width:820px){
 .singularity .topbar{grid-template-columns:auto 1fr;height:auto;padding:10px 12px 4px;row-gap:2px;column-gap:8px}
 .singularity .brand>span:last-child{display:none}
 .singularity .topbar-tools{grid-column:2;grid-row:1;flex-wrap:nowrap;gap:0}
 .singularity .topnav{grid-column:1/-1;grid-row:2;justify-content:center}
 .singularity .topnav-link{flex:0 1 auto;justify-content:center;padding:0 14px}
 /* 手机顶栏只留图标；按钮文字仍是无障碍名称。 */
 .singularity .topbar-action{min-width:44px;min-height:44px;padding:0 10px;justify-content:center}
 .singularity .topbar-action:is(#favOpen,#histOpen,#sceneMenuOpen)>span,.singularity .topbar-tools .scene-menu-toggle::after{display:none}
 .singularity #accountOpen{font-size:0;gap:0;margin-left:2px}
 .singularity .connection-dot{display:none}
}
.singularity #singularityCanvas{opacity:var(--appearance-opacity,.9)}
.singularity .topbar{background:linear-gradient(var(--appearance-chrome,rgba(0,0,0,.62)),transparent);backdrop-filter:none;-webkit-backdrop-filter:none}
.appearance-panel{position:fixed;z-index:120;right:18px;top:76px;width:350px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 94px);overflow:auto;overscroll-behavior:contain;padding:18px;border:1px solid rgba(255,236,214,.15);border-radius:18px;background:rgba(22,17,14,.97);color:#f6f0e8;box-shadow:0 20px 70px #000a;backdrop-filter:blur(16px);font-size:12px;scrollbar-width:thin}
.appearance-panel header{display:flex;align-items:center;justify-content:space-between}.appearance-panel h2{font:400 20px "Songti SC","STSong","SimSun",serif;margin:5px 0;color:#fff1dd}.appearance-panel small{font-size:12px;letter-spacing:.18em;color:#ffb45c}
.appearance-panel button,.style-preview-popover button{border:1px solid rgba(255,236,214,.16);background:rgba(255,236,214,.04);color:#c4b9ac;border-radius:999px;min-height:40px;cursor:pointer;padding:8px 12px}
.appearance-panel button:hover,.style-preview-popover button:hover{color:#f6f0e8;border-color:rgba(255,236,214,.28)}
.appearance-panel header button{font-size:20px;width:40px;padding:0}.appearance-note,.appearance-panel [role=status]{font-size:12px;line-height:1.7;color:#a59a8e}
.appearance-panel fieldset{margin:16px 0;padding:0;border:0}.appearance-panel legend{width:100%;padding:0 0 9px;border-bottom:1px solid rgba(255,236,214,.08);font-size:13px;color:#ffb45c}
.appearance-field{display:grid;grid-template-columns:1fr 80px;align-items:center;gap:7px;margin:13px 0}.appearance-field input[type=range]{grid-column:1/-1;width:100%;accent-color:#ffb45c;margin:0;min-height:24px}.appearance-field input[type=number]{width:80px;min-width:0;background:#0a0706;color:#ffd9a8;border:1px solid rgba(255,236,214,.16);border-radius:8px;padding:7px;font-size:13px}
.appearance-panel footer{display:grid;grid-template-columns:1fr 1fr;gap:7px;position:sticky;bottom:-18px;background:#16110e;padding:12px 0 8px;border-top:1px solid rgba(255,236,214,.08)}.appearance-panel footer p{grid-column:1/-1;margin:0;min-height:20px}.appearance-panel [data-setting-action=save]{background:linear-gradient(115deg,#fff3e2 0%,#ffc677 42%,#ff8a3d 100%);color:#1c0e05;border-color:transparent;font-weight:600}
@media(max-width:820px){.appearance-panel{top:64px;right:12px;max-height:calc(100dvh - 76px)}.appearance-field input[type=number]{font-size:16px;min-height:44px}.appearance-panel button{min-height:44px}.singularity .scene-menu .topbar-action{min-height:44px}}
/* shell-only:end */

*{box-sizing:border-box}html{background:#000;color-scheme:dark}body{margin:0;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}button,a{touch-action:manipulation}button{font:inherit}
.app-shell{min-height:100dvh}.topbar{position:relative;z-index:70;display:flex;align-items:center;gap:24px;border-bottom:1px solid #ffffff10}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit}.brand-mark{font-size:30px}.topnav{display:flex}.topnav-link{display:flex;align-items:center;min-height:44px;text-decoration:none}.topbar-tools{margin-left:auto;display:flex;gap:6px}.topbar-action{min-height:38px;padding:0 12px;border:1px solid #ffffff20;cursor:pointer}.page-host{display:block}.page-host[hidden]{display:none!important}.page-host:not([hidden]){animation:page-enter 140ms ease-out}#routeStatus:empty{display:none}#routeStatus{padding:16px;color:#ffbaba}
@keyframes page-enter{from{opacity:.94}to{opacity:1}}
body.singularity #singularityCanvas{opacity:0;transition:opacity 850ms ease}
body.singularity[data-singularity=ready] #singularityCanvas{opacity:var(--appearance-opacity,.9)}
@media(max-width:820px){.topnav{order:3;width:100%;justify-content:center}.topbar-action{min-height:44px}.brand span:last-child{display:none}}
@media(prefers-reduced-motion:reduce){.page-host:not([hidden]){animation:none}body.singularity #singularityCanvas{transition:none;transform:none}}
[hidden]{display:none!important}
.account-gate{min-height:100dvh;display:grid;place-items:center;padding:32px 20px;background:radial-gradient(ellipse at 90% 0,#a975352e,transparent 60%),radial-gradient(ellipse at 0 100%,#b0814620,transparent 50%),#08090c;color:#ece7df}
.account-gate-card{width:min(100%,460px);padding:42px 36px;border:1px solid #d4ae7040;border-radius:24px;background:linear-gradient(150deg,#19191ed9,#0e1015ed);box-shadow:0 24px 80px #0008;text-align:center}
.account-monogram{display:block;font:bold italic 62px Georgia,serif;color:#dfbd89;letter-spacing:-7px;margin-bottom:22px}.account-eyebrow{color:#c8a578;font-size:11px;letter-spacing:3px;margin:0 0 10px}.account-gate h1{font-size:27px;line-height:1.4;margin:12px 0}.account-intro{color:#bab4aa;line-height:1.8;font-size:14px}.account-gate [role=status]{color:#c6beb2;font-size:13px;line-height:1.6;min-height:22px;margin:24px 0 14px}
body.singularity .account-primary,body.singularity .account-secondary{border-radius:12px;min-height:44px;padding:10px 18px;font-size:14px;font-weight:600;cursor:pointer;transition:transform .15s,filter .15s;border:1px solid #d3ad765c}
body.singularity .account-primary{background:linear-gradient(120deg,#e3c299,#be9564);color:#201b13}body.singularity .account-secondary{background:#202126;color:#dbd1c3}body.singularity .account-gate .account-primary{width:100%;margin-top:6px}
.account-primary:hover,.account-secondary:hover{filter:brightness(1.1);transform:translateY(-1px)}.account-primary:disabled,.account-secondary:disabled{cursor:wait;opacity:.6;transform:none}
.account-dialog{width:min(540px,calc(100vw - 24px));max-height:calc(100dvh - 36px);overflow:auto;border:1px solid #d4ae7057;border-radius:22px;background:#14151a;color:#eee7de;padding:28px;box-shadow:0 24px 90px #000b}.account-dialog::backdrop{background:#030407bb;backdrop-filter:blur(5px)}
.admin-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px;color:#bfb3a1;font-size:12px}
.admin-settle-actions{display:flex;flex-wrap:wrap;gap:8px}.admin-issued h3{margin:0;font-size:17px}.admin-issued.admin-form{display:grid}.admin-issued.admin-form[hidden]{display:none!important}
#loginSceneFallback{position:fixed;inset:0;z-index:0;pointer-events:none;background:#030407}
body.singularity[data-singularity=ready] #loginSceneFallback{visibility:hidden}
body.singularity[data-login-scene=login],body.singularity[data-login-scene=waiting-entry],body.singularity[data-login-scene=entering],body.singularity[data-login-scene=through]{overflow:hidden}
body.singularity .account-gate{position:fixed;inset:0;z-index:2;overflow-y:auto;background:transparent}
.account-gate-card{position:relative;background:var(--appearance-glass,rgba(15,16,20,.78));border-color:var(--appearance-edge,#d4ae7040);backdrop-filter:blur(var(--appearance-blur,20px));transition:opacity .5s ease,transform .5s ease}
.account-gate-leaving .account-gate-card{opacity:0;transform:translateY(-10px);pointer-events:none}
body.singularity[data-login-scene=entering] #singularityCanvas,body.singularity[data-login-scene=through] #singularityCanvas,body.singularity[data-login-scene=arriving] #singularityCanvas,body.singularity[data-login-scene=revealing] #singularityCanvas{opacity:var(--entry-opacity,0);transition:none}
.account-shell-staged{visibility:hidden;pointer-events:none}.account-shell-entering{animation:account-workbench-enter .6s ease both}@keyframes account-workbench-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){#loginSceneFallback,.account-gate-card,.account-shell-entering{transition:none!important;animation:none!important}.account-gate-leaving .account-gate-card{transform:none;filter:none}body.singularity #singularityCanvas{transition:none!important}}
.account-login-form{text-align:left}.account-login-form label{display:block;font-size:13px;color:#d6c8b7;margin-bottom:9px}.account-login-form input{width:100%;border:1px solid #d3ad764d;border-radius:12px;background:var(--appearance-field,#111216d9);padding:14px 15px;color:#f0e3d1;font:inherit;font-size:15px;letter-spacing:1px;min-height:49px}.account-login-form input:focus{outline:2px solid #d2aa70;outline-offset:2px}.account-login-form input::placeholder{font-size:13px;letter-spacing:0;color:#a99f92}.account-login-form .account-help{margin:16px 0 0;text-align:center;font-size:12px}.account-login-form input:disabled{opacity:.65}.account-admin-login{border:0;background:none;color:#ada396;font-size:12px;padding:10px 14px;margin-top:18px;cursor:pointer}.account-admin-login:hover{color:#e1c39b}.account-admin-login:focus-visible{outline:2px solid #d2aa70;outline-offset:2px;border-radius:7px}
.account-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.account-dialog h2{font-size:25px;margin:0}.account-close{width:40px;height:40px;border:1px solid #ffffff1c;background:#202126;color:#d8cdc1;border-radius:50%;font-size:26px;cursor:pointer}.account-identity{color:#c6beb2;overflow-wrap:anywhere;margin:20px 0}
.account-membership{background:linear-gradient(120deg,#c99b5019,#cfab7010);border:1px solid #cda66538;border-radius:15px;padding:18px;margin-bottom:25px}.account-plan-line{display:flex;align-items:center;justify-content:space-between;gap:12px}.account-plan-line h3{margin:0;font-size:18px}.account-plan-badge{font-size:12px;border:1px solid #cba66055;border-radius:18px;padding:4px 9px;color:#dec494;white-space:nowrap}.account-membership>p{font-size:12px;color:#c4baaa;line-height:1.6;margin:10px 0 20px}.account-quota{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:0}.account-quota dt{font-size:11px;color:#bfb4a5}.account-quota dd{font-size:22px;margin:7px 0 0;color:#ecd1a1;overflow-wrap:anywhere}
.account-dialog label{font-size:15px;font-weight:600}.account-help{font-size:12px;color:#b1aba4;line-height:1.6;margin:8px 0 12px}.account-redeem-row{display:flex;gap:9px}.account-redeem-row input{width:0;flex:1;min-width:0;border:1px solid #ffffff30;border-radius:12px;padding:11px 12px;background:#0c0e12;color:#ede7dc;font:inherit;font-size:14px}.account-redeem-row input:focus{outline:2px solid #d2aa70;outline-offset:2px}.account-redeem-row button{flex-shrink:0}.account-dialog [role=status]{font-size:13px;color:#dfc79e;line-height:1.6;min-height:21px;margin:12px 0 8px;overflow-wrap:anywhere}.account-dialog-footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;border-top:1px solid #ffffff12;padding-top:20px;margin-top:20px}.account-admin-entry{margin-right:auto}.account-noscript{padding:48px;color:#ddd;text-align:center}
@media(max-width:480px){.account-gate-card{padding:34px 24px}.account-dialog{padding:22px 18px}.account-redeem-row{flex-direction:column}.account-redeem-row input{width:100%;flex:auto}.account-quota{gap:7px}.account-quota dt{font-size:10px}}
@media(prefers-reduced-motion:reduce){.account-primary,.account-secondary{transition:none;transform:none!important}}
.membership-admin{width:min(860px,calc(100vw - 24px))}.admin-tabs{display:flex;gap:8px;margin:12px 0 24px;border-bottom:1px solid #ffffff17;padding-bottom:12px}.admin-tabs button{border:1px solid #ffffff22;background:#1d1e24;color:#bbb5ad;border-radius:10px;padding:11px 17px;cursor:pointer}.admin-tabs button[aria-pressed=true]{border-color:#c9a36c;background:#b28b4330;color:#ead1a7}.admin-form-header{display:grid;grid-template-columns:auto 1fr;gap:15px;align-items:center;margin-bottom:20px}.admin-form{display:grid;grid-template-columns:1fr 1fr;gap:15px}.admin-form>label{display:flex;flex-direction:column;gap:8px;font-size:13px}.admin-form input:not([type=checkbox]),.admin-form select,.admin-form-header select,.admin-issued textarea{width:100%;min-width:0;min-height:43px;border:1px solid #ffffff28;background:#0e1015;color:#e9e0d4;border-radius:10px;padding:9px 12px;font:inherit;font-size:13px}.admin-form input:focus,.admin-form select:focus,.admin-form-header select:focus,.admin-issued textarea:focus{outline:2px solid #d2aa70;outline-offset:2px}.admin-form fieldset{border:1px solid #ffffff24;border-radius:12px;padding:12px;display:flex;flex-wrap:wrap;gap:12px}.admin-form fieldset label{font-size:12px;font-weight:400}.admin-form legend{font-size:12px;color:#c6b79f;padding:0 6px}.admin-form input[type=checkbox]{accent-color:#d2ad77}.admin-full{grid-column:1/-1}.admin-form>label.admin-checkbox{display:flex;flex-direction:row;align-items:center}.admin-issued{padding:18px;margin:22px 0;border:1px solid #c3a26b61;border-radius:13px;background:#c2a06312}.admin-issued textarea{font-family:ui-monospace,monospace;resize:vertical;margin-bottom:12px}.admin-table-wrap{overflow:auto;margin:20px 0 0}.admin-table-wrap table{border-collapse:collapse;width:100%;font-size:12px}.admin-table-wrap th{text-align:left;font-weight:500;color:#b9ad9e;white-space:nowrap;padding:12px;border-bottom:1px solid #ffffff25}.admin-table-wrap td{padding:12px;border-bottom:1px solid #ffffff12;overflow-wrap:anywhere}.admin-table-wrap button{font-size:12px!important;white-space:nowrap;min-height:36px!important;padding:7px 11px!important}@media(max-width:480px){.admin-form{grid-template-columns:1fr}.admin-tabs{gap:6px}.admin-tabs button{flex:1;padding:11px 6px}.admin-form-header{grid-template-columns:1fr;gap:8px}.admin-table-wrap th,.admin-table-wrap td{padding:10px 7px}}
.admin-verification{padding:20px;border:1px solid #cda66538;border-radius:15px;background:#c99b5012}.admin-verification h3{margin:0 0 12px;font-size:18px}.admin-verification p{font-size:14px;line-height:1.8;overflow-wrap:anywhere}.admin-verification .account-help{font-size:12px}.admin-tabs{flex-wrap:wrap}.admin-form>*,.admin-form fieldset{min-width:0}.membership-admin .account-close{flex-shrink:0}@media(max-width:480px){.admin-tabs button{flex:1 1 calc(50% - 6px);min-width:0;min-height:44px;white-space:normal;overflow-wrap:anywhere}.admin-verification{padding:16px}.admin-verification .account-primary{width:100%}.membership-admin h2{font-size:22px}}
/* ACCRETION account surfaces: the same tokens as the workbench skin; only the confirming action uses the fire gradient. */
body.singularity .account-gate-card{border-color:var(--line-2);border-radius:20px;box-shadow:0 30px 80px rgba(0,0,0,.6),inset 0 1px rgba(255,240,220,.05)}
body.singularity .account-monogram{width:56px;height:56px;margin:0 auto 18px;font-size:0;letter-spacing:0;background:var(--i-ring) center/contain no-repeat}
body.singularity .account-eyebrow{font:400 12px var(--mono);letter-spacing:.24em;color:var(--amber)}
body.singularity .account-gate h1,body.singularity .account-dialog h2{font-family:var(--serif);font-weight:400;letter-spacing:.04em;color:var(--hot)}
body.singularity .account-gate h1{font-size:28px;text-wrap:balance}
body.singularity :is(.account-intro,.account-gate [role=status],.account-identity){color:var(--text-2)}
body.singularity .account-primary{background:var(--fire);color:#1c0e05;border-color:transparent;border-radius:999px;box-shadow:0 0 0 1px rgba(255,220,180,.4) inset,0 8px 30px rgba(255,120,40,.3)}
body.singularity .account-secondary{background:rgba(255,236,214,.04);color:var(--text-2);border-color:var(--line-2);border-radius:999px;font-weight:400}
body.singularity .account-secondary:hover{color:var(--text)}
body.singularity :is(.account-login-form input,.account-redeem-row input,.admin-form input:not([type=checkbox]),.admin-form select,.admin-form-header select,.admin-issued textarea){background:rgba(10,7,6,.6);border-color:var(--line-2);color:var(--text);border-radius:10px}
body.singularity :is(.account-login-form input,.account-redeem-row input,.admin-form input,.admin-form select,.admin-issued textarea):focus{outline:none;border-color:var(--amber-line);box-shadow:0 0 0 3px rgba(255,180,92,.12)}
body.singularity :is(.account-login-form label,.account-admin-login){color:var(--text-2)}
body.singularity .account-admin-login:hover{color:var(--amber)}
body.singularity .account-dialog{background:var(--glass-dialog);border-color:var(--line-2);border-radius:20px;color:var(--text);box-shadow:0 30px 90px rgba(0,0,0,.75)}
body.singularity .account-dialog::backdrop{background:rgba(0,0,0,.6)}
body.singularity .account-close{background:transparent;border-color:var(--line-2);color:var(--text-2)}
body.singularity .account-close:hover{color:var(--text);border-color:var(--line-3)}
body.singularity .account-membership{background:transparent;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;padding:18px 0}
body.singularity .account-plan-line h3{font-weight:400;color:var(--hot)}
body.singularity .account-plan-badge{border-color:var(--amber-line);color:var(--amber)}
body.singularity .account-membership>p,body.singularity .account-help{color:var(--text-3);font-size:12px}
body.singularity .account-quota dt{font-size:12px;color:var(--text-3)}
body.singularity .account-quota dd{font-family:var(--mono);color:var(--hot)}
body.singularity .account-dialog [role=status]{color:var(--amber)}
body.singularity .account-dialog-footer{border-color:var(--line)}
body.singularity .admin-tabs{border-color:var(--line)}
body.singularity .admin-tabs button{background:transparent;border-color:var(--line-2);color:var(--text-2);border-radius:999px}
body.singularity .admin-tabs button[aria-pressed=true]{border-color:var(--amber-line);background:var(--amber-soft);color:var(--hot)}
body.singularity :is(.admin-issued,.admin-verification){background:var(--amber-soft);border-color:var(--amber-line)}
body.singularity .admin-form fieldset{border-color:var(--line-2)}
body.singularity .admin-form legend,body.singularity .admin-table-wrap th{color:var(--text-3)}
body.singularity .admin-table-wrap td{border-color:var(--line)}
body.singularity .admin-form input[type=checkbox]{accent-color:var(--amber)}
/* STUDIO shell: the bar is a sidebar on the left (an icon rail on narrower windows, a tab bar at the
   bottom on phones). Class names and entry ids are unchanged; --side-w / --side-h are inherited by the
   pages so their fixed panes (styles/accretion.css) leave room for it. */
body.singularity{--side-w:248px;--side-h:0px}
/* The page hosts stay at the window's left edge: while a host plays its enter animation it is the
   containing block of its fixed panes, so an offset here would make them jump sideways. */
body.singularity>.app-shell>:is(.shell-top,#routeStatus){margin-left:var(--side-w)}
body.singularity>.app-shell>.topbar{position:fixed;z-index:70;inset:0 auto 0 0;width:var(--side-w);height:auto;display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:18px 14px 14px;border:0;border-right:1px solid var(--line);background:linear-gradient(var(--appearance-chrome,rgba(0,0,0,.62)),var(--appearance-chrome,rgba(0,0,0,.62))),rgba(14,12,10,.6)}
body.singularity>.app-shell>.topbar .brand{padding:4px 8px 16px}
body.singularity>.app-shell>.topbar .brand>span:last-child{font-size:12px;color:var(--text-3)}
body.singularity>.app-shell>.topbar .side-label{display:block;padding:14px 10px 6px;font-size:11px;letter-spacing:.12em;color:var(--text-3)}
body.singularity>.app-shell>.topbar .topnav{order:0;width:auto;display:flex;flex-direction:column;justify-content:flex-start;gap:4px}
body.singularity>.app-shell>.topbar .topnav-link{flex:none;justify-content:flex-start;gap:11px;min-height:40px;padding:0 10px;border-radius:10px;color:var(--text-2);font-size:14px;transition:background .15s,color .15s}
body.singularity>.app-shell>.topbar .topnav-link svg{flex:none;width:18px;height:18px}
body.singularity>.app-shell>.topbar .topnav-link:hover{background:rgba(255,236,214,.05);color:var(--text)}
body.singularity>.app-shell>.topbar .topnav-link.active{background:var(--amber-soft);color:var(--text);box-shadow:inset 0 0 0 1px rgba(255,180,92,.16)}
body.singularity>.app-shell>.topbar .topnav-link.active svg{color:var(--amber)}
body.singularity>.app-shell>.topbar .topnav-link.active::after{content:none}
body.singularity>.app-shell>.topbar .topbar-tools{display:contents}
body.singularity>.app-shell>.topbar :is(.topbar-tools,.scene-menu-anchor)>.topbar-action{justify-content:flex-start;gap:11px;width:100%;min-height:40px;margin:0;padding:0 10px;border-radius:10px;font-size:14px}
body.singularity>.app-shell>.topbar .topbar-tools>.topbar-action.active{background:var(--amber-soft);color:var(--text);box-shadow:inset 0 0 0 1px rgba(255,180,92,.16)}
body.singularity>.app-shell>.topbar .topbar-tools>.topbar-action.active::before{background:var(--amber)}
/* While a library is open the workspace entry steps back: it names whose library this is. */
body.singularity:is([data-library=hist],[data-library=fav])>.app-shell>.topbar .topnav-link.active{background:none;box-shadow:none;color:var(--text)}
.side-count{margin-left:auto;padding:4px 7px;border-radius:99px;background:rgba(255,236,214,.07);color:var(--text-2);font:500 11px/1 var(--mono);font-style:normal}
.side-count[hidden]{display:none}
/* 作品库 sits above 收藏 and reads as a grid of works, as in the prototype (2026-11-12). */
body.singularity>.app-shell>.topbar #favOpen{order:1}
body.singularity>.app-shell>.topbar .scene-menu-anchor{order:2}
body.singularity #histOpen{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6.5' height='6.5' rx='1.6'/%3E%3Crect x='13.5' y='4' width='6.5' height='6.5' rx='1.6'/%3E%3Crect x='4' y='13.5' width='6.5' height='6.5' rx='1.6'/%3E%3Crect x='13.5' y='13.5' width='6.5' height='6.5' rx='1.6'/%3E%3C/svg%3E")}
.topbar-action.active .side-count{background:var(--amber-soft);color:var(--amber)}
body.singularity>.app-shell>.topbar .scene-menu-anchor{flex-direction:column}
body.singularity>.app-shell>.topbar .scene-menu-toggle::after{margin-left:auto}
body.singularity>.app-shell>.topbar .scene-menu{top:calc(100% + 6px);left:0;right:0}
body.singularity>.app-shell>.topbar .side-spacer{flex:1;order:7}
body.singularity>.app-shell>.topbar .side-quota{order:8;display:grid;gap:8px;margin-bottom:6px;padding:12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,236,214,.03)}
.side-quota-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px;font-size:12px;color:var(--text-2)}
.side-quota-row b{font:600 13px/1 var(--mono);color:var(--text);overflow-wrap:anywhere;text-align:right}
body.singularity>.app-shell>.topbar #accountOpen{order:9;margin:0;min-height:44px;border:1px solid var(--line-2);background:rgba(255,236,214,.04);color:var(--text)}
.shell-top{position:relative;z-index:3;display:flex;align-items:baseline;gap:14px;height:56px;padding:20px 28px 0;pointer-events:none}
.shell-top h1{margin:0;font:400 22px/1.2 var(--serif);letter-spacing:.04em;color:var(--hot);white-space:nowrap}
.shell-top .shell-seg{margin-left:auto;align-self:center;display:flex;gap:2px;padding:3px;border-radius:10px;background:rgba(255,236,214,.05);pointer-events:auto}
.shell-top .shell-seg button{min-height:28px;padding:0 12px;border:0;border-radius:8px;background:transparent;color:var(--text-2);font:12px var(--sans);cursor:pointer}
.shell-top .shell-seg button[aria-pressed=true]{background:rgba(255,236,214,.12);color:var(--text)}
.shell-top .shell-run{align-self:center;display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 10px;border-radius:8px;background:var(--amber-soft,rgba(255,150,70,.14));color:var(--hot,#ffd9b0);font-size:12px;white-space:nowrap}
.shell-top .shell-run svg{width:14px;height:14px}
.shell-top .shell-run[hidden],.shell-top .shell-off{display:none}
.shell-top p{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:var(--text-3)}
@media(max-width:1320px){
 body.singularity{--side-w:72px}
 body.singularity>.app-shell>.topbar{padding:16px 10px 12px}
 body.singularity>.app-shell>.topbar .brand{justify-content:center;padding:4px 0 12px}
 body.singularity>.app-shell>.topbar .brand-mark{font-size:0;gap:0}
 body.singularity>.app-shell>.topbar :is(.brand>span:last-child,.side-label,.topnav-link>span,.side-quota,.side-count),body.singularity>.app-shell>.topbar .scene-menu-toggle::after,body.singularity>.app-shell>.topbar .topbar-action:is(#favOpen,#histOpen,#sceneMenuOpen)>span{display:none}
 body.singularity>.app-shell>.topbar .topnav{margin-bottom:10px}
 body.singularity>.app-shell>.topbar .topnav-link,body.singularity>.app-shell>.topbar :is(.topbar-tools,.scene-menu-anchor)>.topbar-action{justify-content:center;min-height:44px;padding:0}
 body.singularity>.app-shell>.topbar #accountOpen{font-size:0;gap:0}
 body.singularity>.app-shell>.topbar .scene-menu{right:auto}
}
@media(max-width:760px){
 body.singularity{--side-w:0px;--side-h:calc(56px + env(safe-area-inset-bottom))}
 body.singularity>.app-shell>.topbar{inset:auto 0 0 0;width:auto;height:var(--side-h);flex-direction:row;align-items:center;justify-content:space-around;gap:0;padding:0 4px env(safe-area-inset-bottom);border-right:0;border-top:1px solid var(--line);background:rgba(10,9,8,.95)}
 body.singularity>.app-shell>.topbar :is(.brand,.side-spacer){display:none}
 body.singularity>.app-shell>.topbar .topnav{display:contents}
 body.singularity>.app-shell>.topbar .topnav-link{flex-direction:column;gap:2px;min-width:52px;min-height:48px;font-size:10px}
 body.singularity>.app-shell>.topbar .topnav-link>span{display:block}
 body.singularity>.app-shell>.topbar :is(.topbar-tools,.scene-menu-anchor)>.topbar-action{width:auto;min-width:44px}
 body.singularity>.app-shell>.topbar #accountOpen{border-color:transparent;background:transparent}
 body.singularity>.app-shell>.topbar .scene-menu{top:auto;bottom:calc(100% + 8px);left:auto;right:0}
 .shell-top{height:44px;padding:12px 16px 0}
 .shell-top h1{font-size:19px}
 .shell-top p{display:none}
}
#jtToast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));z-index:200;transform:translateX(-50%);max-width:min(560px,calc(100vw - 32px));padding:10px 16px;border-radius:12px;border:1px solid rgba(255,190,120,.28);background:rgba(22,19,16,.94);color:#f3e6d3;font-size:14px;box-shadow:0 12px 32px rgba(0,0,0,.45)}
#jtToast[data-bad="1"]{border-color:rgba(255,110,90,.5);color:#ffd0c4}
#jtToast[hidden]{display:none}
/* Workbench pages keep the light field as a quiet backdrop behind the three columns. */
@media(min-width:1100px){body.wb-route #singularityCanvas{filter:brightness(.32) saturate(.8)}}

/* Studio v2 account surfaces (2026-11-11): account panel, admin console, login split and sidebar footer follow the studio demo. Presentation only. */
body.singularity .account-dialog{width:min(560px,calc(100vw - 24px));padding:26px;border-radius:22px}
body.singularity .account-dialog::backdrop{background:rgba(6,5,4,.72);backdrop-filter:blur(10px)}
body.singularity .account-dialog-head{align-items:flex-start;margin-bottom:18px}
body.singularity .account-dialog h2{font:500 22px/1.3 var(--serif);margin:8px 0 0}
body.singularity .account-dialog .account-eyebrow{margin:0}
body.singularity .account-close{width:36px;height:36px;border:0;border-radius:10px;font-size:22px;line-height:1;flex:none}
body.singularity .account-close:hover{background:rgba(255,236,214,.06)}
body.singularity .account-dialog :is(.account-primary,.account-secondary){min-height:36px;padding:0 14px;border-radius:10px;font-size:13px}
body.singularity .account-dialog .account-secondary{background:rgba(255,236,214,.03);color:var(--text)}
body.singularity .account-dialog .account-secondary:hover{border-color:var(--line-3);background:rgba(255,236,214,.07)}
body.singularity .account-dialog .account-danger{color:#ff7d6e;border-color:rgba(255,125,110,.3)}
body.singularity .account-dialog .account-danger:hover{background:rgba(255,125,110,.1)}
.account-id-row{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.account-avatar{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;flex:none;background:linear-gradient(135deg,var(--amber),var(--ember));color:#1b0f04;font:700 16px/1 var(--sans);font-style:normal}
.account-id-text{flex:1;min-width:0}
body.singularity .account-identity{margin:0;color:var(--text);font-size:14px;font-weight:600}
.account-role{margin:2px 0 0;font-size:13px;color:var(--text-2)}
body.singularity .account-plan-badge{display:inline-flex;align-items:center;height:22px;padding:0 8px;border:0;border-radius:6px;background:rgba(255,236,214,.06);color:var(--text-2);font-size:12px}
body.singularity .account-plan-badge[data-state=ok]{background:rgba(122,217,166,.12);color:#7ad9a6}
body.singularity .account-plan-badge:empty{display:none}
body.singularity .account-membership{padding:16px;margin-bottom:18px;border:1px solid var(--line);border-radius:16px;background:rgba(255,236,214,.03)}
body.singularity .account-plan-line{margin-bottom:12px}
body.singularity .account-plan-line h3{font:500 15px/1.4 var(--sans);color:var(--text)}
body.singularity .account-plan-line>p{margin:0;font-size:12px;color:var(--text-3);text-align:right}
body.singularity .account-quota{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
body.singularity .account-quota>div{padding:12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,236,214,.04)}
body.singularity .account-quota dt{font-size:12px;color:var(--text-3)}
body.singularity .account-quota dd{margin:6px 0 0;font:500 18px/1 var(--mono);color:var(--text)}
body.singularity .account-membership>.account-help{margin:10px 0 0}
body.singularity #accountRedeemForm>label{display:block;margin-bottom:7px;font-size:12px;font-weight:400;color:var(--text-2)}
body.singularity .account-redeem-row input{min-height:40px;padding:0 12px;font-family:var(--mono);font-size:13px}
body.singularity .account-redeem-row .account-primary{min-height:40px}
body.singularity #accountRedeemForm>.account-help{margin:8px 0 0}
body.singularity .account-dialog-footer{justify-content:flex-start;margin-top:14px;padding-top:14px}
body.singularity .account-admin-entry{margin-right:0}
body.singularity #accountLogout{margin-left:auto}
@media(max-width:560px){body.singularity .account-quota{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Sidebar footer: balances with meters, one task line, then the account row with an avatar. */
.side-meter{height:4px;margin:-1px 0 3px;border-radius:4px;background:rgba(255,236,214,.08);overflow:hidden}
.side-meter i{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,var(--amber),var(--ember))}
.side-badge{padding:4px 7px;border-radius:99px;background:rgba(255,236,214,.07);color:var(--text-2);font:500 11px/1 var(--mono);white-space:nowrap}
body.singularity>.app-shell>.topbar .side-admin{order:5}
body.singularity>.app-shell>.topbar .side-admin[hidden]{display:none}
body.singularity>.app-shell>.topbar #sideAdminOpen svg{width:17px;height:17px;flex:none}
@media(min-width:1321px){
 body.singularity>.app-shell>.topbar #accountOpen{display:grid;grid-template-columns:34px minmax(0,1fr);align-content:center;justify-items:start;column-gap:10px;row-gap:2px;min-height:52px;padding:8px;border:0;border-radius:12px;background:transparent;font-size:14px;font-weight:600;text-align:left;white-space:nowrap;overflow:hidden}
 body.singularity>.app-shell>.topbar #accountOpen:hover{background:rgba(255,236,214,.05)}
 body.singularity>.app-shell>.topbar #accountOpen::before{content:attr(data-initial);grid-row:1/3;align-self:center;width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(135deg,var(--amber),var(--ember));-webkit-mask:none;mask:none;color:#1b0f04;font:700 14px/1 var(--sans)}
 body.singularity>.app-shell>.topbar #accountOpen::after{content:attr(data-sub);grid-column:2;max-width:100%;overflow:hidden;text-overflow:ellipsis;font-size:12px;font-weight:400;color:var(--text-3)}
 body.singularity>.app-shell>.topbar #accountOpen:not([data-sub])::after,body.singularity>.app-shell>.topbar #accountOpen[data-sub=""]::after{display:none}
}
@media(max-width:1320px){body.singularity>.app-shell>.topbar #sideAdminOpen>span{display:none}}
@media(max-width:760px){body.singularity>.app-shell>.topbar #sideAdminOpen{display:none}}

/* Admin console: underline tabs, a list-and-detail split, cards for forms and tables. */
.admin-plan-cards,body.singularity .account-dialog .admin-plan-new{display:none}
.admin-card{border:1px solid var(--line);border-radius:16px;background:rgba(255,236,214,.03)}
body.singularity .admin-form.admin-card{padding:22px}
body.singularity .admin-table-wrap.admin-card{margin:0}
body.singularity .admin-table-wrap th{padding:12px 16px;font-size:12px;font-weight:400;border-color:var(--line)}
body.singularity .admin-table-wrap td{padding:12px 16px;font-size:13px}
body.singularity .admin-table-wrap tr:last-child td{border-bottom:0}
body.singularity .admin-form>label{font-size:12px;font-weight:400;color:var(--text-2);gap:7px}
body.singularity .admin-form>label>:is(input,select,textarea){color:var(--text)}
body.singularity .admin-form fieldset{position:relative;margin:0;padding:0;border:0;gap:8px}
body.singularity .admin-form legend{margin-bottom:7px;padding:0;font-size:12px;color:var(--text-2)}
body.singularity .admin-form fieldset label{position:relative;display:inline-flex;align-items:center;height:30px;padding:0 11px;border:1px solid var(--line-2);border-radius:99px;font-size:13px;color:var(--text-2);cursor:pointer;transition:.15s}
body.singularity .admin-form fieldset label:hover{color:var(--text);border-color:var(--line-3)}
body.singularity .admin-form fieldset label:has(input:checked){color:var(--text);border-color:var(--amber-line);background:var(--amber-soft)}
body.singularity .admin-form fieldset label:has(input:focus-visible){outline:2px solid var(--amber);outline-offset:2px}
body.singularity .admin-form fieldset input[type=checkbox]{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
body.singularity .admin-form>label.admin-checkbox{gap:10px;font-size:13px;color:var(--text)}
body.singularity .admin-checkbox input[type=checkbox]{appearance:none;-webkit-appearance:none;position:relative;flex:none;width:36px;height:20px;margin:0;border-radius:20px;background:rgba(255,236,214,.14);cursor:pointer;transition:.2s}
body.singularity .admin-checkbox input[type=checkbox]::after{content:"";position:absolute;left:2px;top:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:.2s}
body.singularity .admin-checkbox input[type=checkbox]:checked{background:var(--ember)}
body.singularity .admin-checkbox input[type=checkbox]:checked::after{left:18px}
body.singularity .admin-verification{max-width:560px;margin:8px auto 0;border-radius:16px}
@media(min-width:761px){
 body.singularity .membership-admin{width:min(1180px,calc(100vw - 48px));height:min(860px,calc(100dvh - 48px));padding:26px 28px}
 body.singularity .admin-tabs{flex-wrap:nowrap;gap:4px;margin:0 0 22px;padding:0}
 body.singularity .admin-tabs button{margin-bottom:-1px;padding:10px 14px;border:0;border-bottom:2px solid transparent;border-radius:0;background:none;font-size:14px;white-space:nowrap}
 body.singularity .admin-tabs button:hover{color:var(--text)}
 body.singularity .admin-tabs button[aria-pressed=true]{border-color:var(--amber);background:none;color:var(--text)}
 body.singularity .membership-admin .account-primary.admin-full{justify-self:end;grid-column:1/-1;min-width:120px}
 body.singularity .admin-form.admin-card{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px}
 body.singularity .admin-form.admin-stack{grid-template-columns:1fr}
 body.singularity .admin-form.admin-stack .account-primary.admin-full{justify-self:stretch}
}
@media(min-width:1000px){
 .admin-split{display:grid;grid-template-columns:300px minmax(0,1fr);gap:18px;align-items:start}
 .admin-side>.account-help{margin:12px 2px 0}
 /* The plan select stays in the page for scripts and assistive tech; the cards are its visible form. */
 body.singularity .admin-split .admin-form-header{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;opacity:0;pointer-events:none}
 .admin-plan-cards{display:block}
 .admin-plan{display:block;width:100%;margin:0 0 10px;padding:14px;border:1px solid var(--line);border-radius:14px;background:rgba(255,236,214,.03);color:var(--text);font:inherit;text-align:left;cursor:pointer;transition:.15s}
 .admin-plan:hover{border-color:var(--line-3)}
 .admin-plan[aria-pressed=true]{border-color:var(--amber-line);background:var(--amber-soft)}
 .admin-plan>span{display:flex;align-items:center;gap:8px}
 .admin-plan b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:500}
 .admin-plan i{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:6px;background:rgba(255,236,214,.06);color:var(--text-2);font-size:12px;font-style:normal;white-space:nowrap}
 .admin-plan i[data-on=true]{background:rgba(122,217,166,.12);color:#7ad9a6}
 .admin-plan small{display:block;margin-top:4px;font-size:12px;color:var(--text-3)}
 body.singularity .account-dialog .admin-plan-new{display:inline-flex;align-items:center;justify-content:center;width:100%}
 body.singularity .account-dialog .admin-plan-new[aria-pressed=true]{border-color:var(--amber-line);color:var(--hot)}
}

/* Login: on desktop the gate splits into an art column (procedural tiles, no private images) and the form column. */
.account-gate-art{display:none}
.account-gate-brand{display:flex;flex-direction:column;align-items:center}
.account-gate-brand>:is(b,span:last-child){display:none}
.account-admin-alt{display:flex;flex-direction:column;align-items:center;gap:2px;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.account-admin-alt:has(#accountAdminLogin[hidden]){display:none}
.account-admin-alt .account-help{order:-1;margin:0}
body.singularity .account-admin-login{margin:0;padding:8px 0;font-size:12px;color:var(--text-3);text-decoration:underline;text-underline-offset:3px}
@media(min-width:1100px){
 body.singularity .account-gate{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(380px,.85fr);place-items:stretch;padding:0;overflow:hidden}
 .account-gate-art{position:relative;display:flex;flex-direction:column;justify-content:flex-end;padding:48px;overflow:hidden;background:radial-gradient(90% 70% at 60% 40%,rgba(255,140,60,.1),transparent 70%);transition:opacity .5s ease}
 .account-gate-leaving .account-gate-art{opacity:0}
 .account-gate-wall{position:absolute;inset:0;display:grid;grid-template-columns:repeat(5,1fr);gap:12px;padding:12px;opacity:.16;transform:rotate(-8deg) scale(1.3);pointer-events:none}
 .account-gate-wall i{aspect-ratio:3/4;border-radius:12px;background:radial-gradient(60% 50% at 30% 30%,#ffd9a8,transparent 70%),radial-gradient(70% 60% at 70% 75%,#ff8a3d,transparent 70%),#3a2a20}
 .account-gate-wall i:nth-child(3n){background:radial-gradient(55% 45% at 65% 30%,#f3e6d3,transparent 70%),radial-gradient(80% 60% at 30% 80%,#8a6a52,transparent 70%),#2a2420}
 .account-gate-wall i:nth-child(4n+1){background:radial-gradient(60% 50% at 50% 35%,#ffb45c,transparent 70%),radial-gradient(70% 70% at 20% 85%,#7a3b1c,transparent 70%),#241a14}
 .account-gate-wall i:nth-child(5n+2){background:radial-gradient(50% 45% at 35% 60%,#e9d2ff,transparent 70%),radial-gradient(70% 60% at 75% 25%,#b9805a,transparent 70%),#2b2226}
 .account-gate-wall i:nth-child(7n){background:radial-gradient(60% 50% at 60% 65%,#bfe5d6,transparent 70%),radial-gradient(70% 55% at 30% 25%,#c98a4e,transparent 70%),#1f2422}
 .account-gate-art .account-eyebrow{position:relative;margin:0}
 .account-gate-slogan{position:relative;margin:14px 0 0;font:500 44px/1.3 var(--serif);letter-spacing:.08em;color:var(--hot)}
 .account-gate-pitch{position:relative;max-width:40ch;margin:14px 0 0;font-size:14px;line-height:1.7;color:var(--text-2)}
 body.singularity .account-gate-card{display:flex;flex-direction:column;justify-content:center;gap:18px;width:auto;padding:32px;border:0;border-left:1px solid var(--line);border-radius:0;box-shadow:none;text-align:left;overflow-y:auto}
 body.singularity .account-gate-card>*{width:min(380px,100%);margin:0 auto}
 body.singularity .account-gate-card>[hidden]{display:none}
 body.singularity .account-gate-brand{flex-direction:row;gap:10px}
 body.singularity .account-gate-brand .account-monogram{width:30px;height:30px;margin:0}
 body.singularity .account-gate-brand>b{display:block;font:600 15px/1 var(--sans);letter-spacing:.04em;color:var(--text)}
 body.singularity .account-gate-brand>span:last-child{display:block;font-size:12px;color:var(--text-3)}
 body.singularity .account-gate h1{font:500 26px/1.3 var(--serif);letter-spacing:.05em;margin-bottom:-12px}
 body.singularity .account-gate .account-intro{line-height:1.6}
 body.singularity .account-gate [role=status]{min-height:20px}
 body.singularity .account-login-form{display:flex;flex-direction:column;gap:0}
 body.singularity .account-login-form label{font-size:12px;margin-bottom:7px}
 body.singularity .account-login-form input{min-height:44px;margin-bottom:18px;padding:0 12px;font-family:var(--mono);font-size:14px}
 body.singularity .account-login-form .account-primary{width:100%;min-height:44px;border-radius:12px}
 body.singularity .account-login-form .account-help{text-align:left;color:var(--text-3)}
 body.singularity .account-gate-card>.account-secondary{width:auto;margin:0 auto 0 max(0px,calc((100% - 380px)/2));border-radius:10px}
 body.singularity .account-admin-alt{align-items:flex-start;margin-top:0}
}
/* Shell lightbox (2026-11-12): pictures and videos open above the page and its library. */
#jtLightbox{position:fixed;inset:0;z-index:180;display:grid;grid-template-rows:auto minmax(0,1fr) auto;justify-items:center;gap:12px;padding:18px 72px 20px;background:rgba(6,5,4,.92);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);outline:0;cursor:zoom-out}
#jtLightbox[hidden]{display:none}
#jtLightbox .lb-note{margin:0;min-height:18px;color:#a79d90;font:12px/18px var(--mono,ui-monospace,monospace);letter-spacing:.04em;cursor:default}
#jtLightbox .lb-stage{display:grid;place-items:center;min-width:0;min-height:0;width:100%;height:100%}
#jtLightbox .lb-stage :is(img,video){display:block;max-width:calc(100vw - 144px);max-height:calc(100dvh - 124px);width:auto;height:auto;object-fit:contain;border-radius:12px;box-shadow:0 30px 80px rgba(0,0,0,.6);background:#0b0a09}
#jtLightbox .lb-stage img{cursor:zoom-in}
#jtLightbox .lb-stage video{cursor:default;min-width:min(480px,100%)}
#jtLightbox .lb-cmp{position:relative;display:inline-grid;max-width:calc(100vw - 144px);max-height:calc(100dvh - 124px);border-radius:12px;overflow:hidden;box-shadow:0 30px 80px rgba(0,0,0,.6);cursor:ew-resize;touch-action:none;user-select:none}
#jtLightbox .lb-cmp img{display:block;max-width:calc(100vw - 144px);max-height:calc(100dvh - 124px);width:auto;height:auto;border-radius:0;box-shadow:none;cursor:ew-resize;pointer-events:none;-webkit-user-drag:none}
#jtLightbox .lb-cmp .lb-cmp-a{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;clip-path:inset(0 calc(100% - var(--cmp)) 0 0)}
#jtLightbox .lb-cmp-line{position:absolute;top:0;bottom:0;left:var(--cmp);width:2px;margin-left:-1px;background:#fff;box-shadow:0 0 10px rgba(0,0,0,.7);outline:0}
#jtLightbox .lb-cmp-line::after{content:'↔';position:absolute;top:50%;left:50%;width:34px;height:34px;margin:-17px;border:2px solid #fff;border-radius:50%;background:rgba(12,10,8,.68);color:#fff;font:600 13px/30px system-ui,sans-serif;text-align:center}
#jtLightbox .lb-cmp-tag{position:absolute;top:12px;padding:4px 10px;border-radius:999px;background:rgba(12,10,8,.72);border:1px solid rgba(255,236,214,.22);color:#f4eee6;font-size:12px;font-weight:600;pointer-events:none}
#jtLightbox .lb-cmp-tl{left:12px}
#jtLightbox .lb-cmp-tr{right:12px}
#jtLightbox .lb-bar{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;cursor:default}
#jtLightbox .lb-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:38px;padding:0 16px;border:1px solid rgba(255,236,214,.16);border-radius:999px;background:rgba(26,22,19,.9);color:#f4eee6;font:500 13px/1 inherit;text-decoration:none;cursor:pointer;transition:border-color .2s,background .2s}
#jtLightbox .lb-btn:hover{border-color:rgba(255,190,120,.5);background:rgba(40,33,27,.95)}
#jtLightbox .lb-btn[hidden]{display:none}
#jtLightbox .lb-btn svg{width:16px;height:16px;flex:none}
#jtLightbox .lb-btn[data-state=saved]{color:#ffa95c;border-color:rgba(255,169,92,.45)}
#jtLightbox .lb-btn[data-state=saved] svg{fill:currentColor}
#jtLightbox .lb-nav{position:absolute;top:50%;width:44px;height:44px;margin-top:-22px;border:1px solid rgba(255,236,214,.16);border-radius:50%;background:rgba(26,22,19,.9);color:#f4eee6;font-size:22px;line-height:1;cursor:pointer}
#jtLightbox .lb-nav[hidden]{display:none}
#jtLightbox .lb-prev{left:16px}
#jtLightbox .lb-next{right:16px}
#jtLightbox:fullscreen{padding:0;gap:0;background:#000}
#jtLightbox:fullscreen .lb-note{display:none}
#jtLightbox:fullscreen .lb-stage :is(img,video),#jtLightbox:fullscreen .lb-cmp,#jtLightbox:fullscreen .lb-cmp img{max-width:100vw;max-height:100vh;border-radius:0;box-shadow:none}
#jtLightbox:fullscreen .lb-stage img{cursor:zoom-out}
#jtLightbox:fullscreen .lb-bar{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);opacity:.35;transition:opacity .2s}
#jtLightbox:fullscreen .lb-bar:hover{opacity:1}
/* Single-image stocking refine picker modal (2026-11-21). */
#jtRefineModal{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:16px;background:rgba(6,5,4,.76);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
#jtRefineModal[hidden]{display:none}
#jtRefineModal .rf-card{width:min(460px,100%);padding:18px 20px;border:1px solid rgba(255,236,214,.18);border-radius:18px;background:#171411;color:#f4eee6;box-shadow:0 28px 80px rgba(0,0,0,.65)}
#jtRefineModal .rf-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
#jtRefineModal .rf-head h3{margin:0;font-size:16px;font-weight:600}
#jtRefineModal .rf-close{width:32px;height:32px;border:0;border-radius:8px;background:rgba(255,236,214,.08);color:#f4eee6;font-size:20px;line-height:1;cursor:pointer}
#jtRefineModal .rf-note{margin:8px 0 12px;color:#a79d90;font-size:12px;line-height:1.55}
#jtRefineModal .rf-label{margin:10px 0 6px;color:#c9bfb2;font-size:12px;font-weight:600}
#jtRefineModal .rf-grid{display:flex;flex-wrap:wrap;gap:6px}
#jtRefineModal .rf-chip{min-height:32px;padding:4px 11px;border:1px solid rgba(255,236,214,.16);border-radius:9px;background:rgba(255,236,214,.05);color:#e7dfd4;font:500 12px/1 inherit;cursor:pointer}
#jtRefineModal .rf-chip.active{border-color:rgba(255,180,92,.75);background:rgba(240,168,80,.2);color:#ffd599}
#jtRefineModal .rf-foot{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
#jtRefineModal .rf-go{border-color:rgba(255,180,92,.6);background:rgba(240,168,80,.22);color:#ffe0b3}
/* Showcase management tab in the administrator console (2026-11-12). */
.admin-showcase-group{margin:18px 0 10px;font-size:13px;font-weight:500;color:var(--text-2,#b9afa2)}
.admin-showcase-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.admin-showcase-card{display:flex;flex-direction:column;gap:10px;padding:12px}
.admin-showcase-art{position:relative;display:grid;place-items:center;aspect-ratio:16/10;border-radius:10px;overflow:hidden;background:radial-gradient(120% 90% at 50% 0,rgba(255,236,214,.07),transparent 60%),#15120f;color:#857c70;font-size:12px}
.admin-showcase-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.admin-showcase-card small{color:#857c70;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.admin-showcase-card input[type=text]{width:100%;min-height:36px;box-sizing:border-box}
.admin-showcase-actions{display:flex;flex-wrap:wrap;gap:6px}
.admin-showcase-actions button{flex:1 1 auto;min-height:32px;padding:0 10px;font-size:12px;white-space:nowrap}
