/* =========================================================
   基本設定
========================================================= */

:root {

  --primary: #2563eb;
  --primary-dark: #1d4ed8;

  --bg: #f5f7fb;
  --card: #ffffff;

  --text: #1f2937;
  --muted: #6b7280;

  --border: #e5e7eb;

  --hover-bg: #f8fbff;

  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  --info-text: #1e40af;

  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --success-text: #166534;

  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;

  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #991b1b;

  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

  --radius: 16px;

}


/* =========================================================
   リセット
========================================================= */

* {
  box-sizing: border-box;
}


html {
  scroll-behavior: smooth;
}


body {

  margin: 0;

  font-family:
    "Segoe UI",
    "Yu Gothic UI",
    Meiryo,
    sans-serif;

  background: var(--bg);

  color: var(--text);

  line-height: 1.7;

}


/* =========================================================
   共通コンテナ
========================================================= */

.container {

  width: min(1200px, 92%);

  margin: 0 auto;

}


/* =========================================================
   ヘッダー
========================================================= */

.hero {

  background:
    linear-gradient(
      135deg,
      var(--primary),
      var(--primary-dark)
    );

  color: #ffffff;

  padding: 56px 0;

  box-shadow: var(--shadow);

}


.hero h1 {

  margin: 0 0 12px;

  font-size: clamp(2rem, 5vw, 3rem);

  line-height: 1.3;

}


.eyebrow {

  margin: 0 0 12px;

  text-transform: uppercase;

  letter-spacing: 0.15em;

  font-size: 0.8rem;

  opacity: 0.85;

}


.lead {

  margin: 0;

  max-width: 800px;

  font-size: 1.05rem;

  opacity: 0.92;

}

/* ==================================================
   ページ最終更新日
================================================== */

