/* bousai-data.com 子テーマから移植した /bousai/ 専用の見た目（bd_bousai_section_enqueue_assets で /bousai/ 配下だけ読み込む） */
/* cameraadd */
/* map */
body.bd-bousai .wrap-fixed-aspect {
  position: relative;
  width: 100%;
  padding-top: 52.5%; /* 高さを幅の52.5%に固定（800x420相当） */
}

body.bd-bousai .wrap-fixed-aspect.wrap-fixed-aspect-matome {
  padding-top: 75%; /* eq_matome_mapのみ4:3 */
}

body.bd-bousai .wrap-fixed-aspect.wrap-fixed-aspect-typhoon {
  padding-top: 80%; /* sc_typhoonは5:4 */
}

body.bd-bousai .div-fixed-aspect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* eq */
body.bd-bousai table#city-shindo,
body.bd-bousai table#city-shindo th,
body.bd-bousai table#city-shindo td {
  border: #ccc solid 1px;
}

body.bd-bousai table#city-shindo th,
body.bd-bousai table#city-shindo td {
  padding: 3px 6px;
}

body.bd-bousai .categoryid-5 .eye-catch-wrap {
  display: none;
}

/* 地震詳細では直後に同じ震源地図を表示するため、本文上部の重複アイキャッチだけ隠す。 */
.single-bd_earthquake .eye-catch-wrap {
  display: none;
}

body.bd-bousai table#city-shindo th {
  text-align: left;
}

body.bd-bousai table#city-shindo th.tb-shindo {
  width: 6em;
  background: #f2f8fd;
}

body.bd-bousai table#city-shindo td.tb-pref {
  width: 5em;
  text-align: left;
}

body.bd-bousai table#eq-info th {
  width: 7em;
  text-align: left;
}

body.bd-bousai table#city-shindo td.tb-city ul {
  margin: 0;
  padding: 0;
}

body.bd-bousai table#city-shindo td.tb-city ul li {
  list-style: none;
  display: inline-block;
  margin: 0.2em 1em 0.2em 0;
  line-height: 1.8em;
}

body.bd-bousai .cshindo {
  padding: 5px 7px;
  margin: 5px 0 5px 5px;
}

