/* Shared Linear-inspired visual layer for the existing native HTML/CSS/JS pages. */
:root {
  /* 全局顶部外壳的高度：UI 规范 v2（UI改版效果图-v2/assets/site-shell.css）定的是 48px。
     所有「为固定外壳让位」的偏移都必须引用这个令牌，不要再各自写死数值 ——
     此前 64px 散落在 7 个 CSS 文件的 20 处，改一次要翻遍全站。 */
  --site-shell-height: 48px;
  color-scheme: dark;
  /* UI-THEME-LIVE-20260921：暗色令牌对齐设计稿 design-tokens.html（剪映专业版性格）。
     --linear-primary-rgb 供 rgba(var(--linear-primary-rgb), α) 主题感知写法使用。 */
  --linear-primary: #2f6bff;
  --linear-primary-hover: #5488ff;
  --linear-primary-focus: #2f6bff;
  --linear-primary-rgb: 47, 107, 255;
  --linear-on-primary: #ffffff;
  --linear-ink: #f2f2f3;
  --linear-ink-muted: #a0a0a6;
  --linear-ink-subtle: #8a8a93;
  --linear-ink-tertiary: #6c6c74;
  --linear-canvas: #121212;
  --linear-surface-1: #1b1b1d;
  --linear-surface-2: #232326;
  --linear-surface-3: #2c2c30;
  --linear-surface-4: #333338;
  --linear-hairline: rgba(255, 255, 255, 0.08);
  --linear-hairline-strong: rgba(255, 255, 255, 0.14);
  --linear-hairline-tertiary: rgba(255, 255, 255, 0.22);
  --linear-success: #27a644;
  --linear-danger: #e5484d;
  --linear-warning: #e8a33d;
  --linear-overlay: rgba(0, 0, 0, 0.45);
  /* THEME-CONTRAST-001：媒体浮层令牌（压在缩略图/视频画面上的角标、标题、播放图标）。
     画面本身不随主题变，浮层也不随主题翻转 —— 亮色分支不得覆盖这组令牌。 */
  --media-overlay-ink: #ffffff;
  --media-overlay-ink-muted: #a0a0a6;
  --media-overlay-bg: rgba(10, 10, 12, 0.76);
  --media-overlay-border: rgba(255, 255, 255, 0.18);
  --linear-radius-xs: 4px;
  --linear-radius-sm: 6px;
  --linear-radius-md: 8px;
  --linear-radius-lg: 12px;
  --linear-radius-xl: 16px;
  --linear-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --linear-transition: 140ms ease;
  --site-page-bootstrap-feedback-delay: 650ms;

  /* Compatibility aliases used by existing page-level styles. */
  --taste-bg: var(--linear-canvas);
  --taste-panel: var(--linear-surface-1);
  --taste-panel-strong: var(--linear-surface-2);
  --taste-line: var(--linear-hairline);
  --taste-line-strong: var(--linear-hairline-strong);
  --taste-text: var(--linear-ink);
  --taste-soft: var(--linear-ink-muted);
  --taste-muted: var(--linear-ink-subtle);
  --taste-accent: var(--linear-primary);
  --taste-accent-deep: var(--linear-primary-focus);
  --taste-radius: var(--linear-radius-md);
  --taste-shadow-dark: var(--linear-shadow);
  --taste-shadow-light: var(--linear-shadow);

  /* Page-level token compatibility: keep existing layouts, replace their palette. */
  --bg: var(--linear-canvas);
  --surface: var(--linear-surface-1);
  --surface-2: var(--linear-surface-2);
  --surface-3: var(--linear-surface-3);
  --panel: var(--linear-surface-1);
  --panel-2: var(--linear-surface-2);
  --panel-3: var(--linear-surface-3);
  --panel-raised: var(--linear-surface-2);
  --panel-strong: var(--linear-surface-3);
  --line: var(--linear-hairline);
  --line-soft: var(--linear-hairline);
  --line-strong: var(--linear-hairline-strong);
  --text: var(--linear-ink);
  --soft: var(--linear-ink-muted);
  --muted: var(--linear-ink-subtle);
  --accent: var(--linear-primary);
  --accent-soft: rgba(var(--linear-primary-rgb), 0.14);
  --brand: var(--linear-primary);
  --green: var(--linear-primary);
  --green-deep: var(--linear-primary-focus);
  --green-strong: var(--linear-primary-hover);
  --blue: var(--linear-primary);
  --cyan: var(--linear-primary-hover);
  --violet: var(--linear-primary);
  --success: var(--linear-success);
  --amber: var(--linear-warning);
  --warn: var(--linear-warning);
  --warning: var(--linear-warning);
  --red: var(--linear-danger);
  --danger: var(--linear-danger);

  --home-bg: var(--linear-canvas);
  --home-panel: var(--linear-surface-1);
  --home-panel-raised: var(--linear-surface-2);
  --home-card: var(--linear-surface-1);
  --home-card-hover: var(--linear-surface-2);
  --home-line: var(--linear-hairline);
  --home-line-strong: var(--linear-hairline-strong);
  --home-text: var(--linear-ink);
  --home-text-soft: var(--linear-ink-muted);
  --home-muted: var(--linear-ink-subtle);
  --home-accent: var(--linear-primary);
  --home-shadow: none;

  --login-bg: var(--linear-canvas);
  --login-surface: var(--linear-surface-1);
  --login-surface-raised: var(--linear-surface-2);
  --login-panel: var(--linear-surface-1);
  --login-input: var(--linear-surface-1);
  --login-border: var(--linear-hairline);
  --login-border-strong: var(--linear-hairline-strong);
  --login-text: var(--linear-ink);
  --login-text-soft: var(--linear-ink-muted);
  --login-muted: var(--linear-ink-subtle);
  --login-accent: var(--linear-primary);
  --login-accent-strong: var(--linear-primary-hover);
  --login-accent-ink: var(--linear-on-primary);
  --login-danger: var(--linear-danger);
  --login-shadow: var(--linear-shadow);

  --management-bg: var(--linear-canvas);
  --management-rail: var(--linear-canvas);
  --management-pane: var(--linear-surface-1);
  --management-pane-strong: var(--linear-surface-2);
  --management-row: var(--linear-surface-1);
  --management-row-hover: var(--linear-surface-2);
  --management-border: var(--linear-hairline);
  --management-border-strong: var(--linear-hairline-strong);
  --management-accent: var(--linear-primary);
  --management-accent-deep: var(--linear-primary-focus);
  --timeline-workspace-bg: var(--linear-canvas);
}

html {
  min-width: 320px;
  scroll-padding-top: var(--site-shell-height);
  background: var(--linear-canvas);
}

