:root {
  --ink: #0f172a;
  --muted: #475569;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #dbe5f3;
  --card-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

html,
body {
  margin: 0;
  background: linear-gradient(180deg, #f3f8ff 0%, #f8fafc 240px);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    "Noto Sans JP",
    Helvetica,
    Arial;
  font-size: 16.5px;
  line-height: 1.82;
}

header {
  background: linear-gradient(135deg, #e3eeff 0%, #f4f8ff 58%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 20px;
}

.host-manual-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
  position: relative;
}
.host-manual-header h1 {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  margin: 0;
  font-family:
    "Avenir Next",
    "Segoe UI",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "Meiryo",
    sans-serif;
  font-weight: 900;
  letter-spacing: 0.06em;
  font-size: clamp(1.28rem, 2.6vw, 1.6rem);
  color: #0f172a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
  line-height: 1.25;
}

@supports (-webkit-background-clip: text) {
  .host-manual-header h1 {
    background: linear-gradient(92deg, #0f172a 0%, #1d4ed8 55%, #0f172a 100%);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: none;
  }
}

.manual-logo {
  height: 30px !important;
  max-height: 30px !important;
  width: auto !important;
  max-width: 160px;
  object-fit: contain;
  display: block;
  padding: 6px 0 2px 0;
  flex: 0 0 auto;
}

h1 {
  margin: 0 0 4px;
  font-size: clamp(1.28rem, 2.2vw, 1.48rem);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0.01em;
}


.lead {
  color: var(--muted);
  margin: 4px 0 0;
}

main.wrap {
  padding-top: 26px;
}

nav.toc,
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
}

nav.toc {
  padding: 18px 20px;
  margin: 16px 0 28px;
  background: linear-gradient(180deg, #f0f7ff, #ffffff);
}

nav.toc strong {
  display: inline-block;
  color: var(--accent-strong);
  font-size: 1.02rem;
  margin-bottom: 8px;
}

nav.toc ol {
  margin: 8px 0 0;
}

nav.toc li {
  margin: 8px 0;
}

nav.toc a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
}

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

.card {
  padding: 22px 24px;
  margin: 20px 0;
}

h2 {
  font-size: clamp(1.22rem, 2vw, 1.4rem);
  line-height: 1.55;
  margin: 0 0 14px;
  padding: 8px 12px;
  background: #1d4ed8;
  color: #ffffff;
  border-left: none;
  border-radius: 8px;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.6;
  margin: 0.8em 0 0.45em;
  color: #1e40af;
}

ul,
ol {
  padding-left: 1.28em;
}

ul.black-disc-list {
  list-style: disc;
  padding-left: 1.28em;
}

ul.black-disc-list li::marker {
  color: #000;
}

ul li,
ol li {
  margin: 0.42em 0;
}

#flow .step-text ul {
  list-style: none;
  padding-left: 0;
  margin: 0.5em 0 0;
}

#flow .step-text ul li {
  margin: 0.42em 0;
}

#trouble ul {
  padding-right: 2.6em;
}

figure {
  background: #f7fbff;
  border: 1px dashed #c9daee;
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.step {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin: 8px 8px 12px;
}

.step-text {
  min-width: 0;
  flex: 1 1 auto;
}

.step-fig {
  margin: 0;
  flex: 0 0 min(38%, 360px);
  width: min(38%, 360px);
}

.step-fig figcaption {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 6px;
}

.step-fig-small {
  flex: 0 0 min(28%, 220px);
  width: min(28%, 220px);
}

.step-fig a[data-manual-zoom] {
  display: block;
}

.step-fig a[data-manual-zoom]:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 4px;
  border-radius: 8px;
}

.manual-zoom-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.8);
  z-index: 100001;
}

.manual-zoom-overlay.is-open {
  display: flex;
}

.manual-zoom-dialog {
  position: relative;
  max-width: min(96vw, 1600px);
  max-height: 92vh;
}

.manual-zoom-image {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.manual-zoom-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.manual-zoom-close:hover {
  background: #1e293b;
}

kbd,
code {
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

.note {
  background: #ecfeff;
  border: 1px solid #99f6e4;
  color: #0f766e;
  padding: 12px;
  border-radius: 10px;
  margin: 12px 0;
}

details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fcfdff;
  margin: 12px 0;
}

summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-strong);
}

footer {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 30px 0 12px;
  text-align: center;
}

.cta {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.jump {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fixed-preview-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100000;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

main {
  counter-reset: chapter;
}

main > section.card {
  counter-reset: section-step;
}

main > section.card > h2 {
  counter-increment: chapter;
}

ol.chapter-steps {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

ol.chapter-steps > li {
  counter-increment: section-step;
  position: relative;
  padding-left: 2.6em;
  padding-right: 2.6em;
}

ol.chapter-steps > li::before {
  content: counter(chapter) "." counter(section-step);
  position: absolute;
  left: 0;
  font-weight: 700;
}

@media (max-width: 800px) {
  .wrap {
    padding: 20px 14px;
  }

  .host-manual-header {
    gap: 10px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .manual-logo {
    height: 22px !important;
    max-height: 22px !important;
    width: auto !important;
    max-width: 120px;
    padding-top: 5px;
  }

  .card {
    padding: 18px 16px;
  }
  .step {
    flex-direction: column;
    gap: 14px;
  }

  .step-fig {
    margin-top: 6px;
    width: 100%;
    max-width: 360px;
  }
}


