/* Personal workspace theme; casino and embedded preview artwork keep brand colors. */
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal){--bg:#f5f7fa;--surface:#fff;--panel:#fff;--text:#202b3a;--muted:#637084;--line:#d5dde7;--accent:#2563eb;--accent-ink:#fff;--green:#2563eb;--gold:#2563eb;color:#202b3a;color-scheme:light}
body.editing-mode[data-workspace-theme=light],body[data-workspace-theme=light] .studio-shell{background:#f5f7fa}
body[data-workspace-theme=light] .studio-shell :is(.studio-header,.demo-bar){background:#fff;border-color:#d5dde7;color:#35445a;box-shadow:0 2px 8px #18283f08}
body[data-workspace-theme=light] .studio-shell :is(.admin-panel,.dashboard-metric,.metric,.category-edit-row,.role-cards article,.agent-card,.pack-edit-card,.reward-edit-card,.custom-theme-workbench,.brand-details,.custom-theme-editor,.notice-card){background:#fff;border-color:#d5dde7;color:#202b3a;box-shadow:none}
body[data-workspace-theme=light] .admin-modal .modal{background:#fff;color:#202b3a;border-color:#d5dde7}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) :is(input:not([type=checkbox]):not([type=color]):not([type=file]),select,textarea){background:#fff!important;color:#202b3a!important;border:1px solid #bdc9d8!important;font-weight:400!important;box-shadow:none}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) :is(input,textarea)::placeholder{color:#8893a3!important;font-weight:400}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) option{background:#fff;color:#202b3a}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) :is(.field>label,.mobile-admin-section>label,.muted,.admin-footnote,.small.muted,.dashboard-metric-label,.dashboard-metric small,.dashboard-swipe-hint,.demo-label){color:#637084!important;opacity:1}
body[data-workspace-theme=light] .studio-shell .studio-tabs{background:transparent;border-color:#d5dde7}
body[data-workspace-theme=light] .studio-shell .studio-tabs button{background:#fff;color:#536176;border-color:#d5dde7;font-weight:400;box-shadow:none}
body[data-workspace-theme=light] .studio-shell :is(.studio-tabs,.sub-tabs) button.active{background:#eaf2ff!important;color:#174fbd!important;border-color:#2563eb!important;box-shadow:none}
body[data-workspace-theme=light] .studio-shell :is(.studio-tabs,.sub-tabs) button:hover{background:#eff4fb;color:#174fbd}
body[data-workspace-theme=light] .studio-shell .sub-tabs button{color:#536176}
body[data-workspace-theme=light] .studio-shell :is(.pe-logo,.brand-details>summary){color:#234e86}
body[data-workspace-theme=light] .studio-shell .work-mode-badge{background:#eff5ff;border-color:#c4d7f3;color:#234e86}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) :is(.btn.secondary,.integration-link,.reference-camera,.metric-picker summary,.activity-more summary){background:#fff!important;color:#2454a0!important;border:1px solid #bccce1!important;box-shadow:none!important}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) .btn.primary,body[data-workspace-theme=light] .header-save-actions [data-action=save-section]{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important;font-weight:500;box-shadow:none}
body[data-workspace-theme=light] .header-save-actions [data-action=preview-draft]{background:#fff;color:#2454a0;border-color:#bccce1}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) :is(.btn.ghost,.header-save-actions [data-action=reload-content]){background:transparent;color:#536176}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) :is(.info-box,.role-preview,.pill.purple,.metric-options){background:#eff5ff;color:#36516f;border-color:#ccdbee}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) :is(.data-table th,.data-table td){border-color:#d5dde7;color:#35445a}
body[data-workspace-theme=light] .studio-shell :is(.palette-option,.layout-option){background:#fff;color:#35445a;border-color:#d5dde7}
body[data-workspace-theme=light] .studio-shell :is(.palette-option.active,.layout-option.active){border-color:#2563eb;background:#eff5ff}
body[data-workspace-theme=light] .studio-shell :is(.inventory-title small,.inventory-column-labels,.category-edit-heading label){color:#637084}
body[data-workspace-theme=light] .studio-shell .dashboard-metric.needs-attention{background:#fff4f4;border-color:#e4b1b1;color:#a52b32}
body[data-workspace-theme=light] .studio-shell .unsaved-indicator{color:#895517;background:#fff3db}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) :is(.help-tip,.reference-camera){background:#f0f5fc;color:#2454a0;border-color:#bccce1}
body[data-workspace-theme=light] .studio-shell .reward-actions{background:transparent}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) :is(input,button,select,textarea):focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.workspace-appearance{margin-bottom:24px}.workspace-appearance select{width:100%;max-width:320px;padding:12px;border-radius:8px}.workspace-appearance h3{font-size:20px;font-weight:500}
body[data-workspace-theme=light] .studio-shell .btn.studio-entry{background:#7453ba;border-color:#7453ba;color:#fff}

/* Finish contrast across legacy admin components, with distinct clickable surfaces. */
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) :is(h1,h2,h3,h4,strong,b,label,summary,th,td,.metric-value,.dashboard-metric-value,.access-role,.inventory-title,.account-summary,.check-row):not(.local-theme-preview *):not(.content-reference *):not(.btn *):not(.tip-bubble *){color:#243247}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) :is(p,small,.body-copy,.panel-subtitle,.account-settings-identity):not(.local-theme-preview *):not(.content-reference *):not(.tip-bubble *){color:#59697d}
body[data-workspace-theme=light] .studio-shell .studio-tabs{background:#e2e9f2;padding:10px 10px 0;border-color:#bbc9db}
body[data-workspace-theme=light] .studio-shell .studio-tabs button{background:#edf2f8;color:#334863;border-color:#c3cfde}
body[data-workspace-theme=light] .studio-shell .studio-tabs button.active{background:#d8e8ff!important;color:#154cac!important;border-color:#2563eb!important}
body[data-workspace-theme=light] .studio-shell .sub-tabs{background:#edf2f8;border-radius:9px;padding:6px 12px;gap:8px}
body[data-workspace-theme=light] .studio-shell .sub-tabs button{padding:10px 14px;border-radius:6px;color:#41536e}
body[data-workspace-theme=light] .studio-shell .sub-tabs button.active{background:#dceaff!important;color:#174fae!important}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) :is(.btn.secondary,.integration-link){background:#e9f0fa!important;color:#224d8d!important;border-color:#b1c5e1!important}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) :is(.btn.secondary,.integration-link):hover{background:#d9e7fa!important}
body[data-workspace-theme=light] .studio-shell .studio-header{background:#eef3fa}.studio-shell .studio-header .page{border-top:1px solid var(--line)}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) .btn:not(.primary):not(.studio-entry):not(.integration-link){color:#315479}
body[data-workspace-theme=light] :is(.studio-shell,.admin-modal) .btn.primary,body[data-workspace-theme=light] .header-save-actions [data-action=save-section]{color:#fff!important}
body[data-workspace-theme=light] .studio-shell :is(.dashboard-metric,.metric){background:#eef3f9}
body[data-workspace-theme=light] .studio-shell .tip-bubble{background:#22354d;color:#fff}
body[data-workspace-theme=dark] :is(.studio-shell,.admin-modal){--bg:#101216;--surface:#1c2026;--panel:#1c2026;--text:#e7eaf0;--muted:#a4afbd;--line:#3b424d;--accent:#80bdff;color-scheme:dark}
body.editing-mode[data-workspace-theme=dark],body[data-workspace-theme=dark] .studio-shell{background:#101216}
body[data-workspace-theme=dark] .studio-shell :is(.studio-header,.demo-bar,.admin-panel,.dashboard-metric,.metric,.reward-edit-card,.category-edit-row,.agent-card,.pack-edit-card){background:#1c2026;color:#e7eaf0;border-color:#3b424d}
body[data-workspace-theme=dark] :is(.studio-shell,.admin-modal) :is(input:not([type=checkbox]):not([type=color]),textarea,select){background:#13161b!important;color:#e7eaf0!important;border-color:#434b57!important}
body[data-workspace-theme=dark] .studio-shell .studio-tabs{background:#15191f}
body[data-workspace-theme=dark] .studio-shell .studio-tabs button{background:#282e37;color:#cad3df;border-color:#434b57}
.brand-four-column{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}
.brand-four-column .theme-choice-rows{display:grid;grid-template-columns:1fr 1fr;gap:16px;min-width:0}
.brand-four-column .theme-choice-rows section{margin:0}.brand-four-column .theme-choice-grid{grid-template-columns:1fr}
.brand-four-column .theme-choice-rows>div{grid-column:1/-1}.brand-four-column .custom-theme-choice{grid-column:auto}
.brand-four-column .custom-theme-workbench{margin:0;padding:0;border:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;min-width:0}
.brand-four-column .custom-colors{grid-template-columns:1fr}.brand-four-column .local-theme-preview{padding:14px}.brand-four-column .local-theme-panel{padding:14px}.brand-four-column .local-theme-panel h3{font-size:19px}
.brand-four-column #custom-theme-live{top:150px;min-width:0}.brand-four-column .local-theme-preview header span{line-height:1.6}
.account-settings-identity{display:grid;gap:12px;border-bottom:1px solid var(--line);padding-bottom:20px;margin-bottom:20px;overflow-wrap:anywhere}.account-settings-identity .pill{justify-self:start}.workspace-account-links{margin-top:20px}
.category-color-control input[type=color]{width:90px;height:44px;padding:3px;cursor:pointer}
.player-shell :is(.section-head h2,.type-results-heading){color:var(--category-heading,#c35cff)}
.player-shell .game-meta .fav,.player-shell .game-meta .fav.active,.player-shell .game-meta .fav:hover{background:transparent!important;border:0!important;box-shadow:none!important;outline-offset:3px}
.player-shell .game-meta .fav.active svg{fill:currentColor}
.workspace-reduced-motion .studio-shell *,.workspace-reduced-motion .admin-modal *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(max-width:1200px){.brand-four-column{grid-template-columns:1fr}.brand-four-column .custom-theme-workbench{grid-template-columns:1fr 1fr}.brand-four-column .theme-choice-grid{grid-template-columns:1fr 1fr}.brand-four-column #custom-theme-live{position:static}}
@media(max-width:640px){.brand-four-column .theme-choice-rows,.brand-four-column .custom-theme-workbench{grid-template-columns:1fr}.brand-four-column .custom-theme-workbench #custom-theme-live{grid-row:1}}