body.taste-site {
  min-width: 320px;
  margin: 0;
  color-scheme: dark;
  color: var(--linear-ink);
  background: var(--linear-canvas);
  font-family: Inter, "SF Pro Text", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.taste-site *,
body.taste-site *::before,
body.taste-site *::after {
  box-sizing: border-box;
}

body.taste-site ::selection {
  background: rgba(var(--linear-primary-rgb), 0.4);
  color: var(--linear-ink);
}

body.taste-site h1,
body.taste-site h2,
body.taste-site h3,
body.taste-site h4 {
  color: var(--linear-ink);
  font-family: Inter, "SF Pro Display", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.035em;
}

body.taste-site p,
body.taste-site small,
body.taste-site .muted,
body.taste-site .hint,
body.taste-site .meta {
  color: var(--linear-ink-subtle);
}

body.taste-site a {
  color: var(--linear-ink-muted);
  text-underline-offset: 3px;
}

body.taste-site a:hover {
  color: var(--linear-ink);
}

body.taste-site button,
body.taste-site input,
body.taste-site select,
body.taste-site textarea {
  font: inherit;
}

body.taste-site :focus-visible {
  outline: 2px solid var(--linear-primary-focus);
  outline-offset: 2px;
}

body.taste-site :disabled,
body.taste-site [aria-disabled="true"] {
  cursor: not-allowed !important;
  opacity: 0.48;
  transform: none !important;
}

body.taste-site [hidden] {
  display: none !important;
}

body.taste-site ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.taste-site ::-webkit-scrollbar-track {
  background: var(--linear-canvas);
}

body.taste-site ::-webkit-scrollbar-thumb {
  border: 3px solid var(--linear-canvas);
  border-radius: 999px;
  background: var(--linear-hairline-tertiary);
}

body.taste-site ::-webkit-scrollbar-thumb:hover {
  background: var(--linear-ink-tertiary);
}

/* Buttons and action states. */
body.taste-site .button,
body.taste-site .primary-button,
body.taste-site .secondary-button,
body.taste-site .ghost-button,
body.taste-site .danger-button,
body.taste-site .tool-button,
body.taste-site .header-link,
body.taste-site .rail-submit-button,
body.taste-site .rail-detect-button,
body.taste-site .rail-add-button,
body.taste-site .rail-cancel-button {
  min-height: 36px;
  border: 1px solid var(--linear-hairline-strong);
  border-radius: var(--linear-radius-md);
  background: var(--linear-surface-2);
  color: var(--linear-ink-muted);
  font-size: 13px;
  font-weight: 500;
  transition: background-color var(--linear-transition), border-color var(--linear-transition), color var(--linear-transition), transform var(--linear-transition);
}

body.taste-site .button:hover,
body.taste-site .secondary-button:hover,
body.taste-site .ghost-button:hover,
body.taste-site .tool-button:hover,
body.taste-site .header-link:hover,
body.taste-site .rail-add-button:hover,
body.taste-site .rail-cancel-button:hover {
  border-color: var(--linear-hairline-tertiary);
  background: var(--linear-surface-3);
  color: var(--linear-ink);
}

body.taste-site .button:active {
  transform: translateY(1px);
}

body.taste-site .primary-button,
body.taste-site .header-link.primary,
body.taste-site .rail-submit-button,
body.taste-site .rail-detect-button,
body.taste-site .form-actions button[type="submit"],
body.taste-site button[type="submit"] {
  border-color: var(--linear-primary);
  background: var(--linear-primary);
  color: var(--linear-on-primary);
}

body.taste-site .primary-button:hover,
body.taste-site .header-link.primary:hover,
body.taste-site .rail-submit-button:hover,
body.taste-site .rail-detect-button:hover,
body.taste-site .form-actions button[type="submit"]:hover,
body.taste-site button[type="submit"]:hover {
  border-color: var(--linear-primary-hover);
  background: var(--linear-primary-hover);
  color: var(--linear-on-primary);
}

body.taste-site .danger,
body.taste-site .danger-button,
body.taste-site button[data-shell-logout] {
  color: #ffb4b8;
}

body.taste-site .danger-button {
  border-color: rgba(229, 72, 77, 0.46);
  background: rgba(229, 72, 77, 0.12);
}

body.taste-site .danger-button:hover {
  border-color: rgba(229, 72, 77, 0.72);
  background: rgba(229, 72, 77, 0.2);
}

body.taste-site [aria-busy="true"],
body.taste-site .is-loading,
body.taste-site .loading {
  cursor: progress;
}

body.taste-site button[aria-busy="true"]::after,
body.taste-site button.is-loading::after {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: linear-spin 700ms linear infinite;
  vertical-align: -2px;
}

@keyframes linear-spin {
  to { transform: rotate(360deg); }
}

/* Form controls. */
body.taste-site input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
body.taste-site select,
body.taste-site textarea {
  min-height: 38px;
  border: 1px solid var(--linear-hairline-strong);
  border-radius: var(--linear-radius-md);
  background: var(--linear-surface-1);
  color: var(--linear-ink);
  caret-color: var(--linear-primary-hover);
  transition: background-color var(--linear-transition), border-color var(--linear-transition), box-shadow var(--linear-transition);
}

body.taste-site input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):hover,
body.taste-site select:hover,
body.taste-site textarea:hover {
  border-color: var(--linear-hairline-tertiary);
  background: var(--linear-surface-2);
}

body.taste-site input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):focus,
body.taste-site select:focus,
body.taste-site textarea:focus {
  border-color: var(--linear-primary-focus);
  background: var(--linear-surface-1);
  box-shadow: 0 0 0 3px rgba(94, 105, 209, 0.18);
}

body.taste-site input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"])::placeholder,
body.taste-site textarea::placeholder {
  color: var(--linear-ink-tertiary);
}

body.taste-site [aria-invalid="true"],
body.taste-site .has-error input,
body.taste-site .has-error select,
body.taste-site .has-error textarea {
  border-color: var(--linear-danger) !important;
  box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.14);
}

body.taste-site input[type="checkbox"],
body.taste-site input[type="radio"],
body.taste-site input[type="range"] {
  accent-color: var(--linear-primary);
}

