/* 阿仁川 eDNA 網羅的グラフ用 CSS */
/* 影響範囲を section 内に閉じ込めるため、dna-系クラスに限定 */

#dna-graph-section *,
#dna-graph-section *::before,
#dna-graph-section *::after {
  box-sizing: border-box;
}

#dna-graph-section {
  color: #222;
  background: #f3f6fb;
  padding: 16px 0 40px;
}

#dna-graph-section .dna-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

#dna-graph-section .dna-header {
  margin-bottom: 16px;
}

#dna-graph-section .dna-title {
  margin: 0 0 4px;
  font-size: 1.6rem;
  font-weight: 700;
}

#dna-graph-section .dna-subtitle {
  margin: 0;
  color: #555;
  font-size: 0.9rem;
}

#dna-graph-section .dna-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.09);
  padding: 18px 18px 20px;
}

#dna-graph-section .dna-card-header {
  margin-bottom: 12px;
}

#dna-graph-section .dna-card-header h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

#dna-graph-section .dna-card-note {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

/* タブボタン */
#dna-graph-section .dna-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 8px;
}

#dna-graph-section .dna-tab-button {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.86rem;
  cursor: pointer;
  background: #e5edf7;
  color: #334155;
  transition: background 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}

#dna-graph-section .dna-tab-button:hover {
  background: #d5e1f4;
}

#dna-graph-section .dna-tab-button.dna-active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

/* スケール切替トグル */
#dna-graph-section .dna-scale-toggle {
  display: inline-flex;
  align-items: flex-start;  /* ここを追加／変更 */
  gap: 4px;
  font-size: 0.85rem;
  color: #444;
  margin-bottom: 10px;
  user-select: none;
}

#dna-graph-section .dna-scale-toggle input {
  accent-color: #2563eb;
}

/* グラフエリア */
#dna-graph-section .dna-chart-wrapper {
  position: relative;
  width: 100%;
  height: 620px; /* 種数が多いので高めに */
  margin-bottom: 12px;
}

#dna-graph-section .dna-chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

/* 採水地点説明 */
#dna-graph-section .dna-site-info {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
  border-top: 1px solid #e5e7eb;
  padding-top: 8px;
}

/* フッター */
#dna-graph-section .dna-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 0.75rem;
  color: #888;
}

/* スマホ調整 */
@media (max-width: 600px) {
  #dna-graph-section .dna-card {
    padding: 14px 12px 16px;
  }

  /* 必要ならスマホ側の高さも少し余裕を持たせる */
  #dna-graph-section .dna-chart-wrapper {
    height: 720px;
  }
}
