/* =============================================
  0. 基本設定
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap');

.content-db * {
  font-family: 'Noto Sans JP', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}
.serif-font {
  font-family: 'Noto Serif JP', 'Times New Roman', Times, serif;
} 
/* =============================================
  1. 基本ヘッダー・タイトル
   ============================================= */
.content-db .db-h1 {
  font-size: 2.2em;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #0b3a5a;
  padding: 0;
  margin-bottom: 0;
  border-bottom: 8px solid #2D96FF;
  background: transparent url("/j/tokei/content/img/gyocen_db.jpg") bottom right no-repeat;
  background-size: 200px 40px;
}
@media (max-width: 959px) {
  .content-db .db-h1 {
    font-size: 1.6em;
    letter-spacing: 0.04em;
    background: none;
  }
}
.content-db h2,
.content-db .headline {
  margin: 0 0 16px 0;
  background-color: #D5F4FF;
  border-bottom: #2D96FF 2px solid;
}
.content-db h3:has(+ details) {
  margin: 16px 0 8px 0;
}

/* =============================================
  2. KV（キービジュアル）+ ナビゲーション一体型
   ============================================= */
/* KVエリア：上部を角丸に */
.content .content-db .kv-wrap {
  text-align: center;
  margin: 0;
  border: 1px solid #b9cfe0;
  border-bottom: 0;
  overflow: hidden;
}
.content .content-db .kv-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* =============================================
  タブ切り替え（PC / SP 共通）
============================================= */
.db-tabs {
  display: flex;
  flex-wrap: wrap;
  margin: 20px 0;
  width: 100%;
}
.db-tab-item {
  display: contents; 
}
.db-tab {
  flex: 1 1 0;
  order: 1;
  padding: 16px 8px;
  border: 1px solid #7fb6d8;
  border-left: 0;
  background: #eee;
  font-size: 1.21429em;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}
.db-tab-item:first-child .db-tab {
  border-left: 1px solid #7fb6d8;
  border-radius: 12px 0 0 0;
}
.db-tab-item:last-child .db-tab {
  border-radius: 0 12px 0 0;
}
.db-tab.is-active {
  background: #2b78a6;
  color: #fff;
  border-color: #2b78a6;
}
.db-tab-panel {
  order: 2;
  width: 100%;
  background-color: #fff;
  border: 1px solid #7fb6d8;
  border-top: none;
}
.content-db .db-tab-panel h2 {
  border-bottom: #7fb6d8 1px solid;
}
.content-db .db-tab-panel h2.secondary {
  margin: 24px 0 16px 0;
  border-top: #7fb6d8 1px solid;
}
.db-tab-panel hr {
  margin: 0 30px 16px;
  background-color: #7fb6d8;
  height: 1px;
  border: none;
}

/* =============================================
  SP：アコーディオン
============================================= */
@media (max-width: 768px) {
  .db-tabs {
    display: block;
  }
  .db-tab-item {
    display: block;
    margin-bottom: 8px;
  }
  .db-tab {
    order: initial;
    width: 100%;
    text-align: left;
    border-radius: 0 !important;
    border-left: 1px solid #7fb6d8;
  }
  .db-tab-panel {
    order: initial;
    width: auto;
  }
}


/* =============================================
  3. ABOUTセクション（データベース詳細）
   ============================================= */
.content .content-db .about-wrap {
  margin: 0;
  padding: 18px;
  border: 1px solid #b9cfe0;
  border-top: none;
  background: #f6fbff;
  display: grid;
  gap: 16px;
  align-items: center;
}
@media (min-width: 900px) {
  .content .content-db .about-wrap {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}
.content .content-db .db-logo-wrap {
  width: 160px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  border: 0;
  padding: 14px;
  box-sizing: border-box;
}
.content .content-db .db-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 0;
  background: transparent; 
  padding: 0;
}
.content .content-db .about-body {
  display: grid;
  gap: 12px;
}
.content .content-db .about-lead {
  margin: 0;
  line-height: 1.8;
  color: #0b3a5a;
  padding: 0;
}
.content .content-db .about-cta-grid {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
@media (min-width: 768px) {
  .content .content-db .about-cta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
}
.content .content-db .about-cta {
  display: grid;
  grid-template-rows: auto 1fr;
  text-decoration: none;
  width: 100%;
}
.content .content-db .about-cta-bubble {
  position: relative;
  display: block;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #b9cfe0;
  border: 1px solid #b9cfe0;

  color: #2a4a60;
  font-weight: 800;
  font-size: 0.9em;
  line-height: 1.35;
}
.content .content-db .about-cta-bubble::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -10px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #b9cfe0;
}
.content .content-db .about-cta-main {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;
  box-sizing: border-box;

  padding: 14px 16px;
  border-radius: 12px;

  background: #2b78a6;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: .02em;

  box-shadow: 0 6px 18px rgba(0,0,0,.10);
}