.taste-site :where(input[type="checkbox"], input[type="radio"]) {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.taste-site :where(input[type="range"]) {
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

/* Status, tables, panels, dialogs, and feedback. */
body.taste-site .small-chip.ok {
  color: var(--linear-success);
}

body.taste-site .metric-card.valid::before { background: var(--linear-success); }

body.taste-site .eyebrow,
body.taste-site .panel-kicker,
body.taste-site .section-kicker {
  color: var(--linear-ink-subtle);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.taste-site .small-chip,
body.taste-site .status-pill,
body.taste-site .status-chip,
body.taste-site .state-chip,
body.taste-site .status-badge,
body.taste-site .badge {
  border: 1px solid var(--linear-hairline-strong);
  border-radius: 999px;
  background: var(--linear-surface-2);
  color: var(--linear-ink-muted);
}

body.taste-site .success,
body.taste-site .is-success,
body.taste-site .badge.active,
body.taste-site .status-pill.success {
  border-color: rgba(39, 166, 68, 0.42);
  color: var(--linear-primary-hover);
}

body.taste-site table {
  border-color: var(--linear-hairline);
  border-collapse: separate;
  border-spacing: 0;
  background: var(--linear-surface-1);
  color: var(--linear-ink-muted);
}

body.taste-site th {
  border-color: var(--linear-hairline);
  background: var(--linear-surface-2);
  color: var(--linear-ink-subtle);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

body.taste-site td {
  border-color: var(--linear-hairline);
  color: var(--linear-ink-muted);
}

body.taste-site tbody tr:hover td {
  background: var(--linear-surface-2);
  color: var(--linear-ink);
}

body.taste-site dialog,
body.taste-site .modal,
body.taste-site .modal-card,
body.taste-site .detail-dialog,
body.taste-site .dialog-card,
body.taste-site .drawer {
  border: 1px solid var(--linear-hairline-strong);
  border-radius: var(--linear-radius-lg);
  background: var(--linear-surface-2);
  color: var(--linear-ink);
  box-shadow: var(--linear-shadow);
}

body.taste-site dialog::backdrop,
body.taste-site .modal-mask,
body.taste-site .dialog-backdrop {
  background: var(--linear-overlay);
  backdrop-filter: blur(2px);
}

body.taste-site .toast,
body.taste-site .notice,
body.taste-site .alert,
body.taste-site [role="alert"] {
  border-color: var(--linear-hairline-strong);
  border-radius: var(--linear-radius-md);
  background: var(--linear-surface-3);
  color: var(--linear-ink-muted);
  box-shadow: var(--linear-shadow);
}

body.taste-site .empty-state,
body.taste-site .empty,
body.taste-site .placeholder {
  color: var(--linear-ink-subtle);
}

/* Business workspaces retain their information architecture and gain one surface ladder. */
body.taste-dark-workbench,
body.taste-dark-admin,
body.taste-dark-ops,
body.taste-dark-utility,
body.taste-dark-home,
body.taste-light-admin,
body.taste-auth,
body.taste-console-auth {
  color-scheme: dark;
  color: var(--linear-ink);
  background: var(--linear-canvas) !important;
}

body.taste-dark-workbench .workspace-shell,
body.taste-dark-admin .workspace-shell,
body.taste-dark-ops .ops-shell,
body.taste-dark-utility .preparation-page,
body.taste-dark-utility .cache-page {
  background: transparent;
}

body.taste-dark-workbench .topbar,
body.taste-dark-admin .topbar,
body.taste-dark-ops .page-header,
body.taste-dark-utility .cache-header,
body.taste-dark-utility .preparation-header {
  border-color: var(--linear-hairline);
  background: rgba(1, 1, 2, 0.96);
  box-shadow: none;
}

body.taste-dark-workbench .side-rail,
body.taste-dark-workbench .library-panel,
body.taste-dark-workbench .inspector,
body.taste-dark-workbench .inspector-panel,
body.taste-dark-workbench .bgm-panel,
body.taste-dark-workbench .stage-panel,
body.taste-dark-workbench .timeline-panel,
body.taste-dark-workbench .version-panel,
body.taste-dark-workbench .template-profile-panel,
body.taste-dark-workbench .monitor-meta,
body.taste-dark-workbench .slot-inspector,
body.taste-dark-admin .side-navigation,
body.taste-dark-admin .surface,
body.taste-dark-admin .hero-strip,
body.taste-dark-admin .side-access-card,
body.taste-dark-admin .summary-card,
body.taste-dark-admin .dashboard-grid .surface,
body.taste-dark-ops .flow-nav-card,
body.taste-dark-ops .panel,
body.taste-dark-ops .hint-card,
body.taste-dark-utility .preparation-toolbar,
body.taste-dark-utility .material-card,
body.taste-dark-utility .cache-toolbar,
body.taste-dark-utility .cache-sections,
body.taste-dark-utility .reference-panel,
body.taste-dark-utility .detail-dialog {
  border-color: var(--linear-hairline);
  border-radius: var(--linear-radius-md);
  background: var(--linear-surface-1);
  box-shadow: none;
}

body.taste-dark-workbench .side-rail,
body.taste-dark-admin .side-navigation {
  background: var(--linear-canvas);
}

/* Template manager, output library, and clip workbench use the shared workspace surfaces. */
body.taste-dark-workbench .workbench,
body.taste-dark-workbench .workbench-shell,
body.taste-dark-workbench .page-shell {
  background: var(--linear-canvas);
}

body.taste-dark-workbench .monitor-panel,
body.taste-dark-workbench .generated-video-card,
body.taste-dark-workbench .generated-video-action,
body.taste-dark-workbench .generated-status-pill,
body.taste-dark-workbench .status-badge,
body.taste-dark-workbench .track-item,
body.taste-dark-workbench .timeline-selection,
body.taste-dark-workbench .export-progress {
  border-color: var(--linear-hairline);
  background: var(--linear-surface-2);
  color: var(--linear-ink-muted);
}

body.taste-dark-workbench .generated-video-card:hover,
body.taste-dark-workbench .generated-video-action:hover:not(:disabled),
body.taste-dark-workbench .track-item:hover,
body.taste-dark-workbench .timeline-selection:hover {
  border-color: var(--linear-hairline-strong);
  background: var(--linear-surface-3);
  color: var(--linear-ink);
}

body.taste-dark-workbench .generated-video-card.state-generated,
body.taste-dark-workbench .generated-status-pill.state-generated {
  border-color: rgba(var(--linear-primary-rgb), 0.48);
  background: rgba(var(--linear-primary-rgb), 0.14);
  color: var(--linear-ink-muted);
}

body.taste-dark-workbench .generated-video-status-bar.state-generated,
body.taste-dark-workbench .generated-video-action.publish,
body.taste-dark-workbench .track-item.selected,
body.taste-dark-workbench .timeline-selection.segment-selected {
  border-color: var(--linear-primary);
  background: var(--linear-primary);
  color: var(--linear-on-primary);
}

body.taste-dark-workbench .generated-video-title-row strong,
body.taste-dark-workbench .generated-video-note,
body.taste-dark-workbench .generated-video-unavailable {
  color: var(--linear-ink);
}

body.taste-dark-workbench .generated-video-meta,
body.taste-dark-workbench .generated-video-missing,
body.taste-dark-workbench .generated-table-note,
body.taste-dark-workbench .generated-empty-row {
  color: var(--linear-ink-subtle);
}

/* Output-library rail: replace inherited material-library green selections with the shared primary accent. */
body.taste-dark-workbench .generated-videos-page {
  grid-template-columns: minmax(196px, var(--material-category-rail-width)) minmax(0, 1fr);
}

body.taste-dark-workbench .generated-videos-page .rail-heading strong {
  color: var(--linear-ink-muted);
}

body.taste-dark-workbench .generated-videos-page .rail-filter-chip {
  border-color: var(--linear-hairline-strong);
  background: var(--linear-surface-1);
  color: var(--linear-ink-muted);
}

body.taste-dark-workbench .generated-videos-page .rail-filter-chip.active {
  border-color: var(--linear-primary-focus);
  background: rgba(var(--linear-primary-rgb), 0.14);
  color: var(--linear-ink);
  box-shadow: inset 2px 0 0 var(--linear-primary);
}

body.taste-dark-workbench .generated-videos-page .library-empty {
  border-color: var(--linear-hairline-strong);
  background: var(--linear-surface-2);
  color: var(--linear-ink-subtle);
}

body.taste-dark-workbench .generated-videos-page .mini-meter {
  border-color: var(--linear-hairline);
  background: var(--linear-canvas);
}

body.taste-dark-workbench .generated-videos-page .mini-meter i {
  background: var(--linear-primary);
}

body.taste-dark-workbench .generated-videos-page .mini-meter.amber i {
  background: var(--linear-warning);
}

body.taste-dark-workbench .timeline-ruler,
body.taste-dark-workbench .timeline-canvas,
body.taste-dark-workbench .lane-shell,
body.taste-dark-workbench .timeline-stage {
  border-color: var(--linear-hairline);
  background: var(--linear-surface-1);
}

body.taste-dark-workbench .timeline-playhead::before,
body.taste-dark-workbench .timeline-selection-progress,
body.taste-dark-workbench .timeline-handle {
  background: var(--linear-primary);
}

/* Photographer preprocessing retains its workflow-specific controls, but not its former green palette. */
body.taste-dark-utility .preparation-toolbar,
body.taste-dark-utility .folder-panel,
body.taste-dark-utility .category-picker-trigger,
body.taste-dark-utility .category-menu,
body.taste-dark-utility .source-root-list,
body.taste-dark-utility .window-progress,
body.taste-dark-utility .scan-source-control,
body.taste-dark-utility .preparation-toolbar select,
body.taste-dark-utility .category-search,
body.taste-dark-utility .scan-source-control input {
  border-color: var(--linear-hairline-strong);
  background: var(--linear-surface-1);
  color: var(--linear-ink-muted);
}

body.taste-dark-utility .category-picker-toggle,
body.taste-dark-utility .source-root-chip,
body.taste-dark-utility .folder-choice,
body.taste-dark-utility .material-select,
body.taste-dark-utility .material-play {
  border-color: var(--linear-hairline);
  background: var(--linear-surface-2);
  color: var(--linear-ink-muted);
}

body.taste-dark-utility .category-choice,
body.taste-dark-utility .preparation-toolbar > span,
body.taste-dark-utility .toolbar-filter,
body.taste-dark-utility .panel-heading span,
body.taste-dark-utility .page-message {
  color: var(--linear-ink-subtle);
}

body.taste-dark-utility .category-choice + .category-choice {
  border-top-color: var(--linear-hairline);
}

body.taste-dark-utility .category-choice.selected,
body.taste-dark-utility .folder-choice.active,
body.taste-dark-utility .material-card.selected {
  border-color: var(--linear-primary-focus);
  background: rgba(var(--linear-primary-rgb), 0.14);
  color: var(--linear-ink);
  box-shadow: none;
}

body.taste-dark-utility .category-search:focus,
body.taste-dark-utility .preparation-toolbar select:focus,
body.taste-dark-utility .scan-source-control input:focus {
  border-color: var(--linear-primary-focus);
  box-shadow: 0 0 0 2px rgba(var(--linear-primary-rgb), 0.18);
}

/* Standalone diagnostics and interaction test pages share the same controls and surface ladder. */
body.taste-dark-utility button {
  border-color: var(--linear-hairline-strong);
  background: var(--linear-surface-2);
  color: var(--linear-ink-muted);
}

body.taste-dark-utility button:hover:not(:disabled) {
  border-color: var(--linear-primary-focus);
  background: var(--linear-surface-3);
  color: var(--linear-ink);
}

body.taste-dark-utility button.primary,
body.taste-dark-utility .action-button,
body.taste-dark-utility .clip.is-active {
  border-color: var(--linear-primary);
  background: var(--linear-primary);
  color: var(--linear-on-primary);
}

body.taste-dark-utility .panel,
body.taste-dark-utility .card,
body.taste-dark-utility .stat,
body.taste-dark-utility .item,
body.taste-dark-utility .track,
body.taste-dark-utility .source-bar,
body.taste-dark-utility .inspector,
body.taste-dark-utility .status {
  border-color: var(--linear-hairline);
  background: var(--linear-surface-1);
  color: var(--linear-ink-muted);
}

body.taste-dark-utility .panel h2,
body.taste-dark-utility .card .encoder,
body.taste-dark-utility .track-title strong,
body.taste-dark-utility .status-dot {
  color: var(--linear-primary-hover);
}

body.taste-dark-workbench .asset-card,
body.taste-dark-workbench .template-row,
body.taste-dark-workbench .version-row,
body.taste-dark-workbench .preview-card,
body.taste-dark-workbench .advice-card,
body.taste-dark-workbench .bgm-row,
body.taste-dark-workbench .metric-tile,
body.taste-dark-admin .metric-tile,
body.taste-dark-admin .summary-card {
  border-color: var(--linear-hairline);
  border-radius: var(--linear-radius-md);
  background: var(--linear-surface-2);
  box-shadow: none;
}

body.taste-dark-workbench .asset-card:hover,
body.taste-dark-workbench .template-row:hover,
body.taste-dark-workbench .version-row:hover,
body.taste-dark-workbench .preview-card:hover,
body.taste-dark-workbench .bgm-row:hover,
body.taste-dark-utility .material-card:hover {
  border-color: var(--linear-hairline-strong);
  background: var(--linear-surface-3);
}

body.taste-dark-workbench .asset-card.is-picked,
body.taste-dark-workbench .asset-card.selected,
body.taste-dark-workbench .template-row.is-active,
body.taste-dark-workbench .version-row.is-active,
body.taste-dark-workbench .preview-card.is-active,
body.taste-dark-utility .material-card.selected,
body.taste-dark-admin .side-menu-link.is-active,
body.taste-dark-ops .flow-nav-link.is-active {
  border-color: var(--linear-primary-focus);
  background: rgba(var(--linear-primary-rgb), 0.12);
  color: var(--linear-ink);
  box-shadow: inset 2px 0 0 var(--linear-primary);
}

body.taste-dark-workbench .tool-button.is-active,
body.taste-dark-workbench .ghost-button.is-active,
body.taste-dark-workbench .monitor-tool.is-active,
body.taste-dark-workbench .workspace-tab.active,
body.taste-dark-workbench .tab-button.active,
body.taste-dark-workbench .tab-button[aria-selected="true"] {
  border-color: var(--linear-primary-focus);
  background: var(--linear-primary);
  color: var(--linear-on-primary);
}

body.taste-dark-workbench .composition-monitor,
body.taste-dark-workbench .preview-box,
body.taste-dark-workbench .thumb,
body.taste-dark-workbench video,
body.taste-dark-workbench canvas {
  border-color: var(--linear-hairline-strong);
  border-radius: var(--linear-radius-md);
  background: #080809;
  box-shadow: none;
}

body.taste-dark-ops .content-section {
  border-color: var(--linear-hairline);
  background: transparent;
  box-shadow: none;
}

body.taste-dark-home .home-utility,
body.taste-dark-home .home-board {
  border-color: var(--linear-hairline);
}

body.taste-dark-home .home-board {
  background: var(--linear-surface-1);
  box-shadow: none;
}

body.taste-dark-home .home-intro {
  background: var(--linear-surface-2) !important;
}

body.taste-dark-home .home-intro::before {
  background: none !important;
}

body.taste-dark-home .home-media figure {
  border-color: var(--linear-hairline-strong);
  background: var(--linear-surface-3) !important;
}

body.taste-dark-home .home-link::after {
  border-color: rgba(var(--linear-primary-rgb), 0.12);
}

body.taste-dark-home .home-link:hover::after {
  border-color: rgba(var(--linear-primary-rgb), 0.28);
}

body.taste-dark-home .home-link-action {
  background: rgba(var(--linear-primary-rgb), 0.08);
}

body.taste-dark-admin .page-content,
body.taste-dark-admin .admin-layout {
  background: var(--linear-canvas) !important;
}

/* Former light administration pages now use the same dark product canvas. */
body.taste-light-admin .topbar {
  border-bottom: 1px solid var(--linear-hairline);
  background: var(--linear-canvas);
  color: var(--linear-ink);
  box-shadow: none;
}

body.taste-light-admin .wrap {
  max-width: 1280px;
  gap: 16px;
  color: var(--linear-ink);
}

body.taste-light-admin .card,
body.taste-light-admin .lic-card,
body.taste-light-console .modal-card {
  border-color: var(--linear-hairline);
  border-radius: var(--linear-radius-lg);
  background: var(--linear-surface-1);
  color: var(--linear-ink);
  box-shadow: none;
}

body.taste-light-admin .card h2,
body.taste-light-admin .card h3,
body.taste-light-admin .lic-card h1 {
  color: var(--linear-ink);
}

body.taste-light-admin label {
  color: var(--linear-ink-muted);
}

body.taste-light-admin .stat {
  border-color: var(--linear-hairline);
  border-radius: var(--linear-radius-md);
  background: var(--linear-surface-2);
}

body.taste-light-admin .stat .num {
  color: var(--linear-ink);
}

body.taste-light-admin .lic-shell {
  min-height: 100dvh;
  padding: 28px 20px;
}

body.taste-light-admin .lic-card {
  display: block;
  width: min(760px, 100%);
  padding: 30px 34px;
}

body.taste-light-admin .lic-card .state-box,
body.taste-light-admin form.activate {
  border-color: var(--linear-hairline);
  border-radius: var(--linear-radius-md);
  background: var(--linear-surface-2);
}

/* Authentication pages: restrained two-panel composition and compact forms. */
body.taste-auth,
body.taste-console-auth {
  min-height: 100dvh;
  margin: 0;
}

body.taste-auth.login-body,
body.taste-console-auth.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

body.taste-auth .login-shell {
  border: 1px solid var(--linear-hairline);
  border-radius: var(--linear-radius-xl);
  background: var(--linear-surface-1);
  box-shadow: var(--linear-shadow);
}

body.taste-auth .login-visual {
  border-color: var(--linear-hairline);
  background: var(--linear-canvas);
}

body.taste-auth .material-image {
  border-color: var(--linear-hairline-strong);
  box-shadow: none;
  filter: saturate(0.72) contrast(1.04);
}

body.taste-auth .login-panel,
body.taste-auth .login-card,
body.taste-console-auth .login-card {
  border: 1px solid var(--linear-hairline);
  border-radius: var(--linear-radius-lg);
  background: var(--linear-surface-1);
  box-shadow: none;
}

body.taste-auth .login-card,
body.taste-console-auth .login-card {
  width: min(560px, 100%);
  padding: 32px;
}

body.taste-auth .login-card form,
body.taste-console-auth .login-card form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

body.taste-auth .login-card label,
body.taste-console-auth .login-card label {
  display: grid;
  gap: 7px;
  color: var(--linear-ink-muted);
  font-size: 13px;
  font-weight: 500;
}

body.taste-auth .login-card input,
body.taste-console-auth .login-card input {
  min-height: 44px;
}

body.taste-auth .login-card form > button,
body.taste-console-auth .login-card form > button {
  min-height: 44px;
}

body.taste-auth .install-box,
body.taste-auth .steps {
  color: var(--linear-ink-muted);
}

body.taste-auth .install-box {
  border-color: var(--linear-hairline);
  background: var(--linear-surface-2);
}

body.taste-auth .install-box code,
body.taste-auth .back-link {
  color: var(--linear-primary-hover);
}

/* Unified application shell: stable desktop geometry for the Electron window. */
body.taste-site {
  padding-top: var(--site-shell-height);
}

#site-global-shell {
  position: fixed;
  inset: 0 0 auto;
  z-index: 3000;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  height: var(--site-shell-height);
  padding: 0 22px;
  padding-right: calc(22px + min(160px, env(titlebar-area-width, 0px)));
  border-bottom: 1px solid var(--linear-hairline);
  background: rgba(1, 1, 2, 0.96);
  color: var(--linear-ink);
  font-family: Inter, "SF Pro Text", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  box-shadow: none;
  -webkit-app-region: drag;
}

#site-global-shell [hidden] { display: none !important; }
#site-global-shell a { text-decoration: none; }
#site-global-shell a,
#site-global-shell button { -webkit-app-region: no-drag; }

html[data-business-page]:not([data-business-page-ready="true"]):not([data-business-page-bootstrap-finished="true"]) body {
  overflow: hidden;
}

html[data-business-page]:not([data-business-page-ready="true"]):not([data-business-page-bootstrap-finished="true"]) body::before,
html[data-business-page]:not([data-business-page-ready="true"]):not([data-business-page-bootstrap-finished="true"]) body::after {
  position: fixed;
  inset: 0;
  z-index: 2899;
  background: var(--linear-canvas);
  content: "";
}

html[data-business-page]:not([data-business-page-ready="true"]):not([data-business-page-bootstrap-finished="true"]) body::after {
  z-index: 2900;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--linear-ink-subtle);
  content: "正在加载工作区…";
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  animation: site-page-bootstrap-feedback 1ms linear var(--site-page-bootstrap-feedback-delay) both;
}

html[data-business-page]:not([data-business-page-ready="true"]):not([data-business-page-bootstrap-finished="true"]) body.site-business-page-loading::before,
html[data-business-page]:not([data-business-page-ready="true"]):not([data-business-page-bootstrap-finished="true"]) body.site-business-page-loading::after {
  content: none;
}

body.site-business-page-loading {
  overflow: hidden;
}

.site-page-bootstrap {
  position: fixed;
  inset: var(--site-shell-height) 0 0;
  z-index: 2900;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: rgb(1 1 2 / 35%);
  color: var(--linear-ink);
}

.site-page-bootstrap[hidden] { display: none; }

.site-page-bootstrap strong {
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  animation: site-page-bootstrap-feedback 1ms linear var(--site-page-bootstrap-feedback-delay) both;
}

.site-page-bootstrap-indicator {
  width: 22px;
  height: 22px;
  border: 2px solid var(--linear-hairline-strong);
  border-top-color: var(--linear-primary-hover);
  border-radius: 50%;
  opacity: 0;
  animation:
    site-page-bootstrap-spin 0.8s linear infinite,
    site-page-bootstrap-feedback 1ms linear var(--site-page-bootstrap-feedback-delay) both;
}

@keyframes site-page-bootstrap-spin {
  to { transform: rotate(360deg); }
}

@keyframes site-page-bootstrap-feedback {
  to { opacity: 1; }
}

.site-shell-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  gap: 10px;
  color: var(--linear-ink);
}

.site-shell-mark {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  object-fit: contain;
}

.site-shell-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.site-shell-brand-copy strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.site-shell-brand-copy small {
  color: var(--linear-ink-tertiary);
  font-size: 9px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.site-shell-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  min-width: 0;
  /* NAV-GROUP-001：下拉菜单要伸出导航条；平铺模式放不下的条目由 home-link.js 收进「更多」，不再横向滚动 */
  overflow: visible;
  scrollbar-width: none;
}

.site-shell-nav::-webkit-scrollbar { display: none; }

.site-shell-nav-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--linear-radius-sm);
  color: var(--linear-ink-subtle);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--linear-transition), border-color var(--linear-transition), background-color var(--linear-transition);
}

