.theme-controls{display:flex;justify-content:flex-end;align-items:center;min-height:48px;padding:6px 18px;gap:10px}
.theme-toggle{display:inline-flex;align-items:center;gap:10px;min-height:36px;padding:5px 10px;border:1px solid #66545f;border-radius:999px;background:#211e25;color:#f6f3f5;cursor:pointer;font:13px/1.5 "PingFang SC","Microsoft YaHei",sans-serif}
.theme-toggle:focus-visible{outline:3px solid #c30d23;outline-offset:3px}.theme-track{display:block;width:38px;height:22px;background:#67606b;border-radius:20px;padding:3px;flex-shrink:0}.theme-track:before{content:"";display:block;width:16px;height:16px;border-radius:50%;background:white;transition:transform .15s}.theme-toggle[aria-checked=true] .theme-track{background:#c30d23}.theme-toggle[aria-checked=true] .theme-track:before{transform:translateX(16px)}
.login-layout{min-height:100svh}
html[data-theme=light]{color-scheme:light;--bg:#f5f5f7;--panel:#fff;--line:#d5cdd2;--text:#242027;--muted:#655c66;--accent:#aa1027;--danger:#aa1528;--ink:#fff}
html[data-theme=light] body{background:#f5f5f7;color:#242027}
html[data-theme=light] :is(.theme-toggle,.secondary){background:#fff;color:#302730;border-color:#bcadb6}
html[data-theme=light] :is(.intro,.entry-card,.display-entry,.cue-preview,.now-time-box){background:linear-gradient(140deg,#fff,#fbeef1);border-color:#d7bdc7;box-shadow:0 4px 18px #33202c0d}
html[data-theme=light] :is(.brand-logo,#prsw-account-strip img){background:#19181e;border-radius:6px;padding:8px}
html[data-theme=light] :is(.intro-copy p,.intro-footer,.login-note,.login-footer,.section-marker span,.cue-row small,.cue-num,.cue-next,.preview-top,.entry-card p,.display-entry p,.workspace-footer,.checkbox,.table-actions button,.cue-done){color:#66515d}
html[data-theme=light] :is(.entry-link,.display-entry .entry-link,.display-entry .entry-icon,.cue-time){color:#aa1027;border-color:#d7bdc7}
html[data-theme=light] .cue-row.active{background:#f6dce3}
html[data-theme=light] :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:#fff;color:#242027;border-color:#baadb8}
html[data-theme=light] :is(input,textarea)::placeholder{color:#756978}
html[data-theme=light] :is(.role-guide>div,th,.project-permissions,.change-values pre){background:#f3edf1;color:#342b35;border-color:#d9c5ce}
html[data-theme=light] dialog{background:#fff;color:#242027;border-color:#bba8b3;box-shadow:0 25px 80px #30232e30}
html[data-theme=light] .role-badge{background:#fbe4ea;color:#9d1830;border-color:#dba9b7}
html[data-theme=light] .role-badge.editor{background:#e7eff9;color:#214f81;border-color:#b3c7df}
html[data-theme=light] .role-badge.viewer{background:#efebf3;color:#564065;border-color:#c4b7cf}
html[data-theme=light] .state{color:#216538}html[data-theme=light] .state.inactive{color:#6b606b}
html[data-theme=light] .notice{background:#e9f5eb;color:#245a30;border-color:#a2c9a9}html[data-theme=light] .notice.error{background:#fce9ec;color:#a1152b;border-color:#e0acb6}
html[data-theme=light] :is(.proj-bar,.unit-bar,.operate-bar,.batch-bar,.count-item,.control-action-block){background:#fff;border-color:#d5c7d0;box-shadow:0 3px 12px #39212f0b}
html[data-theme=light] :is(.bar-label,.control-row-title,.toolbar-title,.control-action-label,.now-time,.target-label,.num){color:#29222b}
html[data-theme=light] :is(.control-row-caption,.control-field-label,.now-date,.label,.note-cell-title,.bar-title,.gap-desc:not(.gap-warning),.preview-top){color:#665669}
html[data-theme=light] :is(.now-title,.gap-warning,.zero-tip){color:#9b2339}
html[data-theme=light] :is(.toolbar-status,.zero-time-tag,.btn-note-visibility,.note-cell-rename,.note-add-btn){background:#f0e9f0;color:#63456a;border-color:#c4acc8}
html[data-theme=light] .btn-note-visibility.active{background:#f5d4de;color:#8f1231;border-color:#c4768d}
html[data-theme=light] :is(.btn-export-unit,.btn-export-proj,.btn-import,.btn-proj-rename,.btn-batch-copy,.btn-batch-paste,.btn-batch-offset,.btn-select-all,.btn-undo,.btn-excel){background:#eae2ec;color:#4d3656}
html[data-theme=light] :is(.btn-proj-del,.btn-clearall,.btn-batch-del){background:#f7dfe5;color:#9a1530}
html[data-theme=light] :is(.lan-role-chip,.lan-status){background:#fffefef2;color:#5b3f52;border-color:#bfa4b4;box-shadow:0 2px 10px #30203015}
html[data-theme=light] .lan-voice-toggle{background:#e8f6ee;color:#23633b;border-color:#85ae95}html[data-theme=light] .lan-voice-toggle.off{background:#f3edf1;color:#6d4e60;border-color:#b7a0af}
html[data-theme=light] #prsw-account-strip,html[data-theme=light] #displayProjectPicker{background:#fff!important;color:#352a34!important;border-color:#d2c0ca!important}
html[data-theme=light] #prsw-account-strip :is(a,button){color:#a01531!important}html[data-theme=light] #displayProjectPicker :is(select,span){background:#fff!important;color:#5c4657!important;border-color:#bda5b5!important}
html[data-theme=light] #playbackEmpty{color:#51414c!important}
html[data-theme=light] .item-name-input{background:transparent!important}
html[data-theme=light] .color-green :is(.item-name-input,.num){color:#176c35}
html[data-theme=light] .color-yellow :is(.item-name-input,.num){color:#866000}
html[data-theme=light] .color-red :is(.item-name-input,.num){color:#b91f2c}
html[data-theme=light] .color-pink :is(.item-name-input,.num){color:#a92467}
html[data-theme=light] .count-item.ending-30s{background:#e5f6e9!important}html[data-theme=light] .ending-30s .num{color:#176c35!important}
html[data-theme=light] .count-item.ending-20s{background:#fff3c9!important}html[data-theme=light] .ending-20s .num{color:#806000!important}
html[data-theme=light] .count-item.ending-soon{background:#ffe3e6!important}html[data-theme=light] .ending-soon .num{color:#b0152a!important}
html[data-theme=light] .count-item.expired{background:#e5e1e5!important;opacity:1}
html[data-theme=light] .expired :is(.item-name-input,.num,.target-label,.label){color:#635b65!important}
html[data-theme=light] :is(.type-drop-menu,.modal-content){background:#fff;color:#29222b;border-color:#bcadb8}html[data-theme=light] .drop-item{color:#35283a}html[data-theme=light] .drop-item:hover{background:#efe6ef}
@media(prefers-reduced-motion:reduce){.theme-track:before{transition:none}}
html[data-theme=light] .modal-box{background:#fff;color:#29222b;border-color:#bcadb8}html[data-theme=light] :is(.modal-title,.modal-form-row label){color:#57445d}
html[data-theme=light] :is(.now-clock,.control-row-kicker){color:#29222b}

/* Compact account toolbar: editing, theme and sign out share one row. */
#prsw-account-strip{gap:12px!important;padding:9px 14px!important}
#prsw-account-strip .header-identity{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#prsw-header-tools{display:flex;align-items:center;gap:10px;margin-left:auto;max-width:100%;min-width:0;overflow-x:auto;padding:3px 2px;white-space:nowrap}
#prsw-header-tools>*{flex-shrink:0}
#prsw-header-tools #editLockBar{display:flex;align-items:center;gap:8px;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;min-width:0}
#editLockText{font-size:12px;font-weight:500;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#editLockButton{padding:5px 9px;font-size:12px;min-height:30px;box-shadow:none}
#editSaveText{font-size:11px!important;margin:0!important;max-width:155px;overflow:hidden;text-overflow:ellipsis;color:var(--muted,#aaa7ad)}
#headerLogout{margin-left:0!important;white-space:nowrap;padding:6px 0}
#prsw-header-tools .theme-toggle,.header-user .theme-toggle,.section-marker .theme-toggle{font-size:12px;min-height:30px;padding:3px 8px;gap:7px}
.section-marker .theme-toggle span{color:inherit;font-size:12px;letter-spacing:normal}
.header-user{gap:12px}.header-user .theme-toggle{flex-shrink:0}
@media(max-width:1200px){#prsw-header-tools #editSaveText{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#prsw-header-tools{gap:8px}}
@media(max-width:700px){#prsw-header-tools{flex:1 1 100%;justify-content:flex-end}#editLockText{max-width:105px}.header-user{margin-left:auto;gap:9px}.workspace-header{column-gap:12px}.header-user>span{max-width:65px}.theme-controls{min-height:36px;padding:3px 12px}}
html[data-theme=light] #prsw-account-strip #editLockButton{color:#fff!important}
#prsw-header-tools #editSaveText[data-error=true]{position:static;width:auto;height:auto;clip-path:none;color:var(--danger,#ffaba2);max-width:180px}

#downloadDraft{font-size:11px;padding:5px 8px;box-shadow:none}html[data-theme=light] #prsw-account-strip #downloadDraft{color:#fff!important}
#downloadDraft[hidden]{display:none!important}

/* Show editor names directly; long lists can be scrolled within the name area. */
#editLockText{max-width:360px;overflow-x:auto;text-overflow:clip;scrollbar-width:thin}
@media(max-width:700px){#editLockText{max-width:145px}}

/* Gold distinguishes the superadministrator role in both themes. */
.role-badge.superadmin{background:#382d13;color:#f4cf67;border-color:#aa8530}
.header-role.superadmin{color:#f4cf67;font-weight:600}
html[data-theme=light] .role-badge.superadmin{background:#fff3c9;color:#785600;border-color:#c49a32}
html[data-theme=light] .header-role.superadmin{color:#856000}
