/* 議論ログ記事の「登場する人」カードと議論マップ図。生成は scripts/argument-map.mjs。 */
.article-body .speaker-profile {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 18px 0 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.article-body .speaker-profile-photo {
  flex: 0 0 72px;
}
/* 縦長のメンバー写真から顔の周りを丸く切り抜く（顔は横48%・縦42%付近） */
.article-body .speaker-profile-photo,
.amap-avatar {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 50%;
  background: var(--line);
}
.article-body .speaker-profile-photo {
  width: 72px;
  height: 72px;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--line);
}
.article-body .speaker-profile-photo img,
.article-body .amap-avatar img {
  position: absolute;
  left: -27%;
  top: -34%;
  width: 160%;
  max-width: none;
  height: auto;
  margin: 0;
  border: 0;
}
.article-body .speaker-profile-text {
  min-width: 0;
}
.article-body .speaker-profile h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.article-body .speaker-profile h3 a {
  color: inherit;
  text-decoration: none;
}
.article-body .speaker-profile h3 a:hover {
  color: var(--signal);
}
.article-body .speaker-profile p {
  margin: 0 0 6px;
}
.article-body .speaker-profile-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--signal);
  text-decoration: none;
}
@media (max-width: 420px) {
  .article-body .speaker-profile { gap: 12px; padding: 14px; }
  .article-body .speaker-profile-photo { flex-basis: 56px; }
  .article-body .speaker-profile-photo { width: 56px; height: 56px; }
}

/* ---- 議論マップ ---- */
.amap {
  --amap-support: #0b63ce;
  --amap-attack: #c2410c;
  --amap-qualify: #6b7280;
  --amap-surface: #f5f8fb;
  margin: 28px 0 8px;
}
html[data-color-mode="dark"] .amap {
  --amap-support: #7cbcff;
  --amap-attack: #ff9f7d;
  --amap-qualify: #a9bdcb;
  --amap-surface: #102232;
}
.amap-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.amap-arrow-support path { fill: var(--amap-support); }
.amap-arrow-attack path { fill: var(--amap-attack); }
.amap-arrow-qualify path { fill: var(--amap-qualify); }

.amap-center {
  position: relative;
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(11, 99, 206, 0.1), rgba(194, 65, 12, 0.08));
  border: 1px solid var(--line);
}
.amap-center-label,
.amap-issue-number {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.amap-center p {
  margin: 10px 0 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.7;
}

.amap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}
.amap-legend li { display: flex; align-items: center; gap: 6px; }

.amap-issue {
  margin: 34px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.amap-issue-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.article-body .amap-issue-head h3 { margin: 0; font-size: 20px; }

.amap-lane-heads {
  display: grid;
  gap: 8px;
  margin: 16px 0 6px;
}
.article-body .amap-lane-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--speaker, var(--ink));
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}
.amap-lane-head .amap-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px var(--speaker, var(--line));
}

.amap-graph-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.amap-figure { min-width: 600px; }
.amap-figure[data-lanes="2"] { min-width: 420px; }
.amap-graph {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--font-sans);
}
.amap-lane { fill: var(--amap-surface); }
.amap-node rect:first-child {
  fill: var(--paper);
  stroke: var(--speaker-line, var(--line));
  stroke-width: 1.5;
  transition: stroke 0.2s, filter 0.2s;
  filter: drop-shadow(0 2px 4px rgba(6, 19, 31, 0.08));
}
.amap-node-bar { fill: var(--speaker, var(--ink)); }
.amap-node-id { fill: var(--speaker, var(--ink)); font-size: 12px; font-weight: 800; }
.amap-node-time { fill: var(--muted); font-weight: 400; }
.amap-node-text { fill: var(--ink); font-size: 13.5px; }
.article-body .amap-node,
.article-body .amap-node text { cursor: pointer; transition: opacity 0.2s; text-decoration: none; }
.amap-node:focus { outline: none; }
.amap-node:focus-visible rect:first-child { stroke: var(--signal); stroke-width: 3; }