.site-shell-nav-link:hover {
  border-color: var(--linear-hairline);
  background: var(--linear-surface-1);
  color: var(--linear-ink);
}

.site-shell-nav-link.is-active {
  border-color: var(--linear-hairline-strong);
  background: var(--linear-surface-2);
  color: var(--linear-ink);
  box-shadow: inset 0 -2px 0 var(--linear-primary);
}

/* SHELL-TOOLBAR-001（用户 2026-10-05 选定方案 B）：项目 / 主题 / 账户合进一个外框，段间细竖线，
   悬停各自高亮。效果图 UI改版效果图-v2/shell/顶栏右侧控件统一-20261005/。 */
.site-shell-account-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  height: 36px;
  padding: 0 2px;
  border: 1px solid var(--linear-hairline-strong);
  border-radius: 10px;
  background: var(--linear-surface-1);
}

/* 竖线只画在两个可见段之间：项目切换器没有项目时整段 hidden，不能留一根孤线。 */
.site-shell-account-area > :is(.site-shell-inbox, .site-shell-project, .site-shell-theme-toggle, .site-shell-session-state, .site-shell-login, .site-shell-account):not([hidden]) ~ :is(.site-shell-project, .site-shell-theme-toggle, .site-shell-session-state, .site-shell-login, .site-shell-account):not([hidden])::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: -5px;
  width: 1px;
  background: var(--linear-hairline-strong);
  pointer-events: none;
}