body.bd-bousai .cshindo.col1 { background-color: #ececec; }
body.bd-bousai .cshindo.col2 { background-color: #0097fb; color: white; }
body.bd-bousai .cshindo.col3 { background-color: #0159ec; color: white; }
body.bd-bousai .cshindo.col4 { background-color: #faec47; }
body.bd-bousai .cshindo.col5m { background-color: #fcc32e; }
body.bd-bousai .cshindo.col5p { background-color: #ff972e; }
body.bd-bousai .cshindo.col6m { background-color: #f91a22; color: white; }
body.bd-bousai .cshindo.col6p { background-color: #c60436; color: white; }
body.bd-bousai .cshindo.col7 { background-color: #c30386; color: white; }

body.bd-bousai .bd-earthquake-single__summary .cshindo,
body.bd-bousai .bd-earthquake-single__cities .cshindo {
  display: inline-block;
  min-width: 1.9em;
  margin: 0 0 0 4px;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 0.9em;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  vertical-align: baseline;
}

body.bd-bousai .bd-earthquake-single__cities th,
body.bd-bousai .bd-earthquake-single__cities tbody td:not(:last-child) {
  white-space: nowrap;
}

body.bd-bousai .bd-earthquake-single__cities tbody td:last-child {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}

body.bd-bousai .leaflet-popup-content {
  line-height: 1.7 !important;
}

body.bd-bousai .leaflet-popup-content .cshindo {
  padding: 3px 5px;
}

/* tenkimap */
body.bd-bousai .leaflet-marker-icon span {
  display: inline-block;
}

/*480px以下*/
@media screen and (max-width: 480px) {
  body.bd-bousai .wrap-fixed-aspect {
    padding-top: 135%; /* 縦長 */
  }

  body.bd-bousai .wrap-fixed-aspect.wrap-fixed-aspect-matome {
    padding-top: 135%; /* eq_matome_mapはスマホでは従来どおり縦長 */
  }

  body.bd-bousai .wrap-fixed-aspect.wrap-fixed-aspect-typhoon {
    padding-top: 80%; /* sc_typhoonはスマホでも5:4 */
  }
}

/* Home information hub: content on the dedicated homepage only. */
.bd-home { color: #334653; line-height: 1.85; }
.bd-home *, .bd-home *::before, .bd-home *::after { box-sizing: border-box; }
.bd-home .bd-home-intro { padding: clamp(18px, 2.5vw, 28px); background: #f3f7f8; border: 1px solid #dce6e9; border-radius: 14px; }
.bd-home .bd-home-kicker { margin: 0 0 8px; font-size: .78em; font-weight: 700; color: #486976; letter-spacing: .08em; }
.bd-home .bd-home-lead { margin: 0 0 12px; font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; line-height: 1.5; letter-spacing: .02em; color: #2b4553; }
.bd-home .bd-home-lead br { display: none; }
.bd-home .bd-home-intro > p:not([class]) { max-width: 56em; margin: 0; font-size: .9em; line-height: 1.75; }
.bd-home .bd-home-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.bd-home .bd-home-nav a { display: inline-block; padding: 9px 18px; background: #fff; color: #315969; border: 1px solid #cbdadd; border-radius: 999px; text-decoration: none; font-size: .9em; font-weight: 700; }
.bd-home > section { margin-top: 36px; scroll-margin-top: 80px; }
.article .bd-home h2 { margin: 0 0 14px; padding: 0; border: 0; background: none; color: #2b4553; font-size: clamp(21px, 2.8vw, 27px); line-height: 1.5; }
.bd-home .bd-home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.bd-home .bd-home-card { --bd-card-accent: #496d7d; --bd-card-tint: #eef4f6; min-width: 0; display: flex; flex-direction: column; padding: 26px; border: 1px solid #dce5e9; border-left: 3px solid var(--bd-card-accent); border-radius: 14px; background: #fff; box-shadow: 0 3px 14px rgb(39 64 78 / 4%); }
.bd-home .bd-home-card .bd-home-label { align-self: flex-start; padding: 3px 10px; border-radius: 6px; background: var(--bd-card-tint); margin: 0 0 12px; color: var(--bd-card-accent); font-size: .75em; font-weight: 700; letter-spacing: .08em; }
.article .bd-home .bd-home-card h3 { margin: 0 0 12px; padding: 0; border: 0; background: none; font-size: 1.12em; line-height: 1.6; }
.bd-home .bd-home-card h3 a { color: #2c4f60; text-decoration: none; }
/* Group by destination so reordering the cards preserves their colors. */
.bd-home .bd-home-card:has(a[href$="/earthquake-data"]) { --bd-card-accent: #985653; --bd-card-tint: #f8eeec; }
.bd-home .bd-home-card:has(a[href$="/bousai-keiho"]) { --bd-card-accent: #806413; --bd-card-tint: #faf3dc; }
.bd-home .bd-home-card:has(a[href$="/disaster-warning"]) { --bd-card-accent: #88603e; --bd-card-tint: #f6efe7; }
.bd-home .bd-home-card:has(a[href$="/typhoon"]) { --bd-card-accent: #76618b; --bd-card-tint: #f2eef6; }
.bd-home .bd-home-card:has(a[href$="/天気"]),
.bd-home .bd-home-card:has(a[href$="/%e5%a4%a9%e6%b0%97" i]),
.bd-home .bd-home-card:has(a[href$="/weather-map"]) { --bd-card-accent: #436e91; --bd-card-tint: #edf3f9; }
.bd-home .bd-home-card:has(a[href$="/河川"]),
.bd-home .bd-home-card:has(a[href$="/%e6%b2%b3%e5%b7%9d" i]),
.bd-home .bd-home-card:has(a[href$="/潮位"]),
.bd-home .bd-home-card:has(a[href$="/%e6%bd%ae%e4%bd%8d" i]) { --bd-card-accent: #367570; --bd-card-tint: #eaf5f2; }
.bd-home .bd-home-grid-two .bd-home-card { --bd-card-accent: #617548; --bd-card-tint: #f0f4e9; }

.bd-home .bd-home-card > p { margin: 0 0 18px; font-size: .88em; }
.bd-home .bd-home-card .bd-home-go { margin: auto 0 0; font-size: .85em; font-weight: 700; }
.bd-home a { color: #315f76; text-underline-offset: .22em; }
.bd-home a:hover { color: #173e52; text-decoration: underline; }
.bd-home a:focus-visible { outline: 3px solid #6b92a5; outline-offset: 4px; border-radius: 3px; }
.bd-home .bd-home-earthquakes { margin: 24px 0; }
.bd-home .bd-home-earthquakes .new-entry-card-link { padding: 18px 0; border-bottom: 1px solid #e1e8eb; border-radius: 0; }
.bd-home .bd-home-earthquakes .new-entry-card-title { font-size: 16px; line-height: 1.7; color: #2b4553; }
.bd-home .bd-home-earthquakes .new-entry-card-meta { margin-top: 8px; color: #626f78; }
.bd-home .bd-home-more { text-align: right; font-size: .9em; font-weight: 700; }
.bd-home .bd-home-source { padding: 28px; background: #f6f8f9; border-radius: 14px; font-size: .86em; }
.bd-home .bd-home-source p:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .bd-home .bd-home-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .bd-home .bd-home-card { padding: 22px; }
  .bd-home .bd-home-nav { gap: 8px; }
  .bd-home .bd-home-nav a { padding: 8px 12px; font-size: .8em; }
  .bd-home > section { margin-top: 36px; }
  .bd-home .bd-home-source { padding: 22px; }
}

/* Preparedness guides: shared, compact editorial layout. */
.bd-guide { --bd-guide-accent: #426c83; --bd-guide-tint: #edf4f8; color: #344651; line-height: 1.9; overflow-wrap: anywhere; }
.bd-guide-prep { --bd-guide-accent: #576e44; --bd-guide-tint: #f1f5eb; }
.bd-guide *, .bd-guide *::before, .bd-guide *::after { box-sizing: border-box; }
.bd-guide .bd-guide-intro { padding: 24px; border: 1px solid #dce5e8; border-left: 3px solid var(--bd-guide-accent); border-radius: 14px; background: var(--bd-guide-tint); }
.bd-guide .bd-guide-kicker, .bd-guide .bd-guide-label { margin: 0 0 8px; color: var(--bd-guide-accent); font-size: .78em; font-weight: 700; letter-spacing: .06em; }
.bd-guide .bd-guide-lead { margin: 0 0 12px; color: #2c424f; font-size: clamp(20px, 2vw, 25px); font-weight: 700; line-height: 1.6; }
.bd-guide .bd-guide-intro > p:not([class]) { margin: 0; font-size: .94em; }
.bd-guide .bd-guide-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.bd-guide .bd-guide-nav a { padding: 6px 12px; border: 1px solid #d2dfe3; border-radius: 20px; background: #fff; font-size: .8em; text-decoration: none; }
.bd-guide > section, .bd-guide .bd-guide-next { margin-top: 36px; scroll-margin-top: 76px; }
.article .bd-guide h2 { padding: 0 0 12px; margin: 0 0 18px; border: 0; border-bottom: 2px solid #e0e7ea; background: none; color: #2c424f; font-size: 1.3em; line-height: 1.6; }
.article .bd-guide h3 { padding: 0; margin: 26px 0 12px; border: 0; background: none; color: #2f4855; font-size: 1.08em; line-height: 1.6; }
.bd-guide p { margin: 0 0 18px; }
.bd-guide a { color: #315e76; text-underline-offset: .22em; }
.bd-guide a:hover { text-decoration-thickness: 2px; }
.bd-guide a:focus-visible { outline: 3px solid var(--bd-guide-accent); outline-offset: 3px; }
.bd-guide .bd-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.bd-guide .bd-guide-card { min-width: 0; padding: 22px; border: 1px solid #dce5e8; border-radius: 12px; background: #fff; }
.article .bd-guide .bd-guide-card h3 { margin: 0 0 10px; }
.bd-guide .bd-guide-card p:last-child { margin-bottom: 0; font-size: .92em; }
.bd-guide .bd-guide-note, .bd-guide .bd-guide-next { padding: 22px; background: var(--bd-guide-tint); border-left: 3px solid var(--bd-guide-accent); border-radius: 0 12px 12px 0; }
.bd-guide .bd-guide-note p:last-child, .bd-guide .bd-guide-next p:last-child { margin-bottom: 0; }
.bd-guide .bd-guide-source { font-size: .78em; color: #5d6c74; line-height: 1.75; }
.bd-guide .bd-guide-figure { margin: 24px auto; text-align: center; }
.bd-guide .bd-guide-figure img { display: block; width: auto; max-width: 100%; max-height: 280px; height: auto; margin: 0 auto; border-radius: 10px; }
.bd-guide .bd-guide-table { overflow-x: auto; margin: 20px 0; }
.bd-guide .bd-guide-table table { width: 100%; border-collapse: collapse; font-size: .95em; margin: 0; }
.bd-guide .bd-guide-table caption { text-align: left; padding-bottom: 10px; font-weight: 700; }
.bd-guide .bd-guide-table :is(th, td) { padding: 12px; border: 1px solid #dce5e8; background: #fff; text-align: center; color: #344651; }
.bd-guide .bd-guide-table th { background: var(--bd-guide-tint); }
.bd-guide .bd-guide-checklist { list-style: none; padding: 0; margin: 20px 0; }
.bd-guide .bd-guide-checklist li { position: relative; padding: 14px 16px 14px 42px; margin: 0; border-bottom: 1px solid #e1e8e4; background: #f8faf7; }
.bd-guide .bd-guide-checklist li::before { content: ''; position: absolute; left: 16px; top: 22px; width: 13px; height: 13px; border: 1.5px solid var(--bd-guide-accent); border-radius: 2px; }
.bd-guide .bd-guide-steps { padding-left: 1.6em; }
.bd-guide .bd-guide-steps li { padding-left: 6px; margin-bottom: 16px; }
.bd-guide .bd-guide-steps li::marker { font-weight: 700; color: var(--bd-guide-accent); }
.bd-guide .bd-guide-faq { padding: 24px; background: #f7f9fa; border-radius: 14px; }
@media (max-width: 600px) {
  .bd-guide .bd-guide-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bd-guide .bd-guide-intro, .bd-guide .bd-guide-card, .bd-guide .bd-guide-faq { padding: 18px; }
  .bd-guide .bd-guide-note, .bd-guide .bd-guide-next { padding: 18px; }
  .bd-guide .bd-guide-nav a { font-size: .78em; padding: 6px 10px; }
  .bd-guide .bd-guide-table :is(th, td) { padding: 10px 6px; }
}

/* Water calculator and a focused printable preparedness sheet. */
.bd-guide .bd-prep-tool { padding: 22px; border: 1px solid #d6e0ce; border-radius: 14px; background: #f5f8f1; }
.bd-guide .bd-prep-fields { display: flex; flex-wrap: wrap; gap: 16px; }
.bd-guide .bd-prep-fields label { flex: 1 1 180px; font-weight: 700; }
.bd-guide .bd-prep-fields input { display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 8px 12px; background: #fff; border: 1px solid #8c9f80; border-radius: 6px; color: #344651; font: inherit; }
.bd-guide .bd-prep-result { margin: 18px 0 0; font-size: 1.12em; font-weight: 700; }
.bd-guide .bd-guide-checklist .bd-prep-check { padding: 0; }
.bd-guide .bd-prep-check::before { display: none; }
.bd-guide .bd-prep-check label { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; cursor: pointer; }
.bd-guide .bd-prep-check input { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 7px; accent-color: #576e44; }
.bd-guide .bd-prep-print-button { max-width: 100%; padding: 12px 18px; border: 0; border-radius: 8px; background: #526942; color: #fff; font: inherit; font-size: .9em; cursor: pointer; white-space: normal; }
.bd-guide .bd-prep-print-button:focus-visible, .bd-guide .bd-prep-check input:focus-visible { outline: 3px solid #426c83; outline-offset: 3px; }
#bd-prep-print-sheet { display: none; }
@media print {
  html:has(body.bd-prep-printing) { margin: 0 !important; padding: 0 !important; }
  body.bd-prep-printing { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  body.bd-prep-printing > :not(#bd-prep-print-sheet) { display: none !important; }
  body.bd-prep-printing #bd-prep-print-sheet { display: block !important; color: #000; background: #fff; font: 11pt/1.6 sans-serif; padding: 10mm; }
  #bd-prep-print-sheet h1 { font-size: 19pt; margin: 0 0 12pt; }
  #bd-prep-print-sheet h2 { font-size: 13pt; margin: 14pt 0 6pt; }
  #bd-prep-print-sheet p { margin: 6pt 0; }
  #bd-prep-print-sheet ul { list-style: none; padding: 0; }
  #bd-prep-print-sheet li { margin: 6pt 0; break-inside: avoid; }
}

/* Earthquake overview: keep intensity colors intact. */
.bd-eq-page { --bd-guide-accent: #985653; --bd-guide-tint: #f8f1ef; }
.bd-eq-page .bd-eq-status { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; padding: 16px 20px; margin: 18px 0; border: 1px solid #e4dedb; border-radius: 12px; background: #faf7f5; font-size: .87em; }
.bd-eq-page .bd-eq-status p { margin: 0; }
.bd-eq-page .bd-eq-admin { margin: 12px 0; font-size: .8em; }
.bd-eq-page .bd-eq-admin summary { cursor: pointer; padding: 8px; }
.bd-eq-page .wrap-fixed-aspect-matome { height: clamp(380px, 55vw, 600px); padding-top: 0; border: 1px solid #dce5e8; border-radius: 14px; overflow: hidden; }
.bd-eq-page .leaflet-container { background: #edf1f3; font-family: inherit; }
.bd-eq-page .leaflet-popup-content { line-height: 1.8; }
.bd-eq-page .bd-eq-table { margin-top: 22px; overflow-x: auto; border: 1px solid #dce5e8; border-radius: 12px; scroll-margin-top: 76px; }
.bd-eq-page #city-shindo { width: 100%; min-width: 610px; margin: 0; border-collapse: collapse; font-size: .84em; }
.bd-eq-page #city-shindo :is(th, td) { padding: 12px; border: 0; border-bottom: 1px solid #e3e9ec; text-align: left; background: #fff; color: #344651; }
.bd-eq-page #city-shindo thead th { background: #edf2f5; font-weight: 700; }
.bd-eq-page #city-shindo tbody tr:nth-child(even) td { background: #f8fafb; }
.bd-eq-page #city-shindo tbody tr:last-child td { border-bottom: 0; }
.bd-eq-page #city-shindo td:first-child { font-weight: 700; color: #875451; text-align: center; }
.bd-eq-page .bd-eq-table:focus-visible { outline: 3px solid #426c83; outline-offset: 3px; }
@media (max-width: 600px) {
  .bd-eq-page .wrap-fixed-aspect-matome { height: 420px; }
  .bd-eq-page .bd-eq-status { padding: 14px; }
}

/* Spacing only for the warning legend. */
.bd-keiho-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 7px;
  margin: 20px 0 0;
}
