/* Shared semantic appearance and the compact profile entry. */
:root{--profile-surface:var(--surface);--profile-hover:color-mix(in srgb,var(--ink) 5%,transparent);--sidebar-surface:#f0f0f3;--selection-surface:#e0e0e7}
html[data-theme="dark"]{
 --canvas:#1d1e21;--surface:#26272b;--ink:#ececef;--muted:#b0b1ba;--line:#3d3e44;
 --soft:#303137;--surface-secondary:#222327;--accent:#d4d5df;--accent-text:#d4d5df;
 --accent-strong:#e7e8ef;--accent-soft:#35363e;--accent-line:#555660;--disabled-ink:#85858f;
 --success:#8bc7a1;--warning:#e2bf7a;--danger:#ed9b9b;--sidebar-surface:#232428;--selection-surface:#3b3c46;
 --shadow-menu:0 8px 30px #0006;
}
body,.workspace-shell .site-header,.workspace-shell .sidebar,.main-panel,dialog,.dialog-header,.dialog-body,.dialog-footer{
 transition:background-color .18s ease,color .18s ease,border-color .18s ease;
}
.workspace-shell .header-actions{gap:4px}
.workspace-shell .header-actions>.icon-button{width:44px;height:44px;min-width:44px;min-height:44px;padding:12px}
.profile-menu{margin:0;position:relative;flex:none}
.profile-menu>.profile-trigger{display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;border:0;border-radius:50%;background:transparent;position:relative;cursor:pointer;list-style:none;padding:0}
.profile-trigger::-webkit-details-marker{display:none}
.profile-trigger::marker{content:""}
.profile-trigger .avatar{width:34px;height:34px;border-radius:50%;background:var(--accent-soft);color:var(--ink);font-size:13px;font-weight:500;transition:transform .16s ease,background-color .16s ease}
.profile-trigger:hover .avatar,.profile-trigger:focus-visible .avatar{transform:scale(1.035);background:var(--selection-surface)}
.profile-tooltip{position:absolute;top:calc(100% + 8px);right:0;white-space:nowrap;background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:5px 9px;color:var(--ink);font-size:12px;line-height:1.5;box-shadow:var(--shadow-menu);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .14s ease .35s}
.profile-menu:not([open])>.profile-trigger:is(:hover,:focus-visible) .profile-tooltip{opacity:1;visibility:visible}
.profile-menu-actions{min-width:220px;right:0;top:calc(100% + 8px);z-index:95;background:var(--surface);color:var(--ink)}
.profile-menu-actions button{min-height:44px;gap:10px;color:var(--ink)}
.profile-menu-actions button svg{width:17px;height:17px}
.profile-menu-actions button:hover{background:var(--profile-hover)}
.profile-unread-count{margin-left:auto;font-variant-numeric:tabular-nums;color:var(--muted);font-size:12px}
.appearance-dialog{width:min(380px,calc(100vw - 24px))}
.appearance-choices{border:0;margin:0;padding:0;display:grid;gap:4px}
.appearance-choices>label{display:flex;align-items:center;gap:12px;min-height:44px;padding:8px 10px;border-radius:8px;cursor:pointer}
.appearance-choices>label:has(input:checked){background:var(--accent-soft)}
.notification-settings{border-bottom:1px solid var(--line);margin-bottom:10px;padding-bottom:10px}
.notification-settings>summary,.notification-notes>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;color:var(--ink);list-style:none;font-size:13px}
.notification-settings>summary:before,.notification-notes>summary:before{content:'›';font-size:19px;display:inline-block;line-height:1;transition:transform .15s}
.notification-settings[open]>summary:before,.notification-notes[open]>summary:before{transform:rotate(90deg)}
.notification-preference{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px;cursor:pointer}
.notification-preference input{appearance:none;width:34px;height:21px;margin:0 5px;border:1px solid var(--line);border-radius:14px;background:var(--soft);position:relative;cursor:pointer;flex:none;transition:background-color .15s}
.notification-preference input:before{content:'';position:absolute;width:15px;height:15px;left:2px;top:2px;border-radius:50%;background:var(--muted);transition:transform .15s,background-color .15s}
.notification-preference input:checked{background:var(--accent);border-color:var(--accent)}
.notification-preference input:checked:before{background:var(--surface);transform:translateX(13px)}
.notification-preference input:disabled{opacity:.4;cursor:default}
.notification-save-status{font-size:12px;color:var(--muted);min-height:20px}
.notification-notes{font-size:12px;color:var(--muted);line-height:1.7;margin-bottom:10px}
.notification-category,.notification-source{display:block;font-size:12px;color:var(--muted)}
.notification-category{margin-bottom:3px}.notification-source{margin-top:4px;font-size:11px}
.monitor-notification-list .text-button{min-width:44px;min-height:44px}
.workspace-shell .sidebar{background:var(--sidebar-surface);border-color:var(--line)}
.workspace-shell .sidebar :is(.nav-main.active,.nav-main.nav-parent-active){background:var(--selection-surface);color:var(--ink)}
html[data-theme="dark"] :is(.main-panel,.page-status,.card,.channel-card,.account-favorite-card,.task-replay-card,.transcript-group-card,.reading-dialog,.speaker-original,.card-menu-actions,.replay-control-menu,.replay-filter-panel,.filter-menu-panel,.filter-popover,.analysis-panel,.analysis-stat,.metric-card,.recording-dialog-section,.monitor-selected-account,.replay-details-dialog,.dialog-header,.dialog-body,.dialog-footer){background-color:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .workspace-shell :is(.main-panel,.content-header,.page-body){background-color:transparent}
html[data-theme="dark"] :is(button,input,textarea,select,summary){color:inherit}
html[data-theme="dark"] :is(.search-field,input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){background-color:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:var(--muted)}
html[data-theme="dark"] :is(.button,.icon-button,.text-button,.toolbar-command,.replay-tool-group,.replay-utility,.reading-tabs,.content-tabs,.replay-bulk-actions){background-color:transparent;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.button.primary,.dialog-footer .primary){background:var(--accent);color:var(--canvas);border-color:transparent}
html[data-theme="dark"] :is(button:disabled,.button:disabled){color:var(--disabled-ink);background:transparent;border-color:var(--line)}
html[data-theme="dark"] :is(.nav-main,.nav-children button,.content-tabs button,.muted,.page-summary,.task-time,.channel-meta,.transcript-preview,.replay-duration-label,.replay-kind){color:var(--muted)}
html[data-theme="dark"] :is(.nav-main.active,.nav-children button.active,.content-tabs button.active){color:var(--ink);background:var(--accent-soft)}
html[data-theme="dark"] :is(h1,h2,h3,.content-header h1,.account-card-name,.task-name){color:var(--ink)}
html[data-theme="dark"] :is(.card-menu-actions button,.replay-filter-panel button,.replay-filter-button,.replay-bulk-actions button){color:var(--ink)}
html[data-theme="dark"] :is(.card-menu-actions button:hover,.icon-button:hover,.button:hover,.toolbar-command:hover,.replay-bulk-actions button:hover){background-color:var(--soft)}
html[data-theme="dark"] :is(.badge.success,.badge.ready,.state-pill.completed){color:var(--success);background:color-mix(in srgb,var(--success) 10%,var(--surface))}
html[data-theme="dark"] :is(.notice.error,.error,.danger){color:var(--danger);border-color:color-mix(in srgb,var(--danger) 40%,transparent);background-color:transparent}
html[data-theme="dark"] :is(.status-dot,.monitor-alert-marker){border-color:var(--line)}
html[data-theme="dark"] :is(.workspace-shell.sidebar-collapsed .nav-children,.replay-filter .filter-panel){background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] :is(.replay-visual-card.has-cover,.replay-visual-card.has-cover button,.replay-visual-card.has-cover .task-time){color:#f5f5f7}
html[data-theme="dark"] .replay-toolbar-actions{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .replay-toolbar-actions:has(.replay-search.is-open){background:var(--surface)}
html[data-theme="dark"] .replay-toolbar-actions:has(.replay-bulk-actions){background:transparent;border-color:transparent}
html[data-theme="dark"] .replay-toolbar-actions .icon-button{color:var(--ink)}
html[data-theme="dark"] .replay-toolbar-actions>.icon-button:before{background:var(--line)}
html[data-theme="dark"] .replay-filter-menu>summary.filter-menu-trigger{color:var(--muted)}
html[data-theme="dark"] .toolbar-feedback{color:var(--muted)}
html[data-theme="dark"] :is(.replay-batch-banner,.replay-download-banner){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .replay-download-banner small{color:var(--muted)}
html[data-theme="dark"] dialog{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .card-menu>summary{background:transparent;color:var(--muted);border-color:var(--line)}
html[data-theme="dark"] .card-menu>summary:is(:hover,:focus-visible),html[data-theme="dark"] .card-menu[open]>summary{background:var(--soft);color:var(--ink)}
html[data-theme="dark"] .library-card-grid>article:not(.has-cover):hover{background:var(--soft);border-color:var(--accent-line)}
html[data-theme="dark"] :is(.account-metric-total dd,.account-favorite-card h2,.channel-card h2){color:var(--ink)}
body:has(#speaker-workbench){color-scheme:inherit}
body:has(#speaker-workbench) :is(.brand-artwork-full,.brand-artwork-compact){background:transparent}
@media(prefers-reduced-motion:reduce){body,.workspace-shell .site-header,.workspace-shell .sidebar,.main-panel,dialog,.dialog-header,.dialog-body,.dialog-footer,.profile-trigger .avatar,.notification-preference input,.notification-preference input:before{transition:none}.profile-trigger:is(:hover,:focus-visible) .avatar{transform:none}}