/* 全局当前素材项目切换器（MATERIAL-PROJ-005）：颜色全走主题变量，明暗两套自动跟随。
   select 规则带 #site-global-shell 前缀，压过 body.taste-site select 的通用表单样式。 */
.site-shell-project {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--linear-ink-muted);
  -webkit-app-region: no-drag;
}

.site-shell-project-caption {
  color: var(--linear-ink-tertiary);
  font-size: 12px;
  line-height: 30px;
  padding-top: 2px;
  white-space: nowrap;
}

/* 与账户段同一种细箭头（原来是系统粗黑箭头）。 */
#site-global-shell .site-shell-project select {
  max-width: 180px;
  height: 30px;
  min-height: 30px;
  padding: 0 18px 0 0;
  border: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a8f98' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 2px center / 10px 6px no-repeat;
  color: var(--linear-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 30px;
  box-shadow: none;
  cursor: pointer;
  color-scheme: dark;
  -webkit-appearance: none;
  appearance: none;
  -webkit-app-region: no-drag;
}

:root[data-theme="light"] #site-global-shell .site-shell-project select { color-scheme: light; }

#site-global-shell .site-shell-project select option { background: var(--linear-surface-1); color: var(--linear-ink); }
#site-global-shell .site-shell-project select:focus-visible { outline: 2px solid var(--linear-primary); outline-offset: 1px; border-radius: 4px; }
#site-global-shell .site-shell-project select:disabled { cursor: wait; opacity: 0.6; }

.site-shell-project:hover {
  background: var(--linear-surface-3);
}

.site-shell-project.is-prompt {
  box-shadow: inset 0 0 0 1px var(--linear-warning);
}

#site-global-shell .site-shell-project.is-prompt select { color: var(--linear-warning); }

.site-shell-project.is-error { box-shadow: inset 0 0 0 1px var(--linear-danger, #e5484d); }

#site-global-shell .site-shell-project-retry {
  min-height: 30px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--linear-danger, #e5484d);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

#site-global-shell .site-shell-project select:hover,
#site-global-shell .site-shell-project select:focus { border: 0; background-color: transparent; box-shadow: none; }

.site-shell-login,
.site-shell-session-state,
.site-shell-account {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--linear-ink-muted);
}

.site-shell-login {
  padding: 0 13px;
  font-size: 12px;
  font-weight: 500;
}

.site-shell-session-state {
  padding: 0 13px;
  font-size: 12px;
  font-weight: 500;
}

.site-shell-account {
  gap: 8px;
  padding: 0 8px 0 4px;
  text-align: left;
  cursor: pointer;
}

.site-shell-login:hover,
.site-shell-account:hover,
.site-shell-account[aria-expanded="true"] {
  background: var(--linear-surface-3);
  color: var(--linear-ink);
}

/* 账户段单行：首字头像 + 名字；在线用头像右下角的绿点表示，角色移到下拉菜单顶部。 */
.site-shell-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  background: var(--linear-primary);
  color: var(--linear-on-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.site-shell-online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--linear-success);
  box-shadow: 0 0 0 2px var(--linear-surface-1);
}

.site-shell-account-copy {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.site-shell-account-copy strong {
  overflow: hidden;
  max-width: 120px;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-shell-chevron {
  width: 10px;
  height: 6px;
  flex: 0 0 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a8f98' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px 6px no-repeat;
}

.site-shell-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 218px;
  padding: 8px;
  border: 1px solid var(--linear-hairline-strong);
  border-radius: var(--linear-radius-md);
  background: var(--linear-surface-2);
  box-shadow: var(--linear-shadow);
}

.site-shell-menu-profile {
  display: grid;
  gap: 4px;
  padding: 9px 10px 11px;
  border-bottom: 1px solid var(--linear-hairline);
}

.site-shell-menu-profile span,
.site-shell-menu-profile small { color: var(--linear-ink-subtle); font-size: 10px; }
.site-shell-menu-profile strong { font-size: 13px; }

.site-shell-account-menu a,
.site-shell-account-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--linear-radius-sm);
  background: transparent;
  color: var(--linear-ink-muted);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

/* 只管字体、不管颜色：带 #site-global-shell 前缀压过 body.taste-site button 的通用字号，
   让链接项与按钮项一样大；颜色仍留给上面那条（退出系统的红色才不会被盖掉）。 */
#site-global-shell .site-shell-account-menu a,
#site-global-shell .site-shell-account-menu button {
  font: inherit;
  font-size: 12px;
  font-weight: 500;
}

.site-shell-account-menu a:hover,
.site-shell-account-menu button:hover {
  background: var(--linear-surface-3);
  color: var(--linear-ink);
}

.site-password-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--linear-hairline-strong);
  border-radius: var(--linear-radius-lg);
  background: var(--linear-surface-2);
  color: var(--linear-ink);
  box-shadow: var(--linear-shadow);
}

.site-password-dialog::backdrop {
  background: var(--linear-overlay);
  backdrop-filter: blur(3px);
}

.site-password-form {
  display: grid;
  gap: 16px;
  padding: 24px;
  font-family: Inter, "SF Pro Text", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

.site-password-heading { display: grid; gap: 6px; }
.site-password-heading span { color: var(--linear-primary); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.site-password-heading h2 { margin: 0; color: var(--linear-ink); font-size: 20px; }
.site-password-heading p { margin: 0; color: var(--linear-ink-subtle); font-size: 12px; line-height: 1.6; }
.site-password-form label { display: grid; gap: 7px; color: var(--linear-ink-muted); font-size: 12px; }
.site-password-form input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--linear-hairline-strong);
  border-radius: var(--linear-radius-sm);
  background: var(--linear-surface-1);
  color: var(--linear-ink);
}
.site-password-form input:focus { border-color: var(--linear-primary); outline: none; }
.site-password-result { min-height: 18px; margin: 0; color: var(--linear-danger); font-size: 12px; }
.site-password-result:empty { display: none; }
.site-password-result.is-success { color: var(--linear-success); }
.site-password-actions { display: flex; justify-content: flex-end; gap: 10px; }
.site-password-actions button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--linear-hairline-strong);
  border-radius: var(--linear-radius-sm);
  background: var(--linear-surface-3);
  color: var(--linear-ink);
  cursor: pointer;
}
.site-password-actions [data-password-submit] {
  border-color: var(--linear-primary);
  background: var(--linear-primary);
  color: var(--linear-on-primary);
}
.site-password-actions button:disabled { cursor: wait; opacity: 0.55; }

