:root {
  --bg: #f4f6f7;
  --surface: #ffffff;
  --surface-subtle: #f8fafb;
  --text: #202426;
  --muted: #747b7f;
  --line: #dfe3e5;
  --line-strong: #cbd2d5;
  --accent: #ff5364;
  --accent-dark: #dc3f51;
  --accent-soft: #fff0f2;
  --green: #178a72;
  --green-soft: #e9f7f3;
  --amber: #9a640f;
  --amber-soft: #fff5df;
  --red: #a52e3d;
  --red-soft: #fff0f1;
  --ink: #252a2d;
  --lilac: #8275c8;
  --lilac-soft: #f3f0ff;
  --radius: 6px;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--text);
}

* { box-sizing: border-box; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
body { margin: 0; background: var(--bg); background-image: radial-gradient(circle at 10% 10%, rgba(255,145,168,.08) 0 1px, transparent 1.5px), radial-gradient(circle at 85% 18%, rgba(130,117,200,.08) 0 1px, transparent 1.5px); background-size: 28px 28px, 36px 36px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .66; }

.topbar {
  min-height: 72px;
  padding: 12px max(24px, calc((100vw - 1440px) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 6px; background: var(--accent); color: white; display: grid; place-items: center; font-size: 21px; font-weight: 800; flex: none; }
.brand h1 { margin: 0; font-size: 18px; line-height: 1.2; letter-spacing: 0; }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px 18px; }
.topbar { position: relative; }
.primary-toolbar { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.database-health { display: grid; grid-template-columns: 8px auto; column-gap: 7px; align-items: center; min-width: 178px; color: var(--muted); }
.database-health > span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); grid-row: span 2; }
.database-health strong { color: var(--text); font-size: 11px; line-height: 1.2; }
.database-health small { font-size: 9px; line-height: 1.2; }
.data-tools-menu { position: absolute; z-index: 20; top: calc(100% + 8px); right: max(24px, calc((100vw - 1440px) / 2)); width: 290px; padding: 12px; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: 0 16px 36px rgba(32,56,92,.16); }
.data-tools-menu > div { display: grid; gap: 3px; padding: 2px 3px 5px; }
.data-tools-menu > div strong { color: var(--text); font-size: 12px; }
.data-tools-menu > div small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.browser-picker { display: grid; grid-template-columns: auto 176px; align-items: center; gap: 2px 8px; color: var(--muted); font-size: 10px; }
.browser-picker > span { grid-row: 1; white-space: nowrap; }
.browser-picker select { grid-column: 2; grid-row: 1; width: 176px; height: 32px; padding: 0 28px 0 9px; font-size: 11px; }
.browser-picker small { grid-column: 2; color: var(--muted); font-size: 9px; line-height: 1.2; }
.browser-login-button { min-height: 32px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 4px; background: white; color: #41484b; font-size: 11px; white-space: nowrap; }
.browser-login-button:hover { border-color: var(--green); color: var(--green); }
.leta-session-tools { display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 7px; }
.leta-session-tools small { grid-column: 1 / -1; max-width: 190px; color: var(--muted); font-size: 9px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leta-session-tools.saved small { color: var(--green); }
.leta-session-delete { min-height: 32px; padding: 0 3px; border: 0; background: transparent; color: var(--muted); font-size: 10px; }
.leta-session-delete:hover { color: var(--red); }
.local-status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.local-status span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.local-status.active { color: var(--green); }
.local-status.warning { color: var(--red); }
.local-status.warning span { background: var(--red); }
.text-button { border: 0; background: transparent; color: #50575a; padding: 7px 0; font-size: 12px; }
.text-button:hover, .link-button:hover { color: var(--accent-dark); }

.workspace {
  max-width: 1440px;
  margin: 28px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
  gap: 24px;
  align-items: start;
}
.workspace:not(.profit-mode) { grid-template-columns: minmax(0, 1fr); }
.mode-navigation { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mode-tab { min-height: 62px; padding: 10px 14px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); text-align: left; box-shadow: 0 1px 2px rgba(25,31,34,.03); }
.mode-tab:hover { border-color: var(--line-strong); }
.mode-tab.active { border-color: var(--ink); box-shadow: inset 0 2px var(--ink), 0 3px 12px rgba(25,31,34,.06); }
.mode-tab-index { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 4px; background: #eef1f2; color: var(--muted); font-size: 10px; font-weight: 800; flex: none; }
.mode-tab.active .mode-tab-index { background: var(--ink); color: white; }
.mode-tab strong, .mode-tab small { display: block; }
.mode-tab strong { font-size: 12px; }
.mode-emoji { display: inline-block; margin-right: 5px; font-size: 13px; line-height: 1; vertical-align: -1px; }
.mode-tab small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.button-emoji { display: inline-block; font-size: 1em; line-height: 1; vertical-align: -1px; }
.workflow-rail { grid-column: 1 / -1; min-height: 42px; padding: 7px 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-subtle); }
.workflow-rail > i { height: 1px; min-width: 18px; flex: 1; background: var(--line-strong); }
.workflow-step { min-width: 0; display: flex; align-items: center; gap: 6px; color: #8a9296; font-size: 9px; white-space: nowrap; }
.workflow-step b { width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: white; color: inherit; font-size: 9px; flex: none; }
.workflow-step.active { color: var(--ink); font-weight: 800; }
.workflow-step.active b { border-color: var(--ink); background: var(--ink); color: white; }
.workflow-step.completed { color: var(--green); }
.workflow-step.completed b { border-color: #b7ddd3; background: var(--green-soft); color: var(--green); }
.research-layout { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr); gap: 18px; }
.research-source-panel, .research-result-panel { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-subtle); }
.research-source-panel { display: grid; align-content: start; gap: 12px; border-left: 3px solid var(--accent); }
.research-source-panel textarea { min-height: 132px; resize: vertical; }
.research-presets { display: flex; flex-wrap: wrap; gap: 5px 12px; }
.research-presets .text-button { padding: 0; font-size: 10px; color: var(--accent-dark); }
.research-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.research-keywords-block { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.mini-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 9px; }
.mini-heading strong { font-size: 11px; }
.mini-heading small { color: var(--muted); font-size: 9px; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 6px; }
.keyword-list span { padding: 5px 8px; border: 1px solid #cbd9f7; border-radius: 4px; background: #f3f6ff; color: #3355a5; font-size: 10px; }
.empty-state { color: var(--muted); font-size: 10px; }
.research-save-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, .6fr) auto; align-items: end; gap: 10px; margin-top: 16px; }
.research-save-row .primary-button { min-height: 36px; white-space: nowrap; }
.database-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.file-button { position: relative; overflow: hidden; display: inline-flex; align-items: center; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.database-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 3px 0 20px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-subtle); }
.database-summary > div { min-width: 0; padding: 13px 15px; display: grid; gap: 4px; }
.database-summary > div + div { border-left: 1px solid var(--line); }
.database-summary span { color: var(--muted); font-size: 10px; }
.database-summary strong { color: var(--text); font-size: 22px; line-height: 1; }
.database-summary small { color: var(--muted); font-size: 9px; }
.heat-insight-panel { margin: 18px 0 20px; padding: 18px; border: 1px solid #ddd9f2; border-radius: 8px; background: linear-gradient(135deg, #fff 0%, #fbf9ff 58%, #fff6f8 100%); box-shadow: 0 10px 26px rgba(107,91,163,.08); }
.insight-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.insight-heading h3 { margin: 5px 0 0; font-size: 16px; }
.insight-source-note { color: var(--lilac); font-size: 10px; }
.heat-insight-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border: 1px solid #e8e3f6; border-radius: 6px; background: rgba(255,255,255,.72); }
.heat-insight-summary > div { padding: 11px 13px; display: grid; gap: 4px; }
.heat-insight-summary > div + div { border-left: 1px solid #e8e3f6; }
.heat-insight-summary span, .heat-insight-summary small { color: var(--muted); font-size: 9px; }
.heat-insight-summary strong { font-size: 16px; color: var(--text); }
.heat-insight-dashboard { display: grid; grid-template-columns: minmax(430px, 540px) minmax(280px, 1fr); align-items: start; gap: 12px; margin-top: 12px; }
.heat-insight-side { display: grid; gap: 12px; }
.heat-insight-block { padding: 13px; border: 1px solid #e8e3f6; border-radius: 6px; background: rgba(255,255,255,.76); }
.insight-ranking, .heat-trend-chart { display: grid; gap: 9px; }
.insight-rank-row, .trend-row { display: grid; grid-template-columns: 18px minmax(82px, .7fr) minmax(70px, 1fr) auto; align-items: center; gap: 8px; font-size: 10px; }
.insight-rank-row b { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--lilac-soft); color: var(--lilac); font-size: 9px; }
.insight-rank-row i, .trend-row i { height: 6px; overflow: hidden; border-radius: 4px; background: #eceaf5; }
.insight-rank-row em, .trend-row em { display: block; height: 100%; border-radius: inherit; background: var(--lilac); }
.insight-rank-row strong, .trend-row strong { font-size: 9px; color: var(--text); white-space: nowrap; }
.trend-row { grid-template-columns: 42px minmax(70px, 1fr) 24px auto; }
.trend-row span, .trend-row small { color: var(--muted); font-size: 9px; }
.heat-research-report { margin-top: 12px; padding: 12px 13px; border-top: 1px dashed #d9d3ef; color: var(--muted); font-size: 10px; line-height: 1.6; }
.heat-research-report > div { display: flex; align-items: center; gap: 10px; }
.heat-research-report > div strong { color: var(--text); font-size: 11px; }
.heat-research-report p { margin: 6px 0 3px; color: var(--text); }
.heat-research-report small { font-size: 9px; }
.research-evidence-panel { margin: 0 0 20px; padding: 16px; border: 1px solid #dce4f1; border-radius: 8px; background: rgba(250, 252, 255, .82); }
.research-evidence-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.research-evidence-heading h3 { margin: 5px 0 4px; font-size: 15px; }
.research-evidence-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.evidence-lock-note { padding: 5px 8px; border: 1px solid #eadcae; border-radius: 4px; background: #fff9e8; color: #8a6510; font-size: 9px; white-space: nowrap; }
.research-evidence-tabs { margin: 14px 0 12px; display: flex; gap: 3px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.research-evidence-tabs button { min-height: 32px; padding: 0 11px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 10px; white-space: nowrap; }
.research-evidence-tabs button.active { border-bottom-color: var(--accent); color: var(--accent-dark); font-weight: 800; }
.research-evidence-content { min-height: 180px; }
.evidence-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.evidence-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 10px; }
.evidence-table th { padding: 9px 10px; background: var(--surface-subtle); color: var(--muted); text-align: left; font-size: 9px; }
.evidence-table td { padding: 10px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.evidence-table td strong, .evidence-table td small { display: block; }
.evidence-table td small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.verification-list { display: grid; gap: 7px; }
.verification-list article { padding: 10px 12px; display: grid; grid-template-columns: 24px 1fr; gap: 10px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.verification-list article > b { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--amber-soft); color: var(--amber); font-size: 9px; }
.verification-list article > div { display: grid; gap: 3px; }
.verification-list span, .verification-list small { color: var(--muted); font-size: 9px; }
.query-pack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.query-pack-grid article { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.query-pack-grid article > div:first-child { display: grid; gap: 3px; }
.query-pack-grid small, .evidence-footnote { color: var(--muted); font-size: 9px; }
.query-chip-list { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.query-chip-list span { padding: 4px 6px; border: 1px solid #cbd9f7; border-radius: 3px; background: #f3f6ff; color: #3355a5; font-size: 9px; }
.evidence-footnote { margin: 10px 0 0; line-height: 1.55; }
.schedule-rule { margin-bottom: 9px; padding: 10px 12px; display: grid; gap: 4px; border-left: 3px solid var(--accent); background: var(--accent-soft); font-size: 10px; }
.schedule-rule span { color: var(--muted); font-size: 9px; }
.schedule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.schedule-grid article { padding: 11px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.schedule-grid article > span { color: var(--accent-dark); font-size: 9px; font-weight: 800; }
.schedule-grid small { color: var(--muted); font-size: 8px; }
.reasoning-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.reasoning-columns article { padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.reasoning-columns article > strong { color: var(--accent-dark); font-size: 11px; }
.reasoning-columns p { margin: 8px 0 0; font-size: 9px; line-height: 1.55; }
.reasoning-columns small { display: block; margin-top: 8px; color: var(--muted); font-size: 8px; }
.heat-market-terminal {
  width: 100%;
  max-width: 540px;
  overflow: hidden;
  border: 1px solid #242d39;
  border-radius: 8px;
  background: #080b10;
  color: #dce5ee;
  box-shadow: 0 16px 34px rgba(5, 9, 15, .24), inset 0 1px rgba(255, 255, 255, .035);
  font-family: "Cascadia Mono", "Consolas", "Microsoft YaHei", monospace;
}
.heat-market-header { min-height: 48px; padding: 8px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #202833; background: #0c1118; }
.heat-market-title { display: flex; align-items: center; gap: 9px; }
.heat-market-title > div { display: grid; gap: 3px; }
.heat-market-title strong { color: #f3f7fa; font-size: 11px; letter-spacing: .08em; }
.heat-market-title small { color: #6f7d8b; font-size: 8px; }
.heat-market-controls { display: flex; align-items: center; gap: 7px; }
.heat-market-count-control { height: 29px; padding: 2px 4px 2px 8px; display: flex; align-items: center; gap: 6px; border: 1px solid #293440; border-radius: 4px; background: #0a0f15; color: #72808e; font-size: 8px; font-weight: 700; }
.heat-market-count-control select { height: 23px; min-width: 72px; padding: 0 19px 0 6px; border: 0; border-radius: 3px; outline: 0; background-color: #18212c; color: #edf3f8; font: 700 8px/1 "Cascadia Mono", "Consolas", sans-serif; }
.market-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #24d88a; box-shadow: 0 0 0 4px rgba(36, 216, 138, .10), 0 0 12px rgba(36, 216, 138, .48); }
.heat-market-range { display: flex; padding: 2px; border: 1px solid #293440; border-radius: 4px; background: #0a0f15; }
.heat-market-range button { min-width: 32px; height: 23px; padding: 0 5px; border: 0; border-radius: 3px; background: transparent; color: #667482; font-size: 8px; font-weight: 800; }
.heat-market-range button:hover { color: #d7e0e9; }
.heat-market-range button.active { background: #24303e; color: #f4f8fb; box-shadow: inset 0 1px rgba(255, 255, 255, .06); }
.heat-market-body { display: grid; grid-template-columns: minmax(0, 1fr) 118px; min-height: 310px; }
.heat-market-chart { min-width: 0; padding: 5px 3px 0 7px; background-color: #080b10; background-image: linear-gradient(rgba(84, 101, 119, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(84, 101, 119, .055) 1px, transparent 1px); background-size: 38px 32px; }
.heat-market-chart svg { width: 100%; height: 300px; display: block; overflow: visible; }
.heat-market-legend { min-width: 0; padding: 13px 10px; display: grid; align-content: start; gap: 8px; overflow: hidden; border-left: 1px solid #1c242e; background: #0a0f15; }
.heat-market-legend span { min-width: 0; display: flex; align-items: center; gap: 7px; overflow: hidden; color: #aab5c0; font-size: 8px; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; }
.heat-market-legend i { width: 13px; height: 3px; flex: 0 0 auto; border-radius: 2px; background: var(--legend-color); box-shadow: 0 0 6px color-mix(in srgb, var(--legend-color) 48%, transparent); }
.heat-market-legend small { color: #687684; font-size: 8px; }
.market-grid line { stroke: #202833; stroke-width: 1; vector-effect: non-scaling-stroke; }
.market-grid text, .market-dates text { fill: #586573; font-size: 8px; font-family: inherit; }
.market-line { fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 3px var(--market-color)); animation: market-draw .7s var(--ease-out) both; }
.market-points circle { stroke: #080b10; stroke-width: 2; vector-effect: non-scaling-stroke; transition: r .16s ease; }
.market-points circle:hover { r: 4px; }
.heat-market-empty { min-height: 300px; display: grid; place-content: center; justify-items: center; gap: 7px; color: #687684; text-align: center; }
.heat-market-empty strong { color: #b7c2cc; font-size: 12px; }
.heat-market-empty span { max-width: 360px; font-size: 9px; line-height: 1.5; }
.heat-market-footer { min-height: 30px; padding: 0 11px; display: flex; align-items: center; gap: 12px; border-top: 1px solid #1c242e; background: #0c1118; color: #52606d; font-size: 8px; }
.heat-market-footer span:last-child { margin-left: auto; color: #71808e; }
@keyframes market-draw { from { stroke-dasharray: 1200; stroke-dashoffset: 1200; } to { stroke-dasharray: 1200; stroke-dashoffset: 0; } }
@keyframes market-fade { from { opacity: 0; } to { opacity: 1; } }
.database-filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.database-filter-bar .search-field { flex: 1; }
.database-filter-bar select { min-width: 112px; height: 34px; padding: 0 24px 0 9px; font-size: 10px; }
.database-filter-bar .text-button { padding: 7px 3px; font-size: 10px; white-space: nowrap; }
.database-table-wrap { position: relative; min-height: 280px; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.database-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 11px; }
.database-table th { padding: 10px 12px; color: var(--muted); background: var(--surface-subtle); font-size: 9px; font-weight: 700; text-align: left; white-space: nowrap; }
.database-table td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.database-table td strong, .database-table td small { display: block; }
.database-table td strong { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.database-table td small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.heat-status, .confidence-tag, .data-status-tag { display: inline-flex; align-items: center; width: fit-content; padding: 4px 7px; border-radius: 3px; font-size: 9px; font-weight: 700; }
.heat-status.rising { background: var(--green-soft); color: var(--green); }
.heat-status.steady { background: var(--accent-soft); color: var(--accent-dark); }
.heat-status.risk { background: var(--amber-soft); color: var(--amber); }
.confidence-tag.high { background: var(--green-soft); color: var(--green); }
.confidence-tag.medium { background: var(--accent-soft); color: var(--accent-dark); }
.confidence-tag.low { background: var(--amber-soft); color: var(--amber); }
.data-status-tag.formal { background: var(--green-soft); color: var(--green); }
.data-status-tag.temporary { background: var(--accent-soft); color: var(--accent-dark); }
.data-status-tag.pending_verification { background: var(--amber-soft); color: var(--amber); }
.data-status-tag.demo { background: #171d28; color: #7ee6c0; }
.data-status-tag.editorial_judgment { background: #f3edff; color: #7655a8; }
.data-status-tag.collection_plan { background: #eaf5ff; color: #3074a6; }
.data-status-tag.forbidden_example { background: var(--red-soft); color: var(--red); }
.table-actions { display: flex; gap: 6px; }
.table-actions button { border: 0; background: transparent; color: var(--accent-dark); font-size: 10px; }
.table-actions button:hover { text-decoration: underline; }
.database-empty-state, .radar-empty { min-height: 240px; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); text-align: center; }
.database-empty-state strong, .radar-empty strong { color: var(--text); font-size: 13px; }
.database-empty-state span, .radar-empty span { font-size: 10px; }
.heat-radar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.heat-radar-toolbar select { min-width: 120px; height: 34px; padding: 0 24px 0 9px; font-size: 10px; }
.heat-legend { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; margin-left: 8px; }
.status-dot:first-child { margin-left: 0; }
.status-dot.rising { background: var(--green); }
.status-dot.steady { background: var(--accent); }
.status-dot.risk { background: var(--amber); }
.heat-radar-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-subtle); }
.heat-radar-summary > div { padding: 12px 14px; display: grid; gap: 4px; }
.heat-radar-summary > div + div { border-left: 1px solid var(--line); }
.heat-radar-summary span { color: var(--muted); font-size: 10px; }
.heat-radar-summary strong { font-size: 19px; }
.heat-radar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.heat-card { padding: 15px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 5px; background: var(--surface); }
.heat-card.rising { border-top-color: var(--green); }
.heat-card.risk { border-top-color: var(--amber); }
.heat-card-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.heat-card h3 { margin: 8px 0 0; font-size: 15px; }
.heat-score { color: var(--text); font-size: 24px; line-height: 1; }
.heat-score small { color: var(--muted); font-size: 9px; font-weight: 500; }
.heat-card > p { min-height: 32px; margin: 14px 0 10px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.heat-meter { height: 5px; overflow: hidden; border-radius: 3px; background: #edf1f6; }
.heat-meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.heat-card.rising .heat-meter i { background: var(--green); }
.heat-card.risk .heat-meter i { background: var(--amber); }
.heat-card-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 9px; }
.heat-evidence { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.heat-evidence strong { color: var(--text); margin-right: 2px; }
.heat-evidence span { padding: 3px 5px; border: 1px solid #e6d6af; border-radius: 3px; background: #fffaf0; color: var(--amber); }
.heat-evidence span.positive { border-color: #c3e5dc; background: var(--green-soft); color: var(--green); }
.observation-dialog { width: min(760px, calc(100vw - 28px)); max-width: 760px; padding: 0; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 24px 70px rgba(23,46,80,.24); }
.observation-dialog::backdrop { background: rgba(29,42,61,.32); }
.observation-dialog-body { padding: 20px 24px 10px; }
.observation-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 24px 20px; border-top: 1px solid var(--line); }
.form-column, .result-column { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(25,31,34,.04), 0 8px 24px rgba(25,31,34,.035); }
.form-column { overflow: hidden; }
.form-section { padding: 28px 30px 30px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 24px; }
.section-heading-actions { align-items: center; justify-content: space-between; gap: 20px; }
.section-heading-copy { display: flex; gap: 14px; align-items: flex-start; }
.section-number { color: var(--accent); font-weight: 800; font-size: 12px; padding-top: 5px; flex: none; }
.section-heading h2 { margin: 0; font-size: 18px; letter-spacing: 0; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.section-kicker { margin-bottom: 5px; color: var(--accent-dark); font-size: 10px; font-weight: 800; text-transform: uppercase; }

.deep-search-section {
  position: relative;
  overflow: hidden;
  background: #fff;
}
.deep-search-section::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--ink); opacity: .92; }
.deep-search-heading { margin-bottom: 20px; }
.deep-search-heading .section-number { min-width: 30px; color: white; background: var(--ink); border-radius: 3px; padding: 5px 6px; text-align: center; line-height: 1; }
#deepSearchButton { min-height: 38px; padding: 0 15px; background: var(--ink); border-color: var(--ink); box-shadow: 0 1px 2px rgba(25,31,34,.14); }
#deepSearchButton:hover { background: #111517; border-color: #111517; }
.deep-search-input-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 270px); align-items: start; gap: 12px; }
.deep-search-settings { min-width: 0; display: grid; gap: 10px; }
.deep-match-mode { min-width: 0; margin: 0; padding: 13px; border: 1px solid #e1e5e7; border-radius: 4px; background: #fafbfb; }
.deep-match-mode legend { padding: 0 4px; color: #4f575b; font-size: 10px; font-weight: 800; }
.deep-match-mode > p { margin: 9px 1px 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.deep-mode-segments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 4px; background: #eef1f2; }
.deep-mode-segments label { min-width: 0; cursor: pointer; }
.deep-mode-segments input { position: absolute; opacity: 0; pointer-events: none; }
.deep-mode-segments span { min-height: 42px; padding: 6px 5px; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 3px; color: var(--muted); text-align: center; }
.deep-mode-segments strong { font-size: 10px; }
.deep-mode-segments small { font-size: 8px; }
.deep-mode-segments input:checked + span { background: white; color: var(--ink); box-shadow: 0 1px 3px rgba(25,31,34,.12); }
.deep-source-card { min-width: 0; min-height: 76px; padding: 14px 15px 14px 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 4px; background: white; box-shadow: 0 1px 2px rgba(25,31,34,.03); }
.deep-source-card-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.deep-source-card-copy strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px; line-height: 1.45; }
.deep-source-card-copy small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.deep-search-option { min-height: 76px; padding: 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; align-self: start; gap: 10px; border: 1px solid #e7eaec; border-radius: 4px; background: #fafbfb; cursor: pointer; }
.deep-search-option > input { position: absolute; opacity: 0; pointer-events: none; }
.deep-search-option > input:checked + .toggle-track { background: var(--green); }
.deep-search-option > input:checked + .toggle-track::after { transform: translateX(16px); }
.deep-search-option > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.deep-search-option strong { font-size: 11px; }
.deep-search-option small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.deep-ai-settings { min-width: 0; border: 1px solid #e1e5e7; border-radius: 4px; background: #fafbfb; overflow: hidden; }
.deep-ai-settings .deep-search-option { min-height: 72px; border: 0; border-radius: 0; background: transparent; }
.deep-ai-fields { padding: 0 13px 13px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; border-top: 1px solid #e7eaec; }
.deep-ai-fields .field { padding-top: 11px; }
.deep-ai-fields input { height: 36px; font-size: 10px; }
.deep-ai-actions { display: grid; gap: 8px; }
.deep-ai-button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.deep-ai-button-row #deepAiTestButton { margin-left: auto; }
.deep-ai-delete-button { min-height: 34px; padding: 0 4px; color: var(--red); font-size: 10px; }
.deep-ai-actions small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.deep-ai-settings.ready { border-color: #b7ddd3; background: var(--green-soft); }
.deep-ai-settings.error { border-color: #ffcbd0; background: var(--red-soft); }
.deep-query-chip.ai { border-color: #cfd7ee; background: #f4f6fc; color: #405078; }
.deep-query-chip.ai b { background: #52658f; }
.deep-source-workbench { min-width: 0; padding: 16px 16px 16px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 4px; background: #fff; box-shadow: 0 1px 2px rgba(25,31,34,.035); }
.deep-source-editor { min-width: 0; display: grid; gap: 12px; }
.deep-source-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.deep-source-editor-heading h3 { margin: 5px 0 0; font-size: 14px; }
.deep-source-url-field { gap: 6px; }
.deep-source-fields { min-width: 0; display: grid; gap: 10px; }
.deep-source-url-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: end; }
.deep-source-url-row > * { min-width: 0; }
.deep-source-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.deep-source-preview { min-width: 0; padding: 12px; display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; align-items: center; border: 1px solid #e7eaec; border-radius: 4px; background: var(--surface-subtle); }
.deep-source-image { position: relative; width: 58px; height: 58px; overflow: hidden; display: grid; place-items: center; border-radius: 4px; background: var(--accent-soft); color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.deep-source-image > span { grid-area: 1 / 1; }
.deep-source-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.deep-source-details { min-width: 0; display: grid; gap: 5px; }
.deep-source-details strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px; line-height: 1.45; }
.deep-source-details span, .deep-source-details small { color: var(--muted); font-size: 10px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deep-source-state { min-width: max-content; padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 9px; font-weight: 700; }
.deep-source-state.success, .deep-source-state.ready { border-color: #b7ddd3; background: var(--green-soft); color: var(--green); }
.deep-source-state.loading { border-color: #f1ddb0; background: var(--amber-soft); color: var(--amber); }
.deep-source-state.error { border-color: #ffcbd0; background: var(--red-soft); color: var(--red); }
.deep-source-manual-grid { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.deep-query-panel { margin-top: 14px; border: 1px solid var(--line); border-radius: 4px; background: white; }
.deep-panel-title { min-height: 47px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.deep-panel-title > div { min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; }
.deep-panel-title strong { font-size: 11px; }
.deep-panel-title span { color: var(--muted); font-size: 9px; }
.deep-limit-note { white-space: nowrap; }
.deep-query-list { min-height: 50px; padding: 11px 13px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.deep-query-chip { min-height: 28px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface-subtle); color: #4d5559; font-size: 10px; }
.deep-query-chip b { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 2px; background: var(--ink); color: white; font-size: 8px; }
.deep-query-chip.complete { border-color: #b7ddd3; background: var(--green-soft); color: var(--green); }
.deep-query-chip.cached { border-color: #ddd2aa; background: #fffaf0; color: #846315; }
.deep-query-empty { color: var(--muted); font-size: 10px; }
.deep-progress { margin-top: 14px; padding: 12px 13px; border: 1px solid #f1ddb0; border-radius: 4px; background: var(--amber-soft); }
.deep-progress-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.deep-progress-copy strong { font-size: 11px; }
.deep-progress-copy span { color: #77500c; font-size: 9px; text-align: right; }
.deep-progress-track { height: 4px; margin-top: 9px; overflow: hidden; border-radius: 2px; background: rgba(154,100,15,.15); }
.deep-progress-track span { display: block; width: 18%; height: 100%; border-radius: inherit; background: var(--amber); transition: width .25s ease; }
.deep-progress.running .deep-progress-track span { width: 55%; }
.deep-results { margin-top: 14px; display: grid; gap: 10px; }
.deep-empty-state { min-height: 104px; }
.deep-result-summary { padding: 12px 14px 12px 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 4px; background: #fff; }
.deep-result-summary strong { display: block; font-size: 12px; }
.deep-result-summary span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.deep-result-summary b { color: var(--green); font-size: 15px; font-variant-numeric: tabular-nums; }
.deep-candidate { border: 1px solid var(--line); border-radius: 4px; background: white; overflow: hidden; transition: border-color .15s; }
.deep-candidate:hover { border-color: var(--line-strong); }
.deep-candidate:first-of-type, .deep-candidate.top-candidate { border-color: #b9d9d1; box-shadow: 0 3px 12px rgba(23,138,114,.07); }
.deep-candidate-main { padding: 13px 14px; display: grid; grid-template-columns: 28px 58px minmax(0, 1fr) auto; gap: 11px; align-items: center; }
.deep-candidate-copy { min-width: 0; }
.deep-candidate-copy > strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.5; }
.deep-candidate-copy > strong a { color: inherit; text-decoration: none; }
.deep-candidate-copy > strong a:hover { color: var(--accent-dark); text-decoration: underline; }
.deep-candidate-meta { margin-top: 6px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 9px; }
.deep-candidate-meta .match-badge { border: 1px solid #e1e5e7; background: #f2f4f5; color: #566065; }
.deep-candidate-meta .match-badge.high { border-color: #b7ddd3; background: var(--green-soft); color: var(--green); }
.deep-candidate-meta .match-badge.suspected { border-color: #ead7ac; background: var(--amber-soft); color: var(--amber); }
.decision-badge { padding: 3px 6px; border-radius: 3px; font-weight: 800; }
.decision-badge.ready { border: 1px solid #b7ddd3; background: var(--green-soft); color: var(--green); }
.decision-badge.review { border: 1px solid #ead7ac; background: var(--amber-soft); color: var(--amber); }
.decision-badge.blocked { border: 1px solid #ffcbd0; background: var(--red-soft); color: var(--red); }
.deep-candidate-warning { display: block; margin-top: 6px; color: #6d5759; font-size: 9px; line-height: 1.45; }
.deep-candidate-price { text-align: right; white-space: nowrap; }
.deep-candidate-price strong { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.deep-candidate-price span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.deep-score-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.deep-score-grid > div { min-width: 0; padding: 10px 14px; }
.deep-score-grid > div + div { border-left: 1px solid var(--line); }
.deep-score-grid span { color: var(--muted); font-size: 9px; }
.deep-score-grid strong { display: block; margin-top: 4px; font-size: 11px; }
.deep-score-grid strong.good { color: var(--green); }
.deep-score-grid strong.warn { color: var(--amber); }
.deep-score-grid strong.blocked { color: var(--red); }
.deep-score-grid strong.muted { color: var(--muted); }
.candidate-evidence-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.candidate-evidence-grid > div { min-width: 0; padding: 9px 12px; }
.candidate-evidence-grid > div + div { border-left: 1px solid var(--line); }
.candidate-evidence-grid span { display: block; color: var(--muted); font-size: 8px; }
.candidate-evidence-grid strong { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.candidate-evidence-grid strong.good { color: var(--green); }
.candidate-evidence-grid strong.review { color: var(--amber); }
.candidate-evidence-grid strong.muted { color: var(--muted); }
.candidate-evidence-grid .visual-relation-note { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; white-space: normal; }
.deep-query-origin { padding: 10px 14px; color: var(--muted); background: #fbfcfc; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.deep-query-origin b { color: #555d61; }
.deep-candidate-actions { padding: 0 14px 12px; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.deep-candidate-actions .candidate-action.confirm { background: var(--ink); border-color: var(--ink); color: #fff; }
.deep-candidate-actions .candidate-action.confirm:hover { background: #111517; border-color: #111517; }

.batch-section { background: #fcfdfd; }
.batch-heading { margin-bottom: 20px; }
.batch-heading-actions, .batch-source-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.icon-button-label { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.icon-button-label svg, .dialog-close-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#favoriteCount { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--surface-subtle); color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.radar-entry-mode { margin-bottom: 12px; padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.radar-entry-mode-copy { min-width: 0; display: grid; gap: 4px; }
.radar-entry-mode-copy .section-kicker { margin: 0; color: var(--accent-dark); font-size: 9px; }
.radar-entry-mode-copy strong { font-size: 12px; }
.radar-entry-mode-copy small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.radar-entry-mode-tabs { min-width: 0; display: flex; align-items: stretch; gap: 6px; }
.radar-entry-tab { min-width: 128px; min-height: 52px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-subtle); color: var(--text); text-align: left; }
.radar-entry-tab:hover { border-color: var(--line-strong); background: #fff; }
.radar-entry-tab.active { border-color: var(--ink); background: var(--ink); color: #fff; box-shadow: 0 2px 8px rgba(25,31,34,.12); }
.radar-entry-tab-secondary.active { border-color: #9a640f; background: var(--amber); }
.radar-entry-tab-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 4px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 800; flex: none; }
.radar-entry-tab-icon.leta { background: #fff5df; color: var(--amber); }
.radar-entry-tab.active .radar-entry-tab-icon { background: rgba(255,255,255,.16); color: #fff; }
.radar-entry-tab span:last-child { min-width: 0; display: grid; gap: 3px; }
.radar-entry-tab strong { font-size: 10px; white-space: nowrap; }
.radar-entry-tab small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.radar-entry-tab.active small { color: rgba(255,255,255,.72); }
.radar-entry-hint { margin-bottom: 12px; padding: 9px 12px; display: flex; align-items: baseline; gap: 8px; border: 1px solid #cce8df; border-left: 3px solid var(--green); border-radius: 4px; background: var(--green-soft); color: #176d5f; font-size: 10px; line-height: 1.45; }
.radar-entry-hint strong { font-size: 10px; white-space: nowrap; }
.radar-entry-hint span { color: #4d756d; }
.radar-query-package { margin-top: 12px; padding: 13px 14px; border: 1px solid #cce8df; border-radius: 4px; background: var(--green-soft); }
.radar-query-package > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.radar-query-package strong { color: #176d5f; font-size: 11px; }
.radar-query-package span { color: #4d756d; font-size: 9px; }
.radar-query-package .deep-query-list { margin-top: 9px; }
.radar-single-heading { padding: 14px 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-subtle); }
.radar-single-heading strong { font-size: 12px; }
.radar-single-heading span { color: var(--muted); font-size: 9px; }
.radar-single-card { padding: 14px 16px; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 4px; background: white; }
.radar-single-card + .radar-single-card { margin-top: 8px; }
.radar-single-copy { min-width: 0; }
.radar-single-copy strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; line-height: 1.45; }
.radar-single-copy a { color: inherit; text-decoration: none; }
.radar-single-copy a:hover { color: var(--accent-dark); text-decoration: underline; }
.radar-single-copy span { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.radar-single-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
#batchPairSourcePanel { transition: border-color .15s ease, box-shadow .15s ease; }
#batchPairSourcePanel[data-radar-entry-panel="pair"] { border-color: var(--line); }
.batch-source-panel[data-radar-entry-panel="domestic"] { border-top-color: #d7ad25; }
.batch-source-panel[data-radar-entry-panel="source"] { border-top-color: var(--accent); }
.batch-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: white; }
.batch-source-grid[data-radar-active="domestic"], .batch-source-grid[data-radar-active="source"] { grid-template-columns: minmax(0, 1fr); }
.batch-source-grid[data-radar-active="domestic"] #batchSourceOriginPanel { display: none; }
.batch-source-grid[data-radar-active="source"] #batchDomesticSourcePanel { display: none; }
.batch-source-grid[data-radar-active="pair"] #batchSourceOriginPanel,
.batch-source-grid[data-radar-active="pair"] #batchDomesticSourcePanel { display: block; }
.batch-source-panel { min-width: 0; padding: 18px; border-top: 3px solid var(--accent); }
.batch-source-panel + .batch-source-panel { border-left: 1px solid var(--line); }
.batch-source-panel-fish { border-top-color: #d7ad25; }
.batch-source-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.batch-source-header h3 { margin: 5px 0 0; font-size: 14px; }
.batch-source-actions { min-height: 35px; margin-top: 9px; }
.file-label { min-width: 0; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch-price-note { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.batch-history-toolbar { margin-top: 15px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 4px; background: white; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.batch-history-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.batch-history-copy strong { font-size: 11px; }
.batch-history-copy span { color: var(--muted); font-size: 9px; line-height: 1.4; }
.batch-history-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.history-export-button { min-height: 30px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; background: white; color: #50575a; font-size: 10px; }
.history-export-button:hover { border-color: var(--green); color: var(--green); }
.batch-mode-control { display: grid; grid-template-columns: repeat(2, auto); border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; }
.batch-mode-control label + label { border-left: 1px solid var(--line); }
.batch-mode-control input { position: absolute; opacity: 0; pointer-events: none; }
.batch-mode-control span { min-height: 30px; padding: 0 10px; display: grid; place-items: center; color: var(--muted); background: white; font-size: 10px; cursor: pointer; }
.batch-mode-control input:checked + span { background: var(--ink); color: white; font-weight: 700; }
.history-clear-button { min-height: 30px; padding: 0 9px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--red); font-size: 10px; }
.history-clear-button:hover { border-color: #ffcbd0; background: var(--red-soft); }
.history-clear-button.confirming { border-color: var(--red); background: var(--red); color: white; }
.batch-summary { margin-top: 16px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 4px; background: white; }
.batch-summary > div { min-width: 0; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.batch-summary > div + div { border-left: 1px solid var(--line); }
.batch-summary span { min-width: 0; color: var(--muted); font-size: 10px; }
.batch-summary small { display: block; margin-top: 4px; color: #949a9d; font-size: 8px; line-height: 1.35; font-weight: 400; }
.batch-summary strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.radar-controls { margin-top: 15px; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.radar-controls > div:first-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.radar-controls strong { font-size: 11px; }
.radar-controls span { color: var(--muted); font-size: 9px; }
.radar-window-control { display: flex; border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; flex: none; }
.radar-window-control label + label { border-left: 1px solid var(--line); }
.radar-window-control input { position: absolute; opacity: 0; pointer-events: none; }
.radar-window-control span { min-height: 30px; padding: 0 12px; display: grid; place-items: center; color: var(--muted); background: white; cursor: pointer; }
.radar-window-control input:checked + span { background: var(--ink); color: white; font-weight: 700; }
.radar-summary { margin-top: 10px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 4px; background: white; }
.radar-summary > div { min-width: 0; padding: 11px 12px; }
.radar-summary > div + div { border-left: 1px solid var(--line); }
.radar-summary span, .radar-summary small { display: block; color: var(--muted); font-size: 9px; }
.radar-summary strong { display: block; margin-top: 4px; font-size: 15px; font-variant-numeric: tabular-nums; }
.radar-summary small { margin-top: 4px; color: #949a9d; font-size: 8px; line-height: 1.35; }
.batch-results { margin-top: 16px; display: grid; gap: 12px; }
.batch-empty-state { min-height: 118px; border: 1px dashed #bcc6ca; border-radius: 4px; display: grid; place-items: center; align-content: center; gap: 6px; padding: 20px; color: var(--muted); background: white; text-align: center; }
.batch-empty-state strong { color: #4e5559; font-size: 14px; }
.batch-empty-state span { font-size: 11px; line-height: 1.5; }
.batch-match-group { border: 1px solid var(--line); border-radius: 4px; background: white; overflow: hidden; }
.batch-match-source { padding: 14px 16px; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--surface-subtle); border-bottom: 1px solid var(--line); }
.batch-product-image { width: 56px; height: 56px; border-radius: 4px; overflow: hidden; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.batch-product-image.fish { background: #fff8d6; color: #7b6500; }
.batch-product-image { position: relative; }
.batch-product-image > span { grid-area: 1 / 1; }
.batch-product-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.batch-product-copy { min-width: 0; }
.batch-product-copy strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.45; }
.batch-product-copy a, .batch-candidate-main a { color: inherit; text-decoration: none; }
.batch-product-copy a:hover, .batch-candidate-main a:hover { color: var(--accent-dark); text-decoration: underline; }
.batch-product-copy span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch-product-price { text-align: right; white-space: nowrap; }
.batch-product-price strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.batch-product-price span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.radar-group-note { display: block; margin-top: 5px; color: var(--green); font-size: 8px; white-space: nowrap; }
.batch-candidate-list { display: grid; }
.batch-candidate { padding: 14px 16px; display: grid; grid-template-columns: 28px 48px minmax(0, 1fr) minmax(168px, auto); gap: 11px; align-items: center; }
.batch-candidate + .batch-candidate { border-top: 1px solid var(--line); }
.batch-candidate.confirmed { background: var(--green-soft); }
.batch-rank { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; background: #eef1f2; color: #5b6468; font-size: 10px; font-weight: 800; }
.batch-candidate-main { min-width: 0; }
.batch-candidate-main strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; line-height: 1.45; }
.batch-candidate-meta { margin-top: 5px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 9px; }
.batch-candidate-reason { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-badge { padding: 3px 6px; border-radius: 3px; background: var(--amber-soft); color: var(--amber); font-weight: 700; }
.match-badge.high { background: var(--green-soft); color: var(--green); }
.match-badge.no { background: var(--red-soft); color: var(--red); }
.batch-candidate-metrics { min-width: 168px; text-align: right; }
.batch-candidate-metrics strong { display: block; color: var(--green); font-size: 13px; font-variant-numeric: tabular-nums; }
.batch-candidate-metrics strong.negative { color: var(--red); }
.batch-candidate-metrics span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.radar-score-note { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.radar-score-note.high { color: var(--green); font-weight: 700; }
.radar-score-note.medium { color: var(--amber); font-weight: 700; }
.radar-score-note.low { color: var(--muted); }
.radar-label-select { min-height: 30px; max-width: 118px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); font-size: 9px; }
.batch-candidate-actions { grid-column: 3 / -1; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; margin-top: -2px; }
.batch-evidence-grid { grid-column: 3 / -1; border-top: 1px solid var(--line); border-bottom: 0; }
.candidate-action { min-height: 30px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--line-strong); background: white; color: #50575a; font-size: 10px; font-weight: 700; }
.candidate-action:hover { background: var(--surface-subtle); }
.candidate-action.confirm { border-color: #b7ddd3; color: var(--green); }
.candidate-action.load { background: var(--green); border-color: var(--green); color: white; }
.candidate-action.favorite { width: 30px; padding: 0; display: grid; place-items: center; color: #7a8185; }
.candidate-action.favorite.active { border-color: #efc4c9; background: var(--accent-soft); color: var(--accent-dark); }
.candidate-action.favorite svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.batch-group-empty { padding: 18px; color: var(--muted); font-size: 11px; text-align: center; }
.batch-unmatched { border: 1px solid var(--line); border-radius: 4px; background: white; }
.batch-unmatched summary { min-height: 48px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #50575a; font-size: 11px; font-weight: 700; cursor: pointer; list-style: none; }
.batch-unmatched summary::-webkit-details-marker { display: none; }
.batch-unmatched summary small { color: var(--muted); font-size: 9px; font-weight: 500; }
.batch-unmatched > div { padding: 0 16px 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; border-top: 1px solid var(--line); }
.batch-unmatched > div span { padding-top: 10px; color: var(--muted); font-size: 9px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.favorites-dialog { width: min(720px, calc(100vw - 28px)); max-height: min(780px, calc(100vh - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--text); box-shadow: 0 22px 65px rgba(25,31,34,.22); }
.favorites-dialog::backdrop { background: rgba(30,35,38,.42); }
.favorites-dialog-header { position: sticky; top: 0; z-index: 1; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: white; }
.favorites-dialog-header h2 { margin: 0; font-size: 17px; }
.favorites-dialog-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.dialog-close-button { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: white; color: #555d61; }
.favorites-list { max-height: calc(100vh - 126px); overflow: auto; }
.favorite-empty { min-height: 240px; padding: 28px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.favorite-empty strong { color: #4e5559; font-size: 14px; }
.favorite-empty span { font-size: 11px; }
.favorite-item { padding: 17px 20px; }
.favorite-item + .favorite-item { border-top: 1px solid var(--line); }
.favorite-item-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.favorite-item-title { min-width: 0; }
.favorite-item-title strong { display: block; font-size: 12px; line-height: 1.45; }
.favorite-item-title span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.favorite-item-score { min-width: 50px; text-align: right; color: var(--green); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.favorite-fields { margin-top: 13px; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px; }
.favorite-fields select, .favorite-fields input { height: 36px; font-size: 11px; }
.favorite-item-actions { margin-top: 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.favorite-time { color: var(--muted); font-size: 9px; }
.favorite-remove { border: 0; background: transparent; color: var(--red); padding: 5px 0; font-size: 10px; }

.product-pair { display: grid; grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr); align-items: stretch; }
.product-panel { min-width: 0; }
.product-panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 17px; }
.product-panel-header h3 { margin: 6px 0 0; font-size: 17px; }
.platform-label { display: inline-block; color: var(--muted); font-size: 11px; line-height: 1; }
.platform-label-leta { color: var(--accent-dark); }
.platform-label-fish { color: #8a7100; }
.extract-state { border: 1px solid var(--line); background: var(--surface-subtle); color: var(--muted); border-radius: 999px; padding: 5px 8px; font-size: 10px; white-space: nowrap; }
.extract-state.success { background: var(--green-soft); color: var(--green); border-color: #cce8df; }
.extract-state.error { background: var(--red-soft); color: var(--red); border-color: #ffcbd0; }
.extract-state.loading { background: var(--amber-soft); color: var(--amber); border-color: #f1ddb0; }
.pair-divider { position: relative; display: grid; place-items: start center; padding-top: 94px; }
.pair-divider::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line); }
.pair-divider span { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 5px 6px; font-size: 9px; writing-mode: vertical-rl; letter-spacing: 2px; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 650; }
.field small { font-size: 11px; color: var(--muted); line-height: 1.45; }
.span-2 { grid-column: span 2; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 4px; background: white; padding: 0 12px; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
input, select { height: 42px; }
textarea { min-height: 58px; padding-top: 10px; padding-bottom: 10px; resize: vertical; line-height: 1.45; font-size: 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,83,100,.11); }
input[type="radio"], input[type="checkbox"] { width: auto; height: auto; }
.input-with-unit { position: relative; }
.input-with-unit input { padding-right: 56px; }
.input-with-unit b { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; font-weight: 500; pointer-events: none; }

.product-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.primary-button, .secondary-button, .link-button { min-height: 42px; padding: 0 20px; border-radius: 4px; font-weight: 700; border: 1px solid transparent; }
.primary-button { background: var(--accent); color: white; }
.primary-button:hover { background: var(--accent-dark); }
.secondary-button { background: white; border-color: var(--line-strong); color: #4e5559; }
.secondary-button:hover { border-color: #aeb8bc; background: var(--surface-subtle); }
.link-button { background: transparent; color: #596267; padding-left: 6px; padding-right: 6px; }
.compact-button { min-height: 34px; padding-top: 0; padding-bottom: 0; font-size: 12px; }
.primary-button:focus-visible,
.secondary-button:focus-visible,
.link-button:focus-visible,
.text-button:focus-visible,
.candidate-action:focus-visible,
.dialog-close-button:focus-visible,
.history-clear-button:focus-visible,
.deep-search-option:focus-within {
  outline: 2px solid rgba(255,83,100,.38);
  outline-offset: 2px;
}
.product-preview { min-height: 76px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-subtle); padding: 10px; display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: center; margin-bottom: 18px; }
.product-image-frame { width: 54px; height: 54px; overflow: hidden; border-radius: 4px; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.product-image-frame-fish { background: #fff8d6; color: #7b6500; }
.product-image-frame img { width: 100%; height: 100%; object-fit: cover; }
.preview-copy { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.preview-copy strong { font-size: 12px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.preview-copy span { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-fields { gap: 14px 12px; }
.product-fields .field > span { font-size: 12px; }

.inline-status { margin: 10px 0 14px; padding: 10px 12px; border: 1px solid #f1ddb0; border-radius: 4px; background: var(--amber-soft); color: #77500c; font-size: 11px; line-height: 1.55; }
.inline-status.success { background: var(--green-soft); border-color: #cce8df; color: #176d5f; }
.inline-status.error { background: var(--red-soft); border-color: #ffcbd0; color: var(--red); }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.empty-match { min-height: 94px; border: 1px dashed #bcc6ca; border-radius: 4px; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--muted); background: #fbfcfc; text-align: center; }
.empty-match strong { color: #4e5559; font-size: 14px; }
.empty-match span { font-size: 12px; }
.match-result { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.match-summary { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface-subtle); border-bottom: 1px solid var(--line); }
.match-summary > div:first-child { display: flex; flex-direction: column; gap: 5px; }
.match-summary span { color: var(--muted); font-size: 11px; }
.match-summary strong { font-size: 18px; }
.match-result[data-verdict="high"] .match-summary strong { color: var(--green); }
.match-result[data-verdict="suspected"] .match-summary strong { color: var(--amber); }
.match-result[data-verdict="no"] .match-summary strong { color: var(--red); }
.match-score { display: flex; align-items: baseline; }
.match-score strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.match-score span { margin-left: 3px; }
.match-evidence-grid { display: grid; grid-template-columns: 1fr 1fr; }
.match-evidence-grid > div { padding: 17px 18px; min-width: 0; }
.match-evidence-grid > div + div { border-left: 1px solid var(--line); }
.match-evidence-grid h3 { margin: 0 0 11px; font-size: 12px; }
.evidence-list, .conflict-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.evidence-list li, .conflict-list li { position: relative; padding-left: 16px; color: #52595d; font-size: 11px; line-height: 1.5; }
.evidence-list li::before, .conflict-list li::before { content: ""; position: absolute; left: 1px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.conflict-list li::before { background: var(--amber); border-radius: 1px; }
.confirmation-fieldset { margin: 18px 0 0; padding: 0; border: 0; }
.confirmation-fieldset legend { margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.confirmation-control { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; }
.confirmation-control label { min-width: 0; }
.confirmation-control label + label { border-left: 1px solid var(--line); }
.confirmation-control input { position: absolute; opacity: 0; pointer-events: none; }
.confirmation-control span { min-height: 40px; padding: 0 10px; display: grid; place-items: center; color: var(--muted); background: white; font-size: 12px; cursor: pointer; }
.confirmation-control input:checked + span { background: var(--ink); color: white; font-weight: 700; }

.parameter-group { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 22px; }
.parameter-group:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.parameter-group-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.parameter-group-title h3 { margin: 0; font-size: 14px; }
.parameter-group-title span { color: var(--muted); font-size: 11px; }
.toggle-field { min-height: 66px; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; padding-top: 18px; }
.toggle-field > input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { width: 38px; height: 22px; border-radius: 11px; background: #cbd2d5; position: relative; transition: background .15s; }
.toggle-track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.toggle-field input:checked + .toggle-track { background: var(--green); }
.toggle-field input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle-field > span:last-child { display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.toggle-field strong { font-size: 12px; }
.toggle-field small { color: var(--muted); font-size: 10px; }

.form-actions { min-height: 78px; padding: 18px 30px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.form-actions > span { color: var(--muted); font-size: 11px; }

.result-column { position: sticky; top: 20px; overflow: hidden; }
.result-header { padding: 24px 26px; background: var(--ink); color: white; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.result-header p { margin: 0 0 5px; color: #b8bec1; font-size: 12px; }
.result-header h2 { margin: 0; font-size: 23px; letter-spacing: 0; }
.result-header.positive { background: #176d5f; }
.result-header.negative { background: #943442; }
.recommendation-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); font-weight: 900; font-size: 20px; flex: none; }
.hero-metric { padding: 25px 26px 22px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.hero-metric span { color: var(--muted); font-size: 12px; }
.hero-metric strong { color: var(--green); font-size: 34px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hero-metric small { color: var(--muted); font-size: 11px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.metric-grid div { min-width: 0; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.metric-grid div:nth-child(odd) { border-right: 1px solid var(--line); }
.metric-grid div:nth-last-child(-n+2) { border-bottom: 0; }
.metric-grid span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.metric-grid strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.result-section { padding: 22px 26px; border-bottom: 1px solid var(--line); }
.result-section:last-child { border-bottom: 0; }
.result-section h3 { margin: 0 0 15px; font-size: 14px; }
.result-section-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.result-section-title span { color: var(--muted); font-size: 12px; }
.cost-decision-summary { margin: -7px 0 18px; padding: 12px; border: 1px solid #d8e8e3; border-left: 3px solid var(--green); border-radius: 4px; background: #fbfefd; }
.cost-decision-heading { display: flex; justify-content: space-between; gap: 10px; color: var(--green); font-size: 11px; }
.cost-decision-heading span { color: var(--muted); font-size: 9px; }
.cost-decision-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.cost-decision-grid button { min-width: 0; padding: 8px; border: 1px solid #e1e9e7; border-radius: 4px; background: white; text-align: left; }
.cost-decision-grid button:hover { border-color: var(--green); }
.cost-decision-grid span, .cost-decision-grid strong { display: block; }
.cost-decision-grid span { color: var(--muted); font-size: 8px; }
.cost-decision-grid strong { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.data-trust-note { display: block; margin-top: 9px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.advanced-cost-details { margin-top: 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-subtle); }
.advanced-cost-details > summary { min-height: 42px; padding: 0 13px; display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; color: #4d5559; font-size: 11px; font-weight: 800; }
.advanced-cost-details > summary::-webkit-details-marker { display: none; }
.advanced-cost-details > summary span { color: var(--muted); font-size: 9px; font-weight: 400; }
.advanced-cost-details > summary b { margin-left: auto; color: var(--muted); font-size: 9px; }
.advanced-cost-details[open] > summary { border-bottom: 1px solid var(--line); }
.advanced-cost-details[open] > summary b::after { content: "收起"; }
.advanced-cost-details[open] > summary b { font-size: 0; }
.advanced-cost-details[open] > summary b::after { font-size: 9px; }
.scenario-section { padding: 18px 26px; border-bottom: 1px solid var(--line); }
.scenario-section .result-section-title { margin-bottom: 11px; }
.profit-scenarios { display: grid; gap: 7px; }
.scenario-card { padding: 10px 11px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: 4px; background: var(--surface-subtle); }
.scenario-card.positive { border-left-color: var(--green); }
.scenario-card.negative { border-left-color: var(--red); }
.scenario-card > div strong, .scenario-card > div span { display: block; }
.scenario-card > div strong { font-size: 11px; }
.scenario-card > div span, .scenario-card > small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.scenario-card > b { color: var(--green); font-size: 14px; font-variant-numeric: tabular-nums; }
.scenario-card.negative > b { color: var(--red); }
.scenario-card > small { grid-column: 1 / -1; }
.scenario-empty { padding: 10px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.cost-bar { min-height: 9px; border-radius: 3px; overflow: hidden; display: flex; background: #edf0f1; margin-bottom: 16px; }
.cost-bar span { min-width: 2px; }
.cost-list { display: grid; gap: 9px; }
.empty-cost { color: var(--muted); font-size: 12px; }
.cost-row { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; font-size: 12px; }
.cost-dot { width: 7px; height: 7px; border-radius: 2px; }
.cost-name { color: #52595d; }
.cost-value { font-variant-numeric: tabular-nums; font-weight: 650; }
.reason-list, .warning-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.reason-list li, .warning-list li { position: relative; padding-left: 18px; color: #50575a; font-size: 12px; line-height: 1.55; }
.reason-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); position: absolute; left: 1px; top: 6px; }
.warning-section { background: #fffaf0; }
.warning-list li::before { content: "!"; position: absolute; left: 0; color: var(--amber); font-weight: 800; }
.error-box { margin: 18px 26px 0; padding: 11px 13px; background: var(--red-soft); color: var(--red); border: 1px solid #ffcbd0; border-radius: 4px; font-size: 12px; line-height: 1.5; }
.error-box.loading { background: var(--amber-soft); border-color: #f1ddb0; color: #77500c; }
.error-box.success { background: var(--green-soft); border-color: #cce8df; color: #176d5f; }
footer { max-width: 1440px; margin: 0 auto 36px; padding: 0 24px; color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 1fr; }
  .result-column { position: static; display: grid; grid-template-columns: repeat(2, 1fr); }
  .result-header, .hero-metric, .metric-grid, .error-box { grid-column: span 2; }
  .result-section { border-right: 1px solid var(--line); }
  .result-section:last-child { border-right: 0; }
}

@media (max-width: 800px) {
  .deep-search-input-grid { grid-template-columns: 1fr; }
  .deep-source-manual-grid { grid-template-columns: 1fr; }
  .batch-history-toolbar { align-items: flex-start; flex-direction: column; }
  .batch-history-actions { width: 100%; justify-content: space-between; }
  .browser-picker { grid-template-columns: 150px; }
  .browser-picker > span, .browser-picker small { display: none; }
  .browser-picker select { grid-column: 1; width: 150px; }
  .browser-login-button { padding: 0 9px; }
  .leta-session-tools small { display: none; }
  .batch-source-grid { grid-template-columns: 1fr; }
  .batch-source-panel + .batch-source-panel { border-left: 0; border-top: 1px solid var(--line); }
  .batch-source-panel-fish { box-shadow: inset 0 3px #d7ad25; }
  .radar-entry-mode { align-items: stretch; flex-direction: column; }
  .radar-entry-mode-tabs { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .radar-entry-tab { min-width: 0; }
  .radar-entry-tab strong, .radar-entry-tab small { white-space: normal; }
  .batch-summary { grid-template-columns: repeat(2, 1fr); }
  .batch-summary > div + div { border-left: 0; }
  .batch-summary > div:nth-child(even) { border-left: 1px solid var(--line); }
  .batch-summary > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .product-pair { grid-template-columns: 1fr; gap: 24px; }
  .pair-divider { min-height: 1px; padding: 0; }
  .pair-divider::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 1px; }
  .pair-divider span { display: none; }
}

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 9px 16px; }
  .topbar-actions { width: 100%; display: grid; grid-template-columns: minmax(105px, 1fr) auto auto; gap: 8px; }
  .local-status { display: none; }
  .browser-picker { min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .browser-picker select { width: 100%; }
  .topbar-actions > #resetButton { display: none; }
  .leta-session-tools { grid-template-columns: 1fr auto; }
  .workspace { margin: 14px auto; padding: 0 10px; gap: 14px; }
  .mode-navigation,
  .workflow-rail { grid-column: 1; grid-row: auto; }
  .form-column,
  .result-column { grid-row: auto; }
  .mode-tab { min-height: 62px; justify-content: center; padding: 9px 7px; text-align: center; }
  .mode-tab-index { display: none; }
  .mode-tab strong { font-size: 11px; white-space: nowrap; }
  .mode-tab small { display: none; }
  .mode-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-toolbar { width: 100%; justify-content: space-between; margin-left: 0; }
  .database-health { min-width: 0; }
  .data-tools-menu { position: static; width: 100%; margin-top: 4px; box-shadow: none; }
  .mode-emoji { margin-right: 4px; }
  .workflow-rail { gap: 5px; padding: 7px 9px; }
  .workflow-step span { display: none; }
  .workflow-step.active span { display: inline; }
  .workflow-step b { width: 22px; height: 22px; }
  .form-section { padding: 22px 16px; }
  .research-layout { grid-template-columns: 1fr; }
  .research-save-row { grid-template-columns: 1fr 1fr; }
  .research-save-row .primary-button { grid-column: 1 / -1; width: 100%; }
  .database-actions { justify-content: flex-start; margin-top: 12px; }
  .database-section .section-heading-actions { display: block; }
  .database-section .section-heading-copy { max-width: none; }
  .database-section .database-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .database-section .database-actions > * { width: 100%; justify-content: center; }
  .database-section .database-actions .text-button { min-height: 34px; }
  .heat-insight-panel { padding: 14px; }
  .research-evidence-heading { display: block; }
  .evidence-lock-note { display: inline-block; margin-top: 8px; }
  .query-pack-grid, .schedule-grid, .reasoning-columns { grid-template-columns: 1fr; }
  .insight-heading { display: block; }
  .insight-source-note { display: block; margin-top: 7px; }
  .heat-insight-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .heat-insight-summary > div + div { border-left: 0; }
  .heat-insight-summary > div:nth-child(even) { border-left: 1px solid #e8e3f6; }
  .heat-insight-summary > div:nth-child(n + 3) { border-top: 1px solid #e8e3f6; }
  .heat-insight-dashboard { grid-template-columns: 1fr; }
  .heat-market-terminal { max-width: none; }
  .heat-market-header { align-items: flex-start; }
  .heat-market-title small { max-width: 170px; }
  .heat-market-body { grid-template-columns: 1fr; min-height: 0; }
  .heat-market-chart { padding-inline: 2px; }
  .heat-market-chart svg { height: 250px; }
  .heat-market-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; border-top: 1px solid #1c242e; border-left: 0; }
  .heat-market-empty { min-height: 250px; }
  .heat-market-footer { flex-wrap: wrap; gap: 5px 12px; padding-block: 7px; }
  .heat-market-footer span:last-child { width: 100%; margin-left: 0; }
  .database-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .database-summary > div + div { border-left: 0; }
  .database-summary > div:nth-child(even) { border-left: 1px solid var(--line); }
  .database-summary > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .database-filter-bar { align-items: stretch; flex-direction: column; }
  .database-filter-bar select, .database-filter-bar .search-field input { width: 100%; }
  .heat-radar-toolbar { align-items: stretch; flex-direction: column; }
  .heat-legend { flex-wrap: wrap; }
  .heat-radar-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heat-radar-summary > div + div { border-left: 0; }
  .heat-radar-summary > div:nth-child(even) { border-left: 1px solid var(--line); }
  .heat-radar-summary > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .heat-radar-grid { grid-template-columns: 1fr; }
  .observation-dialog-body { padding: 16px; }
  .observation-dialog-actions { padding: 13px 16px 16px; }
  .section-heading-actions { align-items: flex-start; }
  .section-heading-actions > button { flex: none; }
  .batch-heading { display: block; }
  .deep-search-heading { display: block; }
  .deep-search-heading > button { width: 100%; margin-top: 14px; }
  .deep-source-card { align-items: flex-start; flex-direction: column; }
  .deep-source-card > button { width: 100%; }
  .deep-source-workbench { padding: 14px 13px 14px 12px; }
  .deep-source-url-row { grid-template-columns: 1fr; }
  .deep-source-url-row .primary-button, .deep-source-url-row .secondary-button { width: 100%; }
  .deep-ai-fields { grid-template-columns: 1fr; }
  .deep-ai-fields .span-2 { grid-column: auto; }
  .deep-ai-button-row { align-items: stretch; flex-direction: column; }
  .deep-ai-button-row > button { width: 100%; }
  .deep-ai-button-row #deepAiTestButton { margin-left: 0; }
  .deep-ai-actions small { text-align: left; }
  .deep-source-actions { align-items: stretch; flex-direction: column; }
  .deep-source-actions > button { width: 100%; }
  .deep-source-preview { grid-template-columns: 50px minmax(0, 1fr); align-items: start; }
  .deep-source-image { width: 50px; height: 50px; }
  .deep-source-state { grid-column: 2; justify-self: start; min-width: 0; }
  .deep-panel-title { align-items: flex-start; flex-direction: column; gap: 5px; }
  .deep-candidate-main { grid-template-columns: 24px 50px minmax(0, 1fr); }
  .deep-candidate-price { grid-column: 3; text-align: left; }
  .deep-candidate-meta { align-items: flex-start; flex-direction: column; }
  .deep-score-grid { grid-template-columns: 1fr; }
  .deep-score-grid > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .deep-candidate-actions { justify-content: flex-start; }
  .deep-candidate-actions .candidate-action.confirm { flex: 1; min-width: 0; }
  .batch-heading-actions { margin-top: 14px; }
  .batch-heading-actions > button { flex: 1; }
  .batch-history-actions { align-items: stretch; flex-direction: column; }
  .batch-mode-control { grid-template-columns: repeat(2, 1fr); }
  .radar-controls { align-items: stretch; flex-direction: column; }
  .radar-window-control { width: 100%; }
  .radar-window-control label { flex: 1; }
  .radar-window-control span { width: 100%; }
  .radar-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .radar-summary > div:nth-child(odd) { border-left: 0; }
  .radar-summary > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .history-export-button { align-self: flex-start; }
  .history-clear-button { align-self: flex-start; }
  .batch-source-panel { padding: 15px; }
  .radar-entry-mode-tabs { grid-template-columns: 1fr; }
  .radar-entry-tab { width: 100%; }
  .radar-entry-hint { align-items: flex-start; flex-direction: column; gap: 3px; }
  .radar-single-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .radar-single-card { grid-template-columns: 48px minmax(0, 1fr); }
  .radar-single-actions { grid-column: 2; justify-content: flex-start; }
  .batch-source-actions .secondary-button { width: 100%; }
  .batch-match-source { grid-template-columns: 48px minmax(0, 1fr); }
  .batch-match-source .batch-product-price { grid-column: 2; text-align: left; }
  .batch-candidate { grid-template-columns: 24px 44px minmax(0, 1fr); }
  .batch-candidate-metrics { grid-column: 3; min-width: 0; text-align: left; }
  .batch-candidate-metrics span { white-space: normal; }
  .batch-candidate-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .batch-unmatched > div { grid-template-columns: 1fr; }
  .favorite-fields { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; gap: 15px; }
  .span-2 { grid-column: span 1; }
  .match-evidence-grid { grid-template-columns: 1fr; }
  .match-evidence-grid > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .confirmation-control { grid-template-columns: 1fr; }
  .confirmation-control label + label { border-left: 0; border-top: 1px solid var(--line); }
  .toggle-field { padding-top: 0; }
  .form-actions { padding: 16px; }
  .form-actions > span { display: none; }
  .form-actions button { width: 100%; }
  .result-column { display: block; }
  .result-section { border-right: 0; }
  .product-actions .primary-button, .product-actions .secondary-button { flex: 1; }
  .link-button { width: 100%; text-align: left; }
}

/* V3.6+ visual refresh: keep the dense tool workflow, but give it a clearer blue focus. */
:root {
  --bg: #f8fbff;
  --surface: #ffffff;
  --surface-subtle: #f7faff;
  --text: #1e293b;
  --muted: #718096;
  --line: #e3eaf3;
  --line-strong: #cbd7e6;
  --accent: #3d6ee8;
  --accent-dark: #2f57c8;
  --accent-soft: #edf3ff;
  --green: #16846f;
  --green-soft: #eaf8f4;
  --amber: #a36913;
  --amber-soft: #fff7e6;
  --red: #b33d4c;
  --red-soft: #fff0f2;
  --ink: #202938;
  --radius: 10px;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

html { background: #fff; }
body {
  min-height: 100vh;
  color: var(--text);
  background-color: #fff;
  background-image:
    linear-gradient(rgba(61,110,232,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61,110,232,.035) 1px, transparent 1px);
  background-size: 36px 36px;
  background-position: center top;
}

.topbar {
  min-height: 76px;
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: 13px;
  padding-bottom: 13px;
  background: rgba(255,255,255,.94);
  border-bottom-color: rgba(216,226,239,.92);
  box-shadow: 0 1px 0 rgba(28,47,80,.03), 0 10px 28px rgba(61,110,232,.045);
  backdrop-filter: blur(14px);
}
.brand { gap: 13px; }
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(145deg, #4f83f5, #315bcb);
  box-shadow: 0 6px 15px rgba(61,110,232,.22);
}
.brand h1 { color: #172033; font-size: 18px; }
.brand p { color: #78879b; }
.topbar-actions { gap: 10px 14px; }
.browser-picker,
.leta-session-tools,
.local-status { color: #65758b; }
.browser-picker select,
.browser-login-button {
  border-color: #d8e2ef;
  border-radius: 8px;
  background: rgba(255,255,255,.86);
}
.browser-picker select { color: #334155; }
.browser-login-button:hover { border-color: #9eb7e8; color: var(--accent-dark); background: #f7faff; }
.local-status span { background: #2fa98d; box-shadow: 0 0 0 4px rgba(47,169,141,.12); }
.text-button { color: #6b7b91; }

.workspace {
  position: relative;
  width: min(100%, 1440px);
  overflow-x: clip;
  margin-top: 22px;
  margin-bottom: 44px;
  gap: 18px;
}
.workspace::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -42px;
  right: -70px;
  width: 540px;
  height: 280px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(90,137,244,.13), transparent 68%);
  filter: blur(2px);
}
.mode-navigation { gap: 10px; }
.mode-tab {
  min-height: 70px;
  padding: 13px 16px;
  border-color: #e0e8f2;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(30,52,86,.035);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.mode-tab:hover { border-color: #b9cae5; transform: translateY(-1px); }
.mode-tab.active {
  border-color: #8eabe0;
  box-shadow: inset 0 3px var(--accent), 0 8px 22px rgba(61,110,232,.10);
}
.mode-tab-index {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #f0f4fa;
  color: #70819a;
}
.mode-tab.active .mode-tab-index { background: var(--accent); color: white; }
.mode-tab strong { color: #243044; font-size: 13px; }
.mode-tab small { color: #78879b; }
.mode-emoji { filter: saturate(.82); }

.workflow-rail {
  min-height: 48px;
  padding: 8px 14px;
  border-color: #e0e8f2;
  border-radius: 9px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 4px 16px rgba(30,52,86,.025);
}
.workflow-rail > i { background: #d8e3f1; }
.workflow-step { color: #9aa8ba; font-size: 10px; }
.workflow-step b { width: 23px; height: 23px; border-color: #d5e0ec; color: #8998ab; }
.workflow-step.active { color: #2f57c8; }
.workflow-step.active b { border-color: var(--accent); background: var(--accent); }
.workflow-step.completed { color: var(--green); }

.form-column,
.result-column {
  border-color: #e1e8f1;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(32,53,84,.055), 0 1px 2px rgba(32,53,84,.04);
}
.form-column { background: rgba(255,255,255,.95); }
.form-section { padding-left: 32px; padding-right: 32px; border-bottom-color: #e6edf5; }
.deep-search-section::before { height: 3px; background: linear-gradient(90deg, #315bcb, #6f9bf8, transparent); }
.section-number { color: var(--accent); }
.section-heading h2 { color: #1b2638; font-size: 20px; }
.section-heading p { color: #718096; }
.section-kicker { color: var(--accent-dark); }
.deep-search-heading .section-number { background: var(--accent); }
.deep-search-heading > button,
#scanBatchButton,
#profitButton { box-shadow: 0 7px 16px rgba(61,110,232,.18); }
.primary-button { background: var(--accent); border-color: var(--accent); border-radius: 8px; }
.primary-button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.secondary-button,
.link-button { border-radius: 8px; }
.secondary-button:hover { border-color: #aec2e4; background: #f5f8ff; }
.link-button { color: var(--accent-dark); }
.link-button:hover { color: #2449ae; }
.icon-button-label { gap: 8px; }
.icon-button-label svg { width: 15px; height: 15px; }

.deep-source-workbench,
.deep-match-mode,
.deep-ai-settings,
.deep-search-option,
.deep-query-panel,
.batch-source-grid,
.radar-entry-mode,
.batch-history-toolbar,
.product-panel,
.match-result,
.cost-decision-summary,
.advanced-cost-details {
  border-color: #e1e9f3;
  border-radius: 9px;
}
.deep-source-workbench { border-left-width: 4px; border-left-color: #5e86e8; box-shadow: 0 5px 18px rgba(61,110,232,.045); }
.deep-source-preview,
.product-preview { border-color: #e4ebf4; background: #f8fbff; border-radius: 8px; }
.deep-source-image { background: #edf3ff; color: var(--accent-dark); border-radius: 8px; }
.deep-query-panel { box-shadow: 0 4px 14px rgba(30,52,86,.025); }
.deep-panel-title { background: #fbfdff; border-bottom-color: #e8eef6; }
.deep-query-chip { border-color: #dce6f3; background: #f8fbff; border-radius: 7px; }
.deep-query-chip b { background: var(--accent); border-radius: 5px; }
.deep-candidate { border-color: #e1e9f3; border-radius: 9px; box-shadow: 0 4px 16px rgba(30,52,86,.028); }
.deep-candidate:first-of-type,
.deep-candidate.top-candidate { border-color: #a9c1ee; box-shadow: 0 7px 20px rgba(61,110,232,.09); }
.deep-candidate-actions { background: #fcfdff; }

.batch-section { background: rgba(252,253,255,.96); }
.batch-source-grid { box-shadow: 0 4px 16px rgba(30,52,86,.028); }
.batch-source-panel { background: rgba(255,255,255,.9); }
.batch-source-panel-fish { box-shadow: inset 0 3px #d7ad25; }
.radar-entry-mode { box-shadow: 0 4px 16px rgba(30,52,86,.028); }
.radar-entry-tab { border-color: #dce6f2; border-radius: 8px; background: #f8fbff; }
.radar-entry-tab:hover { border-color: #b6c9e8; }
.radar-entry-tab.active { border-color: var(--accent); background: var(--accent); box-shadow: 0 6px 14px rgba(61,110,232,.17); }
.radar-entry-tab-secondary.active { border-color: var(--amber); background: var(--amber); }
.radar-entry-hint { border-color: #cae8df; border-left-color: var(--green); border-radius: 8px; }
.radar-summary,
.batch-summary { border-color: #e1e9f3; border-radius: 9px; box-shadow: 0 4px 16px rgba(30,52,86,.025); }
.radar-summary > div,
.batch-summary > div { background: rgba(255,255,255,.8); }
.radar-summary strong,
.batch-summary strong { color: #26364c; }
.radar-single-card,
.batch-candidate,
.favorite-item { border-color: #e1e9f3; border-radius: 9px; box-shadow: 0 4px 16px rgba(30,52,86,.025); }

.product-panel { box-shadow: 0 5px 18px rgba(30,52,86,.035); }
.product-panel-header { background: #fbfdff; border-bottom-color: #e5ecf4; }
.pair-divider::before { background: #dbe5f1; }
.pair-divider span { background: #f8fbff; border-color: #d9e4f1; color: #6d7d92; }
.match-summary { background: #f8fbff; border-bottom-color: #e4ebf4; }
.confirmation-control { border-color: #d7e2ef; border-radius: 8px; }
.confirmation-control input:checked + span { background: var(--accent); }
.parameter-group { border-top-color: #e5ecf4; }
.parameter-group-title h3 { color: #2b3950; }
.field input,
.field select,
.field textarea { border-color: #d9e4f0; border-radius: 8px; background: #fff; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: #7ea1e8; box-shadow: 0 0 0 3px rgba(61,110,232,.11); }
.form-actions { background: #fbfdff; border-top: 1px solid #e5ecf4; }

.result-column { background: rgba(255,255,255,.96); }
.result-header { background: #202938; }
.result-header.positive { background: #147662; }
.result-header.negative { background: #a53b4a; }
.result-section,
.scenario-section { border-bottom-color: #e5ecf4; }
.scenario-card { border-color: #e0e8f2; border-radius: 8px; }
.cost-bar { background: #edf3fa; }
.warning-section { background: #fffaf0; }

@media (max-width: 800px) {
  .topbar { position: relative; }
  .workspace::before { right: -180px; opacity: .58; }
  .form-section { padding-left: 22px; padding-right: 22px; }
  .mode-tab { min-height: 64px; padding: 10px 11px; }
  .mode-tab strong { font-size: 11px; }
  .mode-tab small { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* V4.73: once the folder opens, the interior page owns the reading surface. */
.intelligence-book-reader.is-inner-page-visible .intelligence-book-folder-v4 {
  opacity: 0 !important;
  transform: translate3d(0, -12px, 0) scale(1.012) !important;
  filter: saturate(.68) brightness(.9) drop-shadow(0 8px 9px rgba(25, 40, 40, .06)) !important;
}
.intelligence-book-reader.is-inner-page-visible .intelligence-book-inner-page-v5 { z-index: 4; }
.intelligence-book-reader.is-inner-page-visible .intelligence-book-directory,
.intelligence-book-reader.is-inner-page-visible .intelligence-book-detail { z-index: 7 !important; }
.intelligence-book-reader.is-inner-page-visible .intelligence-book-directory header h3,
.intelligence-book-reader.is-inner-page-visible .intelligence-book-entry strong { text-shadow: 0 1px rgba(255,255,255,.7); }

.deep-alias-memory-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #d8e5f2;
  border-radius: 12px;
  background: #f8fbff;
}

.deep-alias-memory-panel.hidden { display: none; }

.deep-alias-memory-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.deep-alias-memory-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dce7f1;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.deep-alias-memory-item input { margin-top: 3px; accent-color: #2d73c8; }
.deep-alias-memory-item span { display: grid; gap: 3px; min-width: 0; }
.deep-alias-memory-item strong { overflow-wrap: anywhere; color: #1b3554; }
.deep-alias-memory-item small { color: #6b7c91; line-height: 1.4; }

.deep-alias-memory-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px auto;
  gap: 8px;
  align-items: center;
}

.deep-alias-memory-actions input,
.deep-alias-memory-actions select {
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cedbea;
  border-radius: 8px;
  background: #fff;
  color: #203a58;
}

.deep-alias-memory-note { color: #72849a; line-height: 1.5; }

@media (max-width: 680px) {
  .deep-alias-memory-actions { grid-template-columns: 1fr; }
}

/* V3.9 interface polish: quiet presentation, clearer decisions, lightweight motion. */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-subtle: #f8faff;
  --surface-tint: #f1f5ff;
  --text: #172033;
  --muted: #68778d;
  --line: #e0e7f0;
  --line-strong: #c8d4e4;
  --accent: #3769dc;
  --accent-dark: #2852b7;
  --accent-soft: #edf3ff;
  --sakura: #d95075;
  --sakura-soft: #fff0f4;
  --lilac: #7667c7;
  --lilac-soft: #f1efff;
  --green: #147a67;
  --green-soft: #e8f7f2;
  --amber: #95620f;
  --amber-soft: #fff6e4;
  --red: #aa3547;
  --red-soft: #fff0f2;
  --shadow-xs: 0 1px 2px rgba(24, 40, 72, .05);
  --shadow-sm: 0 8px 22px rgba(31, 55, 92, .07);
  --shadow-md: 0 18px 44px rgba(31, 55, 92, .11);
  --ease-out: cubic-bezier(.2, .72, .22, 1);
  --radius: 8px;
}

html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(55, 105, 220, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 105, 220, .025) 1px, transparent 1px);
  background-size: 40px 40px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: -1;
  height: 220px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(55, 105, 220, .055), rgba(217, 80, 117, .035) 52%, rgba(20, 122, 103, .035));
  border-bottom: 1px solid rgba(255, 255, 255, .72);
}

button,
input,
select,
textarea,
summary { outline: none; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.file-button:focus-within {
  box-shadow: 0 0 0 3px rgba(55, 105, 220, .18) !important;
}

.topbar {
  min-height: 72px;
  padding-top: 11px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(207, 218, 232, .9);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 6px 20px rgba(31, 55, 92, .055);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 8px;
  background: #3769dc;
  box-shadow: 0 7px 18px rgba(55, 105, 220, .22), inset 0 1px rgba(255, 255, 255, .28);
}

.brand h1 { font-size: 19px; }
.brand p { margin-top: 4px; color: #728096; }
.database-health {
  min-width: 164px;
  padding: 7px 10px;
  border: 1px solid #e1e9f2;
  border-radius: 8px;
  background: rgba(248, 251, 255, .9);
}
.database-health > span { box-shadow: 0 0 0 4px rgba(20, 122, 103, .11); }
.data-tools-menu { border-radius: 8px; box-shadow: var(--shadow-md); animation: menu-in .18s var(--ease-out); }

.workspace {
  margin-top: 20px;
  margin-bottom: 52px;
  gap: 14px 18px;
}
.workspace::before { display: none; }

.mode-navigation {
  position: sticky;
  top: 86px;
  z-index: 12;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(216, 225, 237, .94);
  border-radius: 8px;
  background: rgba(248, 250, 253, .92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.mode-tab {
  min-height: 66px;
  position: relative;
  overflow: hidden;
  padding: 11px 14px;
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s var(--ease-out);
}
.mode-tab::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 7px;
  left: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .24s var(--ease-out);
}
.mode-tab:hover { border-color: #dce5f1; background: rgba(255, 255, 255, .74); transform: translateY(-1px); }
.mode-tab.active {
  border-color: #c8d7ef;
  background: #fff;
  box-shadow: 0 6px 18px rgba(41, 73, 126, .09);
}
.mode-tab.active::after { transform: scaleX(1); }
.mode-tab-index { width: 31px; height: 31px; border-radius: 7px; }
.mode-tab.active .mode-tab-index { background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 0 0 1px #cfddf6; }
.mode-tab strong { font-size: 13px; }
.mode-tab small { margin-top: 3px; font-size: 9px; }

.workflow-rail {
  min-height: 44px;
  padding: 7px 16px;
  border-color: #e1e8f1;
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
  box-shadow: var(--shadow-xs);
}
.workflow-step { font-size: 10px; }
.workflow-step b { width: 22px; height: 22px; border-radius: 6px; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s var(--ease-out); }
.workflow-step.active b { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(55, 105, 220, .18); }
.workflow-step.completed b { border-color: #bcded5; }

.form-column,
.result-column {
  overflow: hidden;
  border-color: #dfe7f1;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.form-section { padding: 30px 32px 34px; }
.section-heading { margin-bottom: 22px; }
.section-heading-copy { min-width: 0; }
.section-number {
  min-width: 44px;
  padding: 5px 7px;
  border: 1px solid #d7e2f2;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  text-align: center;
}
.section-heading h2 { max-width: 800px; font-size: 20px; line-height: 1.35; }
.section-heading p { max-width: 840px; margin-top: 7px; line-height: 1.55; }
.section-kicker { letter-spacing: .04em; }

.primary-button,
.secondary-button,
.browser-login-button,
.link-button,
.radar-entry-tab {
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s var(--ease-out);
}
.primary-button { box-shadow: 0 5px 12px rgba(55, 105, 220, .16); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(55, 105, 220, .22); }
.primary-button:active,
.secondary-button:active,
.browser-login-button:active,
.link-button:active { transform: translateY(1px); }
.secondary-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-xs); }

.database-summary,
.heat-radar-summary {
  overflow: hidden;
  border-color: #dde6f1;
  border-radius: 8px;
  background: #f8faff;
}
.database-summary > div,
.heat-radar-summary > div { position: relative; background: rgba(255, 255, 255, .48); }
.database-summary > div::before,
.heat-radar-summary > div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  width: 24px;
  height: 2px;
  background: var(--accent);
}
.database-summary > div:nth-child(2)::before,
.heat-radar-summary > div:nth-child(2)::before { background: var(--sakura); }
.database-summary > div:nth-child(3)::before,
.heat-radar-summary > div:nth-child(3)::before { background: var(--lilac); }
.database-summary > div:nth-child(4)::before,
.heat-radar-summary > div:nth-child(4)::before { background: var(--green); }
.database-summary > div:nth-child(5)::before { background: var(--amber); }
.database-summary strong { font-size: 24px; font-variant-numeric: tabular-nums; }

.heat-insight-panel {
  position: relative;
  overflow: hidden;
  margin: 18px 0 22px;
  padding: 20px;
  border-color: #dcdff1;
  border-radius: 8px;
  background: #fbfaff;
  box-shadow: 0 10px 28px rgba(91, 75, 158, .08);
}
.heat-insight-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--lilac), var(--sakura) 52%, var(--accent));
}
.insight-heading h3 { color: #24233b; font-size: 17px; }
.insight-source-note { padding: 5px 8px; border: 1px solid #ded9f5; border-radius: 6px; background: var(--lilac-soft); font-weight: 700; }
.heat-insight-summary { border-radius: 8px; background: #fff; }
.heat-insight-block { border-radius: 8px; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-xs); }
.insight-rank-row,
.trend-row { min-height: 24px; }
.insight-rank-row i,
.trend-row i,
.heat-meter { background: #e9edf5; }
.insight-rank-row em,
.trend-row em,
.heat-meter i { transform-origin: left; animation: meter-grow .6s var(--ease-out) both; }
.trend-row em { background: var(--sakura); }
.heat-research-report { border-top-color: #d9d7ea; }

.database-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(118px, 150px)) auto;
  align-items: center;
  padding: 8px;
  border: 1px solid #e0e8f1;
  border-radius: 8px;
  background: #f8faff;
}
.database-filter-bar .search-field { min-width: 0; width: 100%; }
.database-filter-bar .search-field input { width: 100%; min-height: 34px; }
.database-filter-bar select { min-width: 0; width: 100%; }
.database-filter-bar input,
.database-filter-bar select { background: #fff; }
.database-table-wrap { border-radius: 8px; box-shadow: inset 0 1px rgba(255, 255, 255, .8); }
.database-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 11px;
  padding-bottom: 11px;
  background: #f4f7fb;
  color: #55657a;
}
.database-table tbody tr { transition: background-color .16s ease; }
.database-table tbody tr:hover { background: #f8faff; }
.database-table td { border-top-color: #e7edf4; }
.table-actions button { min-height: 28px; padding: 4px 5px; border-radius: 5px; }
.table-actions button:hover { background: var(--accent-soft); text-decoration: none; }

.heat-radar-toolbar { padding: 10px 12px; border: 1px solid #e0e8f1; border-radius: 8px; background: #f8faff; }
.heat-card {
  position: relative;
  overflow: hidden;
  padding: 17px;
  border-top-width: 1px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  box-shadow: var(--shadow-xs);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--ease-out);
}
.heat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.heat-card.rising { border-top-color: var(--line); border-left-color: var(--green); }
.heat-card.risk { border-top-color: var(--line); border-left-color: var(--amber); }
.heat-score { font-variant-numeric: tabular-nums; }
.heat-evidence span { border-radius: 5px; }

.research-source-panel,
.research-result-panel,
.deep-source-workbench,
.deep-query-panel,
.batch-source-grid,
.radar-entry-mode,
.product-panel,
.match-result,
.cost-decision-summary,
.advanced-cost-details { border-radius: 8px; }

.observation-dialog,
.favorites-dialog {
  border-radius: 8px;
  animation: dialog-in .22s var(--ease-out);
}
.observation-dialog::backdrop,
.favorites-dialog::backdrop { background: rgba(20, 31, 52, .42); animation: backdrop-in .18s ease-out; backdrop-filter: blur(2px); }

.workbench-enter { animation: workbench-in .38s var(--ease-out) var(--motion-delay, 0ms) both; }
.data-refreshed { animation: data-refresh .48s var(--ease-out) var(--motion-delay, 0ms) both; }

@keyframes workbench-in {
  from { opacity: .76; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes data-refresh {
  0% { box-shadow: 0 0 0 0 rgba(55, 105, 220, 0); }
  42% { box-shadow: 0 0 0 4px rgba(55, 105, 220, .12); }
  100% { box-shadow: inherit; }
}
@keyframes meter-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(7px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 960px) {
  .mode-navigation { position: static; }
  .section-heading-actions { align-items: flex-start; flex-direction: column; }
  .section-heading-actions > .database-actions,
  .section-heading-actions > .radar-window-control { width: 100%; }
}

@media (max-width: 800px) {
  body::before { height: 170px; }
  .workspace { margin-top: 12px; padding-inline: 12px; }
  .mode-navigation { gap: 5px; padding: 5px; }
  .mode-tab { min-height: 60px; padding: 9px 10px; }
  .mode-tab::after { right: 10px; left: 10px; bottom: 5px; }
  .form-section { padding: 24px 20px 28px; }
  .section-heading h2 { font-size: 18px; }
  .database-filter-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .database-filter-bar .search-field { grid-column: 1 / -1; }
  .database-filter-bar select { min-width: 0; width: 100%; }
  .database-filter-bar .text-button { justify-self: start; }
}

@media (max-width: 520px) {
  .topbar { padding-inline: 12px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand p { max-width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .primary-toolbar { width: 100%; justify-content: space-between; margin-left: 0; }
  .database-health { min-width: 0; flex: 1; }
  .mode-tab small { display: none; }
  .mode-tab strong { line-height: 1.35; }
  .workflow-rail { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .workflow-rail::-webkit-scrollbar { display: none; }
  .workflow-rail > i { min-width: 18px; flex: 0 0 18px; }
  .workflow-step { flex: 0 0 auto; }
  .database-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .database-actions > * { width: 100%; justify-content: center; }
  .insight-heading { flex-direction: column; }
  .heat-insight-panel { padding: 16px; }
  .heat-radar-toolbar { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .workbench-enter,
  .data-refreshed,
  .insight-rank-row em,
  .trend-row em,
  .heat-meter i,
  .data-tools-menu,
  .observation-dialog,
  .favorites-dialog,
  .observation-dialog::backdrop,
  .favorites-dialog::backdrop { animation: none !important; }
  .market-line,
  .market-area { animation: none !important; }
  .mode-tab:hover,
  .heat-card:hover,
  .primary-button:hover,
  .secondary-button:hover { transform: none; }
}

/* Reference-led glass refinement: translucent shells with solid data surfaces. */
:root {
  --glass-surface: rgba(255, 255, 255, .66);
  --glass-surface-strong: rgba(255, 255, 255, .82);
  --glass-surface-soft: rgba(248, 251, 255, .58);
  --glass-line: rgba(255, 255, 255, .72);
  --glass-shadow: 0 16px 42px rgba(39, 61, 98, .10), 0 2px 8px rgba(39, 61, 98, .04);
  --glass-blur: 14px;
}

body {
  background-color: #eef3f9;
  background-image:
    linear-gradient(rgba(77, 105, 158, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 105, 158, .025) 1px, transparent 1px);
  background-size: 40px 40px;
}

body::before {
  inset: 0;
  height: auto;
  background: linear-gradient(135deg, rgba(226, 237, 255, .82), rgba(249, 243, 250, .72) 48%, rgba(229, 245, 241, .72));
  border: 0;
}

.topbar {
  border-bottom-color: rgba(255, 255, 255, .76);
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 10px 32px rgba(38, 58, 94, .08), inset 0 -1px rgba(200, 214, 232, .48);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(130%);
  backdrop-filter: blur(var(--glass-blur)) saturate(130%);
}

.database-health,
.browser-picker select,
.browser-login-button {
  border-color: var(--glass-line);
  background: rgba(255, 255, 255, .58);
  box-shadow: inset 0 1px rgba(255, 255, 255, .78), var(--shadow-xs);
}

.data-tools-menu {
  border-color: var(--glass-line);
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
}

.workspace { margin-top: 24px; gap: 16px 20px; }

.mode-navigation {
  top: 84px;
  padding: 7px;
  border-color: var(--glass-line);
  background: rgba(255, 255, 255, .56);
  box-shadow: var(--glass-shadow), inset 0 1px rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(130%);
  backdrop-filter: blur(var(--glass-blur)) saturate(130%);
}

.mode-tab {
  min-height: 68px;
  background: rgba(255, 255, 255, .18);
}
.mode-tab:hover {
  border-color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .56);
  box-shadow: inset 0 1px rgba(255, 255, 255, .88);
}
.mode-tab.active {
  border-color: rgba(194, 209, 235, .88);
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 10px 24px rgba(50, 79, 127, .12), inset 0 1px rgba(255, 255, 255, .96);
}
.mode-tab-index {
  border: 1px solid rgba(255, 255, 255, .82);
  background: rgba(241, 245, 252, .72);
  box-shadow: inset 0 1px rgba(255, 255, 255, .9);
}

.workflow-rail {
  border-color: var(--glass-line);
  background: rgba(255, 255, 255, .52);
  box-shadow: 0 8px 22px rgba(38, 58, 94, .055), inset 0 1px rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  backdrop-filter: blur(10px) saturate(125%);
}
.workflow-step b { background: rgba(255, 255, 255, .76); }
.workflow-step.active b { background: var(--accent); }

.form-column,
.result-column {
  border-color: var(--glass-line);
  background: var(--glass-surface);
  box-shadow: var(--glass-shadow), inset 0 1px rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(125%);
  backdrop-filter: blur(var(--glass-blur)) saturate(125%);
}

.form-section {
  position: relative;
  background: rgba(255, 255, 255, .30);
  border-bottom-color: rgba(212, 223, 237, .72);
}
.form-section::after {
  content: "";
  position: absolute;
  right: 32px;
  bottom: 0;
  left: 32px;
  height: 1px;
  pointer-events: none;
  background: rgba(255, 255, 255, .62);
}
.form-section:last-of-type::after { display: none; }

.section-number {
  border-color: rgba(197, 213, 237, .82);
  background: rgba(237, 243, 255, .74);
  box-shadow: inset 0 1px rgba(255, 255, 255, .92);
}
.section-heading h2 { text-wrap: balance; }

.database-summary,
.heat-radar-summary,
.radar-summary,
.batch-summary {
  border-color: rgba(255, 255, 255, .86);
  background: rgba(255, 255, 255, .46);
  box-shadow: 0 8px 22px rgba(43, 66, 105, .055), inset 0 1px rgba(255, 255, 255, .9);
}
.database-summary > div,
.heat-radar-summary > div,
.radar-summary > div,
.batch-summary > div { background: rgba(255, 255, 255, .42); }

.heat-insight-panel {
  border-color: rgba(255, 255, 255, .82);
  background: rgba(250, 249, 255, .60);
  box-shadow: 0 18px 38px rgba(79, 66, 143, .10), inset 0 1px rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  backdrop-filter: blur(10px) saturate(125%);
}
.heat-insight-summary,
.heat-insight-block { border-color: rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .72); }

.database-filter-bar,
.heat-radar-toolbar {
  border-color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .46);
  box-shadow: inset 0 1px rgba(255, 255, 255, .88), 0 6px 18px rgba(43, 66, 105, .045);
}

.database-filter-bar input,
.database-filter-bar select,
.field input,
.field select,
.field textarea,
.deep-alias-memory-actions input,
.deep-alias-memory-actions select {
  border-color: rgba(204, 216, 232, .88);
  background: rgba(255, 255, 255, .82);
  box-shadow: inset 0 1px rgba(255, 255, 255, .92);
}

.database-table-wrap {
  border-color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .54);
  box-shadow: 0 8px 24px rgba(43, 66, 105, .055), inset 0 1px rgba(255, 255, 255, .9);
}
.database-table th { background: rgba(242, 246, 252, .88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.database-table tbody tr:hover { background: rgba(241, 246, 255, .72); }

.research-source-panel,
.research-result-panel,
.deep-source-workbench,
.deep-match-mode,
.deep-ai-settings,
.deep-search-option,
.deep-query-panel,
.batch-source-grid,
.radar-entry-mode,
.batch-history-toolbar,
.product-panel,
.match-result,
.cost-decision-summary,
.advanced-cost-details,
.deep-alias-memory-panel {
  border-color: rgba(255, 255, 255, .86);
  background: rgba(255, 255, 255, .52);
  box-shadow: 0 9px 24px rgba(43, 66, 105, .055), inset 0 1px rgba(255, 255, 255, .88);
}

.research-source-panel,
.deep-source-workbench { border-left-color: var(--accent); }

.product-preview,
.deep-source-preview,
.deep-query-chip,
.radar-entry-tab,
.scenario-card { background: rgba(248, 251, 255, .72); }

.heat-card,
.deep-candidate,
.batch-candidate,
.radar-single-card,
.favorite-item {
  border-color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 9px 24px rgba(43, 66, 105, .065), inset 0 1px rgba(255, 255, 255, .92);
}
.heat-card:hover,
.deep-candidate:hover,
.batch-candidate:hover,
.radar-single-card:hover {
  border-color: rgba(190, 208, 235, .92);
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 15px 32px rgba(43, 66, 105, .10), inset 0 1px rgba(255, 255, 255, .96);
}

.primary-button {
  background: #3d6fdf;
  box-shadow: 0 9px 20px rgba(55, 105, 220, .22), inset 0 1px rgba(255, 255, 255, .24);
}
.secondary-button,
.link-button {
  border-color: rgba(255, 255, 255, .86);
  background: rgba(255, 255, 255, .60);
  box-shadow: inset 0 1px rgba(255, 255, 255, .9), var(--shadow-xs);
}
.secondary-button:hover { background: rgba(255, 255, 255, .86); }

.form-actions {
  border-top-color: rgba(255, 255, 255, .82);
  background: rgba(248, 251, 255, .54);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.result-column { background: rgba(255, 255, 255, .72); }
.result-header { box-shadow: inset 0 1px rgba(255, 255, 255, .10); }

.observation-dialog,
.favorites-dialog {
  border-color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 28px 72px rgba(30, 46, 76, .22), inset 0 1px rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  backdrop-filter: blur(20px) saturate(130%);
}
.favorites-dialog-header { background: rgba(255, 255, 255, .76); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 8px; background: rgba(72, 101, 157, .28); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(55, 105, 220, .62); background-clip: padding-box; }
* { scrollbar-width: thin; scrollbar-color: rgba(72, 101, 157, .30) transparent; }

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar,
  .mode-navigation,
  .workflow-rail,
  .form-column,
  .result-column,
  .data-tools-menu { background: rgba(255, 255, 255, .94); }
}

@media (max-width: 800px) {
  :root { --glass-blur: 10px; }
  .workspace { margin-top: 14px; }
  .form-section::after { right: 20px; left: 20px; }
  .mode-navigation { background: rgba(255, 255, 255, .72); }
  .form-column,
  .result-column { background: rgba(255, 255, 255, .76); }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar,
  .mode-navigation,
  .workflow-rail,
  .form-column,
  .result-column,
  .data-tools-menu,
  .observation-dialog,
  .favorites-dialog { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* V4.0 · IP heat observation board */
:root {
  --v4-cobalt: #315fe8;
  --v4-cobalt-dark: #2047bd;
  --v4-cobalt-soft: #eef3ff;
  --v4-sakura: #f05b82;
  --v4-sakura-soft: #fff0f4;
  --v4-mint: #20a883;
  --v4-mint-soft: #eaf9f4;
  --v4-charcoal: #171b24;
  --v4-canvas: #f3f5f8;
  --v4-line: #d9dee7;
}

body {
  min-width: 320px;
  background-color: var(--v4-canvas);
  background-image:
    linear-gradient(rgba(56, 67, 88, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 67, 88, .035) 1px, transparent 1px);
  background-size: 36px 36px;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: 68px;
  border-bottom: 1px solid rgba(196, 204, 219, .84);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 24px rgba(32, 43, 68, .06);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  backdrop-filter: blur(14px) saturate(125%);
}

.brand-mark {
  position: relative;
  overflow: hidden;
  border: 1px solid #1f283c;
  border-radius: 6px;
  background: var(--v4-charcoal);
  box-shadow: 5px 5px 0 var(--v4-sakura-soft);
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  right: -4px;
  top: -4px;
  border: 2px solid var(--v4-sakura);
  transform: rotate(45deg);
}
.brand h1 { color: var(--v4-charcoal); font-size: 19px; }
.brand p { color: #687083; }
.database-health > span { background: var(--v4-mint); box-shadow: 0 0 0 4px rgba(32, 168, 131, .10); }

.workspace { max-width: 1480px; margin-top: 22px; }
.mode-navigation {
  position: sticky;
  z-index: 18;
  top: 80px;
  padding: 6px;
  border: 1px solid rgba(206, 213, 225, .86);
  border-radius: 8px;
  background: rgba(249, 251, 255, .86);
  box-shadow: 0 10px 26px rgba(39, 54, 86, .07), inset 0 1px rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
}
.mode-tab {
  min-height: 60px;
  border-color: transparent;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}
.mode-tab:hover { border-color: #d7deeb; background: #fff; }
.mode-tab.active {
  border-color: #cfd9f4;
  background: #fff;
  box-shadow: 0 8px 18px rgba(45, 72, 137, .09), inset 0 -2px var(--v4-cobalt);
}
.mode-tab-index {
  border: 1px solid #d7deea;
  background: #f2f5fa;
  color: #727b8e;
}
.mode-tab.active .mode-tab-index { border-color: var(--v4-charcoal); background: var(--v4-charcoal); }
.mode-tab.active strong { color: var(--v4-cobalt-dark); }

.workflow-rail {
  min-height: 38px;
  border-color: #d8dee8;
  background: rgba(255, 255, 255, .66);
  box-shadow: none;
}
.workflow-step.active { color: var(--v4-cobalt-dark); }
.workflow-step.active b { border-color: var(--v4-cobalt); background: var(--v4-cobalt); }
.workflow-step.completed { color: var(--v4-mint); }

.form-column,
.result-column {
  border-color: rgba(207, 214, 226, .94);
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 18px 52px rgba(39, 53, 82, .08), inset 0 1px rgba(255, 255, 255, .96);
}
.form-section { background: transparent; }
[data-workbench-panel],
#profitWorkbenchStart { scroll-margin-top: 164px; }
.section-number {
  min-width: 42px;
  padding: 5px 7px;
  border: 1px solid #cdd7ee;
  border-radius: 4px;
  background: var(--v4-cobalt-soft);
  color: var(--v4-cobalt-dark);
  text-align: center;
}
.section-kicker { color: var(--v4-cobalt-dark); }
.section-heading h2 { color: var(--v4-charcoal); font-size: 20px; }
.section-heading p { max-width: 760px; line-height: 1.6; }

.heat-radar-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 680px;
  padding: 30px 32px 34px;
}
.heat-radar-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 260px;
  height: 130px;
  right: -90px;
  top: -46px;
  border: 1px solid rgba(240, 91, 130, .26);
  background: repeating-linear-gradient(135deg, rgba(240, 91, 130, .055) 0 7px, transparent 7px 14px);
  transform: rotate(-6deg);
}
.heat-radar-section .section-heading { margin-bottom: 18px; }

.heat-window-control {
  padding: 3px;
  border-color: #d6dce7;
  border-radius: 6px;
  background: #f1f4f8;
}
.heat-window-control label + label { border-left: 0; }
.heat-window-control span { min-height: 30px; padding: 0 14px; border-radius: 4px; background: transparent; font-size: 10px; }
.heat-window-control input:checked + span { background: var(--v4-charcoal); box-shadow: 0 4px 10px rgba(23, 27, 36, .18); }

.heat-board-notice {
  min-height: 44px;
  margin-bottom: 12px;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d8e1f5;
  border-left: 3px solid var(--v4-cobalt);
  border-radius: 5px;
  background: #f7f9ff;
  color: #5b6476;
}
.heat-board-notice > span { color: var(--v4-sakura); font-size: 18px; line-height: 1; }
.heat-board-notice p { margin: 0; font-size: 10px; line-height: 1.55; }
.heat-board-notice strong { margin-right: 5px; color: var(--v4-charcoal); }
.demo-heat-notice {
  min-height: 46px;
  margin-bottom: 12px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid #273244;
  border-left: 3px solid #35c7a2;
  border-radius: 5px;
  background: #171d28;
  color: #cbd5e2;
}
.demo-heat-notice > span { padding: 4px 6px; border: 1px solid #3d4a5f; color: #7ee6c0; font: 700 8px/1 "Cascadia Mono", "Consolas", monospace; }
.demo-heat-notice p { margin: 0; font-size: 9px; line-height: 1.55; }
.demo-heat-notice strong { margin-right: 5px; color: #fff; font-size: 10px; }

.heat-board-toolbar {
  min-height: 52px;
  margin-bottom: 12px;
  padding: 8px 11px;
  border: 1px solid #dce2ec;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}
.heat-board-toolbar > label { min-width: 0; display: flex; align-items: center; gap: 9px; color: #616a7c; font-size: 10px; }
.heat-cohort-summary { min-width: 0; display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 2px 9px; }
.heat-cohort-summary > span { grid-row: 1 / 3; align-self: center; color: #697387; font-size: 9px; }
.heat-cohort-summary strong { color: var(--v4-charcoal); font-size: 11px; }
.heat-cohort-summary small { color: #8a93a2; font-size: 8px; }
.heat-board-toolbar select {
  width: min(560px, 52vw);
  min-width: 280px;
  height: 34px;
  border: 1px solid #d5dce8;
  border-radius: 4px;
  background: #f8fafc;
  color: var(--v4-charcoal);
}
.heat-legend { flex-wrap: wrap; justify-content: flex-end; }
.status-dot.rising { background: var(--v4-mint); }
.status-dot.steady { background: var(--v4-cobalt); }
.status-dot.risk { background: var(--v4-sakura); }

.heat-radar-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 12px;
  overflow: hidden;
  border-color: #dce2ec;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}
.heat-radar-summary > div { min-width: 0; padding: 12px 14px 11px 24px; background: #fff; }
.heat-radar-summary > div::before { width: 3px; height: 24px; top: 13px; border-radius: 0; background: var(--v4-cobalt); }
.heat-radar-summary > div:nth-child(2)::before { background: var(--v4-sakura); }
.heat-radar-summary > div:nth-child(3)::before { background: var(--v4-mint); }
.heat-radar-summary > div:nth-child(4)::before { background: #8268d5; }
.heat-radar-summary > div:nth-child(5)::before { background: #e99c28; }
.heat-radar-summary strong { color: var(--v4-charcoal); font-size: 21px; line-height: 1; }
.heat-radar-summary small { color: #8a92a2; font-size: 8px; }

.heat-board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(280px, .72fr);
  gap: 12px;
  align-items: stretch;
}
.heat-radar-section,
.heat-board-layout,
.heat-ranking-panel,
.heat-board-lower { min-width: 0; }
.heat-ranking-panel,
.heat-ranking-detail {
  min-width: 0;
  border: 1px solid #d9dfe9;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(36, 50, 78, .055);
}
.heat-ranking-head {
  min-height: 52px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e1e5ed;
  background: #f8fafc;
}
.heat-ranking-head > div { min-width: 0; display: grid; gap: 3px; }
.heat-ranking-head strong { color: var(--v4-charcoal); font-size: 12px; }
.heat-ranking-head small,
.heat-ranking-head > span { overflow: hidden; color: #7d8596; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.heat-ranking-table-wrap { position: relative; min-height: 344px; overflow-x: auto; }
.heat-ranking-table { width: 100%; min-width: 650px; border-collapse: collapse; table-layout: fixed; }
.heat-ranking-table th {
  height: 34px;
  padding: 0 11px;
  border-bottom: 1px solid #e5e8ee;
  background: #fff;
  color: #8a91a0;
  font-size: 8px;
  font-weight: 700;
  text-align: left;
}
.heat-ranking-table th:nth-child(1) { width: 58px; }
.heat-ranking-table th:nth-child(2) { width: 27%; }
.heat-ranking-table th:nth-child(3) { width: 24%; }
.heat-ranking-table th:nth-child(4) { width: 80px; }
.heat-ranking-table th:nth-child(5) { width: 94px; }
.heat-ranking-table th:nth-child(6) { width: 88px; }
.heat-ranking-table td { height: 59px; padding: 8px 11px; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
.heat-ranking-table tr { cursor: pointer; transition: background-color 150ms ease, box-shadow 150ms ease; }
.heat-ranking-table tbody tr:hover { background: #f6f8fd; }
.heat-ranking-table tbody tr.selected { background: #eef3ff; box-shadow: inset 3px 0 var(--v4-cobalt); }
.heat-ranking-table tbody tr:focus-visible { outline: 2px solid var(--v4-cobalt); outline-offset: -2px; }
.heat-ranking-table td > strong,
.heat-ranking-table td > small { display: block; }
.heat-ranking-table td > strong { overflow: hidden; color: var(--v4-charcoal); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.heat-ranking-table td > small { margin-top: 4px; color: #8b93a2; font-size: 8px; }
.heat-rank-number {
  width: 30px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #dde2ea;
  border-radius: 4px;
  background: #f6f7f9;
  color: #727a88;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 9px;
}
.heat-rank-number.rank-1 { border-color: #e9c76a; background: #fff8df; color: #8e6811; }
.heat-rank-number.rank-2 { border-color: #bfc8d6; background: #f3f6fa; color: #596474; }
.heat-rank-number.rank-3 { border-color: #dcaa86; background: #fff1e9; color: #9b5933; }
.heat-index-value { display: inline-block; width: 30px; color: var(--v4-charcoal); font-family: "Cascadia Mono", "Consolas", monospace; font-size: 13px; font-weight: 800; }
.heat-index-bar { width: calc(100% - 36px); height: 5px; display: inline-block; overflow: hidden; border-radius: 3px; background: #e9edf3; vertical-align: 2px; }
.heat-index-bar em { display: block; height: 100%; border-radius: inherit; background: var(--v4-cobalt); animation: meter-grow 420ms ease-out both; }
.heat-rank-trend { min-width: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 4px 6px; border-radius: 4px; font-size: 8px; font-style: normal; font-weight: 800; }
.heat-rank-trend.up { background: var(--v4-mint-soft); color: #11785e; }
.heat-rank-trend.down { background: var(--v4-sakura-soft); color: #b43c5e; }
.heat-rank-trend.flat { background: #f1f3f7; color: #667081; }
.heat-rank-trend.new { background: var(--v4-cobalt-soft); color: var(--v4-cobalt-dark); }
.heat-confidence { display: inline-block; padding: 4px 6px; border: 1px solid; border-radius: 4px; font-size: 8px; font-weight: 700; white-space: nowrap; }
.heat-confidence.high { border-color: #b8e3d6; background: var(--v4-mint-soft); color: #11785e; }
.heat-confidence.medium { border-color: #cad7fa; background: var(--v4-cobalt-soft); color: var(--v4-cobalt-dark); }
.heat-confidence.low { border-color: #f1c5d0; background: var(--v4-sakura-soft); color: #b43c5e; }

.heat-ranking-detail { overflow: hidden; background: var(--v4-charcoal); color: #eef2f8; }
.heat-detail-empty { min-height: 100%; padding: 38px 24px; display: grid; place-content: center; justify-items: center; gap: 7px; text-align: center; }
.heat-detail-empty > span { color: var(--v4-sakura); font-size: 24px; }
.heat-detail-empty strong { font-size: 13px; }
.heat-detail-empty small { color: #8e99aa; font-size: 9px; }
.heat-detail-head { min-height: 92px; padding: 16px 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1px solid #303746; background-image: linear-gradient(135deg, rgba(49, 95, 232, .18), transparent 55%); }
.heat-detail-head > div { min-width: 0; display: grid; gap: 4px; }
.heat-detail-head > div > span { color: #8093c4; font-family: "Cascadia Mono", "Consolas", monospace; font-size: 8px; }
.heat-detail-head h3 { margin: 0; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.heat-detail-head small { color: #8994a6; font-size: 8px; }
.heat-detail-head > strong { color: #fff; font-family: "Cascadia Mono", "Consolas", monospace; font-size: 33px; line-height: 1; }
.heat-detail-head > strong small { font-size: 9px; }
.heat-detail-meters { padding: 14px 18px 10px; display: grid; gap: 12px; }
.heat-detail-meter { display: grid; gap: 5px; }
.heat-detail-meter > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.heat-detail-meter span { color: #cdd4df; font-size: 9px; }
.heat-detail-meter strong { color: #fff; font-family: "Cascadia Mono", "Consolas", monospace; font-size: 10px; }
.heat-detail-meter strong small { color: #737f91; font-size: 7px; }
.heat-detail-meter > i { height: 4px; overflow: hidden; border-radius: 2px; background: #323a47; }
.heat-detail-meter em { display: block; height: 100%; background: var(--v4-cobalt); animation: meter-grow 420ms ease-out both; }
.heat-detail-meter em.pink { background: var(--v4-sakura); }
.heat-detail-meter em.mint { background: #35c7a2; }
.heat-detail-meter em.violet { background: #9d7bf0; }
.heat-detail-meter em.amber { background: #eab85d; }
.heat-detail-meter > small { color: #7f8a9b; font-size: 7px; }
.heat-detail-explain { margin: 4px 18px 18px; padding: 11px 12px; display: grid; gap: 5px; border: 1px solid #363f4d; border-radius: 5px; background: #202630; }
.heat-detail-explain strong { margin-bottom: 2px; color: #eef2f8; font-size: 9px; }
.heat-detail-explain span { position: relative; padding-left: 10px; color: #e5a8b8; font-size: 8px; }
.heat-detail-explain span::before { content: ""; position: absolute; left: 0; top: 5px; width: 4px; height: 4px; background: var(--v4-sakura); transform: rotate(45deg); }
.heat-detail-explain span.positive { color: #8cdec7; }
.heat-detail-explain span.positive::before { background: #35c7a2; }
.heat-detail-explain small { margin-top: 4px; color: #778395; font-size: 7px; line-height: 1.5; }

.heat-board-lower { margin-top: 12px; display: grid; grid-template-columns: minmax(480px, .92fr) minmax(300px, .58fr); gap: 12px; align-items: stretch; }
.heat-board-lower .heat-market-terminal { max-width: none; border-radius: 7px; box-shadow: 0 12px 28px rgba(5, 9, 15, .16); }
.heat-board-lower .heat-market-body { min-height: 210px; }
.heat-board-lower .heat-market-chart svg { height: 210px; }
.heat-board-lower .heat-market-chart { background-size: 38px 27px; }
.heat-board-lower .heat-market-legend { align-content: start; max-height: 216px; overflow-y: auto; }
.heat-board-secondary { display: block; }
.heat-board-method { min-height: 100%; padding: 15px 17px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 8px; border: 1px solid #d9dfe9; border-radius: 7px; background: #fff; box-shadow: 0 10px 26px rgba(36, 50, 78, .055); }
.heat-board-method strong { grid-column: 1 / -1; margin-bottom: 4px; color: var(--v4-charcoal); font-size: 12px; }
.heat-board-method span { padding: 8px 9px; border-left: 2px solid var(--v4-cobalt); background: #f6f8fc; color: #566074; font-size: 9px; }
.heat-board-method span:nth-of-type(2) { border-left-color: var(--v4-sakura); }
.heat-board-method span:nth-of-type(3) { border-left-color: var(--v4-mint); }
.heat-board-method span:nth-of-type(4) { border-left-color: #e5a33d; }
.heat-board-method small { grid-column: 1 / -1; margin-top: 5px; color: #7d8594; font-size: 8px; line-height: 1.6; }
.heat-board-method.demo-guide strong { color: #173b83; }
.heat-board-method.demo-guide span { background: #f7f9ff; }
.heat-board-method.demo-guide small { padding-top: 7px; border-top: 1px solid #e1e6ef; color: #566074; }

.observation-advanced { border: 1px solid #dbe1eb; border-radius: 6px; background: #f7f9fc; }
.observation-advanced summary { padding: 11px 13px; color: #596275; font-size: 10px; font-weight: 700; cursor: pointer; }
.observation-advanced[open] summary { border-bottom: 1px solid #dfe4ed; }
.observation-advanced > .field-grid { padding: 14px; }

@media (max-width: 1320px) {
  .heat-radar-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .heat-radar-summary > div { grid-column: span 2; }
  .heat-radar-summary > div + div { border-left: 0; }
  .heat-radar-summary > div:nth-child(2),
  .heat-radar-summary > div:nth-child(3),
  .heat-radar-summary > div:nth-child(5) { border-left: 1px solid var(--v4-line); }
  .heat-radar-summary > div:nth-child(n + 4) { border-top: 1px solid var(--v4-line); }
  .heat-radar-summary > div:nth-child(n + 4) { grid-column: span 3; }
  .heat-board-layout { grid-template-columns: 1fr; }
  .heat-ranking-detail { min-height: 320px; }
}

@media (max-width: 1120px) {
  .heat-board-lower { grid-template-columns: 1fr; }
  .heat-board-method { min-height: 150px; }
}

@media (max-width: 800px) {
  body { background-size: 28px 28px; }
  .topbar { position: relative; }
  .workspace { padding: 0 12px; }
  .mode-navigation { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-tab { min-height: 58px; padding: 8px 9px; }
  .heat-radar-section { min-height: 0; padding: 22px 18px 26px; }
  .heat-radar-section .section-heading-actions { align-items: stretch; }
  .heat-window-control { width: 100%; }
  .heat-board-toolbar { align-items: stretch; }
  .heat-board-toolbar > label { display: grid; }
  .heat-board-toolbar select { width: 100%; min-width: 0; }
  .heat-legend { justify-content: flex-start; }
  .heat-radar-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heat-radar-summary > div { grid-column: auto; }
  .heat-radar-summary > div + div { border-left: 0; }
  .heat-radar-summary > div:nth-child(even) { border-left: 1px solid var(--v4-line); }
  .heat-radar-summary > div:nth-child(n + 3) { border-top: 1px solid var(--v4-line); }
  .heat-radar-summary > div:last-child { grid-column: 1 / -1; border-left: 0; }
  .heat-board-layout { display: block; }
  .heat-ranking-detail { min-height: 0; margin-top: 12px; }
  .heat-ranking-table-wrap { min-height: 300px; }
  .heat-board-lower { grid-template-columns: 1fr; }
  .heat-market-body { grid-template-columns: minmax(0, 1fr) 96px; }
  .heat-market-title small { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  [data-workbench-panel],
  #profitWorkbenchStart { scroll-margin-top: 12px; }
}

@media (max-width: 480px) {
  .brand p { max-width: 220px; }
  .mode-tab-index { display: none; }
  .mode-tab small { display: none; }
  .mode-tab { justify-content: center; text-align: center; }
  .workflow-rail { overflow-x: auto; }
  .workflow-step span { display: inline; }
  .heat-board-notice { align-items: flex-start; }
  .heat-market-header { align-items: stretch; flex-direction: column; gap: 8px; }
  .heat-market-controls { width: 100%; align-items: stretch; }
  .heat-market-count-control { justify-content: space-between; }
  .heat-market-range { width: 100%; }
  .heat-market-range button { flex: 1; }
  .heat-market-body { display: block; }
  .heat-market-legend { padding: 8px 10px 10px; display: flex; flex-wrap: wrap; border-left: 0; border-top: 1px solid #202833; }
  .heat-market-legend span { width: auto; }
  .heat-board-method { grid-template-columns: 1fr; }
  .heat-board-method strong,
  .heat-board-method small { grid-column: auto; }
}

/* V4.0 annual archive experience: pearl glass, sakura, turquoise and gold. */
:root {
  --archive-pink: #e889a7;
  --archive-pink-soft: rgba(255, 232, 240, .78);
  --archive-cyan: #5eb9bd;
  --archive-cyan-soft: rgba(225, 248, 249, .78);
  --archive-gold: #d6ad70;
  --archive-gold-soft: rgba(255, 246, 226, .8);
  --archive-ink: #51545d;
  --archive-muted: #858995;
  --archive-glass: rgba(255, 255, 255, .6);
  --archive-line: rgba(255, 255, 255, .78);
  --archive-shadow: 0 20px 54px rgba(117, 129, 155, .14), inset 0 1px rgba(255, 255, 255, .86);
}

body {
  min-height: 100vh;
  background: linear-gradient(rgba(255, 255, 255, .06), rgba(255, 255, 255, .06)), url("assets/dimension-glass-background-v2.webp") center / cover fixed;
  color: var(--archive-ink);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: 66px;
  padding: 9px max(22px, calc((100vw - 1500px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 8px 26px rgba(119, 132, 158, .08);
  backdrop-filter: blur(22px) saturate(125%);
}
.brand-mark {
  border: 1px solid rgba(232, 137, 167, .28);
  background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(255,228,238,.72));
  box-shadow: 0 7px 18px rgba(214, 121, 151, .14), inset 0 1px rgba(255,255,255,.9);
  color: var(--archive-pink);
}
.brand h1 { color: #5b5c64; font-family: "STKaiti", "KaiTi", "Microsoft YaHei", sans-serif; font-size: 20px; font-weight: 600; }
.brand p { color: #8c8e98; font-size: 10px; }
.database-health strong { color: #676a74; }
.database-health > span { background: var(--archive-cyan); box-shadow: 0 0 0 4px rgba(94,185,189,.12); }
.primary-toolbar .secondary-button { border-color: rgba(133, 151, 177, .22); background: rgba(255,255,255,.58); color: #6a6e79; backdrop-filter: blur(12px); }

.workspace {
  max-width: 1360px;
  min-height: calc(100vh - 90px);
  margin: 18px auto 36px;
  padding: 0 22px;
  grid-template-columns: 72px minmax(0, 1fr) !important;
  gap: 14px;
  align-items: start;
}
.mode-navigation {
  position: sticky;
  top: 84px;
  grid-column: 1;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 1px solid var(--archive-line);
  border-radius: 8px;
  background: rgba(255,255,255,.42);
  box-shadow: var(--archive-shadow);
  backdrop-filter: blur(20px) saturate(120%);
}
.mode-tab {
  width: 50px;
  height: 50px;
  min-height: 50px;
  padding: 0;
  display: grid;
  place-items: center;
  border-color: transparent;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #747782;
}
.mode-tab:hover { border-color: rgba(255,255,255,.82); background: rgba(255,255,255,.55); color: #5eaeb1; transform: translateY(-1px); }
.mode-tab.active { border-color: rgba(232,137,167,.42); background: rgba(255,255,255,.76); color: var(--archive-pink); box-shadow: 0 8px 22px rgba(150,120,140,.12), inset 0 0 0 4px rgba(255,236,243,.72); }
.mode-tab-icon { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.mode-nav-separator { width: 3px; height: 3px; border-radius: 50%; background: rgba(143,145,154,.22); }
.workflow-rail { display: none !important; }
.form-column { width: min(100%, 1180px); justify-self: center; grid-column: 2; border: 0; border-radius: 8px; background: transparent; box-shadow: none; overflow: visible; }
.form-section { border: 1px solid var(--archive-line); border-radius: 8px; background: var(--archive-glass); box-shadow: var(--archive-shadow); backdrop-filter: blur(22px) saturate(120%); }
.heat-radar-section { min-height: min(760px, calc(100vh - 112px)); padding: 27px 34px; overflow: hidden; scroll-margin-top: 78px; }

.heat-experience-view { min-width: 0; }
.heat-view-enter { animation: archive-view-in .34s ease both; }
@keyframes archive-view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.heat-portal-view { min-height: min(690px, calc(100vh - 170px)); display: grid; align-content: center; gap: 27px; padding: 12px 18px 2px; }
.heat-portal-hero { position: relative; display: grid; justify-items: center; text-align: center; }
.heat-portal-spark { position: absolute; top: 9px; margin-left: -315px; color: var(--archive-gold); font-size: 19px; filter: drop-shadow(0 0 7px rgba(214,173,112,.34)); }
.heat-portal-hero h2 {
  margin: 0;
  color: transparent;
  background: linear-gradient(90deg, #e4789b 24%, #d9a67f 48%, #5caaad 76%);
  background-clip: text;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 52px;
  font-weight: 500;
  line-height: 1.1;
  text-shadow: 0 10px 32px rgba(213, 139, 167, .12);
}
.heat-portal-hero > p { margin: 14px 0 21px; color: #777984; font-family: "STSong", "SimSun", serif; font-size: 17px; letter-spacing: 4px; }
.heat-portal-workbench {
  width: min(960px, calc(100vw - 180px));
  margin: 0 auto;
  padding: 24px 28px 18px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.62), rgba(255,255,255,.42) 52%, rgba(236,250,249,.4));
  box-shadow: 0 22px 56px rgba(100,112,142,.12), inset 0 1px rgba(255,255,255,.94);
  backdrop-filter: blur(20px) saturate(120%);
}
body.archive-portal-active .heat-portal-workbench {
  width: min(960px, calc(100vw - 180px));
  margin: 0 auto;
  padding: 24px 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.archive-portal-active .heat-portal-workbench .heat-portal-search { width: 100%; }
.heat-portal-search { width: 100%; height: 52px; padding: 0 18px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border: 1px solid rgba(214, 178, 155, .46); border-radius: 26px; background: rgba(255,255,255,.62); box-shadow: 0 11px 28px rgba(145,126,145,.1), inset 0 1px rgba(255,255,255,.92); backdrop-filter: blur(16px); }
.heat-portal-search > span { color: #7e8089; font-size: 29px; line-height: 1; transform: rotate(-18deg); }
.heat-portal-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #585b64; font-size: 14px; }
.heat-portal-search input::placeholder { color: #a7a8ae; }
.heat-portal-search i { color: var(--archive-gold); font-size: 21px; font-style: normal; }

.heat-category-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  grid-template-rows: repeat(2, 154px);
  gap: 16px;
  padding: 10px 0 20px;
}
.heat-category-card {
  --portal-card-accent: #dc7e9c;
  position: relative;
  min-width: 0;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
  padding: 22px;
  display: grid;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,255,255,.7), rgba(255,239,245,.38));
  box-shadow: 0 13px 30px rgba(160, 117, 139, .1), inset 0 1px rgba(255,255,255,.95);
  color: #676972;
  text-align: left;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.heat-category-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255,255,255,.32), transparent 44%); pointer-events: none; }
.heat-category-card::after { content: ""; position: absolute; right: -34px; bottom: -52px; width: 132px; height: 132px; border: 1px solid currentColor; border-radius: 50%; box-shadow: 0 0 0 18px rgba(255,255,255,.08); opacity: .1; pointer-events: none; }
.heat-category-card:hover, .heat-category-card.search-match { z-index: 2; border-color: currentColor; box-shadow: 0 16px 34px rgba(145,111,136,.14), inset 0 1px rgba(255,255,255,.95); transform: translateY(-2px); }
.portal-card-atlas { grid-column: 1; grid-row: 1 / 3; grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: 1fr auto; padding: 34px 36px 28px; }
.portal-card-intelligence { grid-column: 2; grid-row: 1; }
.portal-card-favorites { grid-column: 2; grid-row: 2; }
.portal-card-intelligence,
.portal-card-favorites { grid-template-columns: 58px minmax(0, 1fr) auto; padding: 20px 22px; }
.heat-category-icon { position: relative; z-index: 1; width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; background: rgba(255,255,255,.4); opacity: .78; }
.heat-category-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.portal-card-atlas .heat-category-icon { width: 86px; height: 86px; align-self: start; }
.portal-card-atlas .heat-category-icon svg { width: 52px; height: 52px; }
.portal-card-copy { min-width: 0; display: grid; gap: 7px; color: #747781; }
.portal-card-copy > small { color: currentColor; font-family: Georgia, serif; font-size: 9px; letter-spacing: 1.8px; opacity: .72; }
.portal-card-copy strong { color: #5d6069; font-family: "STSong", "SimSun", serif; font-size: 18px; font-weight: 600; line-height: 1.35; }
.portal-card-copy > span { color: #858791; font-size: 10px; line-height: 1.7; }
.portal-card-atlas .portal-card-copy strong { font-size: 27px; }
.portal-card-atlas .portal-card-copy > span { max-width: 390px; font-size: 11px; }
.portal-card-action { position: relative; z-index: 2; color: currentColor; font-size: 9px; white-space: nowrap; opacity: .78; }
.portal-card-action b { margin-left: 7px; font-size: 16px; font-weight: 400; }
.portal-card-atlas .portal-card-action { grid-column: 1 / 3; justify-self: end; }
.heat-category-card.tone-pink { --portal-card-accent: #dc7e9c; color: #dc7e9c; }
.heat-category-card.tone-cyan { --portal-card-accent: #55a9ad; border-color: rgba(255,255,255,.82); background: linear-gradient(145deg, rgba(255,255,255,.7), rgba(229,249,249,.42)); color: #55a9ad; }
.heat-category-card.tone-cyan::before { border-color: rgba(94,185,189,.2); }
.heat-category-card.tone-rose { --portal-card-accent: #d77d94; border-color: rgba(224,133,154,.36); background: linear-gradient(155deg, rgba(255,255,255,.82), rgba(255,234,239,.52)); color: #d77d94; }
.heat-category-card.tone-gold { --portal-card-accent: #c5985d; border-color: rgba(214,173,112,.4); background: linear-gradient(155deg, rgba(255,255,255,.8), rgba(255,247,230,.6)); color: #c5985d; }
.heat-category-card.tone-gold::before { border-color: rgba(214,173,112,.22); }
.heat-category-card.tone-mint { --portal-card-accent: #5aa89f; border-color: rgba(255,255,255,.82); background: linear-gradient(145deg, rgba(255,255,255,.7), rgba(229,247,245,.42)); color: #5aa89f; }
.heat-category-card.tone-mint::before { border-color: rgba(96,181,171,.2); }
.heat-portal-footer { padding-top: 21px; display: flex; justify-content: center; flex-wrap: wrap; gap: 20px 0; border-top: 1px solid rgba(255,255,255,.76); }
.heat-portal-footer span { min-width: 210px; padding: 0 22px; color: #858892; font-size: 10px; text-align: center; }
.heat-portal-footer span + span { border-left: 1px solid rgba(125,135,150,.2); }
.heat-portal-footer b { margin-right: 7px; color: var(--archive-pink); }
.heat-portal-footer span:nth-child(2) b { color: var(--archive-cyan); }
.heat-portal-footer span:nth-child(3) b { color: var(--archive-gold); }
.heat-portal-footer strong { margin-left: 5px; color: #696c75; font-size: 12px; }

.heat-view-toolbar { margin-bottom: 18px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 20px; }
.heat-view-toolbar > div { min-width: 0; display: grid; gap: 4px; text-align: center; }
.heat-view-toolbar > div > span { color: var(--archive-pink); font-family: Georgia, serif; font-size: 9px; letter-spacing: 1.8px; text-transform: uppercase; }
.heat-view-toolbar h2 { margin: 0; color: #5f626b; font-family: "STSong", "SimSun", serif; font-size: 25px; font-weight: 500; }
.heat-view-toolbar p { margin: 0; color: #989aa2; font-size: 9px; }
.heat-back-button { min-height: 35px; padding: 0 12px; border: 1px solid rgba(132,143,161,.22); border-radius: 5px; background: rgba(255,255,255,.54); color: #747781; font-size: 9px; }
.heat-back-button span { margin-right: 6px; color: var(--archive-pink); }
.heat-back-button:hover { border-color: rgba(232,137,167,.5); color: #b65878; }
.heat-radar-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 13px; border-color: rgba(255,255,255,.78); background: rgba(255,255,255,.46); box-shadow: none; }
.heat-radar-summary > div { padding: 11px 15px; }
.heat-radar-summary > div,
.heat-radar-summary > div:nth-child(n) { grid-column: auto; border-top: 0; }
.heat-radar-summary > div + div { border-left-color: rgba(135,145,160,.14); }
.heat-radar-summary span, .heat-radar-summary small { color: #999ba3; }
.heat-radar-summary strong { color: #5f626a; }
.demo-heat-notice { margin-bottom: 12px; border-color: rgba(214,173,112,.3); background: rgba(255,248,231,.58); color: #756445; }

.heat-board-view .heat-market-terminal { max-width: none; margin-bottom: 14px; border: 1px solid rgba(72,83,99,.34); border-radius: 7px; background: #090c11; box-shadow: 0 16px 32px rgba(37,42,51,.18); }
.heat-board-view .heat-market-body { min-height: 230px; grid-template-columns: minmax(0, 1fr) 150px; }
.heat-board-view .heat-market-chart svg { height: 230px; }
.heat-board-view .heat-market-title strong { font-family: "Microsoft YaHei", sans-serif; letter-spacing: 0; }
.heat-market-count-control select { color: #d2dae3; }
.heat-ranking-panel { border-color: rgba(255,255,255,.78); background: rgba(255,255,255,.58); box-shadow: 0 13px 30px rgba(112,128,154,.09); backdrop-filter: blur(16px); }
.heat-ranking-head { background: rgba(255,255,255,.48); border-bottom-color: rgba(132,144,161,.12); }
.heat-ranking-table-wrap { min-height: 0; }
.heat-ranking-table { min-width: 600px; }
.heat-ranking-table th:nth-child(1) { width: 70px; }
.heat-ranking-table th:nth-child(2) { width: 34%; }
.heat-ranking-table th:nth-child(3) { width: 38%; }
.heat-ranking-table th:nth-child(4) { width: 120px; }
.heat-ranking-table th { background: rgba(255,255,255,.36); border-bottom-color: rgba(132,144,161,.12); color: #999ba4; }
.heat-ranking-table td { height: 55px; border-bottom-color: rgba(132,144,161,.1); }
.heat-ranking-table tbody tr:hover { background: rgba(255,240,246,.52); }
.heat-ranking-table td > strong { color: #60636c; font-family: "STSong", "SimSun", serif; font-size: 12px; }
.heat-ranking-table td > small { color: #9b9da5; }
.heat-rank-number { border-color: rgba(126,139,157,.18); background: rgba(255,255,255,.62); color: #858893; }
.heat-rank-number.rank-1 { border-color: rgba(214,173,112,.46); background: var(--archive-gold-soft); color: #a5783e; }
.heat-rank-number.rank-2 { border-color: rgba(94,185,189,.36); background: var(--archive-cyan-soft); color: #478e92; }
.heat-rank-number.rank-3 { border-color: rgba(232,137,167,.38); background: var(--archive-pink-soft); color: #b65c7b; }
.heat-index-bar { background: rgba(128,143,164,.12); }
.heat-index-bar em { background: linear-gradient(90deg, var(--archive-pink), var(--archive-cyan)); }
.heat-rank-trend.up { background: rgba(224,247,243,.8); color: #458e85; }
.heat-rank-trend.down { background: rgba(255,233,240,.82); color: #b75f7b; }
.heat-rank-trend.flat { background: rgba(239,241,245,.75); color: #767a84; }
.heat-board-method { margin-top: 14px; min-height: auto; border-color: rgba(255,255,255,.78); background: rgba(255,255,255,.48); box-shadow: none; }
.heat-board-method span { border-left-color: var(--archive-pink); background: rgba(255,255,255,.45); }

.heat-ip-overview { display: grid; grid-template-columns: 180px 180px minmax(0, 1fr); gap: 12px; margin-bottom: 14px; }
.heat-ip-overview > section { min-width: 0; min-height: 118px; padding: 18px; border: 1px solid rgba(255,255,255,.78); border-radius: 7px; background: rgba(255,255,255,.5); box-shadow: 0 12px 28px rgba(113,129,153,.08); }
.heat-ip-overview span { color: #9699a2; font-size: 9px; }
.heat-ip-overview strong { margin-top: 11px; display: block; color: #60636c; font-family: Georgia, serif; font-size: 31px; font-weight: 500; }
.heat-ip-overview small { margin-top: 5px; display: block; color: #92959e; font-size: 8px; }
.heat-ip-rank-card { border-top: 2px solid rgba(232,137,167,.64) !important; }
.heat-ip-score-card { border-top: 2px solid rgba(94,185,189,.64) !important; }
.heat-ip-rank-card small b { font-size: inherit; }
.heat-ip-rank-card small .up { color: #3e9185; }
.heat-ip-rank-card small .down { color: #b45c77; }
.heat-ip-summary-card { border-top: 2px solid rgba(214,173,112,.64) !important; }
.heat-ip-summary-card p { margin: 13px 0 0; color: #6f727b; font-size: 11px; line-height: 1.8; }
.heat-ip-detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, .72fr); gap: 14px; }
.heat-ip-trend-panel, .heat-ip-merch-panel { min-width: 0; padding: 17px; border: 1px solid rgba(255,255,255,.78); border-radius: 7px; background: rgba(255,255,255,.52); box-shadow: 0 12px 28px rgba(113,129,153,.08); }
.heat-ip-panel-head { margin-bottom: 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.heat-ip-panel-head strong { color: #61646d; font-family: "STSong", "SimSun", serif; font-size: 15px; }
.heat-ip-panel-head small { color: #9a9ca4; font-size: 8px; }
.heat-ip-trend-chart { height: 300px; overflow: hidden; border-radius: 5px; background-color: rgba(255,255,255,.35); background-image: linear-gradient(rgba(94,185,189,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(232,137,167,.07) 1px, transparent 1px); background-size: 48px 40px; }
.heat-ip-trend-chart svg { width: 100%; height: 300px; }
.heat-ip-trend-chart .market-grid line { stroke: rgba(106,122,143,.16); }
.heat-ip-trend-chart .market-grid text, .heat-ip-trend-chart .market-dates text { fill: #8c909a; }
.heat-ip-trend-chart .market-points circle { stroke: rgba(255,255,255,.9); }
.heat-ip-merch-list { display: grid; gap: 17px; }
.heat-ip-merch-list > div { display: grid; grid-template-columns: 24px 1fr; gap: 5px 9px; align-items: center; }
.heat-ip-merch-list span { grid-row: span 2; color: var(--archive-pink); font-family: Georgia, serif; font-size: 10px; }
.heat-ip-merch-list strong { color: #686b74; font-size: 11px; }
.heat-ip-merch-list i { height: 4px; overflow: hidden; border-radius: 2px; background: linear-gradient(90deg, var(--archive-pink), var(--archive-cyan)); opacity: .72; }

footer { color: rgba(87,93,105,.65); text-shadow: 0 1px rgba(255,255,255,.7); }

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 64px minmax(0, 1fr) !important; padding-inline: 12px; }
  .mode-tab { width: 46px; height: 46px; min-height: 46px; }
  .heat-category-grid { grid-template-columns: minmax(0, 1.45fr) minmax(220px, .9fr); grid-template-rows: repeat(2, 142px); gap: 14px; }
  .heat-category-card { height: auto; min-height: 0; }
  .portal-card-atlas { padding: 28px; }
  .heat-portal-workbench { width: min(100%, calc(100vw - 118px)); }
  .heat-radar-section.atlas-board-active { width: min(100%, calc(100vw - 118px)); }
  .heat-ip-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heat-ip-summary-card { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { background-attachment: scroll; }
  .topbar { position: relative; padding-inline: 12px; }
  .database-health { display: none; }
  .workspace { display: block; margin-top: 10px; padding-inline: 8px; }
  .mode-navigation { position: static; margin: 0 auto 8px; grid-template-columns: repeat(7, auto); justify-content: center; padding: 5px 10px; }
  .mode-nav-separator { align-self: center; }
  .mode-tab { width: 45px; height: 45px; min-height: 45px; }
  .form-column { width: 100%; }
  .heat-radar-section { min-height: 0; padding: 18px 13px; scroll-margin-top: 10px; }
  .heat-radar-section.atlas-board-active { width: 100%; min-height: 0; padding: 18px 13px; }
  .atlas-board-active .heat-board-view { min-height: 0; }
  .atlas-board-active .atlas-ring-view { min-height: 500px; }
  .atlas-board-active .atlas-orbit-shell { height: 470px; }
  .heat-portal-view { min-height: auto; padding: 20px 0 8px; }
  .heat-radar-section.portal-home-active { min-height: 0; padding: 10px 0 18px; }
  .portal-home-active .heat-portal-view { min-height: 0; padding-top: 8px; }
  .heat-portal-workbench { width: 100%; padding: 18px 13px 16px; }
  .heat-portal-hero h2 { font-size: 39px; }
  .heat-portal-hero > p { font-size: 13px; letter-spacing: 2px; }
  .heat-portal-spark { display: none; }
  .heat-category-grid { grid-template-columns: 1fr; grid-template-rows: none; gap: 11px; padding-inline: 0; }
  .portal-card-atlas,
  .portal-card-intelligence,
  .portal-card-favorites { grid-column: 1; grid-row: auto; }
  .portal-card-atlas { min-height: 190px; padding: 22px; grid-template-columns: 68px minmax(0, 1fr); }
  .portal-card-intelligence,
  .portal-card-favorites { min-height: 138px; padding: 18px 20px; grid-template-columns: 52px minmax(0, 1fr) auto; }
  .portal-card-atlas .heat-category-icon { width: 64px; height: 64px; }
  .portal-card-atlas .heat-category-icon svg { width: 39px; height: 39px; }
  .heat-category-icon { width: 50px; height: 50px; }
  .heat-category-icon svg { width: 29px; height: 29px; }
  .portal-card-atlas .portal-card-copy strong { font-size: 22px; }
  .heat-portal-footer span { min-width: 0; width: 100%; }
  .heat-portal-footer span + span { border-left: 0; }
  .heat-view-toolbar { grid-template-columns: 1fr; justify-items: start; }
  .heat-view-toolbar > div { width: 100%; text-align: left; }
  .heat-radar-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heat-radar-summary > div:nth-child(odd) { border-left: 0; }
  .heat-radar-summary > div:nth-child(n+3) { border-top: 1px solid rgba(135,145,160,.14); }
  .heat-board-view .heat-market-body { grid-template-columns: 1fr; }
  .heat-board-view .heat-market-legend { padding: 8px 10px 10px; display: flex; flex-wrap: wrap; border-left: 0; border-top: 1px solid #202833; }
  .heat-ip-overview, .heat-ip-detail-grid { grid-template-columns: 1fr; }
  .heat-ip-summary-card { grid-column: auto; }
  .heat-ip-trend-chart, .heat-ip-trend-chart svg { height: 240px; }
}

/* Legacy modules remain in the DOM for recovery compatibility, but are not part of the current product route. */
.legacy-module,
[data-legacy-module] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.archive-portal-active .mode-navigation {
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
}

body.archive-portal-active .mode-navigation .mode-tab[data-workbench-mode="radar"] {
  margin-inline: auto;
}

@media (max-width: 430px) {
  .brand p { display: none; }
  .heat-category-grid { grid-template-columns: 1fr; }
  .portal-card-atlas { min-height: 176px; }
  .heat-portal-search { width: 100%; }
  .heat-ranking-table { min-width: 560px; }
}

@media (max-width: 760px) {
  .intelligence-book-reader {
    position: fixed;
    z-index: 40;
    background: rgba(222, 228, 235, .76);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .intelligence-book-close {
    position: fixed;
    z-index: 60;
    top: 18px;
    left: 16px;
    width: 38px;
    min-height: 38px;
    padding: 0;
    font-size: 0;
  }
  .intelligence-book-close span { margin: 0; font-size: 18px; }
  .intelligence-book-shell {
    position: fixed;
    top: 50%;
    width: calc(100vw - 24px);
    height: min(720px, calc(100vh - 90px));
    aspect-ratio: auto;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(rgba(255, 252, 246, .7), rgba(255, 250, 243, .84)), url("assets/homepage/book-page-texture.webp") center / cover;
    box-shadow: 0 24px 52px rgba(32, 39, 55, .22), inset 0 1px rgba(255,255,255,.8);
  }
  .intelligence-book-reader.is-focused .intelligence-book-shell { transform: translate(-50%, -50%) scale(1); }
  .intelligence-book-open-spread,
  .intelligence-book-cover,
  .intelligence-book-motion-sequence,
  .intelligence-book-motion-sequence { display: none; }
  .intelligence-book-directory,
  .intelligence-book-detail { inset: 28px 20px 22px; overflow-x: hidden; overflow-y: auto; }
  .intelligence-book-directory { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 18px; }
  .intelligence-book-directory header,
  .intelligence-book-detail header { position: static; width: auto; margin: 0 auto; padding-left: 0; justify-items: center; text-align: center; }
  .intelligence-book-directory header::after,
  .intelligence-book-detail header::after { display: none; }
  .intelligence-book-directory header small,
  .intelligence-book-detail header small { font-size: 8px; letter-spacing: 2px; }
  .intelligence-book-directory header h3,
  .intelligence-book-detail header h3 { font-size: 21px; }
  .intelligence-book-directory header p,
  .intelligence-book-detail header p { font-size: 8px; }
  .intelligence-book-index-stamp { display: none; }
  /* Keep the two guide entries compact while reserving a full row for the
     seasonal archive. The timeline note must stay inside its paper frame on
     short phone viewports instead of being clipped by the row's min-height. */
  .intelligence-book-directory-grid { position: static; width: 100%; height: auto; margin: 0; grid-template-columns: 1fr; grid-template-rows: minmax(128px, 1fr) minmax(128px, 1fr) minmax(196px, auto); gap: 9px; }
  .intelligence-book-entry { min-height: 0; padding: 9px 30px 9px 50px; }
  .intelligence-book-entry > span:not(.intelligence-book-entry-art) { left: 10px; width: 30px; height: 30px; font-size: 14px; }
  .intelligence-book-entry strong { font-size: 13px; }
  .intelligence-book-entry small { font-size: 8px; }
  .intelligence-book-entry b { right: 10px; }
  .intelligence-book-timeline { min-height: 196px; padding: 12px 10px 10px; overflow: visible; }
  .intelligence-book-timeline-heading strong { font-size: 17px; }
  .intelligence-book-timeline-control { margin-top: 10px; }
  .intelligence-book-timeline-viewport { overflow-x: auto; overflow-y: visible; scrollbar-width: none; }
  .intelligence-book-timeline-viewport::-webkit-scrollbar { display: none; }
  .intelligence-book-timeline-track { transform: none; }
  .intelligence-book-timeline-note { grid-template-columns: auto 1fr; }
  .intelligence-book-timeline-note p { grid-column: 1 / -1; }
  .intelligence-book-detail { display: block; }
  .intelligence-book-page-back { position: sticky; top: 0; left: 0; min-height: 30px; padding: 0 8px; background: rgba(250,246,237,.84); font-size: 9px; }
  .intelligence-book-detail header { margin: 8px 0 14px; }
  .intelligence-book-detail-content { position: static; width: auto; height: auto; margin-top: 14px; }
  .intelligence-book-topic-grid,
  .intelligence-book-term-list { grid-template-columns: 1fr; }
  .intelligence-book-topic-grid { gap: 8px; }
  .intelligence-book-topic-grid strong,
  .intelligence-book-term-list dt,
  .intelligence-book-checklist strong { font-size: 12px; }
  .intelligence-book-topic-grid p,
  .intelligence-book-term-list dd,
  .intelligence-book-checklist span,
  .intelligence-book-query-guide small { font-size: 8px; }
  .intelligence-book-query-guide p { font-size: 12px; }
  .intelligence-book-query-chips button { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .heat-view-enter, .market-line, .heat-index-bar em { animation: none !important; }
  .heat-category-card, .mode-tab { transition: none !important; }
}

/* V4.1 IP observation atlas */
@property --atlas-orbit-progress {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes atlas-orbit-revolve {
  from { --atlas-orbit-progress: 0deg; }
  to { --atlas-orbit-progress: 360deg; }
}
.brand-logo-crop { position: relative; flex: 0 0 52px; width: 52px; height: 52px; overflow: hidden; }
.brand-logo { position: absolute; top: 0; left: 50%; width: 64px; height: auto; max-width: none; transform: translateX(-50%); filter: drop-shadow(0 5px 9px rgba(211, 126, 157, .14)); }
.brand > div { display: block; }
.brand h1 { font-size: 19px; }
.brand p { font-size: 9px; }

.atlas-category-picker {
  width: min(920px, 100%);
  margin: 54px auto 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.atlas-category-option {
  position: relative;
  isolation: isolate;
  min-height: 158px;
  padding: 25px 24px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 16px;
  border: 1px solid rgba(232, 137, 167, .3);
  border-radius: 6px;
  background: rgba(255, 247, 250, .58);
  color: #d57898;
  text-align: left;
  box-shadow: 0 14px 30px rgba(125, 115, 139, .08), inset 0 1px rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
  contain: layout paint;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.atlas-category-option:hover { border-color: currentColor; box-shadow: 0 16px 30px rgba(125, 115, 139, .12); transform: translateY(-2px); }
.atlas-category-option > span, .atlas-category-option strong, .atlas-category-option small { position: relative; z-index: 3; max-width: 55%; }
.atlas-category-option > span { grid-row: 1 / 3; width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; background: rgba(255,255,255,.5); font-family: "STKaiti", "KaiTi", serif; font-size: 22px; box-shadow: inset 0 0 0 5px rgba(255,255,255,.2); }
.atlas-category-option strong { color: #4e5360; font-family: "STSong", "SimSun", serif; font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: .02em; }
.atlas-category-option small { color: #727783; font-size: 11px; line-height: 1.55; letter-spacing: .01em; }
.atlas-category-poster { position: absolute; z-index: 0; inset: 0; display: block; overflow: hidden; pointer-events: none; }
.atlas-category-poster::before, .atlas-category-poster::after { content: ""; position: absolute; inset: 0; }
.atlas-category-poster::before { background-image: var(--atlas-poster-image); background-position: var(--atlas-poster-position, right center); background-repeat: no-repeat; background-size: cover; opacity: 0; transform: scale(1); filter: saturate(.78) brightness(1.03) contrast(.92); transition: opacity .35s ease, transform .28s ease, filter .28s ease; }
.atlas-category-poster::after { background: var(--atlas-poster-overlay, linear-gradient(90deg, rgba(255,255,255,.96), rgba(255,255,255,.12))); opacity: 0; transition: opacity .35s ease; }
.atlas-category-option.poster-ready .atlas-category-poster::before { opacity: .88; }
.atlas-category-option.poster-ready .atlas-category-poster::after { opacity: 1; }
.atlas-category-option.poster-ready:hover .atlas-category-poster::before { transform: scale(1.02); filter: saturate(.88) brightness(1.04) contrast(.96); }
.atlas-category-option.tone-cyan { border-color: rgba(94,185,189,.32); background: rgba(235,250,250,.58); color: #55a9ad; }
.atlas-category-option.tone-gold { border-color: rgba(214,173,112,.34); background: rgba(255,248,234,.58); color: #c5985d; }
.atlas-category-option.tone-mint { border-color: rgba(96,181,171,.32); background: rgba(232,248,245,.58); color: #5aa89f; }

.atlas-period-view { position: relative; min-height: 0; padding-top: 42px; }
.atlas-period-grid {
  width: min(820px, 100%);
  margin: 12px auto 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.atlas-period-option { min-height: 112px; padding: 16px; grid-template-columns: 42px minmax(0, 1fr); gap: 3px 10px; }
.atlas-period-option > span { width: 45px; height: 45px; font-size: 13px; white-space: nowrap; }
.atlas-period-option strong { font-size: 14px; }
.atlas-period-option small { font-size: 9px; }
.atlas-period-option > span, .atlas-period-option strong, .atlas-period-option small { max-width: 62%; }

.atlas-ring-view { position: relative; min-height: 610px; padding-top: 4px; }
.atlas-category-back { position: absolute; z-index: 3; top: 0; left: 0; min-height: 34px; padding: 0 11px; border: 1px solid rgba(136,145,160,.2); border-radius: 5px; background: rgba(255,255,255,.54); color: #747781; font-size: 9px; }
.atlas-category-back span { margin-right: 5px; color: var(--archive-pink); }
.atlas-motion-toggle { position: absolute; z-index: 5; top: 0; right: 0; min-height: 34px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(94,185,189,.24); border-radius: 5px; background: rgba(255,255,255,.58); color: #658b8d; font-size: 9px; box-shadow: 0 7px 18px rgba(112,128,154,.06); }
.atlas-motion-toggle:hover { border-color: rgba(94,185,189,.52); background: rgba(244,253,252,.78); color: #468e92; }
.atlas-motion-toggle:disabled { cursor: default; opacity: .68; }
.atlas-motion-icon { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.atlas-motion-toggle .play-icon { display: none; }
.atlas-motion-toggle.is-paused .pause-icon { display: none; }
.atlas-motion-toggle.is-paused .play-icon { display: block; }
.atlas-orbit-shell {
  --atlas-shell-width: min(100%, 800px);
  --atlas-orbit-radius: min(25vw, 220px);
  position: relative;
  width: var(--atlas-shell-width);
  height: 500px;
  margin: 0 auto;
  isolation: isolate;
}
.atlas-orbit-shell::before,
.atlas-orbit-shell::after { content: ""; position: absolute; left: 50%; top: 50%; border: 1px solid rgba(103, 182, 185, .19); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.atlas-orbit-shell::before { width: calc(var(--atlas-orbit-radius) * 2); height: calc(var(--atlas-orbit-radius) * 2); box-shadow: 0 0 0 15px rgba(255,255,255,.16), 0 0 46px rgba(112,185,188,.08); }
.atlas-orbit-shell::after { width: calc(var(--atlas-orbit-radius) * 1.58); height: calc(var(--atlas-orbit-radius) * 1.58); border-color: rgba(232,137,167,.2); border-style: dashed; }
.atlas-orbit-decoration { position: absolute; inset: 0; pointer-events: none; }
.atlas-orbit-decoration::before,
.atlas-orbit-decoration::after { content: "✦"; position: absolute; color: rgba(214,173,112,.62); font-size: 20px; filter: drop-shadow(0 0 7px rgba(214,173,112,.28)); }
.atlas-orbit-decoration::before { left: 12%; top: 22%; }
.atlas-orbit-decoration::after { right: 11%; bottom: 23%; }
.atlas-orbit-decoration i { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; border: 1px solid rgba(232,137,167,.48); border-radius: 50%; background: rgba(255,255,255,.72); }
.atlas-orbit-decoration i:nth-child(1) { transform: translate(calc(var(--atlas-orbit-radius) * -1.05), -34px); }
.atlas-orbit-decoration i:nth-child(2) { transform: translate(calc(var(--atlas-orbit-radius) * .98), 58px); border-color: rgba(94,185,189,.5); }
.atlas-orbit-decoration i:nth-child(3) { transform: translate(34px, calc(var(--atlas-orbit-radius) * -1.04)); border-color: rgba(214,173,112,.5); }
.atlas-orbit-center { position: absolute; z-index: 2; left: 50%; top: 50%; width: 230px; height: 230px; padding: 28px; display: grid; place-content: center; justify-items: center; gap: 7px; border: 1px solid rgba(232,137,167,.28); border-radius: 50%; background: rgba(255,255,255,.64); box-shadow: 0 18px 50px rgba(128,119,146,.13), inset 0 0 0 10px rgba(255,243,247,.34); text-align: center; transform: translate(-50%, -50%); backdrop-filter: blur(15px); }
.atlas-orbit-center::before { content: "✦"; color: var(--archive-gold); font-size: 19px; }
.atlas-orbit-center > span { color: #d8829d; font-family: Georgia, serif; font-size: 10px; letter-spacing: 2px; }
.atlas-orbit-center strong { color: #5f626b; font-family: "STKaiti", "KaiTi", serif; font-size: 22px; font-weight: 500; line-height: 1.45; }
.atlas-orbit-center small { color: #989aa2; font-size: 8px; }
.atlas-orbit-items { position: absolute; inset: 0; }
.atlas-orbit-item { position: absolute; z-index: 2; left: 50%; top: 50%; width: max-content; min-width: 44px; min-height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; direction: ltr; unicode-bidi: isolate; border: 0; background: transparent; color: #777984; transform: translate(-50%, -50%) rotate(calc(var(--atlas-angle) + var(--atlas-orbit-progress))) translateX(var(--atlas-orbit-radius)) rotate(calc(-1 * (var(--atlas-angle) + var(--atlas-orbit-progress)))); animation: atlas-orbit-revolve 90s linear infinite; transition: color .18s ease, filter .18s ease; }
.atlas-ring-view.motion-paused .atlas-orbit-item,
.atlas-orbit-shell:hover .atlas-orbit-item,
.atlas-orbit-shell:focus-within .atlas-orbit-item { animation-play-state: paused; }
.atlas-orbit-item:hover { z-index: 4; color: #cf6f90; filter: drop-shadow(0 6px 8px rgba(205,111,144,.18)); }
.atlas-name-initial { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; background: rgba(255,255,255,.82); color: #d87595; font-family: "STKaiti", "KaiTi", serif; font-size: 21px; box-shadow: 0 8px 17px rgba(128,119,146,.1), inset 0 0 0 4px rgba(255,240,245,.45); }
.atlas-name-rest { max-width: 110px; padding: 5px 9px; border-bottom: 1px solid currentColor; color: #6b6e77; font-family: "STSong", "SimSun", serif; font-size: 12px; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.atlas-orbit-empty { position: absolute; z-index: 4; left: 50%; bottom: 58px; width: min(340px, 80%); margin: 0; padding: 12px 15px; border: 1px solid rgba(232,137,167,.2); border-radius: 6px; background: rgba(255,255,255,.58); color: #777b86; font-size: 10px; line-height: 1.7; text-align: center; transform: translateX(-50%); }
.atlas-disclaimer { width: min(880px, 100%); margin: 8px auto 0; padding: 11px 15px; border-left: 2px solid rgba(232,137,167,.58); background: rgba(255,255,255,.4); color: #868991; font-size: 9px; line-height: 1.7; text-align: center; }
.atlas-disclaimer.compact { margin-top: 17px; }

.atlas-profile-hero { min-height: 178px; padding: 26px 30px; display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 24px; border: 1px solid rgba(255,255,255,.78); border-radius: 7px; background: rgba(255,255,255,.52); box-shadow: 0 14px 34px rgba(113,129,153,.08); }
.atlas-profile-initial { width: 106px; height: 106px; display: grid; place-items: center; border: 1px solid rgba(232,137,167,.48); border-radius: 50%; background: rgba(255,240,246,.58); color: #d67898; font-family: "STKaiti", "KaiTi", serif; font-size: 45px; box-shadow: inset 0 0 0 8px rgba(255,255,255,.48); }
.atlas-profile-hero h3 { margin: 9px 0 7px; color: #5f626b; font-family: "STSong", "SimSun", serif; font-size: 27px; font-weight: 500; }
.atlas-profile-hero p { margin: 0; color: #747780; font-size: 11px; line-height: 1.85; }
.atlas-status { display: inline-flex; padding: 4px 8px; border: 1px solid rgba(94,185,189,.28); border-radius: 4px; background: rgba(229,247,245,.62); color: #4f9d95; font-size: 8px; }
.atlas-status.pending { border-color: rgba(214,173,112,.32); background: rgba(255,247,230,.65); color: #b98b51; }
.atlas-profile-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.atlas-profile-panel { min-width: 0; min-height: 118px; padding: 18px; border: 1px solid rgba(255,255,255,.78); border-radius: 7px; background: rgba(255,255,255,.5); box-shadow: 0 12px 28px rgba(113,129,153,.07); }
.atlas-profile-panel > span { color: #999ba3; font-size: 9px; }
.atlas-profile-panel > p { margin: 12px 0 0; color: #686b74; font-size: 11px; line-height: 1.8; }
.atlas-profile-wide { grid-column: 1 / -1; }
.atlas-token-list { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.atlas-token-list span { padding: 6px 9px; border: 1px solid rgba(232,137,167,.22); border-radius: 4px; background: rgba(255,240,246,.48); color: #8b6573; font-size: 9px; }
.atlas-token-list.merch span { border-color: rgba(94,185,189,.24); background: rgba(230,248,247,.5); color: #568a8c; }
.atlas-token-list.keywords span { border-color: rgba(214,173,112,.25); background: rgba(255,248,233,.52); color: #927751; }
.atlas-merch-reference-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.atlas-merch-reference { min-width: 0; overflow: hidden; border: 1px solid rgba(201, 174, 125, .22); border-radius: 6px; background: rgba(255, 251, 241, .48); }
.atlas-merch-reference-media { height: 118px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(245, 228, 202, .45), rgba(235, 242, 244, .52)); }
.atlas-merch-reference-media img { width: 100%; height: 100%; display: block; object-fit: contain; }
.atlas-merch-reference-media span { color: rgba(111, 100, 90, .54); font-size: 10px; }
.atlas-merch-reference-copy { display: grid; gap: 4px; padding: 9px 10px 10px; }
.atlas-merch-reference-copy strong { color: #765f4a; font-size: 11px; font-weight: 600; }
.atlas-merch-reference-copy small { min-height: 2.4em; color: rgba(93, 91, 95, .72); font-size: 9px; line-height: 1.4; }
.atlas-merch-reference-copy em { color: rgba(142, 111, 75, .66); font-size: 8px; font-style: normal; }
.atlas-merch-reference-copy a { color: #6f8796; font-size: 8px; text-decoration: none; }
.atlas-merch-reference-copy a:hover { text-decoration: underline; }
.atlas-reference-caption { margin: 7px 0 0 !important; color: rgba(72, 77, 89, .62) !important; font-size: 9px !important; }
.atlas-reference-empty { margin: 12px 0 0; color: rgba(79, 84, 95, .58); font-size: 10px; }

@media (max-width: 900px) {
  .atlas-orbit-shell { height: 560px; transform: scale(.9); transform-origin: top center; margin-bottom: -52px; }
  .atlas-category-picker { margin-top: 30px; }
  .atlas-period-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .brand-logo-crop { flex-basis: 44px; width: 44px; height: 44px; }
  .brand-logo { width: 54px; }
  .atlas-category-picker { grid-template-columns: 1fr; gap: 10px; margin: 22px auto 18px; }
  .atlas-period-view { padding-top: 0; }
  .atlas-period-view .atlas-category-back { position: relative; }
  .atlas-period-grid { grid-template-columns: 1fr; gap: 10px; margin: 12px auto 18px; }
  .atlas-period-option { min-height: 108px; padding: 15px; }
  .atlas-category-option { min-height: 118px; padding: 17px; }
  .atlas-category-option > span, .atlas-category-option strong, .atlas-category-option small { max-width: 64%; }
  .atlas-category-option.poster-ready .atlas-category-poster::before { opacity: .52; background-position: 82% bottom; }
  .atlas-category-poster::after { background: linear-gradient(90deg, rgba(255,255,255,.98), rgba(255,255,255,.89) 57%, rgba(255,255,255,.36)); }
  .atlas-ring-view { min-height: 500px; }
  .atlas-category-back { position: relative; margin-bottom: 8px; }
  .atlas-motion-toggle { top: 0; }
  .atlas-orbit-shell { --atlas-orbit-radius: min(36vw, 140px); width: 100%; height: 470px; margin: 0; transform: none; }
  .atlas-orbit-shell::before { width: 290px; height: 290px; }
  .atlas-orbit-shell::after { width: 235px; height: 235px; }
  .atlas-orbit-center { width: 145px; height: 145px; padding: 18px; }
  .atlas-orbit-center strong { font-size: 14px; }
  .atlas-orbit-item { animation-duration: 110s; }
  .atlas-name-initial { flex-basis: 37px; width: 37px; height: 37px; font-size: 17px; }
  .atlas-name-rest { display: none; }
  .atlas-orbit-decoration i { display: none; }
  .atlas-disclaimer { margin-top: 0; text-align: left; }
  .atlas-profile-hero { grid-template-columns: 76px minmax(0, 1fr); gap: 15px; padding: 20px 16px; }
  .atlas-profile-initial { width: 72px; height: 72px; font-size: 31px; }
  .atlas-profile-hero h3 { font-size: 20px; }
  .atlas-profile-grid { grid-template-columns: 1fr; }
  .atlas-profile-wide { grid-column: auto; }
  .atlas-merch-reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-category-option, .atlas-orbit-item { transition: none !important; }
  .atlas-category-poster::before, .atlas-category-poster::after { transition: none !important; }
  .atlas-orbit-item { animation: none !important; --atlas-orbit-progress: 0deg; }
}

/* V4.1+ lightweight visual refinement */
.heat-radar-section {
  background:
    linear-gradient(135deg, rgba(255,255,255,.68), rgba(255,255,255,.44) 48%, rgba(236,250,249,.42));
  box-shadow:
    0 24px 64px rgba(100, 112, 142, .13),
    inset 0 1px rgba(255,255,255,.94),
    inset 0 0 0 1px rgba(255,255,255,.24);
}
.heat-radar-section.portal-home-active {
  min-height: calc(100vh - 116px);
  padding: 8px 0 18px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.heat-radar-section.portal-home-active::before,
.heat-radar-section.portal-home-active::after { display: none; }
.heat-radar-section.atlas-board-active {
  width: min(1080px, calc(100vw - 180px));
  min-height: min(690px, calc(100vh - 116px));
  margin-inline: auto;
  padding: 24px 28px 22px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.62), rgba(255,255,255,.43) 54%, rgba(236,250,249,.42));
  box-shadow: 0 22px 56px rgba(100,112,142,.12), inset 0 1px rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  backdrop-filter: blur(20px) saturate(120%);
}
.atlas-board-active .heat-board-view { min-height: 638px; }
.atlas-board-active .heat-view-toolbar { margin-bottom: 8px; }
.atlas-board-active .atlas-category-picker { margin-top: 30px; margin-bottom: 20px; }
.atlas-board-active .atlas-ring-view { min-height: 552px; }
.atlas-board-active .atlas-orbit-shell { height: 535px; }
.atlas-board-active .atlas-disclaimer { margin-top: 5px; }

/* Keep the atlas directory compact on desktop: the title stays on the scene,
   while the glass panel frames the actionable category controls. */
@media (min-width: 761px) {
  .heat-radar-section.atlas-board-active {
    width: min(860px, calc(100vw - 180px));
    min-height: min(570px, calc(100vh - 150px));
    padding: 16px 22px 16px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .heat-radar-section.atlas-board-active::before {
    inset: 68px 0 23px;
    z-index: -1;
    width: auto;
    height: auto;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255,255,255,.62), rgba(255,255,255,.43) 54%, rgba(236,250,249,.42));
    box-shadow: 0 22px 56px rgba(100,112,142,.12), inset 0 1px rgba(255,255,255,.94);
    transform: none;
    pointer-events: none;
  }
  .atlas-board-active .heat-board-view { min-height: 520px; }
  .atlas-board-active .heat-view-toolbar {
    margin-bottom: 2px;
    gap: 12px;
  }
  .atlas-board-active .heat-view-toolbar > div { gap: 2px; }
  .atlas-board-active .heat-view-toolbar > div > span { font-size: 8px; letter-spacing: 1.5px; }
  .atlas-board-active .heat-view-toolbar h2 { font-size: 21px; }
  .atlas-board-active .heat-view-toolbar p { font-size: 8px; }
  .atlas-board-active .heat-back-button,
  .atlas-board-active .atlas-category-back,
  .atlas-board-active .atlas-motion-toggle {
    min-height: 30px;
    padding-inline: 9px;
    font-size: 8px;
  }
  .atlas-board-active .atlas-category-picker {
    width: min(820px, 100%);
    margin-top: 20px;
    margin-bottom: 12px;
    gap: 12px;
  }
  .atlas-board-active.atlas-period-active {
    min-height: 0;
    padding-bottom: 14px;
  }
  .atlas-board-active.atlas-period-active::before {
    inset: 68px 0 0;
    bottom: 0;
  }
  .atlas-board-active.atlas-period-active::after { display: none; }
  .atlas-board-active.atlas-period-active .heat-board-view { min-height: 0; }
  .atlas-board-active .atlas-period-view {
    min-height: 0;
    padding-top: 38px;
  }
  .atlas-board-active .atlas-period-grid { width: min(815px, 100%); }
  .atlas-board-active.atlas-ring-active {
    width: min(960px, calc(100vw - 150px));
    min-height: min(650px, calc(100vh - 104px));
  }
  .atlas-board-active.atlas-ring-active::before { inset: 68px 0 8px; }
  .atlas-board-active.atlas-ring-active .heat-board-view { min-height: 590px; }
  .atlas-board-active.atlas-ring-active .atlas-ring-view { min-height: 530px; }
  .atlas-board-active.atlas-ring-active .atlas-orbit-shell { height: 500px; }
  .atlas-board-active .atlas-category-option {
    min-height: 130px;
    padding: 18px;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 3px 11px;
  }
  .atlas-board-active .atlas-category-option > span {
    width: 42px;
    height: 42px;
    font-size: 19px;
    box-shadow: inset 0 0 0 4px rgba(255,255,255,.2);
  }
  .atlas-board-active .atlas-category-option strong { font-size: 15px; }
  .atlas-board-active .atlas-category-option small { font-size: 10px; line-height: 1.45; }
  .atlas-board-active .atlas-disclaimer {
    width: min(760px, 100%);
    margin-top: 3px;
    padding: 8px 12px;
    font-size: 8px;
    line-height: 1.55;
  }
}
@media (max-width: 760px) {
  .heat-radar-section.atlas-board-active {
    width: 100%;
    min-height: 0;
    padding: 18px 13px;
  }
  .atlas-board-active .heat-board-view {
    width: 100%;
    min-height: 0;
  }
  .atlas-board-active .atlas-category-picker {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 22px auto 18px;
  }
  .atlas-board-active .atlas-period-view {
    width: 100%;
    min-height: 0;
    padding-top: 0;
  }
  .atlas-board-active .atlas-period-grid { width: 100%; }
  .atlas-board-active .atlas-category-option {
    min-height: 118px;
    padding: 17px;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 4px 12px;
  }
  .atlas-board-active .atlas-category-option > span,
  .atlas-board-active .atlas-category-option strong,
  .atlas-board-active .atlas-category-option small { max-width: 100%; }
}
.portal-home-active .heat-portal-view {
  min-height: calc(100vh - 142px);
  align-content: start;
  gap: 12px;
  padding: 10px 0 0;
}
.portal-home-active .heat-portal-hero h2 { font-size: 46px; }
.portal-home-active .heat-portal-hero > p { margin-top: 9px; }
.portal-home-active .heat-portal-hero > p { margin-bottom: 0; }
.portal-home-active .heat-portal-search { margin: 0 auto 14px; }
.portal-home-active .heat-category-grid { padding: 6px 0 19px; }
.portal-home-active .heat-portal-footer { padding-top: 14px; }
.heat-radar-section::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 28px;
  bottom: 24px;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(94,185,189,.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 13px rgba(255,255,255,.11),
    0 0 0 14px rgba(232,137,167,.08);
  opacity: .72;
  pointer-events: none;
}

.heat-portal-hero::before,
.heat-portal-hero::after {
  content: "";
  position: absolute;
  top: 31px;
  width: clamp(58px, 11vw, 142px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214,173,112,.48));
  pointer-events: none;
}
.heat-portal-hero::before { right: calc(50% + 176px); }
.heat-portal-hero::after { left: calc(50% + 176px); transform: scaleX(-1); }
.heat-portal-hero h2 { filter: drop-shadow(0 12px 20px rgba(215,128,159,.12)); }
.heat-portal-spark { animation: archive-spark 4.8s ease-in-out infinite; }
.heat-portal-search {
  position: relative;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}
.heat-portal-search:focus-within {
  border-color: rgba(94,185,189,.54);
  background: rgba(255,255,255,.79);
  box-shadow: 0 15px 36px rgba(111,132,153,.14), 0 0 0 4px rgba(94,185,189,.08), inset 0 1px rgba(255,255,255,.95);
  transform: translateY(-1px);
}

.portal-feature-grid { perspective: 1100px; }
.heat-category-card {
  isolation: isolate;
}
.heat-category-card::before { z-index: 1; }
.heat-category-card::after { z-index: 0; }
.heat-category-card > * { position: relative; z-index: 2; }
.heat-category-card:hover .heat-category-icon,
.heat-category-card:focus-visible .heat-category-icon { transform: translateY(-3px) scale(1.035); }
.heat-category-icon { transition: transform .22s ease, filter .22s ease; }
.heat-category-card:hover .heat-category-icon { filter: drop-shadow(0 9px 12px rgba(133,112,135,.13)); }
.heat-category-card:focus-visible,
.atlas-category-option:focus-visible,
.atlas-orbit-item:focus-visible {
  outline: 2px solid rgba(94,185,189,.54);
  outline-offset: 4px;
}

.heat-view-toolbar > div::after {
  content: "✦  ◇  ✦";
  justify-self: center;
  margin-top: 4px;
  color: rgba(214,173,112,.55);
  font-size: 8px;
  letter-spacing: 7px;
}
.atlas-category-option {
  position: relative;
  overflow: hidden;
}
.atlas-category-option::after {
  content: "";
  position: absolute;
  width: 88px;
  height: 88px;
  right: -32px;
  top: -38px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .09;
  pointer-events: none;
  z-index: 2;
}
.atlas-category-option:hover > span { background: rgba(255,255,255,.58); box-shadow: 0 9px 20px rgba(125,115,139,.1), inset 0 0 0 5px rgba(255,255,255,.32); }
.atlas-category-option > span { transition: background .2s ease, box-shadow .2s ease; }

.atlas-orbit-center {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,.96), rgba(255,244,248,.72) 56%, rgba(232,249,248,.56));
}
.atlas-orbit-center::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px dashed rgba(214,173,112,.28);
  border-radius: 50%;
  pointer-events: none;
}
.atlas-orbit-items::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(from -90deg at 50% 50%, rgba(214,173,112,.16) 0 1deg, transparent 1deg 18deg);
  -webkit-mask-image: radial-gradient(circle at center, transparent 0 325px, #000 326px 348px, transparent 349px);
  mask-image: radial-gradient(circle at center, transparent 0 325px, #000 326px 348px, transparent 349px);
  pointer-events: none;
}
.atlas-orbit-item:hover .atlas-name-initial,
.atlas-orbit-item:focus-visible .atlas-name-initial {
  background: rgba(255,247,250,.96);
  box-shadow: 0 11px 24px rgba(205,111,144,.16), inset 0 0 0 5px rgba(255,255,255,.65);
}
.atlas-name-initial { transition: background .18s ease, box-shadow .18s ease, transform .18s ease; }
.atlas-orbit-item:hover .atlas-name-initial { transform: scale(1.08); }

.atlas-profile-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(255,255,255,.72), rgba(255,247,250,.5) 52%, rgba(235,250,249,.52));
}
.atlas-profile-hero::after {
  content: "";
  position: absolute;
  right: -55px;
  top: -76px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(232,137,167,.15);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255,255,255,.09);
  pointer-events: none;
}
.atlas-profile-initial {
  position: relative;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.92), rgba(255,236,244,.64) 58%, rgba(232,248,247,.44));
  box-shadow: 0 13px 30px rgba(184,111,139,.11), inset 0 0 0 8px rgba(255,255,255,.5);
}
.atlas-profile-panel {
  position: relative;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.atlas-profile-panel::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 34px;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, rgba(232,137,167,.55), rgba(94,185,189,.35));
}
.atlas-profile-panel:hover {
  border-color: rgba(255,255,255,.95);
  box-shadow: 0 16px 34px rgba(113,129,153,.1);
  transform: translateY(-2px);
}
.atlas-token-list { margin-top: 18px; }
.atlas-profile-panel > p { margin-top: 18px; }

@keyframes archive-spark {
  0%, 100% { opacity: .72; transform: translateY(0) scale(.92); }
  50% { opacity: 1; transform: translateY(-3px) scale(1.06); }
}

@media (max-width: 900px) {
  .portal-feature-card:hover { transform: translateY(-3px); }
  .atlas-orbit-items::before { display: none; }
}

@media (max-width: 760px) {
  .heat-radar-section::after,
  .heat-portal-hero::before,
  .heat-portal-hero::after { display: none; }
  .heat-view-toolbar > div::after { letter-spacing: 4px; }
  .atlas-profile-panel:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .heat-portal-spark { animation: none !important; }
  .heat-category-icon,
  .atlas-name-initial,
  .atlas-profile-panel,
  .heat-portal-search { transition: none !important; }
}

/* V4.1 immersive IP profile themes */
.workspace { margin-top: 36px; }

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .38s ease;
}
body.atlas-profile-active::before {
  background-image: var(--ip-background-image, url("assets/dimension-glass-background-v2.webp"));
  background-position: var(--ip-background-position, center);
  background-size: cover;
  background-repeat: no-repeat;
  filter: saturate(.72) contrast(.94) brightness(.74) blur(2.2px);
  transform: scale(var(--ip-background-scale, 1.06));
  transform-origin: center;
}
body.atlas-profile-active::after {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(5, 11, 29, .35), rgba(5, 11, 29, .08) 44%, rgba(5, 11, 29, .18)),
    radial-gradient(ellipse at 50% 42%, transparent 32%, rgba(3, 8, 24, .34) 100%),
    var(--ip-overlay, rgba(23, 31, 50, .38));
}
body.atlas-profile-active.atlas-profile-background-ready::before,
body.atlas-profile-active.atlas-profile-background-ready::after { opacity: 1; }

body.atlas-profile-active {
  position: relative;
  background-color: #101a34;
  background-image: none;
}
body.atlas-profile-active > .topbar,
body.atlas-profile-active > .workspace,
body.atlas-profile-active > footer {
  position: relative;
  z-index: 1;
}
body.atlas-profile-active .topbar {
  border-bottom-color: rgba(207, 221, 255, .18);
  background: rgba(12, 21, 43, .58);
  box-shadow: 0 10px 34px rgba(3, 8, 24, .2);
  color: rgba(247, 250, 255, .94);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
}
body.atlas-profile-active .brand h1,
body.atlas-profile-active .database-health strong { color: rgba(249, 251, 255, .94); }
body.atlas-profile-active .brand p,
body.atlas-profile-active .database-health small { color: rgba(220, 229, 247, .7); }
body.atlas-profile-active .primary-toolbar .secondary-button,
body.atlas-profile-active .database-health {
  border-color: rgba(217, 228, 255, .17);
  background: rgba(224, 234, 255, .1);
  color: rgba(241, 246, 255, .84);
}
body.atlas-profile-active .mode-navigation {
  border-color: rgba(211, 225, 255, .19);
  background: rgba(12, 22, 45, .56);
  box-shadow: 0 18px 42px rgba(2, 7, 22, .22), inset 0 1px rgba(255,255,255,.09);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
}
body.atlas-profile-active .mode-tab { color: rgba(220, 229, 247, .7); }
body.atlas-profile-active .mode-tab:hover {
  border-color: rgba(224, 233, 255, .22);
  background: rgba(220, 232, 255, .12);
  color: #fff;
}
body.atlas-profile-active .mode-tab.active {
  border-color: color-mix(in srgb, var(--ip-accent) 66%, transparent);
  background: rgba(225, 235, 255, .16);
  color: var(--ip-accent);
  box-shadow: 0 9px 25px rgba(3, 8, 24, .22), inset 0 0 0 4px rgba(255,255,255,.05);
}

.workspace.atlas-detail-active .form-column {
  width: min(100%, 1240px);
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.workspace.atlas-detail-active .heat-radar-section {
  padding: 0;
  overflow: visible;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.workspace.atlas-detail-active .heat-radar-section::before,
.workspace.atlas-detail-active .heat-radar-section::after { display: none; }

.heat-ip-detail-view { position: relative; min-height: 690px; padding: 18px; }
.atlas-profile-book-scene {
  position: relative;
  isolation: isolate;
  width: min(100%, 1180px);
  min-height: 650px;
  margin: 0 auto;
  padding: 42px 28px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(249, 242, 228, .9), rgba(247, 239, 222, .82) 50%, rgba(245, 237, 220, .86)),
    url("assets/homepage/book-page-texture.webp") center / cover;
  box-shadow: 0 28px 62px rgba(42, 34, 31, .3), inset 0 1px rgba(255,255,255,.7);
  transform: translateY(6px);
  opacity: 0;
  transition: opacity .58s ease, transform .58s cubic-bezier(.22,.72,.22,1), background-color .7s ease;
}
.heat-ip-detail-view:not(.hidden) .atlas-profile-book-scene { opacity: 1; transform: none; }
.atlas-profile-book-scene::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 28px;
  background: linear-gradient(90deg, transparent, rgba(81,62,46,.12) 48%, transparent);
  transform: translateX(-50%);
  pointer-events: none;
}
.atlas-profile-scene-backdrop {
  position: fixed;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background-image: var(--ip-background-image, url("assets/homepage/archive-background-v2.webp"));
  background-size: cover;
  background-position: var(--ip-background-position, center);
  opacity: 0;
  filter: saturate(.68) contrast(.93) brightness(.76) blur(2px);
  transform: scale(var(--ip-background-scale, 1.06));
  transform-origin: center;
  transition: opacity .72s ease, filter .72s ease, transform .72s ease;
}
.atlas-profile-scene-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ip-overlay, rgba(8,17,43,.42));
}
body.atlas-profile-active .atlas-profile-scene-backdrop { opacity: .34; }
.atlas-profile-book-page {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  padding: 0 24px 12px;
}
.atlas-profile-book-page:first-of-type { border-right: 1px solid rgba(157,123,79,.18); }
.atlas-profile-scene-page { display: grid; align-content: center; gap: 18px; }
.atlas-profile-scene-frame {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border: 0;
  border-radius: 49% 49% 45% 45% / 17% 17% 11% 11%;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(222,210,184,.22), rgba(247,239,222,.08) 56%, transparent 76%);
  box-shadow: 0 12px 28px rgba(104,78,52,.06);
}
.atlas-profile-scene-frame::before,
.atlas-profile-scene-frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
}
.atlas-profile-scene-frame::before {
  inset: 9% 8% 12%;
  border: 1px solid rgba(151,116,75,.16);
  border-bottom-color: transparent;
  border-radius: 50% 50% 43% 43% / 17% 17% 11% 11%;
  box-shadow: inset 0 1px rgba(255,255,255,.28);
}
.atlas-profile-scene-frame::after {
  z-index: 3;
  inset: -25%;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 30%, rgba(247,239,222,.08) 47%, rgba(247,239,222,.66) 70%, rgba(247,239,222,.98) 88%),
    linear-gradient(180deg, rgba(247,239,222,.08), transparent 48%, rgba(247,239,222,.86) 82%);
}
.atlas-profile-scene-image {
  position: absolute;
  z-index: 1;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  object-position: var(--ip-scene-position, center);
  opacity: 0;
  filter: saturate(.78) contrast(.94) brightness(1.03) sepia(.035);
  transform: scale(1.06);
  transition: opacity .78s ease, transform 1s cubic-bezier(.2,.7,.2,1), filter .62s ease;
}
.atlas-profile-scene-image.is-visible { opacity: .84; transform: scale(var(--ip-scene-scale, 1.02)); }
.atlas-profile-scene-wash {
  position: absolute;
  z-index: 4;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(249,242,228,.16), transparent 36%, rgba(249,242,228,.22) 66%, rgba(249,242,228,.76)),
    radial-gradient(ellipse at 50% 43%, transparent 49%, rgba(247,239,222,.32) 72%, rgba(247,239,222,.82) 100%);
  pointer-events: none;
}
.atlas-profile-scene-caption { padding: 0 16px; color: rgba(89,72,57,.78); }
.atlas-profile-scene-caption span { display: block; color: color-mix(in srgb, var(--ip-accent-warm) 70%, #7f6b5d); font: 9px Georgia, serif; letter-spacing: 2px; }
.atlas-profile-scene-caption strong { display: block; margin-top: 7px; color: #5d4a3d; font: 600 clamp(18px, 1.9vw, 27px) "STSong", "SimSun", serif; }
.atlas-profile-scene-caption p { max-width: 420px; margin: 8px 0 0; color: rgba(102,86,73,.68); font-size: 11px; line-height: 1.8; }
.heat-ip-detail-view.is-love-and-deepspace .atlas-profile-scene-frame,
.heat-ip-detail-view.is-love-and-deepspace .atlas-profile-scene-caption { display: none; }
.heat-ip-detail-view.is-love-and-deepspace .atlas-profile-scene-image { display: none; }
.atlas-profile-workbench {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.heat-ip-detail-view[data-panel-tone="warm"] .atlas-profile-workbench { background: transparent; }
.atlas-profile-toolbar {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--ip-accent) 25%, rgba(101,112,136,.18));
}
.atlas-profile-toolbar > div { text-align: left; justify-items: start; }
.atlas-profile-toolbar > div::after { display: none; }
.atlas-profile-toolbar > div > span { color: color-mix(in srgb, var(--ip-accent-warm) 80%, #596278); }
.atlas-profile-toolbar h2 { color: #273653; font-size: clamp(25px, 3vw, 37px); }
.atlas-profile-toolbar p { color: rgba(50, 64, 91, .67); }
.atlas-profile-toolbar .heat-back-button {
  border-color: color-mix(in srgb, var(--ip-accent) 42%, rgba(255,255,255,.4));
  background: rgba(255,255,255,.28);
  color: #334463;
}

.heat-ip-detail-view .atlas-profile-hero {
  min-height: 150px;
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.18);
  box-shadow: none;
}
.heat-ip-detail-view .atlas-profile-hero::after { border-color: color-mix(in srgb, var(--ip-accent) 26%, transparent); }
.heat-ip-detail-view .atlas-profile-initial {
  overflow: hidden;
  border-color: color-mix(in srgb, var(--ip-accent) 70%, #fff);
  background: rgba(255,255,255,.27);
  color: #31476d;
  box-shadow: inset 0 0 0 7px rgba(255,255,255,.2), 0 13px 30px rgba(20, 38, 72, .1);
}
.atlas-profile-avatar { width: 100%; height: 100%; display: block; object-fit: cover; }
.heat-ip-detail-view .atlas-profile-hero h3 { color: #263753; }
.heat-ip-detail-view .atlas-profile-hero p { color: rgba(45, 59, 85, .74); }
.heat-ip-detail-view .atlas-status {
  border-color: color-mix(in srgb, var(--ip-accent) 48%, rgba(255,255,255,.3));
  background: rgba(255,255,255,.26);
  color: #42618b;
}
.heat-ip-detail-view .atlas-profile-grid { gap: 10px; }
.heat-ip-detail-view .atlas-profile-panel {
  min-height: 102px;
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.18);
  box-shadow: none;
}
.heat-ip-detail-view .atlas-profile-panel::after {
  background: linear-gradient(90deg, var(--ip-accent), var(--ip-accent-warm));
  opacity: .62;
}
.heat-ip-detail-view .atlas-profile-panel:hover {
  border-color: rgba(255,255,255,.66);
  background: rgba(255,255,255,.24);
  box-shadow: 0 12px 28px rgba(22, 37, 68, .08);
}
.heat-ip-detail-view .atlas-profile-panel > span { color: rgba(48, 64, 92, .64); }
.heat-ip-detail-view .atlas-profile-panel > p { color: rgba(39, 52, 77, .8); }
.heat-ip-detail-view .atlas-token-list span {
  border-color: color-mix(in srgb, var(--ip-accent) 30%, rgba(255,255,255,.38));
  background: rgba(255,255,255,.23);
  color: #405778;
}
.heat-ip-detail-view .atlas-token-list.merch span { color: #365d70; }
.heat-ip-detail-view .atlas-token-list.keywords span {
  border-color: color-mix(in srgb, var(--ip-accent-warm) 36%, rgba(255,255,255,.4));
  color: #6f5d3f;
}
.heat-ip-detail-view .atlas-disclaimer {
  border-left-color: var(--ip-accent-warm);
  background: rgba(255,255,255,.18);
  color: rgba(43, 56, 81, .66);
}

@media (max-width: 760px) {
  .workspace { margin-top: 18px; }
  body.atlas-profile-active::before { background-position: 68% center; }
  body.atlas-profile-active .mode-navigation {
    background: rgba(12, 22, 45, .62);
    overflow-x: auto;
  }
  .heat-ip-detail-view { min-height: 0; padding: 4px 0; }
  .atlas-profile-workbench { width: 100%; margin: 0; padding: 15px 12px; border-radius: 7px; background: rgba(235, 241, 251, .59); }
  .atlas-profile-toolbar { grid-template-columns: 1fr; gap: 12px; }
  .atlas-profile-toolbar > div { width: 100%; }
  .atlas-profile-toolbar h2 { font-size: 26px; }
  .heat-ip-detail-view .atlas-profile-hero { padding: 18px 13px; }
  .heat-ip-detail-view .atlas-profile-panel { padding: 16px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after { transition: none !important; }
}

/* V4.1 archive desk homepage. Kept strictly scoped so atlas and profile views retain their layouts. */
body.archive-portal-active {
  background: #eef2f4;
}
body.archive-portal-active .topbar {
  display: none;
}
body.archive-portal-active .workspace {
  position: relative;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: block;
}
body.archive-portal-active .form-column {
  width: 100%;
  max-width: none;
}
body.archive-portal-active .mode-navigation {
  position: absolute;
  z-index: 14;
  top: 50%;
  left: max(12px, calc((100vw - 1680px) / 2 + 10px));
  width: 98px;
  height: min(610px, calc(100vh - 142px));
  min-height: 430px;
  padding: 75px 22px 70px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: space-evenly;
  justify-items: center;
  gap: 8px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: url("assets/homepage/nav-spine.webp") center / 100% 100% no-repeat;
  box-shadow: none;
  filter:
    drop-shadow(2px 3px 2px rgba(41, 35, 42, .24))
    drop-shadow(9px 15px 17px rgba(50, 43, 50, .14))
    saturate(.94);
  transform: translateY(-50%) perspective(900px) rotateY(2deg);
  transform-origin: left center;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.archive-portal-active .mode-navigation::before {
  content: "";
  position: absolute;
  inset: 8% 16%;
  border: 1px solid rgba(231, 206, 155, .13);
  border-block: 0;
  pointer-events: none;
}
body.archive-portal-active .mode-navigation::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 13%;
  bottom: 1.4%;
  left: 13%;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(61, 50, 50, .34) 0%, rgba(61, 50, 50, .16) 44%, transparent 74%);
  filter: blur(5px);
  transform: translateY(8px) scaleX(.9);
  pointer-events: none;
}
body.archive-portal-active .mode-tab {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  min-height: 54px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(239, 224, 192, .8);
}
body.archive-portal-active .mode-tab:hover {
  border-color: rgba(233, 209, 156, .34);
  background: rgba(255,255,255,.04);
  color: #fff3d4;
  transform: translateY(-1px);
}
body.archive-portal-active .mode-tab.active {
  border-color: rgba(239, 214, 162, .72);
  background: rgba(255,255,255,.06);
  color: #fff4d6;
  box-shadow: 0 0 0 5px rgba(209, 173, 104, .08), inset 0 0 18px rgba(255,240,201,.07);
}
body.archive-portal-active .mode-nav-separator {
  position: relative;
  z-index: 1;
  width: 5px;
  height: 5px;
  background: rgba(225, 199, 143, .62);
  transform: rotate(45deg);
}
body.archive-portal-active .heat-radar-section.portal-home-active {
  min-height: calc(100vh - 66px);
  padding: 0;
  background: transparent;
}
body.archive-portal-active .portal-home-active .heat-portal-view {
  min-height: calc(100vh - 66px);
  padding: 0;
  display: block;
}
.archive-home-stage {
  --archive-parallax-x: 0px;
  --archive-parallax-y: 0px;
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 66px);
  overflow: hidden;
  overflow-anchor: none;
  background: #eaf2f6;
}
.archive-home-background {
  position: absolute;
  z-index: -3;
  inset: -2.5%;
  background: url("assets/homepage/archive-background-v2.webp") center / cover no-repeat;
  filter: saturate(.91) contrast(.985) brightness(1.018);
  transform: translate3d(calc(var(--archive-parallax-x) * -.12), calc(var(--archive-parallax-y) * -.08), 0) scale(1.045);
  transform-origin: 50% 56%;
  will-change: transform;
  animation: archive-home-arrival 1.12s cubic-bezier(.22,.8,.22,1) both;
}
.archive-profile-background {
  position: absolute;
  z-index: -2;
  inset: -3%;
  opacity: 0;
  background-position: var(--archive-profile-background-position, center);
  background-size: cover;
  background-repeat: no-repeat;
  filter: saturate(.66) brightness(.64) contrast(.9) blur(3px);
  transform: scale(var(--archive-profile-background-scale, 1.06));
  transition: opacity .72s ease, filter .72s ease, transform .72s ease;
  pointer-events: none;
}
.archive-home-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), transparent 24%, rgba(111,83,72,.045) 100%),
    radial-gradient(ellipse 42% 35% at 50% 18%, rgba(255,255,255,.16), transparent 72%),
    linear-gradient(90deg, rgba(79,65,70,.055), transparent 17%, transparent 82%, rgba(89,67,55,.075));
  pointer-events: none;
}
.archive-home-decor {
  position: absolute;
  z-index: 1;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.archive-home-decor-left {
  display: none;
  left: clamp(14px, 3vw, 56px);
  bottom: -4%;
  width: clamp(175px, 20vw, 340px);
  transform: translate3d(calc(var(--archive-parallax-x) * -.32), calc(var(--archive-parallax-y) * -.2), 0);
  filter: drop-shadow(0 12px 15px rgba(87, 63, 70, .12)) saturate(.98) brightness(1.01);
}
.archive-home-decor-right {
  display: none;
  right: -1.6%;
  top: 4%;
  width: clamp(130px, 14vw, 238px);
  transform: translate3d(calc(var(--archive-parallax-x) * .42), calc(var(--archive-parallax-y) * .24), 0);
  filter: drop-shadow(-7px 12px 18px rgba(105, 82, 63, .11)) saturate(.94) brightness(1.015);
}
.archive-desk-art {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity .42s ease, filter .52s ease;
}
.archive-stage-platform {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: clamp(58%, 59vh, 64%);
  width: min(1180px, 76vw);
  height: clamp(150px, 18vw, 250px);
  pointer-events: none;
  transform: translate3d(calc(-50% + var(--archive-parallax-x) * -.03), calc(var(--archive-parallax-y) * -.02), 0);
  opacity: .9;
  transition: opacity .42s ease, filter .52s ease, transform .52s ease;
}
.archive-stage-platform-shadow,
.archive-stage-platform-rim,
.archive-stage-platform-inlay,
.archive-stage-platform-engraving,
.archive-stage-platform-plaque { position: absolute; pointer-events: none; }
.archive-stage-platform-shadow {
  left: 2%; right: 2%; bottom: 3%; height: 42%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(72, 55, 52, .28), rgba(72, 55, 52, .12) 48%, transparent 74%);
  filter: blur(14px);
  transform: scaleX(.96);
}
.archive-stage-platform-rim {
  left: 4%; right: 4%; bottom: 16%; height: 46%;
  border: 1px solid rgba(181, 145, 88, .27);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 252, 239, .16), rgba(212, 187, 145, .08) 60%, transparent),
    radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.18), transparent 64%);
  box-shadow: inset 0 1px rgba(255,255,255,.32), 0 8px 18px rgba(101, 72, 61, .1);
  transform: rotate(-1deg);
}
.archive-stage-platform-inlay {
  left: 15%; right: 15%; bottom: 28%; height: 25%;
  border-top: 1px solid rgba(181, 145, 88, .2);
  border-bottom: 1px solid rgba(181, 145, 88, .12);
  border-radius: 50%;
  filter: blur(.2px);
  opacity: .72;
}
.archive-stage-platform-engraving {
  left: 5%; right: 5%; bottom: 19%; width: 90%; height: 60%;
  fill: none;
  stroke: rgba(166, 128, 73, .23);
  stroke-width: 1;
  stroke-dasharray: 2 9;
  opacity: .75;
  filter: drop-shadow(0 1px rgba(255,255,255,.55));
  transform: rotate(-1deg);
}
.archive-stage-platform-plaque {
  left: 50%; bottom: 8%;
  display: grid; justify-items: center; gap: 2px;
  padding: 5px 20px 4px;
  border-top: 1px solid rgba(165, 126, 72, .3);
  border-bottom: 1px solid rgba(165, 126, 72, .14);
  color: rgba(105, 80, 64, .58);
  transform: translateX(-50%);
  text-shadow: 0 1px rgba(255,255,255,.44);
}
.archive-stage-platform-plaque i { font: 7px/1 Georgia, serif; letter-spacing: 2.7px; font-style: normal; }
.archive-stage-platform-plaque b { font: 12px/1.2 "STSong", "SimSun", serif; font-weight: 600; letter-spacing: 3px; }
.archive-home-stage.archive-book-active .archive-stage-platform { opacity: .05; filter: blur(5px); }
.archive-desk-vellum {
  position: absolute;
  left: 50%;
  top: 58.5%;
  width: min(1360px, 81vw);
  height: auto;
  opacity: .21;
  object-fit: contain;
  mix-blend-mode: multiply;
  transform: translate3d(calc(-50% + var(--archive-parallax-x) * -.08), calc(var(--archive-parallax-y) * -.04), 0) rotate(-.35deg) scaleY(.56);
  transform-origin: center;
  filter: saturate(.64) sepia(.16) contrast(.9) brightness(1.035) blur(.18px);
  -webkit-mask-image: radial-gradient(ellipse 72% 56% at 50% 52%, #000 0%, rgba(0,0,0,.88) 52%, rgba(0,0,0,.28) 81%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 56% at 50% 52%, #000 0%, rgba(0,0,0,.88) 52%, rgba(0,0,0,.28) 81%, transparent 100%);
}
.archive-desk-network {
  position: absolute;
  left: 50%;
  top: 53.5%;
  width: min(1500px, 96vw);
  height: min(780px, 86vh);
  overflow: visible;
  transform: translate3d(calc(-50% + var(--archive-parallax-x) * -.04), calc(-50% + var(--archive-parallax-y) * -.025), 0);
  filter: drop-shadow(0 1px rgba(255,255,255,.55));
}
.archive-network-orbits {
  fill: none;
  stroke: url(#archiveDeskGold);
  stroke-width: 1;
  stroke-dasharray: 2 8;
  opacity: .16;
}
.archive-network-links { fill: none; stroke: rgba(186, 145, 84, .18); stroke-width: 1.05; stroke-linecap: round; }
.archive-network-path { transition: stroke .32s ease, stroke-width .32s ease, opacity .32s ease, filter .32s ease; }
.archive-network-nodes { fill: rgba(207, 169, 105, .18); stroke: rgba(193, 145, 77, .28); stroke-width: 1; }
.archive-network-nodes circle { filter: drop-shadow(0 0 4px rgba(220,178,104,.16)); }
.archive-network-runners { opacity: .38; filter: url(#archiveDeskGlow); }
.archive-network-runners {
  /* The runners were an always-on SVG animateMotion loop. Keep the network
     artwork and nodes, but avoid a permanent compositor workload on the home
     screen. The reader's own motion remains independent. */
  display: none;
}
.archive-desk-refraction {
  position: absolute;
  border-radius: 50%;
  background: conic-gradient(from 30deg, transparent, rgba(217,198,255,.22), rgba(190,229,255,.3), rgba(255,209,231,.2), transparent 76%);
  mix-blend-mode: screen;
  filter: blur(3px);
  opacity: .3;
  animation: none;
}
.archive-desk-refraction-a {
  left: clamp(70px, 12.8vw, 238px);
  bottom: -3%;
  width: clamp(150px, 17vw, 290px);
  aspect-ratio: 1.65;
  transform: rotate(-11deg);
  animation: none;
}
.archive-desk-refraction-b {
  left: clamp(170px, 24vw, 440px);
  bottom: 4%;
  width: clamp(80px, 9vw, 150px);
  aspect-ratio: 2.2;
  opacity: .25;
  transform: rotate(17deg);
  animation: none;
}
.archive-desk-star {
  position: absolute;
  color: rgba(202, 160, 91, .46);
  font-size: 10px;
  text-shadow: 0 0 8px rgba(255,232,177,.52);
  animation: none;
  opacity: .42;
}
.archive-desk-star-a { left: 31.5%; bottom: 15.5%; }
.archive-desk-star-b { right: 27%; bottom: 10%; font-size: 7px; animation-delay: -3.4s; }
.archive-desk-seal {
  position: absolute;
  z-index: 2;
  right: clamp(102px, 12vw, 230px);
  bottom: clamp(-20px, -1.2vh, -8px);
  width: clamp(104px, 11vw, 190px);
  height: auto;
  opacity: .66;
  object-fit: contain;
  transform: translate3d(calc(var(--archive-parallax-x) * .08), calc(var(--archive-parallax-y) * .04), 0) rotate(-4deg);
  filter: drop-shadow(0 9px 7px rgba(89,65,57,.13)) saturate(.82) brightness(1.035);
}
.archive-ambient {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity .45s ease, filter .45s ease;
}
.archive-ambient > span { position: absolute; pointer-events: none; }
.archive-ambient-light {
  left: 4%;
  top: -17%;
  width: 38%;
  height: 92%;
  background: linear-gradient(112deg, transparent 3%, rgba(240,248,255,.04) 18%, rgba(255,255,255,.28) 47%, rgba(223,240,255,.08) 72%, transparent 91%);
  clip-path: polygon(7% 0, 73% 0, 100% 100%, 36% 100%);
  mix-blend-mode: normal;
  opacity: .42;
  transform: translate3d(calc(var(--archive-parallax-x) * -.14), calc(var(--archive-parallax-y) * -.08), 0) rotate(-2deg);
  transform-origin: top center;
  animation: none;
}
.archive-ambient-vignette {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(38,50,67,.09), transparent 15%, transparent 82%, rgba(86,64,65,.08)),
    linear-gradient(180deg, transparent 62%, rgba(80,62,68,.09));
  box-shadow: inset 0 0 90px rgba(54, 63, 78, .08);
}
.archive-astral-trace {
  top: 11%;
  right: -4%;
  width: clamp(240px, 25vw, 430px);
  aspect-ratio: 1.24;
  border: 1px solid rgba(219, 181, 111, .18);
  border-radius: 50%;
  opacity: .62;
  transform: translate3d(calc(var(--archive-parallax-x) * .28), calc(var(--archive-parallax-y) * .18), 0) rotate(-18deg);
  -webkit-mask-image: linear-gradient(125deg, transparent 7%, #000 34%, #000 66%, transparent 92%);
  mask-image: linear-gradient(125deg, transparent 7%, #000 34%, #000 66%, transparent 92%);
  animation: none;
  filter: none;
}
.archive-astral-trace::before,
.archive-astral-trace::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(221, 188, 126, .13);
  border-radius: 50%;
}
.archive-astral-trace::before { inset: 15% -7%; transform: rotate(23deg); }
.archive-astral-trace::after { inset: -8% 19%; transform: rotate(-32deg); }
.archive-crystal-sheen {
  width: 34px;
  height: 160px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.64), rgba(214,229,255,.22), transparent);
  mix-blend-mode: normal;
  opacity: 0;
  filter: blur(.3px);
  transform: skewX(-18deg) rotate(21deg);
}
.archive-crystal-sheen-left {
  left: clamp(74px, 14.5vw, 270px);
  bottom: 3%;
  animation: none;
}
.archive-crystal-sheen-right {
  right: clamp(8px, 6.4vw, 110px);
  top: 29%;
  height: 120px;
  transform: skewX(-18deg) rotate(7deg);
  animation: none;
}
.archive-ambient-dust {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  box-shadow: 0 0 5px rgba(255,255,255,.7);
  opacity: 0;
  animation: none;
  opacity: .2;
}
.archive-ambient-dust:nth-of-type(6) { left: 12%; top: 64%; --dust-duration: 12s; --dust-delay: -3s; }
.archive-ambient-dust:nth-of-type(7) { left: 18%; top: 42%; --dust-duration: 15s; --dust-delay: -9s; }
.archive-ambient-dust:nth-of-type(8) { left: 24%; top: 71%; --dust-duration: 14s; --dust-delay: -5s; }
.archive-ambient-dust:nth-of-type(9) { left: 31%; top: 38%; --dust-duration: 17s; --dust-delay: -12s; }
.archive-ambient-dust:nth-of-type(10) { left: 39%; top: 58%; --dust-duration: 13s; --dust-delay: -7s; }
.archive-ambient-dust:nth-of-type(11) { left: 45%; top: 31%; --dust-duration: 16s; --dust-delay: -2s; }
.archive-ambient-petal {
  top: -7%;
  width: 13px;
  height: 8px;
  border-radius: 70% 30% 65% 35%;
  background: linear-gradient(135deg, rgba(255,244,248,.92), rgba(238,160,190,.75));
  box-shadow: inset 2px 1px rgba(255,255,255,.46), 0 2px 5px rgba(155,103,124,.1);
  opacity: 0;
  animation: none;
  opacity: .22;
  transform: translate3d(0, 12vh, 0) rotate(18deg);
}
.archive-ambient-petal:nth-of-type(12) { left: 8%; --petal-duration: 18s; --petal-delay: -5s; }
.archive-ambient-petal:nth-of-type(13) { left: 28%; --petal-duration: 21s; --petal-delay: -16s; transform: scale(.75); }
.archive-ambient-petal:nth-of-type(14) { left: 57%; --petal-duration: 23s; --petal-delay: -10s; transform: scale(.62); }
.archive-ambient-petal:nth-of-type(15) { left: 76%; --petal-duration: 19s; --petal-delay: -2s; transform: scale(.82); }
.archive-ambient-petal:nth-of-type(16) { left: 91%; --petal-duration: 25s; --petal-delay: -19s; transform: scale(.55); }
.archive-home-stage.archive-book-active .archive-ambient {
  opacity: 0;
  filter: blur(3px);
}
.archive-home-stage.archive-book-active .archive-desk-art {
  opacity: .05;
  filter: blur(5px);
}
.archive-home-stage.archive-book-active .archive-ambient * { animation-play-state: paused; }
.archive-home-stage.archive-book-active .archive-desk-network,
.archive-home-stage.archive-book-active .archive-desk-refraction,
.archive-home-stage.archive-book-active .archive-desk-star { animation-play-state: paused; }
@keyframes archive-light-breathe {
  from { opacity: .38; filter: brightness(.96); }
  to { opacity: .66; filter: brightness(1.08); }
}
@keyframes archive-astral-pulse {
  0%, 100% { opacity: .32; filter: drop-shadow(0 0 0 rgba(222,185,116,0)); }
  50% { opacity: .68; filter: drop-shadow(0 0 8px rgba(222,185,116,.15)); }
}
@keyframes archive-crystal-glint {
  0%, 72%, 100% { opacity: 0; translate: -18px 18px; }
  78% { opacity: .2; }
  84% { opacity: .58; translate: 18px -18px; }
  90% { opacity: 0; translate: 34px -34px; }
}
@keyframes archive-dust-rise {
  0%, 100% { opacity: 0; transform: translate3d(0, 16px, 0) scale(.7); }
  25% { opacity: .52; }
  70% { opacity: .2; }
  90% { opacity: 0; transform: translate3d(14px, -70px, 0) scale(1.15); }
}
@keyframes archive-petal-drift {
  0% { opacity: 0; translate: 0 -4vh; rotate: 0deg; }
  8% { opacity: .52; }
  48% { translate: 7vw 46vh; rotate: 170deg; }
  82% { opacity: .38; }
  100% { opacity: 0; translate: -3vw 108vh; rotate: 360deg; }
}
@keyframes archive-refraction-breathe {
  from { opacity: .2; filter: blur(7px) saturate(.85); transform: rotate(-11deg) translateX(-5px) scale(.96); }
  to { opacity: .48; filter: blur(4px) saturate(1.12); transform: rotate(-8deg) translateX(8px) scale(1.03); }
}
@keyframes archive-desk-star-pulse {
  0%, 100% { opacity: .22; transform: scale(.74) rotate(0deg); }
  50% { opacity: .72; transform: scale(1.08) rotate(15deg); }
}
body.archive-portal-active .heat-portal-hero {
  position: relative;
  z-index: 5;
  padding-top: clamp(34px, 5.6vh, 68px);
}
body.archive-portal-active .heat-portal-hero h2 {
  color: transparent;
  background: linear-gradient(90deg, #32333d 8%, #43424d 58%, #d97e9c 90%);
  background-clip: text;
  font-family: "STKaiti", "KaiTi", "FangSong", serif;
  font-size: clamp(46px, 5vw, 72px);
  font-weight: 500;
  line-height: 1;
  filter: drop-shadow(0 8px 18px rgba(119, 87, 103, .12));
}
body.archive-portal-active .heat-portal-hero > p {
  margin: 17px 0 0;
  color: rgba(67, 67, 76, .82);
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(14px, 1.35vw, 20px);
  letter-spacing: 7px;
}
body.archive-portal-active .heat-portal-spark {
  top: clamp(45px, 6.8vh, 78px);
  margin-left: clamp(-430px, -34vw, -260px);
}
body.archive-portal-active .heat-portal-hero::before,
body.archive-portal-active .heat-portal-hero::after {
  top: clamp(65px, 9vh, 98px);
  width: clamp(70px, 11vw, 170px);
}
body.archive-portal-active .heat-portal-hero::before { right: calc(50% + clamp(196px, 21vw, 300px)); }
body.archive-portal-active .heat-portal-hero::after { left: calc(50% + clamp(196px, 21vw, 300px)); }
body.archive-portal-active .heat-portal-search {
  position: relative;
  z-index: 7;
  width: min(830px, 55vw);
  height: auto;
  aspect-ratio: 1707 / 269;
  margin: clamp(18px, 2.5vh, 30px) auto 0;
  padding: 0 9.5% 0 7.8%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-rows: 68.5% 31.5%;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.heat-portal-search-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% - 12px);
  left: 7.8%;
  right: 9.5%;
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid rgba(198, 161, 130, .38);
  border-radius: 8px;
  background: rgba(255, 251, 244, .94);
  box-shadow: 0 14px 28px rgba(76, 57, 58, .16);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.heat-portal-search-suggestions[hidden] { display: none; }
.heat-portal-search-suggestions button {
  min-width: 0;
  padding: 8px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid rgba(169, 127, 106, .13);
  background: transparent;
  color: #5e5158;
  text-align: left;
  cursor: pointer;
}
.heat-portal-search-suggestions button:last-child { border-bottom: 0; }
.heat-portal-search-suggestions button:hover,
.heat-portal-search-suggestions button:focus-visible { background: rgba(226, 195, 174, .16); outline: 0; }
.heat-portal-search-suggestions strong { font: 600 14px/1.3 "STSong", "SimSun", serif; }
.heat-portal-search-suggestions small { color: rgba(93, 78, 82, .58); font: 10px/1.3 "Microsoft YaHei", sans-serif; }
.archive-search-frame {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: drop-shadow(0 11px 13px rgba(88, 70, 66, .16));
}
.archive-search-icon {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: #52555d;
  stroke-width: 1.8;
  stroke-linecap: round;
}
body.archive-portal-active .heat-portal-search input {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: #54565f;
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.2;
}
body.archive-portal-active .heat-portal-search input:focus {
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}
body.archive-portal-active .heat-portal-search input:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.archive-portal-active .heat-portal-search input::placeholder { color: rgba(96, 97, 104, .58); }
body.archive-portal-active .heat-portal-search i { color: #c39b58; font-size: 22px; }
body.archive-portal-active .heat-portal-search:focus-within {
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: translateY(-1px);
}
.archive-feature-grid {
  position: relative;
  z-index: 6;
  width: min(1050px, 70vw);
  height: min(430px, 44vh);
  min-height: 360px;
  margin: clamp(8px, 1.5vh, 18px) auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(310px, .95fr);
  grid-template-rows: 1fr .84fr;
  gap: 2px 13px;
}
.archive-feature-grid .archive-object-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: block;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #5f5356;
  text-align: left;
  transition: transform .2s ease, filter .2s ease;
}
.archive-feature-grid .archive-object-card::before {
  content: "";
  position: absolute;
  z-index: -2;
  right: 11%;
  bottom: -1.5%;
  left: 10%;
  height: 13%;
  display: block;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.17), rgba(230,205,210,.08) 42%, transparent 82%);
  filter: blur(6px);
  opacity: .7;
  transform: scaleX(.94);
  pointer-events: none;
}
.archive-feature-grid .archive-object-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 6%;
  bottom: 4.5%;
  left: 6%;
  height: 9%;
  display: block;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(76, 59, 56, .34) 0%, rgba(76, 59, 56, .17) 42%, transparent 74%);
  filter: blur(8px);
  transform: translateY(4px) scaleX(.95);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.archive-feature-grid .portal-card-atlas::after {
  right: 5%;
  bottom: 5.5%;
  left: 4%;
  height: 8%;
  background: radial-gradient(ellipse, rgba(58, 47, 45, .38) 0%, rgba(76, 59, 56, .2) 45%, transparent 75%);
  filter: blur(9px);
  transform: translateY(5px) scaleX(.97);
}
.archive-feature-grid .portal-card-intelligence::after {
  right: 7%;
  bottom: 3%;
  left: 4%;
  height: 12%;
  transform: translateY(3px) rotate(.3deg) scaleX(.96);
}
.archive-feature-grid .portal-card-favorites::after {
  right: 5%;
  bottom: 1.5%;
  left: 4%;
  height: 13%;
  transform: translateY(3px) rotate(-.35deg) scaleX(.98);
}
.archive-feature-grid .archive-object-card:hover,
.archive-feature-grid .archive-object-card.search-match {
  border: 0;
  box-shadow: none;
  transform: translateY(-2px);
  filter: drop-shadow(0 13px 14px rgba(75, 62, 59, .16));
}
.archive-home-stage:has(.portal-card-atlas:hover) .archive-network-atlas,
.archive-home-stage:has(.portal-card-atlas:focus-visible) .archive-network-atlas,
.archive-home-stage:has(.portal-card-atlas.search-match) .archive-network-atlas,
.archive-home-stage:has(.portal-card-intelligence:hover) .archive-network-intelligence,
.archive-home-stage:has(.portal-card-intelligence:focus-visible) .archive-network-intelligence,
.archive-home-stage:has(.portal-card-favorites:hover) .archive-network-favorites,
.archive-home-stage:has(.portal-card-favorites:focus-visible) .archive-network-favorites,
.archive-home-stage:has(.heat-portal-search:focus-within) .archive-network-search {
  stroke: rgba(192, 135, 72, .76);
  stroke-width: 2.1;
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(225,179,103,.45));
}
.archive-home-stage:has(.portal-card-atlas:hover) .archive-runner-atlas,
.archive-home-stage:has(.portal-card-atlas:focus-visible) .archive-runner-atlas,
.archive-home-stage:has(.portal-card-intelligence:hover) .archive-runner-intelligence,
.archive-home-stage:has(.portal-card-intelligence:focus-visible) .archive-runner-intelligence,
.archive-home-stage:has(.portal-card-favorites:hover) .archive-runner-favorites,
.archive-home-stage:has(.portal-card-favorites:focus-visible) .archive-runner-favorites {
  opacity: 1;
}
.archive-home-stage:has(.heat-portal-search:focus-within) .archive-desk-vellum {
  opacity: .36;
  filter: saturate(.82) sepia(.08) contrast(.94) brightness(1.04);
}
.archive-feature-grid .archive-object-card:hover::after,
.archive-feature-grid .archive-object-card.search-match::after {
  opacity: .72;
  transform: translateY(7px) scaleX(.92);
}
.archive-feature-grid .archive-object-card:focus-visible {
  outline: 2px solid rgba(193, 142, 102, .72);
  outline-offset: 3px;
}
.archive-object-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter:
    drop-shadow(0 2px 1px rgba(66, 55, 52, .28))
    drop-shadow(0 7px 6px rgba(72, 62, 61, .18))
    drop-shadow(0 18px 20px rgba(72, 62, 61, .095))
    saturate(.94)
    brightness(1.005)
    contrast(1.015);
}
.portal-card-atlas .archive-object-image { transform: translateY(4px) rotate(-.16deg); }
.portal-card-intelligence .archive-object-image { transform: translateY(5px) rotate(.18deg); }
.portal-card-favorites .archive-object-image { transform: translateY(4px) rotate(-.22deg); }
.portal-card-atlas { grid-column: 1; grid-row: 1 / 3; }
.portal-card-intelligence { grid-column: 2; grid-row: 1; }
.portal-card-favorites { grid-column: 2; grid-row: 2; }
.archive-object-copy {
  position: absolute;
  z-index: 2;
  display: grid;
  color: #5d5153;
  pointer-events: none;
}
.archive-atlas-copy {
  inset: 13% 12% 12% 21%;
  grid-template-columns: 78px minmax(0, 1fr);
  grid-template-rows: auto auto auto auto 1fr;
  align-content: center;
}
.archive-atlas-copy > small {
  grid-column: 1 / -1;
  align-self: start;
  color: #756d6f;
  font-family: Georgia, serif;
  font-size: 8px;
  font-style: italic;
  line-height: 1.35;
}
.archive-object-emblem {
  width: 67px;
  height: 67px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(181, 137, 75, .52);
  border-radius: 50%;
  color: #b38b50;
  box-shadow: inset 0 0 0 5px rgba(190,153,97,.06);
}
.archive-object-emblem svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.archive-atlas-copy > strong {
  align-self: end;
  color: #3f3c43;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(25px, 2.2vw, 34px);
  font-weight: 600;
  line-height: 1.1;
}
.archive-atlas-copy > em {
  grid-column: 2;
  color: #b88e61;
  font-family: Georgia, serif;
  font-size: 8px;
  font-style: normal;
  letter-spacing: 3px;
}
.archive-atlas-copy > span:not(.archive-object-emblem):not(.portal-card-action) {
  grid-column: 2;
  margin-top: 13px;
  color: #6a6367;
  font-size: clamp(9px, .8vw, 12px);
  line-height: 1.8;
}
.archive-atlas-copy .portal-card-action {
  grid-column: 2;
  align-self: end;
  color: #c46888;
  font-size: 10px;
}
.archive-compact-copy {
  inset: 23% 12% 19% 15%;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
}
.archive-compact-copy .archive-object-emblem {
  width: 58px;
  height: 58px;
}
.archive-compact-copy .archive-object-emblem svg { width: 30px; height: 30px; }
.archive-object-text { display: grid; gap: 8px; }
.archive-object-text strong {
  color: #4e4b51;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(17px, 1.45vw, 23px);
  font-weight: 600;
}
.archive-object-text > span {
  color: #777277;
  font-size: clamp(8px, .68vw, 11px);
  line-height: 1.65;
}
.archive-compact-copy .portal-card-action {
  color: #b2894d;
  font-size: 17px;
}
.portal-card-favorites .archive-compact-copy {
  inset: 20% 17% 18% 18%;
}
.portal-card-favorites .archive-object-emblem { color: #bc6e82; }
.portal-card-favorites .archive-compact-copy .portal-card-action { color: #bd647f; }
.archive-feature-grid .archive-object-card:hover .portal-card-action b,
.archive-feature-grid .archive-object-card:focus-visible .portal-card-action b { transform: translateX(3px); }
.archive-feature-grid .portal-card-action b {
  display: inline-block;
  transition: transform .2s ease;
}
body.archive-portal-active .heat-portal-footer {
  position: relative;
  z-index: 7;
  width: min(760px, 62vw);
  min-height: 42px;
  margin: 2px auto 0;
  padding: 10px 24px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-top: 1px solid rgba(183, 145, 88, .2);
  background: transparent;
  filter: none;
}
body.archive-portal-active .heat-portal-footer::before,
body.archive-portal-active .heat-portal-footer::after {
  content: "✦";
  position: absolute;
  top: -7px;
  color: rgba(184, 139, 73, .45);
  font-size: 9px;
  background: transparent;
  padding-inline: 6px;
}
body.archive-portal-active .heat-portal-footer::before { left: 14%; }
body.archive-portal-active .heat-portal-footer::after { right: 14%; }
body.archive-portal-active .heat-portal-footer span { min-width: 0; padding: 0 clamp(18px, 2.4vw, 34px); color: rgba(72,72,80,.68); }
body.archive-portal-active .heat-portal-footer i { margin-right: 5px; font-style: normal; }
body.archive-portal-active .heat-portal-footer strong { color: rgba(67,66,73,.86); }

@media (max-width: 1100px) and (min-width: 761px) {
  body.archive-portal-active .mode-navigation { width: 88px; left: 4px; padding-inline: 17px; }
  body.archive-portal-active .mode-tab { width: 47px; height: 47px; min-height: 47px; }
  body.archive-portal-active .heat-portal-search { width: min(760px, 68vw); }
  .archive-feature-grid {
    width: min(900px, 82vw);
    grid-template-columns: minmax(0, 1.35fr) minmax(270px, .95fr);
  }
}

@media (max-width: 760px) {
  body.archive-portal-active .topbar {
    display: none;
  }
  body.archive-portal-active .brand-logo-crop { flex-basis: 43px; width: 43px; height: 43px; }
  body.archive-portal-active .brand-logo { width: 53px; }
  body.archive-portal-active .brand h1 { font-size: 17px; }
  body.archive-portal-active .brand p { display: none; }
  body.archive-portal-active .primary-toolbar { width: auto; margin: 0; }
  body.archive-portal-active .primary-toolbar .secondary-button { min-height: 36px; padding-inline: 10px; }
  body.archive-portal-active .workspace { min-height: auto; padding: 0; }
  body:has(.archive-home-stage.archive-book-active) .mode-navigation {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
  }
  body.archive-portal-active .mode-navigation {
    position: relative;
    top: auto;
    left: auto;
    z-index: 16;
    width: min(330px, calc(100% - 24px));
    height: 54px;
    min-height: 54px;
    margin: 10px auto -66px;
    padding: 4px 12px;
    grid-template-columns: repeat(7, auto);
    align-content: center;
    justify-content: center;
    gap: 7px;
    overflow: visible;
    border: 1px solid rgba(255,255,255,.62);
    border-radius: 8px;
    background: rgba(34, 48, 69, .72);
    box-shadow: 0 10px 28px rgba(45,51,68,.18);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    filter: none;
    transform: none;
  }
  body.archive-portal-active .mode-navigation::before,
  body.archive-portal-active .mode-navigation::after { display: none; }
  body.archive-portal-active .mode-tab { width: 39px; height: 39px; min-height: 39px; }
  body.archive-portal-active .mode-tab-icon { width: 21px; height: 21px; }
  body.archive-portal-active .heat-radar-section.portal-home-active,
  body.archive-portal-active .portal-home-active .heat-portal-view,
  .archive-home-stage { min-height: auto; }
  .archive-home-stage {
    padding: 78px 12px 26px;
    background-position: 48% center;
  }
  .archive-home-stage::before { background: rgba(255,255,255,.2); }
  .archive-home-decor { display: none; }
  .archive-desk-art { display: none; }
  .archive-stage-platform {
    top: 69%;
    width: min(600px, 112vw);
    height: 150px;
    opacity: .62;
  }
  .archive-stage-platform-plaque { display: none; }
  .archive-ambient-light { left: -18%; width: 82%; opacity: .3; animation: none; }
  .archive-ambient-vignette { box-shadow: inset 0 0 48px rgba(54,63,78,.06); }
  .archive-astral-trace,
  .archive-crystal-sheen,
  .archive-ambient-dust,
  .archive-ambient-petal { display: none; }
  body.archive-portal-active .heat-portal-hero { padding-top: 10px; }
  body.archive-portal-active .heat-portal-hero h2 { font-size: 43px; }
  body.archive-portal-active .heat-portal-hero > p { margin-top: 12px; font-size: 13px; letter-spacing: 3px; }
  body.archive-portal-active .heat-portal-hero::before,
  body.archive-portal-active .heat-portal-hero::after,
  body.archive-portal-active .heat-portal-spark { display: none; }
  body.archive-portal-active .heat-portal-workbench {
    width: min(100%, 560px);
    margin-inline: auto;
    padding: 10px 0 12px;
  }
  body.archive-portal-active .heat-portal-search {
    width: min(100%, 560px);
    min-height: 56px;
    aspect-ratio: auto;
    margin-top: 20px;
    padding: 0 54px 0 49px;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    grid-template-rows: 68.5% 31.5%;
    gap: 10px;
  }
  .archive-search-frame { object-fit: fill; }
  .archive-search-icon { width: 23px; height: 23px; }
  .archive-feature-grid {
    width: min(100%, 560px);
    height: auto;
    min-height: 0;
    margin-top: 16px;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 7px;
  }
  .archive-feature-grid .archive-object-card {
    grid-column: 1;
    grid-row: auto;
    width: min(100%, 330px);
    justify-self: center;
    aspect-ratio: 1.9 / 1;
  }
  .archive-feature-grid .portal-card-intelligence { aspect-ratio: 2.15 / 1; }
  .archive-feature-grid .portal-card-favorites { aspect-ratio: 2.65 / 1; }
  .archive-atlas-copy { inset: 12% 13% 12% 21%; grid-template-columns: 50px minmax(0, 1fr); }
  .archive-object-emblem { width: 43px; height: 43px; }
  .archive-object-emblem svg { width: 25px; height: 25px; }
  .archive-atlas-copy > strong { font-size: clamp(21px, 6vw, 27px); }
  .archive-atlas-copy > em { font-size: 6px; letter-spacing: 2px; }
  .archive-atlas-copy > span:not(.archive-object-emblem):not(.portal-card-action) { margin-top: 8px; font-size: 8.5px; line-height: 1.65; }
  .archive-atlas-copy .portal-card-action { font-size: 8px; }
  .archive-compact-copy { inset: 23% 15% 20% 16%; grid-template-columns: 47px minmax(0, 1fr) auto; gap: 10px; }
  .archive-compact-copy .archive-object-emblem { width: 43px; height: 43px; }
  .archive-compact-copy .archive-object-emblem svg { width: 23px; height: 23px; }
  .archive-object-text { gap: 5px; }
  .archive-object-text strong { font-size: clamp(17px, 4.7vw, 21px); }
  .archive-object-text > span { font-size: 8.5px; line-height: 1.55; }
  .archive-compact-copy .portal-card-action { font-size: 14px; }
  body.archive-portal-active .heat-portal-footer {
    width: min(100%, 560px);
    margin-top: 10px;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 0;
    border-top: 1px solid rgba(183, 145, 88, .2);
    border-radius: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  body.archive-portal-active .heat-portal-footer::before,
  body.archive-portal-active .heat-portal-footer::after { display: none; }
  body.archive-portal-active .heat-portal-footer span { min-width: 0; padding: 0 5px; font-size: 8px; }
  body.archive-portal-active .heat-portal-footer span + span { border-left: 1px solid rgba(125,135,150,.18); }
  body.archive-portal-active .heat-portal-footer strong { display: block; margin: 4px 0 0; font-size: 10px; }
}

@media (max-width: 420px) {
  .archive-home-stage { padding-inline: 7px; }
  body.archive-portal-active .heat-portal-search { padding-inline: 37px 43px; }
  .archive-feature-grid .archive-object-card { aspect-ratio: 1.9 / 1; }
  .archive-feature-grid .portal-card-intelligence { aspect-ratio: 2.15 / 1; }
  .archive-feature-grid .portal-card-favorites { aspect-ratio: 2.65 / 1; }
  .archive-atlas-copy > small,
  .archive-atlas-copy > em { display: none; }
  .archive-atlas-copy { grid-template-rows: auto auto 1fr; }
}

/* V5.0 · personal collection album */
.profile-collection-editor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(91, 64, 67, .76);
}
.profile-collection-editor > span {
  flex: 0 0 auto;
  font: 600 12px/1.2 "Microsoft YaHei", sans-serif;
}
.profile-collection-options {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.profile-collection-options button {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(173, 125, 117, .26);
  border-radius: 6px;
  background: rgba(255, 250, 246, .40);
  color: rgba(94, 68, 69, .72);
  font: 600 11px/1 "Microsoft YaHei", sans-serif;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.profile-collection-options button:hover,
.profile-collection-options button:focus-visible { transform: translateY(-1px); border-color: rgba(191, 104, 129, .56); color: #8f5265; }
.profile-collection-options button.is-selected { border-color: rgba(190, 100, 127, .62); background: rgba(235, 178, 194, .24); color: #925469; box-shadow: inset 0 0 0 1px rgba(255,255,255,.48); }
.profile-collection-options .profile-collection-clear { padding-inline: 7px; border-color: transparent; background: transparent; color: rgba(125, 91, 91, .58); }
.archive-profile-collection-editor { margin: 12px 0 4px; padding-top: 11px; border-top: 1px solid rgba(161, 125, 100, .17); }
.atlas-profile-collection-editor { margin: 0 0 13px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.54); background: rgba(255,255,255,.18); }

.favorites-album-dialog {
  width: min(1180px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  color: #5f4b4d;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.favorites-album-dialog::backdrop {
  background: rgba(33, 27, 37, .46);
  -webkit-backdrop-filter: blur(3px) saturate(.86);
  backdrop-filter: blur(3px) saturate(.86);
}
.favorites-album-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 24px);
  overflow: visible;
  filter: drop-shadow(0 28px 42px rgba(42, 29, 39, .26));
}
.favorites-album-stage::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 12%;
  right: 12%;
  bottom: 7.2%;
  height: 2.5%;
  border-radius: 50%;
  background: rgba(80, 48, 43, .16);
  filter: blur(10px);
  pointer-events: none;
}
.favorites-album-paper,
.favorites-album-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.favorites-album-paper { opacity: 0; transform: scale(.94); transition: opacity .32s ease .08s, transform .55s cubic-bezier(.22,.78,.22,1); filter: drop-shadow(0 20px 27px rgba(65,43,54,.18)); }
.favorites-album-cover { z-index: 4; display: grid; place-items: center; pointer-events: none; transition: opacity .26s ease, transform .5s cubic-bezier(.22,.78,.22,1); }
.favorites-album-cover img { width: 49%; height: auto; filter: drop-shadow(0 24px 26px rgba(65,43,54,.25)); transform: translateY(5%) rotate(-.5deg); }
.favorites-album-content { position: absolute; z-index: 2; inset: 10.2% 10.8% 10.8% 10.5%; display: grid; grid-template-columns: 49.6% 50.4%; opacity: 0; transform: translateY(6px); transition: opacity .28s ease .25s, transform .38s ease .25s; pointer-events: none; }
.favorites-album-dialog.is-opened .favorites-album-paper { opacity: 1; transform: scale(1); }
.favorites-album-dialog.is-opened .favorites-album-cover { opacity: 0; transform: scale(1.08) translateY(-3%); }
.favorites-album-dialog.is-opened .favorites-album-content { opacity: 1; transform: none; pointer-events: auto; }
.favorites-album-close {
  position: absolute;
  z-index: 6;
  top: 8.5%;
  right: 7.4%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(177, 128, 119, .3);
  border-radius: 50%;
  background: rgba(255, 251, 245, .72);
  color: #9a6c75;
  box-shadow: 0 5px 14px rgba(104, 73, 72, .1);
  opacity: 0;
  transition: opacity .2s ease .3s, transform .18s ease;
}
.favorites-album-dialog.is-opened .favorites-album-close { opacity: 1; }
.favorites-album-close:hover { transform: rotate(4deg) scale(1.03); }
.favorites-album-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.favorites-album-index { min-width: 0; padding: 6.2% 11% 5.5% 7.5%; display: flex; flex-direction: column; }
.favorites-album-index > header,
.favorites-album-index > .favorites-filter-list,
.favorites-album-index > .favorites-local-note,
.favorites-album-index > .favorites-go-atlas {
  transform: translateX(5.6ch);
}
.favorites-album-index header { max-width: 82%; }
.favorites-album-index header small,
.favorites-album-page-heading small { display: block; color: rgba(157, 112, 97, .66); font: 600 8px/1.2 Georgia, serif; letter-spacing: 2px; }
.favorites-album-index h2 { margin: 8px 0 5px; color: #664f54; font: 500 clamp(24px, 2.6vw, 39px)/1.1 "STSong", "SimSun", serif; }
.favorites-album-index header p { margin: 0; color: rgba(96, 74, 76, .68); font: 12px/1.7 "Microsoft YaHei", sans-serif; }
.favorites-filter-list { margin-top: clamp(16px, 3.2vh, 30px); width: 75%; display: grid; gap: 5px; }
.favorites-filter-list button {
  width: 100%;
  min-height: 36px;
  padding: 7px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid rgba(169, 127, 106, .16);
  border-radius: 0;
  background: transparent;
  color: rgba(94, 70, 72, .76);
  font: 600 12px/1.2 "Microsoft YaHei", sans-serif;
  text-align: left;
}
.favorites-filter-list button::before { content: ""; width: 4px; height: 4px; flex: 0 0 auto; border: 1px solid currentColor; transform: rotate(45deg); opacity: .48; }
.favorites-filter-list button span { margin-right: auto; }
.favorites-filter-list button b { min-width: 22px; color: #b16f81; font: 700 12px/1 Georgia, serif; text-align: right; }
.favorites-filter-list button:hover,
.favorites-filter-list button.is-active { color: #8d5868; border-bottom-color: rgba(184, 101, 127, .34); background: linear-gradient(90deg, rgba(228, 170, 189, .12), transparent); }
.favorites-local-note { margin: auto 0 10px; max-width: 76%; color: rgba(117, 89, 87, .64); font: 10px/1.55 "Microsoft YaHei", sans-serif; }
.favorites-go-atlas { align-self: flex-start; padding: 7px 0; border: 0; background: transparent; color: #a15f73; font: 600 11px/1.2 "Microsoft YaHei", sans-serif; }
.favorites-go-atlas span { display: inline-block; width: 18px; height: 1px; margin-left: 7px; vertical-align: middle; background: currentColor; transition: transform .18s ease; }
.favorites-go-atlas:hover span { transform: translateX(3px); }
.favorites-album-page { min-width: 0; padding: 7.4% 10.5% 6.5% 7%; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.favorites-album-page-heading { padding: 0 6% 12px 4%; display: flex; align-items: end; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(169, 127, 106, .14); }
.favorites-album-page-heading strong { display: block; margin-top: 5px; color: #685157; font: 500 clamp(19px, 1.7vw, 27px)/1.2 "STSong", "SimSun", serif; }
.favorites-album-page-heading p { margin: 0; color: rgba(111, 82, 83, .56); font: 10px/1.3 "Microsoft YaHei", sans-serif; }
.favorites-list { max-height: none; min-height: 0; overflow: auto; padding: 14px 6% 8px 4%; scrollbar-color: rgba(178, 116, 134, .24) transparent; }
.favorite-empty { min-height: 100%; padding: 24px; display: grid; place-items: center; align-content: center; gap: 9px; color: rgba(109, 79, 81, .58); text-align: center; }
.favorite-empty-seal { width: 68px; height: 68px; display: grid; place-items: center; border: 1px solid rgba(184, 135, 111, .22); border-radius: 50%; color: rgba(188, 116, 139, .52); font-size: 26px; box-shadow: 0 0 0 8px rgba(220, 178, 187, .06); }
.favorite-empty strong { color: #70545a; font: 500 18px/1.3 "STSong", "SimSun", serif; }
.favorite-empty span:last-child { max-width: 260px; font: 11px/1.7 "Microsoft YaHei", sans-serif; }
.favorite-item { padding: 12px; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 13px; border: 1px solid rgba(178, 133, 116, .17); border-radius: 6px; background: rgba(255, 252, 246, .32); box-shadow: 0 5px 14px rgba(104, 76, 72, .035), inset 0 1px rgba(255,255,255,.5); }
.favorite-item + .favorite-item { margin-top: 10px; border-top: 1px solid rgba(178, 133, 116, .17); }
.favorite-item-art { position: relative; min-height: 96px; overflow: hidden; border: 1px solid rgba(177, 126, 111, .22); border-radius: 4px; background: rgba(239, 203, 209, .18); }
.favorite-item-art img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.favorite-item-art span { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(143, 87, 104, .62); font: 500 25px/1 "STSong", serif; }
.favorite-item-art img[hidden],
.favorite-item-art span[hidden] { display: none; }
.favorite-item-body { min-width: 0; }
.favorite-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.favorite-item-title strong { display: block; color: #674d53; font: 600 15px/1.35 "STSong", "SimSun", serif; }
.favorite-item-title span { display: block; margin-top: 3px; color: rgba(103, 77, 78, .56); font: 9px/1.45 "Microsoft YaHei", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.favorite-item-status { flex: 0 0 auto; padding: 3px 6px; border: 1px solid rgba(188, 113, 137, .24); color: #a45f74; font: 600 9px/1.2 "Microsoft YaHei", sans-serif; }
.favorite-item-body > p { margin: 7px 0 0; display: -webkit-box; overflow: hidden; color: rgba(96, 73, 74, .62); font: 9px/1.55 "Microsoft YaHei", sans-serif; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.favorite-fields { margin-top: 9px; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 7px; }
.favorite-fields select,
.favorite-fields input { width: 100%; height: 29px; padding: 4px 7px; border: 1px solid rgba(169, 126, 111, .2); border-radius: 4px; background: rgba(255,255,255,.32); color: #6d5357; font: 10px/1 "Microsoft YaHei", sans-serif; }
.favorite-fields input:focus,
.favorite-fields select:focus { outline: 0; border-color: rgba(187, 104, 130, .48); box-shadow: 0 0 0 2px rgba(218, 152, 174, .09); }
.favorite-item-actions { margin-top: 7px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.favorite-time { color: rgba(110, 83, 82, .46); font: 8px/1.2 Georgia, serif; }
.favorite-remove { padding: 4px 0; border: 0; background: transparent; color: rgba(151, 83, 100, .68); font: 9px/1.2 "Microsoft YaHei", sans-serif; }

@media (max-width: 820px) {
  .favorites-album-index > header,
  .favorites-album-index > .favorites-filter-list,
  .favorites-album-index > .favorites-local-note,
  .favorites-album-index > .favorites-go-atlas { transform: none; }
  .profile-collection-editor { align-items: flex-start; flex-direction: column; }
  .profile-collection-options { flex-wrap: wrap; }
  .favorites-album-dialog { width: min(680px, calc(100vw - 12px)); max-height: calc(100vh - 12px); }
  .favorites-album-stage { aspect-ratio: auto; min-height: min(820px, calc(100vh - 12px)); border-radius: 8px; background: #fff7f3; filter: drop-shadow(0 18px 32px rgba(42,29,39,.26)); }
  .favorites-album-paper { inset: 0; object-fit: contain; filter: drop-shadow(0 14px 24px rgba(42,29,39,.18)); }
  .favorites-album-cover img { width: 72%; }
  .favorites-album-content { inset: 4.5% 5% 4%; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .favorites-album-index { padding: 5% 6% 3%; border-bottom: 1px solid rgba(169,127,106,.16); }
  .favorites-album-index header { max-width: calc(100% - 42px); }
  .favorites-album-index h2 { font-size: 29px; }
  .favorites-album-index header p { font-size: 11px; }
  .favorites-filter-list { width: 100%; margin-top: 13px; display: flex; gap: 5px; overflow-x: auto; padding-bottom: 3px; }
  .favorites-filter-list button { width: auto; min-width: max-content; min-height: 32px; padding: 6px 9px; border: 1px solid rgba(169,127,106,.18); border-radius: 5px; }
  .favorites-filter-list button::before { display: none; }
  .favorites-local-note { margin: 10px 0 0; max-width: none; }
  .favorites-go-atlas { display: none; }
  .favorites-album-page { padding: 3% 5% 5%; min-height: 0; }
  .favorites-album-page-heading { padding: 0 2% 10px; }
  .favorites-list { padding: 11px 2% 4px; }
  .favorites-album-close { top: 3.4%; right: 5%; }
}

@media (max-width: 520px) {
  .favorites-album-index header p { display: none; }
  .favorites-local-note { font-size: 9px; }
  .favorite-item { grid-template-columns: 62px minmax(0, 1fr); padding: 10px; }
  .favorite-item-art { min-height: 82px; }
  .favorite-item-body > p { display: none; }
  .favorite-fields { grid-template-columns: 78px minmax(0, 1fr); }
  .profile-collection-options button { padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .favorites-album-paper,
  .favorites-album-cover,
  .favorites-album-content,
  .favorites-album-close { transition: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .archive-ambient-light,
  .archive-astral-trace,
  .archive-crystal-sheen,
  .archive-ambient-dust,
  .archive-ambient-petal,
  .archive-desk-refraction,
  .archive-desk-star { animation: none !important; }
  .archive-ambient-dust,
  .archive-ambient-petal,
  .archive-crystal-sheen,
  .archive-network-runners,
  .archive-desk-refraction,
  .archive-desk-star { display: none; }
  .archive-feature-grid .archive-object-card,
  .archive-feature-grid .portal-card-action b,
  body.archive-portal-active .heat-portal-search { transition: none !important; }
  .archive-feature-grid .archive-object-card:hover,
  body.archive-portal-active .heat-portal-search:focus-within { transform: none; }
}

/* V4.1 archive reader: stable full-viewport stage and first-phase book opening. */
body.archive-portal-active,
body.archive-portal-active .workspace,
body.archive-portal-active #workbench,
body.archive-portal-active .heat-radar-section.portal-home-active,
body.archive-portal-active .portal-home-active .heat-portal-view,
body.archive-portal-active .archive-home-stage {
  width: 100%;
  max-width: none;
}
body.archive-portal-active .workspace,
body.archive-portal-active #workbench { min-width: 0; }
body.archive-portal-active .archive-home-stage {
  height: max(720px, 100vh);
  min-height: max(720px, 100vh);
  background-size: cover;
  background-position: center;
}
.archive-home-canvas {
  position: relative;
  width: min(1600px, 100%);
  min-height: max(720px, 100vh);
  margin-inline: auto;
}
.archive-home-content {
  position: relative;
  width: 100%;
  animation: none;
}
body.archive-portal-active .mode-navigation {
  left: clamp(8px, 1.1vw, 20px);
}

.archive-home-content > .heat-portal-hero,
.archive-home-content > .heat-portal-search,
.archive-home-content > .archive-feature-grid,
.archive-home-content > .heat-portal-footer,
.archive-home-canvas > .archive-home-decor {
  transition: opacity .42s ease, filter .52s ease, transform .52s ease;
}
.archive-home-stage.archive-book-active .archive-home-content > .heat-portal-hero,
.archive-home-stage.archive-book-active .archive-home-content > .heat-portal-search,
.archive-home-stage.archive-book-active .archive-home-content > .heat-portal-footer,
.archive-home-stage.archive-book-active .archive-home-canvas > .archive-home-decor,
.archive-home-stage.archive-book-active .archive-feature-grid > .archive-object-card:not(.portal-card-atlas) {
  opacity: .08;
  filter: blur(8px) saturate(.72);
  pointer-events: none;
}
.archive-home-stage.archive-book-active .archive-home-content {
  animation: none;
}
.archive-home-stage.archive-book-active .portal-card-atlas {
  opacity: 0;
  pointer-events: none;
}
.archive-home-stage.archive-book-active .archive-home-background {
  animation: none;
  filter: saturate(.76) brightness(.86) blur(2px) !important;
  transform: translate3d(0, 0, 0) scale(1.075) !important;
  transition: filter .55s ease, transform .65s ease;
}
.archive-home-stage.archive-book-active.archive-profile-active .archive-home-background {
  filter: saturate(.74) brightness(.72) contrast(.92) blur(3px) !important;
  transform: translate3d(0, 0, 0) scale(1.055) !important;
  transition: background-image .72s ease, filter .72s ease, transform .72s ease;
}
.archive-home-stage.archive-book-active.archive-profile-active .archive-profile-background {
  background-image: var(--archive-profile-background);
  opacity: .88;
}
.archive-home-stage.archive-book-active.archive-profile-active::before {
  background:
    radial-gradient(ellipse 55% 76% at center, rgba(16,20,28,.02) 25%, rgba(16,20,28,.2) 100%),
    linear-gradient(180deg, rgba(255,255,255,.01), transparent 30%, rgba(39,28,28,.08) 100%);
  transition: background .72s ease;
}
.archive-home-stage.archive-intelligence-active .archive-home-content > .heat-portal-hero,
.archive-home-stage.archive-intelligence-active .archive-home-content > .heat-portal-search,
.archive-home-stage.archive-intelligence-active .archive-home-content > .heat-portal-footer,
.archive-home-stage.archive-intelligence-active .archive-home-canvas > .archive-home-decor,
.archive-home-stage.archive-intelligence-active .archive-feature-grid > .archive-object-card:not(.portal-card-intelligence) {
  opacity: .08;
  filter: blur(8px) saturate(.72);
  pointer-events: none;
}
.archive-home-stage.archive-intelligence-active .portal-card-intelligence {
  opacity: 0;
  pointer-events: none;
}
.archive-home-stage.archive-intelligence-active .archive-home-background {
  animation: none;
  filter: saturate(.78) brightness(.87) blur(2px) !important;
  transform: translate3d(0, 0, 0) scale(1.075) !important;
  transition: filter .55s ease, transform .65s ease;
}
.archive-home-stage.archive-intelligence-active::after {
  content: "";
  position: absolute;
  z-index: 8;
  inset: 0;
  background: rgba(35, 45, 49, .17);
  -webkit-backdrop-filter: blur(3px) saturate(88%);
  backdrop-filter: blur(3px) saturate(88%);
  pointer-events: none;
  animation: archive-reader-backdrop .45s ease both;
}
.archive-home-stage.archive-book-active::after {
  content: "";
  position: absolute;
  z-index: 8;
  inset: 0;
  background: rgba(35, 39, 51, .18);
  -webkit-backdrop-filter: blur(3px) saturate(88%);
  backdrop-filter: blur(3px) saturate(88%);
  pointer-events: none;
  animation: archive-reader-backdrop .45s ease both;
}
@keyframes archive-reader-backdrop { from { opacity: 0; } to { opacity: 1; } }

.page-motion-paused *,
.page-motion-paused *::before,
.page-motion-paused *::after {
  animation-play-state: paused !important;
}

.archive-book-reader {
  --book-source-dx: 0px;
  --book-source-dy: 0px;
  --book-source-scale-x: .52;
  --book-source-scale-y: .58;
  position: fixed;
  z-index: 12;
  inset: 0;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  perspective: 1800px;
}
.archive-book-reader.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.archive-book-close {
  position: absolute;
  z-index: 8;
  top: clamp(18px, 3vh, 34px);
  left: clamp(118px, 9vw, 150px);
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(223, 195, 142, .5);
  border-radius: 7px;
  background: rgba(20, 30, 48, .68);
  box-shadow: 0 13px 32px rgba(8, 13, 25, .18), inset 0 1px rgba(255,255,255,.09);
  color: #f6e9ca;
  font-size: 11px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
.archive-book-reader.is-focused .archive-book-close { opacity: 1; transform: none; }
.archive-book-close:hover { background: rgba(29, 43, 67, .82); }
.archive-book-close span { margin-right: 7px; }

.archive-book-shell {
  position: absolute;
  left: 50%;
  top: 53%;
  width: min(1180px, calc(100vw - 210px));
  aspect-ratio: 1544 / 857;
  transform:
    translate(calc(-50% + var(--book-source-dx)), calc(-50% + var(--book-source-dy)))
    scale(var(--book-source-scale-x), var(--book-source-scale-y));
  transform-origin: center;
  transform-style: preserve-3d;
  filter: none;
  transition: transform .68s cubic-bezier(.22,.76,.22,1);
}

/* Local-only layout ruler. It is inert and fully transparent unless the page
   is opened on localhost with ?devgrid=1, so it cannot affect public builds. */
.archive-book-layout-grid {
  position: absolute;
  z-index: 30;
  inset: 10.5% 9.5% 12.5%;
  opacity: 0;
  pointer-events: none;
  color: rgba(77, 117, 132, .9);
  font: 600 8px/1.1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .04em;
  transition: opacity .2s ease;
}
.archive-book-layout-grid-page {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc(50% - 1px);
  border: 1px solid rgba(91, 151, 163, .58);
  background-image:
    linear-gradient(to right, rgba(83, 145, 160, .23) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(83, 145, 160, .18) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%, 100% calc(100% / 8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26);
}
.archive-book-layout-grid-left { left: 0; }
.archive-book-layout-grid-right { right: 0; }
.archive-book-layout-grid-spine {
  position: absolute;
  top: -1.5%;
  bottom: -1.5%;
  left: 50%;
  width: 1px;
  background: rgba(176, 108, 121, .78);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .34), 0 0 12px rgba(176, 108, 121, .26);
  transform: translateX(-50%);
}
.archive-book-layout-grid-center {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(255, 250, 239, .72);
  box-shadow: 0 0 0 3px rgba(83, 145, 160, .1);
  transform: translate(-50%, -50%);
}
.archive-book-layout-grid-center-left { left: 25%; }
.archive-book-layout-grid-center-right { left: 75%; }
.archive-book-layout-grid-label {
  position: absolute;
  padding: 3px 5px;
  border: 1px solid rgba(83, 145, 160, .35);
  background: rgba(252, 248, 236, .76);
  white-space: nowrap;
  text-shadow: 0 1px rgba(255, 255, 255, .75);
}
.archive-book-layout-grid-label-top { top: -18px; left: 50%; transform: translateX(-50%); }
.archive-book-layout-grid-label-left { left: 0; bottom: -18px; }
.archive-book-layout-grid-label-right { right: 0; bottom: -18px; }
html.dev-layout-grid-enabled .archive-book-reader.is-active.is-open .archive-book-layout-grid,
html.dev-layout-grid-enabled .intelligence-book-reader.is-active.is-inner-page-visible .archive-book-layout-grid,
html.dev-layout-grid-enabled .intelligence-book-reader.is-active.is-open .archive-book-layout-grid { opacity: 1; }

.archive-book-reader.is-focused .archive-book-shell {
  transform: translate(-50%, -50%) scale(1);
}
.archive-book-reader.is-left-page-focused .archive-book-shell {
  transform: translate(-39%, -50%) scale(1.15);
}
.archive-book-open-spread,
.archive-book-closed-layer,
.archive-book-motion-sequence {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.archive-book-open-spread { z-index: 1; opacity: 0; filter: drop-shadow(0 34px 34px rgba(29, 24, 29, .3)); transition: opacity .18s linear; }
.archive-book-closed-layer { z-index: 4; opacity: 1; filter: drop-shadow(0 28px 28px rgba(29, 24, 29, .28)); transition: opacity .16s linear; }
.archive-book-reader.is-turning .archive-book-open-spread,
.archive-book-reader.is-turning .archive-book-closed-layer { transition: none; }
.archive-book-motion-sequence {
  z-index: 6;
  opacity: 0;
  background-image: url("assets/homepage/book-opening-sequence.webp");
  background-repeat: no-repeat;
  background-size: 900% 300%;
  background-position: 0 0;
  transform: translateZ(2px);
  image-rendering: auto;
  filter: drop-shadow(0 13px 12px rgba(54, 42, 43, .15));
  will-change: background-position, opacity;
}
.archive-book-reader.is-turning .archive-book-shell {
  filter: none;
}
.archive-book-reader.is-opening .archive-book-open-spread,
.archive-book-reader.is-open .archive-book-open-spread { opacity: 1; }
.archive-book-reader.is-opening .archive-book-closed-layer,
.archive-book-reader.is-open .archive-book-closed-layer { opacity: 0; }

/* The goods guide uses the same archive room and reader scale as the atlas. */
.intelligence-book-reader {
  --intelligence-source-dx: 0px;
  --intelligence-source-dy: 0px;
  --intelligence-source-scale-x: .28;
  --intelligence-source-scale-y: .24;
  position: fixed;
  /* Keep the reader controls above the sticky workspace navigation. */
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  perspective: 1800px;
}
.intelligence-book-reader.is-active { visibility: visible; opacity: 1; pointer-events: auto; }
/* The portal view has a transform during route transitions, so lift its
   stacking context while the reader is open; otherwise sticky navigation can
   sit above the visible close control even when the reader has a high z-index. */
#heatPortalView:has(.intelligence-book-reader.is-active) {
  position: relative;
  z-index: 50;
}
/* Navigation remains visually present during the book scene, but should not
   intercept clicks intended for the reader's close control. */
.workspace:has(.archive-intelligence-active) > .mode-navigation {
  pointer-events: none;
}
.intelligence-book-close {
  position: absolute;
  z-index: 8;
  top: clamp(18px, 3vh, 34px);
  left: clamp(118px, 9vw, 150px);
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(194, 213, 193, .54);
  border-radius: 7px;
  background: rgba(25, 48, 51, .7);
  box-shadow: 0 13px 32px rgba(8, 20, 22, .18), inset 0 1px rgba(255,255,255,.1);
  color: #e6f3e8;
  font-size: 11px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
.intelligence-book-close:hover { background: rgba(29, 63, 63, .84); }
.intelligence-book-close span { margin-right: 7px; }
.intelligence-book-reader.is-focused .intelligence-book-close { opacity: 1; transform: none; }
.intelligence-book-shell {
  position: absolute;
  left: 50%;
  top: 53%;
  width: min(1180px, calc(100vw - 210px));
  aspect-ratio: 16 / 9;
  transform: translate(calc(-50% + var(--intelligence-source-dx)), calc(-50% + var(--intelligence-source-dy))) scale(var(--intelligence-source-scale-x), var(--intelligence-source-scale-y));
  transform-origin: center;
  transform-style: preserve-3d;
  overflow: hidden;
  transition: transform .68s cubic-bezier(.22,.76,.22,1);
}
.intelligence-book-reader.is-focused .intelligence-book-shell { transform: translate(-50%, -50%) scale(1); }
.intelligence-book-cover,
.intelligence-book-folder-v4 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.intelligence-book-inner-page-v5 {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 22px, 0) scale(.985);
  filter: saturate(.88) brightness(.98) drop-shadow(0 14px 16px rgba(47, 65, 62, .12));
  -webkit-mask-image: radial-gradient(ellipse 80% 88% at 50% 50%, #000 0 95%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 88% at 50% 50%, #000 0 95%, transparent 100%);
  transition: opacity .62s ease .08s, transform .72s cubic-bezier(.2,.78,.2,1) .08s, filter .62s ease .08s;
  will-change: opacity, transform;
}
.intelligence-book-inner-page-v5 img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 1; mix-blend-mode: normal; filter: saturate(.96) contrast(.99); }
.intelligence-book-inner-page-ink {
  position: absolute;
  z-index: 2;
  left: 11%;
  right: 11%;
  top: 21%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(97, 135, 119, .55) 17%, rgba(97,135,119,.14) 84%, transparent);
  opacity: 0;
  transform: scaleX(.18);
  transform-origin: left center;
  transition: opacity .42s ease .32s, transform .76s cubic-bezier(.2,.8,.2,1) .32s;
}
.intelligence-book-reader.is-inner-page-visible .intelligence-book-inner-page-v5 { opacity: 1; transform: none; filter: saturate(.96) brightness(1) drop-shadow(0 18px 20px rgba(47, 65, 62, .16)); }
.intelligence-book-reader.is-inner-page-visible .intelligence-book-inner-page-ink { opacity: 1; transform: none; }
.intelligence-book-reader.is-inner-page-visible .intelligence-book-folder-v4 { opacity: 0 !important; transform: translate3d(0, -12px, 0) scale(1.012); filter: saturate(.7) brightness(.92) drop-shadow(0 8px 9px rgba(25, 40, 40, .06)); }
.intelligence-book-reader.is-inner-page-visible .intelligence-book-folder-sheen,
.intelligence-book-reader.is-inner-page-visible .intelligence-book-folder-ink { opacity: 0; }
.intelligence-book-reader.is-closing .intelligence-book-inner-page-v5 { opacity: 0; transform: translate3d(0, 16px, 0) scale(.988); }
.intelligence-book-cover { z-index: 4; opacity: 0; filter: drop-shadow(0 28px 28px rgba(25, 40, 40, .28)); transition: opacity .22s ease; }
.intelligence-book-folder-v4 {
  z-index: 1;
  opacity: 0;
  overflow: hidden;
  border-radius: 12px;
  -webkit-mask-image: radial-gradient(ellipse 78% 84% at 50% 50%, #000 0 71%, rgba(0,0,0,.92) 83%, transparent 100%);
  mask-image: radial-gradient(ellipse 78% 84% at 50% 50%, #000 0 71%, rgba(0,0,0,.92) 83%, transparent 100%);
  transform: translate3d(0, 16px, 0) scale(.975);
  filter: saturate(.88) brightness(.98) drop-shadow(0 20px 20px rgba(25, 40, 40, .12));
  transition: opacity .62s ease, transform .76s cubic-bezier(.2,.78,.2,1), filter .62s ease;
  will-change: opacity, transform;
}
.intelligence-book-folder-v4 img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 1; mix-blend-mode: normal; filter: saturate(.97) contrast(.99); }
.intelligence-book-folder-v4::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 5% 4% 6%;
  border: 1px solid rgba(126, 159, 145, .22);
  border-radius: 9px;
  opacity: 0;
  transform: scale(.985);
  transition: opacity .7s ease .18s, transform .82s ease .18s;
}
.intelligence-book-folder-sheen {
  position: absolute;
  z-index: 3;
  inset: -15% 0 auto -35%;
  width: 52%;
  height: 140%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  opacity: 0;
  transform: rotate(12deg) translateX(-30%);
  transition: opacity .28s ease .24s, transform .84s cubic-bezier(.2,.7,.2,1) .24s;
}
.intelligence-book-folder-ink {
  position: absolute;
  z-index: 3;
  left: 7%;
  right: 7%;
  top: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(90, 133, 119, .62) 18%, rgba(90,133,119,.08) 82%, transparent);
  opacity: 0;
  transform: scaleX(.2);
  transform-origin: left center;
  transition: opacity .42s ease .42s, transform .72s cubic-bezier(.2,.8,.2,1) .42s;
}
.intelligence-book-reader.is-folder-awakening .intelligence-book-folder-v4,
.intelligence-book-reader.is-folder-ready .intelligence-book-folder-v4 { opacity: 1; transform: none; filter: saturate(.96) brightness(1) drop-shadow(0 24px 25px rgba(25, 40, 40, .18)); }
.intelligence-book-reader.is-folder-awakening .intelligence-book-folder-v4::after,
.intelligence-book-reader.is-folder-ready .intelligence-book-folder-v4::after { opacity: 1; transform: none; }
.intelligence-book-reader.is-folder-awakening .intelligence-book-folder-sheen,
.intelligence-book-reader.is-folder-ready .intelligence-book-folder-sheen { opacity: .68; transform: rotate(12deg) translateX(320%); }
.intelligence-book-reader.is-folder-awakening .intelligence-book-folder-ink,
.intelligence-book-reader.is-folder-ready .intelligence-book-folder-ink { opacity: 1; transform: none; }
.intelligence-book-reader.is-closing .intelligence-book-folder-v4 { opacity: 0; transform: translate3d(0, 10px, 0) scale(.985); filter: saturate(.75) brightness(.96) drop-shadow(0 10px 10px rgba(25, 40, 40, .08)); }
.intelligence-book-reader.is-closing .intelligence-book-folder-sheen,
.intelligence-book-reader.is-closing .intelligence-book-folder-ink { opacity: 0; }


/* V4.75: keep the directory heading in the clean upper margin, above the
   inner-page guide line rather than letting that line cut through the copy. */
.intelligence-book-directory header {
  top: -6%;
  left: 0;
  width: 50%;
  padding-left: 0;
  justify-items: center;
  text-align: center;
  gap: 3px;
}
.intelligence-book-directory header::after { display: none; }
.intelligence-book-directory header p { max-width: 84%; }
.intelligence-book-directory,
.intelligence-book-detail { z-index: 6; }
.intelligence-book-directory,
.intelligence-book-detail {
  position: absolute;
  z-index: 3;
  inset: 10.5% 9.5% 12.5%;
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
  transition: opacity .38s ease .16s, transform .38s ease .16s;
}
.intelligence-book-reader.is-directory-ready:not(.is-detail) .intelligence-book-directory,
.intelligence-book-reader.is-detail .intelligence-book-detail { opacity: 1; transform: none; pointer-events: auto; }
.intelligence-book-directory header {
  position: absolute;
  top: 2.2%;
  left: 4.8%;
  width: 41%;
  display: grid;
  justify-items: start;
  gap: 4px;
  padding-left: 6%;
}
.intelligence-book-directory header::after {
  content: "";
  width: min(185px, 76%);
  height: 1px;
  margin-top: 4px;
  background: linear-gradient(90deg, rgba(99, 135, 123, .65), rgba(133, 169, 148, .08) 78%, transparent);
}
.intelligence-book-directory header small,
.intelligence-book-detail header small { color: rgba(78, 122, 108, .76); font-family: Georgia, serif; font-size: clamp(6px, .58vw, 9px); letter-spacing: 2.35px; }
.intelligence-book-directory header h3,
.intelligence-book-detail header h3 { margin: 0; color: rgba(60, 76, 70, .94); font-family: "STSong", "SimSun", serif; font-size: clamp(21px, 1.76vw, 28px); font-weight: 600; line-height: 1.18; text-shadow: 0 1px rgba(255,255,255,.38); }
.intelligence-book-directory header p,
.intelligence-book-detail header p { margin: 0; color: rgba(81, 103, 94, .74); font-size: clamp(6px, .55vw, 9px); line-height: 1.6; }
.intelligence-book-index-stamp {
  position: absolute;
  top: 10%;
  right: 8%;
  width: 25%;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  border: 1px solid rgba(91, 137, 121, .37);
  border-radius: 50%;
  color: rgba(76, 120, 106, .7);
  background: radial-gradient(circle, rgba(251,248,237,.22), transparent 69%);
  transform: rotate(-7deg);
}
.intelligence-book-directory .intelligence-book-index-stamp { opacity: .72; }
.intelligence-book-index-stamp::before,
.intelligence-book-index-stamp::after { content: ""; position: absolute; border: 1px solid currentColor; border-radius: 50%; opacity: .3; }
.intelligence-book-index-stamp::before { inset: 9%; }
.intelligence-book-index-stamp::after { inset: 18%; border-style: dashed; }
.intelligence-book-index-stamp > * { position: relative; z-index: 1; }
.intelligence-book-index-stamp span { font-family: Georgia, serif; font-size: clamp(5px,.5vw,8px); letter-spacing: 2px; }
.intelligence-book-index-stamp strong { font-family: "STKaiti", "KaiTi", serif; font-size: clamp(21px,2.3vw,35px); font-weight: 400; line-height: 1.15; text-align: center; }
.intelligence-book-index-stamp i { width: 5px; height: 5px; border: 1px solid currentColor; border-radius: 50%; box-shadow: 0 0 0 7px rgba(91, 137, 121, .06); }
.intelligence-book-directory-grid {
  position: absolute;
  inset: 30% 4.5% 8%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) minmax(126px, .7fr);
  gap: 16px 10%;
}
.intelligence-book-entry {
  --guide-ink: #47766a;
  --guide-muted: #6e7f77;
  position: relative;
  min-width: 0;
  padding: 10px 28px 10px 50px;
  display: grid;
  align-content: center;
  gap: 4px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: linear-gradient(90deg, rgba(251,247,237,.72), rgba(250,247,236,.08));
  color: var(--guide-ink);
  isolation: isolate;
  text-align: left;
  transition: transform .24s ease, filter .24s ease, background .24s ease;
}
.intelligence-book-entry-art {
  --entry-art-x: -8%;
  --entry-art-position: center right;
  position: absolute;
  z-index: 0;
  inset: 7% 5% 7% 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .38;
  border-radius: 3px;
  transform: translateX(var(--entry-art-x));
  -webkit-mask-image: radial-gradient(ellipse 86% 88% at 54% 50%, #000 0 54%, rgba(0,0,0,.74) 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 86% 88% at 54% 50%, #000 0 54%, rgba(0,0,0,.74) 72%, transparent 100%);
  transition: opacity .28s ease, transform .28s ease, filter .28s ease;
}
.intelligence-book-entry-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(251,247,237,.98) 0%, rgba(251,247,237,.82) 24%, rgba(251,247,237,.24) 67%, rgba(251,247,237,.08) 100%);
}
.intelligence-book-entry-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--entry-art-position);
  filter: saturate(.72) contrast(.9) brightness(1.02);
  mix-blend-mode: multiply;
}
.intelligence-book-entry.has-entry-art > span:not(.intelligence-book-entry-art),
.intelligence-book-entry.has-entry-art > strong,
.intelligence-book-entry.has-entry-art > small,
.intelligence-book-entry.has-entry-art > b { position: relative; z-index: 1; }
.intelligence-book-entry.tone-amber .intelligence-book-entry-art { --entry-art-position: center left; }
.intelligence-book-entry:hover .intelligence-book-entry-art { opacity: .52; transform: translateX(var(--entry-art-x)) scale(1.018); filter: saturate(1.08); }
.intelligence-book-entry::before { content: ""; position: absolute; z-index: -1; inset: 7% 1%; border-top: 1px solid color-mix(in srgb, var(--guide-ink) 31%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--guide-ink) 17%, transparent); opacity: .44; }
.intelligence-book-entry:hover { transform: translateY(-2px); filter: drop-shadow(0 4px 5px rgba(47, 76, 65, .09)); background: linear-gradient(90deg, rgba(251,247,237,.88), rgba(235,245,233,.14)); }
.intelligence-book-entry > span:not(.intelligence-book-entry-art) { position: absolute; left: 9px; top: 50%; width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; background: rgba(250,251,242,.34); font-family: "STSong", "SimSun", serif; font-size: 15px; transform: translateY(-50%); opacity: .77; }
.intelligence-book-entry strong { font-family: "STSong", "SimSun", serif; font-size: clamp(11px,.96vw,15px); line-height: 1.3; }
.intelligence-book-entry small { color: var(--guide-muted); font-size: clamp(6px,.59vw,9px); font-weight: 600; line-height: 1.45; }
.intelligence-book-entry b { position: absolute; right: 9px; top: 50%; font-size: 13px; font-weight: 400; opacity: .25; transform: translateY(-50%); transition: opacity .2s ease, transform .2s ease; }
.intelligence-book-entry:hover b { opacity: .7; transform: translate(3px, -50%); }
.intelligence-book-entry.tone-amber { --guide-ink: #927145; --guide-muted: #847564; }
.intelligence-book-entry.tone-rose { --guide-ink: #91646a; --guide-muted: #836f70; }
.intelligence-book-entry.tone-blue { --guide-ink: #47737c; --guide-muted: #667d80; }
.intelligence-book-timeline {
  position: relative;
  grid-column: 1 / -1;
  min-width: 0;
  min-height: 126px;
  padding: 12px 18px 10px;
  overflow: hidden;
  border-top: 1px solid rgba(96, 131, 118, .23);
  border-bottom: 1px solid rgba(96, 131, 118, .18);
  background: linear-gradient(90deg, rgba(251,247,237,.64), rgba(251,247,237,.22)), url("assets/intelligence-book/guzi-seasonal-timeline.webp") center / cover;
  isolation: isolate;
}
.intelligence-book-timeline::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(251,247,237,.94) 0%, rgba(251,247,237,.24) 22%, rgba(251,247,237,.16) 78%, rgba(251,247,237,.88) 100%);
}
.intelligence-book-timeline-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.intelligence-book-timeline-heading > div { display: grid; gap: 2px; }
.intelligence-book-timeline-heading small { color: rgba(78,122,108,.68); font: 8px Georgia, serif; letter-spacing: 1.8px; }
.intelligence-book-timeline-heading strong { color: rgba(64,87,77,.94); font: 18px/1.15 "STSong", "SimSun", serif; }
.intelligence-book-timeline-heading p { margin: 0; color: rgba(81,103,94,.72); font-size: 7px; line-height: 1.4; }
.intelligence-book-timeline-status { padding: 3px 7px; border: 1px solid rgba(109,139,119,.28); border-radius: 999px; color: rgba(71,115,98,.72); font-size: 7px; white-space: nowrap; }
.intelligence-book-timeline-control { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; margin-top: 8px; }
.intelligence-book-timeline-year,
.intelligence-book-timeline-control output { color: rgba(100,111,100,.76); font: 8px Georgia, serif; white-space: nowrap; }
.intelligence-book-timeline-control input { width: 100%; height: 13px; margin: 0; accent-color: #a98c60; cursor: ew-resize; }
.intelligence-book-timeline-viewport { position: relative; overflow: hidden; margin-top: 2px; }
.intelligence-book-timeline-track { --timeline-active-index: 0; --timeline-pan: 0px; position: relative; display: grid; grid-template-columns: repeat(5, minmax(88px,1fr)); min-width: 520px; margin: 0; padding: 0 12px; list-style: none; transform: translateX(var(--timeline-pan)); transition: transform .38s cubic-bezier(.2,.78,.2,1); }
.intelligence-book-timeline-track::before { content: ""; position: absolute; left: 6%; right: 6%; top: 26px; height: 1px; background: linear-gradient(90deg, transparent, rgba(165,134,83,.58) 8%, rgba(165,134,83,.58) 92%, transparent); }
.intelligence-book-timeline-event { position: relative; min-width: 0; }
.intelligence-book-timeline-event button { width: 100%; min-height: 58px; padding: 3px 4px; display: grid; justify-items: center; align-content: start; gap: 2px; border: 0; background: transparent; color: rgba(80,95,85,.78); cursor: pointer; text-align: center; }
.intelligence-book-timeline-event-period { color: rgba(137,113,68,.88); font: 8px Georgia, serif; }
.intelligence-book-timeline-event i { width: 10px; height: 10px; margin: 4px 0 2px; border: 1px solid rgba(165,134,83,.64); border-radius: 50%; background: rgba(251,247,237,.86); box-shadow: 0 0 0 4px rgba(165,134,83,.05); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.intelligence-book-timeline-event strong { max-width: 100%; overflow: hidden; color: rgba(71,87,78,.86); font: 9px/1.25 "STSong", "SimSun", serif; text-overflow: ellipsis; white-space: nowrap; }
.intelligence-book-timeline-event small { color: rgba(95,110,101,.68); font-size: 6px; }
.intelligence-book-timeline-event.is-active i { transform: scale(1.18); background: #d8c08b; box-shadow: 0 0 0 5px rgba(165,134,83,.12), 0 0 12px rgba(165,134,83,.22); }
.intelligence-book-timeline-event.is-active strong { color: rgba(61,103,87,.96); }
.intelligence-book-timeline-note { min-height: 30px; margin-top: 3px; padding: 5px 10px; display: grid; grid-template-columns: auto auto minmax(0,1fr); align-items: baseline; gap: 6px; border-left: 1px solid rgba(165,134,83,.4); color: rgba(77,95,84,.84); opacity: 0; transform: translateY(4px); transition: opacity .24s ease, transform .24s ease; }
.intelligence-book-timeline-note.is-visible { opacity: 1; transform: none; }
.intelligence-book-timeline-note span { color: rgba(137,113,68,.82); font-size: 7px; }
.intelligence-book-timeline-note strong { color: rgba(63,91,77,.92); font: 9px "STSong", "SimSun", serif; }
.intelligence-book-timeline-note p { margin: 0; font-size: 7px; line-height: 1.45; }
.intelligence-book-timeline-note small { grid-column: 1 / -1; color: rgba(95,110,101,.62); font-size: 6px; }
.intelligence-book-detail header {
  position: absolute;
  top: 6%;
  left: 4.8%;
  width: 41%;
  display: grid;
  justify-items: start;
  gap: 4px;
  padding-left: 6%;
}
.intelligence-book-detail header::after { content: ""; width: min(175px,75%); height: 1px; margin-top: 4px; background: linear-gradient(90deg, rgba(88, 127, 112, .58), transparent); }
.intelligence-book-page-back {
  position: absolute;
  z-index: 6;
  top: 1.8%;
  left: 4.5%;
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid rgba(88, 127, 112, .36);
  border-radius: 0;
  background: transparent;
  color: rgba(60, 104, 91, .78);
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(7px,.65vw,10px);
  transition: color .2s ease, transform .2s ease;
}
.intelligence-book-page-back:hover { color: #326c5c; transform: translateX(-2px); }
.intelligence-book-page-back span { margin-right: 5px; }
.intelligence-book-detail-content { position: absolute; top: 27%; left: 4%; width: 42%; height: 61%; display: grid; align-content: center; }
.intelligence-book-topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 16px; }
.intelligence-book-topic-grid article { display: grid; grid-template-columns: 27px minmax(0,1fr); column-gap: 8px; align-items: center; padding: 8px 5px; border-top: 1px solid rgba(96,131,118,.22); }
.intelligence-book-topic-grid span { grid-row: span 2; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(89,133,115,.45); border-radius: 50%; color: rgba(68,118,100,.8); font-family: "STSong", "SimSun", serif; font-size: 10px; }
.intelligence-book-topic-grid strong { color: rgba(57,81,72,.9); font-family: "STSong", "SimSun", serif; font-size: clamp(8px,.72vw,11px); line-height: 1.25; }
.intelligence-book-topic-grid p { margin: 1px 0 0; color: rgba(85,101,94,.72); font-size: clamp(5px,.45vw,7px); line-height: 1.5; }
.intelligence-book-term-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); margin: 0; gap: 7px 15px; }
.intelligence-book-term-list div { padding: 6px 4px 7px; border-bottom: 1px solid rgba(96,131,118,.2); }
.intelligence-book-term-list dt { margin: 0 0 3px; color: rgba(63,111,96,.88); font-family: "STSong", "SimSun", serif; font-size: clamp(8px,.72vw,11px); font-weight: 700; }
.intelligence-book-term-list dd { margin: 0; color: rgba(86,99,94,.74); font-size: clamp(5px,.46vw,7px); line-height: 1.55; }
.intelligence-book-checklist { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.intelligence-book-checklist li { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 8px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid rgba(96,131,118,.22); }
.intelligence-book-checklist b { color: rgba(73,123,106,.68); font-family: Georgia, serif; font-size: clamp(8px,.72vw,11px); letter-spacing: 1px; }
.intelligence-book-checklist strong { display: block; color: rgba(57,81,72,.9); font-family: "STSong", "SimSun", serif; font-size: clamp(8px,.72vw,11px); }
.intelligence-book-checklist span { display: block; margin-top: 2px; color: rgba(86,99,94,.74); font-size: clamp(5px,.46vw,7px); line-height: 1.5; }
.intelligence-book-query-guide { display: grid; gap: 14px; color: rgba(75,96,88,.84); }
.intelligence-book-query-guide p { margin: 0; padding-bottom: 10px; border-bottom: 1px solid rgba(96,131,118,.25); font-family: "STSong", "SimSun", serif; font-size: clamp(9px,.78vw,12px); line-height: 1.55; }
.intelligence-book-query-guide strong { color: rgba(54,105,89,.94); }
.intelligence-book-query-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.intelligence-book-query-chips button { min-height: 26px; padding: 4px 8px; border: 1px solid rgba(88,127,112,.35); border-radius: 4px; background: rgba(250,248,237,.38); color: rgba(56,103,88,.84); font-family: "STSong", "SimSun", serif; font-size: clamp(6px,.56vw,8px); transition: background .2s ease, transform .2s ease; }
.intelligence-book-query-chips button:hover { background: rgba(218,237,223,.5); transform: translateY(-1px); }
.intelligence-book-query-guide small { color: rgba(91,103,96,.68); font-size: clamp(5px,.46vw,7px); line-height: 1.55; }

.intelligence-book-knowledge-grid,
.intelligence-book-term-catalogue {
  display: grid;
  gap: 8px;
  max-height: 100%;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 145, 126, .35) transparent;
}
.intelligence-book-knowledge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.intelligence-book-knowledge-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 37% minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 74px;
  padding: 4px 6px 4px 4px;
  border-top: 1px solid rgba(96, 131, 118, .2);
  background: linear-gradient(90deg, rgba(251,247,237,.25), rgba(232,244,232,.06));
}
.intelligence-book-knowledge-card img {
  width: 100%;
  aspect-ratio: 1.34;
  object-fit: cover;
  border-radius: 4px;
  opacity: .8;
  mix-blend-mode: multiply;
  filter: saturate(.74) contrast(.96) brightness(1.04);
}
.intelligence-book-knowledge-card div { min-width: 0; display: grid; gap: 2px; }
.intelligence-book-knowledge-card span { color: rgba(73, 111, 95, .7); font: 6px Georgia, serif; letter-spacing: .45px; }
.intelligence-book-knowledge-card strong { color: rgba(56, 80, 69, .94); font: 12px/1.25 "STSong", "SimSun", serif; }
.intelligence-book-knowledge-card p { margin: 0; color: rgba(80, 96, 88, .76); font-size: 7px; line-height: 1.42; }
.intelligence-book-knowledge-card small { color: rgba(91, 103, 96, .64); font-size: 6px; line-height: 1.35; }
.intelligence-book-term-catalogue { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.intelligence-book-term-catalogue article { padding: 5px 4px 6px; border-bottom: 1px solid rgba(96, 131, 118, .2); }
.intelligence-book-term-catalogue article > div { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.intelligence-book-term-catalogue strong { color: rgba(63, 111, 96, .92); font: 11px/1.25 "STSong", "SimSun", serif; }
.intelligence-book-term-catalogue article > div span { color: rgba(126, 112, 84, .68); font-size: 6px; white-space: nowrap; }
.intelligence-book-term-catalogue p { margin: 3px 0 0; color: rgba(86, 99, 94, .78); font-size: 7px; line-height: 1.48; }
.intelligence-book-term-catalogue small { display: block; margin-top: 3px; color: rgba(130, 103, 67, .74); font-size: 6px; line-height: 1.45; }
.intelligence-book-knowledge-note { grid-column: 1 / -1; margin: 1px 3px 0; color: rgba(95, 103, 96, .66); font-size: 6px; line-height: 1.5; }

.archive-book-profile-observations { margin-top: 9px; display: grid; gap: 5px; }
.archive-book-profile-observations-label { color: rgba(125, 101, 68, .74); font: 9px "STSong", "SimSun", serif; }
.archive-book-profile-observations article { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 5px 0; border-top: 1px solid rgba(125, 101, 68, .16); }
.archive-book-profile-observations article div { display: grid; gap: 2px; }
.archive-book-profile-observations article strong { color: rgba(69, 92, 82, .9); font: 8px "STSong", "SimSun", serif; }
.archive-book-profile-observations article small { color: rgba(121, 107, 82, .66); font-size: 6px; }
.archive-book-profile-observations article p { margin: 0; color: rgba(80, 95, 88, .72); font-size: 6px; line-height: 1.4; }
.archive-book-profile-observations article a { color: rgba(69, 113, 96, .72); font-size: 6px; text-decoration: none; white-space: nowrap; }
.archive-book-profile-observations article a:hover { text-decoration: underline; }
.archive-book-profile-observations-note { color: rgba(95, 103, 96, .6); font-size: 6px; line-height: 1.4; }

.archive-book-directory {
  position: absolute;
  z-index: 3;
  inset: 10.5% 9.5% 12.5%;
  display: block;
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
  transition: opacity .38s ease .18s, transform .38s ease .18s;
}
.archive-book-directory::after {
  content: "CHAPTER 01";
  position: absolute;
  top: 3.2%;
  right: 3.4%;
  width: 39%;
  height: 11%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 1.4%;
  border-top: 1px solid rgba(173, 139, 96, .24);
  color: rgba(157, 124, 83, .48);
  background:
    radial-gradient(circle at 11% 8%, rgba(176, 139, 87, .34) 0 1px, transparent 1.7px),
    radial-gradient(circle at 24% 48%, rgba(176, 139, 87, .22) 0 1px, transparent 1.7px),
    linear-gradient(90deg, transparent, rgba(173, 139, 96, .14) 52%, transparent 84%) 0 55% / 100% 1px no-repeat;
  font-family: Georgia, serif;
  font-size: clamp(6px, .54vw, 9px);
  letter-spacing: 2.6px;
  pointer-events: none;
}
.archive-book-reader.is-directory-ready .archive-book-directory {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.archive-book-reader:not(.is-book-categories) .archive-book-directory {
  opacity: 0;
  transform: translateY(3px);
  pointer-events: none;
  transition-delay: 0s;
}
.archive-book-directory header {
  position: absolute;
  top: 1.5%;
  left: 4.6%;
  width: 40.8%;
  display: grid;
  justify-items: start;
  gap: 4px;
  text-align: left;
  padding-left: 6.4%;
}
.archive-book-starfield {
  position: absolute;
  z-index: 0;
  inset: 1.5% 1.5% 2%;
  width: 97%;
  height: 96.5%;
  opacity: 0;
  mix-blend-mode: multiply;
  transition: opacity .55s ease .25s;
  pointer-events: none;
}
.archive-book-reader.is-directory-ready .archive-book-starfield { opacity: .68; }
.archive-book-directory header::after {
  content: "";
  width: min(190px, 72%);
  height: 1px;
  margin-top: 4px;
  background: linear-gradient(90deg, rgba(171, 132, 84, .5), rgba(171, 132, 84, .08) 78%, transparent);
}
.archive-book-directory header small {
  color: rgba(157, 119, 75, .76);
  font-family: Georgia, serif;
  font-size: clamp(6px, .58vw, 9px);
  letter-spacing: 2.4px;
}
.archive-book-directory header h3 {
  margin: 0;
  color: rgba(75, 64, 63, .92);
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(19px, 1.72vw, 27px);
  font-weight: 600;
  line-height: 1.18;
  text-shadow: 0 1px rgba(255,255,255,.34);
}
.archive-book-directory header p {
  margin: 0;
  color: rgba(117, 101, 98, .68);
  font-size: clamp(6px, .55vw, 9px);
  letter-spacing: .4px;
}
.archive-book-celestial {
  position: absolute;
  z-index: 0;
  top: 1.5%;
  left: 53.4%;
  width: 38.6%;
  height: 22.6%;
  overflow: visible;
  color: rgba(171, 134, 82, .51);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.12;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: translateY(3px);
  filter: drop-shadow(0 1px rgba(255,255,255,.5));
  transition: opacity .65s ease .34s, transform .65s ease .34s;
  pointer-events: none;
}
.archive-book-reader.is-directory-ready .archive-book-celestial {
  opacity: .88;
  transform: none;
}

/* Keep hidden reader artwork from participating in compositor work. The
   reader is mounted for fast book transitions, but its SVG motion should only
   run while the corresponding view is actually visible. */
.archive-book-reader:not(.is-active) .archive-book-directory,
.archive-book-reader:not(.is-active) .archive-book-domestic-periods,
.archive-book-reader:not(.is-active) .archive-book-orbit,
.archive-book-reader:not(.is-active) .archive-book-profile,
.archive-book-reader:not(.is-active) .archive-book-celestial,
.archive-book-reader:not(.is-active) .period-astrarium-outer,
.archive-book-reader:not(.is-active) .period-astrarium-inner,
.archive-book-reader:not(.is-active) .period-astrarium-ticks,
.archive-book-reader:not(.is-active) .period-astrarium-links,
.archive-book-reader:not(.is-active) .period-astrarium-core,
.archive-book-reader:not(.is-active) .period-astrarium-sparks,
.archive-book-reader:not(.is-active) .archive-book-orbit-items,
.archive-book-reader:not(.is-active) .archive-book-projection-trails path,
.archive-book-reader:not(.is-active) .archive-book-observatory,
.archive-book-reader:not(.is-active) .archive-book-observatory-emitter,
.archive-book-reader:not(.is-active) .archive-book-observatory-glow,
.archive-book-reader:not(.is-active) .archive-book-observatory-shadow,
.archive-book-reader:not(.is-active) .archive-book-atlas-right::before {
  animation-play-state: paused !important;
}
.archive-book-reader.is-active:not(.is-book-categories) .archive-book-directory *,
.archive-book-reader.is-active:not(.is-book-categories) .archive-book-directory *::before,
.archive-book-reader.is-active:not(.is-book-periods) .archive-book-domestic-periods *,
.archive-book-reader.is-active:not(.is-book-periods) .archive-book-domestic-periods *::before,
.archive-book-reader.is-active:not(.is-book-orbit) .archive-book-orbit *,
.archive-book-reader.is-active:not(.is-book-orbit) .archive-book-orbit *::before,
.archive-book-reader.is-active:not(.is-book-profile) .archive-book-profile *,
.archive-book-reader.is-active:not(.is-book-profile) .archive-book-profile *::before {
  animation-play-state: paused !important;
}

/* Hidden book pages can contain positioned artwork. Keep it out of hit
   testing so visible category buttons remain reachable. */
.archive-book-reader.is-active:not(.is-book-orbit) .archive-book-orbit *,
.archive-book-reader.is-active:not(.is-book-orbit) .archive-book-orbit,
.archive-book-reader.is-active:not(.is-book-orbit) .archive-book-orbit *::before,
.archive-book-reader.is-active:not(.is-book-orbit) .archive-book-orbit *::after,
.archive-book-reader.is-active:not(.is-book-periods) .archive-book-domestic-periods *,
.archive-book-reader.is-active:not(.is-book-periods) .archive-book-domestic-periods,
.archive-book-reader.is-active:not(.is-book-periods) .archive-book-domestic-periods *::before,
.archive-book-reader.is-active:not(.is-book-periods) .archive-book-domestic-periods *::after {
  pointer-events: none !important;
}
.archive-book-celestial-constellation { opacity: .48; }
.archive-book-celestial-orbits { opacity: .68; }
.archive-book-celestial-core { opacity: .66; }
.archive-book-celestial-stars { opacity: .76; }
.archive-book-celestial-bodies { fill: rgba(171,134,82,.67); stroke: none; }
.archive-book-celestial-bodies .celestial-body > circle:last-child { fill: none; stroke: rgba(171,134,82,.25); stroke-width: 1; }
.celestial-body { transform-box: view-box; transform-origin: 182px 82px; }
.celestial-body-one { animation: archive-orbit-body-one 13s linear infinite; }
.celestial-body-two { animation: archive-orbit-body-two 18s linear -6s infinite; }
.celestial-body-three { animation: archive-orbit-body-three 23s linear -14s infinite; }
.archive-book-celestial-core {
  animation: archive-celestial-glimmer 7s ease-in-out infinite;
}
@keyframes archive-orbit-body-one {
  0% { transform: translate(70.43px, -14.97px) scale(.84); opacity: .48; }
  12.5% { transform: translate(55.66px, 8.9px) scale(1); opacity: .78; }
  25% { transform: translate(15.02px, 24.45px) scale(1.08); opacity: .9; }
  37.5% { transform: translate(-34.42px, 25.7px) scale(1.04); opacity: .82; }
  50% { transform: translate(-70.43px, 14.97px) scale(.92); opacity: .64; }
  62.5% { transform: translate(-55.66px, -8.9px) scale(.76); opacity: .4; }
  75% { transform: translate(-15.02px, -24.45px) scale(.69); opacity: .3; }
  87.5% { transform: translate(34.42px, -25.7px) scale(.74); opacity: .36; }
  100% { transform: translate(70.43px, -14.97px) scale(.84); opacity: .48; }
}
@keyframes archive-orbit-body-two {
  0% { transform: translate(35.71px, 55.5px) scale(1.03); opacity: .84; }
  12.5% { transform: translate(3.87px, 42.46px) scale(.91); opacity: .62; }
  25% { transform: translate(-30.24px, 4.44px) scale(.75); opacity: .38; }
  37.5% { transform: translate(-46.63px, -36.18px) scale(.68); opacity: .28; }
  50% { transform: translate(-35.71px, -55.5px) scale(.74); opacity: .34; }
  62.5% { transform: translate(-3.87px, -42.46px) scale(.9); opacity: .58; }
  75% { transform: translate(30.24px, -4.44px) scale(1.05); opacity: .87; }
  87.5% { transform: translate(46.63px, 36.18px) scale(1.1); opacity: .94; }
  100% { transform: translate(35.71px, 55.5px) scale(1.03); opacity: .84; }
}
@keyframes archive-orbit-body-three {
  0% { transform: translate(39px, 0) scale(1.04); opacity: .86; }
  12.5% { transform: translate(27.58px, 27.58px) scale(1.08); opacity: .92; }
  25% { transform: translate(0, 39px) scale(1); opacity: .78; }
  37.5% { transform: translate(-27.58px, 27.58px) scale(.86); opacity: .52; }
  50% { transform: translate(-39px, 0) scale(.72); opacity: .3; }
  62.5% { transform: translate(-27.58px, -27.58px) scale(.68); opacity: .25; }
  75% { transform: translate(0, -39px) scale(.77); opacity: .38; }
  87.5% { transform: translate(27.58px, -27.58px) scale(.92); opacity: .64; }
  100% { transform: translate(39px, 0) scale(1.04); opacity: .86; }
}
@keyframes archive-celestial-glimmer {
  0%, 100% { opacity: .38; }
  50% { opacity: .66; }
}
.archive-book-directory-grid {
  position: absolute;
  z-index: 5;
  inset: 28.5% 4.4% 7.2%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 18px 10%;
}
.archive-book-category {
  --category-ink: #755b58;
  --category-muted: #867875;
  --category-line: rgba(160, 124, 84, .38);
  --category-wash: linear-gradient(90deg, rgba(252, 247, 238, .98) 0%, rgba(252, 247, 238, .93) 34%, rgba(252, 247, 238, .65) 55%, rgba(252, 247, 238, .13) 83%, rgba(252, 247, 238, .04) 100%);
  --category-poster-position: center;
  position: relative;
  z-index: 6;
  isolation: isolate;
  min-width: 0;
  padding: 10px 28px 10px 49px;
  display: grid;
  align-content: center;
  gap: 4px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--category-ink);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
  transition: transform .24s ease, filter .24s ease;
}
.archive-book-category::before,
.archive-book-category::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.archive-book-category::before {
  z-index: -2;
  inset: 4% 0;
  background-image: var(--category-poster);
  background-position: var(--category-poster-position);
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  filter: saturate(.4) contrast(.84) sepia(.3) blur(3px);
  mix-blend-mode: multiply;
  -webkit-mask-image:
    radial-gradient(ellipse 38% 43% at 70% 50%, #000 0%, rgba(0,0,0,.9) 38%, rgba(0,0,0,.58) 61%, rgba(0,0,0,.2) 79%, transparent 100%),
    radial-gradient(ellipse 17% 29% at 48% 45%, rgba(0,0,0,.46) 0%, rgba(0,0,0,.24) 48%, transparent 100%),
    radial-gradient(ellipse 18% 27% at 91% 57%, rgba(0,0,0,.4) 0%, rgba(0,0,0,.19) 50%, transparent 100%),
    radial-gradient(ellipse 25% 12% at 72% 13%, rgba(0,0,0,.2) 0%, rgba(0,0,0,.09) 45%, transparent 100%),
    radial-gradient(ellipse 24% 11% at 65% 90%, rgba(0,0,0,.18) 0%, rgba(0,0,0,.08) 42%, transparent 100%);
  mask-image:
    radial-gradient(ellipse 38% 43% at 70% 50%, #000 0%, rgba(0,0,0,.9) 38%, rgba(0,0,0,.58) 61%, rgba(0,0,0,.2) 79%, transparent 100%),
    radial-gradient(ellipse 17% 29% at 48% 45%, rgba(0,0,0,.46) 0%, rgba(0,0,0,.24) 48%, transparent 100%),
    radial-gradient(ellipse 18% 27% at 91% 57%, rgba(0,0,0,.4) 0%, rgba(0,0,0,.19) 50%, transparent 100%),
    radial-gradient(ellipse 25% 12% at 72% 13%, rgba(0,0,0,.2) 0%, rgba(0,0,0,.09) 45%, transparent 100%),
    radial-gradient(ellipse 24% 11% at 65% 90%, rgba(0,0,0,.18) 0%, rgba(0,0,0,.08) 42%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transform: scale(1.01);
  transition: opacity .35s ease, transform .45s ease, filter .35s ease;
}
.archive-book-category::after {
  z-index: -1;
  inset: 3% -1%;
  background:
    var(--category-wash),
    radial-gradient(ellipse 43% 47% at 71% 50%, transparent 0%, transparent 47%, rgba(252,248,240,.1) 63%, rgba(252,248,240,.42) 82%, rgba(252,248,240,.68) 100%),
    repeating-linear-gradient(0deg, rgba(119,83,53,.014) 0 1px, transparent 1px 3px);
  -webkit-mask-image:
    radial-gradient(ellipse 49% 48% at 39% 50%, #000 0%, rgba(0,0,0,.92) 52%, rgba(0,0,0,.48) 75%, rgba(0,0,0,.12) 91%, transparent 100%),
    radial-gradient(ellipse 28% 34% at 65% 50%, rgba(0,0,0,.34) 0%, rgba(0,0,0,.12) 58%, transparent 100%);
  mask-image:
    radial-gradient(ellipse 49% 48% at 39% 50%, #000 0%, rgba(0,0,0,.92) 52%, rgba(0,0,0,.48) 75%, rgba(0,0,0,.12) 91%, transparent 100%),
    radial-gradient(ellipse 28% 34% at 65% 50%, rgba(0,0,0,.34) 0%, rgba(0,0,0,.12) 58%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  filter: blur(.7px);
}
.archive-book-reader.is-directory-ready .archive-book-category::before {
  animation: archive-category-ink-in .92s cubic-bezier(.2,.7,.2,1) both;
}
.archive-book-reader.is-directory-ready .archive-book-category:nth-child(1)::before { animation-delay: .08s; }
.archive-book-reader.is-directory-ready .archive-book-category:nth-child(2)::before { animation-delay: .16s; }
.archive-book-reader.is-directory-ready .archive-book-category:nth-child(3)::before { animation-delay: .24s; }
.archive-book-reader.is-directory-ready .archive-book-category:nth-child(4)::before { animation-delay: .32s; }
@keyframes archive-category-ink-in {
  0% { opacity: 0; filter: saturate(.18) contrast(.78) sepia(.48) blur(5px); }
  46% { opacity: .18; }
  100% { opacity: .52; filter: saturate(.46) contrast(.86) sepia(.26) blur(.35px); }
}
.archive-book-category:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 3px 4px rgba(91, 67, 58, .035));
}
.archive-book-category:hover::before {
  opacity: .64;
  transform: scale(1.022);
  filter: saturate(.64) contrast(.9) sepia(.16) blur(0);
}
.archive-book-category > * { position: relative; z-index: 1; }
.archive-book-category > span {
  position: absolute;
  left: 9px;
  top: 50%;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, currentColor 72%, transparent);
  border-radius: 50%;
  background: rgba(255, 250, 241, .16);
  font-family: "STSong", "SimSun", serif;
  font-size: 14px;
  transform: translateY(-50%);
  opacity: .72;
  box-shadow: none;
}
.archive-book-category strong {
  color: var(--category-ink);
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(11px, .96vw, 15px);
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px rgba(255,255,255,.55);
}
.archive-book-category small { color: var(--category-muted); font-size: clamp(6px, .59vw, 9px); font-weight: 600; line-height: 1.45; text-shadow: 0 1px rgba(255,255,255,.56); }
.archive-book-category > b { position: absolute; right: 9px; top: 50%; font-size: 13px; font-weight: 400; opacity: .18; transform: translateY(-50%); transition: opacity .22s ease, transform .22s ease; }
.archive-book-category:hover > b { opacity: .68; }
.archive-book-category:hover > b { transform: translate(3px, -50%); }
.archive-book-category.tone-pink {
  --category-poster: url("assets/atlas-category-posters/domestic.webp");
  --category-ink: #945765;
  --category-muted: #7e6868;
  --category-line: rgba(161, 105, 106, .38);
  --category-wash: linear-gradient(90deg, rgba(253,247,239,.98) 0%, rgba(252,244,237,.93) 36%, rgba(249,233,229,.68) 57%, rgba(247,225,224,.12) 84%, rgba(247,225,224,.03) 100%);
}
.archive-book-category.tone-cyan {
  --category-poster: url("assets/atlas-category-posters/anime.webp");
  --category-ink: #397380;
  --category-muted: #60787d;
  --category-line: rgba(72, 131, 137, .38);
  --category-wash: linear-gradient(90deg, rgba(247,249,243,.98) 0%, rgba(241,247,243,.93) 36%, rgba(219,239,236,.68) 57%, rgba(196,228,229,.12) 84%, rgba(196,228,229,.03) 100%);
}
.archive-book-category.tone-gold {
  --category-poster: url("assets/atlas-category-posters/evergreen.webp");
  --category-ink: #8b6539;
  --category-muted: #7c7162;
  --category-line: rgba(166, 126, 70, .42);
  --category-wash: linear-gradient(90deg, rgba(253,249,237,.98) 0%, rgba(251,246,231,.94) 36%, rgba(242,225,195,.7) 57%, rgba(230,202,165,.13) 84%, rgba(230,202,165,.03) 100%);
}
.archive-book-category.tone-mint {
  --category-poster: url("assets/atlas-category-posters/recent.webp");
  --category-ink: #3d7b70;
  --category-muted: #637d77;
  --category-line: rgba(67, 139, 123, .38);
  --category-wash: linear-gradient(90deg, rgba(247,249,241,.98) 0%, rgba(239,247,240,.93) 36%, rgba(212,239,230,.67) 57%, rgba(188,229,218,.12) 84%, rgba(188,229,218,.03) 100%);
}

/* Book-internal atlas navigation keeps category, month and orbit views on the same spread. */
.archive-book-page {
  position: absolute;
  z-index: 3;
  inset: 10.5% 9.5% 12.5%;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .36s ease, transform .42s cubic-bezier(.22,.7,.22,1);
}
.archive-book-reader.is-book-profile .archive-book-orbit,
.archive-book-reader.is-book-profile .archive-book-domestic-periods,
.archive-book-reader.is-book-profile .archive-book-directory { opacity: 0; pointer-events: none; }
.archive-book-reader.is-book-profile .archive-book-profile { z-index: 7; opacity: 1; pointer-events: auto; }
.archive-book-profile {
  display: block;
  inset: 8.5% 9.5% 10%;
  padding: 2% 3.2% 3%;
  background: transparent;
}
.archive-book-profile::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2.5% -1.5% -3%;
  pointer-events: none;
  opacity: .42;
  background:
    radial-gradient(circle at 18% 26%, rgba(180,143,91,.18) 0 1px, transparent 1.8px),
    radial-gradient(circle at 74% 64%, rgba(180,143,91,.13) 0 1px, transparent 1.6px),
    linear-gradient(90deg, transparent 3%, rgba(163,126,80,.13) 20%, transparent 46%) 0 80% / 100% 1px no-repeat;
  mix-blend-mode: multiply;
}
.archive-book-profile-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  height: 100%;
  gap: 0;
}
.archive-book-profile-left,
.archive-book-profile-right { min-width: 0; padding: 2.5% 5%; }
.archive-book-profile-left { border-right: 1px solid rgba(157,123,79,.18); }
.archive-book-profile-heading { display: grid; gap: 5px; margin: 4% 0 7%; color: rgba(88,68,52,.78); }
.archive-book-profile-heading small { color: rgba(137,96,48,.72); font: clamp(5px,.48vw,8px) Georgia,serif; letter-spacing: 1.8px; }
.archive-book-profile-heading h3 { margin: 0; color: #51382d; font: 600 clamp(20px,2.1vw,31px) "STSong","SimSun",serif; text-shadow: 0 1px rgba(255,255,255,.45); }
.archive-book-profile-heading p { margin: 0; color: rgba(93,69,51,.72); font-size: clamp(7px,.57vw,10px); }
.archive-book-profile-hero { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 12px; align-items: center; padding: 14px 12px; border: 0; border-top: 1px solid rgba(160,126,83,.3); border-bottom: 1px solid rgba(160,126,83,.22); border-radius: 0; background: linear-gradient(90deg, rgba(255,250,239,.34), rgba(255,250,239,.04) 82%, transparent); }
.archive-book-profile-avatar { width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(157,124,77,.46); border-radius: 50%; background: rgba(223,215,195,.36); color: rgba(105,76,56,.66); font: 21px "STKaiti","KaiTi",serif; }
.archive-book-profile-avatar img { display: none; width: 100%; height: 100%; object-fit: cover; filter: saturate(.6) sepia(.12); }
.archive-book-profile-avatar img.is-visible { display: block; }
.archive-book-profile-hero strong { display:block; margin-top: 5px; color:#5c4031; font: 600 clamp(10px,.86vw,14px) "STSong","SimSun",serif; }
.archive-book-profile-hero p { margin: 5px 0 0; color: rgba(89,67,51,.74); font-size: clamp(6px,.52vw,9px); line-height: 1.65; }
.archive-book-profile.is-profile-unified .archive-book-profile-left { transform: none; }
.archive-book-profile.is-profile-unified .archive-book-profile-heading { display: none; }
.archive-book-profile.is-profile-unified .archive-book-profile-left > * {
  /* Two ruler rows, clamped at the page edge so the first visible line never clips. */
  position: relative;
  top: max(-25%, -42px);
}
.archive-book-profile.is-profile-unified .archive-book-profile-hero strong {
  margin-top: 0;
  color: #51382d;
  font-size: clamp(13px, 1.08vw, 18px);
}
.archive-book-profile.is-profile-unified .archive-book-profile-scene-copy {
  position: relative;
  top: max(-25%, -42px);
}
.archive-book-profile.is-profile-unified .archive-book-profile-observations-label { font-size: 11px; }
.archive-book-profile.is-profile-unified .archive-book-profile-observations article strong { font-size: 10px; }
.archive-book-profile.is-profile-unified .archive-book-profile-observations article small,
.archive-book-profile.is-profile-unified .archive-book-profile-observations article p,
.archive-book-profile.is-profile-unified .archive-book-profile-observations article a,
.archive-book-profile.is-profile-unified .archive-book-profile-observations-note { font-size: 8px; }
.archive-book-profile.is-profile-unified .archive-book-profile-note { font-size: clamp(7.5px, .62vw, 9.5px); }
.archive-book-profile.has-merch-browser .archive-book-profile-right.is-scene-withheld > * { display: none; }
.archive-book-profile.has-merch-browser .archive-book-profile-right.is-scene-withheld > .archive-book-profile-collection-reveal { display: grid; }
.archive-book-profile.has-merch-browser .archive-book-profile-right.is-scene-withheld {
  align-content: start;
  justify-items: center;
}
.archive-book-profile-collection-reveal {
  position: relative;
  top: -1.1em;
  display: none;
  grid-template-rows: auto minmax(190px, 1fr) auto;
  min-height: min(35vw, 340px);
  gap: 7px;
  margin: 0 auto;
  width: min(100%, 360px);
  justify-self: center;
  color: rgba(91, 73, 58, .72);
  isolation: isolate;
}
.archive-book-profile-collection-reveal.is-visible { display: grid; }
.collection-reveal-heading { display: grid; justify-items: center; gap: 2px; text-align: center; }
.collection-reveal-heading small { color: rgba(144, 105, 57, .66); font: 7px Georgia, serif; letter-spacing: 2px; }
.collection-reveal-heading strong { color: rgba(82, 62, 47, .88); font: 600 clamp(15px, 1.22vw, 20px) "STSong", "SimSun", serif; }
.collection-reveal-heading span { color: rgba(105, 88, 73, .52); font-size: clamp(6px, .46vw, 8px); }
.collection-reveal-stage {
  position: relative;
  min-height: 190px;
  overflow: visible;
  perspective: 900px;
}
.collection-reveal-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 69%;
  aspect-ratio: 1;
  border: 1px solid rgba(157, 124, 80, .19);
  border-radius: 50%;
  transform: translate(-50%, -50%) scaleY(.72) rotate(-10deg);
  box-shadow: 0 0 0 12px rgba(173, 142, 95, .035), inset 0 0 28px rgba(193, 158, 103, .07);
  opacity: .78;
  pointer-events: none;
}
.collection-reveal-arc {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78%;
  aspect-ratio: 1;
  border: 1px solid rgba(165, 131, 82, .28);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%) scaleY(.6) rotate(-24deg);
  pointer-events: none;
}
.collection-reveal-arc-a { animation: collection-reveal-orbit 26s linear infinite; }
.collection-reveal-arc-b { width: 59%; opacity: .55; transform: translate(-50%, -50%) scaleY(.58) rotate(32deg); animation: collection-reveal-orbit-reverse 21s linear infinite; }
.collection-reveal-rays { position: absolute; z-index: 1; inset: 0; pointer-events: none; opacity: .46; }
.collection-reveal-rays i { position: absolute; right: 15%; bottom: 17%; width: 56%; height: 1px; transform-origin: right center; background: linear-gradient(90deg, transparent, rgba(213, 170, 99, .56)); filter: drop-shadow(0 0 3px rgba(226, 194, 135, .28)); }
.collection-reveal-rays i:nth-child(1) { transform: rotate(-164deg); }
.collection-reveal-rays i:nth-child(2) { right: 16%; bottom: 23%; width: 50%; transform: rotate(-151deg); opacity: .72; }
.collection-reveal-rays i:nth-child(3) { right: 18%; bottom: 29%; width: 42%; transform: rotate(-139deg); opacity: .52; }
.collection-reveal-main {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 48%;
  width: 45%;
  aspect-ratio: 1 / 1.06;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  transition: transform .62s cubic-bezier(.2,.7,.2,1), filter .5s ease, opacity .5s ease;
}
.collection-reveal-main-halo { position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(circle, rgba(211, 184, 133, .2), transparent 67%); filter: blur(8px); animation: collection-reveal-breathe 6.2s ease-in-out infinite; pointer-events: none; }
.collection-reveal-main img { position: relative; z-index: 2; width: 86%; height: 78%; object-fit: contain; mix-blend-mode: multiply; filter: saturate(.46) sepia(.14) contrast(.9) brightness(1.06) drop-shadow(0 8px 8px rgba(94, 70, 47, .12)); opacity: .86; transition: opacity .36s ease, transform .62s cubic-bezier(.2,.7,.2,1), filter .5s ease; }
.collection-reveal-main-copy { position: absolute; z-index: 3; left: 0; right: 0; bottom: 1%; display: grid; justify-items: center; gap: 2px; text-align: center; text-shadow: 0 1px rgba(255,255,255,.56); }
.collection-reveal-main-copy strong { color: rgba(82, 62, 47, .86); font: 600 clamp(9px, .84vw, 13px) "STSong", "SimSun", serif; }
.collection-reveal-main-copy span { color: rgba(103, 86, 71, .58); font-size: clamp(5px, .42vw, 7px); }
.collection-reveal-exchange { position: absolute; z-index: 8; left: 50%; top: 48%; width: 31%; aspect-ratio: 1 / .88; opacity: 0; pointer-events: none; transform: translate(-50%, -50%); }
.collection-reveal-exchange img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; filter: saturate(.3) sepia(.16) contrast(.82) brightness(1.08) drop-shadow(0 5px 6px rgba(94, 70, 47, .1)); }
.collection-reveal.is-swapping .collection-reveal-exchange { animation: collection-reveal-exchange-out .65s cubic-bezier(.2,.7,.2,1) both; }
.collection-reveal-orbit { position: absolute; z-index: 4; inset: 0; animation: collection-reveal-orbit-turn 34s linear infinite; transform-origin: 50% 50%; }
.collection-reveal.is-hovering-item .collection-reveal-orbit,
.collection-reveal.is-swapping .collection-reveal-orbit { animation-play-state: paused; }
.collection-reveal-orbit-item { position: absolute; left: 50%; top: 50%; width: 25%; min-width: 58px; aspect-ratio: 1 / .88; display: grid; justify-items: center; gap: 2px; padding: 0; border: 0; background: transparent; color: rgba(104, 83, 68, .66); cursor: pointer; transform: translate(-50%, -50%) rotate(calc(var(--collection-slot) * 90deg)) translateY(-72px) rotate(calc(var(--collection-slot) * -90deg)); transition: transform .62s cubic-bezier(.2,.7,.2,1), opacity .5s ease, filter .5s ease; }
.collection-reveal-orbit-item > span { display: grid; place-items: center; width: 100%; height: 72%; border: 1px solid rgba(155, 123, 78, .28); border-radius: 43% 43% 48% 48% / 35% 35% 50% 50%; background: radial-gradient(ellipse, rgba(250, 245, 231, .4), rgba(215, 198, 166, .12)); box-shadow: 0 3px 8px rgba(91, 69, 50, .08), inset 0 0 10px rgba(255, 255, 255, .24); overflow: hidden; }
.collection-reveal-orbit-item img { width: 90%; height: 86%; object-fit: contain; mix-blend-mode: multiply; opacity: .48; filter: saturate(.32) sepia(.15) contrast(.84) brightness(1.1) blur(.2px); transition: opacity .42s ease, transform .62s cubic-bezier(.2,.7,.2,1), filter .42s ease; }
.collection-reveal-orbit-item small { max-width: 100%; overflow: hidden; color: rgba(102, 82, 67, .58); font-size: clamp(5px, .4vw, 7px); text-overflow: ellipsis; white-space: nowrap; }
.collection-reveal-orbit-item:hover,
.collection-reveal-orbit-item:focus-visible { z-index: 9; filter: drop-shadow(0 4px 7px rgba(82, 66, 48, .16)); }
.collection-reveal-orbit-item:hover img,
.collection-reveal-orbit-item:focus-visible img { opacity: .78; filter: saturate(.48) sepia(.12) contrast(.9) brightness(1.08); transform: scale(1.04); }
.collection-reveal.is-swapping .collection-reveal-main { animation: collection-reveal-main-swap .62s cubic-bezier(.2,.7,.2,1); }
.collection-reveal.is-swapping .collection-reveal-orbit-item { animation: collection-reveal-orbit-swap .62s cubic-bezier(.2,.7,.2,1); }
.collection-reveal-note { margin: 0; color: rgba(105, 88, 73, .48); font-size: clamp(5px, .42vw, 7px); line-height: 1.5; text-align: center; }
@keyframes collection-reveal-orbit-turn { to { transform: rotate(360deg); } }
@keyframes collection-reveal-orbit { to { transform: translate(-50%, -50%) scaleY(.6) rotate(336deg); } }
@keyframes collection-reveal-orbit-reverse { to { transform: translate(-50%, -50%) scaleY(.58) rotate(-328deg); } }
@keyframes collection-reveal-breathe { 0%, 100% { opacity: .34; transform: scale(.94); } 50% { opacity: .72; transform: scale(1.04); } }
@keyframes collection-reveal-main-swap { 0% { transform: translate(-50%, -50%) scale(1); filter: blur(0); } 42% { transform: translate(-50%, -50%) scale(1.045); filter: blur(.3px); } 100% { transform: translate(-50%, -50%) scale(1); filter: blur(0); } }
@keyframes collection-reveal-orbit-swap { 0% { filter: blur(.3px); } 45% { filter: blur(.7px); } 100% { filter: blur(0); } }
@keyframes collection-reveal-exchange-out { 0% { opacity: .74; transform: translate(-50%, -50%) scale(1); } 42% { opacity: .56; transform: translate(calc(-50% + (var(--exchange-slot) - 1.5) * 34px), calc(-50% - 54px)) scale(.66); } 100% { opacity: .12; transform: translate(calc(-50% + (var(--exchange-slot) - 1.5) * 42px), calc(-50% - 74px)) scale(.52); } }

/* V5.30: a calm, finite horizontal collectible browser shared by archive profiles. */
.archive-book-profile-collection-reveal[data-browser-version="horizontal-1"] {
  grid-template-rows: auto minmax(190px, 1fr) auto auto;
}
.collection-browser-stage {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(48px, .72fr) minmax(120px, 1.6fr) minmax(48px, .72fr) 34px;
  align-items: center;
  min-height: 208px;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.collection-browser-stage,
.collection-browser-stage * { user-select: none; -webkit-user-select: none; }
.collection-browser-stage > .collection-browser-arrow-prev { grid-column: 1; grid-row: 1; justify-self: center; }
.collection-browser-stage > .collection-browser-side-left { grid-column: 2; grid-row: 1; }
.collection-browser-stage > .collection-browser-main { grid-column: 3; grid-row: 1; }
.collection-browser-stage > .collection-browser-side-right { grid-column: 4; grid-row: 1; }
.collection-browser-stage > .collection-browser-arrow-next { grid-column: 5; grid-row: 1; justify-self: center; }
.collection-browser-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82%;
  aspect-ratio: 1.4 / 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(165, 131, 82, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(173, 142, 95, .025), inset 0 0 28px rgba(193, 158, 103, .055);
  pointer-events: none;
}
.collection-browser-arrow {
  position: relative;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 28px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(151, 115, 67, .3);
  border-radius: 50%;
  color: rgba(99, 73, 51, .72);
  background: rgba(255, 249, 235, .24);
  box-shadow: 0 3px 8px rgba(89, 65, 44, .07), inset 0 0 8px rgba(255,255,255,.18);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  touch-action: manipulation;
  font: 24px/1 Georgia, serif;
  transition: transform .24s ease, background .24s ease, color .24s ease;
}
.collection-browser-arrow:hover,
.collection-browser-arrow:focus-visible { color: rgba(75, 53, 38, .95); background: rgba(255, 249, 235, .48); transform: scale(1.08); }
.collection-browser-arrow:focus-visible { outline: 2px solid rgba(155, 123, 78, .46); outline-offset: 3px; }
.collection-browser-side,
.collection-browser-main { position: relative; z-index: 3; display: grid; justify-items: center; gap: 5px; min-width: 0; }
.collection-browser-side { opacity: .42; filter: saturate(.38) sepia(.1) contrast(.87) blur(.2px); transform: scale(.72); transition: opacity .42s ease, filter .42s ease, transform .42s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
.collection-browser-side-frame {
  display: grid;
  place-items: center;
  width: min(100%, 82px);
  height: 110px;
  padding: 7px;
  border: 1px solid rgba(155, 123, 78, .25);
  border-radius: 42% 42% 38% 38% / 26% 26% 45% 45%;
  background: radial-gradient(ellipse, rgba(250,245,231,.4), rgba(215,198,166,.1));
  box-shadow: 0 4px 10px rgba(91,69,50,.08), inset 0 0 12px rgba(255,255,255,.24);
  overflow: hidden;
}
.collection-browser-side-frame img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.collection-browser-main-frame.is-placeholder,
.collection-browser-side-frame.is-placeholder {
  background:
    radial-gradient(circle at 50% 42%, rgba(182,151,100,.16), transparent 48%),
    repeating-linear-gradient(135deg, rgba(153,119,72,.07) 0 1px, transparent 1px 9px),
    rgba(226,213,187,.22);
}
.collection-browser-main-frame.is-placeholder::before,
.collection-browser-side-frame.is-placeholder::before {
  content: "资料整理中";
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 10px;
  color: rgba(105,82,60,.52);
  font: 600 clamp(9px,.7vw,12px) "STSong", "SimSun", serif;
  letter-spacing: .08em;
  text-align: center;
}
.collection-browser-side-frame.is-placeholder::before { font-size: clamp(6px,.42vw,8px); letter-spacing: .03em; }
.collection-browser-side small { max-width: 100%; color: rgba(102,82,67,.58); font-size: clamp(6px,.42vw,8px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collection-browser-main { z-index: 5; transform: translateZ(0); }
.collection-browser-main-halo { position: absolute; inset: -16%; border-radius: 50%; background: radial-gradient(circle, rgba(211,184,133,.2), transparent 68%); filter: blur(9px); animation: collection-browser-breathe 6.2s ease-in-out infinite; pointer-events: none; }
.collection-browser-main-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 148px);
  height: 164px;
  padding: 10px;
  border: 1px solid rgba(155,123,78,.38);
  border-radius: 42% 42% 38% 38% / 25% 25% 44% 44%;
  background: radial-gradient(ellipse at 50% 36%, rgba(255,250,239,.7), rgba(216,197,161,.18) 64%, rgba(165,131,82,.06));
  box-shadow: 0 8px 16px rgba(91,69,50,.12), inset 0 0 18px rgba(255,255,255,.32), 0 0 22px rgba(211,184,133,.12);
  overflow: hidden;
}
.collection-browser-main-frame::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(155,123,78,.11); border-radius: inherit; pointer-events: none; }
.collection-browser-main-frame img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; filter: saturate(.5) sepia(.12) contrast(.9) brightness(1.06) drop-shadow(0 8px 8px rgba(94,70,47,.13)); opacity: .9; transition: opacity .2s ease, transform .42s cubic-bezier(.2,.7,.2,1); user-select: none; -webkit-user-drag: none; pointer-events: none; }
.collection-browser-main-copy { position: relative; z-index: 2; display: grid; justify-items: center; gap: 2px; text-align: center; text-shadow: 0 1px rgba(255,255,255,.56); }
.collection-browser-main-copy strong { color: rgba(82,62,47,.9); font: 600 clamp(10px,.86vw,14px) "STSong", "SimSun", serif; }
.collection-browser-main-copy span { max-width: 150px; color: rgba(103,86,71,.58); font-size: clamp(6px,.42vw,8px); line-height: 1.35; }
.collection-browser-progress { display: flex; justify-content: center; gap: 5px; min-height: 7px; }
.collection-browser-progress i { display: block; width: 4px; height: 4px; border: 1px solid rgba(155,123,78,.4); border-radius: 50%; background: transparent; }
.collection-browser-progress i.is-active { background: rgba(125,91,53,.62); box-shadow: 0 0 5px rgba(211,184,133,.35); }
.collection-browser-stage.is-dragging { cursor: grabbing; }
.collection-browser-stage.is-dragging .collection-browser-main-frame img,
.collection-browser-stage.is-dragging .collection-browser-side-frame img { pointer-events: none; }
.archive-book-profile-collection-reveal.is-switching .collection-browser-main-frame img { animation: collection-browser-main-switch .46s cubic-bezier(.2,.7,.2,1); }
.archive-book-profile-collection-reveal.is-switching .collection-browser-side { animation: collection-browser-side-switch .46s ease both; }
@keyframes collection-browser-main-switch { 0% { opacity: .44; transform: translateX(10px) scale(.96); } 45% { opacity: .72; transform: translateX(-2px) scale(1.035); } 100% { opacity: .9; transform: translateX(0) scale(1); } }
@keyframes collection-browser-side-switch { 0% { opacity: .2; } 55% { opacity: .52; } 100% { opacity: .42; } }
@keyframes collection-browser-breathe { 0%,100% { opacity: .34; transform: scale(.94); } 50% { opacity: .72; transform: scale(1.04); } }
.archive-book-profile-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 15px; }
.archive-book-profile-columns > div { min-width: 0; padding: 7px 0 10px; border: 0; border-bottom: 1px solid rgba(160,126,83,.2); background: transparent; }
.archive-book-profile-columns > div > span { color: rgba(108,77,45,.72); font-size: clamp(6px,.5vw,8px); }
.archive-book-profile-tokens { display:flex; flex-wrap:wrap; gap: 5px; margin-top: 8px; }
.archive-book-profile-tokens span { padding: 3px 6px; border: 1px solid rgba(157,124,77,.28); border-radius: 2px; color: rgba(101,76,57,.76); background: rgba(255,250,239,.22); font-size: clamp(6px,.48vw,8px); }
.archive-book-profile-note { margin: 16px 0 0; color: rgba(105,83,66,.56); font-size: clamp(5.5px,.46vw,7.5px); line-height: 1.7; }
.archive-book-profile-right { display:grid; align-content:center; gap: 14px; }
.archive-book-profile-scene-frame {
  position: relative;
  min-height: min(30vw,300px);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: radial-gradient(ellipse at 50% 43%, rgba(218,205,178,.2), rgba(247,239,222,.05) 58%, transparent 78%);
  box-shadow: 0 10px 22px rgba(104,78,52,.035);
}
.archive-book-profile-scene-frame::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 8% 7% 12%;
  border: 1px solid rgba(151,116,75,.12);
  border-bottom-color: transparent;
  border-radius: 50% 50% 43% 43% / 17% 17% 10% 10%;
  box-shadow: inset 0 1px rgba(255,255,255,.22);
  pointer-events: none;
}
.archive-book-profile-scene-frame::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: 49% 47% 42% 46% / 18% 16% 11% 12%;
  background:
    radial-gradient(ellipse at 50% 43%, transparent 33%, rgba(247,239,222,.06) 50%, rgba(247,239,222,.5) 72%, rgba(247,239,222,.88) 94%),
    linear-gradient(180deg, transparent 54%, rgba(247,239,222,.26) 70%, rgba(247,239,222,.86) 94%);
  -webkit-mask-image: radial-gradient(ellipse 72% 64% at 50% 42%, #000 0 57%, rgba(0,0,0,.9) 67%, rgba(0,0,0,.42) 81%, transparent 98%);
  mask-image: radial-gradient(ellipse 72% 64% at 50% 42%, #000 0 57%, rgba(0,0,0,.9) 67%, rgba(0,0,0,.42) 81%, transparent 98%);
  pointer-events: none;
}
.archive-book-profile-scene-frame img {
  position: absolute;
  inset: -2%;
  z-index: 1;
  width: 104%;
  height: 104%;
  object-fit: cover;
  object-position: var(--archive-profile-scene-position, center);
  opacity: 0;
  filter: saturate(.78) contrast(.94) brightness(1.025) sepia(.035);
  border-radius: 49% 47% 42% 46% / 18% 16% 11% 12%;
  -webkit-mask-image: radial-gradient(ellipse 72% 64% at 50% 42%, #000 0 57%, rgba(0,0,0,.9) 67%, rgba(0,0,0,.42) 81%, transparent 98%);
  mask-image: radial-gradient(ellipse 72% 64% at 50% 42%, #000 0 57%, rgba(0,0,0,.9) 67%, rgba(0,0,0,.42) 81%, transparent 98%);
  transform: scale(1.06);
  transition: opacity .78s ease, transform 1s cubic-bezier(.2,.7,.2,1), filter .68s ease;
}
.archive-book-profile-scene-frame img.is-visible {
  opacity: .86;
  transform: scale(var(--archive-profile-scene-scale, 1.02));
}
.archive-book-profile-scene-copy { padding:0 10px; color:rgba(96,74,57,.75); }
.archive-book-profile-scene-copy small { color:rgba(145,106,59,.62); font:8px Georgia,serif; letter-spacing:1.8px; }
.archive-book-profile-scene-copy strong { display:block; margin-top:6px; color:#5d4536; font:600 clamp(14px,1.5vw,22px) "STSong","SimSun",serif; }
.archive-book-profile-scene-copy p { margin:7px 0 0; color:rgba(105,83,66,.62); font-size:clamp(6px,.5vw,9px); line-height:1.7; }
.archive-book-reader.is-book-periods .archive-book-domestic-periods,
.archive-book-reader.is-book-orbit .archive-book-orbit {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.archive-book-page-back {
  position: absolute;
  z-index: 6;
  top: 2.4%;
  left: 4.5%;
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid rgba(157, 121, 76, .3);
  border-radius: 0;
  background: transparent;
  color: rgba(103, 82, 68, .72);
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(7px, .65vw, 10px);
  transition: color .2s ease, transform .2s ease;
}
.archive-book-page-back:hover { color: #815f47; transform: translateX(-2px); }
.archive-book-page-back span { margin-right: 5px; }
#archiveBookBackFromProfile {
  top: calc(2.4% - 6.25%);
  left: calc(4.5% - 4.1667%);
}
.archive-book-page-heading {
  position: absolute;
  top: 8.5%;
  left: 4.6%;
  width: 40%;
  display: grid;
  justify-items: start;
  gap: 3px;
  padding-left: 5.6%;
  color: rgba(81, 67, 63, .88);
}
.archive-book-page-heading::after {
  content: "";
  width: min(168px, 74%);
  height: 1px;
  margin-top: 4px;
  background: linear-gradient(90deg, rgba(166,126,76,.48), rgba(166,126,76,.05));
}
.archive-book-page-heading small,
.archive-book-orbit-heading small {
  color: rgba(153, 113, 69, .7);
  font-family: Georgia, serif;
  font-size: clamp(5px, .5vw, 8px);
  letter-spacing: 2px;
}
.archive-book-page-heading h3,
.archive-book-orbit-heading h3 {
  margin: 0;
  color: rgba(74, 61, 59, .93);
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(17px, 1.45vw, 23px);
  font-weight: 600;
  line-height: 1.25;
}
.archive-book-page-heading p,
.archive-book-orbit-heading p {
  margin: 0;
  color: rgba(112, 94, 88, .66);
  font-size: clamp(5px, .52vw, 8px);
}
.archive-book-period-grid {
  position: absolute;
  top: 25%;
  left: 3.8%;
  width: 43%;
  height: 66%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 3.5% 3%;
}
.archive-book-period {
  --period-ink: #805b62;
  --period-muted: #806f6f;
  --period-paper: rgba(250, 246, 235, .72);
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: 16% 8% 9%;
  display: grid;
  align-content: end;
  justify-items: start;
  gap: 2px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--period-ink);
  text-align: left;
  transition: transform .22s ease, filter .25s ease;
}
.archive-book-period::before,
.archive-book-period::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.archive-book-period::before {
  z-index: 0;
  inset: -3%;
  background-image: var(--book-period-poster);
  background-position: var(--book-period-poster-position, right center);
  background-size: cover;
  background-repeat: no-repeat;
  /* Let the scene develop like ink: stronger on the right, feathered into the paper. */
  opacity: .8;
  filter: saturate(.78) contrast(1.02) sepia(.12) brightness(1.03) blur(.2px);
  mix-blend-mode: multiply;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0,0,0,.18) 10%, #000 31%, #000 90%, rgba(0,0,0,.72) 100%),
    linear-gradient(0deg, transparent 0%, #000 11%, #000 89%, transparent 100%);
  mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0,0,0,.18) 10%, #000 31%, #000 90%, rgba(0,0,0,.72) 100%),
    linear-gradient(0deg, transparent 0%, #000 11%, #000 89%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  transition: opacity .3s ease, transform .38s cubic-bezier(.2,.7,.2,1), filter .3s ease;
}
.archive-book-period::after {
  z-index: 1;
  inset: -1%;
  background:
    linear-gradient(90deg, rgba(250,245,233,.96) 0%, rgba(250,245,233,.82) 25%, rgba(250,245,233,.32) 50%, rgba(250,245,233,.05) 75%, rgba(250,245,233,0) 100%),
    radial-gradient(ellipse at 72% 50%, transparent 0%, transparent 52%, rgba(250,245,233,.12) 75%, rgba(250,245,233,.64) 100%),
    linear-gradient(180deg, rgba(250,245,233,.28), transparent 22%, transparent 78%, rgba(250,245,233,.36));
  mix-blend-mode: normal;
  opacity: .9;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 92%, transparent 100%), linear-gradient(0deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 92%, transparent 100%), linear-gradient(0deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.archive-book-period:hover { transform: translateY(-2px); filter: drop-shadow(0 4px 5px rgba(80,60,49,.09)); }
.archive-book-period:hover::before { opacity: .96; transform: scale(1.025); filter: saturate(.9) contrast(1.08) sepia(.07) brightness(1.03) blur(0); }
.archive-book-period.is-poster-hovered::after,
.archive-book-period:focus-visible::after { opacity: .72; }
.archive-book-period > * { position: relative; z-index: 2; }
.archive-book-period > span {
  position: absolute;
  top: 8%;
  left: 8%;
  min-width: 27px;
  height: 27px;
  padding-inline: 4px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(252,247,238,.25);
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(6px, .54vw, 9px);
  white-space: nowrap;
  opacity: .7;
}
.archive-book-period strong {
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(8px, .72vw, 11px);
  line-height: 1.25;
  text-shadow: 0 1px rgba(255,255,255,.45);
}
.archive-book-period small {
  max-width: 92%;
  color: var(--period-muted);
  font-size: clamp(4px, .43vw, 6.7px);
  line-height: 1.42;
}
.archive-book-period > b {
  position: absolute;
  right: 7%;
  bottom: 10%;
  font-size: 10px;
  opacity: .25;
  transition: opacity .2s ease, transform .2s ease;
}
.archive-book-period:hover > b { opacity: .7; transform: translateX(2px); }
.archive-book-period.tone-cyan { --period-ink: #39737b; --period-muted: #617779; }
.archive-book-period.tone-gold { --period-ink: #876337; --period-muted: #776e61; }
.archive-book-period.tone-mint { --period-ink: #40776e; --period-muted: #627972; }
.archive-book-period-aside {
  position: absolute;
  top: 14%;
  left: 55%;
  width: 39%;
  height: 75%;
  display: block;
  color: rgba(148, 111, 68, .52);
  text-align: center;
  pointer-events: auto;
  isolation: isolate;
}
.archive-book-period-aside::before,
.archive-book-period-aside::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.archive-book-period-aside::before { width: 84%; aspect-ratio: 1; border: 1px solid rgba(157, 120, 76, .12); opacity: .82; }
.archive-book-period-aside::after { width: 64%; aspect-ratio: 1; border: 1px solid rgba(125, 146, 122, .1); border-style: dashed; opacity: .8; }
.archive-book-period-aside-label,
.archive-book-period-aside-title,
.archive-book-period-aside-note { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.archive-book-period-aside-label {
  top: 1%;
  opacity: .62;
  color: rgba(132, 101, 67, .68);
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: clamp(6px, .55vw, 10px);
  letter-spacing: .24em;
  line-height: 1;
}
.archive-book-period-aside-title {
  top: 10%;
  opacity: .82;
  color: rgba(119, 86, 52, .8);
  font-family: "STKaiti", "KaiTi", "STSong", serif;
  font-size: clamp(22px, 2.05vw, 36px);
  font-weight: 600;
  letter-spacing: .16em;
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5), 0 0 12px rgba(250, 240, 218, .28);
}
.archive-book-period-aside-note {
  top: 22%;
  opacity: .52;
  color: rgba(118, 108, 91, .7);
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(6px, .58vw, 10px);
  letter-spacing: .12em;
  line-height: 1.4;
}
.archive-book-period-particles {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  opacity: .82;
  mix-blend-mode: multiply;
}
.archive-book-period-astrarium {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 45%;
  width: min(100%, 420px);
  height: auto;
  overflow: visible;
  transform: translate(-50%, -50%) rotate(-7deg);
  transform-origin: 50% 50%;
  opacity: .9;
  mix-blend-mode: multiply;
  filter: sepia(.15) saturate(.72) contrast(.88);
}
.archive-book-period-astrarium circle,
.archive-book-period-astrarium ellipse,
.archive-book-period-astrarium path { vector-effect: non-scaling-stroke; }
.period-astrarium-wash { opacity: .5; }
.period-astrarium-outer,
.period-astrarium-inner,
.period-astrarium-ticks,
.period-astrarium-links,
.period-astrarium-core,
.period-astrarium-sparks { fill: none; stroke: url(#periodInkFade); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.period-astrarium-outer { opacity: .78; transform-box: fill-box; transform-origin: center; animation: period-astrarium-turn 76s linear infinite; }
.period-astrarium-inner { opacity: .62; stroke-dasharray: 3 9; stroke-dashoffset: 0; transform-box: fill-box; transform-origin: center; animation: period-astrarium-counterturn 48s linear infinite, period-astrarium-dash 18s linear infinite; }
.period-astrarium-ticks { opacity: .68; stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: period-astrarium-tick-breathe 8s ease-in-out infinite; }
.period-astrarium-ticks circle { fill: rgba(157, 120, 76, .5); stroke: none; }
.period-astrarium-links { opacity: .5; stroke-width: 1; stroke-dasharray: 2 5; stroke-dashoffset: 0; animation: period-astrarium-links-flow 13s linear infinite; }
.period-astrarium-links circle { fill: rgba(123, 139, 120, .68); stroke: none; }
.period-astrarium-core { opacity: .7; stroke-width: 1.5; transform-origin: 50% 50%; animation: period-astrarium-breathe 6.8s ease-in-out infinite; }
.period-astrarium-core circle:last-child { fill: rgba(211, 163, 91, .44); stroke: none; }
.period-astrarium-sparks { opacity: .68; stroke-width: 1; animation: period-astrarium-spark 5.6s ease-in-out infinite; }
.period-astrarium-sparks circle { fill: rgba(139, 154, 133, .58); stroke: none; }
.archive-book-period-aside i { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; border: 1px solid rgba(172, 127, 70, .44); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 14px rgba(157,120,76,.045), 0 0 26px rgba(203,156,88,.1); opacity: .62; }
@keyframes period-astrarium-turn { to { transform: rotate(360deg); } }
@keyframes period-astrarium-counterturn { to { transform: rotate(-360deg); } }
@keyframes period-astrarium-dash { to { stroke-dashoffset: -48; } }
@keyframes period-astrarium-links-flow { to { stroke-dashoffset: -42; } }
@keyframes period-astrarium-tick-breathe { 0%, 100% { opacity: .52; } 50% { opacity: .82; } }
@keyframes period-astrarium-breathe { 0%, 100% { opacity: .48; transform: scale(.97); } 50% { opacity: .78; transform: scale(1.015); } }
@keyframes period-astrarium-spark { 0%, 100% { opacity: .34; } 50% { opacity: .72; } }

.archive-book-period-aside[data-active-period]::before { opacity: .96; border-color: rgba(157, 120, 76, .2); }
.archive-book-period-aside[data-active-period] .period-astrarium-links { opacity: .68; }
.archive-book-period-aside[data-active-period] .period-astrarium-core { animation-duration: 4.8s; }
.archive-book-period-aside[data-active-period] .period-astrarium-outer { animation-duration: 62s; }
.archive-book-period-aside[data-active-period] .period-astrarium-inner { animation-duration: 36s, 13s; }

/* Paper star-dust network: a quiet ink layer behind directory controls. */
.archive-book-directory > .archive-book-starfield,
.archive-book-domestic-periods > .archive-book-period-particles {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: .78;
  filter: saturate(.82) sepia(.12);
}
.archive-book-directory > .archive-book-starfield {
  inset: 1.5% 1.5% 2%;
  width: 97%;
  height: 96.5%;
  opacity: .74;
}
.archive-book-reader.is-directory-ready .archive-book-directory > .archive-book-starfield,
.archive-book-reader.is-directory-ready .archive-book-domestic-periods > .archive-book-period-particles { opacity: .9; }
.archive-book-directory > header,
.archive-book-directory > .archive-book-celestial,
.archive-book-directory > .archive-book-directory-grid,
.archive-book-domestic-periods > .archive-book-page-heading,
.archive-book-domestic-periods > .archive-book-page-back,
.archive-book-domestic-periods > .archive-book-period-grid { z-index: 2; }
.archive-book-domestic-periods > .archive-book-period-aside { z-index: 3; }

.archive-book-orbit-heading {
  position: absolute;
  z-index: 4;
  top: 3.8%;
  left: 50%;
  width: 48%;
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
  transform: translateX(-50%);
}
.archive-book-orbit .archive-book-page-back { top: 3%; }
.archive-book-orbit-stage {
  --book-orbit-radius-x: min(28vw, 308px);
  --book-orbit-radius-y: min(15vw, 164px);
  --book-orbit-progress: 0deg;
  position: absolute;
  left: 50%;
  top: 55%;
  width: 88%;
  height: 70%;
  transform: translate(-50%, -50%);
  isolation: isolate;
}
.archive-book-orbit-visuals {
  position: absolute;
  z-index: 1;
  left: 50%; top: 50%;
  width: min(34%, 230px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 11px 10px rgba(75, 53, 42, .16));
}
.archive-book-orbit-magic,
.archive-book-orbit-core {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.archive-book-orbit-magic {
  opacity: .4;
  mix-blend-mode: multiply;
  transform: rotate(-8deg) scale(1.12);
  filter: sepia(.22) saturate(.72) contrast(.86);
}
.archive-book-orbit-core {
  opacity: .86;
  transform: translateY(3%);
  filter: saturate(.8) brightness(1.04) contrast(.94);
}
.archive-book-orbit-tracks,
.archive-book-orbit-items { position: absolute; inset: 0; }
.archive-book-orbit-tracks { z-index: 2; transform: rotate(-2deg); }
.archive-book-orbit-items { z-index: 3; transform: scaleY(.54) rotate(-2deg); transform-origin: center; }
.archive-book-orbit-tracks i {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(160, 122, 75, .27);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 18px rgba(156,116,70,.03);
}
.archive-book-orbit-tracks i:nth-child(1) { width: calc(var(--book-orbit-radius-x) * 2); height: calc(var(--book-orbit-radius-y) * 2); }
.archive-book-orbit-tracks i:nth-child(2) { width: calc(var(--book-orbit-radius-x) * 1.36); height: calc(var(--book-orbit-radius-y) * 1.36); border-style: dashed; opacity: .7; transform: translate(-50%, -50%) rotate(-9deg); }
.archive-book-orbit-tracks i:nth-child(3) { width: 28%; aspect-ratio: 1; opacity: .35; }
.archive-book-orbit-center {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 17%;
  min-width: 104px;
  aspect-ratio: 1;
  padding: 12px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  border: 1px solid rgba(157, 120, 75, .27);
  border-radius: 50%;
  color: rgba(97, 77, 66, .82);
  background: radial-gradient(circle, rgba(252,248,239,.65), rgba(248,240,226,.16) 72%, transparent 73%);
  text-align: center;
  transform: translate(-50%, -50%);
}
.archive-book-orbit-center::before { content: "✦"; color: rgba(168,128,76,.56); font-size: 12px; }
.archive-book-orbit-center span { color: rgba(151,111,68,.65); font-family: Georgia, serif; font-size: clamp(5px, .46vw, 7px); letter-spacing: 2px; }
.archive-book-orbit-center strong { max-width: 120px; font-family: "STSong", "SimSun", serif; font-size: clamp(9px, .82vw, 13px); font-weight: 600; line-height: 1.3; }
.archive-book-orbit-center small { color: rgba(115,96,88,.58); font-size: clamp(4px, .4vw, 6px); }
.archive-book-orbit-item {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: rgba(99, 82, 76, .82);
  transform:
    translate(-50%, -50%)
    rotate(calc(var(--book-orbit-angle) + var(--book-orbit-progress)))
    translateX(var(--book-orbit-radius-x))
    rotate(calc(-1 * (var(--book-orbit-angle) + var(--book-orbit-progress))))
    scale(var(--orbit-scale, .92));
  opacity: var(--orbit-opacity, .8);
  animation: none;
  transition: color .2s ease, filter .2s ease;
}
/* Keep the legacy orbit contract available for the older atlas board; the book reader uses the 2.5D motion layer below. */
@media (min-width: 761px) {
  .atlas-orbit-item { transform: translate(-50%, -50%) rotate(calc(var(--atlas-angle) + var(--atlas-orbit-progress))) translateX(302px) rotate(calc(-1 * (var(--atlas-angle) + var(--atlas-orbit-progress)))); animation: atlas-orbit-revolve 90s linear infinite; }
}
@media (max-width: 760px) {
  .atlas-orbit-item { transform: translate(-50%, -50%) rotate(calc(var(--atlas-angle) + var(--atlas-orbit-progress))) translateX(151px) rotate(calc(-1 * (var(--atlas-angle) + var(--atlas-orbit-progress)))); animation: atlas-orbit-revolve 90s linear infinite; }
}
.archive-book-orbit.motion-paused .archive-book-orbit-item { animation-play-state: paused; }
.archive-book-orbit-stage[data-previewing="true"] .archive-book-orbit-items { animation-play-state: paused; }
.archive-book-orbit.motion-paused .archive-book-orbit-items,
.archive-book-orbit.motion-paused .archive-book-projection-trails path { animation-play-state: paused; }
.archive-book-orbit-item:hover { z-index: 5; color: #9a5b65; filter: drop-shadow(0 5px 5px rgba(94,68,58,.13)); }
.archive-book-orbit-item.is-previewed { z-index: 12; color: #8d5b55; filter: drop-shadow(0 0 7px rgba(225, 184, 112, .25)); }
.archive-book-orbit-stage.is-focusing .archive-book-orbit-item { transition: transform .68s cubic-bezier(.22,.76,.22,1), opacity .68s ease; }
.archive-book-orbit-medallion {
  position: relative;
  flex: 0 0 43px;
  width: 43px; height: 43px;
  display: grid; place-items: center;
  border-radius: 50%;
  overflow: visible;
  transform: scaleY(1.85);
}
.archive-book-orbit-avatar {
  position: absolute; inset: 3px;
  width: calc(100% - 6px); height: calc(100% - 6px);
  object-fit: cover;
  border-radius: 50%;
  opacity: .95;
  filter: saturate(.82) contrast(.96);
}
.archive-book-orbit-medallion::after {
  content: "";
  position: absolute; inset: -3px;
  background: url("assets/atlas-orbit/medallion-frame-256.webp") center / contain no-repeat;
  filter: saturate(.7) brightness(1.05);
  pointer-events: none;
}
.archive-book-orbit-initial {
  position: relative;
  z-index: 1;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(252,248,239,.67);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 15px;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.22);
  transform: none;
  opacity: .8;
}
.archive-book-orbit-rest {
  max-width: 112px;
  padding: 4px 7px;
  border-bottom: 1px solid currentColor;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(6px, .58vw, 9px);
  white-space: nowrap;
  transform: scaleY(1.85);
}
.archive-book-orbit-empty {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 4%;
  margin: 0;
  color: rgba(105,88,80,.62);
  font-size: clamp(5px, .5vw, 8px);
  transform: translateX(-50%);
}
.archive-book-orbit-note {
  position: absolute;
  left: 50%;
  bottom: 1.4%;
  width: 70%;
  margin: 0;
  color: rgba(108,91,83,.48);
  font-size: clamp(4px, .42vw, 6.5px);
  text-align: center;
  transform: translateX(-50%);
}
.archive-book-reader.is-leaving .archive-book-page,
.archive-book-reader.is-leaving .archive-book-open-spread { opacity: 0; }

@media (min-width: 2800px) {
  .archive-home-canvas {
    width: min(2800px, 100%);
    padding-top: 2vh;
  }
  body.archive-portal-active .heat-portal-hero { padding-top: clamp(62px, 5vh, 108px); }
  body.archive-portal-active .heat-portal-hero h2 { font-size: clamp(82px, 2.7vw, 108px); }
  body.archive-portal-active .heat-portal-hero > p {
    margin-top: 24px;
    font-size: clamp(22px, .72vw, 29px);
    letter-spacing: 10px;
  }
  body.archive-portal-active .heat-portal-search {
    width: min(1500px, 43vw);
    margin-top: clamp(28px, 2.4vh, 50px);
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 24px;
  }
  .archive-search-icon { width: 40px; height: 40px; }
  body.archive-portal-active .heat-portal-search input { font-size: 25px; }
  body.archive-portal-active .heat-portal-search i { font-size: 32px; }
  .archive-feature-grid {
    width: min(2050px, 60vw);
    height: min(820px, 43vh);
    min-height: 700px;
    margin-top: clamp(14px, 1.4vh, 30px);
    grid-template-columns: minmax(0, 1.42fr) minmax(520px, .95fr);
    gap: 4px 24px;
  }
  .archive-atlas-copy { grid-template-columns: 126px minmax(0, 1fr); }
  .archive-object-emblem { width: 106px; height: 106px; }
  .archive-object-emblem svg { width: 60px; height: 60px; }
  .archive-atlas-copy > small { font-size: 13px; }
  .archive-atlas-copy > strong { font-size: 52px; }
  .archive-atlas-copy > em { font-size: 13px; letter-spacing: 5px; }
  .archive-atlas-copy > span:not(.archive-object-emblem):not(.portal-card-action) {
    margin-top: 20px;
    font-size: 18px;
  }
  .archive-atlas-copy .portal-card-action { font-size: 16px; }
  .archive-compact-copy {
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 20px;
  }
  .archive-compact-copy .archive-object-emblem { width: 88px; height: 88px; }
  .archive-compact-copy .archive-object-emblem svg { width: 46px; height: 46px; }
  .archive-object-text strong { font-size: 35px; }
  .archive-object-text > span { font-size: 16px; }
  .archive-compact-copy .portal-card-action { font-size: 27px; }
  body.archive-portal-active .heat-portal-footer {
    width: min(1100px, 48vw);
    font-size: 16px;
  }
  .archive-home-decor-left { width: clamp(340px, 18vw, 610px); }
  .archive-home-decor-right { width: clamp(238px, 13vw, 430px); }
  .archive-book-shell {
    left: 50%;
    top: 50%;
    width: min(1800px, calc(100vw - 560px));
  }
  .archive-book-close {
    min-height: 54px;
    padding-inline: 23px;
    font-size: 17px;
  }
  .archive-book-directory header { gap: 6px; }
  .archive-book-directory header small { font-size: 13px; letter-spacing: 4px; }
  .archive-book-directory header h3 { font-size: 48px; }
  .archive-book-directory header p { font-size: 15px; }
  .archive-book-directory-grid { gap: 18px 8%; }
  .archive-book-category { padding: 20px 50px 20px 88px; gap: 7px; }
  .archive-book-category > span {
    left: 21px;
    width: 54px;
    height: 54px;
    font-size: 25px;
  }
  .archive-book-category strong { font-size: 27px; }
  .archive-book-category small { font-size: 16px; }
  .archive-book-category > b { right: 21px; font-size: 24px; }
  .archive-book-period-grid { gap: 4% 3.5%; }
  .archive-book-period > span { min-width: 42px; height: 42px; font-size: 13px; }
  .archive-book-period strong { font-size: 17px; }
  .archive-book-period small { font-size: 10px; }
  .archive-book-period > b { font-size: 18px; }
  .archive-book-orbit-stage {
    --book-orbit-radius-x: min(31vw, 500px);
    --book-orbit-radius-y: min(16vw, 260px);
  }
  .archive-book-orbit-initial { flex-basis: 52px; width: 52px; height: 52px; font-size: 23px; }
  .archive-book-orbit-rest { max-width: 180px; font-size: 15px; }
}

@media (min-width: 3600px) {
  .archive-home-canvas { width: min(3200px, 100%); }
  body.archive-portal-active .heat-portal-search { width: min(1660px, 42vw); }
  .archive-feature-grid {
    width: min(2240px, 58vw);
    height: min(900px, 43vh);
    min-height: 760px;
  }
}

/* V5.31: replace dense knowledge grids with a book-native index and paper-ink reveal. */
.intelligence-book-reader.is-detail .intelligence-book-detail {
  inset: 10.5% 9.5% 12.5%;
}
.intelligence-book-reader.is-detail .intelligence-book-detail header {
  top: 1.4%;
  left: 4.5%;
  width: 91%;
  padding-left: 0;
  display: grid;
  justify-items: start;
  text-align: left;
}
.intelligence-book-reader.is-detail .intelligence-book-detail header::after {
  width: min(330px, 46%);
  background: linear-gradient(90deg, rgba(88,127,112,.56), rgba(133,169,148,.12) 74%, transparent);
}
.intelligence-book-reader.is-detail .intelligence-book-detail-content {
  position: absolute;
  inset: 17% 0 0;
  width: auto;
  height: auto;
  display: block;
}
.intelligence-book-guide-layout {
  --guide-paper: rgba(251,247,237,.68);
  --guide-ink: rgba(63,95,81,.92);
  --guide-muted: rgba(88,105,96,.72);
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: clamp(18px, 3.3%, 42px);
  overflow: hidden;
}
.intelligence-book-guide-index {
  min-width: 0;
  min-height: 0;
  padding: 3% 7% 3% 3%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-right: 1px solid rgba(103,135,119,.25);
  background: linear-gradient(90deg, rgba(251,247,237,.25), rgba(251,247,237,0));
}
.intelligence-book-guide-index-heading { display: grid; gap: 3px; padding-bottom: 10px; }
.intelligence-book-guide-index-heading small { color: rgba(79,122,107,.72); font: 7px Georgia,serif; letter-spacing: 1.9px; }
.intelligence-book-guide-index-heading strong { color: var(--guide-ink); font: 19px/1.2 "STSong","SimSun",serif; }
.intelligence-book-guide-index-heading p { margin: 0; color: var(--guide-muted); font-size: 7px; line-height: 1.45; }
.intelligence-book-guide-index-list { min-height: 0; overflow: auto; padding: 2px 5px 4px 0; scrollbar-width: thin; scrollbar-color: rgba(125,145,126,.3) transparent; }
.intelligence-book-guide-index-list button {
  position: relative;
  width: 100%;
  min-height: 42px;
  padding: 7px 7px 7px 32px;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 2px;
  border: 0;
  border-bottom: 1px solid rgba(96,131,118,.15);
  background: transparent;
  color: var(--guide-ink);
  cursor: pointer;
  text-align: left;
  transition: background .22s ease, color .22s ease, transform .22s ease;
}
.intelligence-book-guide-index-list button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 1px;
  background: rgba(96,131,118,.32);
  transform: translateY(-50%);
  transition: width .22s ease, background .22s ease;
}
.intelligence-book-guide-index-list button > span { position: absolute; left: 0; top: 7px; color: rgba(126,112,84,.7); font: 7px Georgia,serif; }
.intelligence-book-guide-index-list button strong { color: rgba(60,84,73,.84); font: 11px/1.25 "STSong","SimSun",serif; }
.intelligence-book-guide-index-list button small { color: rgba(104,113,104,.62); font-size: 6px; line-height: 1.3; }
.intelligence-book-guide-index-list button:hover,
.intelligence-book-guide-index-list button.is-active { background: linear-gradient(90deg, rgba(216,235,220,.42), rgba(216,235,220,0)); transform: translateX(2px); }
.intelligence-book-guide-index-list button.is-active::before { width: 27px; background: rgba(75,126,103,.7); }
.intelligence-book-guide-index-list button.is-active strong { color: rgba(49,101,82,.98); }
.intelligence-book-guide-index-note { margin: 9px 0 0; color: rgba(95,103,96,.62); font-size: 6px; line-height: 1.5; }
.intelligence-book-guide-reveal {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 5% 7% 4% 5%;
  background: radial-gradient(ellipse at 60% 38%, rgba(222,239,223,.4), transparent 61%), linear-gradient(145deg, rgba(251,247,237,.12), rgba(229,239,224,.28));
  -webkit-mask-image: radial-gradient(ellipse 84% 94% at 52% 52%, #000 0 72%, rgba(0,0,0,.74) 88%, transparent 100%);
  mask-image: radial-gradient(ellipse 84% 94% at 52% 52%, #000 0 72%, rgba(0,0,0,.74) 88%, transparent 100%);
  opacity: 1;
  transition: opacity .18s ease, transform .18s ease, filter .18s ease;
}
.intelligence-book-guide-reveal::before,
.intelligence-book-guide-reveal::after { content: ""; position: absolute; pointer-events: none; border: 1px solid rgba(112,137,114,.18); border-radius: 50%; }
.intelligence-book-guide-reveal::before { inset: 7% 7% 7% 4%; transform: rotate(-7deg); }
.intelligence-book-guide-reveal::after { inset: 13% 13% 12% 9%; border-style: dashed; opacity: .48; transform: rotate(10deg); }
.intelligence-book-guide-reveal.is-switching { opacity: .1; transform: translateY(5px); filter: blur(1.4px); }
.intelligence-book-guide-reveal-inner { position: relative; z-index: 1; height: 100%; display: grid; align-content: start; gap: 8px; }
.intelligence-book-guide-reveal-kicker { color: rgba(126,104,68,.72); font: 7px Georgia,serif; letter-spacing: 1.5px; }
.intelligence-book-guide-reveal-inner h4 { margin: 0; color: rgba(53,78,67,.96); font: 24px/1.15 "STSong","SimSun",serif; }
.intelligence-book-guide-lead { max-width: 92%; margin: 0; color: rgba(76,93,83,.82); font: 10px/1.65 "STSong","SimSun",serif; }
.intelligence-book-guide-detail-row { min-height: 0; display: grid; grid-template-columns: minmax(120px,.76fr) minmax(0,1fr); gap: 14px; align-items: center; margin-top: 4px; }
.intelligence-book-guide-visual { position: relative; min-width: 0; aspect-ratio: 1.18; overflow: hidden; border: 1px solid rgba(106,138,116,.28); background: rgba(249,246,234,.35); box-shadow: inset 0 0 0 5px rgba(251,247,237,.2); }
.intelligence-book-guide-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(251,247,237,.16), rgba(205,227,210,.2)); pointer-events: none; }
.intelligence-book-guide-visual img { display: block; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; opacity: .8; filter: saturate(.72) contrast(.94) brightness(1.05); }
.intelligence-book-guide-visual span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: rgba(83,116,96,.42); font: 7px/1.5 Georgia,serif; letter-spacing: 1.3px; }
.intelligence-book-guide-visual:not(.is-missing) span { opacity: 0; }
.intelligence-book-guide-facts { display: grid; gap: 9px; }
.intelligence-book-guide-facts > div { display: grid; gap: 3px; padding-bottom: 7px; border-bottom: 1px solid rgba(96,131,118,.18); }
.intelligence-book-guide-facts span { color: rgba(126,104,68,.68); font: 7px Georgia,serif; letter-spacing: .7px; }
.intelligence-book-guide-facts strong { color: rgba(67,87,77,.82); font: 9px/1.5 "STSong","SimSun",serif; font-weight: 400; }
.intelligence-book-guide-note { max-width: 94%; color: rgba(95,103,96,.62); font-size: 6px; line-height: 1.5; }
.intelligence-book-guide-term-reveal { padding-right: 4%; }
.intelligence-book-guide-term-seal { position: absolute; top: 8%; right: 5%; width: 70px; aspect-ratio: 1; display: grid; place-content: center; justify-items: center; gap: 2px; border: 1px solid rgba(91,137,121,.34); border-radius: 50%; color: rgba(76,120,106,.6); transform: rotate(-9deg); opacity: .72; }
.intelligence-book-guide-term-seal::before { content: ""; position: absolute; inset: 9%; border: 1px solid currentColor; border-radius: 50%; opacity: .36; }
.intelligence-book-guide-term-seal span { font: 6px Georgia,serif; letter-spacing: 1.3px; }
.intelligence-book-guide-term-seal strong { font: 25px "STKaiti","KaiTi",serif; font-weight: 400; }
.intelligence-book-guide-term-reveal h4 { padding-right: 86px; }
.intelligence-book-guide-term-facts { max-width: 85%; margin-top: 12px; }

@media (max-width: 760px) {
  .intelligence-book-reader.is-detail .intelligence-book-detail { inset: 24px 18px 20px; }
  .intelligence-book-reader.is-detail .intelligence-book-detail header { top: 0; width: 100%; justify-items: center; text-align: center; }
  .intelligence-book-reader.is-detail .intelligence-book-detail header::after { display: none; }
  .intelligence-book-reader.is-detail .intelligence-book-detail-content { position: static; width: 100%; height: calc(100% - 84px); margin-top: 78px; }
  .intelligence-book-guide-layout { height: auto; min-height: 100%; grid-template-columns: 1fr; gap: 12px; overflow: visible; }
  .intelligence-book-guide-index { min-height: 190px; padding: 4px 0 8px; border-right: 0; border-bottom: 1px solid rgba(103,135,119,.25); }
  .intelligence-book-guide-index-heading { padding-bottom: 7px; }
  .intelligence-book-guide-index-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 8px; overflow: visible; }
  .intelligence-book-guide-index-list button { min-height: 38px; padding-left: 27px; }
  .intelligence-book-guide-index-list button strong { font-size: 10px; }
  .intelligence-book-guide-reveal { min-height: 300px; padding: 18px 14px 15px; -webkit-mask-image: none; mask-image: none; }
  .intelligence-book-guide-reveal-inner h4 { font-size: 21px; }
  .intelligence-book-guide-lead { font-size: 9px; }
  .intelligence-book-guide-detail-row { grid-template-columns: 42% minmax(0,1fr); gap: 10px; }
  .intelligence-book-guide-facts { gap: 7px; }
  .intelligence-book-guide-facts strong { font-size: 8px; }
  .intelligence-book-guide-term-seal { width: 58px; }
  .intelligence-book-guide-term-seal strong { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  .intelligence-book-guide-reveal,
  .intelligence-book-guide-index-list button { transition: none; }
}

/* V5.17: the full-screen reader veil is an expensive compositor surface on
   Chromium. The book/background layers already carry their own soft focus,
   so keep the veil translucent without blurring the entire viewport. */
@media (min-width: 761px) {
  .archive-home-stage.archive-book-active::after,
  .archive-home-stage.archive-intelligence-active::after {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(35, 39, 51, .2);
  }
}

/* V5.16: sparse monthly sets keep the portrait ring tangent to a slightly
   smaller projection sphere, so five or seven entries do not look stretched
   across the full left page. Full sets preserve the established scale. */
@media (min-width: 761px) {
  .archive-book-orbit-stage[data-orbit-density="sparse"] .archive-book-atlas-left {
    --archive-sphere-size: 52%;
    --archive-orbit-radius: calc(26cqw + (var(--archive-medallion-radius) * 1.07));
  }
  .archive-book-orbit-stage[data-orbit-density="compact"] .archive-book-atlas-left {
    --archive-sphere-size: 54%;
    --archive-orbit-radius: calc(27cqw + (var(--archive-medallion-radius) * 1.07));
  }
  .archive-book-orbit-stage[data-orbit-density="full"] .archive-book-atlas-left {
    --archive-sphere-size: 56%;
    --archive-orbit-radius: calc(28cqw + (var(--archive-medallion-radius) * 1.07));
  }
}

@media (max-width: 760px) {
  body.archive-portal-active .archive-home-stage,
  .archive-home-canvas { min-height: auto; }
  body.archive-portal-active .archive-home-stage { height: auto; }
  .archive-home-canvas { width: 100%; }
  .archive-home-background {
    inset: 0;
    background-image:
      linear-gradient(rgba(241,247,250,.46), rgba(255,248,244,.36)),
      url("assets/homepage/archive-background-v2-mobile.webp");
    background-position: center top;
    filter: saturate(.8) brightness(1.055);
    transform: none;
    animation: archive-mobile-arrival .58s ease both;
  }
  .archive-profile-background { display: none; }
  .archive-book-reader {
    position: fixed;
    z-index: 40;
    background: rgba(222, 228, 235, .76);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .archive-book-close {
    position: fixed;
    z-index: 60;
    top: 18px;
    right: 18px;
    left: auto;
    width: 38px;
    min-height: 38px;
    padding: 0;
    font-size: 0;
  }
  .archive-book-close span { margin: 0; font-size: 18px; }
  .archive-book-shell {
    position: fixed;
    top: 50%;
    width: calc(100vw - 24px);
    height: min(650px, calc(100vh - 116px));
    max-width: 520px;
    aspect-ratio: auto;
    overflow: hidden;
    border: 1px solid rgba(184, 153, 111, .34);
    border-radius: 8px;
    background:
      linear-gradient(rgba(255, 252, 246, .68), rgba(255, 250, 243, .82)),
      url("assets/homepage/book-page-texture.webp") center / cover;
    box-shadow: 0 24px 52px rgba(32, 39, 55, .22), inset 0 1px rgba(255,255,255,.8);
  }
  .archive-book-open-spread,
  .archive-book-closed-layer,
  .archive-book-motion-sequence { display: none; }
  .archive-book-directory {
    inset: 28px 20px 22px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 18px;
  }
  .archive-book-directory::after { display: none; }
  .archive-book-directory header {
    position: static;
    width: auto;
    margin: 0 auto;
    padding-left: 0;
    justify-items: center;
    text-align: center;
  }
  .archive-book-celestial,
  .archive-book-starfield { display: none; }
  .archive-book-directory header::after { display: none; }
  .archive-book-directory header small { font-size: 8px; letter-spacing: 2px; }
  .archive-book-directory header h3 { font-size: 20px; }
  .archive-book-directory header p { font-size: 8px; }
  .archive-book-directory-grid {
    position: static;
    width: 100%;
    height: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 9px;
  }
  .archive-book-category { min-height: 0; padding: 9px 30px 9px 50px; }
  .archive-book-category > span { left: 10px; width: 30px; height: 30px; font-size: 14px; }
  .archive-book-category strong { font-size: 13px; }
  .archive-book-category small { font-size: 8px; }
  .archive-book-category > b { right: 10px; }
  .archive-book-reader.is-left-page-focused .archive-book-shell {
    transform: translate(-50%, -50%) scale(1);
  }
  .archive-book-page {
    inset: 24px 18px 20px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .archive-book-page-back {
    position: sticky;
    top: 0;
    left: 0;
    min-height: 30px;
    padding: 0 8px;
    background: rgba(250,246,237,.84);
    font-size: 9px;
  }
  #archiveBookBackFromProfile { top: 0; left: 0; }
  .archive-book-profile { padding: 24px 18px 22px; overflow-y: auto; }
  .archive-book-profile-spread { display: block; height: auto; }
  .archive-book-profile-left { padding: 0 0 18px; border-right: 0; border-bottom: 1px solid rgba(157,123,79,.2); }
  .archive-book-profile-right { padding: 20px 0 0; }
  .archive-book-profile-heading { margin: 10px 0 16px; }
  .archive-book-profile-heading h3 { font-size: 22px; }
  .archive-book-profile-hero { grid-template-columns: 52px minmax(0,1fr); padding: 12px; }
  .archive-book-profile-avatar { width: 52px; height: 52px; }
.archive-book-profile.is-profile-unified .archive-book-profile-left > * { top: 0; }
.archive-book-profile.is-profile-unified .archive-book-profile-scene-copy { top: 0; }
  .archive-book-profile-columns { grid-template-columns: 1fr; }
  .archive-book-profile-scene-frame { min-height: 210px; }
  .archive-book-profile-collection-reveal { width: min(100%, 270px); min-height: 248px; margin-inline: auto; }
  .collection-reveal-stage { min-height: 168px; overflow: hidden; }
  .collection-reveal-orbit-item { min-width: 48px; width: 24%; }
  .collection-reveal-orbit-item { transform: translate(-50%, -50%) rotate(calc(var(--collection-slot) * 90deg)) translateY(-58px) rotate(calc(var(--collection-slot) * -90deg)); }
  .collection-reveal-main { width: 42%; }
  .collection-reveal-exchange { width: 29%; }
  .collection-reveal-note { padding-inline: 8px; }
  .collection-browser-stage { min-height: 178px; grid-template-columns: 28px minmax(34px, .7fr) minmax(96px, 1.6fr) minmax(34px, .7fr) 28px; }
  .collection-browser-arrow { width: 24px; height: 40px; font-size: 20px; }
  .collection-browser-side-frame { width: min(100%, 62px); height: 82px; padding: 5px; }
  .collection-browser-main-frame { width: min(100%, 112px); height: 128px; padding: 7px; }
  .collection-browser-main-copy strong { font-size: 11px; }
  .collection-browser-main-copy span { max-width: 118px; font-size: 7px; }
  .collection-browser-side small { font-size: 6px; }
  .archive-book-profile::before { display: none; }
  .archive-book-page-heading,
  .archive-book-orbit-heading {
    position: static;
    width: auto;
    margin: 8px 0 14px;
    padding: 0;
    justify-items: center;
    text-align: center;
    transform: none;
  }
  .archive-book-page-heading h3,
  .archive-book-orbit-heading h3 { font-size: 20px; }
  .archive-book-page-heading p,
  .archive-book-orbit-heading p { font-size: 8px; }
  .archive-book-period-grid {
    position: static;
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    gap: 9px;
  }
  .archive-book-period {
    min-height: 118px;
    padding: 48px 10px 12px;
  }
  .archive-book-period::before {
    opacity: .58;
    filter: saturate(.62) contrast(.94) sepia(.14) brightness(1.03) blur(.2px);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.22) 14%, #000 45%, rgba(0,0,0,.42) 100%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.22) 14%, #000 45%, rgba(0,0,0,.42) 100%);
  }
  .archive-book-period > span { min-width: 32px; height: 32px; font-size: 9px; }
  .archive-book-period strong { font-size: 12px; }
  .archive-book-period small { font-size: 7px; }
  .archive-book-period-aside { display: none; }
  .archive-book-orbit-stage {
    --book-orbit-radius-x: min(36vw, 150px);
    --book-orbit-radius-y: min(39vw, 164px);
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: 430px;
    margin-top: 8px;
    transform: none;
  }
  .archive-book-orbit-center { width: 108px; min-width: 108px; }
  .archive-book-orbit-center strong { font-size: 10px; }
  .archive-book-orbit-items { transform: none; }
  .archive-book-orbit-item { transform: translate(-50%, -50%) rotate(calc(var(--book-orbit-angle) + var(--book-orbit-progress))) translateX(var(--book-orbit-radius-x)) rotate(calc(-1 * (var(--book-orbit-angle) + var(--book-orbit-progress)))) scale(var(--orbit-scale, .9)); }
  .archive-book-orbit-initial { flex-basis: 32px; width: 32px; height: 32px; font-size: 14px; }
  .archive-book-orbit-initial { transform: none; }
  .archive-book-orbit-rest { display: none; transform: none; }
  .archive-book-orbit-visuals { width: min(43%, 170px); opacity: .82; }
  .archive-book-orbit-medallion { flex-basis: 34px; width: 34px; height: 34px; transform: none; }
  .archive-book-orbit-avatar { inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); }
  .archive-book-orbit-note {
    position: static;
    width: 88%;
    margin: 4px auto 0;
    font-size: 7px;
    transform: none;
  }
  .atlas-profile-book-scene {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 18px 12px 24px;
    display: block;
    overflow: visible;
    background: linear-gradient(rgba(249,242,228,.88), rgba(247,239,222,.9)), url("assets/homepage/book-page-texture.webp") center / cover;
  }
  .atlas-profile-book-scene::before { display: none; }
  .atlas-profile-book-page { padding: 0; }
  .atlas-profile-book-page:first-of-type { border-right: 0; }
  .atlas-profile-scene-page { margin-top: 22px; gap: 12px; }
  .atlas-profile-scene-frame { min-height: 220px; }
  .atlas-profile-scene-caption { padding: 0 8px; }
  .atlas-profile-scene-caption strong { font-size: 20px; }
  .atlas-profile-scene-caption p { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .archive-home-background,
  .archive-profile-background,
  .archive-home-content,
  .archive-home-content > .heat-portal-hero,
  .archive-home-content > .heat-portal-search,
  .archive-home-content > .archive-feature-grid,
  .archive-home-content > .heat-portal-footer,
  .archive-home-canvas > .archive-home-decor,
  .archive-book-shell,
  .archive-book-motion-sequence,
  .archive-book-open-spread,
  .archive-book-closed-layer,
  .archive-book-directory,
  .archive-book-page,
  .archive-book-period,
  .archive-book-period::before,
  .archive-book-orbit-item,
  .archive-book-starfield,
  .archive-book-celestial,
  .celestial-body,
  .archive-book-celestial-core,
  .archive-book-category,
  .archive-book-category::before,
  .archive-book-period-astrarium,
  .archive-book-period-particles,
  .period-astrarium-outer,
  .period-astrarium-inner,
  .period-astrarium-core,
  .period-astrarium-sparks,
  .archive-book-close,
  .intelligence-book-reader,
  .intelligence-book-shell,
  .intelligence-book-open-spread,
  .intelligence-book-cover,
  .intelligence-book-motion-sequence,
  .intelligence-book-directory,
  .intelligence-book-detail,
  .intelligence-book-entry,
  .intelligence-book-close { transition: none !important; animation: none !important; }
  .archive-book-orbit-stage { --book-orbit-progress: 0deg !important; }
  .archive-book-orbit-item { animation: none !important; transition: none !important; }
  .archive-book-reader.is-directory-ready .archive-book-category::before { opacity: .52; filter: saturate(.46) contrast(.86) sepia(.26) blur(.35px); }
}

@keyframes archive-home-arrival {
  from { opacity: .72; filter: saturate(.75) contrast(.94) brightness(1.12) blur(2px); transform: translate3d(0, -4px, 0) scale(1.09); }
  to { opacity: 1; filter: saturate(.91) contrast(.985) brightness(1.018); transform: translate3d(0, 0, 0) scale(1.045); }
}
@keyframes archive-ui-arrival {
  from { transform: translateY(6px); }
  to { transform: none; }
}
@keyframes archive-mobile-arrival {
  from { opacity: .78; }
  to { opacity: 1; }
}

/* V4.2 celestial archive spread: fixed ten-star atlas and right-page observatory. */
.archive-book-orbit {
  --archive-selected-accent: #afc9df;
  --archive-selected-warm: #d7b46a;
  --archive-orbit-progress: 0deg;
}
@property --archive-orbit-progress {
  syntax: '<angle>';
  inherits: true;
  initial-value: 0deg;
}
.archive-book-orbit-heading {
  top: 2.2%;
  left: 25.2%;
  width: 31%;
  gap: 2px;
  transform: translateX(-50%);
}
.archive-book-orbit-heading::after {
  content: "";
  width: min(168px, 72%);
  height: 1px;
  margin-top: 3px;
  background: linear-gradient(90deg, transparent, rgba(163, 124, 74, .42) 18%, rgba(163, 124, 74, .42) 82%, transparent);
}
.archive-book-orbit .archive-book-page-back {
  top: 2.2%;
  left: 1.4%;
}
.archive-book-orbit-stage {
  position: absolute;
  inset: 14% 1.7% 5.8%;
  width: auto;
  height: auto;
  transform: none;
  isolation: isolate;
  overflow: visible;
}
.archive-book-atlas-left,
.archive-book-atlas-right {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 0;
}
.archive-book-atlas-left {
  container-type: inline-size;
  --archive-sphere-size: 56%;
  --archive-medallion-size: clamp(38px, 4.15vw, 58px);
  --archive-medallion-radius: calc(var(--archive-medallion-size) / 2);
  --archive-sphere-radius: calc(var(--archive-sphere-size) / 2);
  --archive-orbit-radius: calc(28cqw + (var(--archive-medallion-radius) * 1.07));
  z-index: 3;
  left: 0;
  width: 48.2%;
}
.archive-book-atlas-left::before,
.archive-book-atlas-left::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.archive-book-atlas-left::before {
  inset: 7% 6% 5%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--archive-selected-accent) 20%, transparent) 0, transparent 48%),
    radial-gradient(circle at 50% 48%, rgba(255, 251, 241, .24), transparent 70%);
  filter: blur(8px);
  opacity: .72;
}
.archive-book-atlas-left::after {
  left: 49.7%;
  top: 8%;
  bottom: 7%;
  width: 1px;
  background: linear-gradient(transparent, rgba(165, 128, 79, .12) 20%, rgba(165, 128, 79, .16) 76%, transparent);
  opacity: .45;
}
.archive-book-projection-ring {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: calc(var(--archive-sphere-size) + (var(--archive-medallion-size) * 2));
  aspect-ratio: 1;
  border: 1px solid rgba(170, 131, 80, .22);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-8deg) scaleY(.86);
  opacity: .6;
  background: conic-gradient(from 18deg, transparent 0 9%, rgba(181, 141, 89, .22) 9.3% 10%, transparent 10.4% 28%, rgba(181, 141, 89, .18) 28.4% 29.2%, transparent 29.6% 56%, rgba(181, 141, 89, .2) 56.4% 57%, transparent 57.4% 78%, rgba(181, 141, 89, .17) 78.4% 79%, transparent 79.4% 100%);
  -webkit-mask: radial-gradient(circle, transparent 0 58%, #000 59% 61%, transparent 62% 100%);
  mask: radial-gradient(circle, transparent 0 58%, #000 59% 61%, transparent 62% 100%);
  filter: drop-shadow(0 0 4px rgba(255, 237, 187, .18));
  pointer-events: none;
}
.archive-book-projection-ring-inner {
  z-index: 2;
  width: calc(var(--archive-sphere-size) + var(--archive-medallion-size));
  opacity: .42;
  transform: translate(-50%, -50%) rotate(14deg) scaleY(.86);
  -webkit-mask: radial-gradient(circle, transparent 0 52%, #000 53% 55%, transparent 56% 100%);
  mask: radial-gradient(circle, transparent 0 52%, #000 53% 55%, transparent 56% 100%);
}
.archive-book-star-map {
  position: absolute;
  z-index: 0;
  inset: 1.5% 1.5% 0;
  width: 97%;
  height: 98%;
  overflow: visible;
  fill: none;
  stroke: rgba(166, 128, 77, .28);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-dasharray: 2 5;
  filter: drop-shadow(0 0 3px rgba(255, 239, 191, .22));
}
.archive-book-star-map path:nth-child(2),
.archive-book-star-map circle:first-of-type { opacity: .58; }
.archive-book-star-map path:nth-child(n+3),
.archive-book-star-map circle:last-of-type { opacity: .38; }
.archive-book-orbit-items {
  position: absolute;
  z-index: 5;
  inset: 0;
  transform: rotate(var(--archive-orbit-progress));
  transform-origin: 50% 50%;
  animation: archive-orbit-revolve 82s linear infinite;
  will-change: transform;
}
.archive-book-orbit-item {
  --archive-orbit-angle: 0deg;
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  width: var(--archive-medallion-size);
  height: var(--archive-medallion-size);
  min-width: var(--archive-medallion-size);
  min-height: var(--archive-medallion-size);
  padding: 0;
  display: block;
  border: 0;
  background: transparent;
  color: rgba(93, 75, 66, .76);
  opacity: .76;
  transform:
    translate(-50%, -50%)
    rotate(var(--archive-orbit-angle))
    translateY(calc(-1 * var(--archive-orbit-radius)))
    rotate(calc(-1 * var(--archive-orbit-angle)))
    rotate(calc(-1 * var(--archive-orbit-progress)));
  transition: opacity .24s ease, color .24s ease, filter .24s ease, transform .24s ease;
}
.archive-book-orbit-item:hover,
.archive-book-orbit-item:focus-visible,
.archive-book-orbit-item.is-selected {
  z-index: 12;
  opacity: 1;
  color: #765346;
  filter: drop-shadow(0 5px 6px rgba(87, 61, 48, .14));
  transform:
    translate(-50%, -50%)
    rotate(var(--archive-orbit-angle))
    translateY(calc(-1 * var(--archive-orbit-radius)))
    rotate(calc(-1 * var(--archive-orbit-angle)))
    rotate(calc(-1 * var(--archive-orbit-progress)))
    translateY(-1px);
}
.archive-book-orbit-item:focus-visible {
  outline: none;
  box-shadow: none !important;
}
.archive-book-orbit-medallion {
  position: relative;
  width: var(--archive-medallion-size);
  height: var(--archive-medallion-size);
  flex: none;
  display: grid;
  place-items: center;
  overflow: visible;
  border-radius: 50%;
  transform: none;
  transition: transform .24s ease, filter .24s ease;
}
.archive-book-orbit-medallion::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 11%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 34%, rgba(255,255,255,.84), rgba(238, 229, 211, .68) 46%, rgba(176, 143, 98, .22) 100%);
  box-shadow: inset 0 0 0 1px rgba(165, 125, 74, .24), 0 2px 5px rgba(72, 53, 44, .1);
}
.archive-book-orbit-medallion::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: -7%;
  background: url("assets/atlas-orbit/medallion-frame-256.webp") center / contain no-repeat;
  filter: saturate(.7) sepia(.08) brightness(1.04) drop-shadow(0 2px 2px rgba(99, 69, 45, .08));
  pointer-events: none;
}
.archive-book-orbit-item:hover .archive-book-orbit-medallion,
.archive-book-orbit-item:focus-visible .archive-book-orbit-medallion,
.archive-book-orbit-item.is-selected .archive-book-orbit-medallion {
  transform: scale(1.055);
  filter: brightness(1.035);
}
.archive-book-orbit-item.is-selected .archive-book-orbit-medallion::after {
  filter: saturate(.88) sepia(.04) brightness(1.08) drop-shadow(0 0 5px color-mix(in srgb, var(--archive-selected-warm) 38%, transparent));
}
.archive-book-orbit-avatar {
  position: absolute;
  z-index: 1;
  inset: 14%;
  width: 72%;
  height: 72%;
  object-fit: cover;
  border-radius: 50%;
  opacity: .92;
  filter: saturate(.68) contrast(.91) brightness(1.045) sepia(.08);
  transition: filter .24s ease, opacity .24s ease;
}
.archive-book-orbit-item:hover .archive-book-orbit-avatar,
.archive-book-orbit-item:focus-visible .archive-book-orbit-avatar,
.archive-book-orbit-item.is-selected .archive-book-orbit-avatar {
  opacity: 1;
  filter: saturate(.88) contrast(.96) brightness(1.03);
}
.archive-book-orbit-initial {
  position: relative;
  z-index: 2;
  width: 66%;
  height: 66%;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: rgba(122, 88, 57, .68);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(12px, 1.25vw, 18px);
  opacity: .86;
}
.archive-book-orbit-avatar + .archive-book-orbit-initial { opacity: 0; }
.archive-book-orbit-rest {
  position: absolute;
  left: 50%;
  top: calc(100% + clamp(2px, .35vw, 5px));
  max-width: clamp(66px, 7.8vw, 108px);
  padding: 2px 5px 3px;
  overflow: hidden;
  border: 0;
  background: radial-gradient(ellipse at center, rgba(250, 245, 234, .82), rgba(250, 245, 234, .38) 62%, transparent 76%);
  color: currentColor;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(6.5px, .59vw, 9px);
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%);
}
.archive-book-orbit-placeholder {
  opacity: .28;
  filter: grayscale(.35);
}
.archive-book-orbit-placeholder .archive-book-orbit-rest { color: rgba(107, 91, 83, .55); }
.archive-book-apparition {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: var(--archive-sphere-size);
  height: auto;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--archive-selected-warm) 27%, transparent);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 5px rgba(255, 252, 243, .14),
    inset 0 0 30px rgba(255, 250, 236, .34),
    0 0 18px color-mix(in srgb, var(--archive-selected-accent) 10%, transparent);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.archive-book-apparition.is-empty {
  border-color: rgba(126, 112, 94, .28);
  background:
    radial-gradient(circle at 50% 48%, rgba(124, 117, 102, .18), transparent 52%),
    repeating-conic-gradient(from 8deg, rgba(137, 119, 92, .14) 0 1deg, transparent 1deg 18deg),
    rgba(181, 174, 153, .12);
  box-shadow:
    inset 0 0 0 5px rgba(106, 101, 88, .08),
    inset 0 0 28px rgba(100, 96, 84, .16),
    0 0 14px rgba(112, 102, 83, .12);
}
.archive-book-apparition.is-empty::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 13%;
  border: 1px solid rgba(111, 102, 84, .24);
  border-radius: 50%;
  -webkit-mask: conic-gradient(from 18deg, #000 0 22%, transparent 22% 28%, #000 28% 62%, transparent 62% 69%, #000 69% 100%);
  mask: conic-gradient(from 18deg, #000 0 22%, transparent 22% 28%, #000 28% 62%, transparent 62% 69%, #000 69% 100%);
  transform: rotate(-16deg);
}
.archive-book-apparition.is-empty .archive-book-apparition-copy {
  color: rgba(96, 88, 76, .62);
  bottom: 40%;
}
.archive-book-apparition.is-empty .archive-book-apparition-copy small {
  color: rgba(111, 101, 83, .52);
}
.archive-book-apparition.is-empty .archive-book-apparition-copy strong {
  font-size: clamp(10px, .9vw, 13px);
  letter-spacing: .08em;
  font-weight: 500;
}
.archive-book-apparition.is-empty .archive-book-apparition-copy span { color: rgba(105, 96, 82, .46); }
.archive-book-apparition::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 44%, transparent 0 33%, rgba(251, 247, 237, .08) 55%, rgba(251,247,237,.66) 92%),
    linear-gradient(180deg, rgba(250,247,238,.06) 38%, rgba(250,247,238,.68) 82%, rgba(250,247,238,.88));
}
.archive-book-apparition-image {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  opacity: 0;
  mix-blend-mode: multiply;
  filter: saturate(.34) contrast(.82) brightness(1.16) sepia(.14) blur(.35px);
  transform: scale(1.025);
  transition: opacity .46s ease, transform .7s cubic-bezier(.2,.7,.2,1), filter .36s ease;
}
.archive-book-apparition-image.is-visible { opacity: .42; transform: scale(1); }
.archive-book-orbit-stage[data-previewing="true"] .archive-book-apparition-image.is-visible {
  opacity: .48;
  filter: saturate(.34) contrast(.82) brightness(1.17) sepia(.1);
}
.archive-book-apparition-wash {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 43%, color-mix(in srgb, var(--archive-selected-accent) 15%, transparent), transparent 55%),
    radial-gradient(circle at 50% 47%, transparent 38%, rgba(250,246,236,.3) 70%, rgba(250,246,236,.78) 97%);
}
.archive-book-apparition-copy {
  position: absolute;
  z-index: 4;
  left: 13%;
  right: 13%;
  bottom: 15%;
  display: grid;
  justify-items: center;
  gap: 2px;
  color: rgba(85, 70, 65, .8);
  text-align: center;
  text-shadow: 0 1px rgba(255,255,255,.62);
}
.archive-book-apparition-copy small {
  color: color-mix(in srgb, var(--archive-selected-warm) 72%, #7f6b5d);
  font-family: Georgia, serif;
  font-size: clamp(5px, .43vw, 7px);
  letter-spacing: 1.8px;
}
.archive-book-apparition-copy strong {
  max-width: 100%;
  overflow: hidden;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(12px, 1.18vw, 17px);
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.archive-book-apparition-copy span {
  color: rgba(109, 91, 82, .62);
  font-size: clamp(5px, .47vw, 7.5px);
}
.archive-book-apparition-merch {
  position: absolute;
  z-index: 4;
  left: 12%;
  right: 12%;
  bottom: 6%;
  display: flex;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
}
.archive-book-apparition-merch span {
  max-width: 78px;
  padding: 2px 5px;
  overflow: hidden;
  border-top: 1px solid color-mix(in srgb, var(--archive-selected-warm) 38%, transparent);
  color: rgba(102, 84, 77, .56);
  font-size: clamp(4.5px, .4vw, 6.5px);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.archive-book-atlas-right {
  z-index: 2;
  right: 0;
  width: 48.2%;
  overflow: visible;
  pointer-events: none;
}
.archive-book-orbit-particles {
  position: absolute;
  z-index: 3;
  inset: 2% 2% 4%;
  width: 96%;
  height: 94%;
  overflow: visible;
  pointer-events: auto;
  opacity: .92;
  mix-blend-mode: multiply;
}
.archive-book-atlas-right::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 241, 193, .23), rgba(255, 241, 193, .06) 46%, transparent 70%);
  filter: blur(8px);
  animation: archive-observatory-aura 8s ease-in-out infinite;
  transform: translate(-50%, -50%) scaleY(.72);
}
.archive-book-atlas-right::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 53%;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid rgba(180, 151, 105, .14);
  border-radius: 50%;
  box-shadow: 0 0 0 14px rgba(181, 151, 102, .035), 0 0 30px rgba(146, 192, 203, .12);
  transform: translate(-50%, -50%) scaleY(.72) rotate(-9deg);
  opacity: .72;
  pointer-events: none;
}
.archive-book-observatory-map {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: 78%;
  height: auto;
  opacity: .36;
  mix-blend-mode: multiply;
  filter: sepia(.18) saturate(.66) contrast(.9);
  transform: translate(-50%, -50%) rotate(-6deg) scaleY(.82);
  transform-origin: center;
}
.archive-book-observatory-glow {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 54%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 218, .48), rgba(213, 231, 240, .16) 44%, transparent 71%);
  filter: blur(6px);
  transform: translate(-50%, -50%) scaleY(.84);
  animation: archive-observatory-glow 6.8s ease-in-out infinite;
}
.archive-book-observatory-emitter {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 40%;
  width: 20px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 239, .92) 0 12%, rgba(230, 244, 255, .52) 30%, transparent 72%);
  box-shadow: 0 0 18px rgba(221, 241, 255, .46), 0 0 42px rgba(255, 223, 158, .22);
  transform: translate(-50%, -50%);
  animation: archive-observatory-emitter 5.5s ease-in-out infinite;
}
.archive-book-observatory {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 44%;
  width: auto;
  height: 92%;
  max-width: 88%;
  object-fit: contain;
  opacity: .94;
  filter: saturate(.78) brightness(1.035) contrast(.95) drop-shadow(0 16px 13px rgba(73, 54, 43, .2));
  /* The transparent source has a wide empty strip on the left; offset the
     rendered image so the visible brass instrument, rather than its bitmap
     box, sits on the right-page center axis. */
  transform: translate(-44%, -50%);
  transform-origin: center 78%;
  animation: archive-observatory-breathe 7s ease-in-out infinite;
  pointer-events: auto;
}
.archive-book-observatory-shadow {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 80%;
  width: 46%;
  height: 9%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(67, 49, 39, .25), rgba(67, 49, 39, .08) 54%, transparent 73%);
  filter: blur(6px);
  transform: translate(-50%, -50%);
  animation: archive-observatory-shadow 6.8s ease-in-out infinite;
}
.archive-book-observatory-seal {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 5.5%;
  min-width: 112px;
  display: grid;
  justify-items: center;
  gap: 1px;
  color: rgba(94, 75, 65, .66);
  text-align: center;
  transform: translateX(-50%);
}
.archive-book-observatory-seal::before,
.archive-book-observatory-seal::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(164, 125, 76, .38));
}
.archive-book-observatory-seal::before { right: calc(100% + 8px); }
.archive-book-observatory-seal::after { left: calc(100% + 8px); transform: rotate(180deg); }
.archive-book-observatory-seal span {
  color: rgba(151, 112, 67, .58);
  font-family: Georgia, serif;
  font-size: clamp(5px, .46vw, 7px);
  letter-spacing: 2px;
}
.archive-book-observatory-seal strong {
  max-width: 150px;
  overflow: hidden;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(9px, .85vw, 13px);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.archive-book-observatory-seal small { font-size: clamp(4.5px, .4vw, 6.5px); }

/* Keep the astrarium in the visual centre of the right page, slightly above its midpoint. */
.archive-book-atlas-right .archive-book-observatory { top: 40%; }
.archive-book-projection-trails {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: color-mix(in srgb, var(--archive-selected-warm) 54%, rgba(232, 206, 151, .5));
  stroke-width: 1.25;
  stroke-linecap: round;
  opacity: .62;
  filter: drop-shadow(0 0 4px rgba(255, 232, 170, .36));
  pointer-events: none;
}
.archive-book-orbit.is-observatory-hovered .archive-book-orbit-particles { opacity: 1; }
.archive-book-projection-trails path { stroke-dasharray: 2 10; animation: archive-projection-flow 10s linear infinite; }
.archive-book-projection-trails .archive-book-projection-beam-glow { stroke-width: 6; opacity: .14; filter: blur(2px); }
.archive-book-projection-trails path:nth-child(3) { animation-duration: 13s; animation-delay: -4s; }
.archive-book-projection-trails path:nth-child(5) { animation-duration: 16s; animation-delay: -7s; }
.archive-book-orbit.is-observatory-hovered .archive-book-orbit-items,
.archive-book-orbit.is-observatory-hovered .archive-book-projection-trails path,
.archive-book-orbit.is-observatory-hovered .archive-book-observatory,
.archive-book-orbit.is-observatory-hovered .archive-book-observatory-emitter {
  animation-play-state: paused;
}

/* Hidden readers still contain animated orbit, astrarium and projection
   layers. Pause them at the source so Edge does not keep compositing invisible
   pages while the home portal is open. */
.archive-book-reader:not(.is-active) *,
.intelligence-book-reader:not(.is-active) * {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .intelligence-book-folder-v4,
  .intelligence-book-folder-v4::after,
  .intelligence-book-folder-sheen,
  .intelligence-book-folder-ink { transition: none !important; }
}

/* V4.64 keeps a single low-cost static ambience on the landing scene. */
.archive-home-stage:not(.archive-book-active) .archive-desk-network {
  filter: none;
}
.archive-home-stage:not(.archive-book-active) .archive-desk-refraction,
.archive-home-stage:not(.archive-book-active) .archive-desk-star,
.archive-home-stage:not(.archive-book-active) .archive-ambient-light,
.archive-home-stage:not(.archive-book-active) .archive-astral-trace,
.archive-home-stage:not(.archive-book-active) .archive-crystal-sheen,
.archive-home-stage:not(.archive-book-active) .archive-ambient-dust,
.archive-home-stage:not(.archive-book-active) .archive-ambient-petal {
  animation: none !important;
}
.archive-book-orbit-empty {
  z-index: 20;
  left: 25%;
  bottom: 38%;
  width: 32%;
  text-align: center;
}
.archive-book-orbit-note {
  bottom: .3%;
  width: 64%;
}
@keyframes archive-observatory-breathe {
  0%, 100% { transform: translate(-44%, -50%); filter: saturate(.78) brightness(1.035) contrast(.95) drop-shadow(0 16px 13px rgba(73, 54, 43, .2)); }
  50% { transform: translate(-44%, calc(-50% - 1px)); filter: saturate(.82) brightness(1.055) contrast(.96) drop-shadow(0 17px 14px rgba(73, 54, 43, .21)); }
}
@keyframes archive-projection-flow { to { stroke-dashoffset: -66; } }
@keyframes archive-observatory-emitter {
  0%, 100% { opacity: .56; transform: translate(-50%, -50%) scale(.9); }
  50% { opacity: .92; transform: translate(-50%, -50%) scale(1.14); }
}
@keyframes archive-observatory-aura {
  0%, 100% { opacity: .68; transform: translate(-50%, -50%) scaleY(.72) scale(.96); }
  50% { opacity: .92; transform: translate(-50%, -50%) scaleY(.72) scale(1.035); }
}
@keyframes archive-observatory-glow {
  0%, 100% { opacity: .72; filter: blur(6px); }
  50% { opacity: .98; filter: blur(8px); }
}
@keyframes archive-observatory-shadow {
  0%, 100% { opacity: .62; transform: translate(-50%, -50%) scaleX(.94); }
  50% { opacity: .82; transform: translate(-50%, -50%) scaleX(1.04); }
}
@keyframes archive-orbit-revolve {
  from { --archive-orbit-progress: 0deg; }
  to { --archive-orbit-progress: 360deg; }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .archive-book-orbit-heading { top: 1.5%; }
  .archive-book-orbit-stage { inset: 14.5% .5% 5.5%; }
  .archive-book-atlas-left { --archive-medallion-size: clamp(34px, 4.6vw, 48px); }
  .archive-book-orbit-rest { max-width: 78px; font-size: 7px; }
  .archive-book-observatory { height: 82%; max-width: 84%; }
}

@media (max-width: 760px) {
  .intelligence-book-knowledge-grid,
  .intelligence-book-term-catalogue { grid-template-columns: 1fr; gap: 7px; }
  .intelligence-book-knowledge-card { grid-template-columns: 31% minmax(0, 1fr); min-height: 78px; }
  .archive-book-profile-observations article { grid-template-columns: 70px minmax(0, 1fr); }
  .archive-book-profile-observations article a { grid-column: 2; justify-self: start; }
  .archive-book-orbit-heading {
    position: relative;
    top: auto;
    left: auto;
    width: min(82%, 340px);
    margin: 6px auto 12px;
    transform: none;
  }
  .archive-book-orbit .archive-book-page-back { top: 0; left: 0; }
  .archive-book-orbit-stage {
    position: relative;
    inset: auto;
    width: 100%;
    height: 720px;
    margin: 0;
    overflow: visible;
  }
  .archive-book-atlas-left,
  .archive-book-atlas-right {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
  }
  .archive-book-atlas-left { top: 0; height: 430px; }
  .archive-book-atlas-right { top: 438px; height: 260px; }
  .archive-book-atlas-left::after { display: none; }
  .archive-book-star-map { inset: 0 4%; width: 92%; }
  .archive-book-atlas-left { --archive-sphere-size: 58%; --archive-medallion-size: 42px; --archive-orbit-radius: calc(29cqw + (var(--archive-medallion-radius) * 1.07)); }
  .archive-book-orbit-rest { max-width: 68px; padding-inline: 2px; font-size: 7px; }
  .archive-book-apparition-copy strong { font-size: 14px; }
  .archive-book-apparition-merch { display: none; }
  .archive-book-observatory-map { width: min(86%, 310px); }
  .archive-book-observatory { height: 72%; max-width: 78%; top: 45%; transform: translate(-50%, -50%); }
  .archive-book-observatory-shadow { top: 81%; width: min(52%, 190px); }
  .archive-book-observatory-seal { bottom: 2px; }
  .archive-book-projection-trails { display: none; }
  .archive-book-orbit-particles { inset: 3% 6% 5%; width: 88%; height: 90%; opacity: .7; }
  .archive-book-projection-ring { width: 82%; }
  .archive-book-orbit-empty { left: 50%; bottom: 53%; width: 70%; transform: translateX(-50%); }
  .archive-book-orbit-note { position: static; width: 90%; margin: 10px auto 0; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
.archive-book-observatory,
  .archive-book-observatory-emitter,
  .archive-book-observatory-glow,
  .archive-book-observatory-shadow,
  .archive-book-atlas-right::before,
  .archive-book-orbit-items,
  .archive-book-projection-trails path { animation: none !important; }
  .archive-book-orbit-particles { display: none; }
}

/* Keep this late in the cascade: the reader's desktop art direction is declared above. */
@media (max-width: 760px) {
  .intelligence-book-reader {
    position: fixed;
    z-index: 40;
    background: rgba(222, 228, 235, .76);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .intelligence-book-close {
    position: fixed;
    z-index: 60;
    top: 18px;
    right: 18px;
    left: auto;
    width: 38px;
    min-height: 38px;
    padding: 0;
    font-size: 0;
  }
  .intelligence-book-close span { margin: 0; font-size: 18px; }
  .intelligence-book-shell {
    position: fixed;
    top: 50%;
    width: calc(100vw - 24px);
    max-width: 520px;
    height: min(650px, calc(100vh - 116px));
    aspect-ratio: auto;
    overflow: hidden;
    border: 1px solid rgba(102, 139, 124, .34);
    border-radius: 8px;
    background: linear-gradient(rgba(255, 252, 246, .68), rgba(255, 250, 243, .82)), url("assets/homepage/book-page-texture.webp") center / cover;
    box-shadow: 0 24px 52px rgba(32, 39, 55, .22), inset 0 1px rgba(255,255,255,.8);
  }
  .intelligence-book-reader.is-focused .intelligence-book-shell { transform: translate(-50%, -50%) scale(1); }
  .intelligence-book-open-spread,
  .intelligence-book-cover,
  .intelligence-book-motion-sequence { display: none; }
  .intelligence-book-directory,
  .intelligence-book-detail { inset: 28px 20px 22px; overflow-x: hidden; overflow-y: auto; }
  .intelligence-book-directory { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 18px; }
  .intelligence-book-directory header,
  .intelligence-book-detail header { position: static; width: auto; margin: 0 auto; padding-left: 0; justify-items: center; text-align: center; }
  .intelligence-book-directory header::after,
  .intelligence-book-detail header::after { display: none; }
  .intelligence-book-index-stamp { display: none; }
  .intelligence-book-directory-grid { position: static; width: 100%; height: 100%; margin: 0; grid-template-columns: 1fr; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 9px; }
  .intelligence-book-entry { min-height: 0; padding: 9px 30px 9px 50px; }
  .intelligence-book-entry > span:not(.intelligence-book-entry-art) { left: 10px; width: 30px; height: 30px; font-size: 14px; }
  .intelligence-book-entry strong { font-size: 13px; }
  .intelligence-book-entry small { font-size: 8px; }
  .intelligence-book-entry b { right: 10px; }
  .intelligence-book-detail { display: block; }
  .intelligence-book-page-back { position: sticky; top: 0; left: 0; min-height: 30px; padding: 0 8px; background: rgba(250,246,237,.84); font-size: 9px; }
  .intelligence-book-detail header { margin: 8px 0 14px; }
  .intelligence-book-detail-content { position: static; width: auto; height: auto; margin-top: 14px; }
  .intelligence-book-topic-grid,
  .intelligence-book-term-list { grid-template-columns: 1fr; }
  .intelligence-book-topic-grid { gap: 8px; }
  .intelligence-book-topic-grid strong,
  .intelligence-book-term-list dt,
  .intelligence-book-checklist strong { font-size: 12px; }
  .intelligence-book-topic-grid p,
  .intelligence-book-term-list dd,
  .intelligence-book-checklist span,
  .intelligence-book-query-guide small { font-size: 8px; }
  .intelligence-book-query-guide p { font-size: 12px; }
  .intelligence-book-query-chips button { font-size: 8px; }
}

/* V4.9: the lower timeline is the third mobile directory item. Keep the
   compact three-row stack in the late mobile cascade as well. */
@media (max-width: 760px) {
  .intelligence-book-directory-grid { grid-template-rows: minmax(128px, 1fr) minmax(128px, 1fr) minmax(196px, auto); }
}

/* V4.92: align the goods guide as three deliberate paper zones on desktop.
   The title owns the quiet top margin, the two guide entries share equal
   columns with a wider book-spread gutter, and the seasonal archive keeps the
   full lower row for its slider, nodes, and editorial note. */
@media (min-width: 761px) {
  .intelligence-book-directory header {
    left: 50%;
    width: 46%;
    padding-left: 0;
    justify-items: center;
    text-align: center;
    transform: translate(-50%, -6%);
  }
  .intelligence-book-directory header p { max-width: 92%; text-align: center; }
  .intelligence-book-directory-grid {
    inset: 30% 8% 8%;
    grid-template-columns: 40% 40%;
    grid-template-rows: minmax(0, 1fr) minmax(126px, .7fr);
    justify-content: space-between;
    column-gap: 0;
  }
  .intelligence-book-entry { padding-left: 44px; padding-right: 26px; }
  .intelligence-book-entry > span:not(.intelligence-book-entry-art) { left: 10px; }

  /* Keep the seasonal heading centered against the full paper strip rather
     than the left-hand copy column, then lift it slightly above the divider. */
  .intelligence-book-timeline-heading > div {
    position: absolute;
    top: -5%;
    left: 50%;
    transform: translate(-50%, -5%);
    width: max-content;
    text-align: center;
  }
  .intelligence-book-timeline-heading > div p { text-align: center; }
  .intelligence-book-timeline-control { margin-top: 34px; }
}

/* V4.94: make the seasonal archive easier to read at presentation scale. */
.intelligence-book-timeline-heading strong { font-size: clamp(19px, 1.35vw, 23px); }
.intelligence-book-timeline-heading small { font-size: clamp(9px, .66vw, 11px); }
.intelligence-book-timeline-heading p { font-size: clamp(9px, .59vw, 10px); }
.intelligence-book-timeline-status { position: absolute; top: 8%; right: 2.4%; font-size: clamp(8px, .52vw, 9px); }
.intelligence-book-timeline-year,
.intelligence-book-timeline-control output { font-size: clamp(10px, .62vw, 11px); }
.intelligence-book-timeline-event-period { font-size: clamp(10px, .62vw, 11px); }
.intelligence-book-timeline-event strong { font-size: clamp(11px, .72vw, 13px); }
.intelligence-book-timeline-event small { font-size: clamp(9px, .52vw, 10px); }
.intelligence-book-timeline-note span { font-size: clamp(9px, .54vw, 10px); }
.intelligence-book-timeline-note strong { font-size: clamp(11px, .74vw, 13px); }
.intelligence-book-timeline-note p { font-size: clamp(9px, .62vw, 11px); }
.intelligence-book-timeline-note small { font-size: clamp(8px, .5vw, 9px); }

@media (prefers-reduced-motion: reduce) {
  .intelligence-book-timeline-track,
  .intelligence-book-timeline-event i,
  .intelligence-book-timeline-note { transition: none !important; }
}

/* V5.15: keep the desktop archive stage and book on one proportional stage.
   The height cap prevents short or ultrawide viewports from stretching the
   desk composition while the mobile reader keeps its dedicated paper layout. */
@media (min-width: 761px) {
  body.archive-portal-active .archive-home-stage {
    --archive-stage-max-width: min(1600px, 100vw);
    --archive-stage-height: max(720px, 100vh);
    min-height: var(--archive-stage-height);
    height: var(--archive-stage-height);
    overflow: hidden;
  }

  body.archive-portal-active .archive-home-canvas {
    --archive-book-width: min(
      1180px,
      calc(100vw - 210px),
      calc((100vh - 70px) * 1.8028)
    );
    width: var(--archive-stage-max-width);
    min-height: var(--archive-stage-height);
  }

  body.archive-portal-active .archive-book-shell {
    width: var(--archive-book-width);
    max-width: calc(100vw - 210px);
  }
}

@media (min-width: 2800px) and (max-width: 3599px) {
  body.archive-portal-active .archive-home-canvas {
    --archive-stage-max-width: min(2800px, 100vw);
    --archive-book-width: min(
      1800px,
      calc(100vw - 560px),
      calc((100vh - 84px) * 1.8028)
    );
  }
  body.archive-portal-active .archive-book-shell {
    width: var(--archive-book-width);
    max-width: calc(100vw - 560px);
  }
}

@media (min-width: 3600px) {
  body.archive-portal-active .archive-home-canvas {
    --archive-stage-max-width: min(3200px, 100vw);
    --archive-book-width: min(
      2050px,
      calc(100vw - 720px),
      calc((100vh - 96px) * 1.8028)
    );
  }
  body.archive-portal-active .archive-book-shell {
    width: var(--archive-book-width);
    max-width: calc(100vw - 720px);
  }
}

/* V5.33: one more grid inset with a restrained typography increase. */
@media (min-width: 761px) {
  .intelligence-book-reader.is-detail .intelligence-book-detail-content { inset: 17% 6.25% 2%; }
  .intelligence-book-reader.is-detail .intelligence-book-detail header small { font-size: calc(clamp(8px, .68vw, 11px) + 1.5px); }
  .intelligence-book-reader.is-detail .intelligence-book-detail header h3 { font-size: calc(clamp(23px, 1.9vw, 30px) + 1.5px); }
  .intelligence-book-reader.is-detail .intelligence-book-detail header p { font-size: calc(clamp(8px, .66vw, 11px) + 1.5px); }
  .intelligence-book-reader.is-detail .intelligence-book-page-back { font-size: calc(clamp(9px, .76vw, 12px) + 1.5px); }
  .intelligence-book-guide-index-heading small { font-size: 10.5px; }
  .intelligence-book-guide-index-heading strong { font-size: 22.5px; }
  .intelligence-book-guide-index-heading p { font-size: 10.5px; }
  .intelligence-book-guide-index-list button > span { font-size: 10.5px; }
  .intelligence-book-guide-index-list button strong { font-size: 14.5px; }
  .intelligence-book-guide-index-list button small { font-size: 9.5px; }
  .intelligence-book-guide-index-note { font-size: 9.5px; }
  .intelligence-book-guide-reveal-kicker { font-size: 10.5px; }
  .intelligence-book-guide-reveal-inner h4 { font-size: 27.5px; }
  .intelligence-book-guide-lead { font-size: 13.5px; }
  .intelligence-book-guide-visual span { font-size: 10.5px; }
  .intelligence-book-guide-facts span { font-size: 10.5px; }
  .intelligence-book-guide-facts strong { font-size: 12.5px; }
  .intelligence-book-guide-note { font-size: 9.5px; }
  .intelligence-book-guide-term-seal span { font-size: 9.5px; }
  .intelligence-book-guide-term-seal strong { font-size: 28.5px; }
}

@media (max-width: 760px) {
  .intelligence-book-guide-index-heading small { font-size: 10.5px; }
  .intelligence-book-guide-index-heading strong { font-size: 22.5px; }
  .intelligence-book-guide-index-heading p { font-size: 10.5px; }
  .intelligence-book-guide-index-list button > span { font-size: 10.5px; }
  .intelligence-book-guide-index-list button strong { font-size: 13.5px; }
  .intelligence-book-guide-index-list button small { font-size: 9.5px; }
  .intelligence-book-guide-index-note { font-size: 9.5px; }
  .intelligence-book-guide-reveal-kicker { font-size: 10.5px; }
  .intelligence-book-guide-reveal-inner h4 { font-size: 24.5px; }
  .intelligence-book-guide-lead { font-size: 12.5px; }
  .intelligence-book-guide-visual span { font-size: 10.5px; }
  .intelligence-book-guide-facts span { font-size: 10.5px; }
  .intelligence-book-guide-facts strong { font-size: 11.5px; }
  .intelligence-book-guide-note { font-size: 9.5px; }
  .intelligence-book-guide-term-seal span { font-size: 9.5px; }
  .intelligence-book-guide-term-seal strong { font-size: 24.5px; }
}

/* V5.34: center only the two knowledge-page headings and collapse the empty
   subtitle row, leaving the index and reveal body in their established zones. */
.intelligence-book-reader.is-detail #intelligenceBookDetail[data-intelligence-page="categories"] header,
.intelligence-book-reader.is-detail #intelligenceBookDetail[data-intelligence-page="terms"] header {
  left: 50%;
  width: 52%;
  justify-items: center;
  text-align: center;
  transform: translateX(-50%);
}
.intelligence-book-reader.is-detail #intelligenceBookDetail[data-intelligence-page="categories"] header p,
.intelligence-book-reader.is-detail #intelligenceBookDetail[data-intelligence-page="terms"] header p {
  display: none;
}
.intelligence-book-reader.is-detail #intelligenceBookDetail[data-intelligence-page="categories"] header::after,
.intelligence-book-reader.is-detail #intelligenceBookDetail[data-intelligence-page="terms"] header::after {
  margin-top: 6px;
  width: min(240px, 72%);
  background: linear-gradient(90deg, transparent, rgba(88,127,112,.44) 22%, rgba(133,169,148,.1) 78%, transparent);
}

@media (max-width: 760px) {
  .intelligence-book-reader.is-detail #intelligenceBookDetail[data-intelligence-page="categories"] header,
  .intelligence-book-reader.is-detail #intelligenceBookDetail[data-intelligence-page="terms"] header {
    left: auto;
    width: 100%;
    transform: none;
  }
}
