/* 小红书 · 黑金 — desktop interface only.
 * All rules are theme scoped. Document paper, generated artwork and drawing
 * surfaces keep their own colors, typography and geometry.
 * Region roles are assigned by redbook-layout.js; direct selectors protect
 * asynchronously rendered workbenches and dialogs using the same palette. */
body[data-theme="redbook"] {
  color-scheme: light;
  --rb-red: #ff2442; --rb-action: #e51b3e; --rb-action-hover: #c91835;
  --rb-black: #191919; --rb-dark-raised: #242424; --rb-gold: #d8b879;
  --rb-gold-muted: #bca374; --rb-gold-line: #66563b;
  --rb-sidebar-width: 232px; --rb-topbar-height: 64px;
  --ui-canvas: #f5f5f5; --ui-canvas-deep: #ededed;
  --ui-surface-1: #fff; --ui-surface-2: #fafafa; --ui-surface-3: #f1f1f1; --ui-surface-4: #e7e7e7;
  --ui-surface-hover: #fff4f5; --ui-surface-selected: #fff0f2; --ui-surface-disabled: #f0f0f0;
  --ui-paper: #fff; --ui-text-strong: #202020; --ui-text: #333; --ui-text-muted: #686868;
  --ui-text-faint: #777; --ui-text-on-accent: #fff;
  --ui-line: #dedede; --ui-line-subtle: #ebebeb; --ui-line-strong: #e51b3e;
  --ui-focus-ring: rgba(229,27,62,.18); --ui-accent: #e51b3e; --ui-accent-strong: #c91835;
  --ui-intelligence: #75559a; --ui-success: #247353; --ui-warning: #865b12; --ui-danger: #b42332; --ui-info: #365d81;
  --ui-accent-soft: #fff0f2; --ui-intelligence-soft: #f4eff9; --ui-success-soft: #edf7f1;
  --ui-warning-soft: #fff6e5; --ui-danger-soft: #fff0ef; --ui-info-soft: #eef4fa;
  --ui-radius-xs: 5px; --ui-radius-sm: 8px; --ui-radius-md: 12px; --ui-radius-lg: 16px; --ui-radius-xl: 20px;
  --ui-space-1: 4px; --ui-space-2: 8px; --ui-space-3: 12px; --ui-space-4: 16px; --ui-space-5: 20px; --ui-space-6: 24px;
  --ui-control-sm: 30px; --ui-control-md: 38px; --ui-control-lg: 44px;
  --ui-shadow-panel: 0 4px 18px rgba(25,25,25,.035); --ui-shadow-focus: 0 0 0 3px var(--ui-focus-ring);
  --ui-shadow-glow: 0 5px 18px rgba(229,27,62,.1); --ui-transition: 150ms ease;
  --bg: var(--ui-canvas); --panel: #fff; --ink: #202020; --text: #333; --muted: #686868;
  --line: #dedede; --border: #dedede; --accent: #e51b3e; --primary: #e51b3e;
  --green: #e51b3e; --accent-2: #8b692d; --danger: #b42332; --soft: #f5f5f5; --shadow: var(--ui-shadow-panel); --input-bg: #fff;
  --ai-motion-line: #8b7860; --ai-motion-gold: #b58942; --ai-motion-jade: #e51b3e;
  --ai-motion-blue: #747474; --ai-motion-text: #333; --ai-motion-paper: #fff; --ai-motion-muted: #787878;
  background: var(--ui-canvas); color: var(--ui-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
body[data-theme="redbook"] ::selection { background: #ffd9e0; color: #202020; }
body[data-theme="redbook"] :where(.main,.nav,.panel,.ui-workbench,.center-modal,.workbench-drawer,.saved-candidate-drawer) { scrollbar-color: #bbb transparent; scrollbar-width: thin; }
body[data-theme="redbook"] :focus-visible { outline: 2px solid var(--rb-action); outline-offset: 3px; }

/* Controls exclude output paper and actual artwork, including their descendants. */
:where(body[data-theme="redbook"]) button:not(:where(.memo-paper,.delivery-book-page,.delivery-pdf-preview,.xhs-canvas-stage,.xhs-note-canvas-stage,.xhs-canvas-frame,.xhs-reference-frame,.memo-paper *,.delivery-book-page *,.delivery-pdf-preview *,.xhs-canvas-stage *,.xhs-note-canvas-stage *,.xhs-canvas-frame *,.xhs-reference-frame *)) {
  border-color: var(--rb-action); background: var(--rb-action); color: #fff; box-shadow: none; text-shadow: none;
  transition: background-color 150ms ease,border-color 150ms ease,box-shadow 150ms ease;
}
:where(body[data-theme="redbook"]) button:where(:hover:not(:disabled)):not(:where(.memo-paper *,.delivery-book-page *,.delivery-pdf-preview *,.xhs-canvas-stage *,.xhs-note-canvas-stage *,.xhs-canvas-frame *,.xhs-reference-frame *)) { background: var(--rb-action-hover); border-color: var(--rb-action-hover); color: #fff; transform: none; }
body[data-theme="redbook"] button:is(.secondary,.ghost,.ui-action--ghost,.ui-tile,.ui-list-item) { border-color: var(--ui-line); background: #fff; color: #333; box-shadow: none; }
body[data-theme="redbook"] button:is(.secondary,.ghost,.ui-action--ghost,.ui-tile,.ui-list-item):hover:not(:disabled) { border-color: #e3adb6; background: #fff4f5; color: #bd1834; }
body[data-theme="redbook"] button:is(.danger,.warning,.danger-outline,.ui-action--danger) { border-color: #d7a4aa; background: #fff0ef; color: #a62131; }
body[data-theme="redbook"] button:is(.danger,.warning,.danger-outline,.ui-action--danger):hover:not(:disabled) { border-color: #b42332; background: #b42332; color: #fff; }
body[data-theme="redbook"] button:disabled { background: #efefef; border-color: #ddd; color: #777; box-shadow: none; cursor: not-allowed; opacity: 1; }
body[data-theme="redbook"] :where(input,select,textarea):not(:where(.memo-paper *,.delivery-book-page *,.delivery-pdf-preview *,.xhs-canvas-stage *,.xhs-note-canvas-stage *,.xhs-canvas-frame *,.xhs-reference-frame *)) { border-color: #c9c9c9; background: #fff; color: #202020; caret-color: #e51b3e; color-scheme: light; box-shadow: none; }
body[data-theme="redbook"] :where(input,textarea)::placeholder { color: #777; opacity: 1; }
body[data-theme="redbook"] :where(input,textarea,select):focus { border-color: #e51b3e; box-shadow: var(--ui-shadow-focus); }
body[data-theme="redbook"] :where(input,textarea,select):disabled { border-color: #ddd; background: #f0f0f0; color: #777; opacity: 1; }
body[data-theme="redbook"] :where(input[type="checkbox"],input[type="radio"],input[type="range"]) { accent-color: #e51b3e; box-shadow: none; }
body[data-theme="redbook"] select option { background: #fff; color: #202020; }
body[data-theme="redbook"] :where(input,textarea):-webkit-autofill { -webkit-text-fill-color: #202020; box-shadow: 0 0 0 1000px #fff inset; }
body[data-theme="redbook"] :where(.check,.filter-checks label) { border-color: #dedede; background: #fafafa; color: #333; }
body[data-theme="redbook"] :where(.check,.filter-checks label):has(input:checked) { border-color: #e8a5af; background: #fff0f2; }

/* Permanent black frame and red current location. Geometry remains workbench aware. */
body[data-theme="redbook"] .app-shell { grid-template-columns: var(--rb-sidebar-width) minmax(0,1fr); background: #f5f5f5; }
body[data-theme="redbook"] .sidebar { display: flex; flex-direction: column; min-height: 0; height: 100dvh; overflow: hidden; padding: 24px 14px 14px; border-right: 1px solid #2d2d2d; background: #191919; color: #eee; box-shadow: none; }
body[data-theme="redbook"] .sidebar .brand { margin: 0 6px 20px; }
body[data-theme="redbook"] :is(.tech-brand,.tech-login-brand) { display: flex; align-items: center; gap: 10px; }
body[data-theme="redbook"] :is(.tech-brand,.tech-login-brand) > span:last-child { display: grid; gap: 6px; min-width: 0; }
body[data-theme="redbook"] :is(.tech-brand,.tech-login-brand) strong { color: #f8f5ee; font-size: 18px; font-weight: 650; letter-spacing: .02em; }
body[data-theme="redbook"] :is(.tech-brand,.tech-login-brand) small { display: block; color: #bca374; font-size: 10px; letter-spacing: .08em; }
body[data-theme="redbook"] .tech-brand-mark { display: block; flex: none; width: 33px; height: 36px; border-radius: 10px; border: 1px solid #705e3d; background: linear-gradient(140deg,#333027,#1c1c1c); position: relative; }
body[data-theme="redbook"] .tech-brand-mark::after { content: ""; position: absolute; inset: 9px 8px; border-block: 1px solid #d8b879; border-left: 1px solid #d8b879; transform: skewY(-12deg); }
body[data-theme="redbook"] .user-line { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin: 0 4px 15px; padding: 10px; border: 1px solid #3b352c; border-radius: 9px; background: #25231f; color: #cfc9bd; font-size: 12px; }
body[data-theme="redbook"] .user-line b { border: 0; border-radius: 4px; background: #3b3224; color: #e6cb95; padding: 3px 6px; font-size: 10px; }
body[data-theme="redbook"] .nav { flex: 1; min-height: 0; display: grid; align-content: start; gap: 4px; overflow-y: auto; padding: 0 3px 2px 0; scrollbar-color: #56524b transparent; }
body[data-theme="redbook"] .tech-nav-label { display: block; padding: 6px 12px 8px; color: #a59a85; font-size: 10px; letter-spacing: .1em; }
body[data-theme="redbook"] .sidebar .nav button { display: flex; align-items: center; width: 100%; min-height: 36px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #d0d0d0; padding: 7px 12px; text-align: left; font-size: 13px; font-weight: 500; line-height: 1.35; box-shadow: none; }
body[data-theme="redbook"] .sidebar .nav button:hover:not(:disabled) { background: #2d2923; border-color: #484035; color: #eed7ab; }
body[data-theme="redbook"] .sidebar .nav button.active { background: #e51b3e; border-color: #ff2442; color: #fff; box-shadow: 0 4px 12px #ff24421a; }
body[data-theme="redbook"] .sidebar .nav button::before { display: none; }
body[data-theme="redbook"] .app-shell .sidebar .nav button.sidebar-menu-item.has-custom-color:not(.active) { border-left: 3px solid var(--sidebar-item-color); background: #242424; }
body[data-theme="redbook"] .app-shell .sidebar .nav button.sidebar-menu-item.active.has-custom-color { background: #e51b3e; color: #fff; box-shadow: inset 3px 0 var(--sidebar-item-color); }
body[data-theme="redbook"] .client-nav-lock { margin-left: auto; }
body[data-theme="redbook"] .client-nav-locked { opacity: .7; }
body[data-theme="redbook"] .tech-sidebar-meta { display: grid; flex: none; gap: 6px; margin-top: 12px; padding: 11px 8px 0; border-top: 1px solid #38332b; color: #b2aaa0; font-size: 10px; }
body[data-theme="redbook"] .tech-sidebar-meta > span { display: flex; align-items: center; gap: 7px; }
body[data-theme="redbook"] .tech-sidebar-meta small { color: #a99f91; font-size: 9px; }
body[data-theme="redbook"] :is(.tech-live-status,.tech-sidebar-meta) i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #81a68d; box-shadow: none; }
body[data-theme="redbook"] .main { background: #f5f5f5; color: #333; padding: calc(var(--rb-topbar-height) + 16px) 22px 24px; }
body[data-theme="redbook"] .main.screen-main { padding: calc(var(--rb-topbar-height) + 12px) 18px 14px; }
body[data-theme="redbook"] .main::before, body[data-theme="redbook"] .main::after { display: none; }
body[data-theme="redbook"] .tech-topbar { display: flex; position: fixed; z-index: 25; top: 0; left: var(--rb-sidebar-width); right: 0; min-height: var(--rb-topbar-height); padding: 10px 24px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #66563b; background: #191919; color: #f8f5ee; box-shadow: none; }
body[data-theme="redbook"] .tech-topbar > div:first-child { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: baseline; gap: 4px 14px; min-width: 0; }
body[data-theme="redbook"] .tech-topbar .tech-kicker { grid-column: 1 / -1; color: #d8b879; font-size: 9px; letter-spacing: .12em; }
body[data-theme="redbook"] .tech-topbar strong { color: #f8f5ee; font-size: 19px; font-weight: 650; line-height: 1.25; }
body[data-theme="redbook"] .tech-topbar small { color: #c4b9a3; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-theme="redbook"] .tech-topbar-status { display: flex; align-items: center; gap: 16px; flex: none; }
body[data-theme="redbook"] .tech-live-status { display: flex; align-items: center; gap: 7px; color: #c4b9a3; font-size: 10px; }
body[data-theme="redbook"] .tech-role-badge { border: 1px solid #66563b; border-radius: 6px; background: #272727; color: #d8b879; padding: 5px 9px; font-size: 11px; }
body[data-theme="redbook"] .ui-theme-switcher--sidebar { background: #252525; border-color: #474037; }
body[data-theme="redbook"] .ui-theme-switcher--sidebar button { background: transparent; border-color: transparent; color: #c2b7a3; }
body[data-theme="redbook"] .ui-theme-switcher--sidebar button.active { background: #d8b879; color: #191919; border-color: #d8b879; box-shadow: none; }
body[data-theme="redbook"] .sidebar-reorder-tools { color: #d8b879; }

/* Login carries the same identity; no artwork or external image is generated. */
body[data-theme="redbook"] .tech-login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(340px,.9fr); gap: 6vw; align-items: center; padding: 52px 7vw; background: radial-gradient(ellipse at 18% 35%,#343026 0,transparent 48%),#191919; color: #eee; }
body[data-theme="redbook"] .tech-login-visual { min-width: 0; }
body[data-theme="redbook"] .tech-login-copy h1 { color: #f3e5ca; font-size: clamp(30px,3.4vw,52px); font-weight: 600; line-height: 1.3; }
body[data-theme="redbook"] .tech-login-copy p { color: #c0b6a4; line-height: 1.8; }
body[data-theme="redbook"] .tech-login .login-panel { border: 1px solid #dfd5c6; border-radius: 20px; background: #fff; color: #202020; padding: 30px; box-shadow: 0 18px 60px #0003; }
body[data-theme="redbook"] .tech-login .login-panel :is(h1,h2,strong,label) { color: #202020; }
body[data-theme="redbook"] .tech-login .login-panel :is(p,small,.muted,.login-version) { color: #686868; }
body[data-theme="redbook"] .tech-login-security { color: #aaa292; }
body[data-theme="redbook"] .tech-signal-row > div { border-color: #5b4c35; background: #28251f; color: #d8b879; }
body[data-theme="redbook"] .login-version { border-color: #eee; }

/* White content surfaces: semantic selectors only, never suffix-wide card rules. */
body[data-theme="redbook"] :is(.panel,.ui-surface,.ui-workbench-frame,.ui-route-card,.names-control-panel,.names-char-sidebar,.names-result-panel,.review-tools,.review-preview-panel,.filter-one-screen,.saved-workbench-panel,.maintenance-control-panel,.maintenance-results-panel,.maintenance-side-panel,.customer-list-panel) { border-color: #dedede; background: #fff; color: #333; box-shadow: var(--ui-shadow-panel); }
body[data-theme="redbook"] .ui-surface--muted { background: #fafafa; box-shadow: none; }
body[data-theme="redbook"] .ui-surface--inset { background: #f4f4f4; box-shadow: inset 0 1px 3px #19191905; }
body[data-theme="redbook"] .ui-workbench-rail { background: #fafafa; border-color: #e3e3e3; }
body[data-theme="redbook"] :is(.ui-route-card h2,.ui-route-card h3,.page-head h1,.page-head h2,.ui-page-head h1,.ui-page-head h2) { color: #202020; }
body[data-theme="redbook"] :is(.ui-route-card p,.ui-route-card li,.page-head p,.ui-page-head p) { color: #686868; }
body[data-theme="redbook"] :is(.muted,.eyebrow):not(:where(.memo-paper *,.delivery-book-page *,.delivery-pdf-preview *,.xhs-canvas-stage *,.xhs-note-canvas-stage *,.xhs-canvas-frame *,.xhs-reference-frame *)) { color:#686868; }
body[data-theme="redbook"] .ui-route-card.is-recommended { border-color: #d8b879; background: #fffcf6; }
body[data-theme="redbook"] .ui-route-card.is-disabled { background: #f3f3f3; opacity: .75; }
body[data-theme="redbook"] :is(.ui-metric-card,.ui-empty-state) { background: #fafafa; border-color: #dedede; color: #686868; box-shadow: none; }
body[data-theme="redbook"] :is(.ui-metric-card strong,.ui-metric-card b,.ui-empty-state strong,.ui-empty-state h2,.ui-empty-state h3) { color: #202020; }
body[data-theme="redbook"] :is(.table,.ui-table) { color: #333; }
body[data-theme="redbook"] :is(.table,.ui-table) :is(td,th) { border-color: #e7e7e7; }
body[data-theme="redbook"] :is(.table,.ui-table) th { background: #f5f5f5; color: #5d5d5d; }
body[data-theme="redbook"] :is(.table,.ui-table) tbody tr:hover { background: #faf7f7; }
body[data-theme="redbook"] :is(.tabs,.ui-tabs) { background: #f4f4f4; border-color: #dedede; }
body[data-theme="redbook"] :is(.tabs,.ui-tabs) button, body[data-theme="redbook"] button.ui-tab { background: transparent; border-color: transparent; color: #686868; box-shadow: none; }
body[data-theme="redbook"] :is(.tabs,.ui-tabs) button:is(.active,.is-active,[aria-selected="true"]), body[data-theme="redbook"] button.ui-tab:is(.active,.is-active,[aria-selected="true"]) { background: #e51b3e; color: #fff; border-color: #e51b3e; box-shadow: none; }
body[data-theme="redbook"] :is(.tabs,.ui-tabs) button:hover:not(:disabled), body[data-theme="redbook"] button.ui-tab:hover:not(:disabled) { background: #fff0f2; color: #c31c37; border-color: #efd3d8; }

/* Feedback keeps semantic colors, distinct from brand-red actions. */
body[data-theme="redbook"] :is(.notice,.ui-notice) { border-color: #ccd6df; background: #f0f5fa; color: #365d81; }
body[data-theme="redbook"] :is(.notice.warning,.ui-notice--warning) { border-color: #e4cea3; background: #fff6e5; color: #805610; }
body[data-theme="redbook"] :is(.form-error,.ui-notice--danger,.notice.error) { border-color: #e4b0b5; background: #fff0ef; color: #a62131; }
body[data-theme="redbook"] :is(.ui-notice--success,.notice.success) { border-color: #b8d7c6; background: #edf7f1; color: #247353; }
body[data-theme="redbook"] .floating-message { border: 1px solid #5a4c36; border-left: 3px solid #d8b879; background: #24221f; color: #f4e5c8; box-shadow: 0 8px 26px #19191926; }
body[data-theme="redbook"] .floating-message-close { border: 0; background: transparent; color: #d8b879; }

/* Explicit overlay chrome. Editing data, paper and image previews are untouched. */
body[data-theme="redbook"] :is(.modal-backdrop,.workbench-drawer-backdrop,.saved-candidate-drawer-backdrop,.classical-detail-backdrop,.profile-drawer-backdrop,.client-history-backdrop,.client-settings-backdrop,.client-copy-backdrop,.ai-selection-backdrop,.material-ocr-backdrop,.pronunciation-evidence-backdrop,.similar-name-backdrop,.xhs-dialog-backdrop,.xhs-ai-background-backdrop) { background: #19191980; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
body[data-theme="redbook"] :is(.center-modal,.analysis-modal,.name-detail-modal,.unique-detail-modal,.assignment-modal,.dashboard-backup-modal,.ai-selection-dialog,.client-copy-dialog,.client-settings-dialog,.client-credentials-dialog,.filter-info-dialog,.filter-picker-dialog,.exclusion-preview-dialog,.delivery-external-custom-dialog,.poetry-archive-preview-dialog,.poetry-material-editor-dialog,.material-ocr-modal,.pronunciation-evidence-modal,.sidebar-color-settings-modal,.ai-name-ranking-modal,.xhs-dialog,.xhs-prompt-dialog,.xhs-ai-background-dialog,.xhs-reference-review) { border-color: #dedede; border-radius: 14px; background: #fff; color: #333; box-shadow: 0 24px 70px #19191935; }
body[data-theme="redbook"] :is(.workbench-drawer,.saved-candidate-drawer,.classical-detail-drawer,.project-profile-drawer,.new-client-drawer,.client-history-drawer,.similar-name-drawer) { border-color: #dedede; background: #fff; color: #333; box-shadow: -16px 0 48px #19191926; }
body[data-theme="redbook"] :is(.center-modal,.workbench-drawer,.saved-candidate-drawer,.classical-detail-drawer,.project-profile-drawer,.similar-name-drawer) > header { border-color: #eadfc8; background: #191919; color: #eedcba; }
body[data-theme="redbook"] :is(.center-modal,.workbench-drawer,.saved-candidate-drawer,.classical-detail-drawer,.project-profile-drawer,.similar-name-drawer) > header :is(h2,strong) { color: #f3e5ca; }
body[data-theme="redbook"] :is(.center-modal,.workbench-drawer,.saved-candidate-drawer,.classical-detail-drawer,.project-profile-drawer,.similar-name-drawer) > header :is(p,small,.eyebrow) { color: #c4b9a3; }
body[data-theme="redbook"] :is(.center-modal,.workbench-drawer,.saved-candidate-drawer,.classical-detail-drawer,.project-profile-drawer,.similar-name-drawer) > header button { border-color: #66563b; background: #29251f; color: #e5ca93; }
body[data-theme="redbook"] :is(.modal-detail,.drawer-form > section,.drawer-form > footer,.similar-name-drawer-footer,.saved-candidate-drawer > section,.saved-candidate-drawer dl > div,.saved-action-menu-popover,.first-round-more-menu[open] > div,.smart-funnel-history-menu > div,.xhs-prompt-more-menu,.xhs-template-page-context-menu) { border-color: #e3e3e3; background: #fafafa; color: #333; }
body[data-theme="redbook"] :is(.saved-action-menu,.first-round-more-menu,.smart-funnel-history-menu) > summary { border-color: #dedede; background: #fff; color: #333; }
body[data-theme="redbook"] .saved-action-menu-popover button { border-color: #e7e7e7; background: #fff; color: #333; }
body[data-theme="redbook"] .modal-icon { background: #fff0f2; color: #cf1b38; }

/* Project identity, records and account administration. */
body[data-theme="redbook"] .ui-context-card { --project-context-bg:#fff; --project-context-surface:#fafafa; --project-context-border:#e3e3e3; --project-context-accent:#e51b3e; --project-context-accent-soft:#fff0f2; border-color:#e3e3e3; background:#fff; color:#333; box-shadow:none; }
body[data-theme="redbook"] .ui-context-card :is(.project-context-facts > span,.project-reference-progress-panel,.project-workflow-compact) { border-color:#e3e3e3; background:#fafafa; color:#333; }
body[data-theme="redbook"] .ui-context-card :is(b,strong,.project-reference-groups dd) { color:#202020; }
body[data-theme="redbook"] .ui-context-card :is(small,.project-reference-secondary,.project-reference-identity > span,.project-reference-progress > summary,.project-reference-groups dt) { color:#686868; }
body[data-theme="redbook"] .ui-context-card :is(.project-context-head em,.project-context-route-badge,.project-reference-favorable) { background:#fff0f2; color:#bd1a34; border-color:#efd1d6; }
body[data-theme="redbook"] .ui-context-card :is(.project-reference-identity,.project-context-open,.project-context-requirements-value) { border-color:transparent; background:transparent; color:inherit; box-shadow:none; }
body[data-theme="redbook"] .ui-context-card :is(.project-reference-review,.project-context-requirements) { border-color:#e4cea3; background:#fffaf0; color:#805610; }
body[data-theme="redbook"] :is(.project-profile-tabs,.profile-summary-card,.profile-basic-edit,.profile-intake-edit,.profile-intake-requirements,.profile-requirements-primary,.profile-naming-methods,.profile-notes-edit,.profile-method-setting,.profile-authority-readonly,.customer-stat-strip > *,.customer-list-toolbar,.customer-list-footer,.profile-kv-grid > div,.profile-authority-values > div,.project-requirement-readonly,.profile-method-check,.client-ceiling-panel) { border-color:#dedede; background:#fff; color:#333; box-shadow:none; }
body[data-theme="redbook"] :is(.profile-card-title,.profile-section-heading,.project-info-head,.project-requirement-manager-heading,.project-requirement-row,.project-requirement-manager-note,.customer-table-wrap) { border-color:#e3e3e3; }
body[data-theme="redbook"] :is(.profile-card-title h3,.profile-kv-grid b,.profile-authority-title strong,.profile-authority-values b,.project-requirement-manager-heading h3,.customer-stat-strip strong,.customer-table strong,.customer-tabs b,.project-info-head h1) { color:#202020; }
body[data-theme="redbook"] :is(.profile-kv-grid span,.profile-authority-values span,.profile-authority-title span,.profile-authority-readonly p,.project-requirement-row > label,.customer-stat-strip small,.customer-table small,.customer-workbench-head p) { color:#686868; }
body[data-theme="redbook"] :is(.profile-source-badge,.project-profile-edit-badge,.stage-pill) { border-color:#e3d3b4; background:#faf5ec; color:#785921; }
body[data-theme="redbook"] :is(.customer-tabs button.active,.project-profile-tabs button.is-active) { border-color:#e6adb6; background:#fff0f2; color:#c31c37; }
body[data-theme="redbook"] .project-info-screen.is-editing:not(.client-access-active) .project-info-scroll { background:#fff; border-color:#e6adb6; box-shadow:inset 3px 0 #e51b3e; }
body[data-theme="redbook"] :is(.project-create-upload,.bazi-edit-empty,.project-create-text-fallback,.project-create-admin,.admin-note-field,.create-bazi-core span,.birth-calendar-preview,.lunar-leap-check,.intake-empty) { border-color:#dedede; background:#fafafa; color:#333; }
body[data-theme="redbook"] .record-create-panel .project-create-next { border-color:#eadbc0 !important; background:#fffbf3 !important; }
body[data-theme="redbook"] .client-create-lock-message { background:#f5f5f5ee; color:#333; }
body[data-theme="redbook"] :is(.intake-upload-card strong,.intake-upload-card span) { color:#bd1a34; }
body[data-theme="redbook"] :is(.client-access-card,.client-quota-panel,.client-permission-group,.client-account-metrics > div,.client-account-empty) { border-color:#dedede; background:#fff; color:#333; }
body[data-theme="redbook"] .client-lock-overlay { background:#f5f5f5ed; color:#333; }

/* Compact names and characters. Existing capacity, card geometry and type remain. */
body[data-theme="redbook"] :is(.name-combination-mode,.name-combination-tabs,.names-control-section,.name-char-picker-head,.name-char-foot,.names-result-meta,.review-library-bar,.review-tool-pane,.review-ai-confirm,.filter-console-nav,.filter-console-summary,.filter-action-bar,.saved-page-nav,.saved-round-toolbar,.saved-candidate-toolbar) { background:#fafafa; color:#333; border-color:#e3e3e3; }
body[data-theme="redbook"] :is(.name-combination-mode,.name-combination-tabs,.review-library-level-switch,.review-ai-tabs,.filter-console-nav,.saved-page-nav,.saved-round-toolbar,.saved-candidate-toolbar) button { border-color:#e0e0e0; background:#fff; color:#555; box-shadow:none; }
body[data-theme="redbook"] :is(.name-combination-mode,.name-combination-tabs,.review-library-level-switch,.review-ai-tabs,.filter-console-nav,.saved-page-nav,.saved-round-toolbar) button.active { border-color:#e6adb6; background:#fff0f2; color:#c31c37; }
body[data-theme="redbook"] :is(.name-card,.name-tile,.regular-name-card,.regular-name-tile,.high-quality-name-card,.pronunciation-name-card,.action-image-name-card,.template-name-card,.surname-homophone-name-card,.temporary-name-card,.classical-name-card,.saved-name-card,.saved-candidate-card,.smart-funnel-name-card,.style-name-tile,.seasonal-name-tile,.char-card,.char-tile,.review-char-card,.name-char-card,.name-char-tile,.style-char-tile,.maintenance-char-tile,.maintenance-char-main,.similar-name-card,.similar-reference-card) { border-color:#dedede; background:#fff; color:#202020; box-shadow:none; }
body[data-theme="redbook"] :is(.name-card,.name-tile,.regular-name-card,.regular-name-tile,.high-quality-name-card,.pronunciation-name-card,.action-image-name-card,.saved-name-card,.saved-candidate-card,.smart-funnel-name-card,.style-name-tile,.seasonal-name-tile,.char-card,.char-tile,.review-char-card,.name-char-card,.name-char-tile,.style-char-tile,.maintenance-char-tile):hover { border-color:#d99fa9; background:#fffafb; box-shadow:0 2px 8px #19191905; }
body[data-theme="redbook"] :is(.name-card,.name-tile,.char-card,.char-tile,.review-char-card,.name-char-card,.name-char-tile,.style-char-tile,.maintenance-char-tile):is(.selected,.active,.is-selected,.candidate,.favorite), body[data-theme="redbook"] :is(.style-name-tile.favorite,.style-name-tile.candidate,.seasonal-name-tile.recommended) { border-color:#e51b3e; background:#fff0f2; color:#bd1a34; box-shadow:inset 0 0 0 1px #e51b3e; }
body[data-theme="redbook"] :is(.name-card,.name-tile,.regular-name-card,.regular-name-tile,.high-quality-name-card,.pronunciation-name-card,.saved-name-card,.saved-candidate-card,.smart-funnel-name-card,.style-name-tile,.seasonal-name-tile,.char-card,.char-tile,.review-char-card,.name-char-card,.name-char-tile,.maintenance-char-main) :is(strong,h3,h4,.name-text,.name-word,.char-main,.char-glyph) { color:#202020; text-shadow:none; }
body[data-theme="redbook"] :is(.names-result-panel,.review-screen,.saved-page,.history-match-screen) :is(.empty,.empty-state,.empty-hint) { border-color:#ddd; background:#fafafa; color:#686868; }
body[data-theme="redbook"] :is(.names-screen,.review-screen,.saved-page) :is(.secondary,.ghost) { color:#555; }
body[data-theme="redbook"] .names-danger-section { background:#fff4f2; border-left-color:#b42332; }
body[data-theme="redbook"] :is(.filter-current-record,.filter-gender-buttons,.filter-exclusion-group,.component-filter-card,.filter-option-card,.filter-setting-card,.filter-project-grid > button) { border-color:#dedede; background:#fff; color:#333; }
body[data-theme="redbook"] :is(.filter-project-grid > button.active,.filter-gender-buttons input:checked + span) { border-color:#e6adb6; background:#fff0f2; color:#c31c37; }
body[data-theme="redbook"] .component-filter-card.keep { border-color:#a9cfba; background:#edf7f1; }
body[data-theme="redbook"] .component-filter-card.exclude { border-color:#dfadb4; background:#fff0ef; }
body[data-theme="redbook"] :is(.name-pool-current-version,.name-pool-overview,.name-pool-rule,.name-pool-group-card,.name-pool-artifact-list article,.name-pool-version-list > *,.name-pool-route-cards article) { border-color:#dedede; background:#fff; color:#333; }
body[data-theme="redbook"] .name-pool-plan :is(.name-pool-overview h2,.name-pool-route-cards h2,.name-pool-metrics b) { color:#202020; }
body[data-theme="redbook"] .name-pool-plan :is(.name-pool-overview header small,.name-pool-rule strong,.name-pool-metrics > .primary b,.name-pool-history > summary > b) { color:#c31c37; }

/* AI/task/result workspaces: one black-gold summary, quiet white result surfaces. */
body[data-theme="redbook"] :is(.smart-workflow-overview,.smart-funnel-zone,.smart-funnel-results,.smart-funnel-ai-combo-panel,.smart-funnel-style-picker-body,.smart-funnel-style-picker > summary,.smart-simple-other-panel,.project-style-workflow,.project-style-round-card,.style-profile-card,.task-card,.task-progress,.style-provider-progress,.task-progress-completed-summary) { border-color:#dedede; background:#fff; color:#333; box-shadow:none; }
body[data-theme="redbook"] :is(.smart-workflow-steps > div,.smart-simple-process-node,.smart-simple-round-details article,.smart-funnel-provider-grid > div,.smart-funnel-stat-row > div,.smart-funnel-status-strip > div,.smart-funnel-task-row,.smart-funnel-list-groups > section,.ai-name-combo-group,.smart-funnel-empty,.style-name-row,.style-profile-card .grid > div,.style-profile-brief > span,.project-style-admin-tools,.smart-funnel-project-cell,.task-stats > div,.seasonal-stats > div) { border-color:#e3e3e3; background:#fafafa; color:#333; }
body[data-theme="redbook"] :is(.smart-funnel-result-tools,.smart-funnel-results-head.final,.smart-funnel-name-actions,.smart-funnel-process-head,.smart-funnel-saved-styles,.smart-funnel-style-summary,.smart-simple-current-head > strong,.smart-funnel-label-progress span,.smart-combo-provider-progress > span,.style-score-line span) { border-color:#e3e3e3; background:#f5f5f5; color:#333; }
body[data-theme="redbook"] :is(.smart-simple-current,.smart-simple-combo,.release-history-hero) { border-color:#50432f; background:linear-gradient(110deg,#191919,#28251f); color:#eee0c5; box-shadow:0 5px 16px #1919190d; }
body[data-theme="redbook"] :is(.smart-simple-current,.smart-simple-combo,.release-history-hero) :is(h1,h2,h3,strong,b) { color:#e7cb93; }
body[data-theme="redbook"] :is(.smart-simple-current,.smart-simple-combo,.release-history-hero) :is(p,small,span) { color:#c5bcae; }
body[data-theme="redbook"] :is(.smart-simple-current,.smart-simple-combo,.release-history-hero) button.secondary { border-color:#66563b; background:#29251f; color:#e3c791; }
body[data-theme="redbook"] :is(.smart-funnel-task-progress > i,.smart-funnel-task-providers i,.smart-ai-progress > i) { background:#e9e9e9; }
body[data-theme="redbook"] :is(.smart-funnel-task-progress > i > u,.smart-funnel-task-providers i > u,.smart-ai-progress > i > u) { background:#e51b3e; }
body[data-theme="redbook"] :is(.task-badge,.style-provider-progress-state em,.smart-simple-process-node i,.smart-workflow-steps i,.smart-funnel-task-title > i) { background:#f1f1f1; color:#686868; }
body[data-theme="redbook"] :is(.task-badge.completed,.task-stats .completed strong,.task-detail-hint,.smart-funnel-task-row.completed .smart-funnel-task-title strong) { color:#247353; }
body[data-theme="redbook"] :is(.task-badge.running,.task-stats .running strong) { color:#365d81; }
body[data-theme="redbook"] :is(.task-card.running,.task-progress.running,.smart-combo-provider-progress > span.running) { background:#eef4fa; }
body[data-theme="redbook"] :is(.task-card,.task-progress,.style-provider-progress,.smart-simple-process-node,.smart-funnel-task-row).failed { border-color:#dfadb4; background:#fff0ef; }
body[data-theme="redbook"] :is(.task-error,.task-badge.failed,.task-stats .failed strong,.smart-funnel-task-error,.smart-funnel-review-lines .risk,.smart-funnel-detail-reviews em) { color:#a62131; }
body[data-theme="redbook"] :is(.task-card.paused,.task-card.partial,.task-progress.paused,.style-provider-progress.retrying,.smart-simple-process-node.running,.smart-simple-process-node.starting,.smart-funnel-label-readiness) { border-color:#e4cea3; background:#fff6e5; color:#805610; }
body[data-theme="redbook"] :is(.task-badge.paused,.task-badge.partial,.style-provider-progress-state em.retrying,.smart-funnel-label-readiness strong) { color:#805610; }

/* Query, source and rule modules retain their object-specific layouts. */
body[data-theme="redbook"] .global-library-workspace { --gl-panel:#fff; --gl-card:#fafafa; --gl-ink:#202020; --gl-muted:#686868; --gl-line:#dedede; --gl-accent:#e51b3e; --gl-active:#fff0f2; }
body[data-theme="redbook"] .ac-workspace { --ac-bg:#fff; --ac-muted-bg:#fafafa; --ac-line:#dedede; --ac-text:#202020; --ac-muted:#686868; --ac-accent:#e51b3e; --ac-selected:#fff0f2; }
body[data-theme="redbook"] .ac-workspace button.active { border-color:#e6adb6; background:#fff0f2; color:#c31c37; }
body[data-theme="redbook"] :is(.global-name-compare-form,.global-name-compare-results,.global-name-compare-stat,.global-name-compare-summary span,.global-name-compare-card,.global-name-compare-pair > div,.library-card,.library-upload-card,.managed-rule-list-item,.managed-rule-editor,.managed-rule-history,.material-pack-chip,.material-staged-images span,.material-ocr-upload,.zodiac-traditional-reason,.zodiac-match-paths,.zodiac-test-item-button,.material-bulk-result) { border-color:#dedede; background:#fff; color:#333; }
body[data-theme="redbook"] :is(.global-name-compare-card.category-matched,.global-name-compare-pair > div.is-hit) { border-color:#b8d7c6; background:#edf7f1; }
body[data-theme="redbook"] .global-name-compare-card.category-none { border-color:#dfadb4; background:#fff0ef; }
body[data-theme="redbook"] .global-name-compare-card:is(.category-partial,.category-unknown) { border-color:#e4cea3; background:#fff6e5; }
body[data-theme="redbook"] :is(.global-name-compare-card-head > strong,.global-name-compare-pair b) { color:#202020; }
body[data-theme="redbook"] :is(.managed-rule-list-item.active,.zodiac-admin-workspace-tabs button.active,.ai-rules-nav button.active,.rule-category-switch button.active,.project-style-screen .role-tabs button.active,.seasonal-name-tabs button.active,.style-profile-buttons button.active) { border-color:#e6adb6; background:#fff0f2; color:#c31c37; }
body[data-theme="redbook"] :is(.managed-rule-impact,.managed-rule-head span,.material-hit-badge,.material-hit-dot) { color:#c31c37; }
body[data-theme="redbook"] :is(.material-bulk-result.has-invalid,.managed-rule-locked,.zodiac-test-warning) { border-color:#e4cea3; background:#fff6e5; color:#805610; }
body[data-theme="redbook"] .poetry-project-screen { --poetry-bg:#f5f5f5; --poetry-surface:#fff; --poetry-ink:#202020; --poetry-muted:#686868; --poetry-line:#dedede; --poetry-accent:#e51b3e; }
body[data-theme="redbook"] .poetry-project-screen :is(.poetry-project-controls,.poetry-project-results,.poetry-project-name-card,.poetry-project-work-card,.poetry-project-context,.poetry-project-filter-settings,.poetry-project-source-details) { border-color:#dedede; background:#fff; color:#333; }
body[data-theme="redbook"] .poetry-project-screen :is(.poetry-project-name-card:hover,.poetry-project-count,.poetry-project-card-relation) { border-color:#efd1d6; background:#fff5f6; }
body[data-theme="redbook"] .poetry-project-screen :is(.poetry-project-filter-settings > summary,.poetry-project-source-details > summary,.poetry-project-active-filters > span,.poetry-project-card-source-button,.poetry-project-card-actions button,.poetry-project-card-tags .match) { color:#c31c37; }
body[data-theme="redbook"] .poetry-project-screen :is(.poetry-project-card-source,.poetry-project-count strong,.poetry-project-result-actions select,.poetry-project-card-name) { color:#202020; }

/* Management overview: black-gold anchor, white information panels, red navigation. */
body[data-theme="redbook"] :is(.admin-overview-page,.admin-workbench,.management-hub) { background:#f5f5f5; color:#333; }
body[data-theme="redbook"] .management-hub { border:1px solid #e4dfd6; border-radius:16px; background:radial-gradient(ellipse at 50% 0,#eee6d7 0,transparent 56%),#f7f6f3; }
body[data-theme="redbook"] .management-heading h1 { color:#202020; }
body[data-theme="redbook"] .management-heading span { color:#866a37; }
body[data-theme="redbook"] button.management-choice { border:1px solid #ded6c6; background:linear-gradient(135deg,#fff,#faf7f0); color:#202020; box-shadow:0 5px 16px #19191906; }
body[data-theme="redbook"] button.management-choice strong { color:#202020; }
body[data-theme="redbook"] button.management-choice:hover:not(:disabled) { border-color:#e51b3e; background:#fff5f6; color:#c31c37; }
body[data-theme="redbook"] .admin-overview-card { --card-accent:#e51b3e; --card-soft:#fff0f2; --card-orb:rgba(229,27,62,.055); border-color:#dedede; background:#fff; box-shadow:var(--ui-shadow-panel); }
body[data-theme="redbook"] .admin-overview-card:first-child { --card-accent:#d8b879; --card-soft:#393022; --card-orb:rgba(216,184,121,.09); background:linear-gradient(130deg,#191919,#30291e); border-color:#50432f; }
body[data-theme="redbook"] .admin-overview-card:first-child :is(strong,h2) { color:#e9cea0; }
body[data-theme="redbook"] :is(.admin-overview-title h1,.admin-overview-card-copy strong) { color:#202020; }
body[data-theme="redbook"] :is(.admin-overview-title > span,.admin-overview-card-copy h2,.admin-overview-title p) { color:#686868; }
body[data-theme="redbook"] :is(.admin-brain-panel,.admin-current-panel,.admin-overview-band,.admin-overview-health,.admin-completion-visual,.admin-active-record,.admin-recent-row,.admin-task-row,.admin-quick-card,.customer-stat-strip,.pm-panel,.pm-grants article,.release-summary-grid article,.release-entry-content,.release-entry-version,.release-change-group) { border-color:#dedede; background:#fff; color:#333; }
body[data-theme="redbook"] :is(.admin-kpi-card,.admin-task-list button,.admin-library-strip button,.admin-backup-latest) { border-color:#e3e3e3; background:#fafafa; color:#333; }
body[data-theme="redbook"] :is(.admin-overview-health-list button,.admin-kpi-card > span,.admin-quick-mark,.pm-loading,.release-entry-version strong,.release-change-group h3) { color:#c31c37; }
body[data-theme="redbook"] .pm-badge { background:#f1f1f1; color:#686868; }
body[data-theme="redbook"] .pm-badge.pm-good { background:#edf7f1; color:#247353; }
body[data-theme="redbook"] .pm-generated code { border-color:#eadbc0; background:#fffaf0; color:#765621; }
body[data-theme="redbook"] :is(.pm-error,.pm-form-error) { color:#a62131; }
body[data-theme="redbook"] .release-history-page .release-change-group li { color:#333; }

/* Delivery and memo chrome: documents, export pages and charts keep their colors. */
body[data-theme="redbook"] .delivery-desktop { --delivery-line:#dedede; }
body[data-theme="redbook"] :is(.delivery-section,.delivery-request-strategy,.delivery-readiness,.delivery-review-dialog,.delivery-review-editor,.delivery-library-picker,.delivery-twin-dialog,.delivery-twin-panel,.delivery-template-builder,.delivery-formal-empty,.delivery-report-empty,.delivery-role-row,.delivery-name-group,.delivery-report-row,.delivery-template-module,.delivery-library-card,.delivery-library-group,.delivery-request-strategy-grid > div,.delivery-fact-grid > div,.delivery-external-group,.delivery-external-name,.delivery-task-recovery,.delivery-twin-member,.delivery-twin-child-workspace,.delivery-twin-provenance) { border-color:#dedede; background:#fff; color:#333; box-shadow:none; }
body[data-theme="redbook"] .delivery-desktop .delivery-name-group { --delivery-group-accent:#86662e; border-color:#dfd0b4; }
body[data-theme="redbook"] .delivery-desktop .delivery-name-group--primaryNames { --delivery-group-accent:#c31c37; border-color:#e5aab4; }
body[data-theme="redbook"] .delivery-desktop .delivery-name-group--extendedNames { --delivery-group-accent:#686868; border-color:#dedede; }
body[data-theme="redbook"] :is(.delivery-review-header,.delivery-review-footer,.delivery-review-sections,.delivery-review-preview-head,.delivery-review-savebar,.delivery-role-floating-save,.delivery-smart-build,.delivery-template-module-index,.delivery-source-text,.delivery-name-group-chips > span,.delivery-twin-extended-members > span,.delivery-color-field,.delivery-report-round-toolbar) { border-color:#e3e3e3; background:#fafafa; color:#333; }
body[data-theme="redbook"] :is(.delivery-review-preview,.delivery-review-pdf-stage) { background:#eaeaea; }
body[data-theme="redbook"] :is(.delivery-readiness-grid > button,.delivery-review-sections > button,.delivery-role-choices button,.delivery-record-tabs button,.delivery-desktop-tabs button,.delivery-zone-tabs button,.delivery-library-tabs button) { border-color:#dedede; background:#fff; color:#555; }
body[data-theme="redbook"] :is(.delivery-desktop-tabs,.delivery-record-tabs,.delivery-zone-tabs,.delivery-library-tabs,.delivery-role-choices,.delivery-review-sections) > button.active { border-color:#e6adb6; background:#fff0f2; color:#c31c37; }
body[data-theme="redbook"] :is(.delivery-readiness-grid > button.complete,.delivery-review-status,.delivery-readiness.ready,.delivery-publication-status.published) { background:#edf7f1; color:#247353; }
body[data-theme="redbook"] :is(.delivery-readiness-grid > button.blocked,.delivery-readiness.blocked,.delivery-publication-status.withdrawn) { background:#fff0ef; color:#a62131; }
body[data-theme="redbook"] :is(.delivery-readiness-grid > button.warning,.delivery-review-facts-lock,.delivery-review-status.stale) { background:#fff6e5; color:#805610; }
body[data-theme="redbook"] :is(.delivery-review-header small,.delivery-review-editor-head small,.delivery-review-sections > strong,.delivery-review-sections > button span,.delivery-name-group > h3,.delivery-report-title) { color:#202020; }
body[data-theme="redbook"] :is(.memo-list,.memo-empty) { border-color:#dedede; background:#fff; color:#686868; }
body[data-theme="redbook"] .memo-list-item { background:transparent; color:#333; border-color:#e7e7e7; }
body[data-theme="redbook"] .memo-list-item.active { background:#fff0f2; color:#c31c37; }
body[data-theme="redbook"] :is(.memo-header p,.memo-list-item small,.memo-list > p) { color:#686868; }
body[data-theme="redbook"] :is(.memo-header small,.memo-save-state,.memo-preview-heading button) { color:#c31c37; }

/* Creation's local design systems map to the same red/white and black/gold roles. */
body[data-theme="redbook"] .xhs-creation-hub { --xch-ink:#202020; --xch-muted:#686868; --xch-bg:#f5f5f5; --xch-card:#fff; --xch-card-border:#e1e1e1; --xch-note-bg:linear-gradient(140deg,#24221f,#191919); --xch-note-border:#66563b; --xch-pill-bg:#fff0f2; --xch-pill-border:#efd1d6; --xch-pill-ink:#bd1a34; --xch-label-bg:#f4f4f4; --xch-label-ink:#686868; --xch-note-label-bg:#3d3223; --xch-note-label-ink:#e7cb93; --xch-reply-button:#e51b3e; --xch-shadow:0 5px 18px #19191908; --xch-hover-shadow:0 7px 22px #1919190f; color-scheme:light; }
body[data-theme="redbook"] .xhs-creation-hub .xch-entry-button { color:#fff; }
body[data-theme="redbook"] .xhs-reply-screen { --reply-ink:#202020; --reply-muted:#686868; --reply-line:#dedede; --reply-accent:#e51b3e; --reply-soft:#fff0f2; color:#333; }
body[data-theme="redbook"] .xhs-reply-screen.xhs-reply--dual { --ui-text:#333; --ui-text-strong:#202020; --ui-text-muted:#686868; --ui-line:#dedede; --ui-surface-2:#fff; --ui-surface-3:#f5f5f5; --ui-surface-4:#e7e7e7; }
body[data-theme="redbook"] .xhs-reply-screen :is(.xhs-composer,.xhs-result-pane,.xhs-compare-lane,.xhs-history,.xhs-final-panel,.xhs-drawer,.xhs-reply-history,.xhs-admin-corrections,.xhs-poetry-reply-card,.xhs-evidence-grid section) { border-color:#dedede; background:#fff; color:#333; }
body[data-theme="redbook"] .xhs-reply--dual :is(.xhs-composer,.xhs-result-pane,.xhs-final-panel) { background:transparent; }
body[data-theme="redbook"] .xhs-reply-screen :is(.xhs-compare-reading,.xhs-compare-lane-head strong,.xhs-compare-nav > strong,.xhs-recent h2,.xhs-reply-head h1,.xhs-composer > label) { color:#202020; }
body[data-theme="redbook"] .xhs-reply-screen :is(input,textarea,select,.xhs-compare-text) { border-color:#c9c9c9; background:#fff; color:#202020; caret-color:#e51b3e; }
body[data-theme="redbook"] .xhs-reply-screen button { border-color:#e51b3e; background:#e51b3e; color:#fff; }
body[data-theme="redbook"] .xhs-reply-screen button:hover:not(:disabled) { border-color:#c91835; background:#c91835; color:#fff; }
body[data-theme="redbook"] .xhs-reply-screen :is(button.secondary,.xhs-mode-tabs,.xhs-mode-tabs button,.xhs-compare-tabs,.xhs-compare-tabs button) { border-color:#dedede; background:#fff; color:#686868; }
body[data-theme="redbook"] .xhs-reply-screen :is(.xhs-mode-tabs button.active,.xhs-compare-tabs button[aria-selected="true"]) { background:#e51b3e; color:#fff; border-color:#e51b3e; box-shadow:none; }
body[data-theme="redbook"] .xhs-reply-screen :is(.xhs-text-button,.xhs-context-toggle,.xhs-recent-list button) { border-color:#e3e3e3; background:transparent; color:#686868; }
body[data-theme="redbook"] .xhs-reply-screen :is(.xhs-text-button,.xhs-context-toggle,.xhs-recent-list button):hover:not(:disabled) { background:#fff0f2; color:#c31c37; }
body[data-theme="redbook"] .xhs-reply-screen :is(.xhs-connection-warning,.xhs-compare-wait p,.xhs-compare-error-details summary) { background:#fff6e5; color:#805610; }
body[data-theme="redbook"] .xhs-reply-screen .xhs-progress-track { background:#e7e7e7; }
body[data-theme="redbook"] .xhs-reply-screen .xhs-progress-track i { background:#e51b3e; }
body[data-theme="redbook"] .xhs-reply-screen :is(.xhs-compare-lane.is-selected,.xhs-compare-lane.is-expanded) { border-color:#e51b3e; }
body[data-theme="redbook"] .xhs-reply-screen :is(button,input,textarea,select,summary,[tabindex]):focus-visible { outline-color:#e51b3e; }

/* Dual reply's older stylesheet restyles the global shell; reassert this frame. */
body[data-theme="redbook"]:has(.xhs-reply--dual) .app-shell { grid-template-columns:var(--rb-sidebar-width) minmax(0,1fr); background:#f5f5f5; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .main.screen-main { padding:calc(var(--rb-topbar-height) + 12px) 22px 16px; background:#f5f5f5; color:#333; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .tech-topbar { display:flex; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .sidebar { padding:24px 14px 14px; border-color:#2d2d2d; background:#191919; color:#eee; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .sidebar .brand { margin:0 6px 20px; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .tech-brand strong { color:#f8f5ee; font-size:18px; }
body[data-theme="redbook"]:has(.xhs-reply--dual) :is(.tech-brand small,.tech-brand-mark) { display:block; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .tech-sidebar-meta { display:grid; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .user-line { margin:0 4px 15px; padding:10px; border:1px solid #3b352c; background:#25231f; color:#cfc9bd; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .user-line b { padding:3px 6px; background:#3b3224; color:#e6cb95; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .tech-nav-label { color:#a59a85; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .nav button { min-height:36px; border:1px solid transparent; border-radius:7px; color:#d0d0d0; background:transparent; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .nav button:hover:not(:disabled) { background:#2d2923; border-color:#484035; color:#eed7ab; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .nav button.active { background:#e51b3e; border-color:#ff2442; color:#fff; box-shadow:0 4px 12px #ff24421a; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .ui-theme-switcher--sidebar { width:100%; margin:12px 0 0; background:#252525; border-color:#474037; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .ui-theme-switcher button { background:transparent; border-color:transparent; color:#c2b7a3; }
body[data-theme="redbook"]:has(.xhs-reply--dual) .ui-theme-switcher button.active { background:#d8b879; color:#191919; box-shadow:none; }

/* Studio UI only. No selector sets type or fill inside the canvas/preview. */
body[data-theme="redbook"] :is(.xhs-note-studio,.xhs-minimal-editor,.xhs-note-minimal-editor) { --xts-ink:#202020; --xts-muted:#686868; --xts-bg:#f5f5f5; --xts-panel:#fff; --xts-line:#dedede; --xts-soft:#f5f5f5; --xts-red:#e51b3e; --xts-red-soft:#fff0f2; --xts-green:#247353; --xts-green-soft:#edf7f1; --xts-stage:#ededed; --xts-stage-dot:#d7d7d7; --xts-purple-soft:#f4eff9; --xts-toolbar-gold:#d8b879; color:#333; }
body[data-theme="redbook"] .xhs-note-studio :is(.xhs-workbench,.xhs-studio-editor,.xhs-settings-drawer,.xhs-note-settings-drawer,.xhs-copy-library-editor,.xhs-copy-library-entry,.xhs-recent-notes,.xhs-private-notice,.xhs-reference-panel,.xhs-canvas-panel,.xhs-properties-panel,.xhs-note-tools,.xhs-note-workbench,.xhs-page-management,.xhs-ai-template-card) { border-color:#dedede; background:#fff; color:#333; box-shadow:var(--ui-shadow-panel); }
body[data-theme="redbook"] .xhs-note-studio :is(.xhs-studio-hero,.xhs-current-context) { border-color:#e6d8bf; background:linear-gradient(110deg,#fff,#fff7f8); color:#202020; }
body[data-theme="redbook"] .xhs-note-studio :is(.xhs-property-section,.xhs-layer-row,.xhs-list-item,.xhs-layer-select,.xhs-inline-help,.xhs-note-export-bar,.xhs-copy-library-page,.xhs-copy-library-raw-text,.xhs-settings-template-section,.xhs-settings-current,.xhs-settings-ai,.xhs-studio-secondary-tools) { border-color:#e3e3e3; background:#fafafa; color:#333; }
body[data-theme="redbook"] .xhs-note-studio .xhs-studio-workspace { border-color:#e3e3e3; background:#f5f5f5; box-shadow:none; }
body[data-theme="redbook"] .xhs-template-studio-workbench:not(.xhs-background-library-workspace) .xhs-studio-actionbar { border-color:#191919; background:linear-gradient(110deg,#191919,#27241f); color:#d8b879; box-shadow:none; }
body[data-theme="redbook"] .xhs-template-studio-workbench:not(.xhs-background-library-workspace) .xhs-studio-actions button:not(.xhs-studio-primary):not([data-ai-preview-button]) { border-color:#66563b; background:#24221e; color:#e3c791; }
body[data-theme="redbook"] .xhs-template-studio-workbench:not(.xhs-background-library-workspace) .xhs-studio-actions button:not(.xhs-studio-primary):not([data-ai-preview-button]):hover:not(:disabled) { border-color:#d8b879; background:#3a3021; color:#f3dfb6; }
body[data-theme="redbook"] .xhs-template-studio-workbench:not(.xhs-background-library-workspace) .xhs-studio-workspace > :is(.xhs-workbench,.xhs-studio-editor) { border-color:#d6d6d6; box-shadow:0 1px 3px #19191908; }
body[data-theme="redbook"] .xhs-template-studio-workbench:not(.xhs-background-library-workspace) :is(.xhs-studio-editor-heading,.xhs-studio-tool-tabs,.xhs-page-manager,.xhs-studio-editor-footer,.xhs-studio-secondary-tools) { border-color:#dedede; box-shadow:none; }
body[data-theme="redbook"] .xhs-note-studio :is(.xhs-list-item.active,.xhs-layer-row.active,.xhs-template-list-item.draft.active) { border-color:#e51b3e; background:#fff0f2; color:#c31c37; }
body[data-theme="redbook"] .xhs-note-studio .xhs-studio-redbook { background:#e51b3e; color:#fff; }
body[data-theme="redbook"] .xhs-note-studio .xhs-studio-design-tools > .xhs-studio-assets-section { border-top-color:#e51b3e; background:#fff5f6; color:#333; box-shadow:inset 2px 0 #ff244222; }
body[data-theme="redbook"] .xhs-ai-background-style-choices > button { border-color:#dedede; background:#fafafa; color:#333; }
body[data-theme="redbook"] .xhs-ai-background-style-choices > button.active { border-color:#e51b3e; background:#fff0f2; color:#c31c37; box-shadow:inset 0 0 0 1px #e51b3e; }
body[data-theme="redbook"] :is(.xhs-ai-background-start,.xhs-reference-review-head,.xhs-reference-review-summary,.xhs-reference-review-actions,.xhs-reference-review-item,.xhs-ai-background-loading) { border-color:#e3e3e3; background:#fafafa; color:#333; }
body[data-theme="redbook"] .xhs-ai-background-style-choices > button span, body[data-theme="redbook"] .xhs-ai-background-start > p { color:#686868; }

/* Preserve evidence/status distinctions in the dense object views. */
body[data-theme="redbook"] :is(.maintenance-char-tile.deleted,.review-char-card.deleted,.saved-candidate-card.needs-review) { border-color:#dfadb4; background:#fff0ef; }
body[data-theme="redbook"] :is(.library-hub-screen .admin-hub-health,.delivery-status-button.is-delivered,.after-sales-status-button.is-resolved,.delivery-countdown.is-safe,.delivery-countdown.is-complete,.client-account-status.active) { border-color:#b8d7c6; background:#edf7f1; color:#247353; }
body[data-theme="redbook"] :is(.delivery-countdown.is-overdue,.client-account-status.disabled) { border-color:#dfadb4; background:#fff0ef; color:#a62131; }
body[data-theme="redbook"] .customer-workbench .project-workbench-table tr.review-needed { background:#fffaef; }

/* Leaf selectors predate the common components. Keep inactive tools neutral. */
body[data-theme="redbook"] :is(.project-profile-tabs,.customer-tabs,.review-tool-tabs,.review-mode-tabs,.review-library-level-switch,.review-ai-tabs,.name-char-sort-tabs,.name-char-pinyin-filters,.name-char-position-filter,.global-search-tabs,.admin-hub-tabs) button { border-color:#dedede; background:#fff; color:#555; box-shadow:none; }
body[data-theme="redbook"] :is(.project-profile-tabs,.customer-tabs,.review-tool-tabs,.review-mode-tabs,.review-library-level-switch,.review-ai-tabs,.name-char-sort-tabs,.name-char-pinyin-filters,.name-char-position-filter,.global-search-tabs,.admin-hub-tabs) button:is(.active,.is-active,[aria-selected="true"]) { border-color:#e51b3e; background:#e51b3e; color:#fff; box-shadow:none; }
body[data-theme="redbook"] :is(.project-profile-tabs,.review-tool-tabs) button :is(small,span) { color:#686868; }
body[data-theme="redbook"] :is(.project-profile-tabs,.review-tool-tabs) button:is(.active,.is-active) :is(small,span) { color:#b32a40; }
body[data-theme="redbook"] :is(.review-tool-pane,.review-batch-bar,.review-tool-help,.review-tool-summary,.review-delete-bar,.review-summary,.filter-console-summary,.name-char-sidebar-foot) { background:#fafafa; border-color:#dedede; color:#555; }
body[data-theme="redbook"] :is(.review-library-controls,.review-library-bar) :is(b,strong) { color:#202020; }
body[data-theme="redbook"] .ui-context-card :is(.project-reference-edit,.project-context-requirements-edit) { border-color:#d9b8be; background:#fff; color:#bc1a35; }
body[data-theme="redbook"] .ui-context-card .project-reference-groups dt { background:#f1f1f1; color:#626262; }
body[data-theme="redbook"] .names-screen .names-left-tools :is(h3,h4,.names-control-heading) { color:#202020; }
body[data-theme="redbook"] .names-screen .names-left-tools .names-controls-toggle { border-color:#dedede; background:#fff; color:#555; }
body[data-theme="redbook"] .names-screen :is(.name-pool-identity-banner,.name-pool-identity,.names-pool-identity) { background:#24221e; color:#e7cb93; border-color:#66563b; }
body[data-theme="redbook"] .names-screen :is(.name-char-sidebar,.names-char-sidebar) button.active { background:#fff0f2; color:#c31c37; border-color:#e5adb6; }
body[data-theme="redbook"] .names-screen :is(.regular-name-display .regular-combination-card,.action-image-result-panel .action-image-name-card,.high-quality-result-panel .high-quality-name-card,.pronunciation-result-panel .quick-name-item,.regular-name-display .quick-name-item.normal:not(.risk)) { background:#fff; border-color:#dedede; box-shadow:none; }
body[data-theme="redbook"] .names-screen :is(.regular-combination-card,.action-image-name-card,.high-quality-name-card,.quick-name-item) :is(.name-text,.name-text.normal,.name-text:hover,.name-text:focus-visible) { color:#202020; background:transparent; text-shadow:none; }
body[data-theme="redbook"] .names-screen :is(.regular-name-display .regular-combination-card,.action-image-result-panel .action-image-name-card,.high-quality-result-panel .high-quality-name-card):is(:hover,:focus-within) { border-color:#d995a3; background:#fffafb; box-shadow:0 2px 8px #19191905; }
body[data-theme="redbook"] .names-screen :is(.regular-combination-card,.action-image-name-card,.high-quality-name-card):is(.favorite,.candidate) { border-color:#e5adb6; background:#fff0f2; }
body[data-theme="redbook"] .names-screen :is(.regular-card-actions,.action-image-card-actions,.high-quality-card-actions) button { border-color:#e3e3e3; background:#fafafa; color:#5d5d5d; }
body[data-theme="redbook"] .names-screen :is(.regular-card-actions,.action-image-card-actions,.high-quality-card-actions) button:hover:not(:disabled) { border-color:#e5adb6; background:#fff0f2; color:#c31c37; }
body[data-theme="redbook"] .names-screen :is(.regular-card-actions,.action-image-card-actions,.high-quality-card-actions) :is(.status-favorite,.status-candidate) { border-color:#e5adb6; background:#fff0f2; color:#c31c37; }
body[data-theme="redbook"] .smart-compact-context-trigger,body[data-theme="redbook"] .smart-compact-context-trigger:hover:not(:disabled) { border:0; background:transparent; color:#8b692d; box-shadow:none; }
body[data-theme="redbook"] .xhs-creation-hub .xch-note { --xch-ink:#f2e0ba; --xch-muted:#c4bbaa; --xch-coral:#ff2442; }
body[data-theme="redbook"] .xhs-creation-hub .xch-note .xch-entry-kicker { color:#bca374; }
body[data-theme="redbook"] .xhs-creation-hub .xch-note .xch-entry-copy :is(h2,h3) { color:#f2e0ba; }
body[data-theme="redbook"] .xhs-creation-hub .xch-note .xch-entry-copy :is(p,li,span) { color:#c4bbaa; }
body[data-theme="redbook"] .ai-name-motion-field.ai-name-motion-scene { --ai-motion-jade:#c31c37; --ai-motion-gold:#a47b38; --ai-motion-text:#333; --ai-motion-line:#d5c4a6; --ai-motion-surface:#fff; --ai-motion-halo:#f9e9e5; --ai-motion-warm:#f6efdf; --ai-motion-muted:#686868; }
body[data-theme="redbook"] .delivery-desktop .delivery-name-group > header :is(h3,strong,small) { color:var(--delivery-group-accent); }
body[data-theme="redbook"] .xhs-minimal-editor.xhs-template-studio-workbench:not(.xhs-background-library-workspace) > .xhs-studio-workspace > .xhs-template-library > .xhs-settings-template-section > footer.xhs-template-library-footer { background:#e51b3e; border-top-color:#ff2442; color:#fff; }
body[data-theme="redbook"] .xhs-creation-hub .xch-entry-button { background:#e51b3e; color:#fff; }
body[data-theme="redbook"] .app-shell:has(> .main > .xhs-note-studio > .xhs-template-studio-workbench:not(.xhs-background-library-workspace)) > .sidebar [data-sidebar-menu-key="xhsCreate"].active { border-color:#ff2442; background:#e51b3e; color:#fff; }
body[data-theme="redbook"] .xhs-minimal-editor.xhs-template-studio-workbench:not(.xhs-background-library-workspace) .xhs-studio-assets-section .xhs-upload-row > .xhs-ai-background-button { border-color:#e51b3e; background:#e51b3e; color:#fff; }
body[data-theme="redbook"] .xhs-minimal-editor.xhs-template-studio-workbench:not(.xhs-background-library-workspace) .xhs-studio-assets-section .xhs-upload-row > .xhs-ai-background-button:hover:not(:disabled) { border-color:#c91835; background:#c91835; color:#fff; }

/* Older naming tools own local brand colors rather than inheriting the shell. */
body[data-theme="redbook"] .names-screen { --names-fold-text:#424242; --names-fold-bg:#f6f6f6; --names-fold-border:#d2d2d2; }
body[data-theme="redbook"] .names-screen > .shared-name-filter-mode-row .shared-name-filter-trigger { border-color:#66563b; background:#24221e; color:#eed6a7; box-shadow:none; }
body[data-theme="redbook"] .names-screen > .shared-name-filter-mode-row .shared-name-filter-trigger:hover:not(:disabled) { border-color:#d8b879; background:#332c23; }
body[data-theme="redbook"] .names-screen > .shared-name-filter-mode-row .shared-name-filter-trigger span { border-color:#6f5e3f; background:#3a3021; color:#eed6a7; }
body[data-theme="redbook"] :is(.shared-name-filter-editor-modal,.shared-name-reference-modal) { border-color:#d8d8d8; background:#fff; color:#333; box-shadow:0 18px 56px #19191930; }
body[data-theme="redbook"] :is(.shared-name-filter-editor-header,.shared-name-reference-header) { border-color:#66563b; background:#24221e; color:#eed6a7; }
body[data-theme="redbook"] :is(.shared-name-filter-editor-header,.shared-name-reference-header) h2 { color:#eed6a7; }
body[data-theme="redbook"] :is(.shared-name-filter-editor-header,.shared-name-reference-header) p { color:#d3c4a9; }
body[data-theme="redbook"] :is(.shared-name-filter-editor-header,.shared-name-reference-header) button { border-color:#66563b; background:transparent; color:#eed6a7; }
body[data-theme="redbook"] :is(.shared-name-filter-editor-body,.shared-name-filter-editor-actions,.shared-name-reference-toolbar,.shared-name-reference-pagination) { border-color:#e4e4e4; }
body[data-theme="redbook"] :is(.shared-name-filter-editor-body > p,.shared-name-filter-editor-footnote,.shared-name-reference-item small) { color:#686868; }
body[data-theme="redbook"] :is(.shared-name-filter-example,.shared-name-filter-ai-notice,.shared-name-reference-conditions span) { border-color:#e4e4e4; background:#f5f5f5; color:#555; }
body[data-theme="redbook"] .shared-name-reference-item { border-color:#dedede; background:#fff; }
body[data-theme="redbook"] :is(.name-controls-toggle,.name-char-sort button,.name-char-pinyin-nav button) { border-color:#d7d7d7; background:#fff; color:#555; box-shadow:none; }
body[data-theme="redbook"] :is(.name-char-sort button,.name-char-pinyin-nav button):is(.active,[aria-selected="true"]) { border-color:#e5adb6; background:#fff0f2; color:#c31c37; }
body[data-theme="redbook"] .name-controls-toggle.has-active-filters { border-color:#d6b475; background:#fff8e9; color:#765621; }
body[data-theme="redbook"] .review-status-pills strong { color:#202020; }
body[data-theme="redbook"] .saved-compact-screen { --saved-card-bg:#fff; --saved-card-line:#dedede; --saved-name-ink:#202020; --saved-source-ink:#686868; --saved-source-label:#707070; --saved-divider:#e7e7e7; --saved-route-bg:#f3f3f3; --saved-route-ink:#555; --saved-selected-bg:#fff0f2; --saved-selected-line:#e51b3e; --saved-selected-ink:#bb1934; --saved-primary-bg:#fff8e8; --saved-primary-line:#b38946; --saved-backup-bg:#f6f6f6; --saved-backup-line:#828282; --saved-warning-ink:#805610; --saved-warning-bg:#fff6e5; --saved-warning-line:#d6b475; }
body[data-theme="redbook"] .history-match-profile { border-color:#e4d5b9; background:#fffaf0; }
body[data-theme="redbook"] :is(.history-match-profile strong,.history-empty-state strong,.history-name-card-head strong) { color:#202020; }
body[data-theme="redbook"] :is(.history-match-profile span,.history-match-profile small,.history-empty-state,.history-name-card span,.history-name-card p) { color:#686868; }
body[data-theme="redbook"] :is(.history-match-tabs,.history-review-category-tabs) button { border-color:#dedede; background:#fff; color:#555; }
body[data-theme="redbook"] :is(.history-match-tabs,.history-review-category-tabs) button.active { border-color:#e5adb6; background:#fff0f2; color:#c31c37; }
body[data-theme="redbook"] .history-name-card { border-color:#dedede; background:#fff; }
body[data-theme="redbook"] :is(.smart-compact-title h2 strong,.smart-compact-style-trigger b) { color:#202020; }
body[data-theme="redbook"] .smart-compact-stages::before { background:#e4e1db; }
body[data-theme="redbook"] .smart-compact-stages::after { background:#b58c48; }
body[data-theme="redbook"] .smart-compact-stage > summary i { background:#ededed; color:#686868; }
body[data-theme="redbook"] .smart-compact-stage:is(.completed,.next,.running,.starting) > summary i { background:#24221e; color:#eed6a7; }
body[data-theme="redbook"] .smart-compact-stage:is(.completed,.next) > summary span { color:#765621; }
body[data-theme="redbook"] .smart-compact-stage[open] > summary { outline-color:#d8b879; }
body[data-theme="redbook"] :is(.smart-compact-style-popover,.smart-compact-stage-popover,.smart-compact-more-popover) { border-color:#dedede; background:#fff; box-shadow:0 12px 32px #1919191a; }
body[data-theme="redbook"] :is(.seasonal-derived-grid strong,.seasonal-theme-summary strong) { color:#202020; }
body[data-theme="redbook"] :is(.seasonal-derived-grid > div,.seasonal-theme-summary) { border-color:#dedede; background:#fafafa; }
body[data-theme="redbook"] .seasonal-results .screen-list-area { overflow:auto; }
body[data-theme="redbook"] .seasonal-results .style-char-grid { height:auto; grid-template-columns:repeat(auto-fill,minmax(56px,1fr)); grid-template-rows:none; grid-auto-rows:minmax(62px,auto); align-content:start; gap:6px; }
body[data-theme="redbook"] .seasonal-results .style-char-tile { min-height:62px; padding:6px 3px; gap:3px; border-color:#dedede; background:#fff; }
body[data-theme="redbook"] .seasonal-results .style-char-tile strong { color:#202020; font-size:20px; }
body[data-theme="redbook"] .seasonal-results .seasonal-name-grid { height:auto; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); grid-template-rows:none; grid-auto-rows:minmax(60px,auto); align-content:start; gap:6px; }
body[data-theme="redbook"] .seasonal-results .seasonal-name-tile { min-height:60px; border-color:#dedede; background:#fff; color:#202020; }
body[data-theme="redbook"] .seasonal-results .seasonal-name-tile.recommended { border-color:#dedede; background:#fff; box-shadow:none; }
body[data-theme="redbook"] .seasonal-results .seasonal-name-tile.recommended::after { content:""; position:absolute; top:5px; right:5px; width:4px; height:4px; border-radius:50%; background:#e51b3e; pointer-events:none; }
body[data-theme="redbook"] .seasonal-results .seasonal-name-tile strong { font-size:16px; line-height:1.4; }
body[data-theme="redbook"] .seasonal-results .seasonal-tile-actions { grid-template-rows:repeat(2,minmax(0,1fr)); }
body[data-theme="redbook"] .seasonal-results .seasonal-tile-actions button { min-height:24px; padding:2px; line-height:1.2; }
body[data-theme="redbook"] .material-filter-bar { display:flex; flex-wrap:wrap; }
body[data-theme="redbook"] .material-filter-bar > input { flex:1 1 160px; width:160px; min-width:0; }
body[data-theme="redbook"] .material-filter-bar > select { flex:1 1 100px; width:100px; min-width:0; }
body[data-theme="redbook"] .material-filter-bar > :is(button,label) { flex:0 0 auto; }
body[data-theme="redbook"] .material-card { border-color:#dedede; }
body[data-theme="redbook"] :is(.material-pack-chip,.material-staged-images span,.material-group-selection) { border-color:#dedede; background:#f6f6f6; color:#555; }

/* Region composition. These roles paint full functional surfaces without
 * wrapping controls or applying a brand palette to document/artwork content. */
body[data-theme="redbook"] [data-ui-region][data-ui-tone="white"] { background:#fff; border-color:#dedede; color:#202020; }
body[data-theme="redbook"] :is([data-ui-region][data-ui-tone="black"],.xhs-studio-actionbar,.xhs-page-bar,.xhs-compare-lane-head,.xhs-compare-nav,.shared-name-filter-editor-header,.shared-name-reference-header,.delivery-review-header) {
  background:#191919; color:#f6efe2; border-color:#66563b;
  --ui-text-strong:#f6efe2; --ui-text:#f6efe2; --ui-text-muted:#cfbfa5;
  --ui-line:#66563b; --ui-surface-2:#272727;
}
body[data-theme="redbook"] :is([data-ui-region][data-ui-tone="black"],.xhs-studio-actionbar,.xhs-page-bar,.xhs-compare-lane-head,.xhs-compare-nav,.shared-name-filter-editor-header,.shared-name-reference-header,.delivery-review-header) :is(h1,h2,h3,h4,strong,b,.eyebrow,.tech-kicker) { color:#e7c98d; }
body[data-theme="redbook"] :is([data-ui-region][data-ui-tone="black"],.xhs-studio-actionbar,.xhs-page-bar,.xhs-compare-lane-head,.xhs-compare-nav,.shared-name-filter-editor-header,.shared-name-reference-header,.delivery-review-header) :is(p,small,.muted,.tech-live-status,.project-reference-secondary) { color:#d0c6b5; }
body[data-theme="redbook"] [data-ui-region][data-ui-tone="black"] > :is(h1,h2,h3,p) { padding-inline:12px; }
body[data-theme="redbook"] :is([data-ui-region="task"],[data-ui-region="section"],[data-ui-region="dialog"]) > :is(h1,h2,h3) { border-color:#66563b; }
body[data-theme="redbook"] :is([data-ui-region="task"],[data-ui-region="section"],[data-ui-region="dialog"]) :is(button.secondary,button.ghost,button.xhs-text-button,button.xhs-text-button:hover,a.button.secondary) { background:#272727; color:#ead5ad; border-color:#756344; box-shadow:none; }
body[data-theme="redbook"] :is([data-ui-region="task"],[data-ui-region="section"],[data-ui-region="dialog"]) :is(button.secondary,button.ghost):hover:not(:disabled) { background:#383024; border-color:#d8b879; color:#f7e7c7; }
body[data-theme="redbook"] :is([data-ui-region="task"],[data-ui-region="section"],[data-ui-region="dialog"]) :is(input,textarea,select) { background:#fff; color:#202020; border-color:#bda985; }
body[data-theme="redbook"] :is([data-ui-region][data-ui-tone="red"],.xhs-studio-heading,.xhs-reply-head,.review-finish,.filter-action-bar,.poetry-project-toolbar,.seasonal-actions,.recovery-topbar) {
  background:#e51b3e; color:#fff; border-color:#e51b3e;
  --ui-text-strong:#fff; --ui-text:#fff; --ui-text-muted:#fff; --ui-line:#ff8295;
  --ui-surface-2:#e51b3e; --ui-surface-3:#cb1534;
}
body[data-theme="redbook"] :is([data-ui-region][data-ui-tone="red"],.xhs-studio-heading,.xhs-reply-head,.review-finish,.filter-action-bar,.poetry-project-toolbar,.seasonal-actions,.recovery-topbar) :is(h1,h2,h3,h4,p,strong,b,small,.muted,.eyebrow,label) { color:#fff; }
body[data-theme="redbook"] :is([data-ui-region][data-ui-tone="red"],.xhs-studio-heading,.xhs-reply-head,.review-finish,.filter-action-bar,.poetry-project-toolbar,.seasonal-actions,.recovery-topbar) :is(input,textarea,select) { background:#fff; color:#202020; border-color:#fff; caret-color:#e51b3e; }
body[data-theme="redbook"] :is([data-ui-region][data-ui-tone="red"],.review-finish,.filter-action-bar,.poetry-project-toolbar,.seasonal-actions,.recovery-topbar) button { border-color:#fff; background:#fff; color:#bd1834; box-shadow:none; }
body[data-theme="redbook"] :is([data-ui-region][data-ui-tone="red"],.review-finish,.filter-action-bar,.poetry-project-toolbar,.seasonal-actions,.recovery-topbar) button:hover:not(:disabled) { background:#191919; border-color:#191919; color:#efd4a2; }
body[data-theme="redbook"] :is([data-ui-region][data-ui-tone="red"],.review-finish,.filter-action-bar,.poetry-project-toolbar,.seasonal-actions,.recovery-topbar) button:disabled { border-color:#f2a1af; background:#f6c6ce; color:#76535b; opacity:1; }
body[data-theme="redbook"] [data-ui-region="actions"] { border-radius:9px; padding-inline:10px; }
body[data-theme="redbook"] [data-ui-region="feature"] { border-radius:18px; box-shadow:0 10px 26px #1919190d; }
body[data-theme="redbook"] :is(.page-head,.ui-page-head,.customer-workbench-head,.project-info-head,.admin-hub-head,.pm-heading,.memo-header)[data-ui-region="task"] { border-radius:12px; padding:10px 16px; gap:12px; }
body[data-theme="redbook"] :is(.page-head,.ui-page-head,.customer-workbench-head,.project-info-head,.admin-hub-head,.pm-heading,.memo-header)[data-ui-region="task"] :is(h1,h2,h3,p) { margin-block:0; }
body[data-theme="redbook"] :is(.page-head,.ui-page-head,.customer-workbench-head,.project-info-head,.admin-hub-head,.pm-heading,.memo-header)[data-ui-region="task"] p { margin-top:5px; }
body[data-theme="redbook"] [data-ui-region="selection"] { background:#191919; border:1px solid #66563b; border-radius:9px; padding:4px; gap:4px; }
body[data-theme="redbook"] [data-ui-region="selection"] button { background:transparent; border-color:transparent; color:#f0e4cf; box-shadow:none; }
body[data-theme="redbook"] [data-ui-region="selection"] button:is(.active,.is-active,[aria-selected="true"]) { background:#e51b3e; border-color:#ff2442; color:#fff; box-shadow:none; }
body[data-theme="redbook"] [data-ui-region="selection"] button:not(.active):not(.is-active):not([aria-selected="true"]):hover:not(:disabled) { border-color:#66563b; background:#302a20; color:#e9cf9e; }
body[data-theme="redbook"] [data-ui-region="selection"] button :is(span,small,b,strong) { color:inherit; }
body[data-theme="redbook"] [data-ui-region="selection"] :is(p,.muted) { color:#d0c6b5; }
/* The project summary is a black-gold object identity, never a document preview. */
body[data-theme="redbook"] .ui-context-card.project-reference-card { --project-context-bg:#191919; --project-context-surface:#272727; --project-context-border:#66563b; background:#191919; color:#eee1c9; border-color:#66563b; }
body[data-theme="redbook"] .ui-context-card.project-reference-card :is(b,strong,.project-reference-groups dd) { color:#f6ead2; }
body[data-theme="redbook"] .ui-context-card.project-reference-card :is(small,.project-reference-secondary,.project-reference-identity > span,.project-reference-progress > summary) { color:#d0c6b5; }
body[data-theme="redbook"] .ui-context-card.project-reference-card :is(.project-reference-group,.project-reference-basics,.project-reference-groups) { border-color:#4a4031; }
body[data-theme="redbook"] .ui-context-card.project-reference-card :is(.project-reference-groups dt,.project-reference-favorable,.project-context-route-badge) { background:#383021; color:#e7c98d; border-color:#66563b; }
body[data-theme="redbook"] .ui-context-card.project-reference-card :is(.project-reference-edit,.project-context-requirements-edit) { background:#e51b3e; color:#fff; border-color:#ff2442; }
body[data-theme="redbook"] .ui-context-card.project-reference-card .project-reference-progress-panel { background:#fff; color:#333; }
body[data-theme="redbook"] .ui-context-card.project-reference-card .project-reference-progress-panel :is(b,strong,small,span) { color:#333; }
body[data-theme="redbook"] .smart-compact-context-trigger,body[data-theme="redbook"] .smart-compact-context-trigger:hover:not(:disabled) { color:#d8b879; }
/* Names own a full-width red method band and a compact black identity header. */
body[data-theme="redbook"] .names-screen > .page-head { padding:5px 12px; border-radius:9px; min-height:32px; }
body[data-theme="redbook"] .names-screen > .shared-name-filter-mode-row { padding:3px 6px; background:#e51b3e; border-color:#e51b3e; }
body[data-theme="redbook"] .names-screen > .shared-name-filter-mode-row .name-combination-tabs { background:transparent; border-color:transparent; padding:0; }
body[data-theme="redbook"] .names-screen > .shared-name-filter-mode-row .name-combination-tabs button { color:#fff; background:transparent; border-color:transparent; }
body[data-theme="redbook"] .names-screen > .shared-name-filter-mode-row .name-combination-tabs button.active { color:#191919; background:#fff; border-color:#fff; }
body[data-theme="redbook"] .names-screen > .shared-name-filter-mode-row .shared-name-filter-trigger { background:#191919; color:#efd4a2; border-color:#191919; }
body[data-theme="redbook"] .names-screen > .shared-name-filter-mode-row .shared-name-filter-trigger span { color:#efd4a2; }
body[data-theme="redbook"] .names-screen > .shared-name-filter-mode-row :is(label,.shared-name-filter-optional) { color:#fff; }
body[data-theme="redbook"] :is(.names-left-tools,.names-result-panel,.review-preview-panel,.saved-workbench-panel,.smart-funnel-results) { border-top:3px solid #191919; }
body[data-theme="redbook"] :is(.names-controls-title,.names-result-meta,.name-char-picker-head,.review-library-bar) { background:#191919; color:#eed8af; border-color:#66563b; }
body[data-theme="redbook"] :is(.names-controls-title,.names-result-meta,.name-char-picker-head,.review-library-bar) :is(h2,h3,h4,strong,b,small) { color:#eed8af; }
body[data-theme="redbook"] .names-result-panel > .page-head { border-radius:7px; padding:7px 10px; }
body[data-theme="redbook"] .review-workbench-header { border-radius:10px; }
body[data-theme="redbook"] .review-workbench-header :is(.review-status-pills span,.review-record-inline,.review-header-menu > summary) { background:#272727; border-color:#66563b; color:#e8d2aa; }
body[data-theme="redbook"] .review-workbench-header :is(.review-status-pills strong,.review-title-block h1) { color:#e8d2aa; }
body[data-theme="redbook"] .review-finish :is(strong,span,small) { color:#fff; }
body[data-theme="redbook"] .saved-compact-page-head { min-height:39px; }
body[data-theme="redbook"] .smart-compact-head { padding-inline:10px; border-radius:8px; background:#e51b3e; color:#fff; border-color:#e51b3e; }
body[data-theme="redbook"] .smart-compact-head :is(.smart-compact-title h2,.smart-compact-title h2 strong) { color:#fff; }
body[data-theme="redbook"] .smart-compact-head[data-ui-tone="red"] .smart-compact-style-trigger { background:#272727; border-color:#66563b; color:#ead5ad; }
body[data-theme="redbook"] .smart-compact-head[data-ui-tone="red"] .smart-compact-style-trigger b { color:#e7c98d; }
body[data-theme="redbook"] .smart-compact-head button { color:#ead5ad; background:#272727; border-color:#66563b; }
body[data-theme="redbook"] .smart-compact-head button:disabled { color:#999; }
body[data-theme="redbook"] .smart-compact-head .smart-compact-stages { background:transparent; }
body[data-theme="redbook"] .smart-compact-stage > summary { color:#fff; }
body[data-theme="redbook"] .smart-compact-head .smart-compact-stage > summary span { color:#202020; }
body[data-theme="redbook"] .smart-compact-head .smart-compact-stage > summary { background:#fff; border-color:#fff; }
body[data-theme="redbook"] .smart-compact-stage-popover :is(h3,p,span,strong) { color:#202020; }
body[data-theme="redbook"] .history-match-hero { border-radius:12px; }
body[data-theme="redbook"] .history-match-hero h1 { color:#e7c98d; }
body[data-theme="redbook"] .history-match-profile { border-color:#66563b; background:#272727; }
body[data-theme="redbook"] .history-match-profile :is(strong,span,small) { color:#e7c98d; }
/* Entry compositions use whole red features beside black-gold task objects. */
body[data-theme="redbook"] .admin-overview-header { padding:24px 28px; min-height:120px; border-radius:18px; }
body[data-theme="redbook"] .admin-overview-header :is(.admin-overview-title > span,.admin-overview-title h1,.admin-overview-title p) { color:#fff; }
body[data-theme="redbook"] .admin-overview-page { padding:28px; gap:20px; }
body[data-theme="redbook"] .admin-overview-card:nth-child(2) { background:#e51b3e; border-color:#e51b3e; --card-accent:#fff; --card-soft:#ffffff20; --card-orb:#ffffff16; }
body[data-theme="redbook"] .admin-overview-card:nth-child(2) :is(h2,strong,p,span) { color:#fff; }
body[data-theme="redbook"] .admin-overview-card:first-child :is(h2,span,p) { color:#dacbb3; }
body[data-theme="redbook"] .management-hub { background:#f5f5f5; border-color:#e5e5e5; }
body[data-theme="redbook"] .management-heading { border-bottom:3px solid #e51b3e; padding-bottom:18px; }
body[data-theme="redbook"] .management-picker { width:min(840px,100%); max-width:100%; }
body[data-theme="redbook"] .management-choices { grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; width:100%; }
body[data-theme="redbook"] button.management-choice { width:auto; height:auto; min-height:114px; border-radius:18px; background:#fff; color:#202020; }
body[data-theme="redbook"] button.management-choice:first-child { grid-column:span 2; min-height:160px; background:#e51b3e; border-color:#e51b3e; color:#fff; }
body[data-theme="redbook"] button.management-choice:first-child strong { color:#fff; }
body[data-theme="redbook"] button.management-choice:nth-child(2) { min-height:160px; background:#191919; border-color:#66563b; color:#e7c98d; }
body[data-theme="redbook"] button.management-choice:nth-child(2) strong { color:#e7c98d; }
body[data-theme="redbook"] .xhs-creation-hub { --xch-coral:#e51b3e; --xch-bg:#f5f5f5; --xch-pill-ink:#bd1834; }
body[data-theme="redbook"] .xhs-creation-hub .xch-reply { background:#e51b3e; border-color:#e51b3e; --xch-ink:#fff; --xch-muted:#fff; --xch-label-bg:#ffffff24; --xch-label-ink:#fff; }
body[data-theme="redbook"] .xhs-creation-hub .xch-reply :is(h2,h3,p,.xch-entry-kicker,.xch-entry-desc) { color:#fff; }
body[data-theme="redbook"] .xhs-creation-hub .xch-reply .xch-entry-button { background:#fff; border-color:#fff; color:#b41631; }
body[data-theme="redbook"] .xhs-creation-hub .xch-note { background:#191919; border-color:#66563b; }
body[data-theme="redbook"] .xhs-creation-hub .xch-heading h1 em { color:#e51b3e; }
/* Workbench interior: black section heads, red mode controls, neutral artwork. */
body[data-theme="redbook"] .xhs-studio-heading { padding:10px 16px; border-radius:14px; }
body[data-theme="redbook"] .xhs-studio-heading :is(h1,h2,small,.xhs-studio-breadcrumb,.xhs-studio-tagline) { color:#fff; }
body[data-theme="redbook"] .xhs-studio-heading .xhs-studio-breadcrumb > span { color:#fff; }
body[data-theme="redbook"] .xhs-studio-heading .xhs-studio-redbook { background:#fff; color:#c91835; }
body[data-theme="redbook"] .xhs-studio-heading .xhs-studio-page-link { border-color:#fff; background:#fff; color:#bd1834; }
body[data-theme="redbook"] .xhs-note-studio :is(.xhs-studio-editor-heading,.xhs-template-library-header) { background:#191919; border-color:#66563b; color:#ead5ad; }
body[data-theme="redbook"] .xhs-note-studio :is(.xhs-studio-editor-heading,.xhs-template-library-header) :is(strong,h2,h3,span,small) { color:#ead5ad; }
body[data-theme="redbook"] .xhs-note-studio :is(.xhs-studio-editor-heading,.xhs-template-library-header) button { background:#272727; color:#ead5ad; border-color:#66563b; }
body[data-theme="redbook"] .xhs-template-studio-workbench .xhs-studio-tool-tabs { background:#e51b3e; border-color:#e51b3e; }
body[data-theme="redbook"] .xhs-template-studio-workbench .xhs-studio-tool-tabs button { background:transparent; color:#fff; border-color:transparent; }
body[data-theme="redbook"] .xhs-template-studio-workbench .xhs-studio-tool-tabs button.active { background:#fff; color:#bd1834; border-color:#fff; }
body[data-theme="redbook"] .xhs-template-studio-workbench .xhs-studio-assets-section > :is(header,h3) { color:#bd1834; }
body[data-theme="redbook"] .xhs-reply-screen .xhs-page-bar { padding-inline:14px; border-radius:10px; }
body[data-theme="redbook"] .xhs-reply-screen .xhs-reply-head { padding:5px 12px; border-radius:10px; }
body[data-theme="redbook"] .xhs-reply-screen .xhs-reply-head h1 { color:#fff; }
body[data-theme="redbook"] .xhs-reply-screen .xhs-reply-head .xhs-mode-tabs { background:transparent; border-color:#ffffff50; }
body[data-theme="redbook"] .xhs-reply-screen .xhs-reply-head .xhs-mode-tabs button { color:#fff; background:transparent; border-color:transparent; }
body[data-theme="redbook"] .xhs-reply-screen .xhs-reply-head .xhs-mode-tabs button.active { color:#bd1834; background:#fff; border-color:#fff; }
body[data-theme="redbook"] .xhs-reply-screen :is(.xhs-compare-nav,.xhs-compare-lane-head) { background:#191919; color:#ead5ad; border-color:#66563b; padding-inline:12px; }
body[data-theme="redbook"] .xhs-reply-screen :is(.xhs-compare-nav,.xhs-compare-lane-head) :is(strong,small,span) { color:#ead5ad; }
body[data-theme="redbook"] .xhs-reply-screen :is(.xhs-compare-nav,.xhs-compare-lane-head) button.secondary { background:#272727; border-color:#66563b; color:#ead5ad; }
body[data-theme="redbook"] .xhs-reply-screen .xhs-compare-tabs { background:#191919; border-color:#66563b; }
body[data-theme="redbook"] .xhs-reply-screen .xhs-compare-tabs button { color:#e7c98d; background:transparent; border-color:transparent; }
body[data-theme="redbook"] .xhs-reply-screen .xhs-compare-tabs button[aria-selected="true"] { background:#e51b3e; color:#fff; border-color:#ff2442; box-shadow:none; }
/* Reading and editing keep the full document white, with identifiable controls. */
body[data-theme="redbook"] .memo-workspace { background:#f5f5f5; }
body[data-theme="redbook"] .memo-list > :is(header,h2) { background:#191919; color:#e7c98d; }
body[data-theme="redbook"] .delivery-desktop .delivery-name-group > header { background:#191919; border-color:#66563b; color:#e7c98d; padding:8px 12px; }
body[data-theme="redbook"] .delivery-desktop .delivery-name-group > header :is(h3,strong,small) { color:#e7c98d; }
body[data-theme="redbook"] :is(.delivery-review-header,.delivery-review-savebar) { background:#191919; color:#ead5ad; border-color:#66563b; }
body[data-theme="redbook"] .delivery-review-header :is(h2,strong,small) { color:#ead5ad; }
body[data-theme="redbook"] .delivery-review-savebar button:not(.secondary) { background:#e51b3e; color:#fff; border-color:#ff2442; }
/* Dialog chrome is independent of whether its async renderer adds metadata. */
body[data-theme="redbook"] :is(.modal-header,.name-detail-header,.analysis-modal-head,.xhs-dialog-head,.xhs-prompt-dialog-head,.xhs-ai-background-head,.xhs-reference-review-head,.ai-name-ranking-modal-header,.filter-info-header,.profile-drawer-head,.client-settings-header,.client-history-header,.material-ocr-header) { background:#191919; border-color:#66563b; color:#ead5ad; border-radius:12px 12px 0 0; }
body[data-theme="redbook"] :is(.modal-header,.name-detail-header,.analysis-modal-head,.xhs-dialog-head,.xhs-prompt-dialog-head,.xhs-ai-background-head,.xhs-reference-review-head,.ai-name-ranking-modal-header,.filter-info-header,.profile-drawer-head,.client-settings-header,.client-history-header,.material-ocr-header) :is(h1,h2,h3,strong,p,small) { color:#ead5ad; }
body[data-theme="redbook"] :is(.modal-header,.name-detail-header,.analysis-modal-head,.xhs-dialog-head,.xhs-prompt-dialog-head,.xhs-ai-background-head,.xhs-reference-review-head,.ai-name-ranking-modal-header,.filter-info-header,.profile-drawer-head,.client-settings-header,.client-history-header,.material-ocr-header) button.secondary { background:#272727; border-color:#66563b; color:#ead5ad; }


/* Nested light controls retain their own foreground instead of gold/white. */
body[data-theme="redbook"] .names-result-panel .names-result-meta .name-stats > div { background:#272727; border-color:#66563b; color:#f0e4cf; }
body[data-theme="redbook"] .names-result-panel .names-result-meta .name-stats > div :is(strong,span,small) { color:#ead5ad; }
body[data-theme="redbook"] .names-screen > .shared-name-filter-mode-row .shared-name-filter-optional :is(label,.check,.optional-pronunciation-control) { background:transparent; color:#fff; border-color:#ff8b9e; }
body[data-theme="redbook"] .names-screen > .shared-name-filter-mode-row .shared-name-filter-optional :is(span,small) { color:#fff; }
body[data-theme="redbook"] .xhs-creation-hub .xch-reply .xch-chat :is(p,small) { color:#333; }
body[data-theme="redbook"] .xhs-creation-hub .xch-reply .xch-chat { background:#fff; border-color:#ebcbd2; }
body[data-theme="redbook"] .xhs-creation-hub .xch-reply .xch-avatar { background:#fff0f3; color:#bd1834; }
body[data-theme="redbook"] .xhs-creation-hub .xch-reply .xch-art .xch-float-label { background:#fff; color:#bd1834; }
body[data-theme="redbook"] .admin-overview-header .admin-overview-refresh { color:#fff; }
body[data-theme="redbook"] .project-profile-tabs[data-ui-region="selection"] button.is-active :is(span,small),body[data-theme="redbook"] .review-tool-tabs[data-ui-region="selection"] button.active :is(span,small) { color:#fff; }
body[data-theme="redbook"] .project-profile-tabs[data-ui-region="selection"] em { color:#d0c6b5; }
body[data-theme="redbook"] .saved-compact-toolbar :is(.saved-count,.saved-check-status,.saved-detection-status,.saved-check-stat,.saved-check-stats,.saved-check-stats span,.saved-check-stats b,.saved-check-stats strong,.saved-check-more summary) { color:#fff; }
body[data-theme="redbook"] .smart-compact-style-popover,body[data-theme="redbook"] .smart-compact-more-popover,body[data-theme="redbook"] .smart-compact-stage-popover { --ui-text-strong:#202020; --ui-text:#333; --ui-text-muted:#686868; --ui-line:#dedede; --ui-surface-2:#fff; --ui-surface-3:#f5f5f5; background:#fff; color:#333; }
body[data-theme="redbook"] .smart-compact-head :is(.smart-compact-stage-popover,.smart-compact-style-popover,.smart-compact-more-popover) :is(h2,h3,strong,p,small,label,span) { color:#333; }
body[data-theme="redbook"] .smart-compact-head :is(.smart-compact-stage-popover,.smart-compact-style-popover,.smart-compact-more-popover) button { color:#333; background:#fff; border-color:#dedede; }
body[data-theme="redbook"] .smart-compact-head :is(.smart-compact-stage-popover,.smart-compact-style-popover,.smart-compact-more-popover) button:is(.active,.selected) { color:#fff; background:#e51b3e; border-color:#e51b3e; }

/* Contrast at transitions between dark chrome and light embedded controls. */
body[data-theme="redbook"] [data-ui-region="selection"][data-ui-tone] button:is(.active,.is-active,[aria-selected="true"]) :is(strong,b,small,span) { color:#fff; }
body[data-theme="redbook"] .admin-overview-header .admin-overview-refresh > span { color:#fff; }
body[data-theme="redbook"] :is(.admin-hub-head > div > span,.history-match-hero > div > span,.maintenance-top-pagination > span,.review-title-block > span,.review-record-inline > span,.review-library-bar > div > span,.delivery-record-tabs > span,.delivery-heading-actions > span) { color:#d8c7a8; }
body[data-theme="redbook"] :is(.delivery-countdown.is-unset,.intake-upload-card small,.seasonal-derived-grid > div > span,.seasonal-theme-summary > span,.xhs-compare-state span,.xhs-compare-lane-actions small,.xhs-final-count) { color:#616161; }
body[data-theme="redbook"] .global-library-workspace { --gl-accent:#c91835; }
body[data-theme="redbook"] .xhs-creation-hub .xch-reply .xch-entry-label { background:#be1631; border-color:#be1631; color:#fff; }
body[data-theme="redbook"] .xhs-creation-hub .xch-heat-label,body[data-theme="redbook"] .xhs-creation-hub .xch-heat-label span { color:#ad3047; }
body[data-theme="redbook"] .ai-rules-nav button.active { background:#e51b3e; border-color:#e51b3e; color:#fff; }
body[data-theme="redbook"] .ai-rules-nav button.active span { color:#fff; }
body[data-theme="redbook"] .filter-workbench-head .filter-current-record { background:#272727; border-color:#66563b; }
body[data-theme="redbook"] .filter-action-bar .filter-result-actions-copy > span { color:#fff; }
body[data-theme="redbook"] .filter-action-bar span { color:#fff; }
body[data-theme="redbook"] .review-library-home strong { color:#bd1834; }
body[data-theme="redbook"] .name-pool-current-version > span { color:#d0c6b5; }
body[data-theme="redbook"] .name-pool-plan .name-pool-overview.ui-surface > header small { color:#e7c98d; }
body[data-theme="redbook"] .name-pool-plan .name-pool-overview .ui-metric-card { background:#272727; border-color:#66563b; }
body[data-theme="redbook"] .name-pool-plan .name-pool-overview .ui-metric-card :is(small,b,em) { color:#e7c98d; }
body[data-theme="redbook"] .name-pool-plan .name-pool-overview .name-pool-rule :is(strong,small) { color:#805610; }
body[data-theme="redbook"] .poetry-project-toolbar .poetry-project-facts > span { background:#191919; border-color:#66563b; }
body[data-theme="redbook"] .poetry-project-toolbar .poetry-project-facts :is(small,strong) { color:#ead5ad; }
body[data-theme="redbook"] .poetry-project-library-stats > span { color:#fff; }
body[data-theme="redbook"] .poetry-project-library-stats > .poetry-formal-status { background:#fff; color:#247353; }
body[data-theme="redbook"] .poetry-project-screen :is(.poetry-project-filter-note,.poetry-project-card-source-meta .source-count) { color:#666; }
body[data-theme="redbook"] .saved-compact-toolbar .homophone-counts > span,body[data-theme="redbook"] .saved-compact-toolbar .homophone-settings > summary { color:#fff; }
body[data-theme="redbook"] .recovery-topbar .recovery-stat { background:#191919; color:#ead5ad; border-color:#66563b; }
body[data-theme="redbook"] .recovery-topbar .recovery-stat strong { color:#ead5ad; }
body[data-theme="redbook"] .library-dynamics-toolbar { background:#191919; color:#ead5ad; border-color:#66563b; }
body[data-theme="redbook"] .library-dynamics-toolbar :is(h1,strong,.field > span,.library-dynamics-title > span) { color:#ead5ad; }
body[data-theme="redbook"] .library-dynamics-source.live { background:#272727; border-color:#66563b; color:#ead5ad; }
body[data-theme="redbook"] .library-dynamics-source.live :is(small,strong) { color:#ead5ad; }
body[data-theme="redbook"] :is(.library-dynamics-flow > header,.library-dynamics-inspector-head) { background:#191919; color:#ead5ad; padding:10px; border-radius:8px; }
body[data-theme="redbook"] :is(.library-dynamics-flow > header,.library-dynamics-inspector-head) :is(h2,h3,span,small) { color:#ead5ad; }
body[data-theme="redbook"] .library-dynamics-flow-legend :is(.pending,b) { background:#f0f0f0; color:#555; }
body[data-theme="redbook"] .library-dynamics-detail.empty :is(strong,p) { color:#666; }
body[data-theme="redbook"] .library-dynamics-actions { padding:4px; border-radius:8px; background:#e51b3e; }
body[data-theme="redbook"] .library-dynamics-actions button { background:#fff; color:#bd1834; border-color:#fff; }
body[data-theme="redbook"] .library-dynamics-summary > .final { background:#e51b3e; border-color:#e51b3e; color:#fff; }
body[data-theme="redbook"] .library-dynamics-summary > .final :is(strong,span,small,em) { color:#fff; }


body[data-theme="redbook"] .ai-rules-workbench .ai-rules-nav button.active { background:#e51b3e; border-color:#e51b3e; }
body[data-theme="redbook"] .ai-rules-workbench .ai-rules-nav button.active strong { color:#fff; }
body[data-theme="redbook"] .name-pool-plan .name-pool-overview > div > small { color:#e7c98d; }
body[data-theme="redbook"] .library-dynamics-flow-legend .completed { color:#247353; }
body[data-theme="redbook"] .library-dynamics-screen .library-dynamics-inspector-head > small { color:#555; }
body[data-theme="redbook"] .project-style-screen :is(.role-tabs,.seasonal-name-tabs) button.active { background:#e51b3e; border-color:#e51b3e; color:#fff; }
body[data-theme="redbook"] .project-style-screen :is(.role-tabs,.style-profile-buttons,.style-stage-tabs,.seasonal-name-tabs,.name-char-sort,.wuxing-order-tabs) button.active span { color:#fff; }
body[data-theme="redbook"] .recovery-topbar .recovery-stat :is(span,small) { color:#ead5ad; }
body[data-theme="redbook"] .names-screen > .shared-name-filter-mode-row .shared-name-filter-optional { flex:0 0 202px; min-width:202px; }
body[data-theme="redbook"] .xhs-note-studio .xhs-studio-editor-heading p { color:#d0c6b5; }
body[data-theme="redbook"] .xhs-note-studio .xhs-studio-editor-heading h2 > span { background:#383021; border-color:#66563b; color:#ead5ad; }
body[data-theme="redbook"] .xhs-note-studio .xhs-studio-secondary-tools :is(.xhs-section-head,.xhs-layer-toolbar) { background:#e51b3e; color:#fff; }
body[data-theme="redbook"] .xhs-note-studio .xhs-studio-secondary-tools :is(.xhs-section-head,.xhs-layer-toolbar) :is(h3,strong,span) { color:#fff; }
body[data-theme="redbook"] .project-info-screen.is-editing .project-profile-tabs { background:#191919; border-color:#66563b; }
body[data-theme="redbook"] .project-info-screen.is-editing .project-profile-tabs button:not(.is-active) :is(span,small) { color:#ead5ad; }
body[data-theme="redbook"] .project-info-screen.is-editing :is(.profile-card-title h3,.profile-intake-title strong,.profile-intake-title h3,.profile-basic-edit h3,.profile-intake-edit h3) { color:#202020; }
body[data-theme="redbook"] .project-info-screen.is-editing :is(.profile-basic-edit,.profile-intake-edit) { background:#fff; border-color:#dedede; }


body[data-theme="redbook"] .xhs-note-studio .xhs-studio-secondary-tools .xhs-property-section { background:#fff; border-color:#e5e5e5; color:#202020; }
body[data-theme="redbook"] .xhs-note-studio .xhs-studio-secondary-tools .xhs-property-section > header { background:#e51b3e; padding:6px 8px; color:#fff; }
body[data-theme="redbook"] .xhs-note-studio .xhs-studio-secondary-tools .xhs-property-section > header :is(h4,span) { color:#fff; }

body[data-theme="redbook"] .memo-header[data-ui-tone="red"] { padding:16px 20px; gap:12px; }
body[data-theme="redbook"] .memo-header[data-ui-tone="red"] button.primary { background:#fff; color:#bd1834; border-color:#fff; }
body[data-theme="redbook"] .delivery-desktop-tabs[data-ui-tone="red"] { gap:4px; padding:6px; }
body[data-theme="redbook"] .delivery-desktop-tabs[data-ui-tone="red"] button { background:transparent; border-color:transparent; color:#fff; border-radius:7px; padding:7px 10px; }
body[data-theme="redbook"] .delivery-desktop-tabs[data-ui-tone="red"] button.active { background:#fff; border-color:#fff; color:#bd1834; }

@media (min-width:901px) {
  /* The full-height names workspace already owns a compact mode header. */
  body[data-theme="redbook"] .main.screen-main.with-project-context:has(.names-screen) > .tech-topbar { display:none; }
  body[data-theme="redbook"] .main.with-project-context:has(.saved-compact-screen,.smart-compact-screen) > .smart-compact-context-slot { top:calc(var(--rb-topbar-height) + 2px); }
}

@media (max-width:1180px) {
  body[data-theme="redbook"] { --rb-sidebar-width:212px; }
  body[data-theme="redbook"] .sidebar { padding-inline:10px; }
  body[data-theme="redbook"] .tech-brand strong { font-size:16px; }
  body[data-theme="redbook"] .tech-topbar-status .tech-live-status { display:none; }
  body[data-theme="redbook"] .main { padding-inline:16px; }
}
@media (max-width:760px) {
  body[data-theme="redbook"] .app-shell,body[data-theme="redbook"]:has(.xhs-reply--dual) .app-shell { display:block; }
  body[data-theme="redbook"] .sidebar { position:fixed; z-index:50; inset:0 auto 0 0; width:232px; transform:translateX(-100%); }
  body[data-theme="redbook"] .mobile-nav-open .sidebar { transform:translateX(0); }
  body[data-theme="redbook"] .tech-topbar { left:0; padding-left:120px; }
  body[data-theme="redbook"] .tech-topbar :is(small,.tech-kicker,.tech-live-status,.tech-role-badge) { display:none; }
  body[data-theme="redbook"] .mobile-nav-toggle { display:block; z-index:45; background:#191919; border-color:#66563b; color:#e3c791; }
  body[data-theme="redbook"] .mobile-nav-open .mobile-nav-backdrop { display:block; position:fixed; inset:0; z-index:49; background:#19191980; }
  body[data-theme="redbook"] .tech-login { grid-template-columns:1fr; gap:24px; padding:28px 20px; }
  body[data-theme="redbook"] .tech-login-visual { display:none; }
  body[data-theme="redbook"] .tech-login .login-panel { padding:24px; }
}
@media (prefers-reduced-motion:reduce) {
  body[data-theme="redbook"] :is(button,.ui-route-card,.management-choice) { transition:none; }
}
@media (forced-colors:active) {
  body[data-theme="redbook"] :is(.app-shell,.main,.sidebar,.tech-topbar,.panel,.ui-surface,.center-modal,.workbench-drawer,.ui-theme-switcher) { background:Canvas; color:CanvasText; border-color:ButtonBorder; box-shadow:none; }
  body[data-theme="redbook"] button { forced-color-adjust:auto; }
}
