/* UnitTrust workbench UI. Shared chrome only; creative documents/canvases retain their own styling. */
html[data-wb-ui],:host {
 --wb-font:"Microsoft YaHei UI","Microsoft YaHei","PingFang SC","Segoe UI",system-ui,sans-serif;
 --hm-font:var(--wb-font)!important;--hm-radius:10px!important;--hm-radius-sm:7px!important;
 --hm-key-shadow:none!important;--hm-key-primary-shadow:0 1px 2px #164a8414!important;
 --hm-key-pressed:none!important;--hm-card-shadow:none!important;
 --hm-control-height:40px;--hm-control-height-sm:32px;--hm-close-size:36px;
 --wb-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2356677e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html[data-wb-ui]:not([data-trust-mode=dark]):not([data-theme=dark]):not(:has(body.dark)),:host-context(html:not([data-trust-mode=dark]):not([data-theme=dark])) {
 --hm-bg:#f5f7fa!important;--hm-surface:#fff!important;--hm-soft:#eef3f9!important;
 --hm-ink:#172b45!important;--hm-muted:#56677e!important;--hm-line:#dfe6ef!important;--hm-control:#bdc9d9!important;
 --hm-accent:#0864d9!important;--hm-accent-hover:#0455bc!important;--hm-on-accent:#fff!important;--hm-selected:#e8f1ff!important;--hm-focus:#0864d9!important;
 --hm-sidebar:#eef3f9!important;--hm-success:#167451!important;--hm-success-soft:#eaf5ef!important;
 --hm-warning:#895815!important;--hm-warning-soft:#fff6e5!important;--hm-danger:#b33449!important;--hm-danger-soft:#fff0f2!important;
 --hm-overlay:#15294166!important;--hm-shadow:0 16px 50px #172b4529!important;
}
html[data-wb-ui][data-trust-mode=dark],html[data-wb-ui][data-theme=dark],:host-context(html[data-trust-mode=dark]),:host-context(html[data-theme=dark]) {
 --wb-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b6c3cf' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html[data-wb-ui] body,:host {font-family:var(--wb-font);color:var(--hm-ink);line-height:1.6;-webkit-font-smoothing:antialiased}
html[data-wb-ui] body{background:var(--hm-bg)}
/* Preserve font enlargement preferences, native control semantics and hidden states. */
html[data-wb-ui] :is(button,input,select,textarea,summary),:host :is(button,input,select,textarea,summary){font-family:var(--wb-font);letter-spacing:normal;font-style:normal}
html[data-wb-ui] :is(.primary,.secondary,.btn,.button,.text-button),:host :is(.primary,.secondary,.btn,.button,.text-button){box-shadow:none!important;text-shadow:none!important;border-radius:7px;line-height:1.45;font-weight:500}
html[data-wb-ui] :is(button.primary,.btn-primary,a.primary),:host :is(button.primary,.btn-primary,a.primary){background:var(--hm-accent)!important;border-color:var(--hm-accent)!important;color:var(--hm-on-accent)!important}
html[data-wb-ui] :is(button.primary,.btn-primary,a.primary):hover:not(:disabled),:host :is(button.primary,.btn-primary,a.primary):hover:not(:disabled){background:var(--hm-accent-hover)!important;border-color:var(--hm-accent-hover)!important}
html[data-wb-ui] :is(button.secondary,.btn-secondary),:host :is(button.secondary,.btn-secondary){background:var(--hm-surface);border:1px solid var(--hm-line);color:var(--hm-ink)}
html[data-wb-ui] :is(button.secondary,.btn-secondary):hover:not(:disabled),:host :is(button.secondary,.btn-secondary):hover:not(:disabled){background:var(--hm-soft);border-color:var(--hm-control)}
html[data-wb-ui] :is(button,a.button,.btn),:host :is(button,a.button,.btn){transition:background-color 150ms ease,border-color 150ms ease,color 150ms ease;touch-action:manipulation}
html[data-wb-ui] button:disabled,:host button:disabled{cursor:not-allowed!important;opacity:.5;transform:none!important}
html[data-wb-ui] :is(.text-button,.link-button),:host :is(.text-button,.link-button){background:transparent;border-color:transparent}
html[data-wb-ui] :is(.danger,.delete-action,.hm-compact-danger),:host :is(.danger,.delete-action){color:var(--hm-danger)!important}
html[data-wb-ui] :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]),:host :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]){
 border:1px solid var(--hm-control);border-radius:7px!important;background-color:var(--hm-surface);color:var(--hm-ink);box-shadow:none!important;font-size:max(14px,.875rem);line-height:1.5;min-height:40px;box-sizing:border-box;
}
html[data-wb-ui] textarea,:host textarea{padding:10px 12px;line-height:1.65!important;resize:vertical}
html[data-wb-ui] :is(input,textarea)::placeholder,:host :is(input,textarea)::placeholder{color:var(--hm-muted);opacity:.85}
html[data-wb-ui] select:not([multiple]):not([size]),:host select:not([multiple]):not([size]){
 appearance:none!important;-webkit-appearance:none!important;background-image:var(--wb-chevron)!important;background-position:right 12px center!important;background-repeat:no-repeat!important;background-size:16px 16px!important;padding:8px 38px 8px 12px!important;text-align:start;cursor:pointer;
}
html[data-wb-ui] :is(input,select,textarea):disabled,:host :is(input,select,textarea):disabled{background-color:var(--hm-soft);color:var(--hm-muted);cursor:not-allowed;opacity:.75}
html[data-wb-ui] :is(input,select,textarea):focus,:host :is(input,select,textarea):focus{border-color:var(--hm-focus);box-shadow:none!important}
html[data-wb-ui] :is(button,a,summary,input,select,textarea,[tabindex]):focus-visible,:host :is(button,a,summary,input,select,textarea,[tabindex]):focus-visible{outline:2px solid var(--hm-focus)!important;outline-offset:3px!important}
html[data-wb-ui] :is(input,select,textarea)[aria-invalid=true],:host :is(input,select,textarea)[aria-invalid=true]{border-color:var(--hm-danger)!important}
html[data-wb-ui] :is(input[type=checkbox],input[type=radio]),:host :is(input[type=checkbox],input[type=radio]){accent-color:var(--hm-accent);box-shadow:none!important;min-height:0;flex-shrink:0}
html[data-wb-ui] input[type=file]::file-selector-button,:host input[type=file]::file-selector-button{border:1px solid var(--hm-line);border-radius:6px;background:var(--hm-soft);color:var(--hm-accent);padding:8px 12px;font:inherit;margin-right:12px;cursor:pointer}
html[data-wb-ui] :is(.field,.form-field),:host :is(.field,.form-field){gap:7px}
html[data-wb-ui] :is(.formgrid,.form-grid,.field-grid),:host :is(.formgrid,.form-grid,.field-grid){gap:16px}
html[data-wb-ui] :is(.hint,.muted,.help-text,.field-help,.small-hint),:host :is(.hint,.muted,.help-text,.field-help,.small-hint){color:var(--hm-muted);line-height:1.65}
html[data-wb-ui] :is(.head-actions,.row-actions,.modal-actions,.form-actions),:host :is(.head-actions,.row-actions,.modal-actions,.form-actions){gap:8px;align-items:center;flex-wrap:wrap}
/* Full-width workspaces; don't apply dimensions to cards, media or creative canvases. */
html[data-wb-ui][data-trust-ui][data-reference-layout] .workspace>main{padding:24px 32px 40px;max-width:none;width:100%}
html[data-wb-ui] :is(.workspace .section-heading,.pagehead,.head){gap:16px;align-items:center}
html[data-wb-ui] :is(.workspace .section-heading h2,.pagehead h1,.head h1),:host .studio #top h1{font-size:1.625rem;line-height:1.4;font-weight:650;letter-spacing:0}
html[data-wb-ui] :is(.workspace,.content,main,dialog) :is(h2,h3,h4),:host .studio :is(h2,h3,h4){letter-spacing:normal;line-height:1.45}
html[data-wb-ui] :is(.panel,.card,.lm-list-panel,.section),:host .studio :is(.panel,.card,.section){border-color:var(--hm-line);border-radius:10px;box-shadow:none}
html[data-wb-ui] :is(.ref-home-entry,.ref-recent-card){clip-path:none!important;border-radius:10px!important;box-shadow:none!important}
html[data-wb-ui] :is(.ref-home-entry,.ref-recent-card):hover{border-color:var(--hm-control);background:var(--hm-surface)}
html[data-wb-ui] :is(.ref-home-entry,.ref-recent-card)::before,html[data-wb-ui] :is(.ref-home-entry,.ref-recent-card)::after{clip-path:none!important}
html[data-wb-ui] :is(.manager-table,.project-table,.lm-list-panel table,.task-table,.position-table,.data-table) :is(th,td),:host .studio :is(.task-table,.data-table,table) :is(th,td){line-height:1.6;padding:14px 16px;border-color:var(--hm-line);font-variant-numeric:tabular-nums}
html[data-wb-ui] :is(.manager-table,.project-table,.lm-list-panel table,.task-table,.position-table,.data-table) th,:host .studio table th{font-size:max(13px,.8125rem);font-weight:500;color:var(--hm-muted);background:var(--hm-soft)}
html[data-wb-ui] :is(.manager-table,.project-table,.lm-list-panel table,.task-table,.position-table,.data-table) td,:host .studio table td{font-size:max(14px,.875rem)}
html[data-wb-ui] :is(.manager-table,.project-table,.lm-list-panel table,.task-table,.position-table,.data-table) tbody tr:hover,:host .studio table tbody tr:hover{background:var(--hm-soft)}
/* Main navigation preserves brand marks and the existing active-route state. */
html[data-wb-ui][data-trust-ui][data-reference-layout] .sidebar{background:var(--hm-sidebar,var(--hm-soft))!important}
html[data-wb-ui][data-trust-ui][data-reference-layout] .sidebar :is(.ref-nav-link,#media-subnavigation button){box-shadow:none!important;border-radius:7px!important;line-height:1.5!important;min-height:40px;font-size:max(14px,.875rem);color:var(--hm-muted)!important}
html[data-wb-ui][data-trust-ui][data-reference-layout] .sidebar :is(.ref-nav-link.ref-active,.ref-nav-link.active,#media-subnavigation button.active,[aria-current=page]){background:var(--hm-accent)!important;color:var(--hm-on-accent)!important;box-shadow:none!important}
/* Modal structure is intentionally retained; only typography and surfaces are shared. */
html[data-wb-ui] dialog,:host dialog{border:1px solid var(--hm-line);border-radius:12px!important;background:var(--hm-surface);color:var(--hm-ink);box-shadow:var(--hm-shadow)!important}
html[data-wb-ui] dialog::backdrop,:host dialog::backdrop{background:var(--hm-overlay)}
html[data-wb-ui] :is(.modalhead,.modal-head,.dialog-header),:host :is(.modalhead,.modal-head,.dialog-header){padding:20px 24px;border-bottom-color:var(--hm-line);gap:16px}
html[data-wb-ui] :is(.modalbody,.modal-body,.dialog-body),:host :is(.modalbody,.modal-body,.dialog-body){padding:24px}
html[data-wb-ui] :is(.modalfoot,.modal-foot,.dialog-footer),:host :is(.modalfoot,.modal-foot,.dialog-footer){padding:16px 24px;gap:10px;border-top-color:var(--hm-line);background:var(--hm-surface)}
html[data-wb-ui] :is(.modalhead,.modal-head,.dialog-header) button[aria-label*="鍏抽棴"],:host :is(.modalhead,.modal-head,.dialog-header) button[aria-label*="鍏抽棴"]{display:inline-grid;place-items:center;width:36px;height:36px;min-height:36px;padding:0;border:1px solid var(--hm-line);border-radius:7px;background:var(--hm-surface)}
/* Consistent chevrons: fixed square, round line caps, centered; open state rotates. */
html[data-wb-ui] :is(.lm-tools,.pm-tools)>summary{display:flex;align-items:center;gap:8px;min-height:40px;padding:8px 14px;border:1px solid var(--hm-line);border-radius:7px;list-style:none;background:var(--hm-surface)}
html[data-wb-ui] :is(.lm-tools,.pm-tools)>summary::-webkit-details-marker{display:none}
html[data-wb-ui] :is(.lm-tools,.pm-tools)>summary svg,html[data-wb-ui] .wb-ui-chevron{width:16px!important;height:16px!important;flex:0 0 16px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform 160ms ease}
html[data-wb-ui] :is(.lm-tools,.pm-tools)[open]>summary svg,html[data-wb-ui] [aria-expanded=true]>.wb-ui-chevron{transform:rotate(180deg)}
html[data-wb-ui] .lm-tools>div{border-radius:9px;border:1px solid var(--hm-line);box-shadow:0 8px 24px #172b4514;padding:6px;min-width:190px}
html[data-wb-ui] .lm-tools>div button{border-radius:5px;min-height:36px}
html[data-wb-ui] #link-form #channel-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px}
/* Each independent app receives the same chrome, with its own content structure. */
html[data-wb-surface=marketing] .content{max-width:none;width:100%;padding:24px 32px 40px}
html[data-wb-surface=marketing] .pagehead p{margin-top:5px}
html[data-wb-surface=marketing] .lm-stats{border-radius:10px;padding:20px 0}
html[data-wb-surface=marketing] .lm-stats article{padding:0 24px}
html[data-wb-surface=marketing] .lm-stats strong{font-size:1.8125rem;line-height:1.35}
html[data-wb-surface=marketing] :is(.lm-tabs,.lm-status-filters) button{box-shadow:none!important}
html[data-wb-surface=marketing] .lm-tabs button.active{box-shadow:inset 0 -2px var(--hm-accent)!important;background:transparent}
html[data-wb-surface=marketing] :is(.lm-title,.lm-short code){overflow-wrap:anywhere}
html[data-wb-surface=marketing] .lm-title{font-size:max(15px,.9375rem)}
html[data-wb-surface=marketing] :is(.lm-target,td>small,.lm-stats small){font-size:max(13px,.8125rem);color:var(--hm-muted)}
html[data-wb-surface=projects] main#main:not(.public){max-width:none;width:100%;margin:0;padding:24px 32px 40px}
html[data-wb-surface=projects] :is(button,select,input,textarea){font-size:max(14px,.875rem);font-weight:500;line-height:1.5}
html[data-wb-ui] :is([data-owner-transfer],[data-assign-role],[data-edit-role]){background:var(--hm-surface);color:var(--hm-ink);border:1px solid var(--hm-line);border-radius:7px;box-shadow:none;font-size:max(14px,.875rem);line-height:1.5;min-height:40px;padding:8px 14px}
html[data-wb-ui] :is([data-owner-transfer],[data-assign-role],[data-edit-role]):hover:not(:disabled){background:var(--hm-soft);border-color:var(--hm-control)}
html[data-wb-surface=design] .content{max-width:none;padding:24px 32px 40px}
html[data-wb-surface=design] body.designer .content{max-width:1400px}
:host .studio{max-width:none!important;width:100%;line-height:1.6}
:host .studio .task-flow-nav button{line-height:1.5;box-shadow:none}
:host .studio .task-flow-nav button strong{overflow-wrap:normal;word-break:normal}
html[data-wb-ui] .pe-sidebar [data-pe-module]{line-height:1.5;color:var(--hm-ink);border-radius:7px;box-shadow:none}
html[data-wb-ui] .pe-sidebar [data-pe-module].active{background:var(--hm-selected);color:var(--hm-accent)}
@media(max-width:760px){
 html[data-wb-ui][data-trust-ui][data-reference-layout] .workspace>main,html[data-wb-surface=marketing] .content,html[data-wb-surface=design] .content,html[data-wb-surface=projects] main#main:not(.public){padding:20px 16px 32px}
 html[data-wb-ui] :is(.pagehead,.head){flex-wrap:wrap;align-items:flex-start}
 html[data-wb-ui] :is(.modalhead,.modal-head,.dialog-header,.modalbody,.modal-body,.dialog-body,.modalfoot,.modal-foot,.dialog-footer),:host :is(.modalhead,.modal-head,.dialog-header,.modalbody,.modal-body,.dialog-body,.modalfoot,.modal-foot,.dialog-footer){padding:16px}
}
@media(pointer:coarse){html[data-wb-ui] :is(button.primary,button.secondary,select,input[type=text],input[type=search]),:host :is(button.primary,button.secondary,select,input[type=text],input[type=search]){min-height:44px}}
@media(prefers-reduced-motion:reduce){html[data-wb-ui] *,html[data-wb-ui] *::before,html[data-wb-ui] *::after,:host *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
@media(forced-colors:active){html[data-wb-ui] select:not([multiple]):not([size]),:host select:not([multiple]):not([size]){appearance:auto!important;background-image:none!important}html[data-wb-ui] button,:host button{border-color:ButtonText}}

/* Native detail views and dialogs. No data, editor canvas or timeline rules. */
/* Player controls are compact and sit on a dark video surface, not a form. */
html[data-wb-ui] #panel .plyr select.wb-player-speed,html[data-wb-ui] body .plyr select.wb-player-speed,:host .plyr select.wb-player-speed{background:#203342!important;background-image:none!important;color:#fff!important;border:1px solid #ffffff66!important;border-radius:5px!important;height:28px!important;min-height:28px!important;width:48px!important;min-width:48px!important;padding:3px!important;text-align:center!important;font:500 12px/20px var(--wb-font)!important;box-shadow:none!important}
html[data-wb-ui] :is(dialog,.ui-dialog-layout),:host dialog{font-size:14px;line-height:1.6}
html[data-wb-ui] :is(dialog,.ui-dialog-layout) :is(.ui-dialog-heading,.modalhead,.modal-head,.dialog-header)>h2,
html[data-wb-ui] :is(dialog,.ui-dialog-layout) :is(.ui-dialog-heading,.modalhead,.modal-head,.dialog-header)>div>h2,
html[data-wb-ui] .pm-planning-dialog>header h2,:host dialog :is(h2,.modal-title){font-size:20px!important;font-weight:600!important;line-height:1.4!important;letter-spacing:0!important;margin:0}
html[data-wb-ui] .ui-dialog-layout>.ui-dialog-heading{padding:20px 24px!important;gap:16px;align-items:center}
html[data-wb-ui] .ui-dialog-layout>.ui-dialog-scroll{padding:24px!important;line-height:1.65}
html[data-wb-ui] .ui-dialog-layout>footer{padding:16px 24px!important;gap:10px;align-items:center;background:var(--hm-surface);border-top:1px solid var(--hm-line)}
html[data-wb-ui] .ui-dialog-layout :is(.ui-dialog-heading,.ui-dialog-scroll,footer){box-sizing:border-box;min-width:0}
html[data-wb-ui] :is(.ui-dialog-heading,.modal-head,.modalhead,.dialog-header) button[aria-label*="鍏抽棴"],
html[data-wb-ui] .pm-planning-dialog>header>button{width:36px!important;height:36px!important;min-height:36px!important;flex:0 0 36px;display:grid;place-items:center;padding:0!important;border:1px solid var(--hm-line);border-radius:7px!important;font-size:20px!important;font-weight:400!important;box-shadow:none!important;background:var(--hm-surface);color:var(--hm-muted)}
html[data-wb-ui] :is(.ui-dialog-close,.modalhead>button[aria-label*="鍏抽棴"]) svg{width:18px;height:18px}
html[data-wb-ui] :is(dialog,.ui-dialog-layout) :is(footer,.modalfoot,.modal-foot,.form-foot) button,
:host dialog :is(footer,.modalfoot,.modal-foot,.form-foot) button{min-height:40px!important;padding:8px 16px;font-size:14px!important;line-height:22px!important;font-weight:500!important;border-radius:7px!important;box-shadow:none!important}
html[data-wb-ui] :is(dialog,.ui-dialog-layout) label:not(:has(input[type=checkbox],input[type=radio])),
:host dialog label:not(:has(input[type=checkbox],input[type=radio])){font-size:14px;line-height:1.5;font-weight:500;gap:8px;min-width:0}
html[data-wb-ui] :is(dialog,.ui-dialog-layout) :is(input,textarea,select):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]),
:host dialog :is(input,textarea,select):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]){font-size:14px!important;font-weight:400!important;line-height:1.5;max-width:100%;min-width:0}
/* Upload form used by every material library. */
html[data-wb-ui] #file-version-body:has(#file-version-input){display:grid;gap:20px}
html[data-wb-ui] #file-version-body:has(#file-version-input)>p{margin:0;font-size:14px;line-height:1.65;color:var(--hm-muted)}
html[data-wb-ui] #file-version-body:has(#file-version-input)>label{display:grid;gap:8px;margin:0}
html[data-wb-ui] #file-version-body #file-version-file-label{display:block;margin:0 0 8px;font-size:14px;font-weight:500}
html[data-wb-ui] #file-version-body .version-file-picker{padding:12px;gap:12px;border-radius:8px}
html[data-wb-ui] #file-version-body #file-version-selection{font-size:13px;margin:8px 0 0;color:var(--hm-muted)}
html[data-wb-ui] #file-version-note{margin:0;min-height:112px}
html[data-wb-ui] #file-version-error:empty{display:none}
/* Editor previously scrolled its footer out of its own clipped dialog. */
html[data-wb-surface=projects] #editor[open]{display:flex;flex-direction:column;overflow:hidden;max-height:calc(100dvh - 48px)}
html[data-wb-surface=projects] #editor>.modal-head{position:static;flex:none;margin:0;padding:20px 24px}
html[data-wb-surface=projects] #editor>.modal-head button[aria-label*="鍏抽棴"]{width:auto!important;min-width:64px;flex:0 0 auto;font-size:14px!important;padding:7px 12px!important;white-space:nowrap}
html[data-wb-surface=projects] #editor>form{display:flex;flex-direction:column;min-height:0;overflow:auto;padding:24px 24px 0;scroll-padding-bottom:88px}
html[data-wb-surface=projects] #editor>form>.form-foot{position:sticky;bottom:0;flex:none;margin:20px -24px 0;padding:16px 24px;background:var(--hm-surface);border-top:1px solid var(--hm-line);z-index:4;gap:10px}
html[data-wb-surface=projects] #editor .module-editor{flex:none}
html[data-wb-surface=projects] #editor textarea{min-height:112px}
html[data-wb-surface=projects] #editor label{gap:8px}
html[data-wb-surface=projects] #editor :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select){height:40px!important;min-height:40px!important;padding-top:8px!important;padding-bottom:8px!important;box-sizing:border-box}
html[data-wb-ui] .pm-planning-dialog :is(.pp-body,.pp-model){gap:20px}
html[data-wb-ui] .pm-planning-dialog .pp-model{align-items:end}
html[data-wb-ui] .pm-planning-dialog .pp-model button{min-height:40px}
html[data-wb-ui] :is(.modalfoot,.modal-foot,.dialog-footer){background:var(--hm-surface)!important}
/* Text is visually consistent across independent and shadow-root media apps. */
html[data-wb-surface=media] body.hm-content button:not(.article-phone *):not([contenteditable] *),
:host .studio button{box-shadow:none!important;text-shadow:none!important;font-weight:500!important;letter-spacing:0!important}
html[data-wb-surface=media] body.hm-content .entry-choice button{clip-path:none!important;border-radius:9px!important;border:1px solid var(--hm-line)!important;background:var(--hm-surface)!important;padding:20px 24px!important;min-width:0}
html[data-wb-surface=media] body.hm-content .entry-choice button::before,
html[data-wb-surface=media] body.hm-content .entry-choice button::after{display:none!important}
html[data-wb-surface=media] body.hm-content .entry-choice button[aria-pressed=true]{border-color:var(--hm-accent)!important;background:var(--hm-selected)!important}
html[data-wb-surface=media] body.hm-content .entry-choice strong{font-size:16px;line-height:1.5;font-weight:600}
html[data-wb-surface=media] body.hm-content .entry-choice span{font-size:14px;line-height:1.6;margin-top:6px}
html[data-wb-surface=media] body.hm-content .ai-action-row{align-items:end;gap:12px}
html[data-wb-surface=media] body.hm-content .ai-action-row>button{min-height:40px}
/* Unified topics: one filter surface; readable content with compact actions. */
html[data-wb-surface=media] body.hm-content .entry-choice button{corner-shape:round!important}
:host .studio dialog .heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
:host .studio dialog form{display:grid;gap:20px}
:host .studio dialog form>label{display:grid;gap:8px;margin:0}
:host .studio dialog .dialog-actions{display:flex;justify-content:flex-end;gap:10px;padding-top:16px;border-top:1px solid var(--hm-line)}
:host .studio dialog #manual-form .dialog-actions{margin:0;padding:16px 0 0}
:host .studio dialog #dialog-error:empty{display:none}
:host .studio dialog .icon-button[aria-label="鍏抽棴"]{width:36px;height:36px;min-height:36px;padding:8px;flex:none}
:host .studio .topic-toolbar{padding:20px!important;border:1px solid var(--hm-line)!important;border-radius:10px!important;background:var(--hm-surface)!important;box-shadow:none!important}
:host .studio .topic-toolbar-top{padding:0 0 16px!important;gap:16px;align-items:center;border-bottom:1px solid var(--hm-line)}
:host .studio .topic-toolbar-bottom{padding:16px 0 0!important;gap:16px;align-items:center}
:host .studio .topic-toolbar-bottom{border-top:0!important;margin-top:0!important}
:host .studio .topic-filters{padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;gap:12px!important;align-items:center;flex-wrap:wrap}
:host .studio .topic-filters label{gap:8px;font-size:14px;line-height:1.5}
:host .studio :is(.topic-direction-tabs,.topic-view-toggle){border-radius:7px!important;box-shadow:none!important}
:host .studio .topic-direction-tabs button{min-height:36px!important;padding:7px 14px!important;font-size:14px!important;border-radius:6px!important;border:0!important;background:transparent!important;color:var(--hm-muted)!important}
:host .studio .topic-direction-tabs button[aria-pressed=true]{background:var(--hm-selected)!important;color:var(--hm-accent)!important;font-weight:600!important}
:host .studio .topic-result-summary{margin:20px 0 12px!important;font-size:13px;gap:12px;flex-wrap:wrap;color:var(--hm-muted)}
:host .studio .topic-match-count strong{font-size:18px;font-weight:600}
:host .studio .topic-day{border:1px solid var(--hm-line)!important;border-radius:10px!important;overflow:hidden;box-shadow:none!important;background:var(--hm-surface)}
:host .studio .topic-day-heading{padding:16px 20px!important;background:var(--hm-soft);gap:10px}
:host .studio .topic-day-heading h2{font-size:16px!important;font-weight:600!important;line-height:1.5!important}
:host .studio .topic-row{grid-template-columns:minmax(0,1fr) 256px!important;padding:20px!important;gap:24px!important;align-items:center;background:var(--hm-surface);border-bottom-color:var(--hm-line)!important}
:host .studio .topic-row:hover{background:color-mix(in srgb,var(--hm-soft) 45%,var(--hm-surface))}
:host .studio .topic-row h3{font-size:16px!important;font-weight:600!important;line-height:1.5!important;margin:8px 0!important;color:var(--hm-ink)}
:host .studio .topic-row-content>p{font-size:14px!important;line-height:1.75!important;margin:0 0 10px!important;color:var(--hm-muted)}
:host .studio .topic-row-meta{font-size:12px!important;gap:8px;line-height:1.5}
:host .studio .topic-links{gap:12px;flex-wrap:wrap;font-size:13px!important}
:host .studio .topic-row-actions{width:256px;gap:10px!important;min-width:0}
:host .studio .topic-priority{display:flex;padding:3px!important;gap:2px!important;background:var(--hm-soft)!important;border:1px solid var(--hm-line)!important;border-radius:7px!important}
:host .studio .topic-priority button{flex:1;min-height:32px!important;padding:5px 8px!important;white-space:nowrap;font-size:13px!important;border:0!important;border-radius:5px!important;background:transparent!important;color:var(--hm-muted)!important}
:host .studio .topic-priority button[aria-pressed=true]{background:var(--hm-surface)!important;color:var(--hm-accent)!important;font-weight:600!important}
:host .studio .topic-row-commands{display:flex;justify-content:flex-end;gap:8px!important}
:host .studio .topic-row-commands .topic-open{flex:0 0 auto!important;width:auto!important;min-height:36px!important;padding:7px 16px!important;font-size:14px!important}
:host .studio .topic-row-commands .topic-delete{flex:0 0 36px!important;width:36px!important;height:36px!important;min-height:36px!important;padding:8px!important;border-radius:7px!important}
@media(max-width:1050px){:host .studio .topic-row{grid-template-columns:minmax(0,1fr)!important;gap:16px!important}:host .studio .topic-row-actions{width:100%;display:flex!important;flex-direction:row!important;align-items:center;justify-content:space-between}:host .studio .topic-priority{width:256px;max-width:100%}:host .studio .topic-toolbar-top,:host .studio .topic-toolbar-bottom{flex-wrap:wrap}}
@media(max-width:600px){html[data-wb-surface=projects] #editor[open]{max-height:calc(100dvh - 24px)}html[data-wb-ui] .ui-dialog-layout>.ui-dialog-scroll{padding:16px!important}html[data-wb-ui] .ui-dialog-layout>:is(.ui-dialog-heading,footer){padding:16px!important}:host .studio .topic-row-actions{flex-wrap:wrap}:host .studio .topic-toolbar{padding:16px!important}:host .studio .topic-row{padding:16px!important}}

/* A quiet edge affordance; retain the native position, semantics and mobile drawer. */
@media(min-width:901px){
 html[data-wb-ui] #sidebar-close-toggle{width:26px!important;min-width:26px!important;height:40px!important;min-height:40px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;color:var(--hm-muted)!important;isolation:isolate}
 html[data-wb-ui] #sidebar-close-toggle::before{content:"";position:absolute;inset:4px 6px;border-radius:8px;background:var(--hm-surface);border:1px solid var(--hm-line);transition:inset .16s ease,background .16s ease;z-index:-1}
 html[data-wb-ui] #sidebar-close-toggle svg{width:12px!important;height:12px!important}
 html[data-wb-ui] #sidebar-close-toggle:is(:hover,:focus-visible)::before{inset:2px 2px;background:var(--hm-selected);border-color:var(--hm-accent)}
 html[data-wb-ui] #sidebar-close-toggle:is(:hover,:focus-visible){color:var(--hm-accent)!important}
 html[data-wb-ui] #sidebar-close-toggle:active::before{inset:5px 3px}
}
@media(prefers-reduced-motion:reduce){html[data-wb-ui] #sidebar-close-toggle::before{transition:none}}
/* Align shared page headers without changing editor panes and canvas heights. */
html[data-wb-ui] #hm-workspace-main:has(#panel) > :is(header,.section-heading):has(#section-title){padding-block:12px!important;margin-block:0 14px!important;min-height:0!important}
html[data-wb-ui] #panel .people-workspace{display:grid;gap:12px;align-content:start}
html[data-wb-ui] #panel .people-workspace > :is(nav,section,p){margin:0!important}
html[data-wb-ui] #panel .people-workspace .card,html[data-wb-ui] #panel .card:has(#recycle-actions){border:1px solid var(--hm-line)!important;border-radius:10px!important;background:var(--hm-surface)!important;padding:16px 20px!important;min-height:0!important}
html[data-wb-ui] #panel .people-workspace :is(.roles-heading,.people-heading){margin:0!important;padding:0!important;min-height:0!important;align-items:center}
html[data-wb-ui] #panel .people-workspace :is(.roles-tabs,h3,.hint,form){margin-block:0!important}
html[data-wb-ui] #panel .people-workspace .hint{font-size:13px;line-height:1.5;margin-top:6px!important}
html[data-wb-ui] #panel .people-workspace :is([data-people-message],[data-people-link]):empty{display:none}
html[data-wb-ui] #panel .people-workspace .roles-tabs{gap:6px;padding:0 0 8px!important}
html[data-wb-ui] #panel .people-workspace :is(.roles-tabs,.people-actions) button{min-height:32px!important;padding:5px 10px!important;font-size:14px!important}
html[data-wb-ui] #panel .people-workspace .people-member{min-height:48px;padding:8px 0!important;gap:10px}
html[data-wb-ui] #panel .people-workspace .people-invite form{display:grid;grid-template-columns:minmax(190px,360px) minmax(190px,270px) max-content;gap:12px;align-items:end;margin-top:10px!important}
html[data-wb-ui] #panel .people-workspace label,html[data-wb-ui] #panel .catalog-filters:has(#catalog-category) label{gap:5px!important;margin:0!important;font-size:13px!important}
html[data-wb-ui] #panel .card:has(#recycle-actions) .catalog-filters{display:grid;grid-template-columns:minmax(180px,420px) minmax(150px,220px);gap:12px;margin:0!important;padding:0!important}
html[data-wb-ui] #panel #recycle-actions{margin:12px 0 8px!important;padding:8px 0!important;min-height:0!important}
html[data-wb-ui] #panel #catalog-list:has(.library-table) :is(td,th){padding:9px 12px!important;vertical-align:middle;line-height:1.5}
html[data-wb-ui] #panel .card:has(#recycle-actions) button{min-height:32px!important;padding:5px 10px!important}
#voice-app{max-width:none!important;width:100%;margin:0!important}
#voice-app .voice-page-heading{margin:0 0 14px!important;padding-block:0 12px!important}
#voice-app .voice-page-heading h1{margin-block:8px 4px!important;font-size:24px;line-height:1.35}
#voice-app .voice-page-heading p{margin:0!important}
#voice-app .card{padding:16px 20px!important;margin:0 0 12px!important;border:1px solid var(--hm-line)!important;border-radius:10px!important;background:var(--hm-surface)!important}
#voice-app :is(.page-toolbar,.library-head){margin:0 0 12px!important;padding-block:0 10px!important}
#voice-app #preset-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:8px}
#voice-app .voice-group-heading{grid-column:1/-1;margin:6px 0 0!important;font-size:14px}
#voice-app .preset{min-width:0;margin:0!important;padding:12px!important;text-align:start;border-radius:8px!important}
#voice-app .preset[aria-pressed=true]{border-color:var(--hm-accent)!important;background:var(--hm-selected)!important}
@media(max-width:760px){html[data-wb-ui] #panel .people-workspace .people-invite form,html[data-wb-ui] #panel .card:has(#recycle-actions) .catalog-filters{grid-template-columns:1fr}html[data-wb-ui] #panel .people-actions{flex-wrap:wrap}html[data-wb-ui] #panel .card:has(#recycle-actions) .manager-scroll{overflow-x:auto}}

/* Keep the waveform in the layout, even when a name or badge wraps. */
#voice-app #preset-list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}
#voice-app #preset-list .preset {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-areas: "icon title" "icon details" ". action";
  align-items: center;
  gap: 5px 14px;
  padding: 16px 18px !important;
}
#voice-app #preset-list .preset > svg[data-ui-icon] {
  grid-area: icon;
  position: static;
  transform: none;
  align-self: start;
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  padding: 8px;
}
#voice-app #preset-list .preset strong { grid-area: title; line-height: 1.5; }
#voice-app #preset-list .preset small { grid-area: details; line-height: 1.55; }
#voice-app #preset-list .preset::after {
  grid-area: action;
  justify-self: end;
  margin-top: 4px;
}
/* Give the member identity and access level stable adjacent columns. */
html[data-wb-ui] #panel .people-workspace .people-member {
  display: grid;
  grid-template-columns: minmax(180px, 320px) minmax(130px, 1fr) auto;
  align-items: center;
  column-gap: 20px;
  min-height: 66px;
  padding: 12px 0 !important;
}
html[data-wb-ui] #panel .people-member > strong { overflow-wrap: anywhere; }
html[data-wb-ui] #panel .people-member .people-role { justify-self: start; }
html[data-wb-ui] #panel .people-member .people-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
html[data-wb-ui] #panel .people-workspace .people-actions button {
  min-height: 36px !important;
  padding: 6px 12px !important;
}
html[data-wb-ui] #panel .people-workspace .people-heading:has([data-people-search]) {
  padding-bottom: 12px !important;
}
@media (max-width: 1150px) {
  html[data-wb-ui] #panel .people-workspace .people-member {
    grid-template-columns: minmax(0,1fr) auto;
    row-gap: 8px;
  }
  html[data-wb-ui] #panel .people-member .people-actions:not(:empty) {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  html[data-wb-ui] #panel .people-member .people-actions:empty { display: none; }
}
/* Give the parent collection its own readable crumb when both names coincide. */
#workspace-location[data-library-path] [data-library-product-root] { display:inline-flex!important;align-items:center;gap:5px;max-width:100%;color:var(--hm-accent)!important }
#workspace-location[data-library-path]:has([data-shared-library="external"]) [data-library-product-root]::before {content:"平台";font-size:12px;color:var(--hm-muted)}
#workspace-location[data-library-path] .library-crumb-kind {margin-inline-end:5px}