.content .content-db .about-cta-icon {
  font-weight: 900;
  font-size: 1.05em;
  opacity: .95;
}

.content .content-db .about-cta:hover .about-cta-main {
  filter: brightness(1.06);
}

.content .content-db .about-cta:focus-visible {
  outline: 3px solid #1a73e8;
  outline-offset: 3px;
}

/* =============================================
  4. データダウンロードリンク
   ============================================= */
.content .content-db ul.download-links {
  margin: 12px 0;
  padding: 0 20px;
  list-style: none;
  font-size: 1.142857em;
  display: grid;
  gap: 12px;
}
@media (min-width: 768px) {
  .content .content-db ul.download-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.content .content-db ul.download-links > li {
  background: none;
  padding: 0;
  margin: 0;
}
.content .content-db ul.download-links > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 2px solid #7fb6d8;
  border-radius: 12px;
  background: #ffffff;
  text-decoration: none;
  color: #0b3a5a;
  font-weight: 800;
  line-height: 1.4;
  transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
}
.content .content-db ul.download-links > li > a::after {
  content: "→";
  flex: 0 0 auto;
  font-weight: 900;
  opacity: .95;
}
.content .content-db ul.download-links > li > a:hover {
  background: #eaf6ff;
  border-color: #2b78a6;
}
.content .content-db ul.download-links > li > a:active {
  transform: translateY(1px);
}

/* =============================================
  5. 更新履歴（History）
   ============================================= */
.history-block {
  margin: 30px 0;
  font-size: 14px;
}
.history-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.content-db .history-title {
  margin: 0;
  font-size: 1.142857em;
  font-weight: 700;
}
.content-db .history-more {
  margin: 0;
  padding: 0;
  list-style: none;
  display: inline-block;
}
.history-more li a {
  display: inline-block;
  padding: 4px 12px 4px 20px;
  background-color: #f4f4f4;
  text-decoration: none;
  color: #000;
  position: relative;
}
.history-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.history-list li {
  display: flex;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px dashed #dcdcdc;
}
.history-date {
  flex: 0 0 10em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.history-text {
  flex: 1 1 auto;
  min-width: 0;
}
@media (max-width: 768px) {
  .history-list li {
    flex-direction: column;
    gap: 4px;
  }
  .history-date {
    flex-basis: auto;
  }
}
.history-block button {
  display: block;
  margin: 0 auto;
  width: 50%;
  padding: 10px;
  background-color: #1f82e5;
  color: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
  position: relative;
}
.history-block button::after {
  content: "▼";
  font-size: 10px;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-40%);
  color: #fff;
}

/* =============================================
  6. 汎用リンクアイコン（Excel/Zip/Top）
   ============================================= */
.content td a[href$=".xls"],
.content td a[href$=".xlsx"],
.content td a[href$=".xlsm"] {
  width: 100%;
  display: block;
  background-position: center right 10px;
  padding: 10px 40px 10px 10px;
}
details .data-content li a[href$=".xls"],
details .data-content li a[href$=".xlsx"],
details .data-content li a[href$=".xlsm"] {
  width: 100%;
  display: block;
  background-position: center right 10px;
  padding: 10px 40px 10px 10px;
}
.content td a[href$=".xls"]:hover,
.content td a[href$=".xlsx"]:hover,
.content td a[href$=".xlsm"]:hover {
  background-color: #1f82e5;
  color: #fff;
}
details .data-content li a[href$=".xls"]:hover,
details .data-content li a[href$=".xlsx"]:hover,
details .data-content li a[href$=".xlsm"]:hover {
  background-color: #2b78a6;
  color: #fff;
}
/* Zipリンク */
.content td a[href*=".zip"] {
  width: 100%;
  display: block;
  background: url("/j/shared_new/shared/images/icon_wo2.png") no-repeat;
  background-position: center right 10px;
  padding: 10px 32px 10px 10px;
}
.content a[href*=".zip"]:hover {
  background-color: #1f82e5;
  color: #fff;
}
@media (max-width: 768px) {
  .content td a[href$=".xls"],
  .content td a[href$=".xlsx"],
  .content td a[href$=".xlsm"],
  .content td a[href*=".zip"] {
    display: inline;
    background-position: right 40%;
    margin: 0 4px 0 0;
    padding: 0 24px 0 0;
  }
}
/* ページトップへ戻る */
a[href="#top"] {
  position: relative;
  padding-right: 20px;
}
a[href="#top"]::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  background: url("/j/shared_new/shared/images/icon_arrow1.png") no-repeat center center;
  background-size: contain;
  display: block;
  transform: rotate(-90deg);
  transform-origin: center center;
}

