:root {
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family:
    "Noto Sans JP",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background-color: #e5e7eb;
  color: #0f172a;
  line-height: 1.7;
}

/* マニュアル共通ナビゲーション */

.manual-nav {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: transparent;
}

.manual-nav__container {
  width: 100%;
  max-width: 1280px;
  display: flex;
  justify-content: flex-start;
}

.manual-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #004077;
  background: #fff;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 8px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.manual-nav__link i {
  font-size: 0.95rem;
}

.manual-nav__link:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.35);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.manual-nav__link:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.35);
  outline-offset: 2px;
}

/* 全体レイアウト */

.document {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 24px 16px 40px;
}

/* マニュアルカード（TOPページ用） */

.manual-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.08),
    0 2px 4px rgba(15, 23, 42, 0.04);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.manual-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #3b82f6, #1d4ed8);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.manual-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 28px rgba(0, 64, 119, 0.15),
    0 4px 8px rgba(0, 64, 119, 0.08);
}

.manual-card:hover::before {
  opacity: 1;
}

.manual-card__icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.manual-card:hover .manual-card__icon {
  transform: scale(1.1) rotate(5deg);
}

.manual-card__body {
  flex: 1;
  min-width: 0;
}

.manual-card__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
}

.manual-card__description {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
}

.manual-card__cta {
  flex-shrink: 0;
  font-size: 1.5rem;
  color: #cbd5e1;
  transition: all 0.3s ease;
}

.manual-card:hover .manual-card__cta {
  color: #1d4ed8;
  transform: translateX(4px);
}

/* ステップ番号バッジ */

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  margin-right: 8px;
}

.step-badge--success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.step-badge--warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.step-badge--danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ビジュアル強化：情報ボックス */

.info-box {
  position: relative;
  padding: 16px 20px 16px 56px;
  margin: 16px 0;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid #3b82f6;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.info-box::before {
  content: "\f05a";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: #3b82f6;
}

.info-box--success {
  border-left-color: #22c55e;
  background: #f0fdf4;
}

.info-box--success::before {
  content: "\f058";
  color: #22c55e;
}

.info-box--warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.info-box--warning::before {
  content: "\f071";
  color: #f59e0b;
}

.info-box--danger {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.info-box--danger::before {
  content: "\f06a";
  color: #ef4444;
}

.slide-container {
  position: relative;
  width: 100%;
  max-width: 1280px;
  min-height: 720px;
  background-color: #f8fafc;
  color: #004077;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
  border-radius: 4px;
}

.header-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 16px;
  width: 100%;
  background-color: #004077;
}

.side-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 100%;
  background-color: #004077;
}

.version-tag {
  position: absolute;
  top: 32px;
  right: 40px;
  background-color: #1e40af;
  color: #fff;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.footer {
  position: absolute;
  bottom: 16px;
  left: 40px;
  right: auto;
  color: #64748b;
  font-size: 12px;
}

.page-number {
  position: absolute;
  bottom: 16px;
  right: 40px;
  font-size: 14px;
  color: #64748b;
}

/* タイトル・表紙系 */

.title-section {
  margin-top: 150px;
  padding: 0 120px 0 140px;
}

.title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 16px;
  color: #004077;
}

.title-cover {
  font-size: 52px;
}

.subtitle {
  font-size: 24px;
  font-weight: 500;
  color: #1d4ed8;
  margin-bottom: 40px;
}

.title-underline {
  width: 120px;
  height: 4px;
  background-color: #1e40af;
  margin-top: 8px;
}

/* 表紙の情報欄 */

.info-section {
  padding: 0 120px 0 140px;
  margin-top: auto;
  margin-bottom: 60px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}

.info-label {
  width: 120px;
  font-weight: 600;
  color: #1e40af;
  padding-top: 2px;
  font-size: 14px;
}

.info-content {
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
}

/* 表紙の箇条書きのズレ対策 */
.info-content ul {
  margin: 0;
  padding-left: 1.3rem;
}

.info-content li {
  margin-bottom: 4px;
}

/* 目次 */

.slide-toc {
  display: flex;
  flex-direction: row;
}

.left-section {
  width: 320px;
  padding: 140px 40px 60px 60px;
  position: relative;
  z-index: 1;
}

.right-section {
  flex: 1;
  padding: 120px 80px 60px 0;
  position: relative;
}