.wb-delivery-alert:not([hidden]){position:fixed;z-index:1100;right:18px;bottom:max(18px,env(safe-area-inset-bottom));display:grid;gap:5px;max-width:min(320px,calc(100vw - 36px));padding:12px 16px;background:var(--hm-surface,#fff);border:1px solid var(--hm-line,#d6e1ee);border-left:3px solid var(--hm-accent,#0864d9);border-radius:8px;box-shadow:0 4px 18px #213b5e1a;color:var(--hm-ink,#172b45);font-size:14px;line-height:1.5}
.wb-delivery-alert a{color:var(--hm-accent,#0864d9);overflow-wrap:anywhere}

/* Product demo uses the workspace navigation selection appearance. */
html[data-wb-ui] body.product-demo-active .sidebar #product-demo-entry{background:var(--trust-action,#0864d9)!important;color:var(--trust-on-action,#fff)!important;border-color:var(--trust-action,#0864d9)!important} html[data-wb-ui] body.product-demo-active .sidebar #product-demo-entry :is(span,svg){color:var(--trust-on-action,#fff)!important}


/* A single scroll owner for the shot picker, before and after dialog normalization. */
html[data-wb-ui] body dialog.tutorial-editor-dialog[open]:has(.tutorial-material-picker){display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;max-height:calc(100dvh - 24px)!important;box-sizing:border-box;overflow:hidden!important}
html[data-wb-ui] body dialog.tutorial-editor-dialog:has(.tutorial-material-picker)>:is(.ui-dialog-scroll,.tutorial-editor-dialog-body){display:block!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain;scrollbar-gutter:stable;touch-action:pan-y pinch-zoom}
html[data-wb-ui] body dialog.tutorial-editor-dialog:has(.tutorial-material-picker)>.ui-dialog-scroll>.tutorial-editor-dialog-body{display:block;max-height:none!important;height:auto!important;overflow:visible!important;overscroll-behavior:auto;padding:0!important}