#site-global-shell.is-simple .site-shell-nav { display: none; }
#site-global-shell.is-simple .site-shell-account-area { grid-column: 3; }
/* 简单页（认证/控制台登录）外壳只保留品牌区与主题切换按钮（UI-B1-AUTH-SHELL-20260919）。 */
#site-global-shell.is-simple .site-shell-session-state,
#site-global-shell.is-simple .site-shell-login,
#site-global-shell.is-simple .site-shell-account { display: none !important; }
/* 简单页只剩主题按钮：不画工具条外框，按钮自带边框。 */
#site-global-shell.is-simple .site-shell-account-area { height: auto; padding: 0; border: 0; background: transparent; }
#site-global-shell.is-simple .site-shell-theme-toggle { width: 34px; height: 34px; min-height: 34px; flex-basis: 34px; border: 1px solid var(--linear-hairline); }
/* 顶部固定外壳为认证页居中内容让位。 */
body.site-global-shell-active.taste-auth.login-body,
body.site-global-shell-active.taste-console-auth.login-body {
  padding-top: calc(var(--site-shell-height) + 24px);
}
/* 空结果占位不再显示灰带。 */
body.taste-auth .login-result:empty,
body.taste-console-auth .login-result:empty { display: none; }

body.site-global-shell-active .site-home-button,
body.site-global-shell-active .session-chip,
body.site-global-shell-active .account-summary,
body.site-global-shell-active #logout-button,
body.site-global-shell-active .login-home-link,
body.site-global-shell-active .brand-lockup,
body.site-global-shell-active .brand-block,
body.site-global-shell-active .cache-brand,
body.site-global-shell-active .login-brand {
  display: none !important;
}

body.site-global-shell-active.taste-light-admin > header.topbar:not(#site-global-shell),
body.site-global-shell-active.taste-light-console > header.topbar:not(#site-global-shell) {
  display: none !important;
}

/* 横幅的纵向位置由 .system-banner-stack（auth.css）统一负责挂在外壳下方：
   这里不能再叠一次壳高，否则栈一旦可滚就是双份偏移。 */
.license-gate-banner { position: sticky !important; top: 0 !important; z-index: 1900 !important; }
body.site-global-shell-active .workspace-shell { height: calc(100vh - var(--site-shell-height)); min-height: calc(100vh - var(--site-shell-height)); }
body.site-global-shell-active .app-shell { min-height: calc(100vh - var(--site-shell-height)); }
body.site-global-shell-active .app-shell .side-rail { height: calc(100vh - var(--site-shell-height)); top: var(--site-shell-height); }
body.site-global-shell-active .page-shell { height: calc(100vh - var(--site-shell-height)); min-height: max(696px, calc(760px - var(--site-shell-height))); }
body.site-global-shell-active .ops-shell { min-height: calc(100vh - var(--site-shell-height)); }
body.site-global-shell-active .preparation-page { min-height: calc(100vh - var(--site-shell-height)); }
body.site-global-shell-active .home-shell { min-height: calc(100vh - var(--site-shell-height)); }
body.site-global-shell-active .home-main { min-height: calc(100vh - var(--site-shell-height)); }
body.site-global-shell-active.taste-dark-home .home-utility { display: none; }
body.site-global-shell-active .cache-header { top: var(--site-shell-height); }

body.taste-dark-workbench .rail-filter-chip.active,
body.taste-dark-workbench .audio-library-tabs .ghost-button.active {
  border-color: var(--linear-primary-focus) !important;
  background: rgba(var(--linear-primary-rgb), 0.14) !important;
  color: var(--linear-ink) !important;
  box-shadow: inset 2px 0 0 var(--linear-primary);
}

body.taste-dark-workbench .asset-card.selected,
body.taste-dark-workbench .asset-card:focus-visible,
body.taste-dark-workbench .template-row.is-active,
body.taste-dark-workbench .version-row.is-active,
body.taste-dark-workbench .audio-library-item.is-selected {
  border-color: var(--linear-primary-focus) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--linear-primary-rgb), 0.24) !important;
}

body.taste-dark-workbench .audio-library-view {
  background: var(--linear-canvas);
}

body.taste-dark-workbench .audio-library-column,
body.taste-dark-workbench .bgm-manage-strip {
  border-color: var(--linear-hairline);
  background: var(--linear-surface-1);
}

body.taste-dark-workbench .audio-library-column-heading {
  border-color: var(--linear-hairline);
}

body.taste-dark-workbench .voiceover-selected-video-name.is-selected {
  color: var(--linear-primary-hover);
}

body.taste-dark-workbench .timeline-workspace {
  --timeline-workspace-bg: var(--linear-surface-1) !important;
  border-color: var(--linear-hairline) !important;
  background: var(--linear-surface-1) !important;
}

body.taste-dark-workbench .track-labels {
  border-color: var(--linear-hairline) !important;
  background: var(--linear-surface-1) !important;
}

body.taste-dark-workbench .slot-track,
body.taste-dark-workbench .template-source-audio-track,
body.taste-dark-workbench .template-audio-dock,
body.taste-dark-workbench .template-bgm-track {
  background: var(--linear-surface-1) !important;
  background-image: none !important;
}

body.taste-dark-workbench .audio-slot-guide {
  display: none !important;
}

body.taste-dark-workbench .timeline-audio-panel.is-dragover {
  background: rgba(var(--linear-primary-rgb), 0.08);
}

body.taste-dark-workbench .monitor-slot.is-playing,
body.taste-dark-workbench .slot-block.is-playing,
body.taste-dark-workbench .mark-clip.is-playing,
body.taste-dark-workbench .title-clip.is-playing {
  border-color: var(--linear-primary);
  box-shadow: inset 0 0 0 1px rgba(var(--linear-primary-rgb), 0.32);
}

body.taste-dark-workbench .audio-dock-bar {
  background: #34385d !important;
}

body.taste-dark-workbench .audio-dock-bar.is-selected {
  background: #444976 !important;
}

body.taste-dark-workbench .timeline-clip--audio .timeline-audio-dock-bar {
  background: #12385e !important;
}

body.taste-dark-workbench .timeline-clip--audio.is-selected .timeline-audio-dock-bar {
  background: #17466f !important;
}

body.taste-dark-workbench .timeline-clip--audio.is-selected.is-selected-multi .timeline-audio-dock-bar {
  background: #205783 !important;
}

body.taste-dark-workbench .timeline-clip--audio.is-selected.is-selected-primary .timeline-audio-dock-bar {
  background: #2a6595 !important;
}

body.taste-dark-workbench .source-audio-dock-bar > strong {
  background: rgba(29, 31, 57, 0.68);
}

body.taste-dark-workbench .source-audio-inspector-control,
body.taste-dark-workbench .source-audio-inspector-control output,
body.taste-dark-workbench .track-label strong {
  color: var(--linear-ink-muted) !important;
}

body.taste-dark-home.home-body {
  background: var(--linear-canvas) !important;
}

