/* 話題マップの図と、数値・凡例・拡大縮小ボタン。 */
.map-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.map-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 20px;
  font-weight: 700;
}
.map-summary .num {
  padding: 0 0.15em;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.1;
  border-bottom: 4px solid var(--accent);
}
.map-summary .sep { color: var(--muted); font-weight: 500; }

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 15px;
}
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend .dot {
  width: 20px; height: 20px; border-radius: 50%;
  color: #fff; font-style: normal; font-weight: 700; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.map-legend .dot.a { background: var(--a); }
.map-legend .dot.b { background: var(--b); }
.map-legend .chip {
  padding: 0 8px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent);
}
.map-legend svg { overflow: visible; }

.map-zoom { display: flex; gap: 8px; }

.map-scroll {
  overflow: auto;
  max-height: 72vh;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}
.map-scroll svg { display: block; }

/* SVG の中 */
.map-root rect { fill: var(--ink); }
.map-root text { fill: #fff; font-weight: 700; }
.map-guide { stroke: var(--guide); stroke-width: 1.5; }
.map-scale { fill: var(--muted); font-size: 15px; font-weight: 700; }
.map-link { fill: none; stroke: var(--line); stroke-width: 2.5; stroke-linecap: round; }
.map-link.dashed { stroke-dasharray: 8 7; }
.map-pick rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; }
.map-pick text { fill: var(--ink); font-size: 13px; font-weight: 700; }
.map-node { cursor: pointer; }
.map-node rect.box { fill: var(--surface); stroke-width: 2; }
.map-node.a rect.box { stroke: var(--a); }
.map-node.b rect.box { stroke: var(--b); }
.map-node.a rect.band { fill: var(--a-soft); }
.map-node.b rect.band { fill: var(--b-soft); }
.map-node:hover rect.box, .map-node:focus rect.box { stroke-width: 3; }
.map-node:focus { outline: none; }
.map-node.selected rect.box { fill: var(--accent-soft); stroke-width: 3.5; }
.map-node .badge { stroke: #fff; stroke-width: 2.5; }
.map-node.a .badge { fill: var(--a); }
.map-node.b .badge { fill: var(--b); }
.map-node .badge-text { fill: #fff; font-weight: 700; font-size: 14px; }
.map-node .label { fill: var(--ink); font-size: 16px; font-weight: 700; }
.map-node .english { fill: var(--muted); font-size: 13.5px; font-weight: 500; }
