/* 地震の味方 — kiken.css（わが街の地震危険度診断・専用スタイル）
   style.cssの変数・.block/.plain-link/.empty-note/.region-note/.region-links-card/.region-link を
   そのまま流用し、このファイルでは危険度診断固有のUIだけを追加する。 */

/* ---- 住所検索 ---- */
.kiken-search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.kiken-address-input {
  flex: 1;
  background: var(--bg-panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
}
.kiken-search-btn {
  flex: 0 0 auto;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.kiken-search-btn:disabled { opacity: 0.6; cursor: default; }
.kiken-search-btn:active:not(:disabled) { opacity: 0.85; }

/* ---- 確率カード ---- */
.kiken-prob-card {
  text-align: center;
  padding: 22px 16px 16px;
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.kiken-prob-label {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.kiken-prob-value {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  color: var(--lv-orange);
  margin: 0;
  letter-spacing: -0.01em;
}
.kiken-prob-rank {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 8px 0 14px;
}
.kiken-prob-sub {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.kiken-sub-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  min-width: 84px;
}
.kiken-sub-chip-label {
  font-size: 10.5px;
  color: var(--text-faint);
}
.kiken-sub-chip-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.kiken-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-panel-2);
  border-left: 3px solid var(--accent);
  padding: 10px 12px;
  border-radius: 8px;
  margin: 0 0 16px;
}

/* ---- ハザードマップ・ミニ地図 ---- */
.kiken-map-wrap { margin-top: 4px; }
.kiken-map-heading {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text);
}
.kiken-layer-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.kiken-layer-btn {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-panel-2);
  color: var(--text-muted);
  cursor: pointer;
}
.kiken-layer-btn.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.kiken-map-box {
  position: relative;
  width: 100%;
  height: 42vh;
  min-height: 260px;
  max-height: 400px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--map-ocean);
  overflow: hidden;
  margin-bottom: 8px;
}
.kiken-maplibre-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.kiken-map-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--map-ocean);
  color: var(--text-faint);
  font-size: 12px;
}
.kiken-map-loading[hidden] { display: none; }
.kiken-map-loading-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: kiken-map-loading-pulse 1s ease-in-out infinite;
}
@keyframes kiken-map-loading-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .kiken-map-loading-dot { animation: none; opacity: 0.7; }
}
.kiken-marker {
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  background: var(--lv-red);
  border: 2px solid #fff;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 3px rgba(238, 86, 76, 0.3);
}

/* ---- 凡例（地図内オーバーレイ・左下） ---- */
.kiken-legend {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 4;
  background: rgba(10, 13, 18, 0.88);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  max-width: 46%;
}
.kiken-legend[hidden] { display: none; }
.kiken-legend-group[hidden] { display: none; }
.kiken-legend-group + .kiken-legend-group:not([hidden]) { margin-top: 8px; }
.kiken-legend-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.kiken-legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.kiken-legend-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text);
  line-height: 1.7;
  white-space: nowrap;
}
.kiken-legend-list li i {
  flex: 0 0 auto;
  width: 14px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ---- 県別の特色コンテンツ ---- */
.kiken-pref-extra { margin-top: 16px; }

/* ---- 文字を大きくトグル対応 ---- */
html.large-text .kiken-prob-label,
html.large-text .kiken-sub-chip-label { font-size: 13.5px; }
html.large-text .kiken-prob-rank,
html.large-text .kiken-disclaimer { font-size: 13.5px; }
