/* manual-intro と同じ 840px 中央カラム（先頭コールアウトは .manual-callout の margin と競合するためラッパーで揃える） */
.manual-intro-lead,
.manual-intro {
  box-sizing: border-box;
  width: 100%;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}

.manual-intro-lead {
  margin-bottom: 20px;
}

.manual-intro-lead > .manual-callout {
  margin: 0;
}

.manual-intro {
  margin-bottom: 32px;
  color: var(--muted);
}

.manual-intro-security-steps {
  margin: 0.65rem 0 0.85rem;
  padding-left: 1.25rem;
}

.manual-intro-security-steps li + li {
  margin-top: 0.35rem;
}

.manual-intro-security .mb-0 {
  margin-bottom: 0;
}

/*
 * 目次枠: PC・スマホとも同じ1つの枠・1:1の2列・左揃え
 */
.manual-page {
  overflow-x: visible;
}

.manual-toc {
  box-sizing: border-box;
  width: 100%;
  max-width: 840px;
  margin: 0 auto 40px;
  padding: 20px 24px;
  background: #ecfdf5;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow-x: clip;
}

.manual-toc-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  align-items: start;
  width: 100%;
}

.manual-toc-group {
  min-width: 0;
  text-align: left;
}

.manual-toc h2 {
  font-size: 1rem;
  margin: 0 0 12px;
}

.manual-toc h2 a {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}

.manual-toc h2 a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.manual-toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.manual-toc li + li {
  margin-top: 6px;
}

.manual-toc a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.5;
}

.manual-toc a:hover {
  text-decoration: underline;
}

@media (min-width: 720px) {
  .manual-toc-flow ol a {
    white-space: nowrap;
  }
}

.manual-jump-nav {
  display: none;
}

.manual-page .manual-section,
.manual-page .manual-flow-step {
  scroll-margin-top: 4.5rem;
}

@media (max-width: 719px) {
  .manual-toc {
    padding: 16px 14px;
    overflow: visible;
  }

  .manual-toc-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .manual-toc h2 {
    font-size: 0.9375rem;
  }

  .manual-toc ol a {
    font-size: 0.875rem;
  }

  .manual-toc-flow ol a {
    white-space: normal;
  }

  /* 固定メニュー: 本文の上に重ねる（レイアウトは押し広げない） */
  .manual-jump-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: fixed;
    right: 0;
    top: max(9rem, calc(8rem + env(safe-area-inset-top, 0)));
    z-index: 8;
    width: max-content;
    max-width: 9.25rem;
    box-sizing: border-box;
    padding: 8px 10px;
    padding-right: max(10px, calc(10px + env(safe-area-inset-right, 0)));
    background: rgba(236, 253, 245, 0.55);
    border: 1px solid rgba(15, 118, 110, 0.3);
    border-right: none;
    border-radius: 12px 0 0 12px;
    box-shadow: -2px 4px 16px rgba(28, 25, 23, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
  }

  .manual-jump-nav a {
    pointer-events: auto;
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 4px 2px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
    color: var(--primary-dark);
    background: transparent;
    border: none;
    border-radius: 4px;
    box-shadow: none;
    white-space: nowrap;
  }

  .manual-jump-nav a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    background: rgba(209, 250, 229, 0.45);
  }
}

.manual-section {
  max-width: 840px;
  margin: 0 auto 48px;
}

.manual-section h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

.manual-section--faq {
  margin-top: 0;
}

.manual-section--faq > h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.manual-section--faq .manual-step-body h3 {
  font-size: 1rem;
  font-weight: 600;
}

.manual-section .section-lead {
  color: var(--muted);
  margin: 0 0 20px;
}

.manual-flow-step {
  margin-top: 32px;
  padding-top: 8px;
}

.manual-flow-step:first-of-type {
  margin-top: 20px;
}

.manual-flow-step > h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.manual-step {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 12px 16px;
  margin-bottom: 28px;
}

.manual-step:not(:has(.manual-step-num)) {
  grid-template-columns: 1fr;
}

.manual-step-num {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.manual-step-body h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.manual-step-body p,
.manual-step-body ul {
  margin: 0 0 12px;
}

.manual-step-body ul {
  padding-left: 1.25rem;
}

.manual-figure {
  margin: 16px auto 0;
  width: 100%;
  max-width: 500px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: #fafcfc;
  overflow: hidden;
}

.manual-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.manual-figure-placeholder {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.manual-figure-caption {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: white;
}

.manual-callout:not(.manual-intro-security) {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  margin: 16px 0;
  font-size: 0.95rem;
}

.manual-callout.manual-intro-security {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
}

.manual-callout--info {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.manual-callout strong {
  display: block;
  margin-bottom: 4px;
}

.manual-link {
  color: var(--primary-dark);
  font-weight: 700;
  word-break: break-all;
}

.manual-optional {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 6px;
}

@media (max-width: 600px) {
  .manual-step {
    grid-template-columns: 1fr;
  }

  .manual-step-num {
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
  }
}
