/* Shared member components. Article canvas, exported HTML and poster artwork stay independent. */
body:is(.unified-workspace,.xj-writing-surface){--xj-ink:#082338;--xj-muted:#536779;--xj-primary:#006bff;--xj-hover:#0056d6;--xj-line:#dce3e7;--xj-soft:#f4f8ff;--xj-paper:#fff;--xj-panel-radius:6px;--xj-control-radius:4px;--xj-shadow:0 1px 2px #08233808,0 14px 34px -26px #08233847;--primary:var(--xj-primary);--accent:var(--xj-primary);--accent-hover:var(--xj-hover);--accent-soft:#006bff0d;--accent-border:var(--xj-line);--blue-600:var(--xj-primary);--navy-900:var(--xj-ink);--text:var(--xj-ink);--fg:var(--xj-ink);--fg-2:var(--xj-muted);--muted:var(--xj-muted);--border:var(--xj-line);--bg-card:#fff;--surface:#fff;--surface-2:var(--xj-soft);color:var(--xj-ink);font-family:'PingFang SC','Microsoft YaHei',system-ui,sans-serif}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(button,.btn,input:not([type=radio]):not([type=checkbox]):not([type=range]):not([type=color]),select,textarea,summary){border-radius:var(--xj-control-radius)!important;font-family:inherit;box-shadow:none!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(button,.btn){font-size:13px;font-weight:600;line-height:1.45;background-image:none!important;transition:background-color .15s,border-color .15s,color .15s}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.btn,.btn-ghost,.btn-secondary,.studio-new,.new-btn,.settings-trigger,.scene-chip,.ct-btn){background:#fff!important;border:1px solid var(--xj-line)!important;color:var(--xj-ink)!important;min-height:36px;padding:8px 12px}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.btn-primary,.primary,.ai-gen-btn,.send-btn,#sendBtn,#brandNext,#pfSave,#businessLaunchForm button[type=submit],#tscBtn,.tsc-advice-btn,#btnDownload,#btnAiGen,#btnPtGen){background:var(--xj-primary)!important;background-image:none!important;border-color:var(--xj-primary)!important;color:#fff!important;box-shadow:none!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.btn-primary,.primary,.ai-gen-btn,.send-btn,#sendBtn,#brandNext,#pfSave,#businessLaunchForm button[type=submit],#tscBtn,.tsc-advice-btn,#btnDownload):hover:not(:disabled){background:var(--xj-hover)!important;border-color:var(--xj-hover)!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.btn-ghost,.btn-secondary,.studio-new,.new-btn,.settings-trigger):hover:not(:disabled){background:var(--xj-soft)!important;border-color:#aac9f5!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(button,.btn):disabled{opacity:.5;cursor:not-allowed;filter:none!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(input:not([type=range]):not([type=color]),select,textarea){color:var(--xj-ink);border-color:var(--xj-line)!important;background-color:#fff}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:2px solid var(--xj-primary);outline-offset:3px}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.card,.uc-card,.fuc-panel,.fuc-side-panel,.business-area,.business-launch,.poster-card,.poster-modal,.modal-card,.modal-content,.ai-panel,.ctl-group,.tsc-detail,.tsc-item,.tsc-history-panel,.tsc-search,.tsc-empty,.tsc-error,.ux-view-state,.chat-input,.bubble,.msg-col.manuscript-message,dialog,.usage-card,.recharge-card,.help-card,.task-card,.file-task-card,.phone-shell){border-radius:var(--xj-panel-radius)!important;border-color:var(--xj-line)!important;box-shadow:var(--xj-shadow)!important}
body.unified-workspace :is(.agent-head,.page-head,.uc-card-head,.help-head,.usage-head,.workbench-head){color:var(--xj-ink);background:transparent!important;border-color:var(--xj-line)!important}
body.unified-workspace :is(.agent-head h1,.page-head h1,.help-head h1,.usage-head h1,.tsc-hero h1){font-size:25px!important;line-height:1.35!important;font-weight:700!important;color:var(--xj-ink)!important;letter-spacing:0}
body.unified-workspace :is(.agent-head h2,.page-head h2,.uc-card-head h2,.help-head h2,.usage-head h2,.tsc-detail-head h2){font-size:20px!important;line-height:1.4;font-weight:700;color:var(--xj-ink)!important}
body.unified-workspace :is(.uc-card h3,.card>h3,.help-card h3,.tsc-history-panel h3){font-size:16px;line-height:1.5;color:var(--xj-ink)!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.chip,.badge,.tag,.pill,.q,.quick-hint,.scene-chip,.ai-tab,.tab-btn,.seg button,.session-item,.session-item .icon-chat,.compose-mode select,.ct-btn){border-radius:4px!important;box-shadow:none!important}
body.unified-workspace :is(.ai-tab,.tab-btn,.seg button).active,body.xj-writing-surface .scene-chip.active{background:#006bff0d!important;color:var(--xj-primary)!important;border-color:#aac9f5!important}
body.unified-workspace :is(.poster-export-actions,.toolbar,.uc-brand-footer){gap:8px}
body.unified-workspace .poster-export-actions :is(button,.btn){border-radius:4px!important;min-height:40px;font-size:13px!important}
body.unified-workspace #tscPage{max-width:1200px;color:var(--xj-ink)}
body.unified-workspace #tscPage .tsc-hero{background:linear-gradient(110deg,#edf5ff,#f2efff 75%,#fff)!important;border:1px solid var(--xj-line)!important;border-radius:6px!important;box-shadow:var(--xj-shadow)!important;padding:24px!important;gap:20px}
body.unified-workspace #tscPage .tsc-hero :is(h1,h1 em,p b){color:var(--xj-ink)!important}
body.unified-workspace #tscPage .tsc-hero p{color:var(--xj-muted)!important;line-height:1.7}
body.unified-workspace #tscPage .tsc-eyebrow{color:#6552d7!important;letter-spacing:0;margin-bottom:10px}
body.unified-workspace #tscPage .tsc-visual{flex-basis:26%;min-width:180px;max-width:240px;filter:none}
body.unified-workspace #tscPage .tsc-visual text{fill:var(--xj-muted)!important}
body.unified-workspace #tscPage .tsc-visual .tsc-ai-mark{fill:var(--xj-ink)!important}
body.unified-workspace #tscPage .tsc-detail-head{background:var(--xj-soft)!important;color:var(--xj-ink)!important;border-bottom:1px solid var(--xj-line)}
body.unified-workspace #tscPage .tsc-search{background:#fff!important;padding:18px!important;margin-top:16px}
body.unified-workspace #tscPage :is(.tsc-tip,.tsc-meta,.tsc-advice p,.tsc-advice li){color:var(--xj-muted)!important}
body.unified-workspace #tscPage :is(.tsc-kv .v.hl,.tsc-advice h4,.tsc-advice strong){color:var(--xj-primary)!important}
/* The iframe uses exactly the same tokens as the surrounding member shell. */
body.xj-writing-surface{background:#f4f8ff!important;--studio-ink:var(--xj-ink);--studio-muted:var(--xj-muted);--studio-line:var(--xj-line);--studio-accent:var(--xj-primary);--studio-bg:#f4f8ff;--studio-paper:#fff}
body.xj-writing-surface .nav{background:#fff!important;border:0!important;border-bottom:1px solid var(--xj-line)!important;flex:none;position:relative;z-index:30}
body.xj-writing-surface .writing-nav.xj-creation-bar{display:flex;align-items:center;gap:10px;padding:10px 18px;min-height:56px;box-sizing:border-box;overflow:visible;flex-wrap:nowrap!important}
.xj-creation-bar>label{font-size:12px;color:var(--xj-muted);white-space:nowrap}
.xj-creation-bar>select{height:36px;min-width:155px;padding:6px 26px 6px 10px;font-size:13px;font-weight:600;border:1px solid var(--xj-line);max-width:100%}
.xj-creation-note{font-size:11px;color:var(--xj-muted)}
.xj-creation-tools{margin-left:auto;position:relative;flex:none;font-size:13px}
.xj-creation-tools summary{list-style:none;cursor:pointer;min-height:36px;padding:8px 12px;border:1px solid var(--xj-line);background:#fff;box-sizing:border-box;color:var(--xj-ink)}
.xj-creation-tools summary::-webkit-details-marker{display:none}.xj-creation-tools summary:after{content:'⌄';margin-left:10px}
.xj-creation-tools>div{position:absolute;right:0;top:calc(100% + 6px);width:195px;display:grid;padding:6px;background:white;border:1px solid var(--xj-line);border-radius:6px;box-shadow:0 10px 28px #0823381a;z-index:40}
.xj-creation-tools a{padding:10px;border-radius:4px;color:var(--xj-ink);text-decoration:none;font-size:12px}.xj-creation-tools a:hover{background:var(--xj-soft)}
body.xj-writing-surface .chat-head{background:#fff!important;border-bottom:1px solid var(--xj-line)!important;min-height:70px;padding:12px 20px!important}
body.xj-writing-surface .chat-body{background:#f4f8ff!important;padding:24px max(20px,calc((100% - 900px)/2))!important}
body.xj-writing-surface .chat-wrap{max-width:none!important;border:0!important;background:#fff!important}
body.xj-writing-surface .chat-input-wrap{background:#fff!important;border-color:var(--xj-line)!important;padding:14px max(20px,calc((100% - 900px)/2))!important}
body.xj-writing-surface .chat-input{background:#fff!important;border:1px solid var(--xj-line)!important;box-shadow:none!important}
body.xj-writing-surface .sidebar{background:#fff!important;border-color:var(--xj-line)!important}
body.xj-writing-surface .msg.user .bubble{background:#edf5ff!important;color:var(--xj-ink)!important}
body.xj-writing-surface :is(.studio-title .t,.welcome h2,.welcome h1,.welcome-title){color:var(--xj-ink)!important}
body.xj-writing-surface :is(.welcome,.welcome-box){background:transparent!important;box-shadow:none!important}
@media(max-width:700px){body.unified-workspace #tscPage .tsc-hero{padding:18px!important}body.unified-workspace :is(.agent-head h1,.page-head h1,.help-head h1,.tsc-hero h1){font-size:21px!important}body.xj-writing-surface .writing-nav.xj-creation-bar{padding:8px 10px;gap:7px}.xj-creation-note{display:none}.xj-creation-bar>label{font-size:11px}.xj-creation-bar>select{min-width:0;flex:1;width:130px}.xj-creation-tools summary{font-size:12px;padding:8px}.xj-creation-tools>div{width:180px}body.xj-writing-surface .chat-head{padding:10px!important}body.xj-writing-surface .chat-body{padding:18px 12px!important}body.xj-writing-surface .chat-input-wrap{padding:12px!important}}
@media(prefers-reduced-motion:reduce){body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(button,.btn){transition:none}}
/* Retire legacy animated gradient frames and mixed message shapes. */
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.composer-row,.chat-input){border:1px solid var(--xj-line)!important;background:#fff!important;border-radius:6px!important;box-shadow:none!important}
body:is(.unified-workspace,.xj-writing-surface) :is(.composer-row,.chat-input)::before{display:none!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.composer-row,.chat-input):focus-within{border-color:var(--xj-primary)!important;box-shadow:0 0 0 2px #006bff12!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.msg.user,.msg.assistant,.msg .bubble){border-radius:6px!important;background-image:none!important;border-color:var(--xj-line)!important;box-shadow:none!important}
body.unified-workspace :is(.help-hero,.usage-stat-card,.wb-sec,.wb-gen,.wb-hist,.help-sec,.help-path,.help-path-card,.ux-tool-card,.filetasks-card){border-radius:6px!important;border-color:var(--xj-line)!important;box-shadow:var(--xj-shadow)!important}
body.unified-workspace :is(.help-hero,.usage-stat-balance){background:var(--xj-soft)!important;color:var(--xj-ink)!important}
body.unified-workspace .help-hero :is(h1,p){color:var(--xj-ink)!important}
body.unified-workspace :is(.help-hero h1,.a-head-text h1,.wb-title){font-size:25px!important;line-height:1.35;font-weight:700!important;color:var(--xj-ink)!important}
body.unified-workspace :is(.help-sec h2,.wb-sec-head h2){font-size:18px!important;color:var(--xj-ink)!important}
body.unified-workspace :is(.usage-stat-card,.wb-sec,.help-sec){background:#fff!important}
body.unified-workspace :is(.usage-stat-lbl,.usage-stat-card small,.help-eyebrow){color:var(--xj-muted)!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(#send,.wb-gen-go,#settings-done){background:var(--xj-primary)!important;color:#fff!important;border:1px solid var(--xj-primary)!important;border-radius:4px!important}
body.xj-writing-surface .hot-card{border-radius:6px!important;border-color:var(--xj-line)!important;background:#fff!important;box-shadow:none!important}.xj-writing-surface .hot-card:before{display:none!important}
body.xj-writing-surface:is(body,#xj-component-scope) .chat-input #send-btn{white-space:nowrap;gap:5px;flex:none;min-width:82px!important;width:82px!important;padding:8px 10px!important}
body.xj-writing-surface .chat-input textarea{min-width:0!important;flex:1;overflow-wrap:anywhere}
body.unified-workspace :is(#workspaceResults h1,.layout-heading h1){font-size:25px!important;line-height:1.35!important;font-weight:700!important;color:var(--xj-ink)!important}
body.unified-workspace #tscPage #tscRefresh{background:#fff!important;color:var(--xj-ink)!important;border:1px solid var(--xj-line)!important}
/* Han Jian's latest direction: compact rail, gradient type and interaction outlines. */
body.unified-workspace #agentRail.rail-hidden{width:90px!important;min-width:90px!important}
body.unified-workspace #agentRail.rail-hidden .rail-collapsed-bar{display:grid!important;grid-template-rows:repeat(var(--rail-mini-count,14),minmax(0,1fr)) 28px;gap:3px!important;padding:6px 2px!important;height:100%!important;max-height:100%!important;overflow:visible!important;box-sizing:border-box;align-items:center!important}
body.unified-workspace #agentRail.rail-hidden .rail-mini-item{height:100%!important;max-height:52px;min-height:0!important;padding:0!important;gap:2px!important;justify-content:center!important;align-self:center;overflow:visible;flex:none}
body.unified-workspace #agentRail.rail-hidden .rail-mini-ic,body.unified-workspace #agentRail.rail-hidden .rail-mini-ic :is(svg,.ic){width:clamp(18px,2.6vh,22px)!important;height:clamp(18px,2.6vh,22px)!important;flex:none}
body.unified-workspace #agentRail.rail-hidden .rail-mini-label{font-size:10px!important;line-height:12px!important;letter-spacing:0!important;white-space:nowrap!important}
body.unified-workspace #agentRail.rail-hidden .rail-mini-expand{height:28px!important;min-height:28px!important;margin:0!important;padding:3px!important}
@media(max-height:660px) and (min-width:701px){body.unified-workspace #agentRail.rail-hidden .rail-collapsed-bar{gap:1px!important;padding:3px 2px!important;grid-template-rows:repeat(var(--rail-mini-count,14),minmax(0,1fr)) 24px}body.unified-workspace #agentRail.rail-hidden .rail-mini-ic,body.unified-workspace #agentRail.rail-hidden .rail-mini-ic :is(svg,.ic){width:16px!important;height:16px!important}body.unified-workspace #agentRail.rail-hidden .rail-mini-label{font-size:9px!important;line-height:10px!important}body.unified-workspace #agentRail.rail-hidden .rail-mini-expand{min-height:24px!important;height:24px!important}}
body.unified-workspace .workspace-welcome{min-height:280px;padding:28px 32px;grid-template-columns:1.25fr 1fr}
body.unified-workspace .workspace-welcome-kicker{font-size:15px;color:#5263dc;font-weight:650;letter-spacing:1px}
body.unified-workspace .workspace-welcome h1{font-size:clamp(32px,3.1vw,46px);line-height:1.2;letter-spacing:-1px;white-space:normal;margin:20px 0 18px;color:#082338;font-weight:800}
.workspace-welcome-equation,.workspace-welcome-result{display:block}
.workspace-welcome-result{margin-top:4px}
body.unified-workspace .workspace-welcome p{font-size:15px;color:#61758a;line-height:1.6;white-space:nowrap}
body.unified-workspace .workspace-welcome-art{width:43%;height:100%;right:12px;bottom:0}
body.unified-workspace :is(.workspace-welcome-result,.business-launch h2,.home-partners-heading h2){background:linear-gradient(105deg,#006bff 5%,#6352f0 58%,#a13eb9 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:#6352f0;width:fit-content}
body.unified-workspace .business-launch h2{font-weight:750!important;font-size:21px!important}
body.unified-workspace .home-partners-heading h2{font-weight:750!important;font-size:22px!important}
@media(max-width:1100px){body.unified-workspace .workspace-welcome{padding:24px;min-height:260px}body.unified-workspace .workspace-welcome h1{font-size:34px}body.unified-workspace .workspace-welcome-kicker{font-size:12px;letter-spacing:0}body.unified-workspace .workspace-welcome p{font-size:12px}}
@media(max-width:700px){body.unified-workspace .workspace-welcome{padding:20px;min-height:300px;grid-template-columns:1fr;align-items:start}body.unified-workspace .workspace-welcome h1{font-size:32px;letter-spacing:-.8px;margin:17px 0 12px}body.unified-workspace .workspace-welcome-kicker{font-size:11px}body.unified-workspace .workspace-welcome p{font-size:11px;white-space:normal;max-width:220px}body.unified-workspace .workspace-welcome-art{width:38%;height:38%;right:5px;bottom:0}body.unified-workspace .business-launch h2{font-size:19px!important}body.unified-workspace .home-partners-heading h2{font-size:20px!important}}
/* Overlay only the border: never cover content or intercept clicks. */
/* One animated perimeter per composer; focus belongs to its container. */
@property --xj-ring-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.composer-row,.chat-input,#businessLaunchForm,.business-area,.fuc-panel,.fuc-side-panel,.tsc-item,.usage-stat-card,.hot-card){position:relative;isolation:isolate}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.composer-row,.chat-input,#businessLaunchForm){border-color:transparent!important;outline:none!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.composer-row,.chat-input,#businessLaunchForm) textarea,
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.composer-row,.chat-input,#businessLaunchForm) textarea:is(:focus,:focus-visible){border:0!important;outline:none!important;box-shadow:none!important;background:transparent!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.composer-row,.chat-input,#businessLaunchForm,.business-area,.fuc-panel,.fuc-side-panel,.tsc-item,.usage-stat-card,.hot-card)::before{content:'';display:block!important;position:absolute;inset:0;z-index:3;pointer-events:none;border:2px solid transparent;border-radius:inherit;background:conic-gradient(from var(--xj-ring-angle),#54aaff 0deg,#a5ddff 65deg,#dabdff 135deg,#a585f2 210deg,#89e4ec 280deg,#54aaff 360deg) border-box;background-size:100% 100%;-webkit-mask:linear-gradient(#fff 0 0) padding-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) padding-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:0;transition:opacity .2s;animation:none!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.composer-row,.chat-input,#businessLaunchForm)::before{opacity:1;animation:xj-ring-orbit 5s linear infinite!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.composer-row,.chat-input,#businessLaunchForm){box-shadow:0 0 10px #8acbff38,0 0 18px #b99cf52b!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.composer-row,.chat-input,#businessLaunchForm):focus-within{border-color:transparent!important;box-shadow:0 0 12px #8acbff59,0 0 22px #b99cf540!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.business-area,.fuc-panel,.fuc-side-panel,.tsc-item,.usage-stat-card,.hot-card,#xj-motion-card):is(:hover,:focus-visible)::before{opacity:1;animation:xj-ring-orbit 5s linear infinite!important}
body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.business-area,.fuc-panel,.fuc-side-panel,.tsc-item,.usage-stat-card,.hot-card,#xj-motion-card):is(:hover,:focus-visible){border-color:transparent!important;outline:none!important;box-shadow:0 0 10px #8acbff38,0 0 18px #b99cf52b!important}
@keyframes xj-ring-orbit { to { --xj-ring-angle: 360deg; } }
@media(prefers-reduced-motion:reduce){body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope):is(body,#xj-reduced-motion) :is(.composer-row,.chat-input,#businessLaunchForm,.business-area,.fuc-panel,.fuc-side-panel,.tsc-item,.usage-stat-card,.hot-card)::before{animation:none!important;transition:none!important}}
@media(forced-colors:active){body.unified-workspace :is(.workspace-welcome-result,.business-launch h2,.home-partners-heading h2){background:none;-webkit-text-fill-color:CanvasText;color:CanvasText}body:is(.unified-workspace,.xj-writing-surface):is(body,#xj-component-scope) :is(.composer-row,.chat-input,#businessLaunchForm,.business-area,.fuc-panel,.fuc-side-panel,.tsc-item,.usage-stat-card,.hot-card)::before{display:none!important}}

body.unified-workspace #viewRoot .xj-setup-actions{width:auto!important}