@media (max-width: 1279px) {
  #site-global-shell {
    gap: 10px;
    padding: 0 14px;
    padding-right: calc(14px + min(160px, env(titlebar-area-width, 0px)));
  }

  .site-shell-nav-link { padding: 0 8px; font-size: 11px; }
  #site-global-shell .site-shell-project select { max-width: 120px; }

  body.taste-site .grid,
  body.taste-site .dashboard-grid,
  body.taste-site .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 注意：一键成片（.oneclick-shell）自带三列骨架，且它的视图键也叫 "audio"，
     这里必须排除，否则会在 ≤1279px 被压成单列（左栏还在，主区被推到下面一屏）。 */
  body.taste-dark-workbench .app-shell:not(.oneclick-shell) {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  body.taste-dark-workbench .app-shell[data-view="materials"] {
    grid-template-columns: minmax(196px, var(--material-category-rail-width)) 12px minmax(0, 1fr);
  }

  body.taste-dark-workbench .app-shell[data-view="audio"]:not(.oneclick-shell) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.taste-dark-workbench .workspace-shell > .workbench {
    grid-template-columns: 260px minmax(0, 1fr);
    height: auto;
    min-height: calc(100dvh - var(--site-shell-height));
    overflow: visible;
  }

  body.taste-dark-workbench .workspace-shell > .workbench > .inspector-panel {
    grid-column: 1 / -1;
    max-height: 340px;
  }

  body.taste-dark-workbench .page-shell .editor-shell {
    grid-template-columns: 306px minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  #site-global-shell {
    gap: 8px;
    padding: 0 12px;
    padding-right: calc(12px + min(160px, env(titlebar-area-width, 0px)));
  }

  .site-shell-brand-copy small { display: none; }
  .site-shell-account { padding: 0 4px; }
  .site-shell-account-copy,
  .site-shell-chevron { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.taste-site *,
  body.taste-site *::before,
  body.taste-site *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Client material-library category controls use the neutral shared palette. */
body.taste-dark-workbench .rail-add-button,
body.taste-dark-workbench .rail-category-form {
  border-color: var(--linear-hairline-strong) !important;
  background: var(--linear-surface-2) !important;
  color: var(--linear-ink-muted) !important;
}

body.taste-dark-workbench .rail-add-button:hover {
  border-color: var(--linear-hairline-tertiary) !important;
  background: var(--linear-surface-3) !important;
  color: var(--linear-ink) !important;
}

body.taste-dark-workbench .rail-category-form label,
body.taste-dark-workbench .rail-category-form .rail-form-note {
  color: var(--linear-ink-subtle) !important;
}

body.taste-dark-workbench .rail-category-form,
body.taste-dark-workbench .rail-category-form * {
  pointer-events: auto !important;
  -webkit-app-region: no-drag !important;
}

body.taste-dark-workbench .rail-filter-chip:not(.active):not(.warn):not(.danger) {
  border-color: var(--linear-hairline-strong) !important;
  background: var(--linear-surface-2) !important;
  color: var(--linear-ink-muted) !important;
}

body.taste-dark-workbench .audio-library-page-heading small,
body.taste-dark-workbench .audio-library-column-heading small,
body.taste-dark-workbench .voiceover-selected-video-name {
  color: var(--linear-ink-subtle) !important;
}

body.taste-dark-workbench .audio-library-column-heading h2,
body.taste-dark-workbench .bgm-row-title strong,
body.taste-dark-workbench .vo-row-name {
  color: var(--linear-ink) !important;
}

body.taste-dark-workbench .bgm-row {
  border-color: var(--linear-hairline) !important;
  background: var(--linear-surface-2) !important;
}

body.taste-dark-workbench .bgm-meta-chip {
  border-color: var(--linear-hairline-strong) !important;
  background: var(--linear-surface-1) !important;
  color: var(--linear-ink-subtle) !important;
}

body.taste-dark-workbench .vo-row-name:hover {
  color: var(--linear-primary-hover) !important;
}

/* ============================================================
   亮色主题（UI-B1-SHELL-THEME-20260919；UI-THEME-LIVE-20260921 升级）
   覆盖 --linear-* 核心 token 与少量暗色硬编码；
   UI-THEME-LIVE-20260921：页面 <html> 静态 data-theme="light"，亮色=默认观感；
   强调色/状态色对齐设计稿 design-tokens.html（苹果性格：#0071E3 等）。
   ============================================================ */
:root[data-theme="light"] {
  color-scheme: light;
  --linear-canvas: #f5f5f7;
  --linear-surface-1: #ffffff;
  --linear-surface-2: #fbfbfd;
  --linear-surface-3: #f6f6f9;
  --linear-surface-4: #f1f1f5;
  --linear-ink: #1d1d1f;
  --linear-ink-muted: #48484c;
  --linear-ink-subtle: #6e6e73;
  /* THEME-CONTRAST-001：原 #a1a1a6 在白底只有 2.6:1；调深到白底 4.9:1、#f5f5f7 底 4.5:1。 */
  --linear-ink-tertiary: #707075;
  --linear-hairline: #e4e4e9;
  --linear-hairline-strong: #d2d2d7;
  --linear-hairline-tertiary: #c7c7cc;
  --linear-primary: #0071e3;
  --linear-primary-hover: #0077ed;
  --linear-primary-focus: #0071e3;
  --linear-primary-rgb: 0, 113, 227;
  --linear-success: #1d9e52;
  --linear-warning: #b25000;
  --linear-danger: #d70015;
  --linear-overlay: rgba(0, 0, 0, 0.4);
  --linear-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* THEME-CONTRAST-001：body.taste-site / taste-dark-* 上写死了 color-scheme: dark，
   亮色下原生控件（复选框、单选、文件按钮、滚动条、下拉）会仍按暗色绘制。 */
:root[data-theme="light"] body.taste-site,
:root[data-theme="light"] body.taste-dark-workbench,
:root[data-theme="light"] body.taste-dark-admin,
:root[data-theme="light"] body.taste-dark-ops,
:root[data-theme="light"] body.taste-dark-utility,
:root[data-theme="light"] body.taste-dark-home,
:root[data-theme="light"] body.taste-light-admin,
:root[data-theme="light"] body.taste-auth,
:root[data-theme="light"] body.taste-console-auth {
  color-scheme: light;
}

/* 亮色下修复暗色硬编码：外壳、加载遮罩、业务页顶栏 */
:root[data-theme="light"] #site-global-shell {
  background: rgba(255, 255, 255, 0.96);
}

:root[data-theme="light"] .site-page-bootstrap {
  background: rgb(255 255 255 / 65%);
}

:root[data-theme="light"] body.taste-dark-utility .preparation-header {
  background: rgba(255, 255, 255, 0.92);
}

/* 亮色下业务页页头（UI-LIGHT-RESIDUE-20260920）：
   body.taste-dark-* 类不随主题切换移除，509-517 的写死深底在亮色下继续命中 */
:root[data-theme="light"] body.taste-dark-workbench .topbar,
:root[data-theme="light"] body.taste-dark-admin .topbar,
:root[data-theme="light"] body.taste-dark-ops .page-header,
:root[data-theme="light"] body.taste-dark-utility .cache-header {
  background: var(--linear-canvas);
  border-color: var(--linear-hairline);
}

/* 亮色 ghost-button（基础样式在 ai-video-materials.css 写死深色，成品库顶栏等页复用） */
:root[data-theme="light"] .ghost-button {
  background: var(--linear-surface-1);
  border-color: var(--linear-hairline-strong);
  color: var(--linear-ink);
}

:root[data-theme="light"] .ghost-button.danger {
  background: var(--linear-surface-1);
  border-color: var(--linear-danger);
  color: var(--linear-danger);
}

:root[data-theme="light"] body.taste-site .danger,
:root[data-theme="light"] body.taste-site .danger-button,
:root[data-theme="light"] body.taste-site button[data-shell-logout] {
  color: var(--linear-danger);
}

/* 亮色下素材剪辑台的预览画框（UI-LIGHT-RESIDUE-20260926）：
   821-830 给 body.taste-dark-workbench 的 video/canvas 写死 #080809，而 body 的
   taste-dark-* 类不随主题移除；空预览时 <video> 会盖掉 --monitor-bg（亮色浅灰），
   整个画面预览列发黑。亮色下按画框底色收口，暗色不变。 */
:root[data-theme="light"] body.taste-dark-workbench #clipwbApp .monitor-frame video,
:root[data-theme="light"] body.taste-dark-workbench #clipwbApp .monitor-frame .preview-adjustment-canvas {
  background: var(--monitor-bg);
}

/* 品牌 Logo 主题自适应：dark=原版白底 png，light=深底反色 svg（同原型 site-shell 方案，CSS content 切换） */
.site-shell-mark {
  content: url("assets/branding/matrix-logo-mark-64.png");
}

:root[data-theme="light"] .site-shell-mark {
  content: url("assets/branding/matrix-logo-mark-light.svg");
}

.home-brand-mark img {
  content: url("assets/branding/matrix-logo-mark-64.png");
}

:root[data-theme="light"] .home-brand-mark img {
  content: url("assets/branding/matrix-logo-mark-light.svg");
}

/* 外壳主题切换按钮（日/月，mask 着色随主题） */
.site-shell-theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 30px;
  min-height: 30px; /* 批量生产页 styles.css 的 button { min-height: 38px } 会把它撑高 */
  flex: 0 0 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--linear-ink-muted);
  cursor: pointer;
  transition:
    background var(--linear-transition),
    color var(--linear-transition),
    border-color var(--linear-transition);
}

.site-shell-theme-toggle:hover {
  background: var(--linear-surface-3);
  border-color: var(--linear-hairline-strong);
  color: var(--linear-ink);
}

.site-shell-theme-icon {
  display: block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

.site-shell-theme-toggle:not(.is-light) .site-shell-theme-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13.5 9.6A6 6 0 0 1 6.4 2.5a6 6 0 1 0 7.1 7.1Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13.5 9.6A6 6 0 0 1 6.4 2.5a6 6 0 1 0 7.1 7.1Z'/%3E%3C/svg%3E");
}

.site-shell-theme-toggle.is-light .site-shell-theme-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3.2'/%3E%3Cg stroke='black' stroke-width='1.4' stroke-linecap='round' fill='none'%3E%3Cpath d='M8 0.8v2.1M8 13.1v2.1M0.8 8h2.1M13.1 8h2.1M2.9 2.9l1.5 1.5M11.6 11.6l1.5 1.5M13.1 2.9l-1.5 1.5M4.4 11.6l-1.5 1.5'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3.2'/%3E%3Cg stroke='black' stroke-width='1.4' stroke-linecap='round' fill='none'%3E%3Cpath d='M8 0.8v2.1M8 13.1v2.1M0.8 8h2.1M13.1 8h2.1M2.9 2.9l1.5 1.5M11.6 11.6l1.5 1.5M13.1 2.9l-1.5 1.5M4.4 11.6l-1.5 1.5'/%3E%3C/g%3E%3C/svg%3E");
}

