.theme-toggle{display:flex!important;align-items:center;gap:11px;border:1px solid #e6ddeb!important;background:#fffdff!important;color:#70567f!important;padding:12px!important;margin:20px 0 5px;border-radius:10px!important;font-size:12px!important;text-align:left}
.theme-toggle svg{flex-shrink:0}.theme-switch{width:30px;height:18px;flex-shrink:0;margin-left:auto;border-radius:20px;background:#e9deef;padding:3px}.theme-switch>span{display:block;width:12px;height:12px;border-radius:50%;background:#8b719b;transition:transform .2s}
html[data-theme=dark]{color-scheme:dark;--cream:#1d1823;--ink:#eee6f5;--muted:#baacc7;--green:#b49bce;--line:#403549;background:#151119}
html[data-theme=dark] body{background:#151119;color:#eee6f5}
html[data-theme=dark] .cms{--cream:#1d1823;--ink:#eee6f5;--muted:#baacc7;--green:#b49bce;--line:#403549;background:#151119;color:#eee6f5}
html[data-theme=dark] .cms .studio-main{background:#151119}
html[data-theme=dark] .cms .studio-sidebar{background:#1d1823;border-color:#403549}
html[data-theme=dark] .cms :is(.panel,.article-table,.stats>div,.editor-fields,.editor-options,.editor-preview,.media-card,.picker-grid button,.social-preview>div,.cms-modal>section,.modal>div){background:#211b29;border-color:#403549;color:#eee6f5}
html[data-theme=dark] .cms :is(.welcome-panel,.faq-editor,.auto-optimizer,.auto-structure-preview,.auto-faq,.auto-answer-preview,.image-upload-context,.inspection-result,.google-note,.access-note,.rich-hint,.rich-loading,.preview-banner){background:#292132;border-color:#4a3a57;color:#d4c6df}
html[data-theme=dark] .cms :is(input:not([type=checkbox]):not([type=radio]):not([type=color]),textarea,select){background:#19151f!important;color:#eee6f5!important;border-color:#50405e!important}
html[data-theme=dark] .cms input[readonly]{background:#282030!important;color:#cec0db!important}
html[data-theme=dark] .cms :is(input,textarea)::placeholder{color:#a897b7;opacity:1}
html[data-theme=dark] .cms :is(h1,h2,h3,h4,strong,.brand,.row-title){color:#eee6f5}
html[data-theme=dark] .cms :is(p,small,label,td,.user-email,.form-help,.studio-heading p,.quick-panel button span,.recent-item small,.seo-disclaimer,.auto-before,.auto-note,.auto-evidence,.auto-review-head,.auto-outline){color:#bfb0cc}
html[data-theme=dark] .cms :is(.eyebrow,.studio-label,.studio-footnote,.brand-star,.text-action,.back,.close-modal,.seo-panel summary,.auto-evidence summary){color:#c3a6df}
html[data-theme=dark] .cms :is(th,.rich-toolbar){background:#2b2235;color:#cab9d7;border-color:#4a3a57}
html[data-theme=dark] .cms :is(td,tr,.user,.quick-panel>button,.recent-item,.seo-panel,.seo-technical>div,.google-setup,.auto-apply,.auto-review-head){border-color:#403549}
html[data-theme=dark] .cms .cms-navigation>button{color:#c4b4d2}
html[data-theme=dark] .cms .nav-icon{background:#2b2334;color:#bda1d5}
html[data-theme=dark] .cms .cms-navigation>button:is(:hover,.side-active){background:#34283f;color:#f3e8ff}
html[data-theme=dark] .cms .cms-navigation>button.side-active .nav-icon{background:#a483c2;color:#1c1225}
html[data-theme=dark] .cms :is(.nav-count,.avatar){background:#40314e;color:#e1c7f7}
html[data-theme=dark] .cms .button{background:#b49bce;border-color:#b49bce;color:#201428}
html[data-theme=dark] .cms .button:hover{background:#c6afe0;border-color:#c6afe0}
html[data-theme=dark] .cms .button.outline{background:transparent;color:#e0c9f3;border-color:#6e567f}
html[data-theme=dark] .cms .button.outline:hover{background:#35283f}
html[data-theme=dark] .cms :is(.tabs button,.seo-tabs button,.rich-toolbar button){color:#bfb0cc}
html[data-theme=dark] .cms :is(.tabs button.selected,.seo-tabs button.selected,.rich-toolbar button.is-active,.rich-toolbar button:hover){background:#40304e;color:#f0ddff}
html[data-theme=dark] .cms :is(.badge.published,.badge.approved,.score-pill.good,.auto-applied){background:#263b33;color:#a9dbbf}
html[data-theme=dark] .cms :is(.badge.draft,.badge.scheduled,.badge.pending,.score-pill.low,.auto-stale){background:#433625;color:#e8cb92}
html[data-theme=dark] .cms :is(.badge.spam,.seo-error){background:#452932;color:#f1b6bf}
html[data-theme=dark] .cms .danger{background:#aa5062;border-color:#aa5062;color:#fff1f4}
html[data-theme=dark] .cms .text-action.delete{color:#e5a0af}
html[data-theme=dark] .cms :is(.toast,.saving-indicator){background:#382a44;border-color:#6b4f80;color:#f1e3fc}
html[data-theme=dark] .cms .modal{background:#08050ccc}
html[data-theme=dark] .cms .media-detail>img{background:#19151f}
html[data-theme=dark] .cms .welcome-panel>span{color:#493455}
html[data-theme=dark] .cms .theme-toggle{background:#2b2235!important;border-color:#50405e!important;color:#e0c9f3!important}
html[data-theme=dark] .theme-switch{background:#73548c}html[data-theme=dark] .theme-switch>span{background:#ecdcfa;transform:translateX(12px)}
html[data-theme=dark] .cms :is(button,a,input,textarea,select):focus-visible{outline:2px solid #c7a4e5;outline-offset:3px}
@media(max-width:760px){.cms .theme-toggle{margin:0 0 0 auto;padding:8px 10px!important}.theme-toggle>span:not(.theme-switch){display:none}.theme-toggle .theme-switch{display:none}}
@media(prefers-reduced-motion:reduce){.theme-switch>span{transition:none}}
html[data-theme=dark] .cms :is(.recent-item,.recent-item strong,.row-title,.row-title strong,.view-blog,.quick-panel button strong,.rich-editor,.tiptap,.prose,.seo-technical strong,.seo-technical a,.auto-fields,.auto-answer-fields){color:#e6d9f1}
html[data-theme=dark] .cms .studio-sidebar .brand-star{color:#c3a6df}
html[data-theme=dark] .cms .welcome-panel>span{color:#493455}
/* Keep every sidebar action reachable on shorter screens. */
@media(min-width:761px){
 .cms .studio-sidebar{height:100vh;height:100dvh;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:#b6a0c4 transparent;scrollbar-gutter:stable}
 .cms .studio-sidebar>*{flex-shrink:0}
 .cms .studio-sidebar::-webkit-scrollbar{width:6px}
 .cms .studio-sidebar::-webkit-scrollbar-thumb{background:#b6a0c4;border-radius:10px}
 html[data-theme=dark] .cms .studio-sidebar{scrollbar-color:#735b86 transparent}
 html[data-theme=dark] .cms .studio-sidebar::-webkit-scrollbar-thumb{background:#735b86}
}

html[data-theme=dark] .community-notice{background:#292132;border-color:#4a3a57;color:#e6d9f1}html[data-theme=dark] .community-detail .message-content{border-color:#403549}html[data-theme=dark] .community-row{color:#e6d9f1}

/* File upload labels use the same accessible palette as action buttons. */
.cms label.button.upload-button{display:inline-flex;align-items:center;justify-content:center;background:#70567f;color:#fffdff;border:1px solid #70567f;padding:12px 20px;border-radius:5px;font-size:12px;font-weight:600;line-height:1.4;margin:0;letter-spacing:0}
.cms label.button.upload-button:hover{background:#5c4568;border-color:#5c4568}
.cms label.button.upload-button:focus-within{outline:3px solid #bca5c9;outline-offset:3px}
.cms label.button.upload-button:has(input:disabled){opacity:.55;cursor:wait}
html[data-theme=dark] .cms label.button.upload-button{background:#c9b1db;border-color:#c9b1db;color:#241a2c}
html[data-theme=dark] .cms label.button.upload-button:hover{background:#ddc9ea;border-color:#ddc9ea}

@media(max-width:760px){
.cms .studio-sidebar{min-width:0;max-width:100%}
.cms-navigation{min-width:0;flex:1 1 100%;overscroll-behavior-x:contain}
.cms-navigation>button{flex-shrink:0;min-height:44px}
.cms .studio-main{min-width:0;padding:0 16px 32px}
.cms .studio-heading>div{min-width:0;max-width:100%}
.cms .studio-heading h1{overflow-wrap:anywhere}
.cms .overview-grid,.cms .manage-grid,.cms .settings-grid,.cms .editor-layout{grid-template-columns:minmax(0,1fr)}
.cms .overview-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
.cms .panel,.cms .editor-fields,.cms .editor-options{min-width:0;padding:20px}
.cms input,.cms textarea,.cms select{font-size:16px}
.cms .button,.cms label.button.upload-button{min-height:44px}
.cms .media-intro{flex-wrap:wrap;gap:14px}
.cms .media-intro input{width:100%;margin:0;min-width:0}
.cms .media-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.cms .image-upload-context input{width:100%;min-width:0}
.cms .media-detail>img{max-width:100%;height:auto;max-height:240px}
.cms .cms-modal>section{max-height:90dvh;min-width:0}
.cms .editor-heading .actions{flex-wrap:wrap;gap:8px}
.cms .table-scroll{max-width:100%;overflow-x:auto}
.cms .auto-heading,.cms .seo-workbench-title{flex-wrap:wrap}
.cms .auto-fields,.cms .auto-review-grid{grid-template-columns:minmax(0,1fr)}
}