.title-toc {
  font-size: 40px;
}

.toc-hint {
  margin-top: 16px;
  font-size: 12px;
  color: #64748b;
}

.vertical-divider {
  position: absolute;
  top: 120px;
  bottom: 60px;
  left: 320px;
  width: 2px;
  background-color: #e2e8f0;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-item + .toc-item {
  margin-top: 12px;
}

.toc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(to right, #ffffff, #f8fafc);
  border: 2px solid #e2e8f0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: #004077;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.toc-link:hover {
  background: #f8f9fa;
  border-color: #0099cc;
  color: #004077;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 64, 119, 0.15);
}

.toc-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toc-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
  transition: transform 0.25s ease;
}

.toc-link:hover .toc-number {
  transform: scale(1.1);
}

.toc-text p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.toc-arrow {
  font-size: 16px;
  color: #94a3b8;
  transition: all 0.25s ease;
}

.toc-link:hover .toc-arrow {
  color: #0099cc;
  transform: translateX(4px);
}

/* 共通コンテンツ */

.title-container {
  padding: 80px 80px 0 120px;
}

.content-container {
  position: relative;
  padding: 24px 80px 60px 120px;
}

.section {
  /* margin-bottom: 2rem; */
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 700;
  color: #004077;
  padding: 10px 16px;
  background: linear-gradient(to right, #eff6ff, transparent);
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  margin-bottom: 12px;
}

.section-title i {
  width: 22px;
  text-align: center;
  font-size: 1.15rem;
  color: #3b82f6;
}

.section-content {
  margin-top: 8px;
  margin-left: 32px;
  font-size: 14px;
  color: #334155;
  line-height: 1.7;
}

.section-content.no-indent {
  margin-left: 0;
}

.term-highlight {
  font-weight: 700;
  color: #1d4ed8;
}

.bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.bullet {
  min-width: 18px;
  text-align: center;
  color: #1d4ed8;
}

.bullet-text p {
  margin: 0;
}

/* 目次へボタン */

.back-to-toc {
  position: absolute;
  top: 24px;
  right: 24px;
}

.back-to-toc a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.04);
  color: #111827;
  text-decoration: none;
}

.back-to-toc a:hover {
  background-color: rgba(15, 23, 42, 0.12);
}

/* ハイライトボックス */

.highlight-box {
  position: relative;
  margin-top: 12px;
  padding: 14px 16px 14px 52px;
  border-radius: 12px;
  background-color: #eff6ff;
  border-left: 4px solid #3b82f6;
  font-size: 14px;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
  line-height: 1.7;
}

.highlight-box::before {
  content: "\f0eb";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: #3b82f6;
}

.highlight-box--success {
  background-color: #f0fdf4;
  border-left-color: #22c55e;
}

.highlight-box--success::before {
  content: "\f058";
  color: #22c55e;
}

.highlight-box--warning {
  background-color: #fffbeb;
  border-left-color: #f59e0b;
}

.highlight-box--warning::before {
  content: "\f071";
  color: #f59e0b;
}

.highlight-box--danger {
  background-color: #fef2f2;
  border-left-color: #ef4444;
}

.highlight-box--danger::before {
  content: "\f06a";
  color: #ef4444;
}

/* フロー図（テキスト版） */

.flow-text-diagram {
  margin-top: 4px;
}

.flow-text-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
}

.flow-text-box {
  flex: 1 1 0;
  min-width: 180px;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 12px;
}

.flow-text-step {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.flow-text-main {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #004077;
}

.flow-text-sub {
  margin: 0;
  font-size: 12px;
  color: #475569;
}

.flow-text-arrow {
  align-self: center;
  font-size: 18px;
  font-weight: 700;
  color: #94a3b8;
}

.flow-text-caption {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}

/* カードグリッド（機能概要・役割説明など） */

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin-top: 0.6rem;
}

.icon-card {
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.icon-card-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
}

.icon-card-title i {
  font-size: 1rem;
}

.icon-card-body {
  font-size: 0.95rem;
  margin: 0;
  color: #334155;
  line-height: 1.65;
}

.icon-card-body ul {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
}

.icon-card-body li {
  margin-bottom: 0.15rem;
}

/* カードレイアウト（目的・初期化など） */

