:root {
  color-scheme: light;
  --ink: #263d52; --muted: #8396aa; --paper: #f6f9fd; --line: #e5edf5; --brand: #427aa1;
  --sidebar-width: 264px; --rail-width: 128px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { display: grid; grid-template-rows: 62px minmax(0, 1fr); background: var(--paper); color: var(--ink); font: 13px/1.58 var(--font); }
button, input, select { font: inherit; }
button { border: 0; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, canvas:focus-visible { outline: 2px solid #427aa1; outline-offset: 3px; }
button, a, input, select { transition: background .16s, border-color .16s, color .16s, opacity .16s; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 11px; line-height: 1.75; } .tiny { font-size: 10px; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 24px; background: #ffffffed; border-bottom: 1px solid var(--line); z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-symbol { width: 30px; height: 30px; display: grid; place-items: center; color: #6b9dc9; }
.brand strong { display: block; font-size: 16px; font-weight: 650; letter-spacing: .04em; line-height: 1.2; }
.brand small { display: block; font-size: 10px; color: #8c9aab; letter-spacing: .07em; margin-top: 4px; }
.header-center { display: flex; align-items: center; justify-content: center; min-width: 0; }
.build-status { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #7f93a7; white-space: nowrap; min-width: 0; }
.live-dot { width: 5px; height: 5px; border-radius: 50%; flex: none; background: #8badc7; }
.live-dot.error { background: #dca073; } .live-dot.paused { background: #c4ab81; }
.revision { color: #a2afbc; padding-left: 5px; }
#build-summary { color: #98a6b5; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.header-actions { display: flex; gap: 7px; flex: none; }
.button { background: #fff; border: 1px solid #dce7f2; border-radius: 7px; color: #426688; padding: 8px 12px; font-size: 11px; white-space: nowrap; }
.button:hover { background: #edf4fb; border-color: #bad0e4; }
.export-button { color: #376b9b; background: #f5f9fe; padding: 9px 13px; }
.export-button span { font-size: 16px; margin-right: 4px; }
.mobile-only { display: none; }
.workspace { min-height: 0; display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr) var(--sidebar-width); position: relative; background: var(--paper); }
.story-panel, .filters-panel { min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #d0ddea transparent; }
.story-panel { background: #fcfdff; border-right: 1px solid var(--line); padding: 28px 13px; }
.filters-panel { background: #fcfdff; border-left: 1px solid var(--line); padding: 26px 18px; }
.panel-heading { margin-bottom: 21px; }
.panel-heading h1, .panel-heading h2 { font-size: 16px; font-weight: 650; margin: 0; line-height: 1.4; }
.story-panel .panel-heading h1 { font-size: 13px; padding-left: 2px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.section-heading h2 { font-size: 12px; margin: 0; font-weight: 650; }
.text-button { background: transparent; color: #6484a3; font-size: 10px; padding: 3px 5px; border-radius: 4px; }
.text-button:hover { background: #edf4fa; }
.module-home { display: flex; align-items: center; gap: 9px; width: 100%; margin-bottom: 13px; border: 1px solid #e1ecf7; border-radius: 8px; background: #edf5fd; padding: 12px 9px; text-align: left; color: #3f729f; font-size: 11px; font-weight: 650; }
.module-home:hover { background: #e4f0fc; }
.module-home span { font-size: 11px; }
.module-shortcuts { display: grid; grid-template-columns: 1fr; gap: 9px; }
.module-shortcuts button { min-width: 0; text-align: left; background: transparent; border: 1px solid transparent; padding: 12px 8px; border-radius: 8px; line-height: 1.3; display: flex; align-items: center; gap: 9px; white-space: nowrap; font-size: 11px; color: #577087; }
.module-shortcuts button::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--module-color, #b7cde1); }
.module-shortcuts button:hover { background: #f0f5fb; }
.module-shortcuts button.active { color: #3b709c; background: #eaf3fc; font-weight: 650; border-color: #e0ebf7; }
.module-shortcuts button.active::before { background: var(--module-color, #6298c6); box-shadow: 0 0 0 3px #6298c615; }
.atlas { min-width: 0; min-height: 0; overflow: hidden; position: relative; background: radial-gradient(ellipse at 48% 44%, #ffffff 0, #f8fbff 50%, #f1f7fd 100%); }
.atlas canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
/* 模块底色、WebGL 图形和 Canvas 标注共享画布尺寸，只有标注层接收指针事件。 */
#graph-regions { pointer-events: none; z-index: 0; }
#graph-space { pointer-events: none; z-index: 1; }
#graph { z-index: 2; cursor: grab; }
#graph:active { cursor: grabbing; }
#graph-effects { z-index: 3; pointer-events: none; }
.view-mode { position: absolute; z-index: 5; left: 24px; top: 20px; display: flex; align-items: center; gap: 5px; }
.view-mode button { padding: 7px 13px; border: 1px solid #dce7f3; border-radius: 6px; background: #ffffffd9; color: #657e97; font-size: 11px; white-space: nowrap; box-shadow: 0 1px 2px #4c749004; }
.view-mode button:hover { color: #3e739d; background: #edf5fd; }
.view-mode button.active { background: #538db9; color: #fff; border-color: #538db9; box-shadow: 0 3px 8px #457ea021; }
.atlas-heading { position: absolute; z-index: 4; left: 26px; top: 76px; pointer-events: none; max-width: calc(100% - 52px); }
.atlas-heading h2 { font-size: 23px; font-weight: 650; letter-spacing: .01em; margin: 0 0 5px; line-height: 1.3; }
.atlas-heading p { color: #8b9db0; font-size: 11px; margin: 0; line-height: 1.65; }
.selection-clear, .view-back { display: inline-flex; align-items: center; pointer-events: auto; margin: 8px 6px 0 0; padding: 4px 8px; border: 1px solid #dbe6f1; border-radius: 5px; background: #ffffffdb; color: #527b9e; font-size: 10px; }
.selection-clear:hover, .view-back:hover { background: #eaf3fc; }
.topic-relations { position: absolute; z-index: 5; top: 82px; right: 24px; display: flex; gap: 3px; padding: 3px; border: 1px solid #dce7f3; border-radius: 7px; background: #ffffffd9; }
.topic-relations button { padding: 5px 9px; border-radius: 4px; background: transparent; color: #7890a6; font-size: 10px; }
.topic-relations button.active { color: #3d739f; background: #e8f2fc; }
.atlas-bottom { position: absolute; left: 24px; right: 24px; bottom: 39px; z-index: 5; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; pointer-events: none; }
.view-stats { display: flex; align-items: center; gap: 8px; color: #90a0b0; font-size: 10px; padding: 5px 0; }
.view-stats strong { color: #6c859d; font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 600; }
.view-stats i { height: 10px; width: 1px; background: #d5e0eb; }
.canvas-tools { pointer-events: auto; display: flex; align-items: center; background: #ffffffed; border: 1px solid #dfe8f2; border-radius: 7px; overflow: hidden; height: 35px; box-shadow: 0 2px 8px #6583a008; }
.canvas-tools button { background: none; width: 31px; height: 33px; font-size: 17px; color: #66819c; }
.canvas-tools button:hover { background: #edf5fc; }
.canvas-tools .tool-mode { width: 38px; font-size: 10px; }
.canvas-tools .tool-mode.active, .canvas-tools .tool-mode[aria-pressed="true"] { background: #eef5fc; color: #477ea9; font-weight: 650; }
.canvas-tools span { color: #678097; min-width: 36px; text-align: center; font-size: 10px; font-variant-numeric: tabular-nums; }
.tool-divider { min-width: 1px !important; width: 1px; height: 14px; background: #e0e8ef; }
.atlas-hint { position: absolute; bottom: 13px; left: 24px; right: 24px; font-size: 10px; color: #96a8ba; pointer-events: none; z-index: 4; }
.atlas-hint span { color: #b5c2d0; padding: 0 5px; }
.canvas-notice { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 9px; width: 280px; max-width: 80%; text-align: center; color: #7890a4; }
.canvas-notice strong { font-size: 15px; font-weight: 600; }
.canvas-notice > span:last-of-type { font-size: 11px; }
.loading-orbit { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #e0ebf5; border-top-color: #729cc0; animation: spin 1.3s linear infinite; }
.error-banner { position: absolute; top: 155px; left: 24px; right: 24px; background: #fff7ec; border: 1px solid #ead4b7; padding: 8px 11px; border-radius: 6px; color: #927044; z-index: 6; font-size: 11px; }
.hover-tooltip { position: absolute; z-index: 7; pointer-events: none; background: #fffffff5; border: 1px solid #dce7f1; border-radius: 7px; box-shadow: 0 6px 22px #42648717; padding: 9px 11px; max-width: 240px; font-size: 11px; }
.hover-tooltip small { display: block; color: #8b9bad; margin-top: 3px; }
.insight-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 23px; }
.overview-metric { border: 1px solid #edf3fa; border-radius: 10px; padding: 13px 12px; background: #f3f8fe; }
.overview-metric strong { display: block; color: #365c7b; font-size: 24px; font-weight: 650; letter-spacing: -.03em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.overview-metric span { display: block; margin-top: 6px; color: #8c9eb0; font-size: 11px; }
.search-box { display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid #dce7f2; border-radius: 7px; padding: 8px 9px; }
.search-box:focus-within { border-color: #9bbbd6; box-shadow: 0 0 0 2px #5d93bd0c; }
.search-box > span { font-size: 21px; line-height: 1; color: #8ca6bd; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: none; background: none; font-size: 11px; color: var(--ink); }
.search-box input::placeholder { color: #9baabb; }
.search-box kbd { background: #f6f9fc; border: 1px solid #e4ebf2; border-radius: 3px; color: #a3afba; padding: 0 4px; font-size: 10px; }
.search-results { position: relative; z-index: 9; max-height: 220px; overflow-y: auto; background: #fff; border: 1px solid #dce7f2; border-radius: 6px; margin-top: 5px; box-shadow: 0 8px 24px #43647f14; padding: 4px; }
.search-result { display: block; width: 100%; background: none; border-radius: 5px; padding: 8px; text-align: left; }
.search-result:hover { background: #edf5fc; }
.search-result strong { display: block; font-size: 11px; font-weight: 600; }
.search-result strong::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--node-color); }
.search-result small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #8c9eae; font-size: 9px; }
.field-label { display: block; margin: 11px 0 5px; color: #8295a7; font-size: 10px; font-weight: 600; }
select { display: block; width: 100%; min-width: 0; background: #fff; border: 1px solid #dce7f2; color: #57728b; border-radius: 6px; padding: 7px; font-size: 11px; }
select:hover { border-color: #a9c0d5; }
.filter-section { border-top: 1px solid var(--line); margin-top: 21px; padding-top: 17px; }
.filter-section summary { display: flex; align-items: center; gap: 7px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 650; color: #3c5973; }
.filter-section summary::-webkit-details-marker { display: none; }
.filter-section summary::after { content: '⌄'; color: #9aafc1; margin-left: auto; font-size: 15px; font-weight: 400; line-height: 1; }
.filter-section[open] summary::after { transform: rotate(180deg); }
.filter-section summary > .text-button { margin-left: auto; }
.filter-section summary:has(> .text-button)::after { margin-left: 3px; }
.filter-section[open] > summary { margin-bottom: 15px; }
.kind-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.kind-chip { display: flex; align-items: center; justify-content: center; min-width: 0; gap: 5px; cursor: pointer; background: #f4f8fe; border: 1px solid #e2ebf5; border-radius: 7px; padding: 8px 6px; font-size: 11px; white-space: nowrap; color: #547390; }
.kind-chip:has(input:not(:checked)) { opacity: .42; background: #fff; }
.kind-chip input, .relation-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.kind-chip:has(input:focus-visible), .relation-option:has(input:focus-visible) { outline: 2px solid #427aa1; outline-offset: 2px; }
.kind-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--node-color, #8daecb); }
.kind-chip .count { margin-left: auto; color: #9aabbc; font-size: 9px; font-variant-numeric: tabular-nums; }
.relation-filters { display: flex; flex-direction: column; gap: 6px; }
.relation-option { display: flex; align-items: center; gap: 7px; padding: 3px 0; cursor: pointer; font-size: 10px; color: #637e96; }
.relation-option .checkmark { width: 12px; height: 12px; line-height: 10px; text-align: center; flex: none; border: 1px solid #bed0e0; border-radius: 3px; color: transparent; font-size: 9px; }
.relation-option input:checked + .checkmark { background: var(--relation-color, #86a5c0); color: white; border-color: var(--relation-color, #86a5c0); }
.relation-option input:not(:checked) ~ span { opacity: .4; }
.relation-line { width: 24px; flex: none; height: var(--line-width, 2px); background: var(--line-pattern, var(--relation-color, #94aabd)); border-radius: 1px; }
.relation-option small { margin-left: auto; color: #94a7b8; font-size: 10px; font-variant-numeric: tabular-nums; }
.relation-name { line-height: 1.2; }
.statistic-group + .statistic-group { margin-top: 16px; }
.statistic-group h3 { color: #8a9eb0; font-size: 10px; margin: 0 0 9px; font-weight: 600; }
.dimension-breakdown, .relation-breakdown { display: grid; gap: 7px; }
.breakdown-row { display: grid; grid-template-columns: minmax(46px, 68px) minmax(0, 1fr) auto; align-items: center; gap: 6px; font-size: 10px; }
.breakdown-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #7f94a7; }
.breakdown-track { height: 4px; background: #edf3f9; border-radius: 5px; overflow: hidden; }
.breakdown-track > i { display: block; height: 100%; background: var(--bar-color, #a8bfd3); border-radius: inherit; }
.breakdown-value { color: #93a5b5; font-size: 10px; font-variant-numeric: tabular-nums; }
.progress-panel { margin-top: 15px; }
.progress-track { height: 4px; background: #e9f0f7; border-radius: 4px; margin: 8px 0; overflow: hidden; }
.progress-track > div { height: 100%; background: #8caecb; width: 0; transition: width .6s; }
.progress-panel .section-heading { margin: 0; } .progress-panel .section-heading > span { color: #88a1b6; font-size: 10px; }
.progress-panel .tiny { margin-top: 5px; color: #a0aebc; }
/* 详情只替换现有右侧栏，不覆盖图谱、不改变画布尺寸。 */
.detail-panel { position: absolute; z-index: 12; right: 0; top: 0; bottom: 0; width: var(--sidebar-width); overflow-y: auto; scrollbar-width: thin; padding: 25px 18px; background: #fcfdff; border-left: 1px solid var(--line); animation: detail-in .16s ease-out; }
.workspace:has(.detail-panel:not([hidden])) .filters-panel:not(.is-open) { visibility: hidden; }
.filters-panel.is-open { position: relative; z-index: 16; visibility: visible; }
.detail-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 21px; }
.section-eyebrow { color: #365773; font-size: 15px; font-weight: 650; }
.icon-button { display: grid; place-items: center; width: 27px; height: 27px; background: transparent; border-radius: 5px; color: #90a3b5; font-size: 23px; line-height: 1; }
.icon-button:hover { background: #edf4fb; color: #567fa2; }
.node-kind { display: inline-flex; align-items: center; gap: 5px; color: #486078; border: 1px solid var(--node-color, #dceafa); border-radius: 12px; padding: 2px 11px; background: var(--node-tint, #eff6fd); font-size: 10px; }
.detail-name { font-family: var(--font); font-size: 20px; font-weight: 650; line-height: 1.5; margin: 12px 0 6px; overflow-wrap: anywhere; }
.node-path { color: #91a1b2; font-size: 10px; line-height: 1.8; overflow-wrap: anywhere; }
.detail-actions { display: flex; flex-direction: column; gap: 8px; margin: 20px 0; }
.detail-actions .button { flex: 1; white-space: normal; padding: 9px 7px; }
.detail-actions .button:first-child { background: #578fba; border-color: #578fba; color: #fff; }
.detail-actions .button:first-child:hover { background: #467ea8; }
.detail-section { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 20px; }
.detail-section h3 { font-size: 12px; color: #486984; margin: 0 0 9px; }
.detail-section p { margin: 0; color: #778ca0; font-size: 11px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.missing-text { color: #ab9579 !important; }
.edge-list { display: flex; flex-direction: column; gap: 8px; }
.edge-card { padding: 9px; background: #f6f9fd; border: 1px solid #e4edf6; border-radius: 7px; }
.edge-card-header { margin-bottom: 6px; }
.edge-type { color: #6689a7; font-size: 10px; font-weight: 650; }
.edge-type::before { content: ''; display: inline-block; width: 16px; height: 2px; margin: 0 5px 3px 0; background: var(--relation-color, #6689a7); }
.edge-endpoints { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; color: #9aafc0; }
.node-link { background: #fff; color: #6485a2; border: 1px solid #e0eaf3; border-radius: 4px; padding: 3px 5px; font-size: 10px; overflow-wrap: anywhere; }
.node-link:hover { background: #edf5fd; }
.edge-card p { font-size: 10px; }
.edge-card .edge-condition { color: #8ba0b3; margin-top: 5px; }
.edge-meta, .group-note, .detail-empty { color: #92a5b5; font-size: 10px; line-height: 1.7; }
.edge-more { display: block; width: 100%; margin-top: 8px; }
#toast { position: fixed; z-index: 30; bottom: 24px; left: 50%; transform: translateX(-50%); background: #365773; color: white; border-radius: 7px; padding: 9px 13px; font-size: 11px; box-shadow: 0 5px 18px #35567620; max-width: min(460px, 90vw); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes detail-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 1200px) {
  :root { --sidebar-width: 242px; --rail-width: 110px; }
  .story-panel { padding: 26px 8px; } .filters-panel, .detail-panel { padding: 25px 14px; }
  .module-home, .module-shortcuts button { gap: 7px; padding-left: 7px; padding-right: 5px; }
  #build-summary { max-width: 190px; } .view-mode { left: 20px; } .atlas-heading { left: 22px; }
  .atlas-bottom { left: 20px; right: 20px; } #composition-count { display: none; }
}
@media (max-width: 950px) {
  .workspace { grid-template-columns: minmax(0, 1fr) var(--sidebar-width); }
  .story-panel { display: none; } .masthead { padding: 0 18px; } #build-summary { display: none; }
  .view-stats { gap: 6px; } .topic-relations { top: 131px; left: 22px; right: auto; }
  .overview-metric { padding: 12px 10px; } .overview-metric strong { font-size: 22px; }
}
@media (max-width: 680px) {
  body { height: 100dvh; grid-template-rows: 58px minmax(0, 1fr); }
  .masthead { padding: 0 12px; gap: 5px; } .brand { gap: 8px; } .brand strong { font-size: 14px; } .brand small { font-size: 8px; } .brand-symbol, .brand-symbol svg { width: 24px; }
  .header-center { display: none; } .header-actions { gap: 5px; } .header-actions .button { min-height: 44px; padding: 7px 10px; font-size: 11px; } .mobile-only { display: inline-block; }
  .workspace { display: block; } .atlas { height: 100%; }
  .filters-panel { display: none; position: absolute; z-index: 16; right: 0; top: 0; bottom: 0; width: min(290px, 85vw); box-shadow: -8px 0 26px #45658016; }
  .filters-panel.is-open { display: block; visibility: visible; }
  .view-mode { top: 10px; left: 12px; right: 12px; gap: 3px; padding: 3px; border: 1px solid #e0eaf3; border-radius: 12px; background: #ffffffbd; }
  .view-mode button { flex: 1; min-height: 44px; padding: 7px 3px; font-size: 11px; border: 0; border-radius: 8px; background: transparent; }
  .atlas-heading { top: 75px; left: 17px; max-width: calc(100% - 34px); }
  .atlas-heading h2 { font-size: 18px; max-height: 47px; overflow: hidden; } .atlas-heading p { max-width: 290px; font-size: 11px; }
  .topic-relations { top: 150px; left: auto; right: 12px; }
  .topic-relations button { min-height: 36px; }
  .selection-clear, .view-back { min-height: 36px; align-items: center; }
  .atlas-bottom { left: 14px; right: 14px; bottom: calc(34px + env(safe-area-inset-bottom)); flex-direction: column; align-items: center; gap: 6px; }
  .view-stats { max-width: none; gap: 5px; flex-wrap: nowrap; font-size: 10px; }
  .view-stats strong { font-size: 11px; } .view-stats i { display: none; }
  .canvas-tools { height: 46px; border-radius: 12px; box-shadow: 0 4px 20px #6583a012; } .canvas-tools button { width: 44px; height: 44px; } .canvas-tools .tool-mode { width: 44px; font-size: 11px; } .canvas-tools span { min-width: 38px; font-size: 11px; }
  .atlas-hint { font-size: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); left: 14px; right: 14px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .workspace:has(.detail-panel:not([hidden])) .atlas { height: 68%; }
  .detail-panel { left: 0; right: 0; top: auto; bottom: 0; width: 100%; height: 32%; max-height: none; padding: 0 18px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid #dce7f2; border-left: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px #41658417; overscroll-behavior: contain; }
  .detail-top { position: sticky; top: 0; z-index: 2; padding: 10px 0 4px; background: #fcfdff; }
  .icon-button { width: 44px; height: 44px; }
  .filters-panel { width: min(340px, 92vw); padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  .filters-panel .panel-heading { position: sticky; top: -18px; background: #fcfdff; z-index: 2; padding: 12px 0; }
  .search-box input, select { font-size: 16px; }
  select, .kind-chip, .relation-option, .filter-section summary { min-height: 44px; }
  .relation-option { font-size: 12px; }
  .detail-top { margin-bottom: 13px; } .detail-name { font-size: 18px; } .detail-actions { flex-direction: row; }
  .detail-section p { font-size: 12px; } .hover-tooltip { max-width: 180px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
/* 手机横屏让图谱占满宽度；筛选仍由顶部按钮打开。 */
@media (max-width: 950px) and (max-height: 500px) {
  body { height: 100dvh; grid-template-rows: 50px minmax(0, 1fr); }
  .workspace { display: block; } .atlas { height: 100%; }
  .header-center { display: none; }
  .filters-panel { display: none; position: absolute; right: 0; top: 0; bottom: 0; width: 300px; z-index: 16; }
  .filters-panel.is-open { display: block; position: absolute; }
  .view-mode { top: 6px; }
  .view-mode button { min-height: 36px; }
  .atlas-heading { top: 51px; }
  .atlas-heading h2 { font-size: 16px; margin-bottom: 0; }
  .atlas-heading p { font-size: 10px; }
  .topic-relations { top: 55px; left: auto; right: 16px; }
  .atlas-bottom { bottom: 8px; }
  .atlas-hint { display: none; }
  .detail-panel { width: 300px; }
}