/* INBOX-NAV-001：右侧工具条最左的收件箱入口。蓝色数字＝待领取条数，红点＝有未看过的新投递。
   效果图 UI改版效果图-v2/inbox/爆款收件箱独立页-20261008/01a–02a。带 #site-global-shell 前缀压过 body.taste-site a 的链接色。 */
#site-global-shell .site-shell-inbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  min-width: 32px;
  flex: 0 0 auto;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--linear-ink-muted);
  text-decoration: none;
  transition: background var(--linear-transition), color var(--linear-transition);
}

#site-global-shell .site-shell-inbox:hover {
  background: var(--linear-surface-3);
  color: var(--linear-ink);
}

.site-shell-inbox-icon {
  display: block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M1.8 9.2 3.7 3.2h8.6l1.9 6v3.6H1.8Z'/%3E%3Cpath d='M1.8 9.2h3.5l.9 1.7h3.6l.9-1.7h3.5'/%3E%3C/svg%3E");
  mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M1.8 9.2 3.7 3.2h8.6l1.9 6v3.6H1.8Z'/%3E%3Cpath d='M1.8 9.2h3.5l.9 1.7h3.6l.9-1.7h3.5'/%3E%3C/svg%3E");
}

.site-shell-inbox-count {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--linear-primary);
  color: var(--linear-on-primary, #fff);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.site-shell-inbox-dot {
  position: absolute;
  top: 3px;
  right: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 0 2px var(--linear-surface-1);
}

/* SYS-UPDATE-001：有新版本时顶栏「系统管理」右上角小红点（只给系统管理员显示） */
.site-shell-nav-link.has-update-dot,
.site-shell-settings.has-update-dot { position: relative; }
.site-shell-settings.has-update-dot::after,
.site-shell-nav-link.has-update-dot::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 0 2px var(--linear-canvas, #fff);
}

/* MATERIAL-PROJ-008：项目范围提示条（home-link.js 填充 [data-scope-bar]）与首次选项目弹窗 */
.site-scope-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin: 0 0 12px;
  padding: 7px 12px;
  border: 1px solid var(--linear-hairline);
  border-radius: var(--linear-radius-sm);
  background: var(--linear-surface-1);
  color: var(--linear-ink-subtle);
  font-size: 12px;
  line-height: 1.5;
}

.site-scope-bar[hidden],
[data-scope-owner-note][hidden] { display: none; }
.site-scope-bar strong { color: var(--linear-ink); font-weight: 600; }

.site-scope-bar-switch {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--linear-primary);
  font: inherit;
  cursor: pointer;
}

.site-scope-bar-switch:hover { text-decoration: underline; }
.site-scope-bar.is-empty-hint { border-color: var(--linear-warning, #d97706); }

.site-project-prompt-list {
  display: grid;
  gap: 8px;
  max-height: 46vh;
  overflow-y: auto;
}

#site-material-project-prompt .site-project-prompt-choice {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--linear-hairline-strong);
  border-radius: var(--linear-radius-sm);
  background: var(--linear-surface-1);
  color: var(--linear-ink);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

#site-material-project-prompt .site-project-prompt-choice:hover {
  border-color: var(--linear-primary);
  background: var(--linear-surface-2);
}

/* NAV-GROUP-001：顶栏分组下拉 / 平铺分隔线 / 更多 / 系统管理齿轮 / 账户菜单里的导航样式 */
.site-shell-nav-group { position: relative; display: inline-flex; flex: 0 0 auto; }
#site-global-shell .site-shell-nav-group-btn {
  gap: 6px;
  min-height: 34px;
  background: transparent;
  /* body.taste-site button 的通用字号优先级更高，这里显式写回导航链接的字号（窄屏另见下方） */
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
@media (max-width: 1279px) {
  #site-global-shell .site-shell-nav-group-btn { padding: 0 8px; font-size: 11px; }
}
.site-shell-nav-group-btn[aria-expanded="true"] { border-color: var(--linear-hairline); background: var(--linear-surface-1); color: var(--linear-ink); }
.site-shell-nav-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  display: grid;
  width: 260px;
  padding: 6px;
  border: 1px solid var(--linear-hairline-strong);
  border-radius: var(--linear-radius-md);
  background: var(--linear-surface-2);
  box-shadow: var(--linear-shadow);
}
.site-shell-nav-group.is-more .site-shell-nav-menu { left: auto; right: 0; }
#site-global-shell .site-shell-nav-menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0 8px;
  min-height: 40px;
  padding: 5px 10px;
  border-radius: var(--linear-radius-sm);
  color: var(--linear-ink-muted);
  font-size: 12px;
  font-weight: 500;
}
.site-shell-nav-menu-item small { grid-column: 1 / 2; color: var(--linear-ink-tertiary); font-size: 11px; font-weight: 400; line-height: 1.3; }
.site-shell-nav-menu-item .site-shell-nav-badge { grid-row: 1 / 3; grid-column: 2; }
#site-global-shell .site-shell-nav-menu-item:hover { background: var(--linear-surface-3); color: var(--linear-ink); }
#site-global-shell .site-shell-nav-menu-item.is-active { background: var(--linear-surface-3); color: var(--linear-ink); box-shadow: inset 2px 0 0 var(--linear-primary); }
.site-shell-nav-badge {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--linear-primary);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  line-height: 18px;
  text-align: center;
}
.site-shell-nav-sep { flex: 0 0 1px; width: 1px; height: 18px; margin: 0 6px; background: var(--linear-hairline-strong); }

#site-global-shell .site-shell-settings {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 30px;
  border-radius: 8px;
  color: var(--linear-ink-muted);
  transition: background var(--linear-transition), color var(--linear-transition);
}
#site-global-shell .site-shell-settings svg { width: 17px; height: 17px; }
#site-global-shell .site-shell-settings:hover,
#site-global-shell .site-shell-settings.is-active { background: var(--linear-surface-3); color: var(--linear-ink); }
.site-shell-settings.has-update-dot::after { top: 4px; right: 5px; }

.site-shell-nav-style { display: grid; gap: 6px; padding: 8px 10px 10px; border-bottom: 1px solid var(--linear-hairline); }
.site-shell-nav-style > span { color: var(--linear-ink-tertiary); font-size: 11px; line-height: 1.4; }
.site-shell-nav-style > div { display: flex; gap: 4px; }
#site-global-shell .site-shell-account-menu .site-shell-nav-style button {
  flex: 1;
  justify-content: center;
  min-height: 28px;
  padding: 0 6px;
  border: 1px solid var(--linear-hairline-strong);
  border-radius: 6px;
  color: var(--linear-ink-subtle);
  font-size: 12px;
}
#site-global-shell .site-shell-account-menu .site-shell-nav-style button.is-on {
  border-color: var(--linear-primary);
  background: var(--linear-surface-1);
  color: var(--linear-primary);
  font-weight: 600;
}

/* PATH-RELINK-001：NAS 地址自动修复的结果条（复用离线提醒的版式；修好了是绿色）。 */
.site-material-library-offline.site-path-relink.is-ok,
body.taste-site .site-material-library-offline.site-path-relink.is-ok {
  border-bottom-color: #1a9a5a;
  background: color-mix(in srgb, #1a9a5a 12%, var(--linear-surface-1, #ffffff));
  color: #137a46;
}
.site-path-relink-action {
  margin-left: 10px;
  color: inherit;
  text-decoration: underline;
  white-space: nowrap;
}
/* NAS-OFFLINE-START-001：素材库连不上时外壳下方的常驻提醒（home-link.js）。
   横幅栈规则与 auth.css 相同：一键成片 / 剪辑台等页面不加载 auth.css，这里补一份。 */
.system-banner-stack {
  position: fixed;
  top: var(--site-shell-height, 0px);
  right: 0;
  left: 0;
  z-index: 2000;
  display: grid;
}

body.has-system-banner-stack {
  padding-top: calc(var(--site-shell-height, 0px) + var(--system-banner-height, 0px)) !important;
}

/* 选择器带 body 前缀：压过上面 body.taste-site [role="alert"] 的全局灰底灰字（0,2,1，同权重靠位置在后取胜） */
.site-material-library-offline,
body.taste-site .site-material-library-offline {
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid var(--linear-danger, #e5484d);
  border-radius: 0;
  background: color-mix(in srgb, var(--linear-danger, #e5484d) 14%, var(--linear-surface-1, #ffffff));
  box-shadow: none;
  color: var(--linear-danger, #c62a2f);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

/* RECORD-LOCATE-001：从别处点「查看」跳过来，定位到的那一条闪两下（locateRecordElement 加类，2.4 秒后去掉） */
@keyframes record-located-flash {
  0%, 50%, 100% { background-color: transparent; }
  25%, 75% { background-color: rgba(var(--linear-primary-rgb), 0.22); }
}
.is-record-located,
tr.is-record-located > td {
  animation: record-located-flash 1.2s ease-in-out 2;
}
.is-record-located:not(tr) {
  outline: 2px solid var(--linear-primary);
  outline-offset: 2px;
}