.card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.card-box {
  flex: 1 1 260px;
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.card-title {
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #004077;
}

.card-title i {
  font-size: 0.95rem;
}

.card-body {
  margin: 0;
  font-size: 13px;
  color: #334155;
  line-height: 1.7;
}

ul.card-body {
  padding-left: 1.1rem;
  list-style: disc;
}

ul.card-body li {
  margin-bottom: 0.2rem;
}

.card-negative {
  border-left: 4px solid #f97316;
}

.card-positive {
  border-left: 4px solid #22c55e;
}

/* ブラケット図（リスト変更パターン） */

.bracket-container {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bracket-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 960px) {
  .bracket-container {
    flex-direction: row;
    align-items: stretch;
  }

  .bracket-column-start {
    flex: 0.9 1 0;
  }

  .bracket-column-middle {
    flex: 0.9 1 0;
  }

  .bracket-column-end {
    flex: 1.3 1 0;
  }
}

.bracket-card {
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 10px 12px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  font-size: 13px;
  color: #0f172a;
}

.bracket-card-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.bracket-icon {
  font-size: 20px;
  color: #1d4ed8;
  margin-top: 2px;
}

.bracket-main-text {
  flex: 1;
}

.bracket-main-title {
  margin: 0 0 4px;
  font-weight: 700;
}

.bracket-main-sub {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.bracket-card-branch {
  position: relative;
}

.bracket-branch-label {
  margin: 0 0 2px;
  font-weight: 600;
  font-size: 13px;
}

.bracket-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background-color: #004077;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-right: 4px;
}

.bracket-branch-sub {
  margin: 0 0 4px;
  font-size: 12px;
  color: #64748b;
}

.bracket-branch-icon {
  font-size: 14px;
  color: #64748b;
}

.bracket-card-leaf {
  font-size: 13px;
}

.bracket-leaf-title {
  margin: 0 0 4px;
  font-weight: 600;
}

.bracket-leaf-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 12px;
  color: #334155;
}

.bracket-leaf-list li {
  margin-bottom: 2px;
}

.bracket-tag.tag-a {
  background-color: #0ea5e9;
}

.bracket-tag.tag-b {
  background-color: #22c55e;
}