.hero .page-meta {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* =========================================================
   メインコンテンツ
========================================================= */

main.container {

  padding-top: 40px;

  padding-bottom: 40px;

}


main {

  display: flex;

  flex-direction: column;

  gap: 28px;

}


/* =========================================================
   カード
========================================================= */

.card {

  background: var(--card);

  border-radius: var(--radius);

  padding: 32px;

  box-shadow: var(--shadow);

}


.card h2 {

  margin-top: 0;

}


.card h3 {

  margin-top: 0;

}

/* ==================================================
   ページ内目次
================================================== */

.toc-card {
  background: var(--card);
}

.page-toc ol {
  margin: 0;
  padding-left: 1.5rem;
}

.page-toc > ol {
  padding-left: 1.5rem;
}

.page-toc li {
  margin: 0.45rem 0;
  padding-left: 0.25rem;
}

.page-toc a {
  color: var(--text);
  text-decoration: none;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.page-toc a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.page-toc > ol > li::marker {
  color: var(--primary);
  font-weight: 700;
}

.page-toc ol ol {
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
}

.page-toc ol ol li {
  font-size: 0.95rem;
}

.page-toc ol ol li::marker {
  color: var(--muted);
}


/* =========================================================
   セクション見出し
========================================================= */

.section-heading {

  margin-bottom: 20px;

}


.section-heading h2 {

  margin-bottom: 0;

  padding-left: 14px;

  border-left: 5px solid var(--primary);

  font-size: 1.5rem;

  line-height: 1.4;

}


.section-label {

  display: block;

  margin-bottom: 8px;

  color: var(--primary);

  font-size: 0.75rem;

  font-weight: 700;

  letter-spacing: 0.12em;

}

/* ==================================================
   h3：本文中の小見出し・文節区切り
================================================== */

.card h3 {
  margin-top: 32px;
  margin-bottom: 12px;
  padding-top: 24px;

  border-top: 1px solid var(--border);

  font-size: 1.15rem;
  line-height: 1.5;
}


/* section-heading直後の最初のh3には線を表示しない */

.card .section-heading + h3 {
  margin-top: 24px;
  padding-top: 0;
  border-top: none;
}

/* ==================================================
   画像サイズ
================================================== */

.image-small {
  width: 60%;
}

.image-medium {
  width: 75%;
}

.image-large {
  width: 90%;
}

/* =========================================================
   通知ボックス
========================================================= */

.notice {

  margin: 24px 0;

  padding: 18px 20px;

  border: 1px solid;

  border-radius: 12px;

}


.notice p:last-child {

  margin-bottom: 0;

}


.notice-info {

  background: var(--info-bg);

  border-color: var(--info-border);

  color: var(--info-text);

}


.notice-success {

  background: var(--success-bg);

  border-color: var(--success-border);

  color: var(--success-text);

}


.notice-warning {

  background: var(--warning-bg);

  border-color: var(--warning-border);

  color: var(--warning-text);

}


/* =========================================================
   変更点一覧
========================================================= */

.change-list {

  margin: 24px 0;

  padding-left: 1.5rem;

}


.change-list li {

  margin-bottom: 20px;

  padding-left: 6px;

}


.change-list li:last-child {

  margin-bottom: 0;

}


.change-list strong {

  font-size: 1.02rem;

}


.change-list p {

  margin: 4px 0 0;

}


/* =========================================================
   表
========================================================= */

.table-wrapper {

  width: 100%;

  overflow-x: auto;

  -webkit-overflow-scrolling: touch;

}


.release-table {

  width: 100%;

  border-collapse: collapse;

}


.release-table th,
.release-table td {

  padding: 16px 20px;

  border-bottom: 1px solid var(--border);

  text-align: left;

  vertical-align: top;

  line-height: 1.7;

}


.release-table th {

  font-size: 0.9rem;

  color: var(--muted);

  font-weight: 700;

}


.release-table thead th {

  position: sticky;

  top: 0;

  z-index: 2;

  background: var(--card);

}


.release-table tbody tr:hover {

  background: var(--hover-bg);

}


.release-table tbody tr:last-child td {

  border-bottom: none;

}

/* ==================================================
   本文中の画像
================================================== */

.release-image {
  margin: 24px auto;
  text-align: center;
}

.release-image img {
  display: block;
  max-width: 85%;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.release-image figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}


/* =========================================================
   v2 → v3 移行対応表
========================================================= */

.migration-table {

  width: 100%;

  min-width: 1000px;

  border-collapse: separate;

  border-spacing: 0;

  table-layout: fixed;

}


.migration-table th,
.migration-table td {

  padding: 18px 24px;

  border-bottom: 1px solid var(--border);

  text-align: left;

  vertical-align: top;

  line-height: 1.7;

}


/* 列幅 */

.migration-table th:nth-child(1),
.migration-table td:nth-child(1) {

  width: 20%;

}


.migration-table th:nth-child(2),
.migration-table td:nth-child(2) {

  width: 23%;

}


.migration-table th:nth-child(3),
.migration-table td:nth-child(3) {

  width: 18%;

}


.migration-table th:nth-child(4),
.migration-table td:nth-child(4) {

  width: 21%;

}


.migration-table th:nth-child(5),
.migration-table td:nth-child(5) {

  width: 18%;

}


.migration-table thead th {

  position: sticky;

  top: 0;

  z-index: 2;

  background: var(--card);

  font-size: 0.9rem;

  color: var(--muted);

}


.migration-table tbody tr:hover {

  background: var(--hover-bg);

}


.migration-table tbody tr:last-child td {

  border-bottom: none;

}


/* =========================================================
   バッジ
========================================================= */

.badge {

  display: inline-block;

  margin: 2px 4px 2px 0;

  padding: 4px 10px;

  border-radius: 999px;

  font-size: 0.75rem;

  font-weight: 700;

  line-height: 1.4;

  white-space: nowrap;

}


.beta {

  background: #fee2e2;

  color: #991b1b;

}


.released {

  background: #dcfce7;

  color: #166534;

}


.coming-soon {

  background: #e5e7eb;

  color: #4b5563;

}


.new {

  background: #dbeafe;

  color: #1d4ed8;

}


/* =========================================================
   ドキュメントカード
========================================================= */

.document-grid {

  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 20px;

  margin-top: 24px;

}


.document-card {

  display: block;

  padding: 24px;

  border: 1px solid var(--border);

  border-radius: 14px;

  background: var(--card);

  color: var(--text);

  text-decoration: none;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;

}


.document-card:hover {

  transform: translateY(-3px);

  border-color: var(--primary);

  box-shadow: var(--shadow);

}


.document-card-label {

  display: block;

  margin-bottom: 8px;

  color: var(--primary);

  font-size: 0.7rem;

  font-weight: 700;

  letter-spacing: 0.12em;

}


.document-card h3 {

  margin-bottom: 8px;

}


.document-card p {

  margin: 0;

  color: var(--muted);

  font-size: 0.92rem;

}


/* =========================================================
   リンク
========================================================= */

a {

  color: var(--primary);

}


a:hover {

  color: var(--primary-dark);

}


/* =========================================================
   ボタン風リンク
========================================================= */

.button-link {

  display: inline-block;

  padding: 10px 18px;

  border-radius: 10px;

  background: var(--primary);

  color: #ffffff;

  text-decoration: none;

  font-weight: 700;

}


.button-link:hover {

  background: var(--primary-dark);

  color: #ffffff;

}


/* =========================================================
   注記
========================================================= */

.note {

  margin-top: 16px;

  color: var(--muted);

  font-size: 0.9rem;

}


/* =========================================================
   公開日
========================================================= */

.release-date {

  margin: 0;

  color: var(--muted);

  font-size: 0.95rem;

}


/* =========================================================
   フッター
========================================================= */

.footer {

  margin-top: 48px;

  padding: 28px 0;

  background: #1f2937;

  color: #ffffff;

}


.footer p {

  margin: 4px 0;

}


/* =========================================================
   ダークモード
========================================================= */

@media (prefers-color-scheme: dark) {

  :root {

    --bg: #0f172a;

    --card: #1e293b;

    --text: #f8fafc;

    --muted: #94a3b8;

    --border: #334155;

    --hover-bg: #243247;

    --info-bg: #172554;

    --info-border: #1e40af;

    --info-text: #bfdbfe;

    --success-bg: #052e16;

    --success-border: #166534;

    --success-text: #bbf7d0;

    --warning-bg: #451a03;

    --warning-border: #92400e;

    --warning-text: #fde68a;

  }


  .hero {

    background:
      linear-gradient(
        135deg,
        #1d4ed8,
        #0f172a
      );

  }


  .sidebar {

    box-shadow: none;

  }


  .release-table thead th,
  .migration-table thead th {

    background: var(--card);

  }


  .document-card {

    background: var(--card);

  }


  .coming-soon {

    background: #334155;

    color: #cbd5e1;

  }

}


/* =========================================================
   タブレット・スマートフォン
========================================================= */

@media (max-width: 900px) {

  .container {

    width: min(94%, 1200px);

  }


  .document-grid {

    grid-template-columns: 1fr;

  }


  .card {

    padding: 24px;

  }

}


/* =========================================================
   スマートフォン
========================================================= */

@media (max-width: 600px) {

  .hero {

    padding: 40px 0;

  }


  .hero h1 {

    font-size: 1.9rem;

  }


  main.container {

    padding-top: 24px;

  }


  .card {

    padding: 20px;

    border-radius: 12px;

  }


  .section-heading h2 {

    font-size: 1.3rem;

  }


  .release-table th,
  .release-table td {

    padding: 12px 14px;

  }


  .migration-table {

    min-width: 900px;

  }


  .migration-table th,
  .migration-table td {

    padding: 14px 20px;

  }

}


/* =========================================================
   印刷
========================================================= */

@media print {

  .hero {

    box-shadow: none;

  }


  .card {

    box-shadow: none;

    border: 1px solid #ccc;

    break-inside: avoid;

  }


  .button-link {

    background: none;

    color: #000000;

    padding: 0;

  }


  .footer {

    background: none;

    color: #000000;

  }

}