.community-map-view {
  --atlas-paper: var(--study-paper, #fbfaf7);
  --atlas-sheet: var(--study-surface, #fffefa);
  --atlas-rule: var(--study-line, #dfdadb);
  --atlas-ink: var(--study-ink, #312936);
  --atlas-muted: var(--study-muted, #645b67);
  --atlas-accent: var(--study-action, #694786);
  --atlas-teal: var(--study-discussion, #326665);
  margin-block: 14px;
}

.community-map-view .is-community-map {
  --study-canvas: var(--atlas-paper);
  --study-map-edge: #918599;
  --community-stage-height: clamp(365px, 68dvh, 650px);
  border: 1px solid var(--atlas-rule);
  border-radius: 10px;
  background: var(--atlas-paper);
}

.community-map-view .interactive-map-tools {
  gap: 6px 12px;
  min-height: 53px;
  padding: 5px 13px;
  background: var(--atlas-sheet);
  border-radius: 10px 10px 0 0;
}

.community-map-view .interactive-map-tools > .community-map-display {gap: 6px;}
.community-map-view .community-map-display > button[data-map-layer] {
  min-height: 33px;
  padding: 4px 10px;
  gap: 6px;
  border: 1px solid var(--atlas-rule);
  border-radius: 5px;
  background: transparent;
  color: var(--atlas-muted);
  font-size: .8125rem;
}
.community-map-view .community-map-display > button[data-map-layer][aria-pressed=true] {
  color: var(--atlas-accent);
  background: #efe9f4;
  border-color: #d9cbe4;
}
.community-map-view .community-map-display > button[data-map-layer=discussions][aria-pressed=true] {
  color: var(--atlas-teal);
  background: #e8f1ed;
  border-color: #c8dad2;
}
.community-map-view .community-map-display > button[data-map-layer][aria-pressed=true]::after {content: none;}
.community-map-view .community-map-display > button[data-map-layer]:hover {border-color: currentColor;}
.community-map-view .interactive-map-tools > [aria-label="画布控制"] {gap: 2px;}
.community-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-inline-end: 4px;
  border: 1px solid var(--atlas-rule);
  border-radius: 5px;
  background: var(--atlas-paper);
}
.community-zoom-controls .map-zoom-value {min-width: 40px; color: var(--atlas-ink);}
.community-map-view .community-zoom-controls button {min-width: 30px; min-height: 31px; padding: 0; font-size: 1rem;}
.community-map-view :is(.interactive-map-tools [data-map-tool], .community-map-operations > summary) {color: var(--atlas-muted);}
.community-map-view .interactive-map-tools :is([data-map-tool=fit], [data-map-tool=evidence]),
.community-map-view .community-map-operations > summary {min-height: 36px; padding-inline: 8px; font-size: .8125rem;}
.community-map-view [data-map-tool=evidence][aria-expanded=true],
.community-map-view .community-map-operations[open] > summary {background: #f1edf3; color: var(--atlas-accent);}

.community-map-view .interactive-map-stage {
  background-color: var(--atlas-paper);
  background-image: radial-gradient(circle, #d8d1d2 .8px, transparent .95px);
  background-size: 20px 20px;
}
.community-map-view .is-community-map .interactive-node[data-community-node-kind=center] .node-dot {
  fill: var(--atlas-accent);
  stroke: var(--atlas-sheet);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.community-map-view .map-center-emblem {color: #fff; pointer-events: none;}
.community-map-view .map-center-emblem rect {fill: none; stroke: currentColor; stroke-width: inherit;}
.community-map-view .interactive-node[data-community-node-kind=board] .node-dot {
  fill: #f4eff7;
  stroke: #8b72a1;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.community-map-view .is-community-map .interactive-node[data-community-node-kind=center] .relation-node-label {
  fill: #34213f;
  font-family: var(--study-title);
  font-weight: 720;
}
.community-map-view .interactive-node .relation-label-backdrop {fill: var(--atlas-paper); stroke: none;}
.community-map-view .is-community-map .interactive-edge.kind-hierarchy {stroke: #92779e; stroke-width: 1.6;}
.community-map-view .map-legend .legend-hierarchy {border-color: #92779e;}
.community-map-view .interactive-node[data-community-node-kind=thread] .node-dot {stroke: var(--atlas-teal);}
.community-map-view .interactive-map-footer {
  padding: 8px 13px;
  border-radius: 0 0 10px 10px;
  background: var(--atlas-sheet);
  color: var(--atlas-muted);
  font-size: .75rem;
}
.community-map-view .community-map-details {background: var(--atlas-sheet); border-color: var(--atlas-rule);}
.community-map-view .community-map-details > header {align-items: center; margin-bottom: 5px;}
.community-map-view .community-map-details h3 {color: var(--atlas-ink);}
.community-map-view .community-map-status {font-size: .8125rem; color: var(--atlas-muted);}

.community-map-view .interactive-node .relation-node-label {
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-weight: 480;
  stroke: none;
}
.community-map-view .interactive-node[data-community-node-kind=board] .relation-node-label {font-weight: 620;}
.community-map-view .community-map-label-leader {
  fill: none;
  stroke: #a69aa7;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.community-map-view .community-layer-count {
  font-size: .75rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.community-map-view .community-layer-count:empty {display: none;}
.community-map-view .community-map-status {
  grid-column: 1;
  grid-row: 5;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 13px;
  margin: 0;
  border-top: 1px solid var(--atlas-rule);
}
.community-map-view .community-map-status[hidden] {display: none;}
.community-map-view .community-map-status button {min-height: 34px; font-size: inherit;}
@media (max-width: 700px) {
  .community-map-view .interactive-map-tools {padding: 5px 8px; gap: 3px 6px;}
  .community-map-view .interactive-map-tools > [aria-label="画布控制"] {padding-top: 3px; border-top: 1px solid var(--atlas-rule);}
  .community-map-view .interactive-map-footer {gap: 3px 12px;}
  .community-map-view .is-community-map {--community-stage-height: clamp(365px, 60dvh, 590px);}
}
@media (max-width: 420px) {
  .community-map-view .community-map-display > button[data-map-layer] {padding-inline: 6px; gap: 4px;}
  .community-map-view .interactive-map-tools > .community-map-display {flex-wrap: nowrap; gap: 4px;}
  .community-map-view .community-map-operations > summary {padding-inline: 3px;}
}
@media (pointer: coarse) {
  .community-map-view .interactive-map-tools :is(button[data-map-layer], button[data-map-tool]),
  .community-map-view .community-map-operations > summary {min-height: 44px;}
  .community-map-view .community-zoom-controls button {min-width: 44px;}
}