.amap-edge {
  fill: none;
  stroke-width: 2;
  transition: opacity 0.2s, stroke-width 0.2s;
}
.amap-edge-support { stroke: var(--amap-support); }
.amap-edge-attack { stroke: var(--amap-attack); }
.amap-edge-qualify { stroke: var(--amap-qualify); stroke-dasharray: 5 4; }

/* 強調: 選んだ主張とつながる主張・矢印以外を薄くする */
.amap-focus .amap-node:not(.is-active):not(.is-linked),
.amap-focus .amap-edge:not(.is-active) { opacity: 0.18; }
.amap-focus .amap-edge.is-active { stroke-width: 3.2; }
.amap-node.is-active rect:first-child { stroke: var(--speaker, var(--signal)); stroke-width: 3; filter: drop-shadow(0 4px 10px rgba(6, 19, 31, 0.18)); }
.amap-focus .amap-card:not(.is-active):not(.is-linked) { opacity: 0.45; }
.amap-card.is-active { box-shadow: 0 0 0 2px var(--speaker, var(--signal)); }

/* 表示時の描画: 矢印が線を引くように現れ、主張がふわっと出る */
.amap-graph.amap-pending .amap-edge { stroke-dashoffset: 600; stroke-dasharray: 600; }
.amap-graph.amap-pending .amap-edge-qualify { stroke-dasharray: 600; }
.amap-graph.amap-pending .amap-node { opacity: 0; }
.amap-graph.amap-drawn .amap-node { animation: amap-fade 0.5s ease-out both; }
.amap-graph.amap-drawn .amap-edge:not(.amap-edge-qualify) { stroke-dasharray: 600; animation: amap-draw 1.1s 0.35s ease-out both; }
.amap-graph.amap-drawn .amap-edge-qualify { animation: amap-fade 0.6s 0.6s ease-out both; }
@keyframes amap-draw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
@keyframes amap-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .amap-graph .amap-node, .amap-graph .amap-edge { animation: none !important; }
}

.amap-relations {
  margin: 12px 0 0;
  font-size: 14px;
}
.amap-relations summary {
  cursor: pointer;
  color: var(--signal);
  font-weight: 700;
}
.amap-relations ul { margin: 8px 0 0; padding-left: 0; list-style: none; }
.amap-relations li { margin: 0 0 8px; line-height: 1.7; }

.amap-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.article-body .amap-card {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--speaker, var(--line));
  background: var(--paper);
  font-size: 14px;
  line-height: 1.7;
  scroll-margin-top: 120px;
  transition: opacity 0.2s, box-shadow 0.2s;
}
.amap-card:focus { outline: none; }
.amap-card-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.amap-card .amap-avatar { width: 28px; height: 28px; flex: 0 0 auto; }
.amap-card-id { font-weight: 800; color: var(--speaker, var(--ink)); }
.amap-card-speaker { font-weight: 700; font-size: 13px; }
.amap-card-time { white-space: nowrap; color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.article-body .amap-card p { margin: 6px 0 0; }

.amap-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.article-body .amap-chip {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.article-body .amap-chip-support { border-color: var(--amap-support); color: var(--amap-support); }
.article-body .amap-chip-attack { border-color: var(--amap-attack); color: var(--amap-attack); }
.article-body .amap-chip-qualify { border-style: dashed; border-color: var(--amap-qualify); color: var(--amap-qualify); }

.amap-open {
  margin: 36px 0 0;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--amap-surface);
}
.article-body .amap-open h3 { margin: 0 0 8px; font-size: 20px; }
.amap-open ol { margin: 0; padding-left: 1.4em; }
.amap-open li { margin: 10px 0 0; }
.article-body .amap-open li p { margin: 0; font-weight: 700; }

.amap-figure { margin: 0 auto; }

.amap-scroll-hint { display: none; }
@media (max-width: 640px) {
  .article-body .amap-scroll-hint { display: block; margin: 8px 0 0; color: var(--muted); font-size: 12px; text-align: right; }
}
