/* UI/UX v1.0 baseline: red/white financial terminal. Business data is not styled into facts. */
:root {
  --brand-primary: #c8102e; --brand-primary-hover: #a30d25; --brand-soft: #fff1f3; --brand-line: #e6a3af;
  --surface: #fff; --app-background: #f5f6f8; --text-primary: #202733; --text-secondary: #596475; --border-default: #dce1e8;
  --state-success: #047857; --state-error: #b42336; --state-warning: #92580b;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px;
  --radius-card: 10px; --radius-control: 8px; --shadow-card: 0 2px 8px #20273305, 0 8px 28px #20273303;
  --motion-fast: 140ms; --motion-page: 180ms; --shell-sidebar: 232px; --shell-toolbar: 64px;
  --ux-ink: var(--text-primary); --ux-muted: var(--text-secondary); --ux-border: var(--border-default); --ux-soft: #f8f9fb;
  --ux-gap: 16px; --ux-inset: 16px; --ux-radius: var(--radius-card); --ux-shadow: var(--shadow-card);
  --c-primary: var(--brand-primary); --c-primary-hover: var(--brand-primary-hover); --c-primary-light: var(--brand-soft);
  --c-text-primary: var(--text-primary); --c-text-secondary: var(--text-secondary); --c-text-tertiary: var(--text-secondary);
  --c-border: var(--border-default); --c-success: var(--state-success); --c-error: var(--state-error);
}
html, body { background: var(--app-background); color: var(--text-primary); }
body { font-size: 14px; line-height: 1.6; }
.sidebar { width: var(--shell-sidebar) !important; background: var(--surface) !important; color: var(--text-primary) !important; border-right: 1px solid var(--border-default); box-shadow: none !important; z-index: 100; transition: width var(--motion-page) ease; }
.sidebar .sidebar-brand { min-height: 80px; padding: 20px 20px 16px; gap: 10px; border-bottom: 1px solid var(--border-default); background: none !important; }
.sidebar .brand-title { color: var(--text-primary) !important; font-size: 21px; letter-spacing: -.02em; }
.sidebar .brand-sub { color: var(--text-secondary) !important; font-size: 12px; }
.sidebar .brand-logo-wrap svg { box-shadow: 0 2px 6px #c8102e18 !important; }
.sidebar .sidebar-nav { padding: 16px 12px; gap: 4px; }
.sidebar .nav-item { min-height: 44px; padding: 10px 12px; margin: 0; color: #515c6c !important; background: transparent; box-shadow: none !important; border-radius: 8px; font-size: 14px; font-weight: 500; position: relative; }
.sidebar .nav-item svg { width: 18px; height: 18px; color: currentColor; }
.sidebar .nav-item:hover { background: #f3f5f7 !important; color: var(--text-primary) !important; }
.sidebar .nav-item.active { background: var(--brand-soft) !important; color: var(--brand-primary) !important; font-weight: 650; }
.sidebar .nav-item.active::before { content: ''; position: absolute; width: 3px; height: 20px; background: var(--brand-primary); left: 0; top: 12px; border-radius: 3px; }
.nav-section-label { color: var(--text-secondary); font-size: 12px; padding: 16px 12px 6px; letter-spacing: .06em; }
.sidebar-nav > div[style*="height: 1px"] { display: none; }
.sidebar .sidebar-footer { padding: 16px; background: #fafbfc !important; border-top: 1px solid var(--border-default); }
.sidebar-footer :is(.status-text,.system-status-indicator) { color: var(--text-secondary) !important; font-size: 12px; }
.workspace-toolbar { position: fixed; top: 0; left: var(--shell-sidebar); right: 0; min-height: var(--shell-toolbar); padding: 10px 24px; background: #fffffffa; border-bottom: 1px solid var(--border-default); display: flex; align-items: center; gap: 16px; z-index: 80; }
.workspace-toolbar h1 { margin: 0; font-size: 18px; line-height: 1.4; color: var(--text-primary); font-weight: 650; }
.workspace-breadcrumb { color: var(--text-secondary); font-size: 12px; line-height: 1.4; display: block; margin-bottom: 2px; }
.workspace-title-group { min-width: 0; flex: 1; }
.workspace-toolbar-actions { display: flex; align-items: center; gap: 12px; }
.workspace-engine { font-size: 12px; color: var(--text-secondary); background: #f5f7f9; border: 1px solid var(--border-default); border-radius: 6px; padding: 4px 8px; }
.shell-nav-toggle { display: inline-grid; place-items: center; border: 1px solid var(--border-default); border-radius: 8px; width: 36px; height: 36px; background: #fff; color: var(--text-secondary); cursor: pointer; flex-shrink: 0; }
.workspace-settings { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); padding: 6px 10px; border: 1px solid var(--border-default); border-radius: 8px; font-size: 13px; text-decoration: none; }
.main-content, body[data-active-page="roleplay"] .main-content, .main-content:has(#page-roleplay.active) { margin-left: var(--shell-sidebar) !important; width: calc(100% - var(--shell-sidebar)); padding: calc(var(--shell-toolbar) + 24px) 24px 24px !important; height: auto !important; max-height: none !important; min-height: 100dvh; }
.main-content > .page { max-width: 1600px; margin-inline: auto; min-width: 0; }
.main-content > .page.active { animation: workspace-enter var(--motion-page) ease-out; }
@keyframes workspace-enter { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
body[data-nav-compact="true"] { --shell-sidebar: 76px; }
body[data-nav-compact="true"] .sidebar .sidebar-brand { justify-content: center; padding: 22px 12px; }
body[data-nav-compact="true"] .sidebar :is(.brand-info,.brand-text,.brand-text-wrap,.brand-title,.brand-sub,.nav-item span,.nav-section-label,.sidebar-footer .status-text) { display: none !important; }
body[data-nav-compact="true"] .sidebar .nav-item { justify-content: center; min-height: 44px; }
body[data-nav-compact="true"] .sidebar .sidebar-nav { gap: 10px; padding: 20px 10px; }
body[data-nav-compact="true"] .sidebar .sidebar-footer { display: flex; justify-content: center; padding-inline: 10px; }
/* One component vocabulary across all business views. */
.page :is(.spotlight-header-card,.chart-product-hero,.chart-panel-card,.compare-selector-card,.holdings-card,.advisory-col,.settings-card,.calendar-card,.client-detail-panel,.radar-list-panel,.market-scope-card,.portfolio-history-panel,.directory-section-header) { background: var(--surface); border-color: var(--border-default); border-radius: var(--radius-card) !important; box-shadow: var(--shadow-card); }
.page :is(.chart-panel-card,.spotlight-header-card,.chart-product-hero,.holdings-card) { padding: 16px !important; }
.page :is(.btn,.form-input,.filter-select,.hs-dropdown-toggle,.timeframe-btn) { border-radius: var(--radius-control) !important; }
.page .btn { box-shadow: none; font-size: 13px; min-height: 36px; padding: 7px 12px; }
.page .btn-primary, .modal-overlay .btn-primary { background: var(--brand-primary) !important; border-color: var(--brand-primary) !important; color: white !important; box-shadow: 0 3px 8px #c8102e18; }
.page .btn-primary:hover, .modal-overlay .btn-primary:hover { background: var(--brand-primary-hover) !important; }
.page .btn-danger { background: #fff !important; color: var(--state-error) !important; border: 1px solid #d7a8b0 !important; box-shadow: none; }
.page :is(.btn-ghost,.btn-outline) { color: #475364; border-color: #ccd3de; background: white; }
.page :is(.form-input,.filter-select,.hs-dropdown-toggle) { min-height: 38px; background: #fff; border-color: #cbd3df; font-size: 14px; }
.page :is(.form-label,.rp-form-label) { font-size: 13px; font-weight: 600; color: #414e60; }
.page :is(.form-help,.kpi-sub,.market-indicator-note,.market-indicator-caption,.timing-context-note,.portfolio-history-note,.directory-scope-note,.text-muted) { color: var(--text-secondary) !important; }
.page .tone-good { color: var(--brand-primary) !important; }
.page .tone-bad { color: var(--state-success) !important; }
.page :is(p,span,small,div)[style*="color: #94A3B8"], .page :is(p,span,small,div)[style*="color:#94a3b8"] { color: var(--text-secondary) !important; }
.page :is(.chart-panel-header,.advisory-col-header,.settings-card-header) { border-bottom-color: #e8ebf0; }
.page :is(.chart-panel-title,.settings-title-group h3,.col-title) { font-size: 16px !important; line-height: 1.5; letter-spacing: 0; }
.page :is(.hero-product-name,.spotlight-product-name) { font-size: 22px; line-height: 1.45; }
.page :is(.chart-timeframe-selector,.segmented-control) { background: #f2f4f7; border-radius: 8px; padding: 3px; box-shadow: none; }
.page .timeframe-btn { min-height: 32px; font-size: 12px !important; padding: 6px 10px !important; box-shadow: none !important; }
.page .timeframe-btn.active { color: var(--brand-primary) !important; background: white !important; box-shadow: 0 1px 4px #20273312 !important; }
.page .hs-dropdown-menu { border: 1px solid var(--border-default); border-radius: 8px; box-shadow: 0 8px 24px #20273314; }
.page .hs-dropdown-item { font-size: 14px; }
.page .hs-dropdown-item.is-selected { background: var(--brand-soft); color: var(--brand-primary); }
.page :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible, .sidebar :is(a,button):focus-visible, .workspace-toolbar :is(a,button):focus-visible { outline: 2px solid #9e122a !important; outline-offset: 3px; }
.page table { font-size: 13px; font-variant-numeric: tabular-nums; }
.page table th { background: #f7f8fa; font-size: 12px; color: #4d586b; font-weight: 600; }
.page table :is(td,th) { border-color: #e9edf2; }
.page table tbody tr:hover { background: #fbf7f8; }
.page table tr[aria-selected="true"] > td { background: var(--brand-soft); }
.page table .dir-metric-cell { text-align: right; }
.page table .dir-metric-cell :is(strong,small,span) { font-variant-numeric: tabular-nums; }
.page :is(.table-scroll,.compare-table-scroll,.allocation-directory-scroll,.portfolio-history-table-scroll) { scrollbar-width: thin; scrollbar-color: #b8c1ce #f5f6f8; }
.ui-disclosure { border: 1px solid var(--border-default); border-radius: 8px; background: #fff; margin-block: 12px; }
.ui-disclosure > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; color: #424e60; font-size: 13px; display: list-item; list-style-position: inside; }
.ui-disclosure > .ui-disclosure-body { padding: 0 16px 16px; }
.ui-disclosure[open] > summary { color: var(--brand-primary); border-bottom: 1px solid #edf0f4; margin-bottom: 12px; }
.advanced-filter-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.advanced-filter-fields .hs-dropdown { width: 100%; min-width: 0; }
.ui-chart-loading { position: relative; }
.ui-chart-loading::after { content: '正在获取当前标的历史数据…'; position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; color: var(--text-secondary); font-size: 13px; background: #f8f9fb; border-radius: 8px; }
.benchmark-disclosure { font-size: 12px; color: var(--text-secondary); }
.benchmark-disclosure > summary { cursor: pointer; color: #4c5a70; }
.benchmark-disclosure .kpi-sub { margin-top: 8px; }
.ui-skeleton { position: relative; min-height: 100px; border: 1px solid #e6eaf0; border-radius: 8px; background: #f8f9fb; overflow: hidden; display: grid; align-content: center; gap: 12px; padding: 20px; }
.ui-skeleton::before,.ui-skeleton::after { content: ''; display: block; height: 12px; width: 65%; border-radius: 4px; background: #e8ecf1; }
.ui-skeleton::after { width: 42%; }
.ui-skeleton .ui-skeleton-caption { color: var(--text-secondary); font-size: 12px; position: relative; }
[aria-busy="true"] > .ui-skeleton { animation: skeleton-pulse 1.2s ease-in-out infinite alternate; }
@keyframes skeleton-pulse { to { opacity: .6; } }
.page [aria-busy="true"] { cursor: progress; }
.ui-empty-state { padding: 24px; text-align: center; background: #fafbfc; border: 1px dashed #d2d9e3; border-radius: 8px; }
.ui-error-state { color: #8c2235; border: 1px solid #edc4cc; background: #fff7f8; border-radius: 8px; padding: 16px; }
.ui-status-caption { color: var(--text-secondary); font-size: 12px; }
/* Product workstation. */
#page-products .spotlight-header-card { margin-bottom: 16px; }
#page-products #chartQuickChips { min-height: 96px; }
#page-products .spotlight-search-row { gap: 8px; }
#page-products .spotlight-search-box { background: #f8f9fb; border-color: #dbe1e9; border-radius: 8px; min-height: 40px; }
#page-products .spotlight-input { font-size: 14px; }
#page-products .spotlight-search-btn { min-height: 40px; }
#page-products .chart-product-hero { border-left: 3px solid var(--brand-primary); margin-bottom: 16px; }
#page-products #chartProductHero { min-height: 120px; }
#page-products .kpi-metrics-grid { gap: 12px !important; margin-bottom: 16px; }
#page-products .kpi-metric-card { min-height: 116px; padding: 12px 14px; border: 1px solid var(--border-default) !important; border-radius: 8px; box-shadow: var(--shadow-card); gap: 8px; }
#page-products .kpi-label { font-size: 12px; color: #526074; line-height: 1.6; }
#page-products .kpi-value { font-size: 24px !important; line-height: 1.3; font-weight: 650; }
#page-products #chartKpiGrid .kpi-value[title], #page-products .kpi-value.compact-bm { font-size: 13px !important; line-height: 1.65; }
#page-products .kpi-sub { font-size: 12px; line-height: 1.55; }
#page-products .charts-main-grid { gap: 16px; margin-bottom: 16px; }
#page-products .chart-panel-header { padding-bottom: 12px; margin-bottom: 12px; }
#page-products .market-scope-card { padding: 16px; }
#page-products .market-indicators-panel { gap: 16px; }
#page-products .market-indicator-card { border-radius: 8px; box-shadow: none; border-color: #e2e6ed; padding: 12px; }
#page-products .timing-signal { padding: 16px; gap: 24px; border: 1px solid #e4e8ee; background: #fafbfc; border-radius: 8px; }
#page-products .timing-score-line strong { font-size: 32px; }
#page-products .timing-contributions { background: #fff; border-color: var(--border-default); border-radius: 8px; }
#page-products .timing-fact { border-radius: 8px; border-color: var(--border-default); box-shadow: none; padding: 12px; }
#page-products .macro-context-summary { border-color: #e6a3af; background: var(--brand-soft); }
#page-products .directory-row-actions { gap: 6px; }
#page-products .directory-row-actions .btn { min-height: 32px; font-size: 12px; padding: 5px 8px; }
#page-products .directory-status-cell { color: var(--text-secondary); }
#page-products .directory-section-header { border-radius: 10px 10px 0 0 !important; }
#page-products .allocation-directory-table tr[data-directory-id] > td { padding-block: 12px; }
#page-products .allocation-directory-table .directory-timing-reason { font-size: 12px; }
#page-products .compare-timeframe-row { flex-wrap: wrap; gap: 12px; }
#page-products .compare-indicators { border-color: var(--border-default); }
#page-products .compare-table-scroll { overflow-x: auto; }
/* Advisor / customer / communication remain one linked workflow. */
#page-advisory .advisory-flow-container { gap: 16px; }
#page-advisory .advisory-col-header { min-height: 64px; padding: 16px; }
#page-advisory .col-step-num, #page-roleplay .col-step-num { width: 24px; height: 24px; font-size: 12px; color: var(--brand-primary); background: var(--brand-soft); border: 1px solid #efc7cf; box-shadow: none; }
#page-advisory .advisory-col-body { padding: 16px; }
#page-advisory .profile-header { align-items: flex-start; }
#page-advisory .client-list-item { border-radius: 8px; background: #fff; border-color: #e5e9ef; box-shadow: none; padding: 12px; }
#page-advisory .client-list-item.active { border-left: 3px solid var(--brand-primary); background: #fff8f9; }
#page-advisory .allocation-configure-button { border-radius: 8px; box-shadow: 0 4px 12px #c8102e15; min-height: 44px; }
#page-advisory :is(.allocation-plan-card,.allocation-tool,.allocation-questionnaire,.allocation-pie-stage,.script-context-card) { border-radius: 8px; border-color: var(--border-default); }
#page-advisory .allocation-tool { padding: 12px; border-left-width: 2px; }
#page-advisory .script-editable-content { font-size: 14px; line-height: 1.8; }
#page-advisory .script-editable-content :is(h2,h3) { font-size: 16px; margin-block: 16px 8px; }
#page-advisory .portfolio-history-heading h3 { font-size: 16px; }
#page-advisory .portfolio-history-stats strong { font-size: 24px; }
#page-advisory #allocationWaiting { min-height: 180px; padding: 16px; }
#page-advisory #allocationWaiting .allocation-loader-box { display: grid; gap: 12px; justify-content: stretch; width: 100%; max-width: none; min-height: 156px; border-radius: 8px; background: #f8f9fb; padding: 20px; }
#page-advisory #allocationWaiting .allocation-loader-ring { display: none; }
#page-advisory #allocationWaiting .allocation-loader-box::before,#page-advisory #allocationWaiting .allocation-loader-box::after { content: ''; height: 16px; display: block; background: #e5e9f0; border-radius: 4px; width: 80%; }
#page-advisory #allocationWaiting .allocation-loader-box::after { width: 56%; }
/* Calendar, resources and settings use the same visual grammar. */
#page-events .radar-layout-grid { gap: 16px; }
#page-events .radar-filter-card { padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-card); }
#page-events .radar-category-filter { padding: 8px; border-radius: 10px; box-shadow: var(--shadow-card); }
#page-events .category-filter-btn.active { background: var(--brand-soft); color: var(--brand-primary); }
#page-events :is(.radar-resource-card,.nearby-bank-card,.city-public-event-card) { border-radius: 8px; border-color: var(--border-default); box-shadow: none; }
#page-care .calendar-current-title { font-size: 18px !important; }
#page-care .calendar-grid { border-color: var(--border-default); border-radius: 8px; }
#page-care .calendar-day-cell { min-height: 96px; }
#page-care .calendar-day-cell.is-today { background: #fff7f8; }
#page-care :is(.task-card,.schedule-card,.care-client-card,.client-profile-card) { border-radius: 8px; box-shadow: none; border-color: var(--border-default); }
#page-settings .settings-card { margin-bottom: 16px; }
#page-settings .settings-card-header { padding: 16px 20px; min-height: 64px; }
#page-settings .settings-section-body { padding: 20px; }
#page-settings .ai-config-radio-card { border-radius: 8px; }
#page-settings .settings-data-actions { gap: 8px; }
.backup-security-note { margin-block: 12px; padding: 12px; border: 1px solid #e7d1af; background: #fffbf3; color: #80500b; border-radius: 8px; font-size: 12px; }
/* Training is dense without losing the conversation or the game canvas. */
#page-roleplay .roleplay-grid-arena { height: calc(100dvh - var(--shell-toolbar) - 48px) !important; min-height: 560px; gap: 16px; }
#page-roleplay :is(.roleplay-panel-card,.roleplay-report-card,.roleplay-chat-panel,.rp-msg-bubble,.rp-scenario-card) { border-radius: 10px !important; border-color: var(--border-default); box-shadow: var(--shadow-card); }
#page-roleplay :is(.roleplay-col-header,.roleplay-chat-header) { padding: 16px; }
#page-roleplay .rp-msg-bubble { font-size: 14px !important; line-height: 1.8 !important; }
#page-roleplay .rp-msg-wrap.user .rp-msg-bubble { background: var(--brand-primary); color: white; }
#page-roleplay .rp-coach-hint-strip { background: #fff9ed !important; border-color: #ecddbd; color: #80500b; }
#page-roleplay .rp-score-badge { background: #222b3a; border-radius: 8px; }
#page-game .pixel-map-card { border-radius: 10px; box-shadow: var(--shadow-card); }
#page-game :is(.game-story-card,.game-meta-card) { border-radius: 10px; border-color: var(--border-default); }
#page-game :is(.game-restart-btn,.game-choice-btn,.followup-choice-btn) { border-radius: 8px; }
.modal-overlay:not(#rpVideoCallModal) .modal-card { border: 1px solid #dbe0e8; border-radius: 12px !important; box-shadow: 0 18px 70px #20273333; }
.modal-overlay :is(.modal-title,.entry-title-text) { font-size: 18px; }
.modal-overlay :is(.modal-body,.entry-statement-box) { font-size: 14px; line-height: 1.75; }
.modal-overlay :is(button,input,select,textarea):focus-visible { outline: 2px solid #9e122a; outline-offset: 3px; }
.entry-compliance-overlay .entry-compliance-card { border-radius: 12px; }
.entry-compliance-overlay .entry-compliance-header { background: #fff !important; color: var(--text-primary) !important; border-top: 4px solid var(--brand-primary); }
.entry-compliance-overlay .entry-title-text { color: var(--text-primary) !important; }
.entry-statement-box { border: 1px solid #e7c7cf; background: #fff8f9; }
.app-global-footer { color: var(--text-secondary); padding-block: 24px 12px; font-size: 12px; }
.app-global-footer :is(.footer-producer-text,.footer-compliance-text) { color: var(--text-secondary) !important; }
.toast { border: 1px solid var(--border-default); border-radius: 8px; box-shadow: 0 6px 20px #2027331a; font-size: 14px; }
.toast-container { pointer-events: none; }
@media (min-width: 769px) and (max-width: 1100px) {
  .main-content, body[data-active-page="roleplay"] .main-content, .main-content:has(#page-roleplay.active) { padding: calc(var(--shell-toolbar) + 16px) 16px 16px !important; }
  #page-roleplay .roleplay-grid-arena { height: calc(100dvh - var(--shell-toolbar) - 32px) !important; }
}
@media (max-width: 768px) {
  :root,body[data-nav-compact="true"] { --shell-sidebar: 0px; --shell-toolbar: 0px; --ux-control: 44px; }
  .sidebar { width: 264px !important; z-index: 1600 !important; }
  .sidebar-overlay { z-index: 1500 !important; }
  .sidebar .sidebar-brand { min-height: 76px; }
  .sidebar .nav-item { min-height: 48px; }
  .mobile-header { box-shadow: 0 1px 6px #20273308; border-bottom: 1px solid var(--border-default); }
  .main-content,body[data-active-page="roleplay"] .main-content,.main-content:has(#page-roleplay.active) { margin-left: 0 !important; width: 100%; padding: 68px 12px calc(84px + env(safe-area-inset-bottom,0px)) !important; height: auto !important; max-height: none !important; }
  .workspace-toolbar { position: static; padding: 0 2px 14px; min-height: 54px; background: transparent; border: 0; gap: 12px; }
  .workspace-toolbar h1 { font-size: 20px; }
  .workspace-breadcrumb { font-size: 12px; }
  .workspace-toolbar .shell-nav-toggle,.workspace-engine,.workspace-settings { display: none; }
  .workspace-toolbar #workspaceDeclaration { display: inline-flex; min-height: 44px; align-items: center; background: white; }
  .page :is(.btn,.btn-sm,.timeframe-btn,.form-input,.filter-select,.hs-dropdown-toggle) { min-height: 44px !important; font-size: 14px; }
  .page :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size: 16px !important; }
  .page .btn-sm { padding: 8px 10px; }
  .page :is(.chart-panel-card,.spotlight-header-card,.chart-product-hero) { padding: 14px !important; }
  .page :is(.chart-panel-title,.col-title,.settings-title-group h3) { font-size: 16px !important; }
  .page .compare-table-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
  .page .compare-table-scroll table { min-width: 640px; }
  #page-products .directory-row-actions .btn { min-height: 44px; padding: 8px 10px; }
  #page-products .allocation-directory-table tr[data-directory-id] > td { padding-block: 0; }
  #page-products .allocation-directory-table .dir-metric-cell { text-align: left; }
  #page-products .market-indicator-card { padding: 12px; }
  #page-products .kpi-metric-card { min-height: 112px; }
  #page-products #chartQuickChips { min-height: 168px; }
  #page-products #chartProductHero { min-height: 224px; }
  #page-products .timing-signal { padding: 14px; gap: 16px; }
  #page-advisory .advisory-col-header { padding: 14px; }
  #page-advisory .advisory-col-body { padding: 14px; }
  #page-events .radar-category-filter { padding: 6px; }
  #page-events .category-filter-btn { min-height: 44px; }
  #page-care .calendar-day-cell { min-height: 82px !important; }
  #page-settings .settings-section-body { padding: 16px; }
  #page-roleplay .roleplay-grid-arena { min-height: 0; height: auto !important; }
  #page-roleplay .rp-msg-bubble { font-size: 16px !important; }
  #page-roleplay .rp-mob-tab-btn { min-height: 44px; }
  .ui-disclosure > summary { min-height: 44px; padding: 10px 12px; }
  .ui-disclosure > .ui-disclosure-body { padding: 0 12px 12px; }
  .bottom-nav { border-top: 1px solid var(--border-default); box-shadow: 0 -2px 10px #20273306; }
  .bottom-nav-item { min-height: 56px; color: var(--text-secondary); }
  .bottom-nav-item.active { color: var(--brand-primary); }
  .bottom-nav-item span { font-size: 12px; }
  .modal-overlay:not(#rpVideoCallModal) .modal-card { max-width: calc(100vw - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  .main-content > .page.active { animation: none !important; }
  .ui-skeleton, [aria-busy="true"] > .ui-skeleton { animation: none !important; }
  .sidebar,.workspace-toolbar,.page :is(button,.btn,.hs-dropdown-toggle) { transition: none !important; }
  .page :is(.btn-primary,.allocation-configure-button) { box-shadow: none !important; }
}
/* Explicit, tested contrast pairs; data meaning stays red-preference / green-deviation. */
.page :is(p,span,small,div)[style*="#94a3b8" i], .page :is(p,span,small,div)[style*="#64748b" i] { color: var(--text-secondary) !important; }
#page-products .product-quick-chip.active { background: var(--brand-primary) !important; background-image: none !important; }
#page-products .product-quick-chip.active .chip-risk-tag { background: transparent !important; color: white !important; }
#page-products .chip-risk-tag { font-size: 12px !important; }
#page-products .product-mode-tab-btn.active { background: var(--brand-primary) !important; background-image: none !important; color: white !important; }
#page-products .data-source-pill.real, #settingConnBanner, #gameRiskStatusTag, #page-care .risk-pill { color: var(--state-success) !important; }
#page-products .allocation-directory-table small { color: var(--text-secondary) !important; }
#page-advisory .client-stack-item-desc,
#page-advisory .portfolio-history-panel :is(p,small,label,.portfolio-history-empty,.portfolio-history-cash,.portfolio-history-controls),
#page-care .care-date-badge.memo,
#page-events :is(.radar-category-count,.radar-map-credit),
#page-roleplay :is(.rp-scenario-icon,.diff-name,.rp-msg-sender-name,.rp-msg-tts-btn) { color: var(--text-secondary) !important; }
#page-advisory .allocation-configure-button, #page-roleplay .btn-rp-video { background: var(--brand-primary) !important; background-image: none !important; color: white !important; }
#page-advisory .allocation-configure-button small { color: white !important; }
#page-care .care-tab-btn.active, #page-care .care-tabs .active { background: var(--brand-primary) !important; background-image: none !important; color: white !important; }
#page-care .care-view-tab-btn.active { background: var(--brand-primary) !important; background-image: none !important; color: white !important; }
#page-care .calendar-weekday-header span { color: var(--text-secondary) !important; }
#page-roleplay [data-rp-message-index] { color: var(--text-secondary) !important; }
#page-game .pixel-map-card { background: #101827 !important; background-image: none !important; color: #f8fafc; }
#page-game .zone-shortcut-pill { background: #1e293b !important; background-image: none !important; color: #f8fafc !important; border-color: #58667a; }
#page-game .zone-shortcut-pill span { font-size: 12px !important; color: #f8fafc !important; }
#page-game .pixel-action-btn { background: var(--brand-primary) !important; background-image: none !important; color: white !important; }
@media (min-width:769px) and (max-width:1100px) { body:not([data-nav-compact]) { --shell-sidebar:76px; } }