/* 入力モード用カード（スライド8） */

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.mode-card {
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 12px 14px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mode-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-card-header i {
  font-size: 1.1rem;
}

.mode-card-title {
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mode-card-title i {
  color: #004077;
}

.mode-card-tag {
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background-color: #ecfeff;
  color: #0f766e;
  border: 1px solid #67e8f9;
  margin-left: auto;
}

.mode-card-body {
  font-size: 0.9rem;
}

.mode-card-body ul {
  margin: 0.1rem 0 0;
  padding-left: 1.1rem;
}

.mode-card-body li {
  margin-bottom: 0.15rem;
}

.mode-step-flow {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-step-flow__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background-color: #f8fafc;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.mode-step-flow__arrow {
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
}

.mode-step-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
  font-size: 0.85rem;
}

.mode-step-text {
  font-size: 0.9rem;
}

.mode-card-note {
  margin-top: 12px;
  padding: 8px 12px;
  background-color: #fef9c3;
  border-left: 3px solid #facc15;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #713f12;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.mode-card-note::before {
  content: "\f0eb";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #facc15;
  font-size: 1rem;
}

/* スライド内の視覚的強化 */

.content-highlight {
  position: relative;
  padding: 16px 20px;
  margin: 12px 0;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 12px;
  border: 2px solid #bfdbfe;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.content-highlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, #3b82f6, #1d4ed8);
  border-radius: 12px 0 0 12px;
}

.content-highlight--success {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #bbf7d0;
}

.content-highlight--success::before {
  background: linear-gradient(to bottom, #22c55e, #16a34a);
}

.content-highlight--warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
}

.content-highlight--warning::before {
  background: linear-gradient(to bottom, #f59e0b, #d97706);
}

/* テーブル視覚強化 */

.visual-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 12px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.visual-table thead {
  background: linear-gradient(135deg, #004077, #1d4ed8);
}

.visual-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
  border-bottom: 2px solid #3b82f6;
}

.visual-table tbody tr {
  background-color: #ffffff;
  transition: background-color 0.2s ease;
}

.visual-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.visual-table tbody tr:hover {
  background-color: #eff6ff;
}

.visual-table tbody td {
  padding: 10px 16px;
  font-size: 0.9rem;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
}

.visual-table tbody tr:last-child td {
  border-bottom: none;
}

/* ステップフロー（スクリーンショット付き） */

.step-flow {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.step-flow .screenshot-wrap {
  flex: 1;
  min-width: 120px;
}

.step-arrow {
  font-size: 1.4rem;
  color: #888;
  align-self: center;
  padding-top: 1rem;
  flex-shrink: 0;
}

/* スクリーンショット表示 */

.screenshot-wrap {
  margin-top: 5px;
}

.screenshot-wrap img {
  width: auto;
  max-width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  display: block;
  margin: 0 auto;
}

/* 複数画像グリッド */
.img-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.img-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.img-grid-4 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (max-width: 600px) {
  .img-grid-2,
  .img-grid-3,
  .img-grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

.screenshot-caption {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

/* アイコンテーブル */
.icon-table td:first-child {
  width: 40px;
  text-align: center;
  padding: 4px 6px;
}
.icon-table td:first-child img {
  height: 28px;
  width: auto;
  max-width: none;
  object-fit: contain;
  box-shadow: none;
  border: none;
  margin: 0;
}

/* テキスト上・画像下の縦並びレイアウト */
.split-layout,
.split-layout--wide-text,
.split-layout--wide-image {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.split-layout > *:last-child,
.split-layout--wide-text > *:last-child,
.split-layout--wide-image > *:last-child {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  align-items: start;
}

/* レスポンシブ対応 */

@media (max-width: 768px) {
  .manual-card {
    flex-direction: column;
    text-align: center;
  }

  .manual-card__icon {
    margin: 0 auto;
  }

  .manual-card__cta {
    display: none;
  }

  .slide-container {
    min-height: auto;
    padding-bottom: 40px;
    overflow-x: auto;
  }

  .title-container {
    padding: 40px 16px 0;
  }

  .title-section {
    padding: 0 16px;
  }

  .info-section {
    padding: 0 16px;
  }

  .content-container {
    padding: 24px 16px 48px;
  }

  .section-content {
    margin-left: 0;
  }

  /* テーブル共通：スマホでテキスト折り返し */
  .feature-table th,
  .feature-table td,
  .function-table th,
  .function-table td,
  .visual-table th,
  .visual-table td,
  .mode-compare-table th,
  .mode-compare-table td {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }

  /* 固定幅カラムを緩和 */
  .table-column-version {
    width: 5rem;
  }
  .table-column-date {
    width: 7rem;
  }
  .table-column-medium {
    width: 6rem;
  }
  .table-column-small {
    width: 4.5rem;
  }
  .table-column-balanced {
    width: 5.5rem;
  }

  .toc-number {
    min-width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .section-title {
    font-size: 15px;
  }

  .step-flow {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .step-arrow {
    transform: rotate(90deg);
    padding-top: 0;
  }

  /* グリッド内の横向き矢印を縦向きに */
  .flow-arrow-col .flow-arrow-icon {
    display: inline-block;
    transform: rotate(90deg);
  }

  /* 複数カラム → 1カラム */
  .icon-grid {
    grid-template-columns: 1fr;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .card-row {
    flex-direction: column;
  }

  .card-box {
    flex: none;
    width: 100%;
  }
}

/* ノート／注意書き */

.callout,
.note-box,
.important-note {
  margin-top: 0.6rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #0f172a;
  border-left: 4px solid #1d4ed8;
  background-color: #eff6ff;
}

.callout.callout-warning,
.important-note {
  background-color: #fef3c7;
  border-left-color: #f59e0b;
}

.callout.callout-danger {
  background-color: #fee2e2;
  border-left-color: #ef4444;
}

.note-box {
  background-color: #eff6ff;
  border-left-color: #1d4ed8;
}

.callout-title {
  font-weight: 600;
  margin: 0 0 0.3rem;
}

.callout-body {
  margin: 0;
}

.callout-body ul {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

.callout-body li {
  margin-bottom: 0.2rem;
}

.spacing-top-md {
  margin-top: 0.8rem;
}

.spacing-top-lg {
  margin-top: 1rem;
}

.list-tight {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}

.list-tight li {
  margin-bottom: 0.2rem;
}

.text-md {
  font-size: 0.98rem;
}

.text-sm {
  font-size: 0.9rem;
}

.table-column-icon {
  width: 2.5rem;
}

.table-column-mini {
  width: 2.2rem;
}

.table-column-version {
  width: 7rem;
}

.table-column-date {
  width: 9rem;
}

.table-column-medium {
  width: 8rem;
}

.table-column-small {
  width: 6rem;
}

.table-column-balanced {
  width: 7.5rem;
}

/* テーブル（機能一覧・モード比較） */

.feature-table,
.function-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

.feature-table th,
.feature-table td,
.function-table th,
.function-table td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  vertical-align: top;
}

.feature-table th,
.function-table th {
  background: linear-gradient(135deg, #004077, #1d4ed8);
  color: #ffffff;
  font-weight: 600;
  text-align: left;
}

.feature-table td p,
.function-table td p {
  margin: 0;
}

.function-table td.availability-cell {
  text-align: center;
  font-weight: 600;
  color: #004077;
  width: 64px;
}

.feature-table .feature-icon,
.function-table .feature-icon {
  text-align: center;
  width: 2.5rem;
}

.feature-table .feature-icon i,
.function-table .feature-icon i {
  font-size: 15px;
  color: #1d4ed8;
}

.feature-table .feature-name,
.function-table .feature-name {
  font-weight: 600;
}

.feature-table .feature-desc,
.function-table .feature-desc {
  font-size: 12px;
  color: #334155;
  line-height: 1.6;
}

.mode-compare-table th,
.mode-compare-table td {
  font-size: 0.9rem;
}

/* ステップ形式のフローカード */

.step-flow.step-flow-horizontal {
  flex-direction: column;
}

@media (min-width: 960px) {
  .step-flow.step-flow-horizontal {
    flex-direction: row;
  }
}

.step-card {
  flex: 1 1 0;
  background-color: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0.85rem 1rem;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.step-number {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f766e;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.step-title {
  font-weight: 600;
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.step-title i {
  font-size: 0.9rem;
}

.step-body {
  font-size: 0.9rem;
  margin: 0;
}

.step-body ul {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
}

.step-body li {
  margin-bottom: 0.15rem;
}

/* ダークモード */

@media (prefers-color-scheme: dark) {
  body {
    background-color: #020617;
    color: #e5e7eb;
  }

  .slide-container {
    background-color: #020617;
    color: #e5e7eb;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.8);
  }

  .info-content,
  .section-content,
  .toc-text p,
  .bullet-text p {
    color: #e5e7eb;
  }

  .toc-link {
    background-color: #0f172a;
    border-color: #1e293b;
    color: #e5e7eb;
  }

  .toc-link:hover {
    background-color: #111827;
  }

  .flow-text-box {
    background-color: #0f172a;
    border-color: #1e293b;
  }

  .card-box,
  .mode-card,
  .bracket-card,
  .step-card {
    background-color: #020617;
    border-color: #1e293b;
  }

  .callout,
  .note-box {
    background-color: #0f172a;
    border-left-color: #38bdf8;
    color: #e0f2fe;
  }

  .callout.callout-warning,
  .important-note {
    background-color: #451a03;
    border-left-color: #f97316;
    color: #ffedd5;
  }

  .callout.callout-danger {
    background-color: #7f1d1d;
    border-left-color: #f87171;
    color: #fee2e2;
  }

  .feature-table,
  .function-table {
    background-color: #020617;
  }

  .feature-table th,
  .function-table th {
    background-color: #0f172a;
  }

  .back-to-toc a {
    background-color: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
  }

  .back-to-toc a:hover {
    background-color: rgba(15, 23, 42, 0.9);
  }
}

/* 印刷用設定：1スライド＝1ページ */

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  html,
  body {
    background-color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    margin: 0;
  }

  .document {
    padding: 0;
    gap: 0;
  }

  .slide-container {
    box-shadow: none !important;
    border-radius: 0;
    margin: 0;
    width: 100%;
    max-width: none;
    min-height: auto;
    page-break-after: always;
    break-after: page;
  }

  .slide-container:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .manual-nav {
    display: none !important;
  }

  .back-to-toc {
    display: none !important;
  }

  .feature-table,
  .feature-table tr,
  .feature-table td,
  .feature-table th,
  .function-table,
  .function-table tr,
  .function-table td,
  .function-table th {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .card-row,
  .card-box,
  .mode-grid,
  .mode-card,
  .flow-text-diagram,
  .bracket-container,
  .bracket-card,
  .step-card {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* 目次スライドのタイトル周りだけパディング調整 */
.slide-toc .title-container {
  padding: 0;
}

/* マニュアル一覧用カード（index.html用） */
.manual-card {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 20px 24px;
  background-color: #ffffff;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.manual-card:hover,
.manual-card:focus {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.manual-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  font-size: 28px;
}

.manual-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.manual-card__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #004077;
}

.manual-card__description {
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

.manual-card__cta {
  align-self: center;
  font-size: 24px;
  color: #2563eb;
  transition: transform 0.2s ease;
}

.manual-card:hover .manual-card__cta,
.manual-card:focus .manual-card__cta {
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .manual-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .manual-card__icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
}

/* 画面用：読みやすさ＋表紙のズレ修正 */
@media screen {
  .info-item {
    align-items: flex-start;
  }

  .info-label {
    width: 140px;
    font-size: 0.95rem;
    padding-top: 0;
  }

  .info-label p,
  .info-content p {
    margin: 0;
  }

  .info-content ul {
    margin: 0;
    padding-left: 1.3rem;
  }

  .info-content li {
    margin-bottom: 4px;
  }

  .section-content,
  .info-content,
  .highlight-box,
  .toc-text p,
  .flow-text-main {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .flow-text-sub,
  .flow-text-caption,
  .callout,
  .note-box,
  .important-note,
  .bracket-main-sub,
  .bracket-branch-sub,
  .bracket-branch-icon,
  .toc-arrow {
    font-size: 0.9rem;
  }

  .card-body,
  .bracket-card,
  .bracket-card-leaf,
  .mode-card-body,
  .step-body {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .feature-table,
  .function-table {
    font-size: 0.9rem;
  }

  .feature-table .feature-desc,
  .function-table .feature-desc {
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .toc-number {
    font-size: 1.05rem;
  }

  .flow-text-box {
    min-width: 200px;
  }
}

/* ============================================================
   大きめスマホ・小型タブレット対応 (max-width: 640px)
   ============================================================ */
@media (max-width: 640px) {
  .title-container {
    padding: 48px 24px 0 24px;
  }

  .content-container {
    padding: 16px 24px 48px;
  }

  .info-section {
    padding: 0 24px;
    margin-bottom: 32px;
  }

  .title-section {
    padding: 0 24px;
  }

  .slide-toc {
    flex-direction: column;
  }

  .left-section {
    width: 100%;
    padding: 64px 24px 12px;
  }

  .right-section {
    flex: none;
    width: 100%;
    padding: 0 24px 40px;
  }

  .vertical-divider {
    display: none;
  }

  .title-toc {
    font-size: 28px;
  }
}

/* ============================================================
   スマートフォン対応 (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
  .document {
    padding: 12px 8px 20px;
    gap: 12px;
  }

  .slide-container {
    border-radius: 0;
    box-shadow: none;
  }

  .info-item {
    flex-direction: column;
    gap: 2px;
  }

  .info-label {
    width: auto;
  }

  .flow-text-row {
    flex-direction: column;
  }

  .flow-text-box {
    flex: none;
    min-width: 0;
    width: 100%;
  }

  .flow-text-arrow {
    transform: rotate(90deg);
    align-self: flex-start;
    margin-left: 12px;
  }

  .icon-grid {
    grid-template-columns: 1fr;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .card-row {
    flex-direction: column;
  }

  .card-box {
    flex: none;
    width: 100%;
  }

  .feature-table,
  .function-table,
  .visual-table {
    font-size: 11px;
  }

  .feature-table th,
  .feature-table td,
  .function-table th,
  .function-table td,
  .visual-table th,
  .visual-table td {
    padding: 5px 6px;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }

  .table-column-version {
    width: 3.5rem;
  }
  .table-column-date {
    width: 5rem;
  }
  .table-column-small {
    width: 3rem;
  }
  .table-column-medium {
    width: 4rem;
  }
  .table-column-balanced {
    width: 3.5rem;
  }
  .table-column-icon {
    width: 2rem;
  }
  .table-column-mini {
    width: 1.8rem;
  }
}