.db-lead {
  margin: 16px 0;
}
.two-wrap {
  display: flex;
  align-items: stretch;
  gap: 24px;
}
.two-wrap > *{
  flex: 1 1 0;
  min-width: 0;
}
@media (max-width: 768px) {
  .two-wrap {
    flex-direction: column;
    gap: 0;
  }
}
.content-db .two-wrap h2 {
  background: none;
  border-bottom: #2D96FF 2px solid;
}

/* 都道府県ダウンロード（リスト版） */
/* リストをグリッド化 */
details .data-content .pref-download-list {
  margin: 8px 0 16px 30px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* 最大3列 */
@media (min-width: 1100px) {
  details .data-content .pref-download-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* li の背景は空に（上書き） */
details .data-content .pref-download-list > li {
  margin: 0;
  background: none;
  padding: 0;
}

/* カード（リンク） */
details .data-content .pref-download-list > li > a {
  display: block;
  box-sizing: border-box;
  /* 右側はアイコン分の余白を確保 */
  padding: 12px 24px 12px 14px;
  border: 1px solid #b9cfe0;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.85714em;
  line-height: 1.35;
  position: relative;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

/* フォーカス可視化 */
details .data-content .pref-download-list > li > a:focus-visible {
  outline: 3px solid rgba(37, 130, 187, 0.35);
  outline-offset: 2px;
}


/* =========================================================
   .content-db details h4：ボーダー無し＋右端に開閉アイコン（border描画）
   ========================================================= */
.content-db details :is(h3, h4) {
  margin: 0;
  padding: 10px 44px 10px 30px;
  border-left: none;
  border-bottom: none;
  font-size: 1.142857em;
  font-weight: 700;
  position: relative;
  cursor: pointer;
}
.content-db details :is(h3) {
  padding: 10px 44px 10px 18px;
}

.content-db details :is(h3, h4):hover {
  background-color: #f0f8ff;
}

/* 右端のシェブロン（閉：下向き） */
.content-db details :is(h3, h4)::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg); /* 下向き */
}

/* 開：上向き */
.content-db details[open] :is(h3, h4)::after {
  transform: translateY(-50%) rotate(-135deg); /* 上向き */
}

/* フォーカス可視化（任意） */
.content-db details :is(h3, h4):focus-visible {
  outline: 3px solid rgba(37, 130, 187, 0.35);
  outline-offset: 2px;
}

/* =========================================================
   動画リスト & PDFリスト
   ========================================================= */
.guide-movie-list {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 20px auto;
  width: calc(100% - 40px);
}
.guide-movie-box {
	display: block;
	width: calc(50% - 10px);
  margin: 0;
	box-sizing: border-box;
	padding: 12px;
	border: 1px solid #7fb6d8;
	background: #ffffff;
	text-decoration: none;
	color: #333333;
  transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
}
.guide-movie-box:hover,
.guide-movie-box:focus {
	border-color: #2b78a6;
  background-color: #f0f8ff;
	text-decoration: none;
  cursor: pointer;
}
.guide-movie-thumb {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 10px;
}
.guide-movie-title {
	display: block;
	font-weight: bold;
	margin-bottom: 4px;
}
.guide-movie-text {
	display: block;
	font-size: 110%;
	line-height: 1.6;
}
@media screen and (max-width: 767px) {
	.guide-movie-box {
		width: 100%;
	}
  .guide-movie-box iframe {
    width: 100%;
    height: 240px;
  }
}
/* PDFリスト */
.guide-pdf-list {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 20px auto;
	width: calc(100% - 40px);
}
.guide-pdf-box {
	width: calc((100% - 40px) / 3);
	box-sizing: border-box;
	padding: 12px;
	background: #ffffff;
	color: #333333;
	text-align: center;
	transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
}
.guide-pdf-box:hover,
.guide-pdf-box:focus-within {
	border-color: #2b78a6;
	background-color: #f0f8ff;
}
.guide-pdf-box h3 {
  font-size: 100%;
  text-align: left;
  border-bottom: 1px solid #7fb6d8;
  line-height: 1.6;
  margin: 0 0 8px 0;
  padding: 0 0 8px 0;
  min-height: 77px;
}
.guide-pdf-box p {
  padding: 0;
  margin: 0;
}
.content-db .guide-pdf-box a:has(img) {
  background: none;
  margin: 0;
  padding: 0;
}
.guide-pdf-thumb {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 10px;
}
.guide-pdf-link {
	margin: 0;
	text-align: left;
	line-height: 1.6;
	font-size: 110%;
}
.guide-pdf-link a {
  display: inline-block;
	text-decoration: none;
  font-size: 0.85714em;
  line-height: 1.8;
}
.guide-pdf-link a:hover,
.guide-pdf-link a:focus {
	text-decoration: underline;
}
@media screen and (max-width: 767px) {
	.guide-pdf-box {
		width: 100%;
	}
  .guide-pdf-box h3 {
    min-height: auto;
  }
}