/* Mainland presentation and shared account layout; market flags stay separate. */
html[data-market="international"][data-account-view]{--bg:var(--account-bg);--surface:var(--account-surface);--surface-2:var(--account-surface-2);--ink:var(--account-text);--ink-2:var(--account-muted);--muted:var(--account-muted);--border:var(--account-border);color-scheme:dark}
html[data-market="international"][data-account-view] .cn-profile-form input{background:var(--account-bg);color:var(--account-text);border-radius:6px}
.cn-profile-form{padding:24px;margin-top:20px;max-width:850px;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.cn-profile-form h2{font-size:17px;margin:0 0 20px}.cn-profile-form label{display:block;font-size:13px;color:var(--ink-2);margin-bottom:8px}.cn-profile-form input{width:100%;min-height:42px;padding:10px 12px;border:1px solid var(--border)}.cn-profile-form dl{display:grid;grid-template-columns:140px minmax(0,1fr);gap:15px;margin:25px 0;color:var(--ink-2);font-size:13px}.cn-profile-form dd{margin:0;overflow-wrap:anywhere}.cn-profile-form dt{color:var(--muted)}.cn-profile-form button{padding:8px 15px}.cn-profile-form p{font-size:12px;color:var(--muted);margin-top:14px}
html[data-workspace="mainland"]{--cm-shell-width:248px;--cm-int-font:"Segoe UI",system-ui,-apple-system,"Microsoft YaHei",sans-serif;--bg:#161826;--surface:#232532;--surface-2:#292b39;--white:#232532;--ink:#e9e9ed;--ink-2:#b2b6ca;--muted:#a0a4b7;--muted-2:#a0a4b7;--border:rgba(233,233,237,.14);--accent:#9184d9;--accent-dark:#a99dea;--accent-h:#a99dea;--accent-soft:rgba(181,171,252,.12);--accent-pale:#292b39;--accent-border:rgba(181,171,252,.28);--accent-b:rgba(181,171,252,.28);--ok:#82d1b1;--ok-bg:rgba(130,209,177,.1);--warn:#e2b77b;--warn-bg:rgba(226,183,123,.1);--warning:#e2b77b;--warning-soft:rgba(226,183,123,.1);--danger:#f0a4a4;--shadow:none;--shadow-sm:none;color-scheme:dark}
html[data-workspace="mainland"] body{background:var(--bg);color:var(--ink);font-family:var(--cm-int-font);font-size:14px;line-height:1.6;overflow-x:hidden}
html[data-workspace="mainland"] .cm-shell-compliance{font-size:9px;line-height:1.5;color:#9b9fb1;margin-top:7px}
html[data-workspace="mainland"] .cm-shell-invite-notice{display:none!important}
html[data-workspace="mainland"] .cm-shell-main{margin-left:248px;min-width:0}
html[data-workspace="mainland"] :is(.btn,.input,.select,input,select,textarea){font-family:var(--cm-int-font)}
html[data-workspace="mainland"] .btn{border-color:var(--border);background:var(--surface-2);color:var(--ink);border-radius:7px;font-size:13px;font-weight:500;box-shadow:none;min-height:38px}
html[data-workspace="mainland"] .btn:hover{border-color:var(--accent);background:var(--accent-soft)}
html[data-workspace="mainland"] .btn-primary{color:#fff;background:var(--accent);border-color:var(--accent)}
html[data-workspace="mainland"] :is(input,select,textarea,.input,.select){color:var(--ink);background:var(--bg);border-color:var(--border);border-radius:6px}
html[data-workspace="mainland"] :is(button,a,input,select,textarea):focus-visible{outline:2px solid #b5abfc;outline-offset:3px}
html[data-workspace="mainland"] :is(h1,.page-head h1,.page-header h1){font-size:24px;font-weight:650;letter-spacing:-.3px}
html[data-workspace="mainland"] .int-card-kicker{font-size:12px}
html[data-workspace="mainland"] .int-dashboard-content{padding-top:28px}
html[data-workspace="mainland"] .int-welcome h1{font-weight:650}
html[data-workspace="mainland"] #int-refresh-btn{display:inline-flex}
html[data-workspace="mainland"] #onboarding-modal{display:none!important}
.cn-onboarding-band{display:flex;gap:20px;align-items:center;justify-content:space-between;padding:22px;background:var(--accent-soft);border:1px solid var(--border);border-radius:8px}.cn-onboarding-band[hidden]{display:none}.cn-onboarding-band h2{font-size:17px;margin:0 0 6px}.cn-onboarding-band p{font-size:13px;color:var(--muted);margin:0}
html:is([data-workspace="mainland"],[data-account-view]) #account-dashboard .account-scroll{display:block!important;padding:28px;width:100%;max-width:none}
html:is([data-workspace="mainland"],[data-account-view]) #account-dashboard .page-header .btn{display:inline-flex}
html:is([data-workspace="mainland"],[data-account-view]) #account-dashboard .page-header{padding:24px 28px;border-bottom:1px solid var(--border);height:auto}
html:is([data-workspace="mainland"],[data-account-view]) .account-layout{display:block}
html:is([data-workspace="mainland"],[data-account-view]) .account-profile-section{display:none!important}
html:is([data-workspace="mainland"],[data-account-view]) .profile-card{display:block;max-width:850px;min-height:120px}
html:is([data-workspace="mainland"],[data-account-view]) .profile-invite{margin-top:0;border-left:0;padding:24px;max-width:100%;background:var(--surface);border:1px solid var(--border);border-radius:8px}
html:is([data-workspace="mainland"],[data-account-view]) .profile-invite>.account-section-title{display:block}
html:is([data-workspace="mainland"],[data-account-view]) #account-invite-section .account-invite-card{border:0;padding:0;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:22px}
html:is([data-workspace="mainland"],[data-account-view]) .profile-invite #account-invite-explainer{position:static;width:auto;height:auto;clip:auto;clip-path:none;overflow:visible;white-space:normal;margin:10px 0 0}
html:is([data-workspace="mainland"],[data-account-view]) .account-section-title{font-size:15px;font-weight:600}
html:is([data-workspace="mainland"],[data-account-view]) .account-plan-card{margin-bottom:22px}
html:is([data-workspace="mainland"],[data-account-view])[data-account-view="account"] #account-invite-section,html:is([data-workspace="mainland"],[data-account-view])[data-account-view="invite"] :is(.account-profile-section,#account-plan-section,.account-layout){display:none!important}
html:is([data-workspace="mainland"],[data-account-view]) .cn-account-overview{display:flex;align-items:center;justify-content:space-between;gap:24px}
html:is([data-workspace="mainland"],[data-account-view]) .cn-account-overview #identity{flex:1;min-width:0;max-width:none;min-height:0;margin:0;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}
html:is([data-workspace="mainland"],[data-account-view]) .cn-account-overview .profile-identity{padding:0}
html:is([data-workspace="mainland"],[data-account-view]) .cn-account-overview .profile-plan-area{width:auto;min-width:0;flex-wrap:wrap;justify-content:flex-end}
html:is([data-workspace="mainland"],[data-account-view]) .cn-account-overview .profile-plan-copy{text-align:right}
html:is([data-workspace="mainland"],[data-account-view]) .cn-account-overview .profile-plan-badges{justify-content:flex-end;flex-wrap:wrap}
html:is([data-workspace="mainland"],[data-account-view]) .cn-account-overview .entitlement-summary-chip{padding:3px 9px;border-radius:6px}
html:is([data-workspace="mainland"],[data-account-view]) #account-plan-section .entitlement-summary{display:none}
html:is([data-workspace="mainland"],[data-account-view]) .cn-account-editor{margin-top:16px;border-top:1px solid var(--border);padding-top:12px}
html:is([data-workspace="mainland"],[data-account-view]) .cn-account-editor summary{width:fit-content;min-height:36px;padding:6px 0;color:#c6bcff;font-size:13px;cursor:pointer}
html:is([data-workspace="mainland"],[data-account-view]) .cn-account-editor summary:focus-visible{outline:2px solid #b5abfc;outline-offset:3px;border-radius:3px}
html:is([data-workspace="mainland"],[data-account-view]) .cn-account-editor .cn-profile-form{margin:10px 0 0;max-width:none;padding:18px;background:var(--bg)}
html:is([data-workspace="mainland"],[data-account-view]) .cn-account-editor .cn-profile-form h2{display:none}
html:is([data-workspace="mainland"],[data-account-view]) .cn-account-editor .cn-profile-form input{max-width:460px}
@media(max-width:720px){html:is([data-workspace="mainland"],[data-account-view]) .cn-account-overview{align-items:stretch;flex-direction:column;gap:18px}html:is([data-workspace="mainland"],[data-account-view]) .cn-account-overview .profile-plan-area{justify-content:space-between}html:is([data-workspace="mainland"],[data-account-view]) .cn-account-overview .profile-plan-copy{text-align:left}html:is([data-workspace="mainland"],[data-account-view]) .cn-account-overview .profile-plan-badges{justify-content:flex-start}html:is([data-workspace="mainland"],[data-account-view]) .cn-account-editor .cn-profile-form dl{grid-template-columns:1fr;gap:5px}html:is([data-workspace="mainland"],[data-account-view]) .cn-account-editor .cn-profile-form dd+dt{margin-top:10px}}
html:is([data-workspace="mainland"],[data-account-view]) .quota-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
html:is([data-workspace="mainland"],[data-account-view]) :is(.entitlement-summary,.entitlement-summary-grid){background:var(--surface-2);border-color:var(--border)}
html:is([data-workspace="mainland"],[data-account-view]) .entitlement-summary{background:var(--surface-2);box-shadow:none}
html:is([data-workspace="mainland"],[data-account-view]) .entitlement-summary-head h3{color:var(--ink)}
html:is([data-workspace="mainland"],[data-account-view]) .entitlement-item{border-color:var(--border)}
html:is([data-workspace="mainland"],[data-account-view]) .entitlement-value{color:var(--ink)}
html[data-workspace="mainland"] #citation-styles-workbench{padding:28px;max-width:none}
html[data-workspace="mainland"] #citation-styles-workbench :is(.panel,.csl-help,.style-card,.page-btn,.tab,.preview-panel){background:var(--surface);border-color:var(--border);color:var(--ink);box-shadow:none}
html[data-workspace="mainland"] #citation-styles-workbench .style-card.selected,html[data-workspace="mainland"] #citation-styles-workbench .style-card:hover{background:var(--accent-soft);border-color:var(--accent)}
html[data-workspace="mainland"] #citation-styles-workbench .workspace{grid-template-columns:minmax(0,1.3fr) minmax(300px,1fr)}
html[data-workspace="mainland"] #citation-styles-workbench .filters{grid-template-columns:minmax(140px,1fr) repeat(3,minmax(85px,.5fr)) auto}
html[data-workspace="mainland"] #citation-styles-workbench .style-card{grid-template-columns:1fr;padding:18px;font-size:13px}
html[data-workspace="mainland"] #citation-styles-workbench .style-title{font-size:14px;font-weight:600}
html[data-workspace="mainland"] #citation-styles-workbench .style-actions{justify-content:flex-start}
html[data-workspace="mainland"] #citation-styles-workbench .tag{background:var(--accent-soft);color:#c6bcff;font-weight:500}
html[data-workspace="mainland"] .csl-help-browser{color:#111;background:#fff}
html[data-workspace="mainland"] .shell>.main{max-width:none;padding:28px}
html[data-workspace="mainland"] .shell :is(.welcome,.route-card,.guide-card,.guide-panel,.why,.why-step,.format-selector,.route-stage,.source-card,.step-card,.tutorial-card,.method-card){background:var(--surface);color:var(--ink);border-color:var(--border);box-shadow:none;border-radius:8px}
html[data-workspace="mainland"] .shell :is(.route-actions a,.route-catalog,.guide-body,.guide-step,.source-list,.route-filter){background:var(--surface-2);color:var(--ink);border-color:var(--border)}
html[data-workspace="mainland"] #auth-panel{background:var(--bg);color:var(--ink)}
html[data-workspace="mainland"] :is(.auth-card,.auth-wrap,.auth-box){background:var(--surface);color:var(--ink);border-color:var(--border);box-shadow:none}
html[data-workspace="mainland"] .auth-method-tabs{background:var(--surface-2);border-color:var(--border)}
html[data-workspace="mainland"] :is(.auth-title,.auth-card h1,.auth-card h2,.auth-field label,.auth-tab,.auth-method-tab){color:var(--ink)}
html[data-workspace="mainland"] :is(.auth-sub,.auth-hint,.auth-check,.auth-footer){color:var(--muted)}
html[data-workspace="mainland"] .auth-field input{color:var(--ink);background:var(--bg);border-color:var(--border)}
html[data-workspace="mainland"] :is(.auth-tab.active,.auth-method-tab.active){color:#c6bcff;background:var(--accent-soft)}
html[data-workspace="mainland"] :is(.auth-btn,.auth-sms-btn){background:var(--accent);color:white;border-color:var(--accent)}
html[data-workspace="mainland"] .library-topbar-avatar{color:#fff}
html[data-workspace="mainland"] #word-web-onboarding{margin:18px 0;padding:19px 22px;max-width:none;background:var(--surface);border:1px solid var(--border);border-radius:8px;color:var(--ink)}
html[data-workspace="mainland"] #word-web-onboarding>ol{display:none}
html[data-workspace="mainland"] #word-web-onboarding>h2{font-size:16px;color:var(--ink)}
html[data-workspace="mainland"] #word-web-return{color:var(--ink);background:var(--accent-soft);border:1px solid var(--border);border-radius:7px;padding:16px;margin-top:15px}
html[data-workspace="mainland"] #word-web-return :is(p,li){color:var(--ink-2)}
html[data-workspace="mainland"] .managed-backup-panel[hidden]{display:none!important}
@media(max-width:1100px){html[data-workspace="mainland"] #citation-styles-workbench .workspace{grid-template-columns:1fr}html[data-workspace="mainland"] #citation-styles-workbench .filters{grid-template-columns:1fr 1fr}}
@media(max-width:720px){html:is([data-workspace="mainland"],[data-account-view]) .cm-shell-main{margin-left:0}html:is([data-workspace="mainland"],[data-account-view]) #account-dashboard .account-scroll,html:is([data-workspace="mainland"],[data-account-view]) #citation-styles-workbench,html:is([data-workspace="mainland"],[data-account-view]) .shell>.main{padding:20px 16px}html:is([data-workspace="mainland"],[data-account-view]) .quota-grid{grid-template-columns:1fr}html:is([data-workspace="mainland"],[data-account-view]) #account-invite-section .account-invite-card{flex-direction:column}html:is([data-workspace="mainland"],[data-account-view]) .int-dashboard-content{padding:20px 16px}html:is([data-workspace="mainland"],[data-account-view]) .cn-onboarding-band{align-items:flex-start;flex-direction:column}html:is([data-workspace="mainland"],[data-account-view]) .cm-shell-nav-item{min-height:42px}}

html[data-workspace="mainland"] .int-welcome h1{overflow-wrap:anywhere}
html[data-workspace="mainland"] #word-web-onboarding[hidden]{display:none!important}
html[data-workspace="mainland"] #word-web-onboarding[data-compact="true"]{padding:14px 18px;margin:12px 0;background:var(--accent-soft)}
html[data-workspace="mainland"] #word-web-onboarding[data-compact="true"]>:is(h2,label,select,ol,button,div[role="status"]){display:none!important}
html[data-workspace="mainland"] #word-web-onboarding[data-compact="true"] #word-web-return{padding:0;border:0;margin:0;background:transparent}
html[data-workspace="mainland"] #word-web-onboarding summary{cursor:pointer;color:#c6bcff;font-size:13px;min-height:32px}
html[data-workspace="mainland"] #library-list>div[style]{background:var(--surface)!important}
html[data-workspace="mainland"] #library-list>div[style]>div{background:var(--surface)!important}

html[data-workspace="mainland"] .shell :is(.topbar,.material-choice,.outcome-card,.guide-top,.guide-progress,.slider-shell,.step,.step-head,.slider-controls,.previous-step,.guide-badges span){background:var(--surface);color:var(--ink);border-color:var(--border);box-shadow:none;border-radius:8px}
html[data-workspace="mainland"] .shell .topbar{background:var(--bg);border-radius:0}
html[data-workspace="mainland"] .shell :is(.material-choice strong,.outcome-card strong,.guide-top h2,.step-title){color:var(--ink)}
html[data-workspace="mainland"] .shell .choice-examples b{background:var(--surface-2);color:var(--ink-2)}
html[data-workspace="mainland"] .shell .choice-examples b.preferred-source{background:var(--accent);color:#fff}
html[data-workspace="mainland"] .shell .route-card.recommended .route-copy{background:var(--surface-2)}
html[data-workspace="mainland"] .shell .guide-start span{color:var(--warn)}
html[data-workspace="mainland"] .shell .progress-track{background:var(--border)}
html[data-workspace="mainland"] .shell .step-list button{background:var(--surface-2);color:var(--ink-2)}
html[data-workspace="mainland"] .shell .step-list button.active{background:var(--accent-soft);color:#c6bcff}
html[data-workspace="mainland"] .shell .welcome h2{font-size:27px;font-weight:650;line-height:1.5;letter-spacing:-.3px}
html[data-workspace="mainland"] .shell .guide-top h2{font-size:26px;line-height:1.5;letter-spacing:-.3px}

/* Keep authentication surfaces consistent with the signed-in workspace. */
html[data-workspace="mainland"] .auth-form-panel{background:var(--bg);padding:32px}
html[data-workspace="mainland"] .auth-card{max-width:460px;padding:28px;border:1px solid var(--border);border-radius:10px}
html[data-workspace="mainland"] .auth-card-logo{margin-bottom:24px}
html[data-workspace="mainland"] .auth-card-desc{color:var(--muted);margin-bottom:22px}
html[data-workspace="mainland"] .auth-brand{background:#1b1d2c;border-color:var(--border);padding:48px 40px}
html[data-workspace="mainland"] .auth-brand::before,html[data-workspace="mainland"] .auth-brand::after{display:none}
html[data-workspace="mainland"] :is(.auth-brand-sub,.auth-brand-feat-text span,.auth-brand-footer,.auth-bottom,.wechat-desc){color:var(--muted)}
html[data-workspace="mainland"] .auth-field input::placeholder{color:#999db0}
html[data-workspace="mainland"] .auth-sms-row input{min-width:0}
html[data-workspace="mainland"] :is(.auth-btn,.auth-sms-btn){box-shadow:none;min-height:44px;border-radius:6px}
html[data-workspace="mainland"] .auth-or{color:var(--muted);margin:16px 0}
html[data-workspace="mainland"] .auth-tabs{gap:12px;margin-bottom:16px}
html[data-workspace="mainland"] .auth-tab{min-height:36px;padding:5px 10px;border-radius:4px}
html[data-workspace="mainland"] .auth-brand-logo{margin-bottom:32px}
@media(max-width:720px){html[data-workspace="mainland"] .auth-form-panel{padding:20px 16px;justify-content:flex-start}html[data-workspace="mainland"] .auth-card{padding:24px 20px}}

@media(max-width:720px){
 html[data-workspace="mainland"] .cm-shell-mobile-appbar{background:#1b1d2c;border-color:var(--border)}
 html[data-workspace="mainland"] .cm-shell-mobile-brand{color:var(--ink)}
 html[data-workspace="mainland"] :is(.cm-shell-mobile-menu,.cm-shell-drawer-close){background:var(--surface);color:var(--ink);border-color:var(--border)}
}

html[data-workspace="mainland"] .cm-shell-main .notice{border-color:rgba(226,183,123,.4)}
html[data-workspace="mainland"] .cm-shell-main .notice h2{color:var(--warn)}
html[data-workspace="mainland"] .hero .badge{background:var(--accent-soft);color:#c6bcff;border-color:var(--accent-border)}
html[data-workspace="mainland"] .hero .badge.ok{background:var(--ok-bg);color:var(--ok);border-color:rgba(130,209,177,.3)}
html[data-workspace="mainland"] :is(.download-meta,.steps) code{background:var(--surface-2);color:#c6bcff;overflow-wrap:anywhere}
html[data-workspace="mainland"] .cm-shell-main .steps li,html[data-workspace="mainland"] .cm-shell-main .faq details{border-color:var(--border)}
html[data-workspace="mainland"] .cm-shell-main .unsupported{background:var(--surface-2);color:var(--muted);border-color:var(--border)}

.cn-profile-form[hidden]{display:none!important}
html:is([data-workspace="mainland"],[data-account-view]) #account-profile-heading{display:none}

html[data-workspace="mainland"] .auth-or+.auth-btn{background:var(--surface-2);color:var(--ink-2);border:1px solid var(--border)}
